diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-omap2/Makefile | 5 | ||||
-rw-r--r-- | arch/arm/mach-omap2/io.c | 21 | ||||
-rw-r--r-- | arch/arm/mach-omap2/omap_hwmod_2420_data.c (renamed from arch/arm/mach-omap2/omap_hwmod_2420.h) | 29 | ||||
-rw-r--r-- | arch/arm/mach-omap2/omap_hwmod_2430_data.c (renamed from arch/arm/mach-omap2/omap_hwmod_2430.h) | 29 | ||||
-rw-r--r-- | arch/arm/mach-omap2/omap_hwmod_34xx.h | 167 | ||||
-rw-r--r-- | arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 174 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/omap_hwmod.h | 8 |
7 files changed, 226 insertions, 207 deletions
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile index 5da5ca1130df..7fa4dec2947e 100644 --- a/arch/arm/mach-omap2/Makefile +++ b/arch/arm/mach-omap2/Makefile | |||
@@ -74,6 +74,11 @@ obj-$(CONFIG_ARCH_OMAP4) += $(clock-common) clock44xx_data.o \ | |||
74 | obj-$(CONFIG_ARCH_OMAP2420) += opp2420_data.o | 74 | obj-$(CONFIG_ARCH_OMAP2420) += opp2420_data.o |
75 | obj-$(CONFIG_ARCH_OMAP2430) += opp2430_data.o | 75 | obj-$(CONFIG_ARCH_OMAP2430) += opp2430_data.o |
76 | 76 | ||
77 | # hwmod data | ||
78 | obj-$(CONFIG_ARCH_OMAP2420) += omap_hwmod_2420_data.o | ||
79 | obj-$(CONFIG_ARCH_OMAP2430) += omap_hwmod_2430_data.o | ||
80 | obj-$(CONFIG_ARCH_OMAP3) += omap_hwmod_3xxx_data.o | ||
81 | |||
77 | # EMU peripherals | 82 | # EMU peripherals |
78 | obj-$(CONFIG_OMAP3_EMU) += emu.o | 83 | obj-$(CONFIG_OMAP3_EMU) += emu.o |
79 | 84 | ||
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c index f1685572f982..303d5c2c6fb5 100644 --- a/arch/arm/mach-omap2/io.c +++ b/arch/arm/mach-omap2/io.c | |||
@@ -46,9 +46,6 @@ | |||
46 | #include <plat/clockdomain.h> | 46 | #include <plat/clockdomain.h> |
47 | #include "clockdomains.h" | 47 | #include "clockdomains.h" |
48 | #include <plat/omap_hwmod.h> | 48 | #include <plat/omap_hwmod.h> |
49 | #include "omap_hwmod_2420.h" | ||
50 | #include "omap_hwmod_2430.h" | ||
51 | #include "omap_hwmod_34xx.h" | ||
52 | 49 | ||
53 | /* | 50 | /* |
54 | * The machine specific code may provide the extra mapping besides the | 51 | * The machine specific code may provide the extra mapping besides the |
@@ -322,21 +319,17 @@ static int __init _omap2_init_reprogram_sdrc(void) | |||
322 | void __init omap2_init_common_hw(struct omap_sdrc_params *sdrc_cs0, | 319 | void __init omap2_init_common_hw(struct omap_sdrc_params *sdrc_cs0, |
323 | struct omap_sdrc_params *sdrc_cs1) | 320 | struct omap_sdrc_params *sdrc_cs1) |
324 | { | 321 | { |
325 | struct omap_hwmod **hwmods = NULL; | ||
326 | |||
327 | if (cpu_is_omap2420()) | ||
328 | hwmods = omap2420_hwmods; | ||
329 | else if (cpu_is_omap2430()) | ||
330 | hwmods = omap2430_hwmods; | ||
331 | else if (cpu_is_omap34xx()) | ||
332 | hwmods = omap34xx_hwmods; | ||
333 | |||
334 | pwrdm_init(powerdomains_omap); | 322 | pwrdm_init(powerdomains_omap); |
335 | clkdm_init(clockdomains_omap, clkdm_autodeps); | 323 | clkdm_init(clockdomains_omap, clkdm_autodeps); |
336 | #ifndef CONFIG_ARCH_OMAP4 /* FIXME: Remove this once the clkdev is ready */ | 324 | #ifndef CONFIG_ARCH_OMAP4 /* FIXME: Remove this once the clkdev is ready */ |
337 | /* The OPP tables have to be registered before a clk init */ | 325 | if (cpu_is_omap242x()) |
338 | omap_hwmod_init(hwmods); | 326 | omap2420_hwmod_init(); |
327 | else if (cpu_is_omap243x()) | ||
328 | omap2430_hwmod_init(); | ||
329 | else if (cpu_is_omap34xx()) | ||
330 | omap3xxx_hwmod_init(); | ||
339 | omap2_mux_init(); | 331 | omap2_mux_init(); |
332 | /* The OPP tables have to be registered before a clk init */ | ||
340 | omap_pm_if_early_init(mpu_opps, dsp_opps, l3_opps); | 333 | omap_pm_if_early_init(mpu_opps, dsp_opps, l3_opps); |
341 | #endif | 334 | #endif |
342 | 335 | ||
diff --git a/arch/arm/mach-omap2/omap_hwmod_2420.h b/arch/arm/mach-omap2/omap_hwmod_2420_data.c index 5932c1d3e07b..a1c5839fc52d 100644 --- a/arch/arm/mach-omap2/omap_hwmod_2420.h +++ b/arch/arm/mach-omap2/omap_hwmod_2420_data.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * omap_hwmod_2420.h - hardware modules present on the OMAP2420 chips | 2 | * omap_hwmod_2420_data.c - hardware modules present on the OMAP2420 chips |
3 | * | 3 | * |
4 | * Copyright (C) 2009 Nokia Corporation | 4 | * Copyright (C) 2009-2010 Nokia Corporation |
5 | * Paul Walmsley | 5 | * Paul Walmsley |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
@@ -9,13 +9,8 @@ | |||
9 | * published by the Free Software Foundation. | 9 | * published by the Free Software Foundation. |
10 | * | 10 | * |
11 | * XXX handle crossbar/shared link difference for L3? | 11 | * XXX handle crossbar/shared link difference for L3? |
12 | * | 12 | * XXX these should be marked initdata for multi-OMAP kernels |
13 | */ | 13 | */ |
14 | #ifndef __ARCH_ARM_PLAT_OMAP_INCLUDE_MACH_OMAP_HWMOD2420_H | ||
15 | #define __ARCH_ARM_PLAT_OMAP_INCLUDE_MACH_OMAP_HWMOD2420_H | ||
16 | |||
17 | #ifdef CONFIG_ARCH_OMAP2420 | ||
18 | |||
19 | #include <plat/omap_hwmod.h> | 14 | #include <plat/omap_hwmod.h> |
20 | #include <mach/irqs.h> | 15 | #include <mach/irqs.h> |
21 | #include <plat/cpu.h> | 16 | #include <plat/cpu.h> |
@@ -23,6 +18,15 @@ | |||
23 | 18 | ||
24 | #include "prm-regbits-24xx.h" | 19 | #include "prm-regbits-24xx.h" |
25 | 20 | ||
21 | /* | ||
22 | * OMAP2420 hardware module integration data | ||
23 | * | ||
24 | * ALl of the data in this section should be autogeneratable from the | ||
25 | * TI hardware database or other technical documentation. Data that | ||
26 | * is driver-specific or driver-kernel integration-specific belongs | ||
27 | * elsewhere. | ||
28 | */ | ||
29 | |||
26 | static struct omap_hwmod omap2420_mpu_hwmod; | 30 | static struct omap_hwmod omap2420_mpu_hwmod; |
27 | static struct omap_hwmod omap2420_l3_hwmod; | 31 | static struct omap_hwmod omap2420_l3_hwmod; |
28 | static struct omap_hwmod omap2420_l4_core_hwmod; | 32 | static struct omap_hwmod omap2420_l4_core_hwmod; |
@@ -131,10 +135,9 @@ static __initdata struct omap_hwmod *omap2420_hwmods[] = { | |||
131 | NULL, | 135 | NULL, |
132 | }; | 136 | }; |
133 | 137 | ||
134 | #else | 138 | int __init omap2420_hwmod_init(void) |
135 | # define omap2420_hwmods 0 | 139 | { |
136 | #endif | 140 | return omap_hwmod_init(omap2420_hwmods); |
137 | 141 | } | |
138 | #endif | ||
139 | 142 | ||
140 | 143 | ||
diff --git a/arch/arm/mach-omap2/omap_hwmod_2430.h b/arch/arm/mach-omap2/omap_hwmod_2430_data.c index 91f79c05a98c..ed2de7936c10 100644 --- a/arch/arm/mach-omap2/omap_hwmod_2430.h +++ b/arch/arm/mach-omap2/omap_hwmod_2430_data.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * omap_hwmod_2430.h - hardware modules present on the OMAP2430 chips | 2 | * omap_hwmod_2430_data.c - hardware modules present on the OMAP2430 chips |
3 | * | 3 | * |
4 | * Copyright (C) 2009 Nokia Corporation | 4 | * Copyright (C) 2009-2010 Nokia Corporation |
5 | * Paul Walmsley | 5 | * Paul Walmsley |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
@@ -9,13 +9,8 @@ | |||
9 | * published by the Free Software Foundation. | 9 | * published by the Free Software Foundation. |
10 | * | 10 | * |
11 | * XXX handle crossbar/shared link difference for L3? | 11 | * XXX handle crossbar/shared link difference for L3? |
12 | * | 12 | * XXX these should be marked initdata for multi-OMAP kernels |
13 | */ | 13 | */ |
14 | #ifndef __ARCH_ARM_PLAT_OMAP_INCLUDE_MACH_OMAP_HWMOD2430_H | ||
15 | #define __ARCH_ARM_PLAT_OMAP_INCLUDE_MACH_OMAP_HWMOD2430_H | ||
16 | |||
17 | #ifdef CONFIG_ARCH_OMAP2430 | ||
18 | |||
19 | #include <plat/omap_hwmod.h> | 14 | #include <plat/omap_hwmod.h> |
20 | #include <mach/irqs.h> | 15 | #include <mach/irqs.h> |
21 | #include <plat/cpu.h> | 16 | #include <plat/cpu.h> |
@@ -23,6 +18,15 @@ | |||
23 | 18 | ||
24 | #include "prm-regbits-24xx.h" | 19 | #include "prm-regbits-24xx.h" |
25 | 20 | ||
21 | /* | ||
22 | * OMAP2430 hardware module integration data | ||
23 | * | ||
24 | * ALl of the data in this section should be autogeneratable from the | ||
25 | * TI hardware database or other technical documentation. Data that | ||
26 | * is driver-specific or driver-kernel integration-specific belongs | ||
27 | * elsewhere. | ||
28 | */ | ||
29 | |||
26 | static struct omap_hwmod omap2430_mpu_hwmod; | 30 | static struct omap_hwmod omap2430_mpu_hwmod; |
27 | static struct omap_hwmod omap2430_l3_hwmod; | 31 | static struct omap_hwmod omap2430_l3_hwmod; |
28 | static struct omap_hwmod omap2430_l4_core_hwmod; | 32 | static struct omap_hwmod omap2430_l4_core_hwmod; |
@@ -133,10 +137,9 @@ static __initdata struct omap_hwmod *omap2430_hwmods[] = { | |||
133 | NULL, | 137 | NULL, |
134 | }; | 138 | }; |
135 | 139 | ||
136 | #else | 140 | int __init omap2430_hwmod_init(void) |
137 | # define omap2430_hwmods 0 | 141 | { |
138 | #endif | 142 | return omap_hwmod_init(omap2430_hwmods); |
139 | 143 | } | |
140 | #endif | ||
141 | 144 | ||
142 | 145 | ||
diff --git a/arch/arm/mach-omap2/omap_hwmod_34xx.h b/arch/arm/mach-omap2/omap_hwmod_34xx.h deleted file mode 100644 index 26991147d5ee..000000000000 --- a/arch/arm/mach-omap2/omap_hwmod_34xx.h +++ /dev/null | |||
@@ -1,167 +0,0 @@ | |||
1 | /* | ||
2 | * omap_hwmod_34xx.h - hardware modules present on the OMAP34xx chips | ||
3 | * | ||
4 | * Copyright (C) 2009 Nokia Corporation | ||
5 | * Paul Walmsley | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | * | ||
11 | */ | ||
12 | #ifndef __ARCH_ARM_PLAT_OMAP_INCLUDE_MACH_OMAP_HWMOD34XX_H | ||
13 | #define __ARCH_ARM_PLAT_OMAP_INCLUDE_MACH_OMAP_HWMOD34XX_H | ||
14 | |||
15 | #ifdef CONFIG_ARCH_OMAP3 | ||
16 | |||
17 | #include <plat/omap_hwmod.h> | ||
18 | #include <mach/irqs.h> | ||
19 | #include <plat/cpu.h> | ||
20 | #include <plat/dma.h> | ||
21 | |||
22 | #include "prm-regbits-34xx.h" | ||
23 | |||
24 | static struct omap_hwmod omap34xx_mpu_hwmod; | ||
25 | static struct omap_hwmod omap34xx_l3_hwmod; | ||
26 | static struct omap_hwmod omap34xx_l4_core_hwmod; | ||
27 | static struct omap_hwmod omap34xx_l4_per_hwmod; | ||
28 | |||
29 | /* L3 -> L4_CORE interface */ | ||
30 | static struct omap_hwmod_ocp_if omap34xx_l3__l4_core = { | ||
31 | .master = &omap34xx_l3_hwmod, | ||
32 | .slave = &omap34xx_l4_core_hwmod, | ||
33 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
34 | }; | ||
35 | |||
36 | /* L3 -> L4_PER interface */ | ||
37 | static struct omap_hwmod_ocp_if omap34xx_l3__l4_per = { | ||
38 | .master = &omap34xx_l3_hwmod, | ||
39 | .slave = &omap34xx_l4_per_hwmod, | ||
40 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
41 | }; | ||
42 | |||
43 | /* MPU -> L3 interface */ | ||
44 | static struct omap_hwmod_ocp_if omap34xx_mpu__l3 = { | ||
45 | .master = &omap34xx_mpu_hwmod, | ||
46 | .slave = &omap34xx_l3_hwmod, | ||
47 | .user = OCP_USER_MPU, | ||
48 | }; | ||
49 | |||
50 | /* Slave interfaces on the L3 interconnect */ | ||
51 | static struct omap_hwmod_ocp_if *omap34xx_l3_slaves[] = { | ||
52 | &omap34xx_mpu__l3, | ||
53 | }; | ||
54 | |||
55 | /* Master interfaces on the L3 interconnect */ | ||
56 | static struct omap_hwmod_ocp_if *omap34xx_l3_masters[] = { | ||
57 | &omap34xx_l3__l4_core, | ||
58 | &omap34xx_l3__l4_per, | ||
59 | }; | ||
60 | |||
61 | /* L3 */ | ||
62 | static struct omap_hwmod omap34xx_l3_hwmod = { | ||
63 | .name = "l3_hwmod", | ||
64 | .masters = omap34xx_l3_masters, | ||
65 | .masters_cnt = ARRAY_SIZE(omap34xx_l3_masters), | ||
66 | .slaves = omap34xx_l3_slaves, | ||
67 | .slaves_cnt = ARRAY_SIZE(omap34xx_l3_slaves), | ||
68 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430) | ||
69 | }; | ||
70 | |||
71 | static struct omap_hwmod omap34xx_l4_wkup_hwmod; | ||
72 | |||
73 | /* L4_CORE -> L4_WKUP interface */ | ||
74 | static struct omap_hwmod_ocp_if omap34xx_l4_core__l4_wkup = { | ||
75 | .master = &omap34xx_l4_core_hwmod, | ||
76 | .slave = &omap34xx_l4_wkup_hwmod, | ||
77 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
78 | }; | ||
79 | |||
80 | /* Slave interfaces on the L4_CORE interconnect */ | ||
81 | static struct omap_hwmod_ocp_if *omap34xx_l4_core_slaves[] = { | ||
82 | &omap34xx_l3__l4_core, | ||
83 | }; | ||
84 | |||
85 | /* Master interfaces on the L4_CORE interconnect */ | ||
86 | static struct omap_hwmod_ocp_if *omap34xx_l4_core_masters[] = { | ||
87 | &omap34xx_l4_core__l4_wkup, | ||
88 | }; | ||
89 | |||
90 | /* L4 CORE */ | ||
91 | static struct omap_hwmod omap34xx_l4_core_hwmod = { | ||
92 | .name = "l4_core_hwmod", | ||
93 | .masters = omap34xx_l4_core_masters, | ||
94 | .masters_cnt = ARRAY_SIZE(omap34xx_l4_core_masters), | ||
95 | .slaves = omap34xx_l4_core_slaves, | ||
96 | .slaves_cnt = ARRAY_SIZE(omap34xx_l4_core_slaves), | ||
97 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430) | ||
98 | }; | ||
99 | |||
100 | /* Slave interfaces on the L4_PER interconnect */ | ||
101 | static struct omap_hwmod_ocp_if *omap34xx_l4_per_slaves[] = { | ||
102 | &omap34xx_l3__l4_per, | ||
103 | }; | ||
104 | |||
105 | /* Master interfaces on the L4_PER interconnect */ | ||
106 | static struct omap_hwmod_ocp_if *omap34xx_l4_per_masters[] = { | ||
107 | }; | ||
108 | |||
109 | /* L4 PER */ | ||
110 | static struct omap_hwmod omap34xx_l4_per_hwmod = { | ||
111 | .name = "l4_per_hwmod", | ||
112 | .masters = omap34xx_l4_per_masters, | ||
113 | .masters_cnt = ARRAY_SIZE(omap34xx_l4_per_masters), | ||
114 | .slaves = omap34xx_l4_per_slaves, | ||
115 | .slaves_cnt = ARRAY_SIZE(omap34xx_l4_per_slaves), | ||
116 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430) | ||
117 | }; | ||
118 | |||
119 | /* Slave interfaces on the L4_WKUP interconnect */ | ||
120 | static struct omap_hwmod_ocp_if *omap34xx_l4_wkup_slaves[] = { | ||
121 | &omap34xx_l4_core__l4_wkup, | ||
122 | }; | ||
123 | |||
124 | /* Master interfaces on the L4_WKUP interconnect */ | ||
125 | static struct omap_hwmod_ocp_if *omap34xx_l4_wkup_masters[] = { | ||
126 | }; | ||
127 | |||
128 | /* L4 WKUP */ | ||
129 | static struct omap_hwmod omap34xx_l4_wkup_hwmod = { | ||
130 | .name = "l4_wkup_hwmod", | ||
131 | .masters = omap34xx_l4_wkup_masters, | ||
132 | .masters_cnt = ARRAY_SIZE(omap34xx_l4_wkup_masters), | ||
133 | .slaves = omap34xx_l4_wkup_slaves, | ||
134 | .slaves_cnt = ARRAY_SIZE(omap34xx_l4_wkup_slaves), | ||
135 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430) | ||
136 | }; | ||
137 | |||
138 | /* Master interfaces on the MPU device */ | ||
139 | static struct omap_hwmod_ocp_if *omap34xx_mpu_masters[] = { | ||
140 | &omap34xx_mpu__l3, | ||
141 | }; | ||
142 | |||
143 | /* MPU */ | ||
144 | static struct omap_hwmod omap34xx_mpu_hwmod = { | ||
145 | .name = "mpu_hwmod", | ||
146 | .main_clk = "arm_fck", | ||
147 | .masters = omap34xx_mpu_masters, | ||
148 | .masters_cnt = ARRAY_SIZE(omap34xx_mpu_masters), | ||
149 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430), | ||
150 | }; | ||
151 | |||
152 | static __initdata struct omap_hwmod *omap34xx_hwmods[] = { | ||
153 | &omap34xx_l3_hwmod, | ||
154 | &omap34xx_l4_core_hwmod, | ||
155 | &omap34xx_l4_per_hwmod, | ||
156 | &omap34xx_l4_wkup_hwmod, | ||
157 | &omap34xx_mpu_hwmod, | ||
158 | NULL, | ||
159 | }; | ||
160 | |||
161 | #else | ||
162 | # define omap34xx_hwmods 0 | ||
163 | #endif | ||
164 | |||
165 | #endif | ||
166 | |||
167 | |||
diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c new file mode 100644 index 000000000000..8d4b686a5e04 --- /dev/null +++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | |||
@@ -0,0 +1,174 @@ | |||
1 | /* | ||
2 | * omap_hwmod_3xxx_data.c - hardware modules present on the OMAP3xxx chips | ||
3 | * | ||
4 | * Copyright (C) 2009-2010 Nokia Corporation | ||
5 | * Paul Walmsley | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | * | ||
11 | * The data in this file should be completely autogeneratable from | ||
12 | * the TI hardware database or other technical documentation. | ||
13 | * | ||
14 | * XXX these should be marked initdata for multi-OMAP kernels | ||
15 | */ | ||
16 | #include <plat/omap_hwmod.h> | ||
17 | #include <mach/irqs.h> | ||
18 | #include <plat/cpu.h> | ||
19 | #include <plat/dma.h> | ||
20 | |||
21 | #include "prm-regbits-34xx.h" | ||
22 | |||
23 | /* | ||
24 | * OMAP3xxx hardware module integration data | ||
25 | * | ||
26 | * ALl of the data in this section should be autogeneratable from the | ||
27 | * TI hardware database or other technical documentation. Data that | ||
28 | * is driver-specific or driver-kernel integration-specific belongs | ||
29 | * elsewhere. | ||
30 | */ | ||
31 | |||
32 | static struct omap_hwmod omap3xxx_mpu_hwmod; | ||
33 | static struct omap_hwmod omap3xxx_l3_hwmod; | ||
34 | static struct omap_hwmod omap3xxx_l4_core_hwmod; | ||
35 | static struct omap_hwmod omap3xxx_l4_per_hwmod; | ||
36 | |||
37 | /* L3 -> L4_CORE interface */ | ||
38 | static struct omap_hwmod_ocp_if omap3xxx_l3__l4_core = { | ||
39 | .master = &omap3xxx_l3_hwmod, | ||
40 | .slave = &omap3xxx_l4_core_hwmod, | ||
41 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
42 | }; | ||
43 | |||
44 | /* L3 -> L4_PER interface */ | ||
45 | static struct omap_hwmod_ocp_if omap3xxx_l3__l4_per = { | ||
46 | .master = &omap3xxx_l3_hwmod, | ||
47 | .slave = &omap3xxx_l4_per_hwmod, | ||
48 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
49 | }; | ||
50 | |||
51 | /* MPU -> L3 interface */ | ||
52 | static struct omap_hwmod_ocp_if omap3xxx_mpu__l3 = { | ||
53 | .master = &omap3xxx_mpu_hwmod, | ||
54 | .slave = &omap3xxx_l3_hwmod, | ||
55 | .user = OCP_USER_MPU, | ||
56 | }; | ||
57 | |||
58 | /* Slave interfaces on the L3 interconnect */ | ||
59 | static struct omap_hwmod_ocp_if *omap3xxx_l3_slaves[] = { | ||
60 | &omap3xxx_mpu__l3, | ||
61 | }; | ||
62 | |||
63 | /* Master interfaces on the L3 interconnect */ | ||
64 | static struct omap_hwmod_ocp_if *omap3xxx_l3_masters[] = { | ||
65 | &omap3xxx_l3__l4_core, | ||
66 | &omap3xxx_l3__l4_per, | ||
67 | }; | ||
68 | |||
69 | /* L3 */ | ||
70 | static struct omap_hwmod omap3xxx_l3_hwmod = { | ||
71 | .name = "l3_hwmod", | ||
72 | .masters = omap3xxx_l3_masters, | ||
73 | .masters_cnt = ARRAY_SIZE(omap3xxx_l3_masters), | ||
74 | .slaves = omap3xxx_l3_slaves, | ||
75 | .slaves_cnt = ARRAY_SIZE(omap3xxx_l3_slaves), | ||
76 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430) | ||
77 | }; | ||
78 | |||
79 | static struct omap_hwmod omap3xxx_l4_wkup_hwmod; | ||
80 | |||
81 | /* L4_CORE -> L4_WKUP interface */ | ||
82 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__l4_wkup = { | ||
83 | .master = &omap3xxx_l4_core_hwmod, | ||
84 | .slave = &omap3xxx_l4_wkup_hwmod, | ||
85 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
86 | }; | ||
87 | |||
88 | /* Slave interfaces on the L4_CORE interconnect */ | ||
89 | static struct omap_hwmod_ocp_if *omap3xxx_l4_core_slaves[] = { | ||
90 | &omap3xxx_l3__l4_core, | ||
91 | }; | ||
92 | |||
93 | /* Master interfaces on the L4_CORE interconnect */ | ||
94 | static struct omap_hwmod_ocp_if *omap3xxx_l4_core_masters[] = { | ||
95 | &omap3xxx_l4_core__l4_wkup, | ||
96 | }; | ||
97 | |||
98 | /* L4 CORE */ | ||
99 | static struct omap_hwmod omap3xxx_l4_core_hwmod = { | ||
100 | .name = "l4_core_hwmod", | ||
101 | .masters = omap3xxx_l4_core_masters, | ||
102 | .masters_cnt = ARRAY_SIZE(omap3xxx_l4_core_masters), | ||
103 | .slaves = omap3xxx_l4_core_slaves, | ||
104 | .slaves_cnt = ARRAY_SIZE(omap3xxx_l4_core_slaves), | ||
105 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430) | ||
106 | }; | ||
107 | |||
108 | /* Slave interfaces on the L4_PER interconnect */ | ||
109 | static struct omap_hwmod_ocp_if *omap3xxx_l4_per_slaves[] = { | ||
110 | &omap3xxx_l3__l4_per, | ||
111 | }; | ||
112 | |||
113 | /* Master interfaces on the L4_PER interconnect */ | ||
114 | static struct omap_hwmod_ocp_if *omap3xxx_l4_per_masters[] = { | ||
115 | }; | ||
116 | |||
117 | /* L4 PER */ | ||
118 | static struct omap_hwmod omap3xxx_l4_per_hwmod = { | ||
119 | .name = "l4_per_hwmod", | ||
120 | .masters = omap3xxx_l4_per_masters, | ||
121 | .masters_cnt = ARRAY_SIZE(omap3xxx_l4_per_masters), | ||
122 | .slaves = omap3xxx_l4_per_slaves, | ||
123 | .slaves_cnt = ARRAY_SIZE(omap3xxx_l4_per_slaves), | ||
124 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430) | ||
125 | }; | ||
126 | |||
127 | /* Slave interfaces on the L4_WKUP interconnect */ | ||
128 | static struct omap_hwmod_ocp_if *omap3xxx_l4_wkup_slaves[] = { | ||
129 | &omap3xxx_l4_core__l4_wkup, | ||
130 | }; | ||
131 | |||
132 | /* Master interfaces on the L4_WKUP interconnect */ | ||
133 | static struct omap_hwmod_ocp_if *omap3xxx_l4_wkup_masters[] = { | ||
134 | }; | ||
135 | |||
136 | /* L4 WKUP */ | ||
137 | static struct omap_hwmod omap3xxx_l4_wkup_hwmod = { | ||
138 | .name = "l4_wkup_hwmod", | ||
139 | .masters = omap3xxx_l4_wkup_masters, | ||
140 | .masters_cnt = ARRAY_SIZE(omap3xxx_l4_wkup_masters), | ||
141 | .slaves = omap3xxx_l4_wkup_slaves, | ||
142 | .slaves_cnt = ARRAY_SIZE(omap3xxx_l4_wkup_slaves), | ||
143 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430) | ||
144 | }; | ||
145 | |||
146 | /* Master interfaces on the MPU device */ | ||
147 | static struct omap_hwmod_ocp_if *omap3xxx_mpu_masters[] = { | ||
148 | &omap3xxx_mpu__l3, | ||
149 | }; | ||
150 | |||
151 | /* MPU */ | ||
152 | static struct omap_hwmod omap3xxx_mpu_hwmod = { | ||
153 | .name = "mpu_hwmod", | ||
154 | .main_clk = "arm_fck", | ||
155 | .masters = omap3xxx_mpu_masters, | ||
156 | .masters_cnt = ARRAY_SIZE(omap3xxx_mpu_masters), | ||
157 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430), | ||
158 | }; | ||
159 | |||
160 | static __initdata struct omap_hwmod *omap3xxx_hwmods[] = { | ||
161 | &omap3xxx_l3_hwmod, | ||
162 | &omap3xxx_l4_core_hwmod, | ||
163 | &omap3xxx_l4_per_hwmod, | ||
164 | &omap3xxx_l4_wkup_hwmod, | ||
165 | &omap3xxx_mpu_hwmod, | ||
166 | NULL, | ||
167 | }; | ||
168 | |||
169 | int __init omap3xxx_hwmod_init(void) | ||
170 | { | ||
171 | return omap_hwmod_init(omap3xxx_hwmods); | ||
172 | } | ||
173 | |||
174 | |||
diff --git a/arch/arm/plat-omap/include/plat/omap_hwmod.h b/arch/arm/plat-omap/include/plat/omap_hwmod.h index de4d0422cd2a..d2241fc6379a 100644 --- a/arch/arm/plat-omap/include/plat/omap_hwmod.h +++ b/arch/arm/plat-omap/include/plat/omap_hwmod.h | |||
@@ -504,4 +504,12 @@ int omap_hwmod_set_clockact_none(struct omap_hwmod *oh); | |||
504 | int omap_hwmod_enable_wakeup(struct omap_hwmod *oh); | 504 | int omap_hwmod_enable_wakeup(struct omap_hwmod *oh); |
505 | int omap_hwmod_disable_wakeup(struct omap_hwmod *oh); | 505 | int omap_hwmod_disable_wakeup(struct omap_hwmod *oh); |
506 | 506 | ||
507 | /* | ||
508 | * Chip variant-specific hwmod init routines - XXX should be converted | ||
509 | * to use initcalls once the initial boot ordering is straightened out | ||
510 | */ | ||
511 | extern int omap2420_hwmod_init(void); | ||
512 | extern int omap2430_hwmod_init(void); | ||
513 | extern int omap3xxx_hwmod_init(void); | ||
514 | |||
507 | #endif | 515 | #endif |