diff options
author | Paul Walmsley <paul@pwsan.com> | 2011-03-11 00:17:45 -0500 |
---|---|---|
committer | Paul Walmsley <paul@pwsan.com> | 2011-03-11 00:17:45 -0500 |
commit | c0718df4d666cc5fd8837ac93c82995a17bfdbf5 (patch) | |
tree | 32df3f7405be2be07bdb1c6b98ebc0b143cf6571 /arch/arm/mach-omap2/Makefile | |
parent | e1d6f4729e9fd46efa1029b6e806bb8b6c24e776 (diff) |
OMAP2+: voltage: reorganize, split code from data
This is a first pass at reorganizing mach-omap2/voltage.c:
- Separate almost all of the data from the code of mach-omap2/voltage.c.
The code remains in mach-omap2/voltage.c. The data goes into one
of several places, depending on what type of data it is:
- Silicon process/validation data: mach-omap2/opp*_data.c
- VC (Voltage Controller) data: mach-omap2/vc*_data.c
- VP (Voltage Processor) data: mach-omap2/vp*_data.c
- Voltage domain data: mach-omap2/voltagedomains*_data.c
The ultimate goal is for all this data to be autogenerated, the same
way we autogenerate the rest of our data.
- Separate VC and VP common data from VDD-specific VC and VP data.
- Separate common voltage.c code from SoC-specific code; reuse common code.
- Reorganize structures to avoid unnecessary memory loss due to unpacked
fields.
There is much left to be done. VC code and VP code should be separated out
into vc*.c and vp*.c files. Many fields in the existing structures are
superfluous, and should be removed. Some code in voltage.c seems to be
duplicated; that code should be moved into functions of its own. Proper
voltage domain code should be created, as was done with the powerdomain
and clockdomains, and powerdomains should reference voltagedomains.
Thanks to Shweta Gulati <shweta.gulati@ti.com> for comments. Thanks
to Rajendra Nayak <rnayak@ti.com> for finding and fixing some bugs
that prevented OMAP4 from booting:
https://patchwork.kernel.org/patch/587311/
His patch has been folded into this one to avoid breaking OMAP4
between patches. Thanks also to Kevin Hilman <khilman@ti.com> for
finding and fixing a compile problem when !CONFIG_PM:
http://www.spinics.net/lists/arm-kernel/msg118067.html
His patch has also been folded into this one to avoid breaking
!CONFIG_PM builds.
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Shweta Gulati <shweta.gulati@ti.com>
Cc: Rajendra Nayak <rnayak@ti.com>
Cc: Kevin Hilman <khilman@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/Makefile')
-rw-r--r-- | arch/arm/mach-omap2/Makefile | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile index c5b1be9b7328..ea1e26f58b91 100644 --- a/arch/arm/mach-omap2/Makefile +++ b/arch/arm/mach-omap2/Makefile | |||
@@ -59,10 +59,10 @@ endif | |||
59 | # Power Management | 59 | # Power Management |
60 | ifeq ($(CONFIG_PM),y) | 60 | ifeq ($(CONFIG_PM),y) |
61 | obj-$(CONFIG_ARCH_OMAP2) += pm24xx.o | 61 | obj-$(CONFIG_ARCH_OMAP2) += pm24xx.o |
62 | obj-$(CONFIG_ARCH_OMAP2) += sleep24xx.o pm_bus.o voltage.o | 62 | obj-$(CONFIG_ARCH_OMAP2) += sleep24xx.o pm_bus.o |
63 | obj-$(CONFIG_ARCH_OMAP3) += pm34xx.o sleep34xx.o voltage.o \ | 63 | obj-$(CONFIG_ARCH_OMAP3) += pm34xx.o sleep34xx.o \ |
64 | cpuidle34xx.o pm_bus.o | 64 | cpuidle34xx.o pm_bus.o |
65 | obj-$(CONFIG_ARCH_OMAP4) += pm44xx.o voltage.o pm_bus.o | 65 | obj-$(CONFIG_ARCH_OMAP4) += pm44xx.o pm_bus.o |
66 | obj-$(CONFIG_PM_DEBUG) += pm-debug.o | 66 | obj-$(CONFIG_PM_DEBUG) += pm-debug.o |
67 | obj-$(CONFIG_OMAP_SMARTREFLEX) += sr_device.o smartreflex.o | 67 | obj-$(CONFIG_OMAP_SMARTREFLEX) += sr_device.o smartreflex.o |
68 | obj-$(CONFIG_OMAP_SMARTREFLEX_CLASS3) += smartreflex-class3.o | 68 | obj-$(CONFIG_OMAP_SMARTREFLEX_CLASS3) += smartreflex-class3.o |
@@ -78,13 +78,25 @@ endif | |||
78 | 78 | ||
79 | # PRCM | 79 | # PRCM |
80 | obj-$(CONFIG_ARCH_OMAP2) += prcm.o cm2xxx_3xxx.o prm2xxx_3xxx.o | 80 | obj-$(CONFIG_ARCH_OMAP2) += prcm.o cm2xxx_3xxx.o prm2xxx_3xxx.o |
81 | obj-$(CONFIG_ARCH_OMAP3) += prcm.o cm2xxx_3xxx.o prm2xxx_3xxx.o | 81 | obj-$(CONFIG_ARCH_OMAP3) += prcm.o cm2xxx_3xxx.o prm2xxx_3xxx.o \ |
82 | vc3xxx_data.o vp3xxx_data.o | ||
82 | # XXX The presence of cm2xxx_3xxx.o on the line below is temporary and | 83 | # XXX The presence of cm2xxx_3xxx.o on the line below is temporary and |
83 | # will be removed once the OMAP4 part of the codebase is converted to | 84 | # will be removed once the OMAP4 part of the codebase is converted to |
84 | # use OMAP4-specific PRCM functions. | 85 | # use OMAP4-specific PRCM functions. |
85 | obj-$(CONFIG_ARCH_OMAP4) += prcm.o cm2xxx_3xxx.o cminst44xx.o \ | 86 | obj-$(CONFIG_ARCH_OMAP4) += prcm.o cm2xxx_3xxx.o cminst44xx.o \ |
86 | cm44xx.o prcm_mpu44xx.o \ | 87 | cm44xx.o prcm_mpu44xx.o \ |
87 | prminst44xx.o | 88 | prminst44xx.o vc44xx_data.o \ |
89 | vp44xx_data.o | ||
90 | |||
91 | # OMAP voltage domains | ||
92 | ifeq ($(CONFIG_PM),y) | ||
93 | voltagedomain-common := voltage.o | ||
94 | obj-$(CONFIG_ARCH_OMAP2) += $(voltagedomain-common) | ||
95 | obj-$(CONFIG_ARCH_OMAP3) += $(voltagedomain-common) \ | ||
96 | voltagedomains3xxx_data.o | ||
97 | obj-$(CONFIG_ARCH_OMAP4) += $(voltagedomain-common) \ | ||
98 | voltagedomains44xx_data.o | ||
99 | endif | ||
88 | 100 | ||
89 | # OMAP powerdomain framework | 101 | # OMAP powerdomain framework |
90 | powerdomain-common += powerdomain.o powerdomain-common.o | 102 | powerdomain-common += powerdomain.o powerdomain-common.o |