diff options
Diffstat (limited to 'arch')
114 files changed, 8899 insertions, 1079 deletions
diff --git a/arch/arm/configs/omap2plus_defconfig b/arch/arm/configs/omap2plus_defconfig index ae890caa17a7..019fb7c67dc3 100644 --- a/arch/arm/configs/omap2plus_defconfig +++ b/arch/arm/configs/omap2plus_defconfig | |||
@@ -58,6 +58,7 @@ CONFIG_ARM_ERRATA_411920=y | |||
58 | CONFIG_NO_HZ=y | 58 | CONFIG_NO_HZ=y |
59 | CONFIG_HIGH_RES_TIMERS=y | 59 | CONFIG_HIGH_RES_TIMERS=y |
60 | CONFIG_SMP=y | 60 | CONFIG_SMP=y |
61 | CONFIG_NR_CPUS=2 | ||
61 | # CONFIG_LOCAL_TIMERS is not set | 62 | # CONFIG_LOCAL_TIMERS is not set |
62 | CONFIG_AEABI=y | 63 | CONFIG_AEABI=y |
63 | CONFIG_LEDS=y | 64 | CONFIG_LEDS=y |
diff --git a/arch/arm/mach-omap1/Makefile b/arch/arm/mach-omap1/Makefile index ba6009f27677..af98117043d2 100644 --- a/arch/arm/mach-omap1/Makefile +++ b/arch/arm/mach-omap1/Makefile | |||
@@ -4,7 +4,7 @@ | |||
4 | 4 | ||
5 | # Common support | 5 | # Common support |
6 | obj-y := io.o id.o sram.o time.o irq.o mux.o flash.o serial.o devices.o dma.o | 6 | obj-y := io.o id.o sram.o time.o irq.o mux.o flash.o serial.o devices.o dma.o |
7 | obj-y += clock.o clock_data.o opp_data.o | 7 | obj-y += clock.o clock_data.o opp_data.o reset.o |
8 | 8 | ||
9 | obj-$(CONFIG_OMAP_MCBSP) += mcbsp.o | 9 | obj-$(CONFIG_OMAP_MCBSP) += mcbsp.o |
10 | 10 | ||
diff --git a/arch/arm/mach-omap1/board-ams-delta.c b/arch/arm/mach-omap1/board-ams-delta.c index 22cc8c8df6cb..de88c9297b68 100644 --- a/arch/arm/mach-omap1/board-ams-delta.c +++ b/arch/arm/mach-omap1/board-ams-delta.c | |||
@@ -165,7 +165,7 @@ static struct map_desc ams_delta_io_desc[] __initdata = { | |||
165 | } | 165 | } |
166 | }; | 166 | }; |
167 | 167 | ||
168 | static struct omap_lcd_config ams_delta_lcd_config __initdata = { | 168 | static struct omap_lcd_config ams_delta_lcd_config = { |
169 | .ctrl_name = "internal", | 169 | .ctrl_name = "internal", |
170 | }; | 170 | }; |
171 | 171 | ||
@@ -175,7 +175,7 @@ static struct omap_usb_config ams_delta_usb_config __initdata = { | |||
175 | .pins[0] = 2, | 175 | .pins[0] = 2, |
176 | }; | 176 | }; |
177 | 177 | ||
178 | static struct omap_board_config_kernel ams_delta_config[] = { | 178 | static struct omap_board_config_kernel ams_delta_config[] __initdata = { |
179 | { OMAP_TAG_LCD, &ams_delta_lcd_config }, | 179 | { OMAP_TAG_LCD, &ams_delta_lcd_config }, |
180 | }; | 180 | }; |
181 | 181 | ||
@@ -208,14 +208,14 @@ static const struct matrix_keymap_data ams_delta_keymap_data = { | |||
208 | .keymap_size = ARRAY_SIZE(ams_delta_keymap), | 208 | .keymap_size = ARRAY_SIZE(ams_delta_keymap), |
209 | }; | 209 | }; |
210 | 210 | ||
211 | static struct omap_kp_platform_data ams_delta_kp_data = { | 211 | static struct omap_kp_platform_data ams_delta_kp_data __initdata = { |
212 | .rows = 8, | 212 | .rows = 8, |
213 | .cols = 8, | 213 | .cols = 8, |
214 | .keymap_data = &ams_delta_keymap_data, | 214 | .keymap_data = &ams_delta_keymap_data, |
215 | .delay = 9, | 215 | .delay = 9, |
216 | }; | 216 | }; |
217 | 217 | ||
218 | static struct platform_device ams_delta_kp_device = { | 218 | static struct platform_device ams_delta_kp_device __initdata = { |
219 | .name = "omap-keypad", | 219 | .name = "omap-keypad", |
220 | .id = -1, | 220 | .id = -1, |
221 | .dev = { | 221 | .dev = { |
@@ -225,12 +225,12 @@ static struct platform_device ams_delta_kp_device = { | |||
225 | .resource = ams_delta_kp_resources, | 225 | .resource = ams_delta_kp_resources, |
226 | }; | 226 | }; |
227 | 227 | ||
228 | static struct platform_device ams_delta_lcd_device = { | 228 | static struct platform_device ams_delta_lcd_device __initdata = { |
229 | .name = "lcd_ams_delta", | 229 | .name = "lcd_ams_delta", |
230 | .id = -1, | 230 | .id = -1, |
231 | }; | 231 | }; |
232 | 232 | ||
233 | static struct platform_device ams_delta_led_device = { | 233 | static struct platform_device ams_delta_led_device __initdata = { |
234 | .name = "ams-delta-led", | 234 | .name = "ams-delta-led", |
235 | .id = -1 | 235 | .id = -1 |
236 | }; | 236 | }; |
@@ -259,7 +259,7 @@ static int ams_delta_camera_power(struct device *dev, int power) | |||
259 | #define ams_delta_camera_power NULL | 259 | #define ams_delta_camera_power NULL |
260 | #endif | 260 | #endif |
261 | 261 | ||
262 | static struct soc_camera_link __initdata ams_delta_iclink = { | 262 | static struct soc_camera_link ams_delta_iclink = { |
263 | .bus_id = 0, /* OMAP1 SoC camera bus */ | 263 | .bus_id = 0, /* OMAP1 SoC camera bus */ |
264 | .i2c_adapter_id = 1, | 264 | .i2c_adapter_id = 1, |
265 | .board_info = &ams_delta_camera_board_info[0], | 265 | .board_info = &ams_delta_camera_board_info[0], |
@@ -267,7 +267,7 @@ static struct soc_camera_link __initdata ams_delta_iclink = { | |||
267 | .power = ams_delta_camera_power, | 267 | .power = ams_delta_camera_power, |
268 | }; | 268 | }; |
269 | 269 | ||
270 | static struct platform_device ams_delta_camera_device = { | 270 | static struct platform_device ams_delta_camera_device __initdata = { |
271 | .name = "soc-camera-pdrv", | 271 | .name = "soc-camera-pdrv", |
272 | .id = 0, | 272 | .id = 0, |
273 | .dev = { | 273 | .dev = { |
diff --git a/arch/arm/mach-omap1/board-fsample.c b/arch/arm/mach-omap1/board-fsample.c index 0efb9dbae44c..87f173d93557 100644 --- a/arch/arm/mach-omap1/board-fsample.c +++ b/arch/arm/mach-omap1/board-fsample.c | |||
@@ -287,11 +287,11 @@ static struct platform_device *devices[] __initdata = { | |||
287 | &lcd_device, | 287 | &lcd_device, |
288 | }; | 288 | }; |
289 | 289 | ||
290 | static struct omap_lcd_config fsample_lcd_config __initdata = { | 290 | static struct omap_lcd_config fsample_lcd_config = { |
291 | .ctrl_name = "internal", | 291 | .ctrl_name = "internal", |
292 | }; | 292 | }; |
293 | 293 | ||
294 | static struct omap_board_config_kernel fsample_config[] = { | 294 | static struct omap_board_config_kernel fsample_config[] __initdata = { |
295 | { OMAP_TAG_LCD, &fsample_lcd_config }, | 295 | { OMAP_TAG_LCD, &fsample_lcd_config }, |
296 | }; | 296 | }; |
297 | 297 | ||
diff --git a/arch/arm/mach-omap1/board-h2.c b/arch/arm/mach-omap1/board-h2.c index 28b84aa9bdba..ba3bd09c4754 100644 --- a/arch/arm/mach-omap1/board-h2.c +++ b/arch/arm/mach-omap1/board-h2.c | |||
@@ -202,7 +202,7 @@ static int h2_nand_dev_ready(struct mtd_info *mtd) | |||
202 | 202 | ||
203 | static const char *h2_part_probes[] = { "cmdlinepart", NULL }; | 203 | static const char *h2_part_probes[] = { "cmdlinepart", NULL }; |
204 | 204 | ||
205 | struct platform_nand_data h2_nand_platdata = { | 205 | static struct platform_nand_data h2_nand_platdata = { |
206 | .chip = { | 206 | .chip = { |
207 | .nr_chips = 1, | 207 | .nr_chips = 1, |
208 | .chip_offset = 0, | 208 | .chip_offset = 0, |
diff --git a/arch/arm/mach-omap1/board-h3.c b/arch/arm/mach-omap1/board-h3.c index dbc8b8d882ba..ac48677672ee 100644 --- a/arch/arm/mach-omap1/board-h3.c +++ b/arch/arm/mach-omap1/board-h3.c | |||
@@ -204,7 +204,7 @@ static int nand_dev_ready(struct mtd_info *mtd) | |||
204 | 204 | ||
205 | static const char *part_probes[] = { "cmdlinepart", NULL }; | 205 | static const char *part_probes[] = { "cmdlinepart", NULL }; |
206 | 206 | ||
207 | struct platform_nand_data nand_platdata = { | 207 | static struct platform_nand_data nand_platdata = { |
208 | .chip = { | 208 | .chip = { |
209 | .nr_chips = 1, | 209 | .nr_chips = 1, |
210 | .chip_offset = 0, | 210 | .chip_offset = 0, |
diff --git a/arch/arm/mach-omap1/board-htcherald.c b/arch/arm/mach-omap1/board-htcherald.c index f2c5c585bc83..ba05a51f9408 100644 --- a/arch/arm/mach-omap1/board-htcherald.c +++ b/arch/arm/mach-omap1/board-htcherald.c | |||
@@ -331,7 +331,7 @@ static struct resource htcpld_resources[] = { | |||
331 | }, | 331 | }, |
332 | }; | 332 | }; |
333 | 333 | ||
334 | struct htcpld_chip_platform_data htcpld_chips[] = { | 334 | static struct htcpld_chip_platform_data htcpld_chips[] = { |
335 | [0] = { | 335 | [0] = { |
336 | .addr = 0x03, | 336 | .addr = 0x03, |
337 | .reset = 0x04, | 337 | .reset = 0x04, |
@@ -366,7 +366,7 @@ struct htcpld_chip_platform_data htcpld_chips[] = { | |||
366 | }, | 366 | }, |
367 | }; | 367 | }; |
368 | 368 | ||
369 | struct htcpld_core_platform_data htcpld_pfdata = { | 369 | static struct htcpld_core_platform_data htcpld_pfdata = { |
370 | .int_reset_gpio_hi = HTCPLD_GPIO_INT_RESET_HI, | 370 | .int_reset_gpio_hi = HTCPLD_GPIO_INT_RESET_HI, |
371 | .int_reset_gpio_lo = HTCPLD_GPIO_INT_RESET_LO, | 371 | .int_reset_gpio_lo = HTCPLD_GPIO_INT_RESET_LO, |
372 | .i2c_adapter_id = 1, | 372 | .i2c_adapter_id = 1, |
diff --git a/arch/arm/mach-omap1/board-innovator.c b/arch/arm/mach-omap1/board-innovator.c index a36e6742bf9b..2d9b8cbd7a14 100644 --- a/arch/arm/mach-omap1/board-innovator.c +++ b/arch/arm/mach-omap1/board-innovator.c | |||
@@ -365,7 +365,7 @@ static struct omap_mmc_platform_data mmc1_data = { | |||
365 | 365 | ||
366 | static struct omap_mmc_platform_data *mmc_data[OMAP16XX_NR_MMC]; | 366 | static struct omap_mmc_platform_data *mmc_data[OMAP16XX_NR_MMC]; |
367 | 367 | ||
368 | void __init innovator_mmc_init(void) | 368 | static void __init innovator_mmc_init(void) |
369 | { | 369 | { |
370 | mmc_data[0] = &mmc1_data; | 370 | mmc_data[0] = &mmc1_data; |
371 | omap1_init_mmc(mmc_data, OMAP15XX_NR_MMC); | 371 | omap1_init_mmc(mmc_data, OMAP15XX_NR_MMC); |
diff --git a/arch/arm/mach-omap1/board-nokia770.c b/arch/arm/mach-omap1/board-nokia770.c index d21f09dc78f4..cfd084926146 100644 --- a/arch/arm/mach-omap1/board-nokia770.c +++ b/arch/arm/mach-omap1/board-nokia770.c | |||
@@ -115,7 +115,7 @@ static struct mipid_platform_data nokia770_mipid_platform_data = { | |||
115 | .shutdown = mipid_shutdown, | 115 | .shutdown = mipid_shutdown, |
116 | }; | 116 | }; |
117 | 117 | ||
118 | static void mipid_dev_init(void) | 118 | static void __init mipid_dev_init(void) |
119 | { | 119 | { |
120 | const struct omap_lcd_config *conf; | 120 | const struct omap_lcd_config *conf; |
121 | 121 | ||
@@ -126,7 +126,7 @@ static void mipid_dev_init(void) | |||
126 | } | 126 | } |
127 | } | 127 | } |
128 | 128 | ||
129 | static void ads7846_dev_init(void) | 129 | static void __init ads7846_dev_init(void) |
130 | { | 130 | { |
131 | if (gpio_request(ADS7846_PENDOWN_GPIO, "ADS7846 pendown") < 0) | 131 | if (gpio_request(ADS7846_PENDOWN_GPIO, "ADS7846 pendown") < 0) |
132 | printk(KERN_ERR "can't get ads7846 pen down GPIO\n"); | 132 | printk(KERN_ERR "can't get ads7846 pen down GPIO\n"); |
@@ -170,7 +170,7 @@ static struct hwa742_platform_data nokia770_hwa742_platform_data = { | |||
170 | .te_connected = 1, | 170 | .te_connected = 1, |
171 | }; | 171 | }; |
172 | 172 | ||
173 | static void hwa742_dev_init(void) | 173 | static void __init hwa742_dev_init(void) |
174 | { | 174 | { |
175 | clk_add_alias("hwa_sys_ck", NULL, "bclk", NULL); | 175 | clk_add_alias("hwa_sys_ck", NULL, "bclk", NULL); |
176 | omapfb_set_ctrl_platform_data(&nokia770_hwa742_platform_data); | 176 | omapfb_set_ctrl_platform_data(&nokia770_hwa742_platform_data); |
diff --git a/arch/arm/mach-omap1/board-palmte.c b/arch/arm/mach-omap1/board-palmte.c index fb51ce6123d8..c9d38f47845f 100644 --- a/arch/arm/mach-omap1/board-palmte.c +++ b/arch/arm/mach-omap1/board-palmte.c | |||
@@ -230,19 +230,6 @@ static struct spi_board_info palmte_spi_info[] __initdata = { | |||
230 | }, | 230 | }, |
231 | }; | 231 | }; |
232 | 232 | ||
233 | static void palmte_headphones_detect(void *data, int state) | ||
234 | { | ||
235 | if (state) { | ||
236 | /* Headphones connected, disable speaker */ | ||
237 | gpio_set_value(PALMTE_SPEAKER_GPIO, 0); | ||
238 | printk(KERN_INFO "PM: speaker off\n"); | ||
239 | } else { | ||
240 | /* Headphones unplugged, re-enable speaker */ | ||
241 | gpio_set_value(PALMTE_SPEAKER_GPIO, 1); | ||
242 | printk(KERN_INFO "PM: speaker on\n"); | ||
243 | } | ||
244 | } | ||
245 | |||
246 | static void __init palmte_misc_gpio_setup(void) | 233 | static void __init palmte_misc_gpio_setup(void) |
247 | { | 234 | { |
248 | /* Set TSC2102 PINTDAV pin as input (used by TSC2102 driver) */ | 235 | /* Set TSC2102 PINTDAV pin as input (used by TSC2102 driver) */ |
diff --git a/arch/arm/mach-omap1/board-voiceblue.c b/arch/arm/mach-omap1/board-voiceblue.c index 815a69ce821d..bdc0ac8dc21f 100644 --- a/arch/arm/mach-omap1/board-voiceblue.c +++ b/arch/arm/mach-omap1/board-voiceblue.c | |||
@@ -26,10 +26,12 @@ | |||
26 | #include <linux/smc91x.h> | 26 | #include <linux/smc91x.h> |
27 | 27 | ||
28 | #include <mach/hardware.h> | 28 | #include <mach/hardware.h> |
29 | #include <mach/system.h> | ||
29 | #include <asm/mach-types.h> | 30 | #include <asm/mach-types.h> |
30 | #include <asm/mach/arch.h> | 31 | #include <asm/mach/arch.h> |
31 | #include <asm/mach/map.h> | 32 | #include <asm/mach/map.h> |
32 | 33 | ||
34 | #include <plat/board-voiceblue.h> | ||
33 | #include <plat/common.h> | 35 | #include <plat/common.h> |
34 | #include <mach/gpio.h> | 36 | #include <mach/gpio.h> |
35 | #include <plat/flash.h> | 37 | #include <plat/flash.h> |
@@ -163,52 +165,6 @@ static void __init voiceblue_init_irq(void) | |||
163 | omap_init_irq(); | 165 | omap_init_irq(); |
164 | } | 166 | } |
165 | 167 | ||
166 | static void __init voiceblue_init(void) | ||
167 | { | ||
168 | /* mux pins for uarts */ | ||
169 | omap_cfg_reg(UART1_TX); | ||
170 | omap_cfg_reg(UART1_RTS); | ||
171 | omap_cfg_reg(UART2_TX); | ||
172 | omap_cfg_reg(UART2_RTS); | ||
173 | omap_cfg_reg(UART3_TX); | ||
174 | omap_cfg_reg(UART3_RX); | ||
175 | |||
176 | /* Watchdog */ | ||
177 | gpio_request(0, "Watchdog"); | ||
178 | /* smc91x reset */ | ||
179 | gpio_request(7, "SMC91x reset"); | ||
180 | gpio_direction_output(7, 1); | ||
181 | udelay(2); /* wait at least 100ns */ | ||
182 | gpio_set_value(7, 0); | ||
183 | mdelay(50); /* 50ms until PHY ready */ | ||
184 | /* smc91x interrupt pin */ | ||
185 | gpio_request(8, "SMC91x irq"); | ||
186 | /* 16C554 reset*/ | ||
187 | gpio_request(6, "16C554 reset"); | ||
188 | gpio_direction_output(6, 0); | ||
189 | /* 16C554 interrupt pins */ | ||
190 | gpio_request(12, "16C554 irq"); | ||
191 | gpio_request(13, "16C554 irq"); | ||
192 | gpio_request(14, "16C554 irq"); | ||
193 | gpio_request(15, "16C554 irq"); | ||
194 | set_irq_type(gpio_to_irq(12), IRQ_TYPE_EDGE_RISING); | ||
195 | set_irq_type(gpio_to_irq(13), IRQ_TYPE_EDGE_RISING); | ||
196 | set_irq_type(gpio_to_irq(14), IRQ_TYPE_EDGE_RISING); | ||
197 | set_irq_type(gpio_to_irq(15), IRQ_TYPE_EDGE_RISING); | ||
198 | |||
199 | platform_add_devices(voiceblue_devices, ARRAY_SIZE(voiceblue_devices)); | ||
200 | omap_board_config = voiceblue_config; | ||
201 | omap_board_config_size = ARRAY_SIZE(voiceblue_config); | ||
202 | omap_serial_init(); | ||
203 | omap1_usb_init(&voiceblue_usb_config); | ||
204 | omap_register_i2c_bus(1, 100, NULL, 0); | ||
205 | |||
206 | /* There is a good chance board is going up, so enable power LED | ||
207 | * (it is connected through invertor) */ | ||
208 | omap_writeb(0x00, OMAP_LPG1_LCR); | ||
209 | omap_writeb(0x00, OMAP_LPG1_PMR); /* Disable clock */ | ||
210 | } | ||
211 | |||
212 | static void __init voiceblue_map_io(void) | 168 | static void __init voiceblue_map_io(void) |
213 | { | 169 | { |
214 | omap1_map_common_io(); | 170 | omap1_map_common_io(); |
@@ -275,8 +231,17 @@ void voiceblue_wdt_ping(void) | |||
275 | gpio_set_value(0, wdt_gpio_state); | 231 | gpio_set_value(0, wdt_gpio_state); |
276 | } | 232 | } |
277 | 233 | ||
278 | void voiceblue_reset(void) | 234 | static void voiceblue_reset(char mode, const char *cmd) |
279 | { | 235 | { |
236 | /* | ||
237 | * Workaround for 5912/1611b bug mentioned in sprz209d.pdf p. 28 | ||
238 | * "Global Software Reset Affects Traffic Controller Frequency". | ||
239 | */ | ||
240 | if (cpu_is_omap5912()) { | ||
241 | omap_writew(omap_readw(DPLL_CTL) & ~(1 << 4), DPLL_CTL); | ||
242 | omap_writew(0x8, ARM_RSTCT1); | ||
243 | } | ||
244 | |||
280 | set_bit(MACHINE_REBOOT, &machine_state); | 245 | set_bit(MACHINE_REBOOT, &machine_state); |
281 | voiceblue_wdt_enable(); | 246 | voiceblue_wdt_enable(); |
282 | while (1) ; | 247 | while (1) ; |
@@ -286,6 +251,54 @@ EXPORT_SYMBOL(voiceblue_wdt_enable); | |||
286 | EXPORT_SYMBOL(voiceblue_wdt_disable); | 251 | EXPORT_SYMBOL(voiceblue_wdt_disable); |
287 | EXPORT_SYMBOL(voiceblue_wdt_ping); | 252 | EXPORT_SYMBOL(voiceblue_wdt_ping); |
288 | 253 | ||
254 | static void __init voiceblue_init(void) | ||
255 | { | ||
256 | /* mux pins for uarts */ | ||
257 | omap_cfg_reg(UART1_TX); | ||
258 | omap_cfg_reg(UART1_RTS); | ||
259 | omap_cfg_reg(UART2_TX); | ||
260 | omap_cfg_reg(UART2_RTS); | ||
261 | omap_cfg_reg(UART3_TX); | ||
262 | omap_cfg_reg(UART3_RX); | ||
263 | |||
264 | /* Watchdog */ | ||
265 | gpio_request(0, "Watchdog"); | ||
266 | /* smc91x reset */ | ||
267 | gpio_request(7, "SMC91x reset"); | ||
268 | gpio_direction_output(7, 1); | ||
269 | udelay(2); /* wait at least 100ns */ | ||
270 | gpio_set_value(7, 0); | ||
271 | mdelay(50); /* 50ms until PHY ready */ | ||
272 | /* smc91x interrupt pin */ | ||
273 | gpio_request(8, "SMC91x irq"); | ||
274 | /* 16C554 reset*/ | ||
275 | gpio_request(6, "16C554 reset"); | ||
276 | gpio_direction_output(6, 0); | ||
277 | /* 16C554 interrupt pins */ | ||
278 | gpio_request(12, "16C554 irq"); | ||
279 | gpio_request(13, "16C554 irq"); | ||
280 | gpio_request(14, "16C554 irq"); | ||
281 | gpio_request(15, "16C554 irq"); | ||
282 | set_irq_type(gpio_to_irq(12), IRQ_TYPE_EDGE_RISING); | ||
283 | set_irq_type(gpio_to_irq(13), IRQ_TYPE_EDGE_RISING); | ||
284 | set_irq_type(gpio_to_irq(14), IRQ_TYPE_EDGE_RISING); | ||
285 | set_irq_type(gpio_to_irq(15), IRQ_TYPE_EDGE_RISING); | ||
286 | |||
287 | platform_add_devices(voiceblue_devices, ARRAY_SIZE(voiceblue_devices)); | ||
288 | omap_board_config = voiceblue_config; | ||
289 | omap_board_config_size = ARRAY_SIZE(voiceblue_config); | ||
290 | omap_serial_init(); | ||
291 | omap1_usb_init(&voiceblue_usb_config); | ||
292 | omap_register_i2c_bus(1, 100, NULL, 0); | ||
293 | |||
294 | /* There is a good chance board is going up, so enable power LED | ||
295 | * (it is connected through invertor) */ | ||
296 | omap_writeb(0x00, OMAP_LPG1_LCR); | ||
297 | omap_writeb(0x00, OMAP_LPG1_PMR); /* Disable clock */ | ||
298 | |||
299 | arch_reset = voiceblue_reset; | ||
300 | } | ||
301 | |||
289 | MACHINE_START(VOICEBLUE, "VoiceBlue OMAP5910") | 302 | MACHINE_START(VOICEBLUE, "VoiceBlue OMAP5910") |
290 | /* Maintainer: Ladislav Michl <michl@2n.cz> */ | 303 | /* Maintainer: Ladislav Michl <michl@2n.cz> */ |
291 | .boot_params = 0x10000100, | 304 | .boot_params = 0x10000100, |
diff --git a/arch/arm/mach-omap1/reset.c b/arch/arm/mach-omap1/reset.c new file mode 100644 index 000000000000..ad951ee69205 --- /dev/null +++ b/arch/arm/mach-omap1/reset.c | |||
@@ -0,0 +1,25 @@ | |||
1 | /* | ||
2 | * OMAP1 reset support | ||
3 | */ | ||
4 | #include <linux/kernel.h> | ||
5 | #include <linux/io.h> | ||
6 | |||
7 | #include <mach/hardware.h> | ||
8 | #include <mach/system.h> | ||
9 | #include <plat/prcm.h> | ||
10 | |||
11 | void omap1_arch_reset(char mode, const char *cmd) | ||
12 | { | ||
13 | /* | ||
14 | * Workaround for 5912/1611b bug mentioned in sprz209d.pdf p. 28 | ||
15 | * "Global Software Reset Affects Traffic Controller Frequency". | ||
16 | */ | ||
17 | if (cpu_is_omap5912()) { | ||
18 | omap_writew(omap_readw(DPLL_CTL) & ~(1 << 4), DPLL_CTL); | ||
19 | omap_writew(0x8, ARM_RSTCT1); | ||
20 | } | ||
21 | |||
22 | omap_writew(1, ARM_RSTCT1); | ||
23 | } | ||
24 | |||
25 | void (*arch_reset)(char, const char *) = omap1_arch_reset; | ||
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig index 1a2cf6226a55..b9d8a7b2a862 100644 --- a/arch/arm/mach-omap2/Kconfig +++ b/arch/arm/mach-omap2/Kconfig | |||
@@ -53,25 +53,30 @@ config ARCH_OMAP4 | |||
53 | comment "OMAP Core Type" | 53 | comment "OMAP Core Type" |
54 | depends on ARCH_OMAP2 | 54 | depends on ARCH_OMAP2 |
55 | 55 | ||
56 | config ARCH_OMAP2420 | 56 | config SOC_OMAP2420 |
57 | bool "OMAP2420 support" | 57 | bool "OMAP2420 support" |
58 | depends on ARCH_OMAP2 | 58 | depends on ARCH_OMAP2 |
59 | default y | 59 | default y |
60 | select OMAP_DM_TIMER | 60 | select OMAP_DM_TIMER |
61 | select ARCH_OMAP_OTG | 61 | select ARCH_OMAP_OTG |
62 | 62 | ||
63 | config ARCH_OMAP2430 | 63 | config SOC_OMAP2430 |
64 | bool "OMAP2430 support" | 64 | bool "OMAP2430 support" |
65 | depends on ARCH_OMAP2 | 65 | depends on ARCH_OMAP2 |
66 | default y | 66 | default y |
67 | select ARCH_OMAP_OTG | 67 | select ARCH_OMAP_OTG |
68 | 68 | ||
69 | config ARCH_OMAP3430 | 69 | config SOC_OMAP3430 |
70 | bool "OMAP3430 support" | 70 | bool "OMAP3430 support" |
71 | depends on ARCH_OMAP3 | 71 | depends on ARCH_OMAP3 |
72 | default y | 72 | default y |
73 | select ARCH_OMAP_OTG | 73 | select ARCH_OMAP_OTG |
74 | 74 | ||
75 | config SOC_OMAPTI816X | ||
76 | bool "TI816X support" | ||
77 | depends on ARCH_OMAP3 | ||
78 | default y | ||
79 | |||
75 | config OMAP_PACKAGE_ZAF | 80 | config OMAP_PACKAGE_ZAF |
76 | bool | 81 | bool |
77 | 82 | ||
@@ -106,25 +111,25 @@ config MACH_OMAP_GENERIC | |||
106 | 111 | ||
107 | config MACH_OMAP2_TUSB6010 | 112 | config MACH_OMAP2_TUSB6010 |
108 | bool | 113 | bool |
109 | depends on ARCH_OMAP2 && ARCH_OMAP2420 | 114 | depends on ARCH_OMAP2 && SOC_OMAP2420 |
110 | default y if MACH_NOKIA_N8X0 | 115 | default y if MACH_NOKIA_N8X0 |
111 | 116 | ||
112 | config MACH_OMAP_H4 | 117 | config MACH_OMAP_H4 |
113 | bool "OMAP 2420 H4 board" | 118 | bool "OMAP 2420 H4 board" |
114 | depends on ARCH_OMAP2420 | 119 | depends on SOC_OMAP2420 |
115 | default y | 120 | default y |
116 | select OMAP_PACKAGE_ZAF | 121 | select OMAP_PACKAGE_ZAF |
117 | select OMAP_DEBUG_DEVICES | 122 | select OMAP_DEBUG_DEVICES |
118 | 123 | ||
119 | config MACH_OMAP_APOLLON | 124 | config MACH_OMAP_APOLLON |
120 | bool "OMAP 2420 Apollon board" | 125 | bool "OMAP 2420 Apollon board" |
121 | depends on ARCH_OMAP2420 | 126 | depends on SOC_OMAP2420 |
122 | default y | 127 | default y |
123 | select OMAP_PACKAGE_ZAC | 128 | select OMAP_PACKAGE_ZAC |
124 | 129 | ||
125 | config MACH_OMAP_2430SDP | 130 | config MACH_OMAP_2430SDP |
126 | bool "OMAP 2430 SDP board" | 131 | bool "OMAP 2430 SDP board" |
127 | depends on ARCH_OMAP2430 | 132 | depends on SOC_OMAP2430 |
128 | default y | 133 | default y |
129 | select OMAP_PACKAGE_ZAC | 134 | select OMAP_PACKAGE_ZAC |
130 | 135 | ||
@@ -219,7 +224,7 @@ config MACH_NOKIA_N810_WIMAX | |||
219 | 224 | ||
220 | config MACH_NOKIA_N8X0 | 225 | config MACH_NOKIA_N8X0 |
221 | bool "Nokia N800/N810" | 226 | bool "Nokia N800/N810" |
222 | depends on ARCH_OMAP2420 | 227 | depends on SOC_OMAP2420 |
223 | default y | 228 | default y |
224 | select OMAP_PACKAGE_ZAC | 229 | select OMAP_PACKAGE_ZAC |
225 | select MACH_NOKIA_N800 | 230 | select MACH_NOKIA_N800 |
@@ -294,12 +299,18 @@ config MACH_OMAP_3630SDP | |||
294 | default y | 299 | default y |
295 | select OMAP_PACKAGE_CBP | 300 | select OMAP_PACKAGE_CBP |
296 | 301 | ||
302 | config MACH_TI8168EVM | ||
303 | bool "TI8168 Evaluation Module" | ||
304 | depends on SOC_OMAPTI816X | ||
305 | default y | ||
306 | |||
297 | config MACH_OMAP_4430SDP | 307 | config MACH_OMAP_4430SDP |
298 | bool "OMAP 4430 SDP board" | 308 | bool "OMAP 4430 SDP board" |
299 | default y | 309 | default y |
300 | depends on ARCH_OMAP4 | 310 | depends on ARCH_OMAP4 |
301 | select OMAP_PACKAGE_CBL | 311 | select OMAP_PACKAGE_CBL |
302 | select OMAP_PACKAGE_CBS | 312 | select OMAP_PACKAGE_CBS |
313 | select REGULATOR_FIXED_VOLTAGE | ||
303 | 314 | ||
304 | config MACH_OMAP4_PANDA | 315 | config MACH_OMAP4_PANDA |
305 | bool "OMAP4 Panda Board" | 316 | bool "OMAP4 Panda Board" |
@@ -307,6 +318,7 @@ config MACH_OMAP4_PANDA | |||
307 | depends on ARCH_OMAP4 | 318 | depends on ARCH_OMAP4 |
308 | select OMAP_PACKAGE_CBL | 319 | select OMAP_PACKAGE_CBL |
309 | select OMAP_PACKAGE_CBS | 320 | select OMAP_PACKAGE_CBS |
321 | select REGULATOR_FIXED_VOLTAGE | ||
310 | 322 | ||
311 | config OMAP3_EMU | 323 | config OMAP3_EMU |
312 | bool "OMAP3 debugging peripherals" | 324 | bool "OMAP3 debugging peripherals" |
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile index 1c0c2b02d870..1c3635d7f4cf 100644 --- a/arch/arm/mach-omap2/Makefile +++ b/arch/arm/mach-omap2/Makefile | |||
@@ -31,8 +31,8 @@ AFLAGS_omap-headsmp.o :=-Wa,-march=armv7-a$(plus_sec) | |||
31 | AFLAGS_omap44xx-smc.o :=-Wa,-march=armv7-a$(plus_sec) | 31 | AFLAGS_omap44xx-smc.o :=-Wa,-march=armv7-a$(plus_sec) |
32 | 32 | ||
33 | # Functions loaded to SRAM | 33 | # Functions loaded to SRAM |
34 | obj-$(CONFIG_ARCH_OMAP2420) += sram242x.o | 34 | obj-$(CONFIG_SOC_OMAP2420) += sram242x.o |
35 | obj-$(CONFIG_ARCH_OMAP2430) += sram243x.o | 35 | obj-$(CONFIG_SOC_OMAP2430) += sram243x.o |
36 | obj-$(CONFIG_ARCH_OMAP3) += sram34xx.o | 36 | obj-$(CONFIG_ARCH_OMAP3) += sram34xx.o |
37 | 37 | ||
38 | AFLAGS_sram242x.o :=-Wa,-march=armv6 | 38 | AFLAGS_sram242x.o :=-Wa,-march=armv6 |
@@ -40,8 +40,8 @@ AFLAGS_sram243x.o :=-Wa,-march=armv6 | |||
40 | AFLAGS_sram34xx.o :=-Wa,-march=armv7-a | 40 | AFLAGS_sram34xx.o :=-Wa,-march=armv7-a |
41 | 41 | ||
42 | # Pin multiplexing | 42 | # Pin multiplexing |
43 | obj-$(CONFIG_ARCH_OMAP2420) += mux2420.o | 43 | obj-$(CONFIG_SOC_OMAP2420) += mux2420.o |
44 | obj-$(CONFIG_ARCH_OMAP2430) += mux2430.o | 44 | obj-$(CONFIG_SOC_OMAP2430) += mux2430.o |
45 | obj-$(CONFIG_ARCH_OMAP3) += mux34xx.o | 45 | obj-$(CONFIG_ARCH_OMAP3) += mux34xx.o |
46 | obj-$(CONFIG_ARCH_OMAP4) += mux44xx.o | 46 | obj-$(CONFIG_ARCH_OMAP4) += mux44xx.o |
47 | 47 | ||
@@ -113,8 +113,8 @@ obj-$(CONFIG_ARCH_OMAP2) += $(clock-common) clock2xxx.o \ | |||
113 | clkt2xxx_dpllcore.o \ | 113 | clkt2xxx_dpllcore.o \ |
114 | clkt2xxx_virt_prcm_set.o \ | 114 | clkt2xxx_virt_prcm_set.o \ |
115 | clkt2xxx_apll.o clkt2xxx_osc.o | 115 | clkt2xxx_apll.o clkt2xxx_osc.o |
116 | obj-$(CONFIG_ARCH_OMAP2420) += clock2420_data.o | 116 | obj-$(CONFIG_SOC_OMAP2420) += clock2420_data.o |
117 | obj-$(CONFIG_ARCH_OMAP2430) += clock2430.o clock2430_data.o | 117 | obj-$(CONFIG_SOC_OMAP2430) += clock2430.o clock2430_data.o |
118 | obj-$(CONFIG_ARCH_OMAP3) += $(clock-common) clock3xxx.o \ | 118 | obj-$(CONFIG_ARCH_OMAP3) += $(clock-common) clock3xxx.o \ |
119 | clock34xx.o clkt34xx_dpll3m2.o \ | 119 | clock34xx.o clkt34xx_dpll3m2.o \ |
120 | clock3517.o clock36xx.o \ | 120 | clock3517.o clock36xx.o \ |
@@ -123,12 +123,12 @@ obj-$(CONFIG_ARCH_OMAP4) += $(clock-common) clock44xx_data.o \ | |||
123 | dpll3xxx.o | 123 | dpll3xxx.o |
124 | 124 | ||
125 | # OMAP2 clock rate set data (old "OPP" data) | 125 | # OMAP2 clock rate set data (old "OPP" data) |
126 | obj-$(CONFIG_ARCH_OMAP2420) += opp2420_data.o | 126 | obj-$(CONFIG_SOC_OMAP2420) += opp2420_data.o |
127 | obj-$(CONFIG_ARCH_OMAP2430) += opp2430_data.o | 127 | obj-$(CONFIG_SOC_OMAP2430) += opp2430_data.o |
128 | 128 | ||
129 | # hwmod data | 129 | # hwmod data |
130 | obj-$(CONFIG_ARCH_OMAP2420) += omap_hwmod_2420_data.o | 130 | obj-$(CONFIG_SOC_OMAP2420) += omap_hwmod_2420_data.o |
131 | obj-$(CONFIG_ARCH_OMAP2430) += omap_hwmod_2430_data.o | 131 | obj-$(CONFIG_SOC_OMAP2430) += omap_hwmod_2430_data.o |
132 | obj-$(CONFIG_ARCH_OMAP3) += omap_hwmod_3xxx_data.o | 132 | obj-$(CONFIG_ARCH_OMAP3) += omap_hwmod_3xxx_data.o |
133 | obj-$(CONFIG_ARCH_OMAP4) += omap_hwmod_44xx_data.o | 133 | obj-$(CONFIG_ARCH_OMAP4) += omap_hwmod_44xx_data.o |
134 | 134 | ||
@@ -218,12 +218,14 @@ obj-$(CONFIG_MACH_OMAP4_PANDA) += board-omap4panda.o \ | |||
218 | hsmmc.o \ | 218 | hsmmc.o \ |
219 | omap_phy_internal.o | 219 | omap_phy_internal.o |
220 | 220 | ||
221 | obj-$(CONFIG_MACH_OMAP3517EVM) += board-am3517evm.o | 221 | obj-$(CONFIG_MACH_OMAP3517EVM) += board-am3517evm.o \ |
222 | omap_phy_internal.o \ | ||
222 | 223 | ||
223 | obj-$(CONFIG_MACH_CRANEBOARD) += board-am3517crane.o | 224 | obj-$(CONFIG_MACH_CRANEBOARD) += board-am3517crane.o |
224 | 225 | ||
225 | obj-$(CONFIG_MACH_SBC3530) += board-omap3stalker.o \ | 226 | obj-$(CONFIG_MACH_SBC3530) += board-omap3stalker.o \ |
226 | hsmmc.o | 227 | hsmmc.o |
228 | obj-$(CONFIG_MACH_TI8168EVM) += board-ti8168evm.o | ||
227 | # Platform specific device init code | 229 | # Platform specific device init code |
228 | usbfs-$(CONFIG_ARCH_OMAP_OTG) := usb-fs.o | 230 | usbfs-$(CONFIG_ARCH_OMAP_OTG) := usb-fs.o |
229 | obj-y += $(usbfs-m) $(usbfs-y) | 231 | obj-y += $(usbfs-m) $(usbfs-y) |
@@ -242,3 +244,7 @@ obj-y += $(smc91x-m) $(smc91x-y) | |||
242 | 244 | ||
243 | smsc911x-$(CONFIG_SMSC911X) := gpmc-smsc911x.o | 245 | smsc911x-$(CONFIG_SMSC911X) := gpmc-smsc911x.o |
244 | obj-y += $(smsc911x-m) $(smsc911x-y) | 246 | obj-y += $(smsc911x-m) $(smsc911x-y) |
247 | obj-$(CONFIG_ARCH_OMAP4) += hwspinlock.o | ||
248 | |||
249 | disp-$(CONFIG_OMAP2_DSS) := display.o | ||
250 | obj-y += $(disp-m) $(disp-y) | ||
diff --git a/arch/arm/mach-omap2/board-2430sdp.c b/arch/arm/mach-omap2/board-2430sdp.c index e0661777f599..cc42d474c443 100644 --- a/arch/arm/mach-omap2/board-2430sdp.c +++ b/arch/arm/mach-omap2/board-2430sdp.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/mmc/host.h> | 22 | #include <linux/mmc/host.h> |
23 | #include <linux/delay.h> | 23 | #include <linux/delay.h> |
24 | #include <linux/i2c/twl.h> | 24 | #include <linux/i2c/twl.h> |
25 | #include <linux/regulator/machine.h> | ||
25 | #include <linux/err.h> | 26 | #include <linux/err.h> |
26 | #include <linux/clk.h> | 27 | #include <linux/clk.h> |
27 | #include <linux/io.h> | 28 | #include <linux/io.h> |
@@ -139,15 +140,33 @@ static struct omap_board_config_kernel sdp2430_config[] __initdata = { | |||
139 | {OMAP_TAG_LCD, &sdp2430_lcd_config}, | 140 | {OMAP_TAG_LCD, &sdp2430_lcd_config}, |
140 | }; | 141 | }; |
141 | 142 | ||
142 | static void __init omap_2430sdp_init_irq(void) | 143 | static void __init omap_2430sdp_init_early(void) |
143 | { | 144 | { |
144 | omap_board_config = sdp2430_config; | 145 | omap_board_config = sdp2430_config; |
145 | omap_board_config_size = ARRAY_SIZE(sdp2430_config); | 146 | omap_board_config_size = ARRAY_SIZE(sdp2430_config); |
146 | omap2_init_common_infrastructure(); | 147 | omap2_init_common_infrastructure(); |
147 | omap2_init_common_devices(NULL, NULL); | 148 | omap2_init_common_devices(NULL, NULL); |
148 | omap_init_irq(); | ||
149 | } | 149 | } |
150 | 150 | ||
151 | static struct regulator_consumer_supply sdp2430_vmmc1_supplies[] = { | ||
152 | REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.0"), | ||
153 | }; | ||
154 | |||
155 | /* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */ | ||
156 | static struct regulator_init_data sdp2430_vmmc1 = { | ||
157 | .constraints = { | ||
158 | .min_uV = 1850000, | ||
159 | .max_uV = 3150000, | ||
160 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
161 | | REGULATOR_MODE_STANDBY, | ||
162 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | ||
163 | | REGULATOR_CHANGE_MODE | ||
164 | | REGULATOR_CHANGE_STATUS, | ||
165 | }, | ||
166 | .num_consumer_supplies = ARRAY_SIZE(sdp2430_vmmc1_supplies), | ||
167 | .consumer_supplies = &sdp2430_vmmc1_supplies[0], | ||
168 | }; | ||
169 | |||
151 | static struct twl4030_gpio_platform_data sdp2430_gpio_data = { | 170 | static struct twl4030_gpio_platform_data sdp2430_gpio_data = { |
152 | .gpio_base = OMAP_MAX_GPIO_LINES, | 171 | .gpio_base = OMAP_MAX_GPIO_LINES, |
153 | .irq_base = TWL4030_GPIO_IRQ_BASE, | 172 | .irq_base = TWL4030_GPIO_IRQ_BASE, |
@@ -160,6 +179,7 @@ static struct twl4030_platform_data sdp2430_twldata = { | |||
160 | 179 | ||
161 | /* platform_data for children goes here */ | 180 | /* platform_data for children goes here */ |
162 | .gpio = &sdp2430_gpio_data, | 181 | .gpio = &sdp2430_gpio_data, |
182 | .vmmc1 = &sdp2430_vmmc1, | ||
163 | }; | 183 | }; |
164 | 184 | ||
165 | static struct i2c_board_info __initdata sdp2430_i2c_boardinfo[] = { | 185 | static struct i2c_board_info __initdata sdp2430_i2c_boardinfo[] = { |
@@ -253,9 +273,10 @@ static void __init omap_2430sdp_map_io(void) | |||
253 | MACHINE_START(OMAP_2430SDP, "OMAP2430 sdp2430 board") | 273 | MACHINE_START(OMAP_2430SDP, "OMAP2430 sdp2430 board") |
254 | /* Maintainer: Syed Khasim - Texas Instruments Inc */ | 274 | /* Maintainer: Syed Khasim - Texas Instruments Inc */ |
255 | .boot_params = 0x80000100, | 275 | .boot_params = 0x80000100, |
256 | .map_io = omap_2430sdp_map_io, | ||
257 | .reserve = omap_reserve, | 276 | .reserve = omap_reserve, |
258 | .init_irq = omap_2430sdp_init_irq, | 277 | .map_io = omap_2430sdp_map_io, |
278 | .init_early = omap_2430sdp_init_early, | ||
279 | .init_irq = omap_init_irq, | ||
259 | .init_machine = omap_2430sdp_init, | 280 | .init_machine = omap_2430sdp_init, |
260 | .timer = &omap_timer, | 281 | .timer = &omap_timer, |
261 | MACHINE_END | 282 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c index d4e41ef86aa5..8950ecc9b940 100644 --- a/arch/arm/mach-omap2/board-3430sdp.c +++ b/arch/arm/mach-omap2/board-3430sdp.c | |||
@@ -307,34 +307,19 @@ static struct omap_dss_board_info sdp3430_dss_data = { | |||
307 | .default_device = &sdp3430_lcd_device, | 307 | .default_device = &sdp3430_lcd_device, |
308 | }; | 308 | }; |
309 | 309 | ||
310 | static struct platform_device sdp3430_dss_device = { | 310 | static struct regulator_consumer_supply sdp3430_vdda_dac_supply = |
311 | .name = "omapdss", | 311 | REGULATOR_SUPPLY("vdda_dac", "omapdss"); |
312 | .id = -1, | ||
313 | .dev = { | ||
314 | .platform_data = &sdp3430_dss_data, | ||
315 | }, | ||
316 | }; | ||
317 | |||
318 | static struct regulator_consumer_supply sdp3430_vdda_dac_supply = { | ||
319 | .supply = "vdda_dac", | ||
320 | .dev = &sdp3430_dss_device.dev, | ||
321 | }; | ||
322 | |||
323 | static struct platform_device *sdp3430_devices[] __initdata = { | ||
324 | &sdp3430_dss_device, | ||
325 | }; | ||
326 | 312 | ||
327 | static struct omap_board_config_kernel sdp3430_config[] __initdata = { | 313 | static struct omap_board_config_kernel sdp3430_config[] __initdata = { |
328 | }; | 314 | }; |
329 | 315 | ||
330 | static void __init omap_3430sdp_init_irq(void) | 316 | static void __init omap_3430sdp_init_early(void) |
331 | { | 317 | { |
332 | omap_board_config = sdp3430_config; | 318 | omap_board_config = sdp3430_config; |
333 | omap_board_config_size = ARRAY_SIZE(sdp3430_config); | 319 | omap_board_config_size = ARRAY_SIZE(sdp3430_config); |
334 | omap3_pm_init_cpuidle(omap3_cpuidle_params_table); | 320 | omap3_pm_init_cpuidle(omap3_cpuidle_params_table); |
335 | omap2_init_common_infrastructure(); | 321 | omap2_init_common_infrastructure(); |
336 | omap2_init_common_devices(hyb18m512160af6_sdrc_params, NULL); | 322 | omap2_init_common_devices(hyb18m512160af6_sdrc_params, NULL); |
337 | omap_init_irq(); | ||
338 | } | 323 | } |
339 | 324 | ||
340 | static int sdp3430_batt_table[] = { | 325 | static int sdp3430_batt_table[] = { |
@@ -370,18 +355,6 @@ static struct omap2_hsmmc_info mmc[] = { | |||
370 | {} /* Terminator */ | 355 | {} /* Terminator */ |
371 | }; | 356 | }; |
372 | 357 | ||
373 | static struct regulator_consumer_supply sdp3430_vmmc1_supply = { | ||
374 | .supply = "vmmc", | ||
375 | }; | ||
376 | |||
377 | static struct regulator_consumer_supply sdp3430_vsim_supply = { | ||
378 | .supply = "vmmc_aux", | ||
379 | }; | ||
380 | |||
381 | static struct regulator_consumer_supply sdp3430_vmmc2_supply = { | ||
382 | .supply = "vmmc", | ||
383 | }; | ||
384 | |||
385 | static int sdp3430_twl_gpio_setup(struct device *dev, | 358 | static int sdp3430_twl_gpio_setup(struct device *dev, |
386 | unsigned gpio, unsigned ngpio) | 359 | unsigned gpio, unsigned ngpio) |
387 | { | 360 | { |
@@ -392,13 +365,6 @@ static int sdp3430_twl_gpio_setup(struct device *dev, | |||
392 | mmc[1].gpio_cd = gpio + 1; | 365 | mmc[1].gpio_cd = gpio + 1; |
393 | omap2_hsmmc_init(mmc); | 366 | omap2_hsmmc_init(mmc); |
394 | 367 | ||
395 | /* link regulators to MMC adapters ... we "know" the | ||
396 | * regulators will be set up only *after* we return. | ||
397 | */ | ||
398 | sdp3430_vmmc1_supply.dev = mmc[0].dev; | ||
399 | sdp3430_vsim_supply.dev = mmc[0].dev; | ||
400 | sdp3430_vmmc2_supply.dev = mmc[1].dev; | ||
401 | |||
402 | /* gpio + 7 is "sub_lcd_en_bkl" (output/PWM1) */ | 368 | /* gpio + 7 is "sub_lcd_en_bkl" (output/PWM1) */ |
403 | gpio_request(gpio + 7, "sub_lcd_en_bkl"); | 369 | gpio_request(gpio + 7, "sub_lcd_en_bkl"); |
404 | gpio_direction_output(gpio + 7, 0); | 370 | gpio_direction_output(gpio + 7, 0); |
@@ -427,6 +393,34 @@ static struct twl4030_madc_platform_data sdp3430_madc_data = { | |||
427 | .irq_line = 1, | 393 | .irq_line = 1, |
428 | }; | 394 | }; |
429 | 395 | ||
396 | /* regulator consumer mappings */ | ||
397 | |||
398 | /* ads7846 on SPI */ | ||
399 | static struct regulator_consumer_supply sdp3430_vaux3_supplies[] = { | ||
400 | REGULATOR_SUPPLY("vcc", "spi1.0"), | ||
401 | }; | ||
402 | |||
403 | static struct regulator_consumer_supply sdp3430_vdda_dac_supplies[] = { | ||
404 | REGULATOR_SUPPLY("vdda_dac", "omapdss"), | ||
405 | }; | ||
406 | |||
407 | /* VPLL2 for digital video outputs */ | ||
408 | static struct regulator_consumer_supply sdp3430_vpll2_supplies[] = { | ||
409 | REGULATOR_SUPPLY("vdds_dsi", "omapdss"), | ||
410 | }; | ||
411 | |||
412 | static struct regulator_consumer_supply sdp3430_vmmc1_supplies[] = { | ||
413 | REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.0"), | ||
414 | }; | ||
415 | |||
416 | static struct regulator_consumer_supply sdp3430_vsim_supplies[] = { | ||
417 | REGULATOR_SUPPLY("vmmc_aux", "mmci-omap-hs.0"), | ||
418 | }; | ||
419 | |||
420 | static struct regulator_consumer_supply sdp3430_vmmc2_supplies[] = { | ||
421 | REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.1"), | ||
422 | }; | ||
423 | |||
430 | /* | 424 | /* |
431 | * Apply all the fixed voltages since most versions of U-Boot | 425 | * Apply all the fixed voltages since most versions of U-Boot |
432 | * don't bother with that initialization. | 426 | * don't bother with that initialization. |
@@ -469,6 +463,8 @@ static struct regulator_init_data sdp3430_vaux3 = { | |||
469 | .valid_ops_mask = REGULATOR_CHANGE_MODE | 463 | .valid_ops_mask = REGULATOR_CHANGE_MODE |
470 | | REGULATOR_CHANGE_STATUS, | 464 | | REGULATOR_CHANGE_STATUS, |
471 | }, | 465 | }, |
466 | .num_consumer_supplies = ARRAY_SIZE(sdp3430_vaux3_supplies), | ||
467 | .consumer_supplies = sdp3430_vaux3_supplies, | ||
472 | }; | 468 | }; |
473 | 469 | ||
474 | /* VAUX4 for OMAP VDD_CSI2 (camera) */ | 470 | /* VAUX4 for OMAP VDD_CSI2 (camera) */ |
@@ -495,8 +491,8 @@ static struct regulator_init_data sdp3430_vmmc1 = { | |||
495 | | REGULATOR_CHANGE_MODE | 491 | | REGULATOR_CHANGE_MODE |
496 | | REGULATOR_CHANGE_STATUS, | 492 | | REGULATOR_CHANGE_STATUS, |
497 | }, | 493 | }, |
498 | .num_consumer_supplies = 1, | 494 | .num_consumer_supplies = ARRAY_SIZE(sdp3430_vmmc1_supplies), |
499 | .consumer_supplies = &sdp3430_vmmc1_supply, | 495 | .consumer_supplies = sdp3430_vmmc1_supplies, |
500 | }; | 496 | }; |
501 | 497 | ||
502 | /* VMMC2 for MMC2 card */ | 498 | /* VMMC2 for MMC2 card */ |
@@ -510,8 +506,8 @@ static struct regulator_init_data sdp3430_vmmc2 = { | |||
510 | .valid_ops_mask = REGULATOR_CHANGE_MODE | 506 | .valid_ops_mask = REGULATOR_CHANGE_MODE |
511 | | REGULATOR_CHANGE_STATUS, | 507 | | REGULATOR_CHANGE_STATUS, |
512 | }, | 508 | }, |
513 | .num_consumer_supplies = 1, | 509 | .num_consumer_supplies = ARRAY_SIZE(sdp3430_vmmc2_supplies), |
514 | .consumer_supplies = &sdp3430_vmmc2_supply, | 510 | .consumer_supplies = sdp3430_vmmc2_supplies, |
515 | }; | 511 | }; |
516 | 512 | ||
517 | /* VSIM for OMAP VDD_MMC1A (i/o for DAT4..DAT7) */ | 513 | /* VSIM for OMAP VDD_MMC1A (i/o for DAT4..DAT7) */ |
@@ -525,8 +521,8 @@ static struct regulator_init_data sdp3430_vsim = { | |||
525 | | REGULATOR_CHANGE_MODE | 521 | | REGULATOR_CHANGE_MODE |
526 | | REGULATOR_CHANGE_STATUS, | 522 | | REGULATOR_CHANGE_STATUS, |
527 | }, | 523 | }, |
528 | .num_consumer_supplies = 1, | 524 | .num_consumer_supplies = ARRAY_SIZE(sdp3430_vsim_supplies), |
529 | .consumer_supplies = &sdp3430_vsim_supply, | 525 | .consumer_supplies = sdp3430_vsim_supplies, |
530 | }; | 526 | }; |
531 | 527 | ||
532 | /* VDAC for DSS driving S-Video */ | 528 | /* VDAC for DSS driving S-Video */ |
@@ -540,16 +536,8 @@ static struct regulator_init_data sdp3430_vdac = { | |||
540 | .valid_ops_mask = REGULATOR_CHANGE_MODE | 536 | .valid_ops_mask = REGULATOR_CHANGE_MODE |
541 | | REGULATOR_CHANGE_STATUS, | 537 | | REGULATOR_CHANGE_STATUS, |
542 | }, | 538 | }, |
543 | .num_consumer_supplies = 1, | 539 | .num_consumer_supplies = ARRAY_SIZE(sdp3430_vdda_dac_supplies), |
544 | .consumer_supplies = &sdp3430_vdda_dac_supply, | 540 | .consumer_supplies = sdp3430_vdda_dac_supplies, |
545 | }; | ||
546 | |||
547 | /* VPLL2 for digital video outputs */ | ||
548 | static struct regulator_consumer_supply sdp3430_vpll2_supplies[] = { | ||
549 | { | ||
550 | .supply = "vdds_dsi", | ||
551 | .dev = &sdp3430_dss_device.dev, | ||
552 | } | ||
553 | }; | 541 | }; |
554 | 542 | ||
555 | static struct regulator_init_data sdp3430_vpll2 = { | 543 | static struct regulator_init_data sdp3430_vpll2 = { |
@@ -801,7 +789,7 @@ static void __init omap_3430sdp_init(void) | |||
801 | { | 789 | { |
802 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); | 790 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); |
803 | omap3430_i2c_init(); | 791 | omap3430_i2c_init(); |
804 | platform_add_devices(sdp3430_devices, ARRAY_SIZE(sdp3430_devices)); | 792 | omap_display_init(&sdp3430_dss_data); |
805 | if (omap_rev() > OMAP3430_REV_ES1_0) | 793 | if (omap_rev() > OMAP3430_REV_ES1_0) |
806 | ts_gpio = SDP3430_TS_GPIO_IRQ_SDPV2; | 794 | ts_gpio = SDP3430_TS_GPIO_IRQ_SDPV2; |
807 | else | 795 | else |
@@ -813,7 +801,7 @@ static void __init omap_3430sdp_init(void) | |||
813 | omap_serial_init(); | 801 | omap_serial_init(); |
814 | usb_musb_init(&musb_board_data); | 802 | usb_musb_init(&musb_board_data); |
815 | board_smc91x_init(); | 803 | board_smc91x_init(); |
816 | board_flash_init(sdp_flash_partitions, chip_sel_3430); | 804 | board_flash_init(sdp_flash_partitions, chip_sel_3430, 0); |
817 | sdp3430_display_init(); | 805 | sdp3430_display_init(); |
818 | enable_board_wakeup_source(); | 806 | enable_board_wakeup_source(); |
819 | usb_ehci_init(&ehci_pdata); | 807 | usb_ehci_init(&ehci_pdata); |
@@ -822,9 +810,10 @@ static void __init omap_3430sdp_init(void) | |||
822 | MACHINE_START(OMAP_3430SDP, "OMAP3430 3430SDP board") | 810 | MACHINE_START(OMAP_3430SDP, "OMAP3430 3430SDP board") |
823 | /* Maintainer: Syed Khasim - Texas Instruments Inc */ | 811 | /* Maintainer: Syed Khasim - Texas Instruments Inc */ |
824 | .boot_params = 0x80000100, | 812 | .boot_params = 0x80000100, |
825 | .map_io = omap3_map_io, | ||
826 | .reserve = omap_reserve, | 813 | .reserve = omap_reserve, |
827 | .init_irq = omap_3430sdp_init_irq, | 814 | .map_io = omap3_map_io, |
815 | .init_early = omap_3430sdp_init_early, | ||
816 | .init_irq = omap_init_irq, | ||
828 | .init_machine = omap_3430sdp_init, | 817 | .init_machine = omap_3430sdp_init, |
829 | .timer = &omap_timer, | 818 | .timer = &omap_timer, |
830 | MACHINE_END | 819 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-3630sdp.c b/arch/arm/mach-omap2/board-3630sdp.c index 62645640f5e4..8d1c4358ecf9 100644 --- a/arch/arm/mach-omap2/board-3630sdp.c +++ b/arch/arm/mach-omap2/board-3630sdp.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/platform_device.h> | 11 | #include <linux/platform_device.h> |
12 | #include <linux/input.h> | 12 | #include <linux/input.h> |
13 | #include <linux/gpio.h> | 13 | #include <linux/gpio.h> |
14 | #include <linux/mtd/nand.h> | ||
14 | 15 | ||
15 | #include <asm/mach-types.h> | 16 | #include <asm/mach-types.h> |
16 | #include <asm/mach/arch.h> | 17 | #include <asm/mach/arch.h> |
@@ -69,14 +70,13 @@ static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { | |||
69 | static struct omap_board_config_kernel sdp_config[] __initdata = { | 70 | static struct omap_board_config_kernel sdp_config[] __initdata = { |
70 | }; | 71 | }; |
71 | 72 | ||
72 | static void __init omap_sdp_init_irq(void) | 73 | static void __init omap_sdp_init_early(void) |
73 | { | 74 | { |
74 | omap_board_config = sdp_config; | 75 | omap_board_config = sdp_config; |
75 | omap_board_config_size = ARRAY_SIZE(sdp_config); | 76 | omap_board_config_size = ARRAY_SIZE(sdp_config); |
76 | omap2_init_common_infrastructure(); | 77 | omap2_init_common_infrastructure(); |
77 | omap2_init_common_devices(h8mbx00u0mer0em_sdrc_params, | 78 | omap2_init_common_devices(h8mbx00u0mer0em_sdrc_params, |
78 | h8mbx00u0mer0em_sdrc_params); | 79 | h8mbx00u0mer0em_sdrc_params); |
79 | omap_init_irq(); | ||
80 | } | 80 | } |
81 | 81 | ||
82 | #ifdef CONFIG_OMAP_MUX | 82 | #ifdef CONFIG_OMAP_MUX |
@@ -209,16 +209,17 @@ static void __init omap_sdp_init(void) | |||
209 | zoom_peripherals_init(); | 209 | zoom_peripherals_init(); |
210 | zoom_display_init(); | 210 | zoom_display_init(); |
211 | board_smc91x_init(); | 211 | board_smc91x_init(); |
212 | board_flash_init(sdp_flash_partitions, chip_sel_sdp); | 212 | board_flash_init(sdp_flash_partitions, chip_sel_sdp, NAND_BUSWIDTH_16); |
213 | enable_board_wakeup_source(); | 213 | enable_board_wakeup_source(); |
214 | usb_ehci_init(&ehci_pdata); | 214 | usb_ehci_init(&ehci_pdata); |
215 | } | 215 | } |
216 | 216 | ||
217 | MACHINE_START(OMAP_3630SDP, "OMAP 3630SDP board") | 217 | MACHINE_START(OMAP_3630SDP, "OMAP 3630SDP board") |
218 | .boot_params = 0x80000100, | 218 | .boot_params = 0x80000100, |
219 | .map_io = omap3_map_io, | ||
220 | .reserve = omap_reserve, | 219 | .reserve = omap_reserve, |
221 | .init_irq = omap_sdp_init_irq, | 220 | .map_io = omap3_map_io, |
221 | .init_early = omap_sdp_init_early, | ||
222 | .init_irq = omap_init_irq, | ||
222 | .init_machine = omap_sdp_init, | 223 | .init_machine = omap_sdp_init, |
223 | .timer = &omap_timer, | 224 | .timer = &omap_timer, |
224 | MACHINE_END | 225 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c index 07d1b20b1148..1a943be822c3 100644 --- a/arch/arm/mach-omap2/board-4430sdp.c +++ b/arch/arm/mach-omap2/board-4430sdp.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <plat/common.h> | 35 | #include <plat/common.h> |
36 | #include <plat/usb.h> | 36 | #include <plat/usb.h> |
37 | #include <plat/mmc.h> | 37 | #include <plat/mmc.h> |
38 | #include <plat/omap4-keypad.h> | ||
38 | 39 | ||
39 | #include "mux.h" | 40 | #include "mux.h" |
40 | #include "hsmmc.h" | 41 | #include "hsmmc.h" |
@@ -44,10 +45,93 @@ | |||
44 | #define ETH_KS8851_IRQ 34 | 45 | #define ETH_KS8851_IRQ 34 |
45 | #define ETH_KS8851_POWER_ON 48 | 46 | #define ETH_KS8851_POWER_ON 48 |
46 | #define ETH_KS8851_QUART 138 | 47 | #define ETH_KS8851_QUART 138 |
47 | #define OMAP4SDP_MDM_PWR_EN_GPIO 157 | ||
48 | #define OMAP4_SFH7741_SENSOR_OUTPUT_GPIO 184 | 48 | #define OMAP4_SFH7741_SENSOR_OUTPUT_GPIO 184 |
49 | #define OMAP4_SFH7741_ENABLE_GPIO 188 | 49 | #define OMAP4_SFH7741_ENABLE_GPIO 188 |
50 | 50 | ||
51 | static const int sdp4430_keymap[] = { | ||
52 | KEY(0, 0, KEY_E), | ||
53 | KEY(0, 1, KEY_R), | ||
54 | KEY(0, 2, KEY_T), | ||
55 | KEY(0, 3, KEY_HOME), | ||
56 | KEY(0, 4, KEY_F5), | ||
57 | KEY(0, 5, KEY_UNKNOWN), | ||
58 | KEY(0, 6, KEY_I), | ||
59 | KEY(0, 7, KEY_LEFTSHIFT), | ||
60 | |||
61 | KEY(1, 0, KEY_D), | ||
62 | KEY(1, 1, KEY_F), | ||
63 | KEY(1, 2, KEY_G), | ||
64 | KEY(1, 3, KEY_SEND), | ||
65 | KEY(1, 4, KEY_F6), | ||
66 | KEY(1, 5, KEY_UNKNOWN), | ||
67 | KEY(1, 6, KEY_K), | ||
68 | KEY(1, 7, KEY_ENTER), | ||
69 | |||
70 | KEY(2, 0, KEY_X), | ||
71 | KEY(2, 1, KEY_C), | ||
72 | KEY(2, 2, KEY_V), | ||
73 | KEY(2, 3, KEY_END), | ||
74 | KEY(2, 4, KEY_F7), | ||
75 | KEY(2, 5, KEY_UNKNOWN), | ||
76 | KEY(2, 6, KEY_DOT), | ||
77 | KEY(2, 7, KEY_CAPSLOCK), | ||
78 | |||
79 | KEY(3, 0, KEY_Z), | ||
80 | KEY(3, 1, KEY_KPPLUS), | ||
81 | KEY(3, 2, KEY_B), | ||
82 | KEY(3, 3, KEY_F1), | ||
83 | KEY(3, 4, KEY_F8), | ||
84 | KEY(3, 5, KEY_UNKNOWN), | ||
85 | KEY(3, 6, KEY_O), | ||
86 | KEY(3, 7, KEY_SPACE), | ||
87 | |||
88 | KEY(4, 0, KEY_W), | ||
89 | KEY(4, 1, KEY_Y), | ||
90 | KEY(4, 2, KEY_U), | ||
91 | KEY(4, 3, KEY_F2), | ||
92 | KEY(4, 4, KEY_VOLUMEUP), | ||
93 | KEY(4, 5, KEY_UNKNOWN), | ||
94 | KEY(4, 6, KEY_L), | ||
95 | KEY(4, 7, KEY_LEFT), | ||
96 | |||
97 | KEY(5, 0, KEY_S), | ||
98 | KEY(5, 1, KEY_H), | ||
99 | KEY(5, 2, KEY_J), | ||
100 | KEY(5, 3, KEY_F3), | ||
101 | KEY(5, 4, KEY_F9), | ||
102 | KEY(5, 5, KEY_VOLUMEDOWN), | ||
103 | KEY(5, 6, KEY_M), | ||
104 | KEY(5, 7, KEY_RIGHT), | ||
105 | |||
106 | KEY(6, 0, KEY_Q), | ||
107 | KEY(6, 1, KEY_A), | ||
108 | KEY(6, 2, KEY_N), | ||
109 | KEY(6, 3, KEY_BACK), | ||
110 | KEY(6, 4, KEY_BACKSPACE), | ||
111 | KEY(6, 5, KEY_UNKNOWN), | ||
112 | KEY(6, 6, KEY_P), | ||
113 | KEY(6, 7, KEY_UP), | ||
114 | |||
115 | KEY(7, 0, KEY_PROG1), | ||
116 | KEY(7, 1, KEY_PROG2), | ||
117 | KEY(7, 2, KEY_PROG3), | ||
118 | KEY(7, 3, KEY_PROG4), | ||
119 | KEY(7, 4, KEY_F4), | ||
120 | KEY(7, 5, KEY_UNKNOWN), | ||
121 | KEY(7, 6, KEY_OK), | ||
122 | KEY(7, 7, KEY_DOWN), | ||
123 | }; | ||
124 | |||
125 | static struct matrix_keymap_data sdp4430_keymap_data = { | ||
126 | .keymap = sdp4430_keymap, | ||
127 | .keymap_size = ARRAY_SIZE(sdp4430_keymap), | ||
128 | }; | ||
129 | |||
130 | static struct omap4_keypad_platform_data sdp4430_keypad_data = { | ||
131 | .keymap_data = &sdp4430_keymap_data, | ||
132 | .rows = 8, | ||
133 | .cols = 8, | ||
134 | }; | ||
51 | static struct gpio_led sdp4430_gpio_leds[] = { | 135 | static struct gpio_led sdp4430_gpio_leds[] = { |
52 | { | 136 | { |
53 | .name = "omap4:green:debug0", | 137 | .name = "omap4:green:debug0", |
@@ -239,7 +323,7 @@ static struct omap_board_config_kernel sdp4430_config[] __initdata = { | |||
239 | { OMAP_TAG_LCD, &sdp4430_lcd_config }, | 323 | { OMAP_TAG_LCD, &sdp4430_lcd_config }, |
240 | }; | 324 | }; |
241 | 325 | ||
242 | static void __init omap_4430sdp_init_irq(void) | 326 | static void __init omap_4430sdp_init_early(void) |
243 | { | 327 | { |
244 | omap_board_config = sdp4430_config; | 328 | omap_board_config = sdp4430_config; |
245 | omap_board_config_size = ARRAY_SIZE(sdp4430_config); | 329 | omap_board_config_size = ARRAY_SIZE(sdp4430_config); |
@@ -248,19 +332,8 @@ static void __init omap_4430sdp_init_irq(void) | |||
248 | #ifdef CONFIG_OMAP_32K_TIMER | 332 | #ifdef CONFIG_OMAP_32K_TIMER |
249 | omap2_gp_clockevent_set_gptimer(1); | 333 | omap2_gp_clockevent_set_gptimer(1); |
250 | #endif | 334 | #endif |
251 | gic_init_irq(); | ||
252 | } | 335 | } |
253 | 336 | ||
254 | static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { | ||
255 | .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY, | ||
256 | .port_mode[1] = EHCI_HCD_OMAP_MODE_UNKNOWN, | ||
257 | .port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN, | ||
258 | .phy_reset = false, | ||
259 | .reset_gpio_port[0] = -EINVAL, | ||
260 | .reset_gpio_port[1] = -EINVAL, | ||
261 | .reset_gpio_port[2] = -EINVAL, | ||
262 | }; | ||
263 | |||
264 | static struct omap_musb_board_data musb_board_data = { | 337 | static struct omap_musb_board_data musb_board_data = { |
265 | .interface_type = MUSB_INTERFACE_UTMI, | 338 | .interface_type = MUSB_INTERFACE_UTMI, |
266 | .mode = MUSB_OTG, | 339 | .mode = MUSB_OTG, |
@@ -434,7 +507,6 @@ static struct regulator_init_data sdp4430_vana = { | |||
434 | .constraints = { | 507 | .constraints = { |
435 | .min_uV = 2100000, | 508 | .min_uV = 2100000, |
436 | .max_uV = 2100000, | 509 | .max_uV = 2100000, |
437 | .apply_uV = true, | ||
438 | .valid_modes_mask = REGULATOR_MODE_NORMAL | 510 | .valid_modes_mask = REGULATOR_MODE_NORMAL |
439 | | REGULATOR_MODE_STANDBY, | 511 | | REGULATOR_MODE_STANDBY, |
440 | .valid_ops_mask = REGULATOR_CHANGE_MODE | 512 | .valid_ops_mask = REGULATOR_CHANGE_MODE |
@@ -446,7 +518,6 @@ static struct regulator_init_data sdp4430_vcxio = { | |||
446 | .constraints = { | 518 | .constraints = { |
447 | .min_uV = 1800000, | 519 | .min_uV = 1800000, |
448 | .max_uV = 1800000, | 520 | .max_uV = 1800000, |
449 | .apply_uV = true, | ||
450 | .valid_modes_mask = REGULATOR_MODE_NORMAL | 521 | .valid_modes_mask = REGULATOR_MODE_NORMAL |
451 | | REGULATOR_MODE_STANDBY, | 522 | | REGULATOR_MODE_STANDBY, |
452 | .valid_ops_mask = REGULATOR_CHANGE_MODE | 523 | .valid_ops_mask = REGULATOR_CHANGE_MODE |
@@ -458,7 +529,6 @@ static struct regulator_init_data sdp4430_vdac = { | |||
458 | .constraints = { | 529 | .constraints = { |
459 | .min_uV = 1800000, | 530 | .min_uV = 1800000, |
460 | .max_uV = 1800000, | 531 | .max_uV = 1800000, |
461 | .apply_uV = true, | ||
462 | .valid_modes_mask = REGULATOR_MODE_NORMAL | 532 | .valid_modes_mask = REGULATOR_MODE_NORMAL |
463 | | REGULATOR_MODE_STANDBY, | 533 | | REGULATOR_MODE_STANDBY, |
464 | .valid_ops_mask = REGULATOR_CHANGE_MODE | 534 | .valid_ops_mask = REGULATOR_CHANGE_MODE |
@@ -576,14 +646,6 @@ static void __init omap_4430sdp_init(void) | |||
576 | omap_serial_init(); | 646 | omap_serial_init(); |
577 | omap4_twl6030_hsmmc_init(mmc); | 647 | omap4_twl6030_hsmmc_init(mmc); |
578 | 648 | ||
579 | /* Power on the ULPI PHY */ | ||
580 | status = gpio_request(OMAP4SDP_MDM_PWR_EN_GPIO, "USBB1 PHY VMDM_3V3"); | ||
581 | if (status) | ||
582 | pr_err("%s: Could not get USBB1 PHY GPIO\n", __func__); | ||
583 | else | ||
584 | gpio_direction_output(OMAP4SDP_MDM_PWR_EN_GPIO, 1); | ||
585 | |||
586 | usb_ehci_init(&ehci_pdata); | ||
587 | usb_musb_init(&musb_board_data); | 649 | usb_musb_init(&musb_board_data); |
588 | 650 | ||
589 | status = omap_ethernet_init(); | 651 | status = omap_ethernet_init(); |
@@ -594,6 +656,10 @@ static void __init omap_4430sdp_init(void) | |||
594 | spi_register_board_info(sdp4430_spi_board_info, | 656 | spi_register_board_info(sdp4430_spi_board_info, |
595 | ARRAY_SIZE(sdp4430_spi_board_info)); | 657 | ARRAY_SIZE(sdp4430_spi_board_info)); |
596 | } | 658 | } |
659 | |||
660 | status = omap4_keyboard_init(&sdp4430_keypad_data); | ||
661 | if (status) | ||
662 | pr_err("Keypad initialization failed: %d\n", status); | ||
597 | } | 663 | } |
598 | 664 | ||
599 | static void __init omap_4430sdp_map_io(void) | 665 | static void __init omap_4430sdp_map_io(void) |
@@ -605,9 +671,10 @@ static void __init omap_4430sdp_map_io(void) | |||
605 | MACHINE_START(OMAP_4430SDP, "OMAP4430 4430SDP board") | 671 | MACHINE_START(OMAP_4430SDP, "OMAP4430 4430SDP board") |
606 | /* Maintainer: Santosh Shilimkar - Texas Instruments Inc */ | 672 | /* Maintainer: Santosh Shilimkar - Texas Instruments Inc */ |
607 | .boot_params = 0x80000100, | 673 | .boot_params = 0x80000100, |
608 | .map_io = omap_4430sdp_map_io, | ||
609 | .reserve = omap_reserve, | 674 | .reserve = omap_reserve, |
610 | .init_irq = omap_4430sdp_init_irq, | 675 | .map_io = omap_4430sdp_map_io, |
676 | .init_early = omap_4430sdp_init_early, | ||
677 | .init_irq = gic_init_irq, | ||
611 | .init_machine = omap_4430sdp_init, | 678 | .init_machine = omap_4430sdp_init, |
612 | .timer = &omap_timer, | 679 | .timer = &omap_timer, |
613 | MACHINE_END | 680 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-am3517crane.c b/arch/arm/mach-omap2/board-am3517crane.c index 71acb5ab281c..ae3a83d47dab 100644 --- a/arch/arm/mach-omap2/board-am3517crane.c +++ b/arch/arm/mach-omap2/board-am3517crane.c | |||
@@ -49,14 +49,13 @@ static struct omap_board_mux board_mux[] __initdata = { | |||
49 | #define board_mux NULL | 49 | #define board_mux NULL |
50 | #endif | 50 | #endif |
51 | 51 | ||
52 | static void __init am3517_crane_init_irq(void) | 52 | static void __init am3517_crane_init_early(void) |
53 | { | 53 | { |
54 | omap_board_config = am3517_crane_config; | 54 | omap_board_config = am3517_crane_config; |
55 | omap_board_config_size = ARRAY_SIZE(am3517_crane_config); | 55 | omap_board_config_size = ARRAY_SIZE(am3517_crane_config); |
56 | 56 | ||
57 | omap2_init_common_infrastructure(); | 57 | omap2_init_common_infrastructure(); |
58 | omap2_init_common_devices(NULL, NULL); | 58 | omap2_init_common_devices(NULL, NULL); |
59 | omap_init_irq(); | ||
60 | } | 59 | } |
61 | 60 | ||
62 | static struct ehci_hcd_omap_platform_data ehci_pdata __initdata = { | 61 | static struct ehci_hcd_omap_platform_data ehci_pdata __initdata = { |
@@ -108,9 +107,10 @@ static void __init am3517_crane_init(void) | |||
108 | 107 | ||
109 | MACHINE_START(CRANEBOARD, "AM3517/05 CRANEBOARD") | 108 | MACHINE_START(CRANEBOARD, "AM3517/05 CRANEBOARD") |
110 | .boot_params = 0x80000100, | 109 | .boot_params = 0x80000100, |
111 | .map_io = omap3_map_io, | ||
112 | .reserve = omap_reserve, | 110 | .reserve = omap_reserve, |
113 | .init_irq = am3517_crane_init_irq, | 111 | .map_io = omap3_map_io, |
112 | .init_early = am3517_crane_init_early, | ||
113 | .init_irq = omap_init_irq, | ||
114 | .init_machine = am3517_crane_init, | 114 | .init_machine = am3517_crane_init, |
115 | .timer = &omap_timer, | 115 | .timer = &omap_timer, |
116 | MACHINE_END | 116 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-am3517evm.c b/arch/arm/mach-omap2/board-am3517evm.c index 10d60b7743cf..634fe65b33c8 100644 --- a/arch/arm/mach-omap2/board-am3517evm.c +++ b/arch/arm/mach-omap2/board-am3517evm.c | |||
@@ -378,37 +378,28 @@ static struct omap_dss_board_info am3517_evm_dss_data = { | |||
378 | .default_device = &am3517_evm_lcd_device, | 378 | .default_device = &am3517_evm_lcd_device, |
379 | }; | 379 | }; |
380 | 380 | ||
381 | static struct platform_device am3517_evm_dss_device = { | ||
382 | .name = "omapdss", | ||
383 | .id = -1, | ||
384 | .dev = { | ||
385 | .platform_data = &am3517_evm_dss_data, | ||
386 | }, | ||
387 | }; | ||
388 | |||
389 | /* | 381 | /* |
390 | * Board initialization | 382 | * Board initialization |
391 | */ | 383 | */ |
392 | static struct omap_board_config_kernel am3517_evm_config[] __initdata = { | 384 | static struct omap_board_config_kernel am3517_evm_config[] __initdata = { |
393 | }; | 385 | }; |
394 | 386 | ||
395 | static struct platform_device *am3517_evm_devices[] __initdata = { | 387 | static void __init am3517_evm_init_early(void) |
396 | &am3517_evm_dss_device, | ||
397 | }; | ||
398 | |||
399 | static void __init am3517_evm_init_irq(void) | ||
400 | { | 388 | { |
401 | omap_board_config = am3517_evm_config; | 389 | omap_board_config = am3517_evm_config; |
402 | omap_board_config_size = ARRAY_SIZE(am3517_evm_config); | 390 | omap_board_config_size = ARRAY_SIZE(am3517_evm_config); |
403 | omap2_init_common_infrastructure(); | 391 | omap2_init_common_infrastructure(); |
404 | omap2_init_common_devices(NULL, NULL); | 392 | omap2_init_common_devices(NULL, NULL); |
405 | omap_init_irq(); | ||
406 | } | 393 | } |
407 | 394 | ||
408 | static struct omap_musb_board_data musb_board_data = { | 395 | static struct omap_musb_board_data musb_board_data = { |
409 | .interface_type = MUSB_INTERFACE_ULPI, | 396 | .interface_type = MUSB_INTERFACE_ULPI, |
410 | .mode = MUSB_OTG, | 397 | .mode = MUSB_OTG, |
411 | .power = 500, | 398 | .power = 500, |
399 | .set_phy_power = am35x_musb_phy_power, | ||
400 | .clear_irq = am35x_musb_clear_irq, | ||
401 | .set_mode = am35x_musb_set_mode, | ||
402 | .reset = am35x_musb_reset, | ||
412 | }; | 403 | }; |
413 | 404 | ||
414 | static __init void am3517_evm_musb_init(void) | 405 | static __init void am3517_evm_musb_init(void) |
@@ -495,9 +486,7 @@ static void __init am3517_evm_init(void) | |||
495 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); | 486 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); |
496 | 487 | ||
497 | am3517_evm_i2c_init(); | 488 | am3517_evm_i2c_init(); |
498 | platform_add_devices(am3517_evm_devices, | 489 | omap_display_init(&am3517_evm_dss_data); |
499 | ARRAY_SIZE(am3517_evm_devices)); | ||
500 | |||
501 | omap_serial_init(); | 490 | omap_serial_init(); |
502 | 491 | ||
503 | /* Configure GPIO for EHCI port */ | 492 | /* Configure GPIO for EHCI port */ |
@@ -521,9 +510,10 @@ static void __init am3517_evm_init(void) | |||
521 | 510 | ||
522 | MACHINE_START(OMAP3517EVM, "OMAP3517/AM3517 EVM") | 511 | MACHINE_START(OMAP3517EVM, "OMAP3517/AM3517 EVM") |
523 | .boot_params = 0x80000100, | 512 | .boot_params = 0x80000100, |
524 | .map_io = omap3_map_io, | ||
525 | .reserve = omap_reserve, | 513 | .reserve = omap_reserve, |
526 | .init_irq = am3517_evm_init_irq, | 514 | .map_io = omap3_map_io, |
515 | .init_early = am3517_evm_init_early, | ||
516 | .init_irq = omap_init_irq, | ||
527 | .init_machine = am3517_evm_init, | 517 | .init_machine = am3517_evm_init, |
528 | .timer = &omap_timer, | 518 | .timer = &omap_timer, |
529 | MACHINE_END | 519 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-apollon.c b/arch/arm/mach-omap2/board-apollon.c index 9f55b68687f7..4ef4aad4e719 100644 --- a/arch/arm/mach-omap2/board-apollon.c +++ b/arch/arm/mach-omap2/board-apollon.c | |||
@@ -274,13 +274,12 @@ static struct omap_board_config_kernel apollon_config[] __initdata = { | |||
274 | { OMAP_TAG_LCD, &apollon_lcd_config }, | 274 | { OMAP_TAG_LCD, &apollon_lcd_config }, |
275 | }; | 275 | }; |
276 | 276 | ||
277 | static void __init omap_apollon_init_irq(void) | 277 | static void __init omap_apollon_init_early(void) |
278 | { | 278 | { |
279 | omap_board_config = apollon_config; | 279 | omap_board_config = apollon_config; |
280 | omap_board_config_size = ARRAY_SIZE(apollon_config); | 280 | omap_board_config_size = ARRAY_SIZE(apollon_config); |
281 | omap2_init_common_infrastructure(); | 281 | omap2_init_common_infrastructure(); |
282 | omap2_init_common_devices(NULL, NULL); | 282 | omap2_init_common_devices(NULL, NULL); |
283 | omap_init_irq(); | ||
284 | } | 283 | } |
285 | 284 | ||
286 | static void __init apollon_led_init(void) | 285 | static void __init apollon_led_init(void) |
@@ -355,9 +354,10 @@ static void __init omap_apollon_map_io(void) | |||
355 | MACHINE_START(OMAP_APOLLON, "OMAP24xx Apollon") | 354 | MACHINE_START(OMAP_APOLLON, "OMAP24xx Apollon") |
356 | /* Maintainer: Kyungmin Park <kyungmin.park@samsung.com> */ | 355 | /* Maintainer: Kyungmin Park <kyungmin.park@samsung.com> */ |
357 | .boot_params = 0x80000100, | 356 | .boot_params = 0x80000100, |
358 | .map_io = omap_apollon_map_io, | ||
359 | .reserve = omap_reserve, | 357 | .reserve = omap_reserve, |
360 | .init_irq = omap_apollon_init_irq, | 358 | .map_io = omap_apollon_map_io, |
359 | .init_early = omap_apollon_init_early, | ||
360 | .init_irq = omap_init_irq, | ||
361 | .init_machine = omap_apollon_init, | 361 | .init_machine = omap_apollon_init, |
362 | .timer = &omap_timer, | 362 | .timer = &omap_timer, |
363 | MACHINE_END | 363 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c index dac141610666..7311824be993 100644 --- a/arch/arm/mach-omap2/board-cm-t35.c +++ b/arch/arm/mach-omap2/board-cm-t35.c | |||
@@ -401,14 +401,6 @@ static struct omap_dss_board_info cm_t35_dss_data = { | |||
401 | .default_device = &cm_t35_dvi_device, | 401 | .default_device = &cm_t35_dvi_device, |
402 | }; | 402 | }; |
403 | 403 | ||
404 | static struct platform_device cm_t35_dss_device = { | ||
405 | .name = "omapdss", | ||
406 | .id = -1, | ||
407 | .dev = { | ||
408 | .platform_data = &cm_t35_dss_data, | ||
409 | }, | ||
410 | }; | ||
411 | |||
412 | static struct omap2_mcspi_device_config tdo24m_mcspi_config = { | 404 | static struct omap2_mcspi_device_config tdo24m_mcspi_config = { |
413 | .turbo_mode = 0, | 405 | .turbo_mode = 0, |
414 | .single_channel = 1, /* 0: slave, 1: master */ | 406 | .single_channel = 1, /* 0: slave, 1: master */ |
@@ -468,7 +460,7 @@ static void __init cm_t35_init_display(void) | |||
468 | msleep(50); | 460 | msleep(50); |
469 | gpio_set_value(lcd_en_gpio, 1); | 461 | gpio_set_value(lcd_en_gpio, 1); |
470 | 462 | ||
471 | err = platform_device_register(&cm_t35_dss_device); | 463 | err = omap_display_init(&cm_t35_dss_data); |
472 | if (err) { | 464 | if (err) { |
473 | pr_err("CM-T35: failed to register DSS device\n"); | 465 | pr_err("CM-T35: failed to register DSS device\n"); |
474 | goto err_dev_reg; | 466 | goto err_dev_reg; |
@@ -495,15 +487,11 @@ static struct regulator_consumer_supply cm_t35_vsim_supply = { | |||
495 | .supply = "vmmc_aux", | 487 | .supply = "vmmc_aux", |
496 | }; | 488 | }; |
497 | 489 | ||
498 | static struct regulator_consumer_supply cm_t35_vdac_supply = { | 490 | static struct regulator_consumer_supply cm_t35_vdac_supply = |
499 | .supply = "vdda_dac", | 491 | REGULATOR_SUPPLY("vdda_dac", "omapdss"); |
500 | .dev = &cm_t35_dss_device.dev, | ||
501 | }; | ||
502 | 492 | ||
503 | static struct regulator_consumer_supply cm_t35_vdvi_supply = { | 493 | static struct regulator_consumer_supply cm_t35_vdvi_supply = |
504 | .supply = "vdvi", | 494 | REGULATOR_SUPPLY("vdvi", "omapdss"); |
505 | .dev = &cm_t35_dss_device.dev, | ||
506 | }; | ||
507 | 495 | ||
508 | /* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */ | 496 | /* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */ |
509 | static struct regulator_init_data cm_t35_vmmc1 = { | 497 | static struct regulator_init_data cm_t35_vmmc1 = { |
@@ -683,7 +671,7 @@ static void __init cm_t35_init_i2c(void) | |||
683 | static struct omap_board_config_kernel cm_t35_config[] __initdata = { | 671 | static struct omap_board_config_kernel cm_t35_config[] __initdata = { |
684 | }; | 672 | }; |
685 | 673 | ||
686 | static void __init cm_t35_init_irq(void) | 674 | static void __init cm_t35_init_early(void) |
687 | { | 675 | { |
688 | omap_board_config = cm_t35_config; | 676 | omap_board_config = cm_t35_config; |
689 | omap_board_config_size = ARRAY_SIZE(cm_t35_config); | 677 | omap_board_config_size = ARRAY_SIZE(cm_t35_config); |
@@ -691,7 +679,6 @@ static void __init cm_t35_init_irq(void) | |||
691 | omap2_init_common_infrastructure(); | 679 | omap2_init_common_infrastructure(); |
692 | omap2_init_common_devices(mt46h32m32lf6_sdrc_params, | 680 | omap2_init_common_devices(mt46h32m32lf6_sdrc_params, |
693 | mt46h32m32lf6_sdrc_params); | 681 | mt46h32m32lf6_sdrc_params); |
694 | omap_init_irq(); | ||
695 | } | 682 | } |
696 | 683 | ||
697 | static struct omap_board_mux board_mux[] __initdata = { | 684 | static struct omap_board_mux board_mux[] __initdata = { |
@@ -815,9 +802,10 @@ static void __init cm_t35_init(void) | |||
815 | 802 | ||
816 | MACHINE_START(CM_T35, "Compulab CM-T35") | 803 | MACHINE_START(CM_T35, "Compulab CM-T35") |
817 | .boot_params = 0x80000100, | 804 | .boot_params = 0x80000100, |
818 | .map_io = omap3_map_io, | ||
819 | .reserve = omap_reserve, | 805 | .reserve = omap_reserve, |
820 | .init_irq = cm_t35_init_irq, | 806 | .map_io = omap3_map_io, |
807 | .init_early = cm_t35_init_early, | ||
808 | .init_irq = omap_init_irq, | ||
821 | .init_machine = cm_t35_init, | 809 | .init_machine = cm_t35_init, |
822 | .timer = &omap_timer, | 810 | .timer = &omap_timer, |
823 | MACHINE_END | 811 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-cm-t3517.c b/arch/arm/mach-omap2/board-cm-t3517.c index 8f9a64d650ee..38bef6d004c9 100644 --- a/arch/arm/mach-omap2/board-cm-t3517.c +++ b/arch/arm/mach-omap2/board-cm-t3517.c | |||
@@ -254,14 +254,13 @@ static inline void cm_t3517_init_nand(void) {} | |||
254 | static struct omap_board_config_kernel cm_t3517_config[] __initdata = { | 254 | static struct omap_board_config_kernel cm_t3517_config[] __initdata = { |
255 | }; | 255 | }; |
256 | 256 | ||
257 | static void __init cm_t3517_init_irq(void) | 257 | static void __init cm_t3517_init_early(void) |
258 | { | 258 | { |
259 | omap_board_config = cm_t3517_config; | 259 | omap_board_config = cm_t3517_config; |
260 | omap_board_config_size = ARRAY_SIZE(cm_t3517_config); | 260 | omap_board_config_size = ARRAY_SIZE(cm_t3517_config); |
261 | 261 | ||
262 | omap2_init_common_infrastructure(); | 262 | omap2_init_common_infrastructure(); |
263 | omap2_init_common_devices(NULL, NULL); | 263 | omap2_init_common_devices(NULL, NULL); |
264 | omap_init_irq(); | ||
265 | } | 264 | } |
266 | 265 | ||
267 | static struct omap_board_mux board_mux[] __initdata = { | 266 | static struct omap_board_mux board_mux[] __initdata = { |
@@ -303,9 +302,10 @@ static void __init cm_t3517_init(void) | |||
303 | 302 | ||
304 | MACHINE_START(CM_T3517, "Compulab CM-T3517") | 303 | MACHINE_START(CM_T3517, "Compulab CM-T3517") |
305 | .boot_params = 0x80000100, | 304 | .boot_params = 0x80000100, |
306 | .map_io = omap3_map_io, | ||
307 | .reserve = omap_reserve, | 305 | .reserve = omap_reserve, |
308 | .init_irq = cm_t3517_init_irq, | 306 | .map_io = omap3_map_io, |
307 | .init_early = cm_t3517_init_early, | ||
308 | .init_irq = omap_init_irq, | ||
309 | .init_machine = cm_t3517_init, | 309 | .init_machine = cm_t3517_init, |
310 | .timer = &omap_timer, | 310 | .timer = &omap_timer, |
311 | MACHINE_END | 311 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c index 9a2a31e011ce..54abdd064364 100644 --- a/arch/arm/mach-omap2/board-devkit8000.c +++ b/arch/arm/mach-omap2/board-devkit8000.c | |||
@@ -195,14 +195,6 @@ static struct omap_dss_board_info devkit8000_dss_data = { | |||
195 | .default_device = &devkit8000_lcd_device, | 195 | .default_device = &devkit8000_lcd_device, |
196 | }; | 196 | }; |
197 | 197 | ||
198 | static struct platform_device devkit8000_dss_device = { | ||
199 | .name = "omapdss", | ||
200 | .id = -1, | ||
201 | .dev = { | ||
202 | .platform_data = &devkit8000_dss_data, | ||
203 | }, | ||
204 | }; | ||
205 | |||
206 | static struct regulator_consumer_supply devkit8000_vdda_dac_supply = | 198 | static struct regulator_consumer_supply devkit8000_vdda_dac_supply = |
207 | REGULATOR_SUPPLY("vdda_dac", "omapdss"); | 199 | REGULATOR_SUPPLY("vdda_dac", "omapdss"); |
208 | 200 | ||
@@ -456,11 +448,15 @@ static struct platform_device keys_gpio = { | |||
456 | }; | 448 | }; |
457 | 449 | ||
458 | 450 | ||
459 | static void __init devkit8000_init_irq(void) | 451 | static void __init devkit8000_init_early(void) |
460 | { | 452 | { |
461 | omap2_init_common_infrastructure(); | 453 | omap2_init_common_infrastructure(); |
462 | omap2_init_common_devices(mt46h32m32lf6_sdrc_params, | 454 | omap2_init_common_devices(mt46h32m32lf6_sdrc_params, |
463 | mt46h32m32lf6_sdrc_params); | 455 | mt46h32m32lf6_sdrc_params); |
456 | } | ||
457 | |||
458 | static void __init devkit8000_init_irq(void) | ||
459 | { | ||
464 | omap_init_irq(); | 460 | omap_init_irq(); |
465 | #ifdef CONFIG_OMAP_32K_TIMER | 461 | #ifdef CONFIG_OMAP_32K_TIMER |
466 | omap2_gp_clockevent_set_gptimer(12); | 462 | omap2_gp_clockevent_set_gptimer(12); |
@@ -575,7 +571,6 @@ static void __init omap_dm9000_init(void) | |||
575 | } | 571 | } |
576 | 572 | ||
577 | static struct platform_device *devkit8000_devices[] __initdata = { | 573 | static struct platform_device *devkit8000_devices[] __initdata = { |
578 | &devkit8000_dss_device, | ||
579 | &leds_gpio, | 574 | &leds_gpio, |
580 | &keys_gpio, | 575 | &keys_gpio, |
581 | &omap_dm9000_dev, | 576 | &omap_dm9000_dev, |
@@ -797,6 +792,7 @@ static void __init devkit8000_init(void) | |||
797 | platform_add_devices(devkit8000_devices, | 792 | platform_add_devices(devkit8000_devices, |
798 | ARRAY_SIZE(devkit8000_devices)); | 793 | ARRAY_SIZE(devkit8000_devices)); |
799 | 794 | ||
795 | omap_display_init(&devkit8000_dss_data); | ||
800 | spi_register_board_info(devkit8000_spi_board_info, | 796 | spi_register_board_info(devkit8000_spi_board_info, |
801 | ARRAY_SIZE(devkit8000_spi_board_info)); | 797 | ARRAY_SIZE(devkit8000_spi_board_info)); |
802 | 798 | ||
@@ -813,8 +809,9 @@ static void __init devkit8000_init(void) | |||
813 | 809 | ||
814 | MACHINE_START(DEVKIT8000, "OMAP3 Devkit8000") | 810 | MACHINE_START(DEVKIT8000, "OMAP3 Devkit8000") |
815 | .boot_params = 0x80000100, | 811 | .boot_params = 0x80000100, |
816 | .map_io = omap3_map_io, | ||
817 | .reserve = omap_reserve, | 812 | .reserve = omap_reserve, |
813 | .map_io = omap3_map_io, | ||
814 | .init_early = devkit8000_init_early, | ||
818 | .init_irq = devkit8000_init_irq, | 815 | .init_irq = devkit8000_init_irq, |
819 | .init_machine = devkit8000_init, | 816 | .init_machine = devkit8000_init, |
820 | .timer = &omap_timer, | 817 | .timer = &omap_timer, |
diff --git a/arch/arm/mach-omap2/board-flash.c b/arch/arm/mach-omap2/board-flash.c index fd38c05bb47f..c32c06828f08 100644 --- a/arch/arm/mach-omap2/board-flash.c +++ b/arch/arm/mach-omap2/board-flash.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * board-sdp-flash.c | 2 | * board-flash.c |
3 | * Modified from mach-omap2/board-3430sdp-flash.c | 3 | * Modified from mach-omap2/board-3430sdp-flash.c |
4 | * | 4 | * |
5 | * Copyright (C) 2009 Nokia Corporation | 5 | * Copyright (C) 2009 Nokia Corporation |
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/platform_device.h> | 16 | #include <linux/platform_device.h> |
17 | #include <linux/mtd/physmap.h> | 17 | #include <linux/mtd/physmap.h> |
18 | #include <linux/io.h> | 18 | #include <linux/io.h> |
19 | #include <plat/irqs.h> | ||
19 | 20 | ||
20 | #include <plat/gpmc.h> | 21 | #include <plat/gpmc.h> |
21 | #include <plat/nand.h> | 22 | #include <plat/nand.h> |
@@ -73,11 +74,11 @@ __init board_nor_init(struct mtd_partition *nor_parts, u8 nr_parts, u8 cs) | |||
73 | + FLASH_SIZE_SDPV1 - 1; | 74 | + FLASH_SIZE_SDPV1 - 1; |
74 | } | 75 | } |
75 | if (err < 0) { | 76 | if (err < 0) { |
76 | printk(KERN_ERR "NOR: Can't request GPMC CS\n"); | 77 | pr_err("NOR: Can't request GPMC CS\n"); |
77 | return; | 78 | return; |
78 | } | 79 | } |
79 | if (platform_device_register(&board_nor_device) < 0) | 80 | if (platform_device_register(&board_nor_device) < 0) |
80 | printk(KERN_ERR "Unable to register NOR device\n"); | 81 | pr_err("Unable to register NOR device\n"); |
81 | } | 82 | } |
82 | 83 | ||
83 | #if defined(CONFIG_MTD_ONENAND_OMAP2) || \ | 84 | #if defined(CONFIG_MTD_ONENAND_OMAP2) || \ |
@@ -139,12 +140,16 @@ static struct omap_nand_platform_data board_nand_data = { | |||
139 | }; | 140 | }; |
140 | 141 | ||
141 | void | 142 | void |
142 | __init board_nand_init(struct mtd_partition *nand_parts, u8 nr_parts, u8 cs) | 143 | __init board_nand_init(struct mtd_partition *nand_parts, |
144 | u8 nr_parts, u8 cs, int nand_type) | ||
143 | { | 145 | { |
144 | board_nand_data.cs = cs; | 146 | board_nand_data.cs = cs; |
145 | board_nand_data.parts = nand_parts; | 147 | board_nand_data.parts = nand_parts; |
146 | board_nand_data.nr_parts = nr_parts; | 148 | board_nand_data.nr_parts = nr_parts; |
149 | board_nand_data.devsize = nand_type; | ||
147 | 150 | ||
151 | board_nand_data.ecc_opt = OMAP_ECC_HAMMING_CODE_DEFAULT; | ||
152 | board_nand_data.gpmc_irq = OMAP_GPMC_IRQ_BASE + cs; | ||
148 | gpmc_nand_init(&board_nand_data); | 153 | gpmc_nand_init(&board_nand_data); |
149 | } | 154 | } |
150 | #else | 155 | #else |
@@ -189,12 +194,12 @@ unmap: | |||
189 | } | 194 | } |
190 | 195 | ||
191 | /** | 196 | /** |
192 | * sdp3430_flash_init - Identify devices connected to GPMC and register. | 197 | * board_flash_init - Identify devices connected to GPMC and register. |
193 | * | 198 | * |
194 | * @return - void. | 199 | * @return - void. |
195 | */ | 200 | */ |
196 | void board_flash_init(struct flash_partitions partition_info[], | 201 | void board_flash_init(struct flash_partitions partition_info[], |
197 | char chip_sel_board[][GPMC_CS_NUM]) | 202 | char chip_sel_board[][GPMC_CS_NUM], int nand_type) |
198 | { | 203 | { |
199 | u8 cs = 0; | 204 | u8 cs = 0; |
200 | u8 norcs = GPMC_CS_NUM + 1; | 205 | u8 norcs = GPMC_CS_NUM + 1; |
@@ -208,7 +213,7 @@ void board_flash_init(struct flash_partitions partition_info[], | |||
208 | */ | 213 | */ |
209 | idx = get_gpmc0_type(); | 214 | idx = get_gpmc0_type(); |
210 | if (idx >= MAX_SUPPORTED_GPMC_CONFIG) { | 215 | if (idx >= MAX_SUPPORTED_GPMC_CONFIG) { |
211 | printk(KERN_ERR "%s: Invalid chip select: %d\n", __func__, cs); | 216 | pr_err("%s: Invalid chip select: %d\n", __func__, cs); |
212 | return; | 217 | return; |
213 | } | 218 | } |
214 | config_sel = (unsigned char *)(chip_sel_board[idx]); | 219 | config_sel = (unsigned char *)(chip_sel_board[idx]); |
@@ -232,23 +237,20 @@ void board_flash_init(struct flash_partitions partition_info[], | |||
232 | } | 237 | } |
233 | 238 | ||
234 | if (norcs > GPMC_CS_NUM) | 239 | if (norcs > GPMC_CS_NUM) |
235 | printk(KERN_INFO "NOR: Unable to find configuration " | 240 | pr_err("NOR: Unable to find configuration in GPMC\n"); |
236 | "in GPMC\n"); | ||
237 | else | 241 | else |
238 | board_nor_init(partition_info[0].parts, | 242 | board_nor_init(partition_info[0].parts, |
239 | partition_info[0].nr_parts, norcs); | 243 | partition_info[0].nr_parts, norcs); |
240 | 244 | ||
241 | if (onenandcs > GPMC_CS_NUM) | 245 | if (onenandcs > GPMC_CS_NUM) |
242 | printk(KERN_INFO "OneNAND: Unable to find configuration " | 246 | pr_err("OneNAND: Unable to find configuration in GPMC\n"); |
243 | "in GPMC\n"); | ||
244 | else | 247 | else |
245 | board_onenand_init(partition_info[1].parts, | 248 | board_onenand_init(partition_info[1].parts, |
246 | partition_info[1].nr_parts, onenandcs); | 249 | partition_info[1].nr_parts, onenandcs); |
247 | 250 | ||
248 | if (nandcs > GPMC_CS_NUM) | 251 | if (nandcs > GPMC_CS_NUM) |
249 | printk(KERN_INFO "NAND: Unable to find configuration " | 252 | pr_err("NAND: Unable to find configuration in GPMC\n"); |
250 | "in GPMC\n"); | ||
251 | else | 253 | else |
252 | board_nand_init(partition_info[2].parts, | 254 | board_nand_init(partition_info[2].parts, |
253 | partition_info[2].nr_parts, nandcs); | 255 | partition_info[2].nr_parts, nandcs, nand_type); |
254 | } | 256 | } |
diff --git a/arch/arm/mach-omap2/board-flash.h b/arch/arm/mach-omap2/board-flash.h index 69befe00dd2f..c240a3f8d163 100644 --- a/arch/arm/mach-omap2/board-flash.h +++ b/arch/arm/mach-omap2/board-flash.h | |||
@@ -25,6 +25,6 @@ struct flash_partitions { | |||
25 | }; | 25 | }; |
26 | 26 | ||
27 | extern void board_flash_init(struct flash_partitions [], | 27 | extern void board_flash_init(struct flash_partitions [], |
28 | char chip_sel[][GPMC_CS_NUM]); | 28 | char chip_sel[][GPMC_CS_NUM], int nand_type); |
29 | extern void board_nand_init(struct mtd_partition *nand_parts, | 29 | extern void board_nand_init(struct mtd_partition *nand_parts, |
30 | u8 nr_parts, u8 cs); | 30 | u8 nr_parts, u8 cs, int nand_type); |
diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c index 0e3d81e09f89..682da9251db6 100644 --- a/arch/arm/mach-omap2/board-generic.c +++ b/arch/arm/mach-omap2/board-generic.c | |||
@@ -33,13 +33,12 @@ | |||
33 | static struct omap_board_config_kernel generic_config[] = { | 33 | static struct omap_board_config_kernel generic_config[] = { |
34 | }; | 34 | }; |
35 | 35 | ||
36 | static void __init omap_generic_init_irq(void) | 36 | static void __init omap_generic_init_early(void) |
37 | { | 37 | { |
38 | omap_board_config = generic_config; | 38 | omap_board_config = generic_config; |
39 | omap_board_config_size = ARRAY_SIZE(generic_config); | 39 | omap_board_config_size = ARRAY_SIZE(generic_config); |
40 | omap2_init_common_infrastructure(); | 40 | omap2_init_common_infrastructure(); |
41 | omap2_init_common_devices(NULL, NULL); | 41 | omap2_init_common_devices(NULL, NULL); |
42 | omap_init_irq(); | ||
43 | } | 42 | } |
44 | 43 | ||
45 | static void __init omap_generic_init(void) | 44 | static void __init omap_generic_init(void) |
@@ -68,9 +67,10 @@ static void __init omap_generic_map_io(void) | |||
68 | MACHINE_START(OMAP_GENERIC, "Generic OMAP24xx") | 67 | MACHINE_START(OMAP_GENERIC, "Generic OMAP24xx") |
69 | /* Maintainer: Paul Mundt <paul.mundt@nokia.com> */ | 68 | /* Maintainer: Paul Mundt <paul.mundt@nokia.com> */ |
70 | .boot_params = 0x80000100, | 69 | .boot_params = 0x80000100, |
71 | .map_io = omap_generic_map_io, | ||
72 | .reserve = omap_reserve, | 70 | .reserve = omap_reserve, |
73 | .init_irq = omap_generic_init_irq, | 71 | .map_io = omap_generic_map_io, |
72 | .init_early = omap_generic_init_early, | ||
73 | .init_irq = omap_init_irq, | ||
74 | .init_machine = omap_generic_init, | 74 | .init_machine = omap_generic_init, |
75 | .timer = &omap_timer, | 75 | .timer = &omap_timer, |
76 | MACHINE_END | 76 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-h4.c b/arch/arm/mach-omap2/board-h4.c index 25cc9dad4b02..f6a3872f72fa 100644 --- a/arch/arm/mach-omap2/board-h4.c +++ b/arch/arm/mach-omap2/board-h4.c | |||
@@ -290,12 +290,16 @@ static struct omap_board_config_kernel h4_config[] __initdata = { | |||
290 | { OMAP_TAG_LCD, &h4_lcd_config }, | 290 | { OMAP_TAG_LCD, &h4_lcd_config }, |
291 | }; | 291 | }; |
292 | 292 | ||
293 | static void __init omap_h4_init_irq(void) | 293 | static void __init omap_h4_init_early(void) |
294 | { | 294 | { |
295 | omap_board_config = h4_config; | 295 | omap_board_config = h4_config; |
296 | omap_board_config_size = ARRAY_SIZE(h4_config); | 296 | omap_board_config_size = ARRAY_SIZE(h4_config); |
297 | omap2_init_common_infrastructure(); | 297 | omap2_init_common_infrastructure(); |
298 | omap2_init_common_devices(NULL, NULL); | 298 | omap2_init_common_devices(NULL, NULL); |
299 | } | ||
300 | |||
301 | static void __init omap_h4_init_irq(void) | ||
302 | { | ||
299 | omap_init_irq(); | 303 | omap_init_irq(); |
300 | h4_init_flash(); | 304 | h4_init_flash(); |
301 | } | 305 | } |
@@ -378,8 +382,9 @@ static void __init omap_h4_map_io(void) | |||
378 | MACHINE_START(OMAP_H4, "OMAP2420 H4 board") | 382 | MACHINE_START(OMAP_H4, "OMAP2420 H4 board") |
379 | /* Maintainer: Paul Mundt <paul.mundt@nokia.com> */ | 383 | /* Maintainer: Paul Mundt <paul.mundt@nokia.com> */ |
380 | .boot_params = 0x80000100, | 384 | .boot_params = 0x80000100, |
381 | .map_io = omap_h4_map_io, | ||
382 | .reserve = omap_reserve, | 385 | .reserve = omap_reserve, |
386 | .map_io = omap_h4_map_io, | ||
387 | .init_early = omap_h4_init_early, | ||
383 | .init_irq = omap_h4_init_irq, | 388 | .init_irq = omap_h4_init_irq, |
384 | .init_machine = omap_h4_init, | 389 | .init_machine = omap_h4_init, |
385 | .timer = &omap_timer, | 390 | .timer = &omap_timer, |
diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c index 3be85a1f55f4..54e6318f4a8f 100644 --- a/arch/arm/mach-omap2/board-igep0020.c +++ b/arch/arm/mach-omap2/board-igep0020.c | |||
@@ -485,18 +485,8 @@ static struct omap_dss_board_info igep2_dss_data = { | |||
485 | .default_device = &igep2_dvi_device, | 485 | .default_device = &igep2_dvi_device, |
486 | }; | 486 | }; |
487 | 487 | ||
488 | static struct platform_device igep2_dss_device = { | 488 | static struct regulator_consumer_supply igep2_vpll2_supply = |
489 | .name = "omapdss", | 489 | REGULATOR_SUPPLY("vdds_dsi", "omapdss"); |
490 | .id = -1, | ||
491 | .dev = { | ||
492 | .platform_data = &igep2_dss_data, | ||
493 | }, | ||
494 | }; | ||
495 | |||
496 | static struct regulator_consumer_supply igep2_vpll2_supply = { | ||
497 | .supply = "vdds_dsi", | ||
498 | .dev = &igep2_dss_device.dev, | ||
499 | }; | ||
500 | 490 | ||
501 | static struct regulator_init_data igep2_vpll2 = { | 491 | static struct regulator_init_data igep2_vpll2 = { |
502 | .constraints = { | 492 | .constraints = { |
@@ -521,16 +511,14 @@ static void __init igep2_display_init(void) | |||
521 | } | 511 | } |
522 | 512 | ||
523 | static struct platform_device *igep2_devices[] __initdata = { | 513 | static struct platform_device *igep2_devices[] __initdata = { |
524 | &igep2_dss_device, | ||
525 | &igep2_vwlan_device, | 514 | &igep2_vwlan_device, |
526 | }; | 515 | }; |
527 | 516 | ||
528 | static void __init igep2_init_irq(void) | 517 | static void __init igep2_init_early(void) |
529 | { | 518 | { |
530 | omap2_init_common_infrastructure(); | 519 | omap2_init_common_infrastructure(); |
531 | omap2_init_common_devices(m65kxxxxam_sdrc_params, | 520 | omap2_init_common_devices(m65kxxxxam_sdrc_params, |
532 | m65kxxxxam_sdrc_params); | 521 | m65kxxxxam_sdrc_params); |
533 | omap_init_irq(); | ||
534 | } | 522 | } |
535 | 523 | ||
536 | static struct twl4030_codec_audio_data igep2_audio_data = { | 524 | static struct twl4030_codec_audio_data igep2_audio_data = { |
@@ -697,6 +685,7 @@ static void __init igep2_init(void) | |||
697 | /* Register I2C busses and drivers */ | 685 | /* Register I2C busses and drivers */ |
698 | igep2_i2c_init(); | 686 | igep2_i2c_init(); |
699 | platform_add_devices(igep2_devices, ARRAY_SIZE(igep2_devices)); | 687 | platform_add_devices(igep2_devices, ARRAY_SIZE(igep2_devices)); |
688 | omap_display_init(&igep2_dss_data); | ||
700 | omap_serial_init(); | 689 | omap_serial_init(); |
701 | usb_musb_init(&musb_board_data); | 690 | usb_musb_init(&musb_board_data); |
702 | usb_ehci_init(&ehci_pdata); | 691 | usb_ehci_init(&ehci_pdata); |
@@ -716,9 +705,10 @@ static void __init igep2_init(void) | |||
716 | 705 | ||
717 | MACHINE_START(IGEP0020, "IGEP v2 board") | 706 | MACHINE_START(IGEP0020, "IGEP v2 board") |
718 | .boot_params = 0x80000100, | 707 | .boot_params = 0x80000100, |
719 | .map_io = omap3_map_io, | ||
720 | .reserve = omap_reserve, | 708 | .reserve = omap_reserve, |
721 | .init_irq = igep2_init_irq, | 709 | .map_io = omap3_map_io, |
710 | .init_early = igep2_init_early, | ||
711 | .init_irq = omap_init_irq, | ||
722 | .init_machine = igep2_init, | 712 | .init_machine = igep2_init, |
723 | .timer = &omap_timer, | 713 | .timer = &omap_timer, |
724 | MACHINE_END | 714 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-igep0030.c b/arch/arm/mach-omap2/board-igep0030.c index 4dc62a9b9cb2..d75028e48f5d 100644 --- a/arch/arm/mach-omap2/board-igep0030.c +++ b/arch/arm/mach-omap2/board-igep0030.c | |||
@@ -331,12 +331,11 @@ static struct platform_device *igep3_devices[] __initdata = { | |||
331 | &igep3_vwlan_device, | 331 | &igep3_vwlan_device, |
332 | }; | 332 | }; |
333 | 333 | ||
334 | static void __init igep3_init_irq(void) | 334 | static void __init igep3_init_early(void) |
335 | { | 335 | { |
336 | omap2_init_common_infrastructure(); | 336 | omap2_init_common_infrastructure(); |
337 | omap2_init_common_devices(m65kxxxxam_sdrc_params, | 337 | omap2_init_common_devices(m65kxxxxam_sdrc_params, |
338 | m65kxxxxam_sdrc_params); | 338 | m65kxxxxam_sdrc_params); |
339 | omap_init_irq(); | ||
340 | } | 339 | } |
341 | 340 | ||
342 | static struct twl4030_platform_data igep3_twl4030_pdata = { | 341 | static struct twl4030_platform_data igep3_twl4030_pdata = { |
@@ -452,7 +451,8 @@ MACHINE_START(IGEP0030, "IGEP OMAP3 module") | |||
452 | .boot_params = 0x80000100, | 451 | .boot_params = 0x80000100, |
453 | .reserve = omap_reserve, | 452 | .reserve = omap_reserve, |
454 | .map_io = omap3_map_io, | 453 | .map_io = omap3_map_io, |
455 | .init_irq = igep3_init_irq, | 454 | .init_early = igep3_init_early, |
455 | .init_irq = omap_init_irq, | ||
456 | .init_machine = igep3_init, | 456 | .init_machine = igep3_init, |
457 | .timer = &omap_timer, | 457 | .timer = &omap_timer, |
458 | MACHINE_END | 458 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c index e5dc74875f9d..a3fae5697a72 100644 --- a/arch/arm/mach-omap2/board-ldp.c +++ b/arch/arm/mach-omap2/board-ldp.c | |||
@@ -288,13 +288,12 @@ static struct omap_board_config_kernel ldp_config[] __initdata = { | |||
288 | { OMAP_TAG_LCD, &ldp_lcd_config }, | 288 | { OMAP_TAG_LCD, &ldp_lcd_config }, |
289 | }; | 289 | }; |
290 | 290 | ||
291 | static void __init omap_ldp_init_irq(void) | 291 | static void __init omap_ldp_init_early(void) |
292 | { | 292 | { |
293 | omap_board_config = ldp_config; | 293 | omap_board_config = ldp_config; |
294 | omap_board_config_size = ARRAY_SIZE(ldp_config); | 294 | omap_board_config_size = ARRAY_SIZE(ldp_config); |
295 | omap2_init_common_infrastructure(); | 295 | omap2_init_common_infrastructure(); |
296 | omap2_init_common_devices(NULL, NULL); | 296 | omap2_init_common_devices(NULL, NULL); |
297 | omap_init_irq(); | ||
298 | } | 297 | } |
299 | 298 | ||
300 | static struct twl4030_usb_data ldp_usb_data = { | 299 | static struct twl4030_usb_data ldp_usb_data = { |
@@ -434,7 +433,7 @@ static void __init omap_ldp_init(void) | |||
434 | omap_serial_init(); | 433 | omap_serial_init(); |
435 | usb_musb_init(&musb_board_data); | 434 | usb_musb_init(&musb_board_data); |
436 | board_nand_init(ldp_nand_partitions, | 435 | board_nand_init(ldp_nand_partitions, |
437 | ARRAY_SIZE(ldp_nand_partitions), ZOOM_NAND_CS); | 436 | ARRAY_SIZE(ldp_nand_partitions), ZOOM_NAND_CS, 0); |
438 | 437 | ||
439 | omap2_hsmmc_init(mmc); | 438 | omap2_hsmmc_init(mmc); |
440 | /* link regulators to MMC adapters */ | 439 | /* link regulators to MMC adapters */ |
@@ -443,9 +442,10 @@ static void __init omap_ldp_init(void) | |||
443 | 442 | ||
444 | MACHINE_START(OMAP_LDP, "OMAP LDP board") | 443 | MACHINE_START(OMAP_LDP, "OMAP LDP board") |
445 | .boot_params = 0x80000100, | 444 | .boot_params = 0x80000100, |
446 | .map_io = omap3_map_io, | ||
447 | .reserve = omap_reserve, | 445 | .reserve = omap_reserve, |
448 | .init_irq = omap_ldp_init_irq, | 446 | .map_io = omap3_map_io, |
447 | .init_early = omap_ldp_init_early, | ||
448 | .init_irq = omap_init_irq, | ||
449 | .init_machine = omap_ldp_init, | 449 | .init_machine = omap_ldp_init, |
450 | .timer = &omap_timer, | 450 | .timer = &omap_timer, |
451 | MACHINE_END | 451 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c index f396756872b7..b36cbd21e2d0 100644 --- a/arch/arm/mach-omap2/board-n8x0.c +++ b/arch/arm/mach-omap2/board-n8x0.c | |||
@@ -628,11 +628,10 @@ static void __init n8x0_map_io(void) | |||
628 | omap242x_map_common_io(); | 628 | omap242x_map_common_io(); |
629 | } | 629 | } |
630 | 630 | ||
631 | static void __init n8x0_init_irq(void) | 631 | static void __init n8x0_init_early(void) |
632 | { | 632 | { |
633 | omap2_init_common_infrastructure(); | 633 | omap2_init_common_infrastructure(); |
634 | omap2_init_common_devices(NULL, NULL); | 634 | omap2_init_common_devices(NULL, NULL); |
635 | omap_init_irq(); | ||
636 | } | 635 | } |
637 | 636 | ||
638 | #ifdef CONFIG_OMAP_MUX | 637 | #ifdef CONFIG_OMAP_MUX |
@@ -703,27 +702,30 @@ static void __init n8x0_init_machine(void) | |||
703 | 702 | ||
704 | MACHINE_START(NOKIA_N800, "Nokia N800") | 703 | MACHINE_START(NOKIA_N800, "Nokia N800") |
705 | .boot_params = 0x80000100, | 704 | .boot_params = 0x80000100, |
706 | .map_io = n8x0_map_io, | ||
707 | .reserve = omap_reserve, | 705 | .reserve = omap_reserve, |
708 | .init_irq = n8x0_init_irq, | 706 | .map_io = n8x0_map_io, |
707 | .init_early = n8x0_init_early, | ||
708 | .init_irq = omap_init_irq, | ||
709 | .init_machine = n8x0_init_machine, | 709 | .init_machine = n8x0_init_machine, |
710 | .timer = &omap_timer, | 710 | .timer = &omap_timer, |
711 | MACHINE_END | 711 | MACHINE_END |
712 | 712 | ||
713 | MACHINE_START(NOKIA_N810, "Nokia N810") | 713 | MACHINE_START(NOKIA_N810, "Nokia N810") |
714 | .boot_params = 0x80000100, | 714 | .boot_params = 0x80000100, |
715 | .map_io = n8x0_map_io, | ||
716 | .reserve = omap_reserve, | 715 | .reserve = omap_reserve, |
717 | .init_irq = n8x0_init_irq, | 716 | .map_io = n8x0_map_io, |
717 | .init_early = n8x0_init_early, | ||
718 | .init_irq = omap_init_irq, | ||
718 | .init_machine = n8x0_init_machine, | 719 | .init_machine = n8x0_init_machine, |
719 | .timer = &omap_timer, | 720 | .timer = &omap_timer, |
720 | MACHINE_END | 721 | MACHINE_END |
721 | 722 | ||
722 | MACHINE_START(NOKIA_N810_WIMAX, "Nokia N810 WiMAX") | 723 | MACHINE_START(NOKIA_N810_WIMAX, "Nokia N810 WiMAX") |
723 | .boot_params = 0x80000100, | 724 | .boot_params = 0x80000100, |
724 | .map_io = n8x0_map_io, | ||
725 | .reserve = omap_reserve, | 725 | .reserve = omap_reserve, |
726 | .init_irq = n8x0_init_irq, | 726 | .map_io = n8x0_map_io, |
727 | .init_early = n8x0_init_early, | ||
728 | .init_irq = omap_init_irq, | ||
727 | .init_machine = n8x0_init_machine, | 729 | .init_machine = n8x0_init_machine, |
728 | .timer = &omap_timer, | 730 | .timer = &omap_timer, |
729 | MACHINE_END | 731 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c index 46d814ab5656..a1faea3b7764 100644 --- a/arch/arm/mach-omap2/board-omap3beagle.c +++ b/arch/arm/mach-omap2/board-omap3beagle.c | |||
@@ -228,14 +228,6 @@ static struct omap_dss_board_info beagle_dss_data = { | |||
228 | .default_device = &beagle_dvi_device, | 228 | .default_device = &beagle_dvi_device, |
229 | }; | 229 | }; |
230 | 230 | ||
231 | static struct platform_device beagle_dss_device = { | ||
232 | .name = "omapdss", | ||
233 | .id = -1, | ||
234 | .dev = { | ||
235 | .platform_data = &beagle_dss_data, | ||
236 | }, | ||
237 | }; | ||
238 | |||
239 | static struct regulator_consumer_supply beagle_vdac_supply = | 231 | static struct regulator_consumer_supply beagle_vdac_supply = |
240 | REGULATOR_SUPPLY("vdda_dac", "omapdss"); | 232 | REGULATOR_SUPPLY("vdda_dac", "omapdss"); |
241 | 233 | ||
@@ -536,11 +528,15 @@ static struct platform_device keys_gpio = { | |||
536 | }, | 528 | }, |
537 | }; | 529 | }; |
538 | 530 | ||
539 | static void __init omap3_beagle_init_irq(void) | 531 | static void __init omap3_beagle_init_early(void) |
540 | { | 532 | { |
541 | omap2_init_common_infrastructure(); | 533 | omap2_init_common_infrastructure(); |
542 | omap2_init_common_devices(mt46h32m32lf6_sdrc_params, | 534 | omap2_init_common_devices(mt46h32m32lf6_sdrc_params, |
543 | mt46h32m32lf6_sdrc_params); | 535 | mt46h32m32lf6_sdrc_params); |
536 | } | ||
537 | |||
538 | static void __init omap3_beagle_init_irq(void) | ||
539 | { | ||
544 | omap_init_irq(); | 540 | omap_init_irq(); |
545 | #ifdef CONFIG_OMAP_32K_TIMER | 541 | #ifdef CONFIG_OMAP_32K_TIMER |
546 | omap2_gp_clockevent_set_gptimer(12); | 542 | omap2_gp_clockevent_set_gptimer(12); |
@@ -550,7 +546,6 @@ static void __init omap3_beagle_init_irq(void) | |||
550 | static struct platform_device *omap3_beagle_devices[] __initdata = { | 546 | static struct platform_device *omap3_beagle_devices[] __initdata = { |
551 | &leds_gpio, | 547 | &leds_gpio, |
552 | &keys_gpio, | 548 | &keys_gpio, |
553 | &beagle_dss_device, | ||
554 | }; | 549 | }; |
555 | 550 | ||
556 | static void __init omap3beagle_flash_init(void) | 551 | static void __init omap3beagle_flash_init(void) |
@@ -617,6 +612,7 @@ static void __init omap3_beagle_init(void) | |||
617 | omap3_beagle_i2c_init(); | 612 | omap3_beagle_i2c_init(); |
618 | platform_add_devices(omap3_beagle_devices, | 613 | platform_add_devices(omap3_beagle_devices, |
619 | ARRAY_SIZE(omap3_beagle_devices)); | 614 | ARRAY_SIZE(omap3_beagle_devices)); |
615 | omap_display_init(&beagle_dss_data); | ||
620 | omap_serial_init(); | 616 | omap_serial_init(); |
621 | 617 | ||
622 | omap_mux_init_gpio(170, OMAP_PIN_INPUT); | 618 | omap_mux_init_gpio(170, OMAP_PIN_INPUT); |
@@ -638,8 +634,9 @@ static void __init omap3_beagle_init(void) | |||
638 | MACHINE_START(OMAP3_BEAGLE, "OMAP3 Beagle Board") | 634 | MACHINE_START(OMAP3_BEAGLE, "OMAP3 Beagle Board") |
639 | /* Maintainer: Syed Mohammed Khasim - http://beagleboard.org */ | 635 | /* Maintainer: Syed Mohammed Khasim - http://beagleboard.org */ |
640 | .boot_params = 0x80000100, | 636 | .boot_params = 0x80000100, |
641 | .map_io = omap3_map_io, | ||
642 | .reserve = omap_reserve, | 637 | .reserve = omap_reserve, |
638 | .map_io = omap3_map_io, | ||
639 | .init_early = omap3_beagle_init_early, | ||
643 | .init_irq = omap3_beagle_init_irq, | 640 | .init_irq = omap3_beagle_init_irq, |
644 | .init_machine = omap3_beagle_init, | 641 | .init_machine = omap3_beagle_init, |
645 | .timer = &omap_timer, | 642 | .timer = &omap_timer, |
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c index 323c3809ce39..7341f966bf1a 100644 --- a/arch/arm/mach-omap2/board-omap3evm.c +++ b/arch/arm/mach-omap2/board-omap3evm.c | |||
@@ -30,6 +30,8 @@ | |||
30 | #include <linux/usb/otg.h> | 30 | #include <linux/usb/otg.h> |
31 | #include <linux/smsc911x.h> | 31 | #include <linux/smsc911x.h> |
32 | 32 | ||
33 | #include <linux/wl12xx.h> | ||
34 | #include <linux/regulator/fixed.h> | ||
33 | #include <linux/regulator/machine.h> | 35 | #include <linux/regulator/machine.h> |
34 | #include <linux/mmc/host.h> | 36 | #include <linux/mmc/host.h> |
35 | 37 | ||
@@ -58,6 +60,13 @@ | |||
58 | #define OMAP3EVM_ETHR_ID_REV 0x50 | 60 | #define OMAP3EVM_ETHR_ID_REV 0x50 |
59 | #define OMAP3EVM_ETHR_GPIO_IRQ 176 | 61 | #define OMAP3EVM_ETHR_GPIO_IRQ 176 |
60 | #define OMAP3EVM_SMSC911X_CS 5 | 62 | #define OMAP3EVM_SMSC911X_CS 5 |
63 | /* | ||
64 | * Eth Reset signal | ||
65 | * 64 = Generation 1 (<=RevD) | ||
66 | * 7 = Generation 2 (>=RevE) | ||
67 | */ | ||
68 | #define OMAP3EVM_GEN1_ETHR_GPIO_RST 64 | ||
69 | #define OMAP3EVM_GEN2_ETHR_GPIO_RST 7 | ||
61 | 70 | ||
62 | static u8 omap3_evm_version; | 71 | static u8 omap3_evm_version; |
63 | 72 | ||
@@ -124,10 +133,15 @@ static struct platform_device omap3evm_smsc911x_device = { | |||
124 | 133 | ||
125 | static inline void __init omap3evm_init_smsc911x(void) | 134 | static inline void __init omap3evm_init_smsc911x(void) |
126 | { | 135 | { |
127 | int eth_cs; | 136 | int eth_cs, eth_rst; |
128 | struct clk *l3ck; | 137 | struct clk *l3ck; |
129 | unsigned int rate; | 138 | unsigned int rate; |
130 | 139 | ||
140 | if (get_omap3_evm_rev() == OMAP3EVM_BOARD_GEN_1) | ||
141 | eth_rst = OMAP3EVM_GEN1_ETHR_GPIO_RST; | ||
142 | else | ||
143 | eth_rst = OMAP3EVM_GEN2_ETHR_GPIO_RST; | ||
144 | |||
131 | eth_cs = OMAP3EVM_SMSC911X_CS; | 145 | eth_cs = OMAP3EVM_SMSC911X_CS; |
132 | 146 | ||
133 | l3ck = clk_get(NULL, "l3_ck"); | 147 | l3ck = clk_get(NULL, "l3_ck"); |
@@ -136,6 +150,27 @@ static inline void __init omap3evm_init_smsc911x(void) | |||
136 | else | 150 | else |
137 | rate = clk_get_rate(l3ck); | 151 | rate = clk_get_rate(l3ck); |
138 | 152 | ||
153 | /* Configure ethernet controller reset gpio */ | ||
154 | if (cpu_is_omap3430()) { | ||
155 | if (gpio_request(eth_rst, "SMSC911x gpio") < 0) { | ||
156 | pr_err(KERN_ERR "Failed to request %d for smsc911x\n", | ||
157 | eth_rst); | ||
158 | return; | ||
159 | } | ||
160 | |||
161 | if (gpio_direction_output(eth_rst, 1) < 0) { | ||
162 | pr_err(KERN_ERR "Failed to set direction of %d for" \ | ||
163 | " smsc911x\n", eth_rst); | ||
164 | return; | ||
165 | } | ||
166 | /* reset pulse to ethernet controller*/ | ||
167 | usleep_range(150, 220); | ||
168 | gpio_set_value(eth_rst, 0); | ||
169 | usleep_range(150, 220); | ||
170 | gpio_set_value(eth_rst, 1); | ||
171 | usleep_range(1, 2); | ||
172 | } | ||
173 | |||
139 | if (gpio_request(OMAP3EVM_ETHR_GPIO_IRQ, "SMSC911x irq") < 0) { | 174 | if (gpio_request(OMAP3EVM_ETHR_GPIO_IRQ, "SMSC911x irq") < 0) { |
140 | printk(KERN_ERR "Failed to request GPIO%d for smsc911x IRQ\n", | 175 | printk(KERN_ERR "Failed to request GPIO%d for smsc911x IRQ\n", |
141 | OMAP3EVM_ETHR_GPIO_IRQ); | 176 | OMAP3EVM_ETHR_GPIO_IRQ); |
@@ -235,9 +270,9 @@ static int omap3_evm_enable_lcd(struct omap_dss_device *dssdev) | |||
235 | gpio_set_value(OMAP3EVM_LCD_PANEL_ENVDD, 0); | 270 | gpio_set_value(OMAP3EVM_LCD_PANEL_ENVDD, 0); |
236 | 271 | ||
237 | if (get_omap3_evm_rev() >= OMAP3EVM_BOARD_GEN_2) | 272 | if (get_omap3_evm_rev() >= OMAP3EVM_BOARD_GEN_2) |
238 | gpio_set_value(OMAP3EVM_LCD_PANEL_BKLIGHT_GPIO, 0); | 273 | gpio_set_value_cansleep(OMAP3EVM_LCD_PANEL_BKLIGHT_GPIO, 0); |
239 | else | 274 | else |
240 | gpio_set_value(OMAP3EVM_LCD_PANEL_BKLIGHT_GPIO, 1); | 275 | gpio_set_value_cansleep(OMAP3EVM_LCD_PANEL_BKLIGHT_GPIO, 1); |
241 | 276 | ||
242 | lcd_enabled = 1; | 277 | lcd_enabled = 1; |
243 | return 0; | 278 | return 0; |
@@ -248,9 +283,9 @@ static void omap3_evm_disable_lcd(struct omap_dss_device *dssdev) | |||
248 | gpio_set_value(OMAP3EVM_LCD_PANEL_ENVDD, 1); | 283 | gpio_set_value(OMAP3EVM_LCD_PANEL_ENVDD, 1); |
249 | 284 | ||
250 | if (get_omap3_evm_rev() >= OMAP3EVM_BOARD_GEN_2) | 285 | if (get_omap3_evm_rev() >= OMAP3EVM_BOARD_GEN_2) |
251 | gpio_set_value(OMAP3EVM_LCD_PANEL_BKLIGHT_GPIO, 1); | 286 | gpio_set_value_cansleep(OMAP3EVM_LCD_PANEL_BKLIGHT_GPIO, 1); |
252 | else | 287 | else |
253 | gpio_set_value(OMAP3EVM_LCD_PANEL_BKLIGHT_GPIO, 0); | 288 | gpio_set_value_cansleep(OMAP3EVM_LCD_PANEL_BKLIGHT_GPIO, 0); |
254 | 289 | ||
255 | lcd_enabled = 0; | 290 | lcd_enabled = 0; |
256 | } | 291 | } |
@@ -289,7 +324,7 @@ static int omap3_evm_enable_dvi(struct omap_dss_device *dssdev) | |||
289 | return -EINVAL; | 324 | return -EINVAL; |
290 | } | 325 | } |
291 | 326 | ||
292 | gpio_set_value(OMAP3EVM_DVI_PANEL_EN_GPIO, 1); | 327 | gpio_set_value_cansleep(OMAP3EVM_DVI_PANEL_EN_GPIO, 1); |
293 | 328 | ||
294 | dvi_enabled = 1; | 329 | dvi_enabled = 1; |
295 | return 0; | 330 | return 0; |
@@ -297,7 +332,7 @@ static int omap3_evm_enable_dvi(struct omap_dss_device *dssdev) | |||
297 | 332 | ||
298 | static void omap3_evm_disable_dvi(struct omap_dss_device *dssdev) | 333 | static void omap3_evm_disable_dvi(struct omap_dss_device *dssdev) |
299 | { | 334 | { |
300 | gpio_set_value(OMAP3EVM_DVI_PANEL_EN_GPIO, 0); | 335 | gpio_set_value_cansleep(OMAP3EVM_DVI_PANEL_EN_GPIO, 0); |
301 | 336 | ||
302 | dvi_enabled = 0; | 337 | dvi_enabled = 0; |
303 | } | 338 | } |
@@ -328,14 +363,6 @@ static struct omap_dss_board_info omap3_evm_dss_data = { | |||
328 | .default_device = &omap3_evm_lcd_device, | 363 | .default_device = &omap3_evm_lcd_device, |
329 | }; | 364 | }; |
330 | 365 | ||
331 | static struct platform_device omap3_evm_dss_device = { | ||
332 | .name = "omapdss", | ||
333 | .id = -1, | ||
334 | .dev = { | ||
335 | .platform_data = &omap3_evm_dss_data, | ||
336 | }, | ||
337 | }; | ||
338 | |||
339 | static struct regulator_consumer_supply omap3evm_vmmc1_supply = { | 366 | static struct regulator_consumer_supply omap3evm_vmmc1_supply = { |
340 | .supply = "vmmc", | 367 | .supply = "vmmc", |
341 | }; | 368 | }; |
@@ -381,6 +408,16 @@ static struct omap2_hsmmc_info mmc[] = { | |||
381 | .gpio_cd = -EINVAL, | 408 | .gpio_cd = -EINVAL, |
382 | .gpio_wp = 63, | 409 | .gpio_wp = 63, |
383 | }, | 410 | }, |
411 | #ifdef CONFIG_WL12XX_PLATFORM_DATA | ||
412 | { | ||
413 | .name = "wl1271", | ||
414 | .mmc = 2, | ||
415 | .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_POWER_OFF_CARD, | ||
416 | .gpio_wp = -EINVAL, | ||
417 | .gpio_cd = -EINVAL, | ||
418 | .nonremovable = true, | ||
419 | }, | ||
420 | #endif | ||
384 | {} /* Terminator */ | 421 | {} /* Terminator */ |
385 | }; | 422 | }; |
386 | 423 | ||
@@ -411,6 +448,8 @@ static struct platform_device leds_gpio = { | |||
411 | static int omap3evm_twl_gpio_setup(struct device *dev, | 448 | static int omap3evm_twl_gpio_setup(struct device *dev, |
412 | unsigned gpio, unsigned ngpio) | 449 | unsigned gpio, unsigned ngpio) |
413 | { | 450 | { |
451 | int r; | ||
452 | |||
414 | /* gpio + 0 is "mmc0_cd" (input/IRQ) */ | 453 | /* gpio + 0 is "mmc0_cd" (input/IRQ) */ |
415 | omap_mux_init_gpio(63, OMAP_PIN_INPUT); | 454 | omap_mux_init_gpio(63, OMAP_PIN_INPUT); |
416 | mmc[0].gpio_cd = gpio + 0; | 455 | mmc[0].gpio_cd = gpio + 0; |
@@ -426,8 +465,12 @@ static int omap3evm_twl_gpio_setup(struct device *dev, | |||
426 | */ | 465 | */ |
427 | 466 | ||
428 | /* TWL4030_GPIO_MAX + 0 == ledA, LCD Backlight control */ | 467 | /* TWL4030_GPIO_MAX + 0 == ledA, LCD Backlight control */ |
429 | gpio_request(gpio + TWL4030_GPIO_MAX, "EN_LCD_BKL"); | 468 | r = gpio_request(gpio + TWL4030_GPIO_MAX, "EN_LCD_BKL"); |
430 | gpio_direction_output(gpio + TWL4030_GPIO_MAX, 0); | 469 | if (!r) |
470 | r = gpio_direction_output(gpio + TWL4030_GPIO_MAX, | ||
471 | (get_omap3_evm_rev() >= OMAP3EVM_BOARD_GEN_2) ? 1 : 0); | ||
472 | if (r) | ||
473 | printk(KERN_ERR "failed to get/set lcd_bkl gpio\n"); | ||
431 | 474 | ||
432 | /* gpio + 7 == DVI Enable */ | 475 | /* gpio + 7 == DVI Enable */ |
433 | gpio_request(gpio + 7, "EN_DVI"); | 476 | gpio_request(gpio + 7, "EN_DVI"); |
@@ -500,10 +543,8 @@ static struct twl4030_codec_data omap3evm_codec_data = { | |||
500 | .audio = &omap3evm_audio_data, | 543 | .audio = &omap3evm_audio_data, |
501 | }; | 544 | }; |
502 | 545 | ||
503 | static struct regulator_consumer_supply omap3_evm_vdda_dac_supply = { | 546 | static struct regulator_consumer_supply omap3_evm_vdda_dac_supply = |
504 | .supply = "vdda_dac", | 547 | REGULATOR_SUPPLY("vdda_dac", "omapdss"); |
505 | .dev = &omap3_evm_dss_device.dev, | ||
506 | }; | ||
507 | 548 | ||
508 | /* VDAC for DSS driving S-Video */ | 549 | /* VDAC for DSS driving S-Video */ |
509 | static struct regulator_init_data omap3_evm_vdac = { | 550 | static struct regulator_init_data omap3_evm_vdac = { |
@@ -538,6 +579,66 @@ static struct regulator_init_data omap3_evm_vpll2 = { | |||
538 | .consumer_supplies = &omap3_evm_vpll2_supply, | 579 | .consumer_supplies = &omap3_evm_vpll2_supply, |
539 | }; | 580 | }; |
540 | 581 | ||
582 | /* ads7846 on SPI */ | ||
583 | static struct regulator_consumer_supply omap3evm_vio_supply = | ||
584 | REGULATOR_SUPPLY("vcc", "spi1.0"); | ||
585 | |||
586 | /* VIO for ads7846 */ | ||
587 | static struct regulator_init_data omap3evm_vio = { | ||
588 | .constraints = { | ||
589 | .min_uV = 1800000, | ||
590 | .max_uV = 1800000, | ||
591 | .apply_uV = true, | ||
592 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
593 | | REGULATOR_MODE_STANDBY, | ||
594 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
595 | | REGULATOR_CHANGE_STATUS, | ||
596 | }, | ||
597 | .num_consumer_supplies = 1, | ||
598 | .consumer_supplies = &omap3evm_vio_supply, | ||
599 | }; | ||
600 | |||
601 | #ifdef CONFIG_WL12XX_PLATFORM_DATA | ||
602 | |||
603 | #define OMAP3EVM_WLAN_PMENA_GPIO (150) | ||
604 | #define OMAP3EVM_WLAN_IRQ_GPIO (149) | ||
605 | |||
606 | static struct regulator_consumer_supply omap3evm_vmmc2_supply = | ||
607 | REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.1"); | ||
608 | |||
609 | /* VMMC2 for driving the WL12xx module */ | ||
610 | static struct regulator_init_data omap3evm_vmmc2 = { | ||
611 | .constraints = { | ||
612 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, | ||
613 | }, | ||
614 | .num_consumer_supplies = 1, | ||
615 | .consumer_supplies = &omap3evm_vmmc2_supply, | ||
616 | }; | ||
617 | |||
618 | static struct fixed_voltage_config omap3evm_vwlan = { | ||
619 | .supply_name = "vwl1271", | ||
620 | .microvolts = 1800000, /* 1.80V */ | ||
621 | .gpio = OMAP3EVM_WLAN_PMENA_GPIO, | ||
622 | .startup_delay = 70000, /* 70ms */ | ||
623 | .enable_high = 1, | ||
624 | .enabled_at_boot = 0, | ||
625 | .init_data = &omap3evm_vmmc2, | ||
626 | }; | ||
627 | |||
628 | static struct platform_device omap3evm_wlan_regulator = { | ||
629 | .name = "reg-fixed-voltage", | ||
630 | .id = 1, | ||
631 | .dev = { | ||
632 | .platform_data = &omap3evm_vwlan, | ||
633 | }, | ||
634 | }; | ||
635 | |||
636 | struct wl12xx_platform_data omap3evm_wlan_data __initdata = { | ||
637 | .irq = OMAP_GPIO_IRQ(OMAP3EVM_WLAN_IRQ_GPIO), | ||
638 | .board_ref_clock = WL12XX_REFCLOCK_38, /* 38.4 MHz */ | ||
639 | }; | ||
640 | #endif | ||
641 | |||
541 | static struct twl4030_platform_data omap3evm_twldata = { | 642 | static struct twl4030_platform_data omap3evm_twldata = { |
542 | .irq_base = TWL4030_IRQ_BASE, | 643 | .irq_base = TWL4030_IRQ_BASE, |
543 | .irq_end = TWL4030_IRQ_END, | 644 | .irq_end = TWL4030_IRQ_END, |
@@ -550,6 +651,7 @@ static struct twl4030_platform_data omap3evm_twldata = { | |||
550 | .codec = &omap3evm_codec_data, | 651 | .codec = &omap3evm_codec_data, |
551 | .vdac = &omap3_evm_vdac, | 652 | .vdac = &omap3_evm_vdac, |
552 | .vpll2 = &omap3_evm_vpll2, | 653 | .vpll2 = &omap3_evm_vpll2, |
654 | .vio = &omap3evm_vio, | ||
553 | }; | 655 | }; |
554 | 656 | ||
555 | static struct i2c_board_info __initdata omap3evm_i2c_boardinfo[] = { | 657 | static struct i2c_board_info __initdata omap3evm_i2c_boardinfo[] = { |
@@ -625,19 +727,14 @@ static struct spi_board_info omap3evm_spi_board_info[] = { | |||
625 | static struct omap_board_config_kernel omap3_evm_config[] __initdata = { | 727 | static struct omap_board_config_kernel omap3_evm_config[] __initdata = { |
626 | }; | 728 | }; |
627 | 729 | ||
628 | static void __init omap3_evm_init_irq(void) | 730 | static void __init omap3_evm_init_early(void) |
629 | { | 731 | { |
630 | omap_board_config = omap3_evm_config; | 732 | omap_board_config = omap3_evm_config; |
631 | omap_board_config_size = ARRAY_SIZE(omap3_evm_config); | 733 | omap_board_config_size = ARRAY_SIZE(omap3_evm_config); |
632 | omap2_init_common_infrastructure(); | 734 | omap2_init_common_infrastructure(); |
633 | omap2_init_common_devices(mt46h32m32lf6_sdrc_params, NULL); | 735 | omap2_init_common_devices(mt46h32m32lf6_sdrc_params, NULL); |
634 | omap_init_irq(); | ||
635 | } | 736 | } |
636 | 737 | ||
637 | static struct platform_device *omap3_evm_devices[] __initdata = { | ||
638 | &omap3_evm_dss_device, | ||
639 | }; | ||
640 | |||
641 | static struct ehci_hcd_omap_platform_data ehci_pdata __initdata = { | 738 | static struct ehci_hcd_omap_platform_data ehci_pdata __initdata = { |
642 | 739 | ||
643 | .port_mode[0] = EHCI_HCD_OMAP_MODE_UNKNOWN, | 740 | .port_mode[0] = EHCI_HCD_OMAP_MODE_UNKNOWN, |
@@ -652,14 +749,76 @@ static struct ehci_hcd_omap_platform_data ehci_pdata __initdata = { | |||
652 | }; | 749 | }; |
653 | 750 | ||
654 | #ifdef CONFIG_OMAP_MUX | 751 | #ifdef CONFIG_OMAP_MUX |
655 | static struct omap_board_mux board_mux[] __initdata = { | 752 | static struct omap_board_mux omap35x_board_mux[] __initdata = { |
656 | OMAP3_MUX(SYS_NIRQ, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP | | 753 | OMAP3_MUX(SYS_NIRQ, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP | |
657 | OMAP_PIN_OFF_INPUT_PULLUP | OMAP_PIN_OFF_OUTPUT_LOW | | 754 | OMAP_PIN_OFF_INPUT_PULLUP | OMAP_PIN_OFF_OUTPUT_LOW | |
658 | OMAP_PIN_OFF_WAKEUPENABLE), | 755 | OMAP_PIN_OFF_WAKEUPENABLE), |
659 | OMAP3_MUX(MCSPI1_CS1, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP | | 756 | OMAP3_MUX(MCSPI1_CS1, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP | |
660 | OMAP_PIN_OFF_INPUT_PULLUP | OMAP_PIN_OFF_OUTPUT_LOW), | 757 | OMAP_PIN_OFF_INPUT_PULLUP | OMAP_PIN_OFF_OUTPUT_LOW | |
758 | OMAP_PIN_OFF_WAKEUPENABLE), | ||
759 | OMAP3_MUX(SYS_BOOT5, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP | | ||
760 | OMAP_PIN_OFF_NONE), | ||
761 | OMAP3_MUX(GPMC_WAIT2, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP | | ||
762 | OMAP_PIN_OFF_NONE), | ||
763 | #ifdef CONFIG_WL12XX_PLATFORM_DATA | ||
764 | /* WLAN IRQ - GPIO 149 */ | ||
765 | OMAP3_MUX(UART1_RTS, OMAP_MUX_MODE4 | OMAP_PIN_INPUT), | ||
766 | |||
767 | /* WLAN POWER ENABLE - GPIO 150 */ | ||
768 | OMAP3_MUX(UART1_CTS, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT), | ||
769 | |||
770 | /* MMC2 SDIO pin muxes for WL12xx */ | ||
771 | OMAP3_MUX(SDMMC2_CLK, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), | ||
772 | OMAP3_MUX(SDMMC2_CMD, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), | ||
773 | OMAP3_MUX(SDMMC2_DAT0, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), | ||
774 | OMAP3_MUX(SDMMC2_DAT1, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), | ||
775 | OMAP3_MUX(SDMMC2_DAT2, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), | ||
776 | OMAP3_MUX(SDMMC2_DAT3, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), | ||
777 | #endif | ||
661 | { .reg_offset = OMAP_MUX_TERMINATOR }, | 778 | { .reg_offset = OMAP_MUX_TERMINATOR }, |
662 | }; | 779 | }; |
780 | |||
781 | static struct omap_board_mux omap36x_board_mux[] __initdata = { | ||
782 | OMAP3_MUX(SYS_NIRQ, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP | | ||
783 | OMAP_PIN_OFF_INPUT_PULLUP | OMAP_PIN_OFF_OUTPUT_LOW | | ||
784 | OMAP_PIN_OFF_WAKEUPENABLE), | ||
785 | OMAP3_MUX(MCSPI1_CS1, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP | | ||
786 | OMAP_PIN_OFF_INPUT_PULLUP | OMAP_PIN_OFF_OUTPUT_LOW | | ||
787 | OMAP_PIN_OFF_WAKEUPENABLE), | ||
788 | /* AM/DM37x EVM: DSS data bus muxed with sys_boot */ | ||
789 | OMAP3_MUX(DSS_DATA18, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE), | ||
790 | OMAP3_MUX(DSS_DATA19, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE), | ||
791 | OMAP3_MUX(DSS_DATA22, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE), | ||
792 | OMAP3_MUX(DSS_DATA21, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE), | ||
793 | OMAP3_MUX(DSS_DATA22, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE), | ||
794 | OMAP3_MUX(DSS_DATA23, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE), | ||
795 | OMAP3_MUX(SYS_BOOT0, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE), | ||
796 | OMAP3_MUX(SYS_BOOT1, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE), | ||
797 | OMAP3_MUX(SYS_BOOT3, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE), | ||
798 | OMAP3_MUX(SYS_BOOT4, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE), | ||
799 | OMAP3_MUX(SYS_BOOT5, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE), | ||
800 | OMAP3_MUX(SYS_BOOT6, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE), | ||
801 | #ifdef CONFIG_WL12XX_PLATFORM_DATA | ||
802 | /* WLAN IRQ - GPIO 149 */ | ||
803 | OMAP3_MUX(UART1_RTS, OMAP_MUX_MODE4 | OMAP_PIN_INPUT), | ||
804 | |||
805 | /* WLAN POWER ENABLE - GPIO 150 */ | ||
806 | OMAP3_MUX(UART1_CTS, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT), | ||
807 | |||
808 | /* MMC2 SDIO pin muxes for WL12xx */ | ||
809 | OMAP3_MUX(SDMMC2_CLK, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), | ||
810 | OMAP3_MUX(SDMMC2_CMD, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), | ||
811 | OMAP3_MUX(SDMMC2_DAT0, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), | ||
812 | OMAP3_MUX(SDMMC2_DAT1, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), | ||
813 | OMAP3_MUX(SDMMC2_DAT2, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), | ||
814 | OMAP3_MUX(SDMMC2_DAT3, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), | ||
815 | #endif | ||
816 | |||
817 | { .reg_offset = OMAP_MUX_TERMINATOR }, | ||
818 | }; | ||
819 | #else | ||
820 | #define omap35x_board_mux NULL | ||
821 | #define omap36x_board_mux NULL | ||
663 | #endif | 822 | #endif |
664 | 823 | ||
665 | static struct omap_musb_board_data musb_board_data = { | 824 | static struct omap_musb_board_data musb_board_data = { |
@@ -671,11 +830,15 @@ static struct omap_musb_board_data musb_board_data = { | |||
671 | static void __init omap3_evm_init(void) | 830 | static void __init omap3_evm_init(void) |
672 | { | 831 | { |
673 | omap3_evm_get_revision(); | 832 | omap3_evm_get_revision(); |
674 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); | 833 | |
834 | if (cpu_is_omap3630()) | ||
835 | omap3_mux_init(omap36x_board_mux, OMAP_PACKAGE_CBB); | ||
836 | else | ||
837 | omap3_mux_init(omap35x_board_mux, OMAP_PACKAGE_CBB); | ||
675 | 838 | ||
676 | omap3_evm_i2c_init(); | 839 | omap3_evm_i2c_init(); |
677 | 840 | ||
678 | platform_add_devices(omap3_evm_devices, ARRAY_SIZE(omap3_evm_devices)); | 841 | omap_display_init(&omap3_evm_dss_data); |
679 | 842 | ||
680 | spi_register_board_info(omap3evm_spi_board_info, | 843 | spi_register_board_info(omap3evm_spi_board_info, |
681 | ARRAY_SIZE(omap3evm_spi_board_info)); | 844 | ARRAY_SIZE(omap3evm_spi_board_info)); |
@@ -715,14 +878,22 @@ static void __init omap3_evm_init(void) | |||
715 | ads7846_dev_init(); | 878 | ads7846_dev_init(); |
716 | omap3evm_init_smsc911x(); | 879 | omap3evm_init_smsc911x(); |
717 | omap3_evm_display_init(); | 880 | omap3_evm_display_init(); |
881 | |||
882 | #ifdef CONFIG_WL12XX_PLATFORM_DATA | ||
883 | /* WL12xx WLAN Init */ | ||
884 | if (wl12xx_set_platform_data(&omap3evm_wlan_data)) | ||
885 | pr_err("error setting wl12xx data\n"); | ||
886 | platform_device_register(&omap3evm_wlan_regulator); | ||
887 | #endif | ||
718 | } | 888 | } |
719 | 889 | ||
720 | MACHINE_START(OMAP3EVM, "OMAP3 EVM") | 890 | MACHINE_START(OMAP3EVM, "OMAP3 EVM") |
721 | /* Maintainer: Syed Mohammed Khasim - Texas Instruments */ | 891 | /* Maintainer: Syed Mohammed Khasim - Texas Instruments */ |
722 | .boot_params = 0x80000100, | 892 | .boot_params = 0x80000100, |
723 | .map_io = omap3_map_io, | ||
724 | .reserve = omap_reserve, | 893 | .reserve = omap_reserve, |
725 | .init_irq = omap3_evm_init_irq, | 894 | .map_io = omap3_map_io, |
895 | .init_early = omap3_evm_init_early, | ||
896 | .init_irq = omap_init_irq, | ||
726 | .init_machine = omap3_evm_init, | 897 | .init_machine = omap3_evm_init, |
727 | .timer = &omap_timer, | 898 | .timer = &omap_timer, |
728 | MACHINE_END | 899 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-omap3logic.c b/arch/arm/mach-omap2/board-omap3logic.c index 15e4b08e99ba..b726943d7c93 100644 --- a/arch/arm/mach-omap2/board-omap3logic.c +++ b/arch/arm/mach-omap2/board-omap3logic.c | |||
@@ -195,11 +195,10 @@ static inline void __init board_smsc911x_init(void) | |||
195 | gpmc_smsc911x_init(&board_smsc911x_data); | 195 | gpmc_smsc911x_init(&board_smsc911x_data); |
196 | } | 196 | } |
197 | 197 | ||
198 | static void __init omap3logic_init_irq(void) | 198 | static void __init omap3logic_init_early(void) |
199 | { | 199 | { |
200 | omap2_init_common_infrastructure(); | 200 | omap2_init_common_infrastructure(); |
201 | omap2_init_common_devices(NULL, NULL); | 201 | omap2_init_common_devices(NULL, NULL); |
202 | omap_init_irq(); | ||
203 | } | 202 | } |
204 | 203 | ||
205 | #ifdef CONFIG_OMAP_MUX | 204 | #ifdef CONFIG_OMAP_MUX |
@@ -225,7 +224,8 @@ static void __init omap3logic_init(void) | |||
225 | MACHINE_START(OMAP3_TORPEDO, "Logic OMAP3 Torpedo board") | 224 | MACHINE_START(OMAP3_TORPEDO, "Logic OMAP3 Torpedo board") |
226 | .boot_params = 0x80000100, | 225 | .boot_params = 0x80000100, |
227 | .map_io = omap3_map_io, | 226 | .map_io = omap3_map_io, |
228 | .init_irq = omap3logic_init_irq, | 227 | .init_early = omap3logic_init_early, |
228 | .init_irq = omap_init_irq, | ||
229 | .init_machine = omap3logic_init, | 229 | .init_machine = omap3logic_init, |
230 | .timer = &omap_timer, | 230 | .timer = &omap_timer, |
231 | MACHINE_END | 231 | MACHINE_END |
@@ -233,7 +233,8 @@ MACHINE_END | |||
233 | MACHINE_START(OMAP3530_LV_SOM, "OMAP Logic 3530 LV SOM board") | 233 | MACHINE_START(OMAP3530_LV_SOM, "OMAP Logic 3530 LV SOM board") |
234 | .boot_params = 0x80000100, | 234 | .boot_params = 0x80000100, |
235 | .map_io = omap3_map_io, | 235 | .map_io = omap3_map_io, |
236 | .init_irq = omap3logic_init_irq, | 236 | .init_early = omap3logic_init_early, |
237 | .init_irq = omap_init_irq, | ||
237 | .init_machine = omap3logic_init, | 238 | .init_machine = omap3logic_init, |
238 | .timer = &omap_timer, | 239 | .timer = &omap_timer, |
239 | MACHINE_END | 240 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-omap3pandora.c b/arch/arm/mach-omap2/board-omap3pandora.c index 0b34beded11f..17ef5479c7ff 100644 --- a/arch/arm/mach-omap2/board-omap3pandora.c +++ b/arch/arm/mach-omap2/board-omap3pandora.c | |||
@@ -253,14 +253,6 @@ static struct omap_dss_board_info pandora_dss_data = { | |||
253 | .default_device = &pandora_lcd_device, | 253 | .default_device = &pandora_lcd_device, |
254 | }; | 254 | }; |
255 | 255 | ||
256 | static struct platform_device pandora_dss_device = { | ||
257 | .name = "omapdss", | ||
258 | .id = -1, | ||
259 | .dev = { | ||
260 | .platform_data = &pandora_dss_data, | ||
261 | }, | ||
262 | }; | ||
263 | |||
264 | static void pandora_wl1251_init_card(struct mmc_card *card) | 256 | static void pandora_wl1251_init_card(struct mmc_card *card) |
265 | { | 257 | { |
266 | /* | 258 | /* |
@@ -634,12 +626,11 @@ static struct spi_board_info omap3pandora_spi_board_info[] __initdata = { | |||
634 | } | 626 | } |
635 | }; | 627 | }; |
636 | 628 | ||
637 | static void __init omap3pandora_init_irq(void) | 629 | static void __init omap3pandora_init_early(void) |
638 | { | 630 | { |
639 | omap2_init_common_infrastructure(); | 631 | omap2_init_common_infrastructure(); |
640 | omap2_init_common_devices(mt46h32m32lf6_sdrc_params, | 632 | omap2_init_common_devices(mt46h32m32lf6_sdrc_params, |
641 | mt46h32m32lf6_sdrc_params); | 633 | mt46h32m32lf6_sdrc_params); |
642 | omap_init_irq(); | ||
643 | } | 634 | } |
644 | 635 | ||
645 | static void __init pandora_wl1251_init(void) | 636 | static void __init pandora_wl1251_init(void) |
@@ -677,7 +668,6 @@ fail: | |||
677 | static struct platform_device *omap3pandora_devices[] __initdata = { | 668 | static struct platform_device *omap3pandora_devices[] __initdata = { |
678 | &pandora_leds_gpio, | 669 | &pandora_leds_gpio, |
679 | &pandora_keys_gpio, | 670 | &pandora_keys_gpio, |
680 | &pandora_dss_device, | ||
681 | &pandora_vwlan_device, | 671 | &pandora_vwlan_device, |
682 | }; | 672 | }; |
683 | 673 | ||
@@ -712,6 +702,7 @@ static void __init omap3pandora_init(void) | |||
712 | pandora_wl1251_init(); | 702 | pandora_wl1251_init(); |
713 | platform_add_devices(omap3pandora_devices, | 703 | platform_add_devices(omap3pandora_devices, |
714 | ARRAY_SIZE(omap3pandora_devices)); | 704 | ARRAY_SIZE(omap3pandora_devices)); |
705 | omap_display_init(&pandora_dss_data); | ||
715 | omap_serial_init(); | 706 | omap_serial_init(); |
716 | spi_register_board_info(omap3pandora_spi_board_info, | 707 | spi_register_board_info(omap3pandora_spi_board_info, |
717 | ARRAY_SIZE(omap3pandora_spi_board_info)); | 708 | ARRAY_SIZE(omap3pandora_spi_board_info)); |
@@ -727,9 +718,10 @@ static void __init omap3pandora_init(void) | |||
727 | 718 | ||
728 | MACHINE_START(OMAP3_PANDORA, "Pandora Handheld Console") | 719 | MACHINE_START(OMAP3_PANDORA, "Pandora Handheld Console") |
729 | .boot_params = 0x80000100, | 720 | .boot_params = 0x80000100, |
730 | .map_io = omap3_map_io, | ||
731 | .reserve = omap_reserve, | 721 | .reserve = omap_reserve, |
732 | .init_irq = omap3pandora_init_irq, | 722 | .map_io = omap3_map_io, |
723 | .init_early = omap3pandora_init_early, | ||
724 | .init_irq = omap_init_irq, | ||
733 | .init_machine = omap3pandora_init, | 725 | .init_machine = omap3pandora_init, |
734 | .timer = &omap_timer, | 726 | .timer = &omap_timer, |
735 | MACHINE_END | 727 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-omap3stalker.c b/arch/arm/mach-omap2/board-omap3stalker.c index 2a2dad447e86..07006c323fc2 100644 --- a/arch/arm/mach-omap2/board-omap3stalker.c +++ b/arch/arm/mach-omap2/board-omap3stalker.c | |||
@@ -240,14 +240,6 @@ static struct omap_dss_board_info omap3_stalker_dss_data = { | |||
240 | .default_device = &omap3_stalker_dvi_device, | 240 | .default_device = &omap3_stalker_dvi_device, |
241 | }; | 241 | }; |
242 | 242 | ||
243 | static struct platform_device omap3_stalker_dss_device = { | ||
244 | .name = "omapdss", | ||
245 | .id = -1, | ||
246 | .dev = { | ||
247 | .platform_data = &omap3_stalker_dss_data, | ||
248 | }, | ||
249 | }; | ||
250 | |||
251 | static struct regulator_consumer_supply omap3stalker_vmmc1_supply = { | 243 | static struct regulator_consumer_supply omap3stalker_vmmc1_supply = { |
252 | .supply = "vmmc", | 244 | .supply = "vmmc", |
253 | }; | 245 | }; |
@@ -448,10 +440,8 @@ static struct twl4030_codec_data omap3stalker_codec_data = { | |||
448 | .audio = &omap3stalker_audio_data, | 440 | .audio = &omap3stalker_audio_data, |
449 | }; | 441 | }; |
450 | 442 | ||
451 | static struct regulator_consumer_supply omap3_stalker_vdda_dac_supply = { | 443 | static struct regulator_consumer_supply omap3_stalker_vdda_dac_supply = |
452 | .supply = "vdda_dac", | 444 | REGULATOR_SUPPLY("vdda_dac", "omapdss"); |
453 | .dev = &omap3_stalker_dss_device.dev, | ||
454 | }; | ||
455 | 445 | ||
456 | /* VDAC for DSS driving S-Video */ | 446 | /* VDAC for DSS driving S-Video */ |
457 | static struct regulator_init_data omap3_stalker_vdac = { | 447 | static struct regulator_init_data omap3_stalker_vdac = { |
@@ -469,10 +459,8 @@ static struct regulator_init_data omap3_stalker_vdac = { | |||
469 | }; | 459 | }; |
470 | 460 | ||
471 | /* VPLL2 for digital video outputs */ | 461 | /* VPLL2 for digital video outputs */ |
472 | static struct regulator_consumer_supply omap3_stalker_vpll2_supply = { | 462 | static struct regulator_consumer_supply omap3_stalker_vpll2_supply = |
473 | .supply = "vdds_dsi", | 463 | REGULATOR_SUPPLY("vdds_dsi", "omapdss"); |
474 | .dev = &omap3_stalker_lcd_device.dev, | ||
475 | }; | ||
476 | 464 | ||
477 | static struct regulator_init_data omap3_stalker_vpll2 = { | 465 | static struct regulator_init_data omap3_stalker_vpll2 = { |
478 | .constraints = { | 466 | .constraints = { |
@@ -591,12 +579,16 @@ static struct spi_board_info omap3stalker_spi_board_info[] = { | |||
591 | static struct omap_board_config_kernel omap3_stalker_config[] __initdata = { | 579 | static struct omap_board_config_kernel omap3_stalker_config[] __initdata = { |
592 | }; | 580 | }; |
593 | 581 | ||
594 | static void __init omap3_stalker_init_irq(void) | 582 | static void __init omap3_stalker_init_early(void) |
595 | { | 583 | { |
596 | omap_board_config = omap3_stalker_config; | 584 | omap_board_config = omap3_stalker_config; |
597 | omap_board_config_size = ARRAY_SIZE(omap3_stalker_config); | 585 | omap_board_config_size = ARRAY_SIZE(omap3_stalker_config); |
598 | omap2_init_common_infrastructure(); | 586 | omap2_init_common_infrastructure(); |
599 | omap2_init_common_devices(mt46h32m32lf6_sdrc_params, NULL); | 587 | omap2_init_common_devices(mt46h32m32lf6_sdrc_params, NULL); |
588 | } | ||
589 | |||
590 | static void __init omap3_stalker_init_irq(void) | ||
591 | { | ||
600 | omap_init_irq(); | 592 | omap_init_irq(); |
601 | #ifdef CONFIG_OMAP_32K_TIMER | 593 | #ifdef CONFIG_OMAP_32K_TIMER |
602 | omap2_gp_clockevent_set_gptimer(12); | 594 | omap2_gp_clockevent_set_gptimer(12); |
@@ -604,7 +596,6 @@ static void __init omap3_stalker_init_irq(void) | |||
604 | } | 596 | } |
605 | 597 | ||
606 | static struct platform_device *omap3_stalker_devices[] __initdata = { | 598 | static struct platform_device *omap3_stalker_devices[] __initdata = { |
607 | &omap3_stalker_dss_device, | ||
608 | &keys_gpio, | 599 | &keys_gpio, |
609 | }; | 600 | }; |
610 | 601 | ||
@@ -644,6 +635,7 @@ static void __init omap3_stalker_init(void) | |||
644 | platform_add_devices(omap3_stalker_devices, | 635 | platform_add_devices(omap3_stalker_devices, |
645 | ARRAY_SIZE(omap3_stalker_devices)); | 636 | ARRAY_SIZE(omap3_stalker_devices)); |
646 | 637 | ||
638 | omap_display_init(&omap3_stalker_dss_data); | ||
647 | spi_register_board_info(omap3stalker_spi_board_info, | 639 | spi_register_board_info(omap3stalker_spi_board_info, |
648 | ARRAY_SIZE(omap3stalker_spi_board_info)); | 640 | ARRAY_SIZE(omap3stalker_spi_board_info)); |
649 | 641 | ||
@@ -666,6 +658,7 @@ MACHINE_START(SBC3530, "OMAP3 STALKER") | |||
666 | /* Maintainer: Jason Lam -lzg@ema-tech.com */ | 658 | /* Maintainer: Jason Lam -lzg@ema-tech.com */ |
667 | .boot_params = 0x80000100, | 659 | .boot_params = 0x80000100, |
668 | .map_io = omap3_map_io, | 660 | .map_io = omap3_map_io, |
661 | .init_early = omap3_stalker_init_early, | ||
669 | .init_irq = omap3_stalker_init_irq, | 662 | .init_irq = omap3_stalker_init_irq, |
670 | .init_machine = omap3_stalker_init, | 663 | .init_machine = omap3_stalker_init, |
671 | .timer = &omap_timer, | 664 | .timer = &omap_timer, |
diff --git a/arch/arm/mach-omap2/board-omap3touchbook.c b/arch/arm/mach-omap2/board-omap3touchbook.c index db1f74fe6c4f..6a60f79dcccb 100644 --- a/arch/arm/mach-omap2/board-omap3touchbook.c +++ b/arch/arm/mach-omap2/board-omap3touchbook.c | |||
@@ -415,7 +415,7 @@ static struct omap_board_mux board_mux[] __initdata = { | |||
415 | }; | 415 | }; |
416 | #endif | 416 | #endif |
417 | 417 | ||
418 | static void __init omap3_touchbook_init_irq(void) | 418 | static void __init omap3_touchbook_init_early(void) |
419 | { | 419 | { |
420 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); | 420 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); |
421 | omap_board_config = omap3_touchbook_config; | 421 | omap_board_config = omap3_touchbook_config; |
@@ -423,6 +423,10 @@ static void __init omap3_touchbook_init_irq(void) | |||
423 | omap2_init_common_infrastructure(); | 423 | omap2_init_common_infrastructure(); |
424 | omap2_init_common_devices(mt46h32m32lf6_sdrc_params, | 424 | omap2_init_common_devices(mt46h32m32lf6_sdrc_params, |
425 | mt46h32m32lf6_sdrc_params); | 425 | mt46h32m32lf6_sdrc_params); |
426 | } | ||
427 | |||
428 | static void __init omap3_touchbook_init_irq(void) | ||
429 | { | ||
426 | omap_init_irq(); | 430 | omap_init_irq(); |
427 | #ifdef CONFIG_OMAP_32K_TIMER | 431 | #ifdef CONFIG_OMAP_32K_TIMER |
428 | omap2_gp_clockevent_set_gptimer(12); | 432 | omap2_gp_clockevent_set_gptimer(12); |
@@ -538,8 +542,9 @@ static void __init omap3_touchbook_init(void) | |||
538 | MACHINE_START(TOUCHBOOK, "OMAP3 touchbook Board") | 542 | MACHINE_START(TOUCHBOOK, "OMAP3 touchbook Board") |
539 | /* Maintainer: Gregoire Gentil - http://www.alwaysinnovating.com */ | 543 | /* Maintainer: Gregoire Gentil - http://www.alwaysinnovating.com */ |
540 | .boot_params = 0x80000100, | 544 | .boot_params = 0x80000100, |
541 | .map_io = omap3_map_io, | ||
542 | .reserve = omap_reserve, | 545 | .reserve = omap_reserve, |
546 | .map_io = omap3_map_io, | ||
547 | .init_early = omap3_touchbook_init_early, | ||
543 | .init_irq = omap3_touchbook_init_irq, | 548 | .init_irq = omap3_touchbook_init_irq, |
544 | .init_machine = omap3_touchbook_init, | 549 | .init_machine = omap3_touchbook_init, |
545 | .timer = &omap_timer, | 550 | .timer = &omap_timer, |
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c index e944025d5ef8..3dd241b95159 100644 --- a/arch/arm/mach-omap2/board-omap4panda.c +++ b/arch/arm/mach-omap2/board-omap4panda.c | |||
@@ -26,6 +26,8 @@ | |||
26 | #include <linux/usb/otg.h> | 26 | #include <linux/usb/otg.h> |
27 | #include <linux/i2c/twl.h> | 27 | #include <linux/i2c/twl.h> |
28 | #include <linux/regulator/machine.h> | 28 | #include <linux/regulator/machine.h> |
29 | #include <linux/regulator/fixed.h> | ||
30 | #include <linux/wl12xx.h> | ||
29 | 31 | ||
30 | #include <mach/hardware.h> | 32 | #include <mach/hardware.h> |
31 | #include <mach/omap4-common.h> | 33 | #include <mach/omap4-common.h> |
@@ -45,6 +47,8 @@ | |||
45 | 47 | ||
46 | #define GPIO_HUB_POWER 1 | 48 | #define GPIO_HUB_POWER 1 |
47 | #define GPIO_HUB_NRESET 62 | 49 | #define GPIO_HUB_NRESET 62 |
50 | #define GPIO_WIFI_PMENA 43 | ||
51 | #define GPIO_WIFI_IRQ 53 | ||
48 | 52 | ||
49 | static struct gpio_led gpio_leds[] = { | 53 | static struct gpio_led gpio_leds[] = { |
50 | { | 54 | { |
@@ -76,11 +80,10 @@ static struct platform_device *panda_devices[] __initdata = { | |||
76 | &leds_gpio, | 80 | &leds_gpio, |
77 | }; | 81 | }; |
78 | 82 | ||
79 | static void __init omap4_panda_init_irq(void) | 83 | static void __init omap4_panda_init_early(void) |
80 | { | 84 | { |
81 | omap2_init_common_infrastructure(); | 85 | omap2_init_common_infrastructure(); |
82 | omap2_init_common_devices(NULL, NULL); | 86 | omap2_init_common_devices(NULL, NULL); |
83 | gic_init_irq(); | ||
84 | } | 87 | } |
85 | 88 | ||
86 | static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { | 89 | static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { |
@@ -162,6 +165,15 @@ static struct omap2_hsmmc_info mmc[] = { | |||
162 | .gpio_wp = -EINVAL, | 165 | .gpio_wp = -EINVAL, |
163 | .gpio_cd = -EINVAL, | 166 | .gpio_cd = -EINVAL, |
164 | }, | 167 | }, |
168 | { | ||
169 | .name = "wl1271", | ||
170 | .mmc = 5, | ||
171 | .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_POWER_OFF_CARD, | ||
172 | .gpio_wp = -EINVAL, | ||
173 | .gpio_cd = -EINVAL, | ||
174 | .ocr_mask = MMC_VDD_165_195, | ||
175 | .nonremovable = true, | ||
176 | }, | ||
165 | {} /* Terminator */ | 177 | {} /* Terminator */ |
166 | }; | 178 | }; |
167 | 179 | ||
@@ -172,6 +184,43 @@ static struct regulator_consumer_supply omap4_panda_vmmc_supply[] = { | |||
172 | }, | 184 | }, |
173 | }; | 185 | }; |
174 | 186 | ||
187 | static struct regulator_consumer_supply omap4_panda_vmmc5_supply = { | ||
188 | .supply = "vmmc", | ||
189 | .dev_name = "mmci-omap-hs.4", | ||
190 | }; | ||
191 | |||
192 | static struct regulator_init_data panda_vmmc5 = { | ||
193 | .constraints = { | ||
194 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, | ||
195 | }, | ||
196 | .num_consumer_supplies = 1, | ||
197 | .consumer_supplies = &omap4_panda_vmmc5_supply, | ||
198 | }; | ||
199 | |||
200 | static struct fixed_voltage_config panda_vwlan = { | ||
201 | .supply_name = "vwl1271", | ||
202 | .microvolts = 1800000, /* 1.8V */ | ||
203 | .gpio = GPIO_WIFI_PMENA, | ||
204 | .startup_delay = 70000, /* 70msec */ | ||
205 | .enable_high = 1, | ||
206 | .enabled_at_boot = 0, | ||
207 | .init_data = &panda_vmmc5, | ||
208 | }; | ||
209 | |||
210 | static struct platform_device omap_vwlan_device = { | ||
211 | .name = "reg-fixed-voltage", | ||
212 | .id = 1, | ||
213 | .dev = { | ||
214 | .platform_data = &panda_vwlan, | ||
215 | }, | ||
216 | }; | ||
217 | |||
218 | struct wl12xx_platform_data omap_panda_wlan_data __initdata = { | ||
219 | .irq = OMAP_GPIO_IRQ(GPIO_WIFI_IRQ), | ||
220 | /* PANDA ref clock is 38.4 MHz */ | ||
221 | .board_ref_clock = 2, | ||
222 | }; | ||
223 | |||
175 | static int omap4_twl6030_hsmmc_late_init(struct device *dev) | 224 | static int omap4_twl6030_hsmmc_late_init(struct device *dev) |
176 | { | 225 | { |
177 | int ret = 0; | 226 | int ret = 0; |
@@ -305,7 +354,6 @@ static struct regulator_init_data omap4_panda_vana = { | |||
305 | .constraints = { | 354 | .constraints = { |
306 | .min_uV = 2100000, | 355 | .min_uV = 2100000, |
307 | .max_uV = 2100000, | 356 | .max_uV = 2100000, |
308 | .apply_uV = true, | ||
309 | .valid_modes_mask = REGULATOR_MODE_NORMAL | 357 | .valid_modes_mask = REGULATOR_MODE_NORMAL |
310 | | REGULATOR_MODE_STANDBY, | 358 | | REGULATOR_MODE_STANDBY, |
311 | .valid_ops_mask = REGULATOR_CHANGE_MODE | 359 | .valid_ops_mask = REGULATOR_CHANGE_MODE |
@@ -317,7 +365,6 @@ static struct regulator_init_data omap4_panda_vcxio = { | |||
317 | .constraints = { | 365 | .constraints = { |
318 | .min_uV = 1800000, | 366 | .min_uV = 1800000, |
319 | .max_uV = 1800000, | 367 | .max_uV = 1800000, |
320 | .apply_uV = true, | ||
321 | .valid_modes_mask = REGULATOR_MODE_NORMAL | 368 | .valid_modes_mask = REGULATOR_MODE_NORMAL |
322 | | REGULATOR_MODE_STANDBY, | 369 | | REGULATOR_MODE_STANDBY, |
323 | .valid_ops_mask = REGULATOR_CHANGE_MODE | 370 | .valid_ops_mask = REGULATOR_CHANGE_MODE |
@@ -329,7 +376,6 @@ static struct regulator_init_data omap4_panda_vdac = { | |||
329 | .constraints = { | 376 | .constraints = { |
330 | .min_uV = 1800000, | 377 | .min_uV = 1800000, |
331 | .max_uV = 1800000, | 378 | .max_uV = 1800000, |
332 | .apply_uV = true, | ||
333 | .valid_modes_mask = REGULATOR_MODE_NORMAL | 379 | .valid_modes_mask = REGULATOR_MODE_NORMAL |
334 | | REGULATOR_MODE_STANDBY, | 380 | | REGULATOR_MODE_STANDBY, |
335 | .valid_ops_mask = REGULATOR_CHANGE_MODE | 381 | .valid_ops_mask = REGULATOR_CHANGE_MODE |
@@ -391,6 +437,19 @@ static int __init omap4_panda_i2c_init(void) | |||
391 | 437 | ||
392 | #ifdef CONFIG_OMAP_MUX | 438 | #ifdef CONFIG_OMAP_MUX |
393 | static struct omap_board_mux board_mux[] __initdata = { | 439 | static struct omap_board_mux board_mux[] __initdata = { |
440 | /* WLAN IRQ - GPIO 53 */ | ||
441 | OMAP4_MUX(GPMC_NCS3, OMAP_MUX_MODE3 | OMAP_PIN_INPUT), | ||
442 | /* WLAN POWER ENABLE - GPIO 43 */ | ||
443 | OMAP4_MUX(GPMC_A19, OMAP_MUX_MODE3 | OMAP_PIN_OUTPUT), | ||
444 | /* WLAN SDIO: MMC5 CMD */ | ||
445 | OMAP4_MUX(SDMMC5_CMD, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), | ||
446 | /* WLAN SDIO: MMC5 CLK */ | ||
447 | OMAP4_MUX(SDMMC5_CLK, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), | ||
448 | /* WLAN SDIO: MMC5 DAT[0-3] */ | ||
449 | OMAP4_MUX(SDMMC5_DAT0, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), | ||
450 | OMAP4_MUX(SDMMC5_DAT1, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), | ||
451 | OMAP4_MUX(SDMMC5_DAT2, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), | ||
452 | OMAP4_MUX(SDMMC5_DAT3, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), | ||
394 | { .reg_offset = OMAP_MUX_TERMINATOR }, | 453 | { .reg_offset = OMAP_MUX_TERMINATOR }, |
395 | }; | 454 | }; |
396 | #else | 455 | #else |
@@ -405,8 +464,12 @@ static void __init omap4_panda_init(void) | |||
405 | package = OMAP_PACKAGE_CBL; | 464 | package = OMAP_PACKAGE_CBL; |
406 | omap4_mux_init(board_mux, package); | 465 | omap4_mux_init(board_mux, package); |
407 | 466 | ||
467 | if (wl12xx_set_platform_data(&omap_panda_wlan_data)) | ||
468 | pr_err("error setting wl12xx data\n"); | ||
469 | |||
408 | omap4_panda_i2c_init(); | 470 | omap4_panda_i2c_init(); |
409 | platform_add_devices(panda_devices, ARRAY_SIZE(panda_devices)); | 471 | platform_add_devices(panda_devices, ARRAY_SIZE(panda_devices)); |
472 | platform_device_register(&omap_vwlan_device); | ||
410 | omap_serial_init(); | 473 | omap_serial_init(); |
411 | omap4_twl6030_hsmmc_init(mmc); | 474 | omap4_twl6030_hsmmc_init(mmc); |
412 | omap4_ehci_init(); | 475 | omap4_ehci_init(); |
@@ -424,7 +487,8 @@ MACHINE_START(OMAP4_PANDA, "OMAP4 Panda board") | |||
424 | .boot_params = 0x80000100, | 487 | .boot_params = 0x80000100, |
425 | .reserve = omap_reserve, | 488 | .reserve = omap_reserve, |
426 | .map_io = omap4_panda_map_io, | 489 | .map_io = omap4_panda_map_io, |
427 | .init_irq = omap4_panda_init_irq, | 490 | .init_early = omap4_panda_init_early, |
491 | .init_irq = gic_init_irq, | ||
428 | .init_machine = omap4_panda_init, | 492 | .init_machine = omap4_panda_init, |
429 | .timer = &omap_timer, | 493 | .timer = &omap_timer, |
430 | MACHINE_END | 494 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c index cb26e5d8268d..a33ec0edec13 100644 --- a/arch/arm/mach-omap2/board-overo.c +++ b/arch/arm/mach-omap2/board-overo.c | |||
@@ -409,14 +409,13 @@ static struct omap_board_config_kernel overo_config[] __initdata = { | |||
409 | { OMAP_TAG_LCD, &overo_lcd_config }, | 409 | { OMAP_TAG_LCD, &overo_lcd_config }, |
410 | }; | 410 | }; |
411 | 411 | ||
412 | static void __init overo_init_irq(void) | 412 | static void __init overo_init_early(void) |
413 | { | 413 | { |
414 | omap_board_config = overo_config; | 414 | omap_board_config = overo_config; |
415 | omap_board_config_size = ARRAY_SIZE(overo_config); | 415 | omap_board_config_size = ARRAY_SIZE(overo_config); |
416 | omap2_init_common_infrastructure(); | 416 | omap2_init_common_infrastructure(); |
417 | omap2_init_common_devices(mt46h32m32lf6_sdrc_params, | 417 | omap2_init_common_devices(mt46h32m32lf6_sdrc_params, |
418 | mt46h32m32lf6_sdrc_params); | 418 | mt46h32m32lf6_sdrc_params); |
419 | omap_init_irq(); | ||
420 | } | 419 | } |
421 | 420 | ||
422 | static struct platform_device *overo_devices[] __initdata = { | 421 | static struct platform_device *overo_devices[] __initdata = { |
@@ -501,9 +500,10 @@ static void __init overo_init(void) | |||
501 | 500 | ||
502 | MACHINE_START(OVERO, "Gumstix Overo") | 501 | MACHINE_START(OVERO, "Gumstix Overo") |
503 | .boot_params = 0x80000100, | 502 | .boot_params = 0x80000100, |
504 | .map_io = omap3_map_io, | ||
505 | .reserve = omap_reserve, | 503 | .reserve = omap_reserve, |
506 | .init_irq = overo_init_irq, | 504 | .map_io = omap3_map_io, |
505 | .init_early = overo_init_early, | ||
506 | .init_irq = omap_init_irq, | ||
507 | .init_machine = overo_init, | 507 | .init_machine = overo_init, |
508 | .timer = &omap_timer, | 508 | .timer = &omap_timer, |
509 | MACHINE_END | 509 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-rm680.c b/arch/arm/mach-omap2/board-rm680.c index 39a71bb8a308..bdebcb7328e6 100644 --- a/arch/arm/mach-omap2/board-rm680.c +++ b/arch/arm/mach-omap2/board-rm680.c | |||
@@ -138,14 +138,13 @@ static void __init rm680_peripherals_init(void) | |||
138 | omap2_hsmmc_init(mmc); | 138 | omap2_hsmmc_init(mmc); |
139 | } | 139 | } |
140 | 140 | ||
141 | static void __init rm680_init_irq(void) | 141 | static void __init rm680_init_early(void) |
142 | { | 142 | { |
143 | struct omap_sdrc_params *sdrc_params; | 143 | struct omap_sdrc_params *sdrc_params; |
144 | 144 | ||
145 | omap2_init_common_infrastructure(); | 145 | omap2_init_common_infrastructure(); |
146 | sdrc_params = nokia_get_sdram_timings(); | 146 | sdrc_params = nokia_get_sdram_timings(); |
147 | omap2_init_common_devices(sdrc_params, sdrc_params); | 147 | omap2_init_common_devices(sdrc_params, sdrc_params); |
148 | omap_init_irq(); | ||
149 | } | 148 | } |
150 | 149 | ||
151 | #ifdef CONFIG_OMAP_MUX | 150 | #ifdef CONFIG_OMAP_MUX |
@@ -176,9 +175,10 @@ static void __init rm680_map_io(void) | |||
176 | 175 | ||
177 | MACHINE_START(NOKIA_RM680, "Nokia RM-680 board") | 176 | MACHINE_START(NOKIA_RM680, "Nokia RM-680 board") |
178 | .boot_params = 0x80000100, | 177 | .boot_params = 0x80000100, |
179 | .map_io = rm680_map_io, | ||
180 | .reserve = omap_reserve, | 178 | .reserve = omap_reserve, |
181 | .init_irq = rm680_init_irq, | 179 | .map_io = rm680_map_io, |
180 | .init_early = rm680_init_early, | ||
181 | .init_irq = omap_init_irq, | ||
182 | .init_machine = rm680_init, | 182 | .init_machine = rm680_init, |
183 | .timer = &omap_timer, | 183 | .timer = &omap_timer, |
184 | MACHINE_END | 184 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-rx51-video.c b/arch/arm/mach-omap2/board-rx51-video.c index acd670054d9a..89a66db8b77d 100644 --- a/arch/arm/mach-omap2/board-rx51-video.c +++ b/arch/arm/mach-omap2/board-rx51-video.c | |||
@@ -66,18 +66,6 @@ static struct omap_dss_board_info rx51_dss_board_info = { | |||
66 | .default_device = &rx51_lcd_device, | 66 | .default_device = &rx51_lcd_device, |
67 | }; | 67 | }; |
68 | 68 | ||
69 | struct platform_device rx51_display_device = { | ||
70 | .name = "omapdss", | ||
71 | .id = -1, | ||
72 | .dev = { | ||
73 | .platform_data = &rx51_dss_board_info, | ||
74 | }, | ||
75 | }; | ||
76 | |||
77 | static struct platform_device *rx51_video_devices[] __initdata = { | ||
78 | &rx51_display_device, | ||
79 | }; | ||
80 | |||
81 | static int __init rx51_video_init(void) | 69 | static int __init rx51_video_init(void) |
82 | { | 70 | { |
83 | if (!machine_is_nokia_rx51()) | 71 | if (!machine_is_nokia_rx51()) |
@@ -95,8 +83,7 @@ static int __init rx51_video_init(void) | |||
95 | 83 | ||
96 | gpio_direction_output(RX51_LCD_RESET_GPIO, 1); | 84 | gpio_direction_output(RX51_LCD_RESET_GPIO, 1); |
97 | 85 | ||
98 | platform_add_devices(rx51_video_devices, | 86 | omap_display_init(&rx51_dss_board_info); |
99 | ARRAY_SIZE(rx51_video_devices)); | ||
100 | return 0; | 87 | return 0; |
101 | } | 88 | } |
102 | 89 | ||
diff --git a/arch/arm/mach-omap2/board-rx51.c b/arch/arm/mach-omap2/board-rx51.c index f53fc551c58f..3cf72fe6d75b 100644 --- a/arch/arm/mach-omap2/board-rx51.c +++ b/arch/arm/mach-omap2/board-rx51.c | |||
@@ -98,7 +98,7 @@ static struct omap_board_config_kernel rx51_config[] = { | |||
98 | { OMAP_TAG_LCD, &rx51_lcd_config }, | 98 | { OMAP_TAG_LCD, &rx51_lcd_config }, |
99 | }; | 99 | }; |
100 | 100 | ||
101 | static void __init rx51_init_irq(void) | 101 | static void __init rx51_init_early(void) |
102 | { | 102 | { |
103 | struct omap_sdrc_params *sdrc_params; | 103 | struct omap_sdrc_params *sdrc_params; |
104 | 104 | ||
@@ -108,7 +108,6 @@ static void __init rx51_init_irq(void) | |||
108 | omap2_init_common_infrastructure(); | 108 | omap2_init_common_infrastructure(); |
109 | sdrc_params = nokia_get_sdram_timings(); | 109 | sdrc_params = nokia_get_sdram_timings(); |
110 | omap2_init_common_devices(sdrc_params, sdrc_params); | 110 | omap2_init_common_devices(sdrc_params, sdrc_params); |
111 | omap_init_irq(); | ||
112 | } | 111 | } |
113 | 112 | ||
114 | extern void __init rx51_peripherals_init(void); | 113 | extern void __init rx51_peripherals_init(void); |
@@ -149,9 +148,10 @@ static void __init rx51_map_io(void) | |||
149 | MACHINE_START(NOKIA_RX51, "Nokia RX-51 board") | 148 | MACHINE_START(NOKIA_RX51, "Nokia RX-51 board") |
150 | /* Maintainer: Lauri Leukkunen <lauri.leukkunen@nokia.com> */ | 149 | /* Maintainer: Lauri Leukkunen <lauri.leukkunen@nokia.com> */ |
151 | .boot_params = 0x80000100, | 150 | .boot_params = 0x80000100, |
152 | .map_io = rx51_map_io, | ||
153 | .reserve = omap_reserve, | 151 | .reserve = omap_reserve, |
154 | .init_irq = rx51_init_irq, | 152 | .map_io = rx51_map_io, |
153 | .init_early = rx51_init_early, | ||
154 | .init_irq = omap_init_irq, | ||
155 | .init_machine = rx51_init, | 155 | .init_machine = rx51_init, |
156 | .timer = &omap_timer, | 156 | .timer = &omap_timer, |
157 | MACHINE_END | 157 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/board-ti8168evm.c b/arch/arm/mach-omap2/board-ti8168evm.c new file mode 100644 index 000000000000..f2b097190e07 --- /dev/null +++ b/arch/arm/mach-omap2/board-ti8168evm.c | |||
@@ -0,0 +1,62 @@ | |||
1 | /* | ||
2 | * Code for TI8168 EVM. | ||
3 | * | ||
4 | * Copyright (C) 2010 Texas Instruments, Inc. - http://www.ti.com/ | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or | ||
7 | * modify it under the terms of the GNU General Public License as | ||
8 | * published by the Free Software Foundation version 2. | ||
9 | * | ||
10 | * This program is distributed "as is" WITHOUT ANY WARRANTY of any | ||
11 | * kind, whether express or implied; without even the implied warranty | ||
12 | * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | */ | ||
15 | #include <linux/kernel.h> | ||
16 | #include <linux/init.h> | ||
17 | |||
18 | #include <mach/hardware.h> | ||
19 | #include <asm/mach-types.h> | ||
20 | #include <asm/mach/arch.h> | ||
21 | #include <asm/mach/map.h> | ||
22 | |||
23 | #include <plat/irqs.h> | ||
24 | #include <plat/board.h> | ||
25 | #include <plat/common.h> | ||
26 | |||
27 | static struct omap_board_config_kernel ti8168_evm_config[] __initdata = { | ||
28 | }; | ||
29 | |||
30 | static void __init ti8168_init_early(void) | ||
31 | { | ||
32 | omap_board_config = ti8168_evm_config; | ||
33 | omap_board_config_size = ARRAY_SIZE(ti8168_evm_config); | ||
34 | omap2_init_common_infrastructure(); | ||
35 | omap2_init_common_devices(NULL, NULL); | ||
36 | } | ||
37 | |||
38 | static void __init ti8168_evm_init_irq(void) | ||
39 | { | ||
40 | omap_init_irq(); | ||
41 | } | ||
42 | |||
43 | static void __init ti8168_evm_init(void) | ||
44 | { | ||
45 | omap_serial_init(); | ||
46 | } | ||
47 | |||
48 | static void __init ti8168_evm_map_io(void) | ||
49 | { | ||
50 | omap2_set_globals_ti816x(); | ||
51 | omapti816x_map_common_io(); | ||
52 | } | ||
53 | |||
54 | MACHINE_START(TI8168EVM, "ti8168evm") | ||
55 | /* Maintainer: Texas Instruments */ | ||
56 | .boot_params = 0x80000100, | ||
57 | .map_io = ti8168_evm_map_io, | ||
58 | .init_early = ti8168_init_early, | ||
59 | .init_irq = ti8168_evm_init_irq, | ||
60 | .timer = &omap_timer, | ||
61 | .init_machine = ti8168_evm_init, | ||
62 | MACHINE_END | ||
diff --git a/arch/arm/mach-omap2/board-zoom-display.c b/arch/arm/mach-omap2/board-zoom-display.c index 6bcd43657aed..37b84c2b850f 100644 --- a/arch/arm/mach-omap2/board-zoom-display.c +++ b/arch/arm/mach-omap2/board-zoom-display.c | |||
@@ -130,14 +130,6 @@ static struct omap_dss_board_info zoom_dss_data = { | |||
130 | .default_device = &zoom_lcd_device, | 130 | .default_device = &zoom_lcd_device, |
131 | }; | 131 | }; |
132 | 132 | ||
133 | static struct platform_device zoom_dss_device = { | ||
134 | .name = "omapdss", | ||
135 | .id = -1, | ||
136 | .dev = { | ||
137 | .platform_data = &zoom_dss_data, | ||
138 | }, | ||
139 | }; | ||
140 | |||
141 | static struct omap2_mcspi_device_config dss_lcd_mcspi_config = { | 133 | static struct omap2_mcspi_device_config dss_lcd_mcspi_config = { |
142 | .turbo_mode = 1, | 134 | .turbo_mode = 1, |
143 | .single_channel = 1, /* 0: slave, 1: master */ | 135 | .single_channel = 1, /* 0: slave, 1: master */ |
@@ -153,14 +145,9 @@ static struct spi_board_info nec_8048_spi_board_info[] __initdata = { | |||
153 | }, | 145 | }, |
154 | }; | 146 | }; |
155 | 147 | ||
156 | static struct platform_device *zoom_display_devices[] __initdata = { | ||
157 | &zoom_dss_device, | ||
158 | }; | ||
159 | |||
160 | void __init zoom_display_init(void) | 148 | void __init zoom_display_init(void) |
161 | { | 149 | { |
162 | platform_add_devices(zoom_display_devices, | 150 | omap_display_init(&zoom_dss_data); |
163 | ARRAY_SIZE(zoom_display_devices)); | ||
164 | spi_register_board_info(nec_8048_spi_board_info, | 151 | spi_register_board_info(nec_8048_spi_board_info, |
165 | ARRAY_SIZE(nec_8048_spi_board_info)); | 152 | ARRAY_SIZE(nec_8048_spi_board_info)); |
166 | zoom_lcd_panel_init(); | 153 | zoom_lcd_panel_init(); |
diff --git a/arch/arm/mach-omap2/board-zoom.c b/arch/arm/mach-omap2/board-zoom.c index e26754c24ee8..7e3f1595d77b 100644 --- a/arch/arm/mach-omap2/board-zoom.c +++ b/arch/arm/mach-omap2/board-zoom.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/input.h> | 16 | #include <linux/input.h> |
17 | #include <linux/gpio.h> | 17 | #include <linux/gpio.h> |
18 | #include <linux/i2c/twl.h> | 18 | #include <linux/i2c/twl.h> |
19 | #include <linux/mtd/nand.h> | ||
19 | 20 | ||
20 | #include <asm/mach-types.h> | 21 | #include <asm/mach-types.h> |
21 | #include <asm/mach/arch.h> | 22 | #include <asm/mach/arch.h> |
@@ -33,7 +34,7 @@ | |||
33 | 34 | ||
34 | #define ZOOM3_EHCI_RESET_GPIO 64 | 35 | #define ZOOM3_EHCI_RESET_GPIO 64 |
35 | 36 | ||
36 | static void __init omap_zoom_init_irq(void) | 37 | static void __init omap_zoom_init_early(void) |
37 | { | 38 | { |
38 | omap2_init_common_infrastructure(); | 39 | omap2_init_common_infrastructure(); |
39 | if (machine_is_omap_zoom2()) | 40 | if (machine_is_omap_zoom2()) |
@@ -42,8 +43,6 @@ static void __init omap_zoom_init_irq(void) | |||
42 | else if (machine_is_omap_zoom3()) | 43 | else if (machine_is_omap_zoom3()) |
43 | omap2_init_common_devices(h8mbx00u0mer0em_sdrc_params, | 44 | omap2_init_common_devices(h8mbx00u0mer0em_sdrc_params, |
44 | h8mbx00u0mer0em_sdrc_params); | 45 | h8mbx00u0mer0em_sdrc_params); |
45 | |||
46 | omap_init_irq(); | ||
47 | } | 46 | } |
48 | 47 | ||
49 | #ifdef CONFIG_OMAP_MUX | 48 | #ifdef CONFIG_OMAP_MUX |
@@ -126,8 +125,8 @@ static void __init omap_zoom_init(void) | |||
126 | usb_ehci_init(&ehci_pdata); | 125 | usb_ehci_init(&ehci_pdata); |
127 | } | 126 | } |
128 | 127 | ||
129 | board_nand_init(zoom_nand_partitions, | 128 | board_nand_init(zoom_nand_partitions, ARRAY_SIZE(zoom_nand_partitions), |
130 | ARRAY_SIZE(zoom_nand_partitions), ZOOM_NAND_CS); | 129 | ZOOM_NAND_CS, NAND_BUSWIDTH_16); |
131 | zoom_debugboard_init(); | 130 | zoom_debugboard_init(); |
132 | zoom_peripherals_init(); | 131 | zoom_peripherals_init(); |
133 | zoom_display_init(); | 132 | zoom_display_init(); |
@@ -135,18 +134,20 @@ static void __init omap_zoom_init(void) | |||
135 | 134 | ||
136 | MACHINE_START(OMAP_ZOOM2, "OMAP Zoom2 board") | 135 | MACHINE_START(OMAP_ZOOM2, "OMAP Zoom2 board") |
137 | .boot_params = 0x80000100, | 136 | .boot_params = 0x80000100, |
138 | .map_io = omap3_map_io, | ||
139 | .reserve = omap_reserve, | 137 | .reserve = omap_reserve, |
140 | .init_irq = omap_zoom_init_irq, | 138 | .map_io = omap3_map_io, |
139 | .init_early = omap_zoom_init_early, | ||
140 | .init_irq = omap_init_irq, | ||
141 | .init_machine = omap_zoom_init, | 141 | .init_machine = omap_zoom_init, |
142 | .timer = &omap_timer, | 142 | .timer = &omap_timer, |
143 | MACHINE_END | 143 | MACHINE_END |
144 | 144 | ||
145 | MACHINE_START(OMAP_ZOOM3, "OMAP Zoom3 board") | 145 | MACHINE_START(OMAP_ZOOM3, "OMAP Zoom3 board") |
146 | .boot_params = 0x80000100, | 146 | .boot_params = 0x80000100, |
147 | .map_io = omap3_map_io, | ||
148 | .reserve = omap_reserve, | 147 | .reserve = omap_reserve, |
149 | .init_irq = omap_zoom_init_irq, | 148 | .map_io = omap3_map_io, |
149 | .init_early = omap_zoom_init_early, | ||
150 | .init_irq = omap_init_irq, | ||
150 | .init_machine = omap_zoom_init, | 151 | .init_machine = omap_zoom_init, |
151 | .timer = &omap_timer, | 152 | .timer = &omap_timer, |
152 | MACHINE_END | 153 | MACHINE_END |
diff --git a/arch/arm/mach-omap2/clkt_clksel.c b/arch/arm/mach-omap2/clkt_clksel.c index a781cd6795a4..e25364de028a 100644 --- a/arch/arm/mach-omap2/clkt_clksel.c +++ b/arch/arm/mach-omap2/clkt_clksel.c | |||
@@ -97,7 +97,7 @@ static u8 _get_div_and_fieldval(struct clk *src_clk, struct clk *clk, | |||
97 | u32 *field_val) | 97 | u32 *field_val) |
98 | { | 98 | { |
99 | const struct clksel *clks; | 99 | const struct clksel *clks; |
100 | const struct clksel_rate *clkr, *max_clkr; | 100 | const struct clksel_rate *clkr, *max_clkr = NULL; |
101 | u8 max_div = 0; | 101 | u8 max_div = 0; |
102 | 102 | ||
103 | clks = _get_clksel_by_parent(clk, src_clk); | 103 | clks = _get_clksel_by_parent(clk, src_clk); |
diff --git a/arch/arm/mach-omap2/clock2xxx.h b/arch/arm/mach-omap2/clock2xxx.h index 6a658b890c17..cc5c8d422c5b 100644 --- a/arch/arm/mach-omap2/clock2xxx.h +++ b/arch/arm/mach-omap2/clock2xxx.h | |||
@@ -20,13 +20,13 @@ u32 omap2xxx_get_apll_clkin(void); | |||
20 | u32 omap2xxx_get_sysclkdiv(void); | 20 | u32 omap2xxx_get_sysclkdiv(void); |
21 | void omap2xxx_clk_prepare_for_reboot(void); | 21 | void omap2xxx_clk_prepare_for_reboot(void); |
22 | 22 | ||
23 | #ifdef CONFIG_ARCH_OMAP2420 | 23 | #ifdef CONFIG_SOC_OMAP2420 |
24 | int omap2420_clk_init(void); | 24 | int omap2420_clk_init(void); |
25 | #else | 25 | #else |
26 | #define omap2420_clk_init() 0 | 26 | #define omap2420_clk_init() 0 |
27 | #endif | 27 | #endif |
28 | 28 | ||
29 | #ifdef CONFIG_ARCH_OMAP2430 | 29 | #ifdef CONFIG_SOC_OMAP2430 |
30 | int omap2430_clk_init(void); | 30 | int omap2430_clk_init(void); |
31 | #else | 31 | #else |
32 | #define omap2430_clk_init() 0 | 32 | #define omap2430_clk_init() 0 |
diff --git a/arch/arm/mach-omap2/clock3xxx_data.c b/arch/arm/mach-omap2/clock3xxx_data.c index 403a4a1d3f9c..f14d986f0b5d 100644 --- a/arch/arm/mach-omap2/clock3xxx_data.c +++ b/arch/arm/mach-omap2/clock3xxx_data.c | |||
@@ -3471,6 +3471,9 @@ int __init omap3xxx_clk_init(void) | |||
3471 | } else if (cpu_is_omap3630()) { | 3471 | } else if (cpu_is_omap3630()) { |
3472 | cpu_mask = (RATE_IN_34XX | RATE_IN_36XX); | 3472 | cpu_mask = (RATE_IN_34XX | RATE_IN_36XX); |
3473 | cpu_clkflg = CK_36XX; | 3473 | cpu_clkflg = CK_36XX; |
3474 | } else if (cpu_is_ti816x()) { | ||
3475 | cpu_mask = RATE_IN_TI816X; | ||
3476 | cpu_clkflg = CK_TI816X; | ||
3474 | } else if (cpu_is_omap34xx()) { | 3477 | } else if (cpu_is_omap34xx()) { |
3475 | if (omap_rev() == OMAP3430_REV_ES1_0) { | 3478 | if (omap_rev() == OMAP3430_REV_ES1_0) { |
3476 | cpu_mask = RATE_IN_3430ES1; | 3479 | cpu_mask = RATE_IN_3430ES1; |
@@ -3550,7 +3553,7 @@ int __init omap3xxx_clk_init(void) | |||
3550 | /* | 3553 | /* |
3551 | * Lock DPLL5 and put it in autoidle. | 3554 | * Lock DPLL5 and put it in autoidle. |
3552 | */ | 3555 | */ |
3553 | if (omap_rev() >= OMAP3430_REV_ES2_0) | 3556 | if (!cpu_is_ti816x() && (omap_rev() >= OMAP3430_REV_ES2_0)) |
3554 | omap3_clk_lock_dpll5(); | 3557 | omap3_clk_lock_dpll5(); |
3555 | 3558 | ||
3556 | /* Avoid sleeping during omap3_core_dpll_m2_set_rate() */ | 3559 | /* Avoid sleeping during omap3_core_dpll_m2_set_rate() */ |
diff --git a/arch/arm/mach-omap2/clockdomains2xxx_3xxx_data.c b/arch/arm/mach-omap2/clockdomains2xxx_3xxx_data.c index e4a7133ea3b3..e6f0d18d5e8d 100644 --- a/arch/arm/mach-omap2/clockdomains2xxx_3xxx_data.c +++ b/arch/arm/mach-omap2/clockdomains2xxx_3xxx_data.c | |||
@@ -171,7 +171,7 @@ static struct clkdm_dep core_24xx_wkdeps[] = { | |||
171 | 171 | ||
172 | /* 2430-specific possible wakeup dependencies */ | 172 | /* 2430-specific possible wakeup dependencies */ |
173 | 173 | ||
174 | #ifdef CONFIG_ARCH_OMAP2430 | 174 | #ifdef CONFIG_SOC_OMAP2430 |
175 | 175 | ||
176 | /* 2430 PM_WKDEP_MDM: CORE, MPU, WKUP */ | 176 | /* 2430 PM_WKDEP_MDM: CORE, MPU, WKUP */ |
177 | static struct clkdm_dep mdm_2430_wkdeps[] = { | 177 | static struct clkdm_dep mdm_2430_wkdeps[] = { |
@@ -194,7 +194,7 @@ static struct clkdm_dep mdm_2430_wkdeps[] = { | |||
194 | { NULL }, | 194 | { NULL }, |
195 | }; | 195 | }; |
196 | 196 | ||
197 | #endif /* CONFIG_ARCH_OMAP2430 */ | 197 | #endif /* CONFIG_SOC_OMAP2430 */ |
198 | 198 | ||
199 | 199 | ||
200 | /* OMAP3-specific possible dependencies */ | 200 | /* OMAP3-specific possible dependencies */ |
@@ -450,7 +450,7 @@ static struct clockdomain cm_clkdm = { | |||
450 | * 2420-only clockdomains | 450 | * 2420-only clockdomains |
451 | */ | 451 | */ |
452 | 452 | ||
453 | #if defined(CONFIG_ARCH_OMAP2420) | 453 | #if defined(CONFIG_SOC_OMAP2420) |
454 | 454 | ||
455 | static struct clockdomain mpu_2420_clkdm = { | 455 | static struct clockdomain mpu_2420_clkdm = { |
456 | .name = "mpu_clkdm", | 456 | .name = "mpu_clkdm", |
@@ -514,14 +514,14 @@ static struct clockdomain dss_2420_clkdm = { | |||
514 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420), | 514 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420), |
515 | }; | 515 | }; |
516 | 516 | ||
517 | #endif /* CONFIG_ARCH_OMAP2420 */ | 517 | #endif /* CONFIG_SOC_OMAP2420 */ |
518 | 518 | ||
519 | 519 | ||
520 | /* | 520 | /* |
521 | * 2430-only clockdomains | 521 | * 2430-only clockdomains |
522 | */ | 522 | */ |
523 | 523 | ||
524 | #if defined(CONFIG_ARCH_OMAP2430) | 524 | #if defined(CONFIG_SOC_OMAP2430) |
525 | 525 | ||
526 | static struct clockdomain mpu_2430_clkdm = { | 526 | static struct clockdomain mpu_2430_clkdm = { |
527 | .name = "mpu_clkdm", | 527 | .name = "mpu_clkdm", |
@@ -600,7 +600,7 @@ static struct clockdomain dss_2430_clkdm = { | |||
600 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430), | 600 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430), |
601 | }; | 601 | }; |
602 | 602 | ||
603 | #endif /* CONFIG_ARCH_OMAP2430 */ | 603 | #endif /* CONFIG_SOC_OMAP2430 */ |
604 | 604 | ||
605 | 605 | ||
606 | /* | 606 | /* |
@@ -811,7 +811,7 @@ static struct clockdomain *clockdomains_omap2[] __initdata = { | |||
811 | &cm_clkdm, | 811 | &cm_clkdm, |
812 | &prm_clkdm, | 812 | &prm_clkdm, |
813 | 813 | ||
814 | #ifdef CONFIG_ARCH_OMAP2420 | 814 | #ifdef CONFIG_SOC_OMAP2420 |
815 | &mpu_2420_clkdm, | 815 | &mpu_2420_clkdm, |
816 | &iva1_2420_clkdm, | 816 | &iva1_2420_clkdm, |
817 | &dsp_2420_clkdm, | 817 | &dsp_2420_clkdm, |
@@ -821,7 +821,7 @@ static struct clockdomain *clockdomains_omap2[] __initdata = { | |||
821 | &dss_2420_clkdm, | 821 | &dss_2420_clkdm, |
822 | #endif | 822 | #endif |
823 | 823 | ||
824 | #ifdef CONFIG_ARCH_OMAP2430 | 824 | #ifdef CONFIG_SOC_OMAP2430 |
825 | &mpu_2430_clkdm, | 825 | &mpu_2430_clkdm, |
826 | &mdm_clkdm, | 826 | &mdm_clkdm, |
827 | &dsp_2430_clkdm, | 827 | &dsp_2430_clkdm, |
diff --git a/arch/arm/mach-omap2/common.c b/arch/arm/mach-omap2/common.c index 778929f7e92d..48de4513de49 100644 --- a/arch/arm/mach-omap2/common.c +++ b/arch/arm/mach-omap2/common.c | |||
@@ -40,7 +40,7 @@ static void __init __omap2_set_globals(struct omap_globals *omap2_globals) | |||
40 | 40 | ||
41 | #endif | 41 | #endif |
42 | 42 | ||
43 | #if defined(CONFIG_ARCH_OMAP2420) | 43 | #if defined(CONFIG_SOC_OMAP2420) |
44 | 44 | ||
45 | static struct omap_globals omap242x_globals = { | 45 | static struct omap_globals omap242x_globals = { |
46 | .class = OMAP242X_CLASS, | 46 | .class = OMAP242X_CLASS, |
@@ -61,7 +61,7 @@ void __init omap2_set_globals_242x(void) | |||
61 | } | 61 | } |
62 | #endif | 62 | #endif |
63 | 63 | ||
64 | #if defined(CONFIG_ARCH_OMAP2430) | 64 | #if defined(CONFIG_SOC_OMAP2430) |
65 | 65 | ||
66 | static struct omap_globals omap243x_globals = { | 66 | static struct omap_globals omap243x_globals = { |
67 | .class = OMAP243X_CLASS, | 67 | .class = OMAP243X_CLASS, |
@@ -108,6 +108,27 @@ void __init omap3_map_io(void) | |||
108 | omap2_set_globals_3xxx(); | 108 | omap2_set_globals_3xxx(); |
109 | omap34xx_map_common_io(); | 109 | omap34xx_map_common_io(); |
110 | } | 110 | } |
111 | |||
112 | /* | ||
113 | * Adjust TAP register base such that omap3_check_revision accesses the correct | ||
114 | * TI816X register for checking device ID (it adds 0x204 to tap base while | ||
115 | * TI816X DEVICE ID register is at offset 0x600 from control base). | ||
116 | */ | ||
117 | #define TI816X_TAP_BASE (TI816X_CTRL_BASE + \ | ||
118 | TI816X_CONTROL_DEVICE_ID - 0x204) | ||
119 | |||
120 | static struct omap_globals ti816x_globals = { | ||
121 | .class = OMAP343X_CLASS, | ||
122 | .tap = OMAP2_L4_IO_ADDRESS(TI816X_TAP_BASE), | ||
123 | .ctrl = TI816X_CTRL_BASE, | ||
124 | .prm = TI816X_PRCM_BASE, | ||
125 | .cm = TI816X_PRCM_BASE, | ||
126 | }; | ||
127 | |||
128 | void __init omap2_set_globals_ti816x(void) | ||
129 | { | ||
130 | __omap2_set_globals(&ti816x_globals); | ||
131 | } | ||
111 | #endif | 132 | #endif |
112 | 133 | ||
113 | #if defined(CONFIG_ARCH_OMAP4) | 134 | #if defined(CONFIG_ARCH_OMAP4) |
diff --git a/arch/arm/mach-omap2/control.h b/arch/arm/mach-omap2/control.h index f0629ae04102..c2804c1c4efd 100644 --- a/arch/arm/mach-omap2/control.h +++ b/arch/arm/mach-omap2/control.h | |||
@@ -52,6 +52,9 @@ | |||
52 | #define OMAP343X_CONTROL_PADCONFS_WKUP 0xa00 | 52 | #define OMAP343X_CONTROL_PADCONFS_WKUP 0xa00 |
53 | #define OMAP343X_CONTROL_GENERAL_WKUP 0xa60 | 53 | #define OMAP343X_CONTROL_GENERAL_WKUP 0xa60 |
54 | 54 | ||
55 | /* TI816X spefic control submodules */ | ||
56 | #define TI816X_CONTROL_DEVCONF 0x600 | ||
57 | |||
55 | /* Control register offsets - read/write with omap_ctrl_{read,write}{bwl}() */ | 58 | /* Control register offsets - read/write with omap_ctrl_{read,write}{bwl}() */ |
56 | 59 | ||
57 | #define OMAP2_CONTROL_SYSCONFIG (OMAP2_CONTROL_INTERFACE + 0x10) | 60 | #define OMAP2_CONTROL_SYSCONFIG (OMAP2_CONTROL_INTERFACE + 0x10) |
@@ -241,6 +244,9 @@ | |||
241 | #define OMAP3_PADCONF_SAD2D_MSTANDBY 0x250 | 244 | #define OMAP3_PADCONF_SAD2D_MSTANDBY 0x250 |
242 | #define OMAP3_PADCONF_SAD2D_IDLEACK 0x254 | 245 | #define OMAP3_PADCONF_SAD2D_IDLEACK 0x254 |
243 | 246 | ||
247 | /* TI816X CONTROL_DEVCONF register offsets */ | ||
248 | #define TI816X_CONTROL_DEVICE_ID (TI816X_CONTROL_DEVCONF + 0x000) | ||
249 | |||
244 | /* | 250 | /* |
245 | * REVISIT: This list of registers is not comprehensive - there are more | 251 | * REVISIT: This list of registers is not comprehensive - there are more |
246 | * that should be added. | 252 | * that should be added. |
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index 2c9c912f2c42..9ee876fd367a 100644 --- a/arch/arm/mach-omap2/devices.c +++ b/arch/arm/mach-omap2/devices.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/io.h> | 15 | #include <linux/io.h> |
16 | #include <linux/clk.h> | 16 | #include <linux/clk.h> |
17 | #include <linux/err.h> | 17 | #include <linux/err.h> |
18 | #include <linux/slab.h> | ||
18 | 19 | ||
19 | #include <mach/hardware.h> | 20 | #include <mach/hardware.h> |
20 | #include <mach/irqs.h> | 21 | #include <mach/irqs.h> |
@@ -30,6 +31,7 @@ | |||
30 | #include <plat/dma.h> | 31 | #include <plat/dma.h> |
31 | #include <plat/omap_hwmod.h> | 32 | #include <plat/omap_hwmod.h> |
32 | #include <plat/omap_device.h> | 33 | #include <plat/omap_device.h> |
34 | #include <plat/omap4-keypad.h> | ||
33 | 35 | ||
34 | #include "mux.h" | 36 | #include "mux.h" |
35 | #include "control.h" | 37 | #include "control.h" |
@@ -141,6 +143,46 @@ static inline void omap_init_camera(void) | |||
141 | } | 143 | } |
142 | #endif | 144 | #endif |
143 | 145 | ||
146 | struct omap_device_pm_latency omap_keyboard_latency[] = { | ||
147 | { | ||
148 | .deactivate_func = omap_device_idle_hwmods, | ||
149 | .activate_func = omap_device_enable_hwmods, | ||
150 | .flags = OMAP_DEVICE_LATENCY_AUTO_ADJUST, | ||
151 | }, | ||
152 | }; | ||
153 | |||
154 | int __init omap4_keyboard_init(struct omap4_keypad_platform_data | ||
155 | *sdp4430_keypad_data) | ||
156 | { | ||
157 | struct omap_device *od; | ||
158 | struct omap_hwmod *oh; | ||
159 | struct omap4_keypad_platform_data *keypad_data; | ||
160 | unsigned int id = -1; | ||
161 | char *oh_name = "kbd"; | ||
162 | char *name = "omap4-keypad"; | ||
163 | |||
164 | oh = omap_hwmod_lookup(oh_name); | ||
165 | if (!oh) { | ||
166 | pr_err("Could not look up %s\n", oh_name); | ||
167 | return -ENODEV; | ||
168 | } | ||
169 | |||
170 | keypad_data = sdp4430_keypad_data; | ||
171 | |||
172 | od = omap_device_build(name, id, oh, keypad_data, | ||
173 | sizeof(struct omap4_keypad_platform_data), | ||
174 | omap_keyboard_latency, | ||
175 | ARRAY_SIZE(omap_keyboard_latency), 0); | ||
176 | |||
177 | if (IS_ERR(od)) { | ||
178 | WARN(1, "Cant build omap_device for %s:%s.\n", | ||
179 | name, oh->name); | ||
180 | return PTR_ERR(od); | ||
181 | } | ||
182 | |||
183 | return 0; | ||
184 | } | ||
185 | |||
144 | #if defined(CONFIG_OMAP_MBOX_FWK) || defined(CONFIG_OMAP_MBOX_FWK_MODULE) | 186 | #if defined(CONFIG_OMAP_MBOX_FWK) || defined(CONFIG_OMAP_MBOX_FWK_MODULE) |
145 | 187 | ||
146 | #define MBOX_REG_SIZE 0x120 | 188 | #define MBOX_REG_SIZE 0x120 |
@@ -279,163 +321,55 @@ static inline void omap_init_audio(void) {} | |||
279 | 321 | ||
280 | #include <plat/mcspi.h> | 322 | #include <plat/mcspi.h> |
281 | 323 | ||
282 | #define OMAP2_MCSPI1_BASE 0x48098000 | 324 | struct omap_device_pm_latency omap_mcspi_latency[] = { |
283 | #define OMAP2_MCSPI2_BASE 0x4809a000 | 325 | [0] = { |
284 | #define OMAP2_MCSPI3_BASE 0x480b8000 | 326 | .deactivate_func = omap_device_idle_hwmods, |
285 | #define OMAP2_MCSPI4_BASE 0x480ba000 | 327 | .activate_func = omap_device_enable_hwmods, |
286 | 328 | .flags = OMAP_DEVICE_LATENCY_AUTO_ADJUST, | |
287 | #define OMAP4_MCSPI1_BASE 0x48098100 | ||
288 | #define OMAP4_MCSPI2_BASE 0x4809a100 | ||
289 | #define OMAP4_MCSPI3_BASE 0x480b8100 | ||
290 | #define OMAP4_MCSPI4_BASE 0x480ba100 | ||
291 | |||
292 | static struct omap2_mcspi_platform_config omap2_mcspi1_config = { | ||
293 | .num_cs = 4, | ||
294 | }; | ||
295 | |||
296 | static struct resource omap2_mcspi1_resources[] = { | ||
297 | { | ||
298 | .start = OMAP2_MCSPI1_BASE, | ||
299 | .end = OMAP2_MCSPI1_BASE + 0xff, | ||
300 | .flags = IORESOURCE_MEM, | ||
301 | }, | ||
302 | }; | ||
303 | |||
304 | static struct platform_device omap2_mcspi1 = { | ||
305 | .name = "omap2_mcspi", | ||
306 | .id = 1, | ||
307 | .num_resources = ARRAY_SIZE(omap2_mcspi1_resources), | ||
308 | .resource = omap2_mcspi1_resources, | ||
309 | .dev = { | ||
310 | .platform_data = &omap2_mcspi1_config, | ||
311 | }, | ||
312 | }; | ||
313 | |||
314 | static struct omap2_mcspi_platform_config omap2_mcspi2_config = { | ||
315 | .num_cs = 2, | ||
316 | }; | ||
317 | |||
318 | static struct resource omap2_mcspi2_resources[] = { | ||
319 | { | ||
320 | .start = OMAP2_MCSPI2_BASE, | ||
321 | .end = OMAP2_MCSPI2_BASE + 0xff, | ||
322 | .flags = IORESOURCE_MEM, | ||
323 | }, | ||
324 | }; | ||
325 | |||
326 | static struct platform_device omap2_mcspi2 = { | ||
327 | .name = "omap2_mcspi", | ||
328 | .id = 2, | ||
329 | .num_resources = ARRAY_SIZE(omap2_mcspi2_resources), | ||
330 | .resource = omap2_mcspi2_resources, | ||
331 | .dev = { | ||
332 | .platform_data = &omap2_mcspi2_config, | ||
333 | }, | ||
334 | }; | ||
335 | |||
336 | #if defined(CONFIG_ARCH_OMAP2430) || defined(CONFIG_ARCH_OMAP3) || \ | ||
337 | defined(CONFIG_ARCH_OMAP4) | ||
338 | static struct omap2_mcspi_platform_config omap2_mcspi3_config = { | ||
339 | .num_cs = 2, | ||
340 | }; | ||
341 | |||
342 | static struct resource omap2_mcspi3_resources[] = { | ||
343 | { | ||
344 | .start = OMAP2_MCSPI3_BASE, | ||
345 | .end = OMAP2_MCSPI3_BASE + 0xff, | ||
346 | .flags = IORESOURCE_MEM, | ||
347 | }, | ||
348 | }; | ||
349 | |||
350 | static struct platform_device omap2_mcspi3 = { | ||
351 | .name = "omap2_mcspi", | ||
352 | .id = 3, | ||
353 | .num_resources = ARRAY_SIZE(omap2_mcspi3_resources), | ||
354 | .resource = omap2_mcspi3_resources, | ||
355 | .dev = { | ||
356 | .platform_data = &omap2_mcspi3_config, | ||
357 | }, | ||
358 | }; | ||
359 | #endif | ||
360 | |||
361 | #if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_ARCH_OMAP4) | ||
362 | static struct omap2_mcspi_platform_config omap2_mcspi4_config = { | ||
363 | .num_cs = 1, | ||
364 | }; | ||
365 | |||
366 | static struct resource omap2_mcspi4_resources[] = { | ||
367 | { | ||
368 | .start = OMAP2_MCSPI4_BASE, | ||
369 | .end = OMAP2_MCSPI4_BASE + 0xff, | ||
370 | .flags = IORESOURCE_MEM, | ||
371 | }, | ||
372 | }; | ||
373 | |||
374 | static struct platform_device omap2_mcspi4 = { | ||
375 | .name = "omap2_mcspi", | ||
376 | .id = 4, | ||
377 | .num_resources = ARRAY_SIZE(omap2_mcspi4_resources), | ||
378 | .resource = omap2_mcspi4_resources, | ||
379 | .dev = { | ||
380 | .platform_data = &omap2_mcspi4_config, | ||
381 | }, | 329 | }, |
382 | }; | 330 | }; |
383 | #endif | ||
384 | 331 | ||
385 | #ifdef CONFIG_ARCH_OMAP4 | 332 | static int omap_mcspi_init(struct omap_hwmod *oh, void *unused) |
386 | static inline void omap4_mcspi_fixup(void) | ||
387 | { | ||
388 | omap2_mcspi1_resources[0].start = OMAP4_MCSPI1_BASE; | ||
389 | omap2_mcspi1_resources[0].end = OMAP4_MCSPI1_BASE + 0xff; | ||
390 | omap2_mcspi2_resources[0].start = OMAP4_MCSPI2_BASE; | ||
391 | omap2_mcspi2_resources[0].end = OMAP4_MCSPI2_BASE + 0xff; | ||
392 | omap2_mcspi3_resources[0].start = OMAP4_MCSPI3_BASE; | ||
393 | omap2_mcspi3_resources[0].end = OMAP4_MCSPI3_BASE + 0xff; | ||
394 | omap2_mcspi4_resources[0].start = OMAP4_MCSPI4_BASE; | ||
395 | omap2_mcspi4_resources[0].end = OMAP4_MCSPI4_BASE + 0xff; | ||
396 | } | ||
397 | #else | ||
398 | static inline void omap4_mcspi_fixup(void) | ||
399 | { | 333 | { |
400 | } | 334 | struct omap_device *od; |
401 | #endif | 335 | char *name = "omap2_mcspi"; |
336 | struct omap2_mcspi_platform_config *pdata; | ||
337 | static int spi_num; | ||
338 | struct omap2_mcspi_dev_attr *mcspi_attrib = oh->dev_attr; | ||
339 | |||
340 | pdata = kzalloc(sizeof(*pdata), GFP_KERNEL); | ||
341 | if (!pdata) { | ||
342 | pr_err("Memory allocation for McSPI device failed\n"); | ||
343 | return -ENOMEM; | ||
344 | } | ||
402 | 345 | ||
403 | #if defined(CONFIG_ARCH_OMAP2430) || defined(CONFIG_ARCH_OMAP3) || \ | 346 | pdata->num_cs = mcspi_attrib->num_chipselect; |
404 | defined(CONFIG_ARCH_OMAP4) | 347 | switch (oh->class->rev) { |
405 | static inline void omap2_mcspi3_init(void) | 348 | case OMAP2_MCSPI_REV: |
406 | { | 349 | case OMAP3_MCSPI_REV: |
407 | platform_device_register(&omap2_mcspi3); | 350 | pdata->regs_offset = 0; |
408 | } | 351 | break; |
409 | #else | 352 | case OMAP4_MCSPI_REV: |
410 | static inline void omap2_mcspi3_init(void) | 353 | pdata->regs_offset = OMAP4_MCSPI_REG_OFFSET; |
411 | { | 354 | break; |
412 | } | 355 | default: |
413 | #endif | 356 | pr_err("Invalid McSPI Revision value\n"); |
357 | return -EINVAL; | ||
358 | } | ||
414 | 359 | ||
415 | #if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_ARCH_OMAP4) | 360 | spi_num++; |
416 | static inline void omap2_mcspi4_init(void) | 361 | od = omap_device_build(name, spi_num, oh, pdata, |
417 | { | 362 | sizeof(*pdata), omap_mcspi_latency, |
418 | platform_device_register(&omap2_mcspi4); | 363 | ARRAY_SIZE(omap_mcspi_latency), 0); |
419 | } | 364 | WARN(IS_ERR(od), "Cant build omap_device for %s:%s\n", |
420 | #else | 365 | name, oh->name); |
421 | static inline void omap2_mcspi4_init(void) | 366 | kfree(pdata); |
422 | { | 367 | return 0; |
423 | } | 368 | } |
424 | #endif | ||
425 | 369 | ||
426 | static void omap_init_mcspi(void) | 370 | static void omap_init_mcspi(void) |
427 | { | 371 | { |
428 | if (cpu_is_omap44xx()) | 372 | omap_hwmod_for_each_by_class("mcspi", omap_mcspi_init, NULL); |
429 | omap4_mcspi_fixup(); | ||
430 | |||
431 | platform_device_register(&omap2_mcspi1); | ||
432 | platform_device_register(&omap2_mcspi2); | ||
433 | |||
434 | if (cpu_is_omap2430() || cpu_is_omap343x() || cpu_is_omap44xx()) | ||
435 | omap2_mcspi3_init(); | ||
436 | |||
437 | if (cpu_is_omap343x() || cpu_is_omap44xx()) | ||
438 | omap2_mcspi4_init(); | ||
439 | } | 373 | } |
440 | 374 | ||
441 | #else | 375 | #else |
@@ -895,7 +829,7 @@ void __init omap2_init_mmc(struct omap_mmc_platform_data **mmc_data, | |||
895 | /*-------------------------------------------------------------------------*/ | 829 | /*-------------------------------------------------------------------------*/ |
896 | 830 | ||
897 | #if defined(CONFIG_HDQ_MASTER_OMAP) || defined(CONFIG_HDQ_MASTER_OMAP_MODULE) | 831 | #if defined(CONFIG_HDQ_MASTER_OMAP) || defined(CONFIG_HDQ_MASTER_OMAP_MODULE) |
898 | #if defined(CONFIG_ARCH_OMAP2430) || defined(CONFIG_ARCH_OMAP3430) | 832 | #if defined(CONFIG_SOC_OMAP2430) || defined(CONFIG_SOC_OMAP3430) |
899 | #define OMAP_HDQ_BASE 0x480B2000 | 833 | #define OMAP_HDQ_BASE 0x480B2000 |
900 | #endif | 834 | #endif |
901 | static struct resource omap_hdq_resources[] = { | 835 | static struct resource omap_hdq_resources[] = { |
diff --git a/arch/arm/mach-omap2/display.c b/arch/arm/mach-omap2/display.c new file mode 100644 index 000000000000..b18db84b0349 --- /dev/null +++ b/arch/arm/mach-omap2/display.c | |||
@@ -0,0 +1,45 @@ | |||
1 | /* | ||
2 | * OMAP2plus display device setup / initialization. | ||
3 | * | ||
4 | * Copyright (C) 2010 Texas Instruments Incorporated - http://www.ti.com/ | ||
5 | * Senthilvadivu Guruswamy | ||
6 | * Sumit Semwal | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | * | ||
12 | * This program is distributed "as is" WITHOUT ANY WARRANTY of any | ||
13 | * kind, whether express or implied; without even the implied warranty | ||
14 | * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | * GNU General Public License for more details. | ||
16 | */ | ||
17 | |||
18 | #include <linux/kernel.h> | ||
19 | #include <linux/init.h> | ||
20 | #include <linux/platform_device.h> | ||
21 | #include <linux/io.h> | ||
22 | #include <linux/clk.h> | ||
23 | #include <linux/err.h> | ||
24 | |||
25 | #include <plat/display.h> | ||
26 | |||
27 | static struct platform_device omap_display_device = { | ||
28 | .name = "omapdss", | ||
29 | .id = -1, | ||
30 | .dev = { | ||
31 | .platform_data = NULL, | ||
32 | }, | ||
33 | }; | ||
34 | |||
35 | int __init omap_display_init(struct omap_dss_board_info *board_data) | ||
36 | { | ||
37 | int r = 0; | ||
38 | omap_display_device.dev.platform_data = board_data; | ||
39 | |||
40 | r = platform_device_register(&omap_display_device); | ||
41 | if (r < 0) | ||
42 | printk(KERN_ERR "Unable to register OMAP-Display device\n"); | ||
43 | |||
44 | return r; | ||
45 | } | ||
diff --git a/arch/arm/mach-omap2/gpmc-nand.c b/arch/arm/mach-omap2/gpmc-nand.c index 2bb29c160702..c1791d08ae56 100644 --- a/arch/arm/mach-omap2/gpmc-nand.c +++ b/arch/arm/mach-omap2/gpmc-nand.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/platform_device.h> | 13 | #include <linux/platform_device.h> |
14 | #include <linux/io.h> | 14 | #include <linux/io.h> |
15 | #include <linux/mtd/nand.h> | ||
15 | 16 | ||
16 | #include <asm/mach/flash.h> | 17 | #include <asm/mach/flash.h> |
17 | 18 | ||
@@ -69,8 +70,10 @@ static int omap2_nand_gpmc_retime(void) | |||
69 | t.wr_cycle = gpmc_round_ns_to_ticks(gpmc_nand_data->gpmc_t->wr_cycle); | 70 | t.wr_cycle = gpmc_round_ns_to_ticks(gpmc_nand_data->gpmc_t->wr_cycle); |
70 | 71 | ||
71 | /* Configure GPMC */ | 72 | /* Configure GPMC */ |
72 | gpmc_cs_configure(gpmc_nand_data->cs, | 73 | if (gpmc_nand_data->devsize == NAND_BUSWIDTH_16) |
73 | GPMC_CONFIG_DEV_SIZE, gpmc_nand_data->devsize); | 74 | gpmc_cs_configure(gpmc_nand_data->cs, GPMC_CONFIG_DEV_SIZE, 1); |
75 | else | ||
76 | gpmc_cs_configure(gpmc_nand_data->cs, GPMC_CONFIG_DEV_SIZE, 0); | ||
74 | gpmc_cs_configure(gpmc_nand_data->cs, | 77 | gpmc_cs_configure(gpmc_nand_data->cs, |
75 | GPMC_CONFIG_DEV_TYPE, GPMC_DEVICETYPE_NAND); | 78 | GPMC_CONFIG_DEV_TYPE, GPMC_DEVICETYPE_NAND); |
76 | err = gpmc_cs_set_timings(gpmc_nand_data->cs, &t); | 79 | err = gpmc_cs_set_timings(gpmc_nand_data->cs, &t); |
diff --git a/arch/arm/mach-omap2/gpmc-onenand.c b/arch/arm/mach-omap2/gpmc-onenand.c index 3a7d25fb00ef..d776ded9830d 100644 --- a/arch/arm/mach-omap2/gpmc-onenand.c +++ b/arch/arm/mach-omap2/gpmc-onenand.c | |||
@@ -94,7 +94,7 @@ static int omap2_onenand_set_async_mode(int cs, void __iomem *onenand_base) | |||
94 | } | 94 | } |
95 | 95 | ||
96 | static void set_onenand_cfg(void __iomem *onenand_base, int latency, | 96 | static void set_onenand_cfg(void __iomem *onenand_base, int latency, |
97 | int sync_read, int sync_write, int hf) | 97 | int sync_read, int sync_write, int hf, int vhf) |
98 | { | 98 | { |
99 | u32 reg; | 99 | u32 reg; |
100 | 100 | ||
@@ -114,12 +114,57 @@ static void set_onenand_cfg(void __iomem *onenand_base, int latency, | |||
114 | reg |= ONENAND_SYS_CFG1_HF; | 114 | reg |= ONENAND_SYS_CFG1_HF; |
115 | else | 115 | else |
116 | reg &= ~ONENAND_SYS_CFG1_HF; | 116 | reg &= ~ONENAND_SYS_CFG1_HF; |
117 | if (vhf) | ||
118 | reg |= ONENAND_SYS_CFG1_VHF; | ||
119 | else | ||
120 | reg &= ~ONENAND_SYS_CFG1_VHF; | ||
117 | writew(reg, onenand_base + ONENAND_REG_SYS_CFG1); | 121 | writew(reg, onenand_base + ONENAND_REG_SYS_CFG1); |
118 | } | 122 | } |
119 | 123 | ||
124 | static int omap2_onenand_get_freq(struct omap_onenand_platform_data *cfg, | ||
125 | void __iomem *onenand_base, bool *clk_dep) | ||
126 | { | ||
127 | u16 ver = readw(onenand_base + ONENAND_REG_VERSION_ID); | ||
128 | int freq = 0; | ||
129 | |||
130 | if (cfg->get_freq) { | ||
131 | struct onenand_freq_info fi; | ||
132 | |||
133 | fi.maf_id = readw(onenand_base + ONENAND_REG_MANUFACTURER_ID); | ||
134 | fi.dev_id = readw(onenand_base + ONENAND_REG_DEVICE_ID); | ||
135 | fi.ver_id = ver; | ||
136 | freq = cfg->get_freq(&fi, clk_dep); | ||
137 | if (freq) | ||
138 | return freq; | ||
139 | } | ||
140 | |||
141 | switch ((ver >> 4) & 0xf) { | ||
142 | case 0: | ||
143 | freq = 40; | ||
144 | break; | ||
145 | case 1: | ||
146 | freq = 54; | ||
147 | break; | ||
148 | case 2: | ||
149 | freq = 66; | ||
150 | break; | ||
151 | case 3: | ||
152 | freq = 83; | ||
153 | break; | ||
154 | case 4: | ||
155 | freq = 104; | ||
156 | break; | ||
157 | default: | ||
158 | freq = 54; | ||
159 | break; | ||
160 | } | ||
161 | |||
162 | return freq; | ||
163 | } | ||
164 | |||
120 | static int omap2_onenand_set_sync_mode(struct omap_onenand_platform_data *cfg, | 165 | static int omap2_onenand_set_sync_mode(struct omap_onenand_platform_data *cfg, |
121 | void __iomem *onenand_base, | 166 | void __iomem *onenand_base, |
122 | int freq) | 167 | int *freq_ptr) |
123 | { | 168 | { |
124 | struct gpmc_timings t; | 169 | struct gpmc_timings t; |
125 | const int t_cer = 15; | 170 | const int t_cer = 15; |
@@ -130,10 +175,11 @@ static int omap2_onenand_set_sync_mode(struct omap_onenand_platform_data *cfg, | |||
130 | const int t_wph = 30; | 175 | const int t_wph = 30; |
131 | int min_gpmc_clk_period, t_ces, t_avds, t_avdh, t_ach, t_aavdh, t_rdyo; | 176 | int min_gpmc_clk_period, t_ces, t_avds, t_avdh, t_ach, t_aavdh, t_rdyo; |
132 | int tick_ns, div, fclk_offset_ns, fclk_offset, gpmc_clk_ns, latency; | 177 | int tick_ns, div, fclk_offset_ns, fclk_offset, gpmc_clk_ns, latency; |
133 | int first_time = 0, hf = 0, sync_read = 0, sync_write = 0; | 178 | int first_time = 0, hf = 0, vhf = 0, sync_read = 0, sync_write = 0; |
134 | int err, ticks_cez; | 179 | int err, ticks_cez; |
135 | int cs = cfg->cs; | 180 | int cs = cfg->cs, freq = *freq_ptr; |
136 | u32 reg; | 181 | u32 reg; |
182 | bool clk_dep = false; | ||
137 | 183 | ||
138 | if (cfg->flags & ONENAND_SYNC_READ) { | 184 | if (cfg->flags & ONENAND_SYNC_READ) { |
139 | sync_read = 1; | 185 | sync_read = 1; |
@@ -148,27 +194,7 @@ static int omap2_onenand_set_sync_mode(struct omap_onenand_platform_data *cfg, | |||
148 | err = omap2_onenand_set_async_mode(cs, onenand_base); | 194 | err = omap2_onenand_set_async_mode(cs, onenand_base); |
149 | if (err) | 195 | if (err) |
150 | return err; | 196 | return err; |
151 | reg = readw(onenand_base + ONENAND_REG_VERSION_ID); | 197 | freq = omap2_onenand_get_freq(cfg, onenand_base, &clk_dep); |
152 | switch ((reg >> 4) & 0xf) { | ||
153 | case 0: | ||
154 | freq = 40; | ||
155 | break; | ||
156 | case 1: | ||
157 | freq = 54; | ||
158 | break; | ||
159 | case 2: | ||
160 | freq = 66; | ||
161 | break; | ||
162 | case 3: | ||
163 | freq = 83; | ||
164 | break; | ||
165 | case 4: | ||
166 | freq = 104; | ||
167 | break; | ||
168 | default: | ||
169 | freq = 54; | ||
170 | break; | ||
171 | } | ||
172 | first_time = 1; | 198 | first_time = 1; |
173 | } | 199 | } |
174 | 200 | ||
@@ -180,7 +206,7 @@ static int omap2_onenand_set_sync_mode(struct omap_onenand_platform_data *cfg, | |||
180 | t_avdh = 2; | 206 | t_avdh = 2; |
181 | t_ach = 3; | 207 | t_ach = 3; |
182 | t_aavdh = 6; | 208 | t_aavdh = 6; |
183 | t_rdyo = 9; | 209 | t_rdyo = 6; |
184 | break; | 210 | break; |
185 | case 83: | 211 | case 83: |
186 | min_gpmc_clk_period = 12000; /* 83 MHz */ | 212 | min_gpmc_clk_period = 12000; /* 83 MHz */ |
@@ -217,16 +243,36 @@ static int omap2_onenand_set_sync_mode(struct omap_onenand_platform_data *cfg, | |||
217 | gpmc_clk_ns = gpmc_ticks_to_ns(div); | 243 | gpmc_clk_ns = gpmc_ticks_to_ns(div); |
218 | if (gpmc_clk_ns < 15) /* >66Mhz */ | 244 | if (gpmc_clk_ns < 15) /* >66Mhz */ |
219 | hf = 1; | 245 | hf = 1; |
220 | if (hf) | 246 | if (gpmc_clk_ns < 12) /* >83Mhz */ |
247 | vhf = 1; | ||
248 | if (vhf) | ||
249 | latency = 8; | ||
250 | else if (hf) | ||
221 | latency = 6; | 251 | latency = 6; |
222 | else if (gpmc_clk_ns >= 25) /* 40 MHz*/ | 252 | else if (gpmc_clk_ns >= 25) /* 40 MHz*/ |
223 | latency = 3; | 253 | latency = 3; |
224 | else | 254 | else |
225 | latency = 4; | 255 | latency = 4; |
226 | 256 | ||
257 | if (clk_dep) { | ||
258 | if (gpmc_clk_ns < 12) { /* >83Mhz */ | ||
259 | t_ces = 3; | ||
260 | t_avds = 4; | ||
261 | } else if (gpmc_clk_ns < 15) { /* >66Mhz */ | ||
262 | t_ces = 5; | ||
263 | t_avds = 4; | ||
264 | } else if (gpmc_clk_ns < 25) { /* >40Mhz */ | ||
265 | t_ces = 6; | ||
266 | t_avds = 5; | ||
267 | } else { | ||
268 | t_ces = 7; | ||
269 | t_avds = 7; | ||
270 | } | ||
271 | } | ||
272 | |||
227 | if (first_time) | 273 | if (first_time) |
228 | set_onenand_cfg(onenand_base, latency, | 274 | set_onenand_cfg(onenand_base, latency, |
229 | sync_read, sync_write, hf); | 275 | sync_read, sync_write, hf, vhf); |
230 | 276 | ||
231 | if (div == 1) { | 277 | if (div == 1) { |
232 | reg = gpmc_cs_read_reg(cs, GPMC_CS_CONFIG2); | 278 | reg = gpmc_cs_read_reg(cs, GPMC_CS_CONFIG2); |
@@ -264,6 +310,9 @@ static int omap2_onenand_set_sync_mode(struct omap_onenand_platform_data *cfg, | |||
264 | /* Read */ | 310 | /* Read */ |
265 | t.adv_rd_off = gpmc_ticks_to_ns(fclk_offset + gpmc_ns_to_ticks(t_avdh)); | 311 | t.adv_rd_off = gpmc_ticks_to_ns(fclk_offset + gpmc_ns_to_ticks(t_avdh)); |
266 | t.oe_on = gpmc_ticks_to_ns(fclk_offset + gpmc_ns_to_ticks(t_ach)); | 312 | t.oe_on = gpmc_ticks_to_ns(fclk_offset + gpmc_ns_to_ticks(t_ach)); |
313 | /* Force at least 1 clk between AVD High to OE Low */ | ||
314 | if (t.oe_on <= t.adv_rd_off) | ||
315 | t.oe_on = t.adv_rd_off + gpmc_round_ns_to_ticks(1); | ||
267 | t.access = gpmc_ticks_to_ns(fclk_offset + (latency + 1) * div); | 316 | t.access = gpmc_ticks_to_ns(fclk_offset + (latency + 1) * div); |
268 | t.oe_off = t.access + gpmc_round_ns_to_ticks(1); | 317 | t.oe_off = t.access + gpmc_round_ns_to_ticks(1); |
269 | t.cs_rd_off = t.oe_off; | 318 | t.cs_rd_off = t.oe_off; |
@@ -317,18 +366,20 @@ static int omap2_onenand_set_sync_mode(struct omap_onenand_platform_data *cfg, | |||
317 | if (err) | 366 | if (err) |
318 | return err; | 367 | return err; |
319 | 368 | ||
320 | set_onenand_cfg(onenand_base, latency, sync_read, sync_write, hf); | 369 | set_onenand_cfg(onenand_base, latency, sync_read, sync_write, hf, vhf); |
370 | |||
371 | *freq_ptr = freq; | ||
321 | 372 | ||
322 | return 0; | 373 | return 0; |
323 | } | 374 | } |
324 | 375 | ||
325 | static int gpmc_onenand_setup(void __iomem *onenand_base, int freq) | 376 | static int gpmc_onenand_setup(void __iomem *onenand_base, int *freq_ptr) |
326 | { | 377 | { |
327 | struct device *dev = &gpmc_onenand_device.dev; | 378 | struct device *dev = &gpmc_onenand_device.dev; |
328 | 379 | ||
329 | /* Set sync timings in GPMC */ | 380 | /* Set sync timings in GPMC */ |
330 | if (omap2_onenand_set_sync_mode(gpmc_onenand_data, onenand_base, | 381 | if (omap2_onenand_set_sync_mode(gpmc_onenand_data, onenand_base, |
331 | freq) < 0) { | 382 | freq_ptr) < 0) { |
332 | dev_err(dev, "Unable to set synchronous mode\n"); | 383 | dev_err(dev, "Unable to set synchronous mode\n"); |
333 | return -EINVAL; | 384 | return -EINVAL; |
334 | } | 385 | } |
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c index 1b7b3e7d02f7..674174365f78 100644 --- a/arch/arm/mach-omap2/gpmc.c +++ b/arch/arm/mach-omap2/gpmc.c | |||
@@ -14,6 +14,7 @@ | |||
14 | */ | 14 | */ |
15 | #undef DEBUG | 15 | #undef DEBUG |
16 | 16 | ||
17 | #include <linux/irq.h> | ||
17 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
18 | #include <linux/init.h> | 19 | #include <linux/init.h> |
19 | #include <linux/err.h> | 20 | #include <linux/err.h> |
@@ -22,6 +23,7 @@ | |||
22 | #include <linux/spinlock.h> | 23 | #include <linux/spinlock.h> |
23 | #include <linux/io.h> | 24 | #include <linux/io.h> |
24 | #include <linux/module.h> | 25 | #include <linux/module.h> |
26 | #include <linux/interrupt.h> | ||
25 | 27 | ||
26 | #include <asm/mach-types.h> | 28 | #include <asm/mach-types.h> |
27 | #include <plat/gpmc.h> | 29 | #include <plat/gpmc.h> |
@@ -58,7 +60,6 @@ | |||
58 | #define GPMC_CHUNK_SHIFT 24 /* 16 MB */ | 60 | #define GPMC_CHUNK_SHIFT 24 /* 16 MB */ |
59 | #define GPMC_SECTION_SHIFT 28 /* 128 MB */ | 61 | #define GPMC_SECTION_SHIFT 28 /* 128 MB */ |
60 | 62 | ||
61 | #define PREFETCH_FIFOTHRESHOLD (0x40 << 8) | ||
62 | #define CS_NUM_SHIFT 24 | 63 | #define CS_NUM_SHIFT 24 |
63 | #define ENABLE_PREFETCH (0x1 << 7) | 64 | #define ENABLE_PREFETCH (0x1 << 7) |
64 | #define DMA_MPU_MODE 2 | 65 | #define DMA_MPU_MODE 2 |
@@ -100,6 +101,8 @@ static void __iomem *gpmc_base; | |||
100 | 101 | ||
101 | static struct clk *gpmc_l3_clk; | 102 | static struct clk *gpmc_l3_clk; |
102 | 103 | ||
104 | static irqreturn_t gpmc_handle_irq(int irq, void *dev); | ||
105 | |||
103 | static void gpmc_write_reg(int idx, u32 val) | 106 | static void gpmc_write_reg(int idx, u32 val) |
104 | { | 107 | { |
105 | __raw_writel(val, gpmc_base + idx); | 108 | __raw_writel(val, gpmc_base + idx); |
@@ -497,6 +500,10 @@ int gpmc_cs_configure(int cs, int cmd, int wval) | |||
497 | u32 regval = 0; | 500 | u32 regval = 0; |
498 | 501 | ||
499 | switch (cmd) { | 502 | switch (cmd) { |
503 | case GPMC_ENABLE_IRQ: | ||
504 | gpmc_write_reg(GPMC_IRQENABLE, wval); | ||
505 | break; | ||
506 | |||
500 | case GPMC_SET_IRQ_STATUS: | 507 | case GPMC_SET_IRQ_STATUS: |
501 | gpmc_write_reg(GPMC_IRQSTATUS, wval); | 508 | gpmc_write_reg(GPMC_IRQSTATUS, wval); |
502 | break; | 509 | break; |
@@ -598,15 +605,19 @@ EXPORT_SYMBOL(gpmc_nand_write); | |||
598 | /** | 605 | /** |
599 | * gpmc_prefetch_enable - configures and starts prefetch transfer | 606 | * gpmc_prefetch_enable - configures and starts prefetch transfer |
600 | * @cs: cs (chip select) number | 607 | * @cs: cs (chip select) number |
608 | * @fifo_th: fifo threshold to be used for read/ write | ||
601 | * @dma_mode: dma mode enable (1) or disable (0) | 609 | * @dma_mode: dma mode enable (1) or disable (0) |
602 | * @u32_count: number of bytes to be transferred | 610 | * @u32_count: number of bytes to be transferred |
603 | * @is_write: prefetch read(0) or write post(1) mode | 611 | * @is_write: prefetch read(0) or write post(1) mode |
604 | */ | 612 | */ |
605 | int gpmc_prefetch_enable(int cs, int dma_mode, | 613 | int gpmc_prefetch_enable(int cs, int fifo_th, int dma_mode, |
606 | unsigned int u32_count, int is_write) | 614 | unsigned int u32_count, int is_write) |
607 | { | 615 | { |
608 | 616 | ||
609 | if (!(gpmc_read_reg(GPMC_PREFETCH_CONTROL))) { | 617 | if (fifo_th > PREFETCH_FIFOTHRESHOLD_MAX) { |
618 | pr_err("gpmc: fifo threshold is not supported\n"); | ||
619 | return -1; | ||
620 | } else if (!(gpmc_read_reg(GPMC_PREFETCH_CONTROL))) { | ||
610 | /* Set the amount of bytes to be prefetched */ | 621 | /* Set the amount of bytes to be prefetched */ |
611 | gpmc_write_reg(GPMC_PREFETCH_CONFIG2, u32_count); | 622 | gpmc_write_reg(GPMC_PREFETCH_CONFIG2, u32_count); |
612 | 623 | ||
@@ -614,7 +625,7 @@ int gpmc_prefetch_enable(int cs, int dma_mode, | |||
614 | * enable the engine. Set which cs is has requested for. | 625 | * enable the engine. Set which cs is has requested for. |
615 | */ | 626 | */ |
616 | gpmc_write_reg(GPMC_PREFETCH_CONFIG1, ((cs << CS_NUM_SHIFT) | | 627 | gpmc_write_reg(GPMC_PREFETCH_CONFIG1, ((cs << CS_NUM_SHIFT) | |
617 | PREFETCH_FIFOTHRESHOLD | | 628 | PREFETCH_FIFOTHRESHOLD(fifo_th) | |
618 | ENABLE_PREFETCH | | 629 | ENABLE_PREFETCH | |
619 | (dma_mode << DMA_MPU_MODE) | | 630 | (dma_mode << DMA_MPU_MODE) | |
620 | (0x1 & is_write))); | 631 | (0x1 & is_write))); |
@@ -678,9 +689,10 @@ static void __init gpmc_mem_init(void) | |||
678 | } | 689 | } |
679 | } | 690 | } |
680 | 691 | ||
681 | void __init gpmc_init(void) | 692 | static int __init gpmc_init(void) |
682 | { | 693 | { |
683 | u32 l; | 694 | u32 l, irq; |
695 | int cs, ret = -EINVAL; | ||
684 | char *ck = NULL; | 696 | char *ck = NULL; |
685 | 697 | ||
686 | if (cpu_is_omap24xx()) { | 698 | if (cpu_is_omap24xx()) { |
@@ -698,7 +710,7 @@ void __init gpmc_init(void) | |||
698 | } | 710 | } |
699 | 711 | ||
700 | if (WARN_ON(!ck)) | 712 | if (WARN_ON(!ck)) |
701 | return; | 713 | return ret; |
702 | 714 | ||
703 | gpmc_l3_clk = clk_get(NULL, ck); | 715 | gpmc_l3_clk = clk_get(NULL, ck); |
704 | if (IS_ERR(gpmc_l3_clk)) { | 716 | if (IS_ERR(gpmc_l3_clk)) { |
@@ -723,6 +735,36 @@ void __init gpmc_init(void) | |||
723 | l |= (0x02 << 3) | (1 << 0); | 735 | l |= (0x02 << 3) | (1 << 0); |
724 | gpmc_write_reg(GPMC_SYSCONFIG, l); | 736 | gpmc_write_reg(GPMC_SYSCONFIG, l); |
725 | gpmc_mem_init(); | 737 | gpmc_mem_init(); |
738 | |||
739 | /* initalize the irq_chained */ | ||
740 | irq = OMAP_GPMC_IRQ_BASE; | ||
741 | for (cs = 0; cs < GPMC_CS_NUM; cs++) { | ||
742 | set_irq_handler(irq, handle_simple_irq); | ||
743 | set_irq_flags(irq, IRQF_VALID); | ||
744 | irq++; | ||
745 | } | ||
746 | |||
747 | ret = request_irq(INT_34XX_GPMC_IRQ, | ||
748 | gpmc_handle_irq, IRQF_SHARED, "gpmc", gpmc_base); | ||
749 | if (ret) | ||
750 | pr_err("gpmc: irq-%d could not claim: err %d\n", | ||
751 | INT_34XX_GPMC_IRQ, ret); | ||
752 | return ret; | ||
753 | } | ||
754 | postcore_initcall(gpmc_init); | ||
755 | |||
756 | static irqreturn_t gpmc_handle_irq(int irq, void *dev) | ||
757 | { | ||
758 | u8 cs; | ||
759 | |||
760 | if (irq != INT_34XX_GPMC_IRQ) | ||
761 | return IRQ_HANDLED; | ||
762 | /* check cs to invoke the irq */ | ||
763 | cs = ((gpmc_read_reg(GPMC_PREFETCH_CONFIG1)) >> CS_NUM_SHIFT) & 0x7; | ||
764 | if (OMAP_GPMC_IRQ_BASE+cs <= OMAP_GPMC_IRQ_END) | ||
765 | generic_handle_irq(OMAP_GPMC_IRQ_BASE+cs); | ||
766 | |||
767 | return IRQ_HANDLED; | ||
726 | } | 768 | } |
727 | 769 | ||
728 | #ifdef CONFIG_ARCH_OMAP3 | 770 | #ifdef CONFIG_ARCH_OMAP3 |
diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c index 34272e4863fd..5496bc7d40ad 100644 --- a/arch/arm/mach-omap2/hsmmc.c +++ b/arch/arm/mach-omap2/hsmmc.c | |||
@@ -350,6 +350,11 @@ void __init omap2_hsmmc_init(struct omap2_hsmmc_info *controllers) | |||
350 | mmc->slots[0].after_set_reg = NULL; | 350 | mmc->slots[0].after_set_reg = NULL; |
351 | } | 351 | } |
352 | break; | 352 | break; |
353 | case 4: | ||
354 | case 5: | ||
355 | mmc->slots[0].before_set_reg = NULL; | ||
356 | mmc->slots[0].after_set_reg = NULL; | ||
357 | break; | ||
353 | default: | 358 | default: |
354 | pr_err("MMC%d configuration not supported!\n", c->mmc); | 359 | pr_err("MMC%d configuration not supported!\n", c->mmc); |
355 | kfree(mmc); | 360 | kfree(mmc); |
diff --git a/arch/arm/mach-omap2/hwspinlock.c b/arch/arm/mach-omap2/hwspinlock.c new file mode 100644 index 000000000000..06d4a80660a5 --- /dev/null +++ b/arch/arm/mach-omap2/hwspinlock.c | |||
@@ -0,0 +1,63 @@ | |||
1 | /* | ||
2 | * OMAP hardware spinlock device initialization | ||
3 | * | ||
4 | * Copyright (C) 2010 Texas Instruments Incorporated - http://www.ti.com | ||
5 | * | ||
6 | * Contact: Simon Que <sque@ti.com> | ||
7 | * Hari Kanigeri <h-kanigeri2@ti.com> | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or | ||
10 | * modify it under the terms of the GNU General Public License | ||
11 | * version 2 as published by the Free Software Foundation. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, but | ||
14 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
16 | * General Public License for more details. | ||
17 | */ | ||
18 | |||
19 | #include <linux/kernel.h> | ||
20 | #include <linux/init.h> | ||
21 | #include <linux/err.h> | ||
22 | |||
23 | #include <plat/omap_hwmod.h> | ||
24 | #include <plat/omap_device.h> | ||
25 | |||
26 | struct omap_device_pm_latency omap_spinlock_latency[] = { | ||
27 | { | ||
28 | .deactivate_func = omap_device_idle_hwmods, | ||
29 | .activate_func = omap_device_enable_hwmods, | ||
30 | .flags = OMAP_DEVICE_LATENCY_AUTO_ADJUST, | ||
31 | } | ||
32 | }; | ||
33 | |||
34 | int __init hwspinlocks_init(void) | ||
35 | { | ||
36 | int retval = 0; | ||
37 | struct omap_hwmod *oh; | ||
38 | struct omap_device *od; | ||
39 | const char *oh_name = "spinlock"; | ||
40 | const char *dev_name = "omap_hwspinlock"; | ||
41 | |||
42 | /* | ||
43 | * Hwmod lookup will fail in case our platform doesn't support the | ||
44 | * hardware spinlock module, so it is safe to run this initcall | ||
45 | * on all omaps | ||
46 | */ | ||
47 | oh = omap_hwmod_lookup(oh_name); | ||
48 | if (oh == NULL) | ||
49 | return -EINVAL; | ||
50 | |||
51 | od = omap_device_build(dev_name, 0, oh, NULL, 0, | ||
52 | omap_spinlock_latency, | ||
53 | ARRAY_SIZE(omap_spinlock_latency), false); | ||
54 | if (IS_ERR(od)) { | ||
55 | pr_err("Can't build omap_device for %s:%s\n", dev_name, | ||
56 | oh_name); | ||
57 | retval = PTR_ERR(od); | ||
58 | } | ||
59 | |||
60 | return retval; | ||
61 | } | ||
62 | /* early board code might need to reserve specific hwspinlock instances */ | ||
63 | postcore_initcall(hwspinlocks_init); | ||
diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c index 5f9086c65e48..3168b17bc264 100644 --- a/arch/arm/mach-omap2/id.c +++ b/arch/arm/mach-omap2/id.c | |||
@@ -6,7 +6,7 @@ | |||
6 | * Copyright (C) 2005 Nokia Corporation | 6 | * Copyright (C) 2005 Nokia Corporation |
7 | * Written by Tony Lindgren <tony@atomide.com> | 7 | * Written by Tony Lindgren <tony@atomide.com> |
8 | * | 8 | * |
9 | * Copyright (C) 2009 Texas Instruments | 9 | * Copyright (C) 2009-11 Texas Instruments |
10 | * Added OMAP4 support - Santosh Shilimkar <santosh.shilimkar@ti.com> | 10 | * Added OMAP4 support - Santosh Shilimkar <santosh.shilimkar@ti.com> |
11 | * | 11 | * |
12 | * This program is free software; you can redistribute it and/or modify | 12 | * This program is free software; you can redistribute it and/or modify |
@@ -191,12 +191,19 @@ static void __init omap3_check_features(void) | |||
191 | if (!cpu_is_omap3505() && !cpu_is_omap3517()) | 191 | if (!cpu_is_omap3505() && !cpu_is_omap3517()) |
192 | omap3_features |= OMAP3_HAS_IO_WAKEUP; | 192 | omap3_features |= OMAP3_HAS_IO_WAKEUP; |
193 | 193 | ||
194 | omap3_features |= OMAP3_HAS_SDRC; | ||
195 | |||
194 | /* | 196 | /* |
195 | * TODO: Get additional info (where applicable) | 197 | * TODO: Get additional info (where applicable) |
196 | * e.g. Size of L2 cache. | 198 | * e.g. Size of L2 cache. |
197 | */ | 199 | */ |
198 | } | 200 | } |
199 | 201 | ||
202 | static void __init ti816x_check_features(void) | ||
203 | { | ||
204 | omap3_features = OMAP3_HAS_NEON; | ||
205 | } | ||
206 | |||
200 | static void __init omap3_check_revision(void) | 207 | static void __init omap3_check_revision(void) |
201 | { | 208 | { |
202 | u32 cpuid, idcode; | 209 | u32 cpuid, idcode; |
@@ -287,6 +294,20 @@ static void __init omap3_check_revision(void) | |||
287 | omap_chip.oc |= CHIP_IS_OMAP3630ES1_2; | 294 | omap_chip.oc |= CHIP_IS_OMAP3630ES1_2; |
288 | } | 295 | } |
289 | break; | 296 | break; |
297 | case 0xb81e: | ||
298 | omap_chip.oc = CHIP_IS_TI816X; | ||
299 | |||
300 | switch (rev) { | ||
301 | case 0: | ||
302 | omap_revision = TI8168_REV_ES1_0; | ||
303 | break; | ||
304 | case 1: | ||
305 | omap_revision = TI8168_REV_ES1_1; | ||
306 | break; | ||
307 | default: | ||
308 | omap_revision = TI8168_REV_ES1_1; | ||
309 | } | ||
310 | break; | ||
290 | default: | 311 | default: |
291 | /* Unknown default to latest silicon rev as default*/ | 312 | /* Unknown default to latest silicon rev as default*/ |
292 | omap_revision = OMAP3630_REV_ES1_2; | 313 | omap_revision = OMAP3630_REV_ES1_2; |
@@ -307,7 +328,7 @@ static void __init omap4_check_revision(void) | |||
307 | */ | 328 | */ |
308 | idcode = read_tap_reg(OMAP_TAP_IDCODE); | 329 | idcode = read_tap_reg(OMAP_TAP_IDCODE); |
309 | hawkeye = (idcode >> 12) & 0xffff; | 330 | hawkeye = (idcode >> 12) & 0xffff; |
310 | rev = (idcode >> 28) & 0xff; | 331 | rev = (idcode >> 28) & 0xf; |
311 | 332 | ||
312 | /* | 333 | /* |
313 | * Few initial ES2.0 samples IDCODE is same as ES1.0 | 334 | * Few initial ES2.0 samples IDCODE is same as ES1.0 |
@@ -326,22 +347,31 @@ static void __init omap4_check_revision(void) | |||
326 | omap_chip.oc |= CHIP_IS_OMAP4430ES1; | 347 | omap_chip.oc |= CHIP_IS_OMAP4430ES1; |
327 | break; | 348 | break; |
328 | case 1: | 349 | case 1: |
350 | default: | ||
329 | omap_revision = OMAP4430_REV_ES2_0; | 351 | omap_revision = OMAP4430_REV_ES2_0; |
330 | omap_chip.oc |= CHIP_IS_OMAP4430ES2; | 352 | omap_chip.oc |= CHIP_IS_OMAP4430ES2; |
353 | } | ||
354 | break; | ||
355 | case 0xb95c: | ||
356 | switch (rev) { | ||
357 | case 3: | ||
358 | omap_revision = OMAP4430_REV_ES2_1; | ||
359 | omap_chip.oc |= CHIP_IS_OMAP4430ES2_1; | ||
331 | break; | 360 | break; |
361 | case 4: | ||
332 | default: | 362 | default: |
333 | omap_revision = OMAP4430_REV_ES2_0; | 363 | omap_revision = OMAP4430_REV_ES2_2; |
334 | omap_chip.oc |= CHIP_IS_OMAP4430ES2; | 364 | omap_chip.oc |= CHIP_IS_OMAP4430ES2_2; |
335 | } | 365 | } |
336 | break; | 366 | break; |
337 | default: | 367 | default: |
338 | /* Unknown default to latest silicon rev as default*/ | 368 | /* Unknown default to latest silicon rev as default */ |
339 | omap_revision = OMAP4430_REV_ES2_0; | 369 | omap_revision = OMAP4430_REV_ES2_2; |
340 | omap_chip.oc |= CHIP_IS_OMAP4430ES2; | 370 | omap_chip.oc |= CHIP_IS_OMAP4430ES2_2; |
341 | } | 371 | } |
342 | 372 | ||
343 | pr_info("OMAP%04x ES%d.0\n", | 373 | pr_info("OMAP%04x ES%d.%d\n", omap_rev() >> 16, |
344 | omap_rev() >> 16, ((omap_rev() >> 12) & 0xf) + 1); | 374 | ((omap_rev() >> 12) & 0xf), ((omap_rev() >> 8) & 0xf)); |
345 | } | 375 | } |
346 | 376 | ||
347 | #define OMAP3_SHOW_FEATURE(feat) \ | 377 | #define OMAP3_SHOW_FEATURE(feat) \ |
@@ -372,6 +402,8 @@ static void __init omap3_cpuinfo(void) | |||
372 | /* Already set in omap3_check_revision() */ | 402 | /* Already set in omap3_check_revision() */ |
373 | strcpy(cpu_name, "AM3505"); | 403 | strcpy(cpu_name, "AM3505"); |
374 | } | 404 | } |
405 | } else if (cpu_is_ti816x()) { | ||
406 | strcpy(cpu_name, "TI816X"); | ||
375 | } else if (omap3_has_iva() && omap3_has_sgx()) { | 407 | } else if (omap3_has_iva() && omap3_has_sgx()) { |
376 | /* OMAP3430, OMAP3525, OMAP3515, OMAP3503 devices */ | 408 | /* OMAP3430, OMAP3525, OMAP3515, OMAP3503 devices */ |
377 | strcpy(cpu_name, "OMAP3430/3530"); | 409 | strcpy(cpu_name, "OMAP3430/3530"); |
@@ -386,7 +418,7 @@ static void __init omap3_cpuinfo(void) | |||
386 | strcpy(cpu_name, "OMAP3503"); | 418 | strcpy(cpu_name, "OMAP3503"); |
387 | } | 419 | } |
388 | 420 | ||
389 | if (cpu_is_omap3630()) { | 421 | if (cpu_is_omap3630() || cpu_is_ti816x()) { |
390 | switch (rev) { | 422 | switch (rev) { |
391 | case OMAP_REVBITS_00: | 423 | case OMAP_REVBITS_00: |
392 | strcpy(cpu_rev, "1.0"); | 424 | strcpy(cpu_rev, "1.0"); |
@@ -462,7 +494,13 @@ void __init omap2_check_revision(void) | |||
462 | omap24xx_check_revision(); | 494 | omap24xx_check_revision(); |
463 | } else if (cpu_is_omap34xx()) { | 495 | } else if (cpu_is_omap34xx()) { |
464 | omap3_check_revision(); | 496 | omap3_check_revision(); |
465 | omap3_check_features(); | 497 | |
498 | /* TI816X doesn't have feature register */ | ||
499 | if (!cpu_is_ti816x()) | ||
500 | omap3_check_features(); | ||
501 | else | ||
502 | ti816x_check_features(); | ||
503 | |||
466 | omap3_cpuinfo(); | 504 | omap3_cpuinfo(); |
467 | return; | 505 | return; |
468 | } else if (cpu_is_omap44xx()) { | 506 | } else if (cpu_is_omap44xx()) { |
diff --git a/arch/arm/mach-omap2/include/mach/debug-macro.S b/arch/arm/mach-omap2/include/mach/debug-macro.S index 6a4d4136002e..e1b0f17b0927 100644 --- a/arch/arm/mach-omap2/include/mach/debug-macro.S +++ b/arch/arm/mach-omap2/include/mach/debug-macro.S | |||
@@ -69,6 +69,12 @@ omap_uart_lsr: .word 0 | |||
69 | beq 34f @ configure OMAP3UART4 | 69 | beq 34f @ configure OMAP3UART4 |
70 | cmp \rp, #OMAP4UART4 @ only on 44xx | 70 | cmp \rp, #OMAP4UART4 @ only on 44xx |
71 | beq 44f @ configure OMAP4UART4 | 71 | beq 44f @ configure OMAP4UART4 |
72 | cmp \rp, #TI816XUART1 @ ti816x UART offsets different | ||
73 | beq 81f @ configure UART1 | ||
74 | cmp \rp, #TI816XUART2 @ ti816x UART offsets different | ||
75 | beq 82f @ configure UART2 | ||
76 | cmp \rp, #TI816XUART3 @ ti816x UART offsets different | ||
77 | beq 83f @ configure UART3 | ||
72 | cmp \rp, #ZOOM_UART @ only on zoom2/3 | 78 | cmp \rp, #ZOOM_UART @ only on zoom2/3 |
73 | beq 95f @ configure ZOOM_UART | 79 | beq 95f @ configure ZOOM_UART |
74 | 80 | ||
@@ -91,6 +97,12 @@ omap_uart_lsr: .word 0 | |||
91 | b 98f | 97 | b 98f |
92 | 44: mov \rp, #UART_OFFSET(OMAP4_UART4_BASE) | 98 | 44: mov \rp, #UART_OFFSET(OMAP4_UART4_BASE) |
93 | b 98f | 99 | b 98f |
100 | 81: mov \rp, #UART_OFFSET(TI816X_UART1_BASE) | ||
101 | b 98f | ||
102 | 82: mov \rp, #UART_OFFSET(TI816X_UART2_BASE) | ||
103 | b 98f | ||
104 | 83: mov \rp, #UART_OFFSET(TI816X_UART3_BASE) | ||
105 | b 98f | ||
94 | 95: ldr \rp, =ZOOM_UART_BASE | 106 | 95: ldr \rp, =ZOOM_UART_BASE |
95 | mrc p15, 0, \rv, c1, c0 | 107 | mrc p15, 0, \rv, c1, c0 |
96 | tst \rv, #1 @ MMU enabled? | 108 | tst \rv, #1 @ MMU enabled? |
diff --git a/arch/arm/mach-omap2/include/mach/entry-macro.S b/arch/arm/mach-omap2/include/mach/entry-macro.S index 81985a665cb3..a48690b90990 100644 --- a/arch/arm/mach-omap2/include/mach/entry-macro.S +++ b/arch/arm/mach-omap2/include/mach/entry-macro.S | |||
@@ -61,6 +61,14 @@ | |||
61 | bne 9998f | 61 | bne 9998f |
62 | ldr \irqnr, [\base, #0xd8] /* IRQ pending reg 3 */ | 62 | ldr \irqnr, [\base, #0xd8] /* IRQ pending reg 3 */ |
63 | cmp \irqnr, #0x0 | 63 | cmp \irqnr, #0x0 |
64 | bne 9998f | ||
65 | |||
66 | /* | ||
67 | * ti816x has additional IRQ pending register. Checking this | ||
68 | * register on omap2 & omap3 has no effect (read as 0). | ||
69 | */ | ||
70 | ldr \irqnr, [\base, #0xf8] /* IRQ pending reg 4 */ | ||
71 | cmp \irqnr, #0x0 | ||
64 | 9998: | 72 | 9998: |
65 | ldrne \irqnr, [\base, #INTCPS_SIR_IRQ_OFFSET] | 73 | ldrne \irqnr, [\base, #INTCPS_SIR_IRQ_OFFSET] |
66 | and \irqnr, \irqnr, #ACTIVEIRQ_MASK /* Clear spurious bits */ | 74 | and \irqnr, \irqnr, #ACTIVEIRQ_MASK /* Clear spurious bits */ |
@@ -133,6 +141,11 @@ | |||
133 | bne 9999f | 141 | bne 9999f |
134 | ldr \irqnr, [\base, #0xd8] /* IRQ pending reg 3 */ | 142 | ldr \irqnr, [\base, #0xd8] /* IRQ pending reg 3 */ |
135 | cmp \irqnr, #0x0 | 143 | cmp \irqnr, #0x0 |
144 | #ifdef CONFIG_SOC_OMAPTI816X | ||
145 | bne 9999f | ||
146 | ldr \irqnr, [\base, #0xf8] /* IRQ pending reg 4 */ | ||
147 | cmp \irqnr, #0x0 | ||
148 | #endif | ||
136 | 9999: | 149 | 9999: |
137 | ldrne \irqnr, [\base, #INTCPS_SIR_IRQ_OFFSET] | 150 | ldrne \irqnr, [\base, #INTCPS_SIR_IRQ_OFFSET] |
138 | and \irqnr, \irqnr, #ACTIVEIRQ_MASK /* Clear spurious bits */ | 151 | and \irqnr, \irqnr, #ACTIVEIRQ_MASK /* Clear spurious bits */ |
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c index c2032041d26f..657f3c84687c 100644 --- a/arch/arm/mach-omap2/io.c +++ b/arch/arm/mach-omap2/io.c | |||
@@ -30,7 +30,6 @@ | |||
30 | 30 | ||
31 | #include <plat/sram.h> | 31 | #include <plat/sram.h> |
32 | #include <plat/sdrc.h> | 32 | #include <plat/sdrc.h> |
33 | #include <plat/gpmc.h> | ||
34 | #include <plat/serial.h> | 33 | #include <plat/serial.h> |
35 | 34 | ||
36 | #include "clock2xxx.h" | 35 | #include "clock2xxx.h" |
@@ -66,7 +65,7 @@ static struct map_desc omap24xx_io_desc[] __initdata = { | |||
66 | }, | 65 | }, |
67 | }; | 66 | }; |
68 | 67 | ||
69 | #ifdef CONFIG_ARCH_OMAP2420 | 68 | #ifdef CONFIG_SOC_OMAP2420 |
70 | static struct map_desc omap242x_io_desc[] __initdata = { | 69 | static struct map_desc omap242x_io_desc[] __initdata = { |
71 | { | 70 | { |
72 | .virtual = DSP_MEM_2420_VIRT, | 71 | .virtual = DSP_MEM_2420_VIRT, |
@@ -90,7 +89,7 @@ static struct map_desc omap242x_io_desc[] __initdata = { | |||
90 | 89 | ||
91 | #endif | 90 | #endif |
92 | 91 | ||
93 | #ifdef CONFIG_ARCH_OMAP2430 | 92 | #ifdef CONFIG_SOC_OMAP2430 |
94 | static struct map_desc omap243x_io_desc[] __initdata = { | 93 | static struct map_desc omap243x_io_desc[] __initdata = { |
95 | { | 94 | { |
96 | .virtual = L4_WK_243X_VIRT, | 95 | .virtual = L4_WK_243X_VIRT, |
@@ -175,6 +174,18 @@ static struct map_desc omap34xx_io_desc[] __initdata = { | |||
175 | #endif | 174 | #endif |
176 | }; | 175 | }; |
177 | #endif | 176 | #endif |
177 | |||
178 | #ifdef CONFIG_SOC_OMAPTI816X | ||
179 | static struct map_desc omapti816x_io_desc[] __initdata = { | ||
180 | { | ||
181 | .virtual = L4_34XX_VIRT, | ||
182 | .pfn = __phys_to_pfn(L4_34XX_PHYS), | ||
183 | .length = L4_34XX_SIZE, | ||
184 | .type = MT_DEVICE | ||
185 | }, | ||
186 | }; | ||
187 | #endif | ||
188 | |||
178 | #ifdef CONFIG_ARCH_OMAP4 | 189 | #ifdef CONFIG_ARCH_OMAP4 |
179 | static struct map_desc omap44xx_io_desc[] __initdata = { | 190 | static struct map_desc omap44xx_io_desc[] __initdata = { |
180 | { | 191 | { |
@@ -241,7 +252,7 @@ static void __init _omap2_map_common_io(void) | |||
241 | omap_sram_init(); | 252 | omap_sram_init(); |
242 | } | 253 | } |
243 | 254 | ||
244 | #ifdef CONFIG_ARCH_OMAP2420 | 255 | #ifdef CONFIG_SOC_OMAP2420 |
245 | void __init omap242x_map_common_io(void) | 256 | void __init omap242x_map_common_io(void) |
246 | { | 257 | { |
247 | iotable_init(omap24xx_io_desc, ARRAY_SIZE(omap24xx_io_desc)); | 258 | iotable_init(omap24xx_io_desc, ARRAY_SIZE(omap24xx_io_desc)); |
@@ -250,7 +261,7 @@ void __init omap242x_map_common_io(void) | |||
250 | } | 261 | } |
251 | #endif | 262 | #endif |
252 | 263 | ||
253 | #ifdef CONFIG_ARCH_OMAP2430 | 264 | #ifdef CONFIG_SOC_OMAP2430 |
254 | void __init omap243x_map_common_io(void) | 265 | void __init omap243x_map_common_io(void) |
255 | { | 266 | { |
256 | iotable_init(omap24xx_io_desc, ARRAY_SIZE(omap24xx_io_desc)); | 267 | iotable_init(omap24xx_io_desc, ARRAY_SIZE(omap24xx_io_desc)); |
@@ -267,6 +278,14 @@ void __init omap34xx_map_common_io(void) | |||
267 | } | 278 | } |
268 | #endif | 279 | #endif |
269 | 280 | ||
281 | #ifdef CONFIG_SOC_OMAPTI816X | ||
282 | void __init omapti816x_map_common_io(void) | ||
283 | { | ||
284 | iotable_init(omapti816x_io_desc, ARRAY_SIZE(omapti816x_io_desc)); | ||
285 | _omap2_map_common_io(); | ||
286 | } | ||
287 | #endif | ||
288 | |||
270 | #ifdef CONFIG_ARCH_OMAP4 | 289 | #ifdef CONFIG_ARCH_OMAP4 |
271 | void __init omap44xx_map_common_io(void) | 290 | void __init omap44xx_map_common_io(void) |
272 | { | 291 | { |
@@ -398,15 +417,10 @@ void __init omap2_init_common_infrastructure(void) | |||
398 | void __init omap2_init_common_devices(struct omap_sdrc_params *sdrc_cs0, | 417 | void __init omap2_init_common_devices(struct omap_sdrc_params *sdrc_cs0, |
399 | struct omap_sdrc_params *sdrc_cs1) | 418 | struct omap_sdrc_params *sdrc_cs1) |
400 | { | 419 | { |
401 | omap_serial_early_init(); | 420 | if (cpu_is_omap24xx() || omap3_has_sdrc()) { |
402 | |||
403 | omap_hwmod_late_init(); | ||
404 | |||
405 | if (cpu_is_omap24xx() || cpu_is_omap34xx()) { | ||
406 | omap2_sdrc_init(sdrc_cs0, sdrc_cs1); | 421 | omap2_sdrc_init(sdrc_cs0, sdrc_cs1); |
407 | _omap2_init_reprogram_sdrc(); | 422 | _omap2_init_reprogram_sdrc(); |
408 | } | 423 | } |
409 | gpmc_init(); | ||
410 | 424 | ||
411 | omap_irq_base_init(); | 425 | omap_irq_base_init(); |
412 | } | 426 | } |
diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c index 23049c487c47..bc524b94fd59 100644 --- a/arch/arm/mach-omap2/irq.c +++ b/arch/arm/mach-omap2/irq.c | |||
@@ -61,8 +61,6 @@ struct omap3_intc_regs { | |||
61 | u32 mir[INTCPS_NR_MIR_REGS]; | 61 | u32 mir[INTCPS_NR_MIR_REGS]; |
62 | }; | 62 | }; |
63 | 63 | ||
64 | static struct omap3_intc_regs intc_context[ARRAY_SIZE(irq_banks)]; | ||
65 | |||
66 | /* INTC bank register get/set */ | 64 | /* INTC bank register get/set */ |
67 | 65 | ||
68 | static void intc_bank_write_reg(u32 val, struct omap_irq_bank *bank, u16 reg) | 66 | static void intc_bank_write_reg(u32 val, struct omap_irq_bank *bank, u16 reg) |
@@ -110,7 +108,7 @@ static void omap_mask_irq(struct irq_data *d) | |||
110 | unsigned int irq = d->irq; | 108 | unsigned int irq = d->irq; |
111 | int offset = irq & (~(IRQ_BITS_PER_REG - 1)); | 109 | int offset = irq & (~(IRQ_BITS_PER_REG - 1)); |
112 | 110 | ||
113 | if (cpu_is_omap34xx()) { | 111 | if (cpu_is_omap34xx() && !cpu_is_ti816x()) { |
114 | int spurious = 0; | 112 | int spurious = 0; |
115 | 113 | ||
116 | /* | 114 | /* |
@@ -205,6 +203,9 @@ void __init omap_init_irq(void) | |||
205 | 203 | ||
206 | BUG_ON(!base); | 204 | BUG_ON(!base); |
207 | 205 | ||
206 | if (cpu_is_ti816x()) | ||
207 | bank->nr_irqs = 128; | ||
208 | |||
208 | /* Static mapping, never released */ | 209 | /* Static mapping, never released */ |
209 | bank->base_reg = ioremap(base, SZ_4K); | 210 | bank->base_reg = ioremap(base, SZ_4K); |
210 | if (!bank->base_reg) { | 211 | if (!bank->base_reg) { |
@@ -229,6 +230,8 @@ void __init omap_init_irq(void) | |||
229 | } | 230 | } |
230 | 231 | ||
231 | #ifdef CONFIG_ARCH_OMAP3 | 232 | #ifdef CONFIG_ARCH_OMAP3 |
233 | static struct omap3_intc_regs intc_context[ARRAY_SIZE(irq_banks)]; | ||
234 | |||
232 | void omap_intc_save_context(void) | 235 | void omap_intc_save_context(void) |
233 | { | 236 | { |
234 | int ind = 0, i = 0; | 237 | int ind = 0, i = 0; |
diff --git a/arch/arm/mach-omap2/mailbox.c b/arch/arm/mach-omap2/mailbox.c index 0a585dfa9874..537d3484b475 100644 --- a/arch/arm/mach-omap2/mailbox.c +++ b/arch/arm/mach-omap2/mailbox.c | |||
@@ -310,7 +310,7 @@ struct omap_mbox mbox_dsp_info = { | |||
310 | struct omap_mbox *omap3_mboxes[] = { &mbox_dsp_info, NULL }; | 310 | struct omap_mbox *omap3_mboxes[] = { &mbox_dsp_info, NULL }; |
311 | #endif | 311 | #endif |
312 | 312 | ||
313 | #if defined(CONFIG_ARCH_OMAP2420) | 313 | #if defined(CONFIG_SOC_OMAP2420) |
314 | /* IVA */ | 314 | /* IVA */ |
315 | static struct omap_mbox2_priv omap2_mbox_iva_priv = { | 315 | static struct omap_mbox2_priv omap2_mbox_iva_priv = { |
316 | .tx_fifo = { | 316 | .tx_fifo = { |
diff --git a/arch/arm/mach-omap2/mcbsp.c b/arch/arm/mach-omap2/mcbsp.c index f9c9df5b5ff1..0526b758bdcc 100644 --- a/arch/arm/mach-omap2/mcbsp.c +++ b/arch/arm/mach-omap2/mcbsp.c | |||
@@ -104,7 +104,7 @@ EXPORT_SYMBOL(omap2_mcbsp_set_clks_src); | |||
104 | 104 | ||
105 | /* Platform data */ | 105 | /* Platform data */ |
106 | 106 | ||
107 | #ifdef CONFIG_ARCH_OMAP2420 | 107 | #ifdef CONFIG_SOC_OMAP2420 |
108 | static struct omap_mcbsp_platform_data omap2420_mcbsp_pdata[] = { | 108 | static struct omap_mcbsp_platform_data omap2420_mcbsp_pdata[] = { |
109 | { | 109 | { |
110 | .phys_base = OMAP24XX_MCBSP1_BASE, | 110 | .phys_base = OMAP24XX_MCBSP1_BASE, |
@@ -129,7 +129,7 @@ static struct omap_mcbsp_platform_data omap2420_mcbsp_pdata[] = { | |||
129 | #define OMAP2420_MCBSP_REG_NUM 0 | 129 | #define OMAP2420_MCBSP_REG_NUM 0 |
130 | #endif | 130 | #endif |
131 | 131 | ||
132 | #ifdef CONFIG_ARCH_OMAP2430 | 132 | #ifdef CONFIG_SOC_OMAP2430 |
133 | static struct omap_mcbsp_platform_data omap2430_mcbsp_pdata[] = { | 133 | static struct omap_mcbsp_platform_data omap2430_mcbsp_pdata[] = { |
134 | { | 134 | { |
135 | .phys_base = OMAP24XX_MCBSP1_BASE, | 135 | .phys_base = OMAP24XX_MCBSP1_BASE, |
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index e282e35769fd..f76f133780c8 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * omap_hwmod implementation for OMAP2/3/4 | 2 | * omap_hwmod implementation for OMAP2/3/4 |
3 | * | 3 | * |
4 | * Copyright (C) 2009-2010 Nokia Corporation | 4 | * Copyright (C) 2009-2011 Nokia Corporation |
5 | * | 5 | * |
6 | * Paul Walmsley, Benoît Cousson, Kevin Hilman | 6 | * Paul Walmsley, Benoît Cousson, Kevin Hilman |
7 | * | 7 | * |
@@ -162,9 +162,6 @@ static LIST_HEAD(omap_hwmod_list); | |||
162 | /* mpu_oh: used to add/remove MPU initiator from sleepdep list */ | 162 | /* mpu_oh: used to add/remove MPU initiator from sleepdep list */ |
163 | static struct omap_hwmod *mpu_oh; | 163 | static struct omap_hwmod *mpu_oh; |
164 | 164 | ||
165 | /* inited: 0 if omap_hwmod_init() has not yet been called; 1 otherwise */ | ||
166 | static u8 inited; | ||
167 | |||
168 | 165 | ||
169 | /* Private functions */ | 166 | /* Private functions */ |
170 | 167 | ||
@@ -904,18 +901,16 @@ static struct omap_hwmod *_lookup(const char *name) | |||
904 | * @oh: struct omap_hwmod * | 901 | * @oh: struct omap_hwmod * |
905 | * @data: not used; pass NULL | 902 | * @data: not used; pass NULL |
906 | * | 903 | * |
907 | * Called by omap_hwmod_late_init() (after omap2_clk_init()). | 904 | * Called by omap_hwmod_setup_*() (after omap2_clk_init()). |
908 | * Resolves all clock names embedded in the hwmod. Returns -EINVAL if | 905 | * Resolves all clock names embedded in the hwmod. Returns 0 on |
909 | * the omap_hwmod has not yet been registered or if the clocks have | 906 | * success, or a negative error code on failure. |
910 | * already been initialized, 0 on success, or a non-zero error on | ||
911 | * failure. | ||
912 | */ | 907 | */ |
913 | static int _init_clocks(struct omap_hwmod *oh, void *data) | 908 | static int _init_clocks(struct omap_hwmod *oh, void *data) |
914 | { | 909 | { |
915 | int ret = 0; | 910 | int ret = 0; |
916 | 911 | ||
917 | if (!oh || (oh->_state != _HWMOD_STATE_REGISTERED)) | 912 | if (oh->_state != _HWMOD_STATE_REGISTERED) |
918 | return -EINVAL; | 913 | return 0; |
919 | 914 | ||
920 | pr_debug("omap_hwmod: %s: looking up clocks\n", oh->name); | 915 | pr_debug("omap_hwmod: %s: looking up clocks\n", oh->name); |
921 | 916 | ||
@@ -1354,14 +1349,16 @@ static int _shutdown(struct omap_hwmod *oh) | |||
1354 | * @oh: struct omap_hwmod * | 1349 | * @oh: struct omap_hwmod * |
1355 | * | 1350 | * |
1356 | * Writes the CLOCKACTIVITY bits @clockact to the hwmod @oh | 1351 | * Writes the CLOCKACTIVITY bits @clockact to the hwmod @oh |
1357 | * OCP_SYSCONFIG register. Returns -EINVAL if the hwmod is in the | 1352 | * OCP_SYSCONFIG register. Returns 0. |
1358 | * wrong state or returns 0. | ||
1359 | */ | 1353 | */ |
1360 | static int _setup(struct omap_hwmod *oh, void *data) | 1354 | static int _setup(struct omap_hwmod *oh, void *data) |
1361 | { | 1355 | { |
1362 | int i, r; | 1356 | int i, r; |
1363 | u8 postsetup_state; | 1357 | u8 postsetup_state; |
1364 | 1358 | ||
1359 | if (oh->_state != _HWMOD_STATE_CLKS_INITED) | ||
1360 | return 0; | ||
1361 | |||
1365 | /* Set iclk autoidle mode */ | 1362 | /* Set iclk autoidle mode */ |
1366 | if (oh->slaves_cnt > 0) { | 1363 | if (oh->slaves_cnt > 0) { |
1367 | for (i = 0; i < oh->slaves_cnt; i++) { | 1364 | for (i = 0; i < oh->slaves_cnt; i++) { |
@@ -1455,7 +1452,7 @@ static int _setup(struct omap_hwmod *oh, void *data) | |||
1455 | */ | 1452 | */ |
1456 | static int __init _register(struct omap_hwmod *oh) | 1453 | static int __init _register(struct omap_hwmod *oh) |
1457 | { | 1454 | { |
1458 | int ret, ms_id; | 1455 | int ms_id; |
1459 | 1456 | ||
1460 | if (!oh || !oh->name || !oh->class || !oh->class->name || | 1457 | if (!oh || !oh->name || !oh->class || !oh->class->name || |
1461 | (oh->_state != _HWMOD_STATE_UNKNOWN)) | 1458 | (oh->_state != _HWMOD_STATE_UNKNOWN)) |
@@ -1467,12 +1464,10 @@ static int __init _register(struct omap_hwmod *oh) | |||
1467 | return -EEXIST; | 1464 | return -EEXIST; |
1468 | 1465 | ||
1469 | ms_id = _find_mpu_port_index(oh); | 1466 | ms_id = _find_mpu_port_index(oh); |
1470 | if (!IS_ERR_VALUE(ms_id)) { | 1467 | if (!IS_ERR_VALUE(ms_id)) |
1471 | oh->_mpu_port_index = ms_id; | 1468 | oh->_mpu_port_index = ms_id; |
1472 | oh->_mpu_rt_va = _find_mpu_rt_base(oh, oh->_mpu_port_index); | 1469 | else |
1473 | } else { | ||
1474 | oh->_int_flags |= _HWMOD_NO_MPU_PORT; | 1470 | oh->_int_flags |= _HWMOD_NO_MPU_PORT; |
1475 | } | ||
1476 | 1471 | ||
1477 | list_add_tail(&oh->node, &omap_hwmod_list); | 1472 | list_add_tail(&oh->node, &omap_hwmod_list); |
1478 | 1473 | ||
@@ -1480,9 +1475,14 @@ static int __init _register(struct omap_hwmod *oh) | |||
1480 | 1475 | ||
1481 | oh->_state = _HWMOD_STATE_REGISTERED; | 1476 | oh->_state = _HWMOD_STATE_REGISTERED; |
1482 | 1477 | ||
1483 | ret = 0; | 1478 | /* |
1479 | * XXX Rather than doing a strcmp(), this should test a flag | ||
1480 | * set in the hwmod data, inserted by the autogenerator code. | ||
1481 | */ | ||
1482 | if (!strcmp(oh->name, MPU_INITIATOR_NAME)) | ||
1483 | mpu_oh = oh; | ||
1484 | 1484 | ||
1485 | return ret; | 1485 | return 0; |
1486 | } | 1486 | } |
1487 | 1487 | ||
1488 | 1488 | ||
@@ -1585,65 +1585,132 @@ int omap_hwmod_for_each(int (*fn)(struct omap_hwmod *oh, void *data), | |||
1585 | return ret; | 1585 | return ret; |
1586 | } | 1586 | } |
1587 | 1587 | ||
1588 | |||
1589 | /** | 1588 | /** |
1590 | * omap_hwmod_init - init omap_hwmod code and register hwmods | 1589 | * omap_hwmod_register - register an array of hwmods |
1591 | * @ohs: pointer to an array of omap_hwmods to register | 1590 | * @ohs: pointer to an array of omap_hwmods to register |
1592 | * | 1591 | * |
1593 | * Intended to be called early in boot before the clock framework is | 1592 | * Intended to be called early in boot before the clock framework is |
1594 | * initialized. If @ohs is not null, will register all omap_hwmods | 1593 | * initialized. If @ohs is not null, will register all omap_hwmods |
1595 | * listed in @ohs that are valid for this chip. Returns -EINVAL if | 1594 | * listed in @ohs that are valid for this chip. Returns 0. |
1596 | * omap_hwmod_init() has already been called or 0 otherwise. | 1595 | */ |
1596 | int __init omap_hwmod_register(struct omap_hwmod **ohs) | ||
1597 | { | ||
1598 | int r, i; | ||
1599 | |||
1600 | if (!ohs) | ||
1601 | return 0; | ||
1602 | |||
1603 | i = 0; | ||
1604 | do { | ||
1605 | if (!omap_chip_is(ohs[i]->omap_chip)) | ||
1606 | continue; | ||
1607 | |||
1608 | r = _register(ohs[i]); | ||
1609 | WARN(r, "omap_hwmod: %s: _register returned %d\n", ohs[i]->name, | ||
1610 | r); | ||
1611 | } while (ohs[++i]); | ||
1612 | |||
1613 | return 0; | ||
1614 | } | ||
1615 | |||
1616 | /* | ||
1617 | * _populate_mpu_rt_base - populate the virtual address for a hwmod | ||
1618 | * | ||
1619 | * Must be called only from omap_hwmod_setup_*() so ioremap works properly. | ||
1620 | * Assumes the caller takes care of locking if needed. | ||
1597 | */ | 1621 | */ |
1598 | int __init omap_hwmod_init(struct omap_hwmod **ohs) | 1622 | static int __init _populate_mpu_rt_base(struct omap_hwmod *oh, void *data) |
1623 | { | ||
1624 | if (oh->_state != _HWMOD_STATE_REGISTERED) | ||
1625 | return 0; | ||
1626 | |||
1627 | if (oh->_int_flags & _HWMOD_NO_MPU_PORT) | ||
1628 | return 0; | ||
1629 | |||
1630 | oh->_mpu_rt_va = _find_mpu_rt_base(oh, oh->_mpu_port_index); | ||
1631 | if (!oh->_mpu_rt_va) | ||
1632 | pr_warning("omap_hwmod: %s found no _mpu_rt_va for %s\n", | ||
1633 | __func__, oh->name); | ||
1634 | |||
1635 | return 0; | ||
1636 | } | ||
1637 | |||
1638 | /** | ||
1639 | * omap_hwmod_setup_one - set up a single hwmod | ||
1640 | * @oh_name: const char * name of the already-registered hwmod to set up | ||
1641 | * | ||
1642 | * Must be called after omap2_clk_init(). Resolves the struct clk | ||
1643 | * names to struct clk pointers for each registered omap_hwmod. Also | ||
1644 | * calls _setup() on each hwmod. Returns -EINVAL upon error or 0 upon | ||
1645 | * success. | ||
1646 | */ | ||
1647 | int __init omap_hwmod_setup_one(const char *oh_name) | ||
1599 | { | 1648 | { |
1600 | struct omap_hwmod *oh; | 1649 | struct omap_hwmod *oh; |
1601 | int r; | 1650 | int r; |
1602 | 1651 | ||
1603 | if (inited) | 1652 | pr_debug("omap_hwmod: %s: %s\n", oh_name, __func__); |
1653 | |||
1654 | if (!mpu_oh) { | ||
1655 | pr_err("omap_hwmod: %s: cannot setup_one: MPU initiator hwmod %s not yet registered\n", | ||
1656 | oh_name, MPU_INITIATOR_NAME); | ||
1604 | return -EINVAL; | 1657 | return -EINVAL; |
1658 | } | ||
1605 | 1659 | ||
1606 | inited = 1; | 1660 | oh = _lookup(oh_name); |
1661 | if (!oh) { | ||
1662 | WARN(1, "omap_hwmod: %s: hwmod not yet registered\n", oh_name); | ||
1663 | return -EINVAL; | ||
1664 | } | ||
1607 | 1665 | ||
1608 | if (!ohs) | 1666 | if (mpu_oh->_state == _HWMOD_STATE_REGISTERED && oh != mpu_oh) |
1609 | return 0; | 1667 | omap_hwmod_setup_one(MPU_INITIATOR_NAME); |
1610 | 1668 | ||
1611 | oh = *ohs; | 1669 | r = _populate_mpu_rt_base(oh, NULL); |
1612 | while (oh) { | 1670 | if (IS_ERR_VALUE(r)) { |
1613 | if (omap_chip_is(oh->omap_chip)) { | 1671 | WARN(1, "omap_hwmod: %s: couldn't set mpu_rt_base\n", oh_name); |
1614 | r = _register(oh); | 1672 | return -EINVAL; |
1615 | WARN(r, "omap_hwmod: %s: _register returned " | 1673 | } |
1616 | "%d\n", oh->name, r); | 1674 | |
1617 | } | 1675 | r = _init_clocks(oh, NULL); |
1618 | oh = *++ohs; | 1676 | if (IS_ERR_VALUE(r)) { |
1677 | WARN(1, "omap_hwmod: %s: couldn't init clocks\n", oh_name); | ||
1678 | return -EINVAL; | ||
1619 | } | 1679 | } |
1620 | 1680 | ||
1681 | _setup(oh, NULL); | ||
1682 | |||
1621 | return 0; | 1683 | return 0; |
1622 | } | 1684 | } |
1623 | 1685 | ||
1624 | /** | 1686 | /** |
1625 | * omap_hwmod_late_init - do some post-clock framework initialization | 1687 | * omap_hwmod_setup - do some post-clock framework initialization |
1626 | * | 1688 | * |
1627 | * Must be called after omap2_clk_init(). Resolves the struct clk names | 1689 | * Must be called after omap2_clk_init(). Resolves the struct clk names |
1628 | * to struct clk pointers for each registered omap_hwmod. Also calls | 1690 | * to struct clk pointers for each registered omap_hwmod. Also calls |
1629 | * _setup() on each hwmod. Returns 0. | 1691 | * _setup() on each hwmod. Returns 0 upon success. |
1630 | */ | 1692 | */ |
1631 | int omap_hwmod_late_init(void) | 1693 | static int __init omap_hwmod_setup_all(void) |
1632 | { | 1694 | { |
1633 | int r; | 1695 | int r; |
1634 | 1696 | ||
1635 | /* XXX check return value */ | 1697 | if (!mpu_oh) { |
1636 | r = omap_hwmod_for_each(_init_clocks, NULL); | 1698 | pr_err("omap_hwmod: %s: MPU initiator hwmod %s not yet registered\n", |
1637 | WARN(r, "omap_hwmod: omap_hwmod_late_init(): _init_clocks failed\n"); | 1699 | __func__, MPU_INITIATOR_NAME); |
1700 | return -EINVAL; | ||
1701 | } | ||
1702 | |||
1703 | r = omap_hwmod_for_each(_populate_mpu_rt_base, NULL); | ||
1638 | 1704 | ||
1639 | mpu_oh = omap_hwmod_lookup(MPU_INITIATOR_NAME); | 1705 | r = omap_hwmod_for_each(_init_clocks, NULL); |
1640 | WARN(!mpu_oh, "omap_hwmod: could not find MPU initiator hwmod %s\n", | 1706 | WARN(IS_ERR_VALUE(r), |
1641 | MPU_INITIATOR_NAME); | 1707 | "omap_hwmod: %s: _init_clocks failed\n", __func__); |
1642 | 1708 | ||
1643 | omap_hwmod_for_each(_setup, NULL); | 1709 | omap_hwmod_for_each(_setup, NULL); |
1644 | 1710 | ||
1645 | return 0; | 1711 | return 0; |
1646 | } | 1712 | } |
1713 | core_initcall(omap_hwmod_setup_all); | ||
1647 | 1714 | ||
1648 | /** | 1715 | /** |
1649 | * omap_hwmod_enable - enable an omap_hwmod | 1716 | * omap_hwmod_enable - enable an omap_hwmod |
@@ -2162,11 +2229,11 @@ int omap_hwmod_for_each_by_class(const char *classname, | |||
2162 | * @oh: struct omap_hwmod * | 2229 | * @oh: struct omap_hwmod * |
2163 | * @state: state that _setup() should leave the hwmod in | 2230 | * @state: state that _setup() should leave the hwmod in |
2164 | * | 2231 | * |
2165 | * Sets the hwmod state that @oh will enter at the end of _setup() (called by | 2232 | * Sets the hwmod state that @oh will enter at the end of _setup() |
2166 | * omap_hwmod_late_init()). Only valid to call between calls to | 2233 | * (called by omap_hwmod_setup_*()). Only valid to call between |
2167 | * omap_hwmod_init() and omap_hwmod_late_init(). Returns 0 upon success or | 2234 | * calling omap_hwmod_register() and omap_hwmod_setup_*(). Returns |
2168 | * -EINVAL if there is a problem with the arguments or if the hwmod is | 2235 | * 0 upon success or -EINVAL if there is a problem with the arguments |
2169 | * in the wrong state. | 2236 | * or if the hwmod is in the wrong state. |
2170 | */ | 2237 | */ |
2171 | int omap_hwmod_set_postsetup_state(struct omap_hwmod *oh, u8 state) | 2238 | int omap_hwmod_set_postsetup_state(struct omap_hwmod *oh, u8 state) |
2172 | { | 2239 | { |
diff --git a/arch/arm/mach-omap2/omap_hwmod_2420_data.c b/arch/arm/mach-omap2/omap_hwmod_2420_data.c index b85c630b64d6..e58621aa9b34 100644 --- a/arch/arm/mach-omap2/omap_hwmod_2420_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_2420_data.c | |||
@@ -18,6 +18,10 @@ | |||
18 | #include <plat/serial.h> | 18 | #include <plat/serial.h> |
19 | #include <plat/i2c.h> | 19 | #include <plat/i2c.h> |
20 | #include <plat/gpio.h> | 20 | #include <plat/gpio.h> |
21 | #include <plat/mcspi.h> | ||
22 | #include <plat/dmtimer.h> | ||
23 | #include <plat/l3_2xxx.h> | ||
24 | #include <plat/l4_2xxx.h> | ||
21 | 25 | ||
22 | #include "omap_hwmod_common_data.h" | 26 | #include "omap_hwmod_common_data.h" |
23 | 27 | ||
@@ -38,12 +42,18 @@ static struct omap_hwmod omap2420_mpu_hwmod; | |||
38 | static struct omap_hwmod omap2420_iva_hwmod; | 42 | static struct omap_hwmod omap2420_iva_hwmod; |
39 | static struct omap_hwmod omap2420_l3_main_hwmod; | 43 | static struct omap_hwmod omap2420_l3_main_hwmod; |
40 | static struct omap_hwmod omap2420_l4_core_hwmod; | 44 | static struct omap_hwmod omap2420_l4_core_hwmod; |
45 | static struct omap_hwmod omap2420_dss_core_hwmod; | ||
46 | static struct omap_hwmod omap2420_dss_dispc_hwmod; | ||
47 | static struct omap_hwmod omap2420_dss_rfbi_hwmod; | ||
48 | static struct omap_hwmod omap2420_dss_venc_hwmod; | ||
41 | static struct omap_hwmod omap2420_wd_timer2_hwmod; | 49 | static struct omap_hwmod omap2420_wd_timer2_hwmod; |
42 | static struct omap_hwmod omap2420_gpio1_hwmod; | 50 | static struct omap_hwmod omap2420_gpio1_hwmod; |
43 | static struct omap_hwmod omap2420_gpio2_hwmod; | 51 | static struct omap_hwmod omap2420_gpio2_hwmod; |
44 | static struct omap_hwmod omap2420_gpio3_hwmod; | 52 | static struct omap_hwmod omap2420_gpio3_hwmod; |
45 | static struct omap_hwmod omap2420_gpio4_hwmod; | 53 | static struct omap_hwmod omap2420_gpio4_hwmod; |
46 | static struct omap_hwmod omap2420_dma_system_hwmod; | 54 | static struct omap_hwmod omap2420_dma_system_hwmod; |
55 | static struct omap_hwmod omap2420_mcspi1_hwmod; | ||
56 | static struct omap_hwmod omap2420_mcspi2_hwmod; | ||
47 | 57 | ||
48 | /* L3 -> L4_CORE interface */ | 58 | /* L3 -> L4_CORE interface */ |
49 | static struct omap_hwmod_ocp_if omap2420_l3_main__l4_core = { | 59 | static struct omap_hwmod_ocp_if omap2420_l3_main__l4_core = { |
@@ -64,6 +74,19 @@ static struct omap_hwmod_ocp_if *omap2420_l3_main_slaves[] = { | |||
64 | &omap2420_mpu__l3_main, | 74 | &omap2420_mpu__l3_main, |
65 | }; | 75 | }; |
66 | 76 | ||
77 | /* DSS -> l3 */ | ||
78 | static struct omap_hwmod_ocp_if omap2420_dss__l3 = { | ||
79 | .master = &omap2420_dss_core_hwmod, | ||
80 | .slave = &omap2420_l3_main_hwmod, | ||
81 | .fw = { | ||
82 | .omap2 = { | ||
83 | .l3_perm_bit = OMAP2_L3_CORE_FW_CONNID_DSS, | ||
84 | .flags = OMAP_FIREWALL_L3, | ||
85 | } | ||
86 | }, | ||
87 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
88 | }; | ||
89 | |||
67 | /* Master interfaces on the L3 interconnect */ | 90 | /* Master interfaces on the L3 interconnect */ |
68 | static struct omap_hwmod_ocp_if *omap2420_l3_main_masters[] = { | 91 | static struct omap_hwmod_ocp_if *omap2420_l3_main_masters[] = { |
69 | &omap2420_l3_main__l4_core, | 92 | &omap2420_l3_main__l4_core, |
@@ -88,6 +111,42 @@ static struct omap_hwmod omap2420_uart3_hwmod; | |||
88 | static struct omap_hwmod omap2420_i2c1_hwmod; | 111 | static struct omap_hwmod omap2420_i2c1_hwmod; |
89 | static struct omap_hwmod omap2420_i2c2_hwmod; | 112 | static struct omap_hwmod omap2420_i2c2_hwmod; |
90 | 113 | ||
114 | /* l4 core -> mcspi1 interface */ | ||
115 | static struct omap_hwmod_addr_space omap2420_mcspi1_addr_space[] = { | ||
116 | { | ||
117 | .pa_start = 0x48098000, | ||
118 | .pa_end = 0x480980ff, | ||
119 | .flags = ADDR_TYPE_RT, | ||
120 | }, | ||
121 | }; | ||
122 | |||
123 | static struct omap_hwmod_ocp_if omap2420_l4_core__mcspi1 = { | ||
124 | .master = &omap2420_l4_core_hwmod, | ||
125 | .slave = &omap2420_mcspi1_hwmod, | ||
126 | .clk = "mcspi1_ick", | ||
127 | .addr = omap2420_mcspi1_addr_space, | ||
128 | .addr_cnt = ARRAY_SIZE(omap2420_mcspi1_addr_space), | ||
129 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
130 | }; | ||
131 | |||
132 | /* l4 core -> mcspi2 interface */ | ||
133 | static struct omap_hwmod_addr_space omap2420_mcspi2_addr_space[] = { | ||
134 | { | ||
135 | .pa_start = 0x4809a000, | ||
136 | .pa_end = 0x4809a0ff, | ||
137 | .flags = ADDR_TYPE_RT, | ||
138 | }, | ||
139 | }; | ||
140 | |||
141 | static struct omap_hwmod_ocp_if omap2420_l4_core__mcspi2 = { | ||
142 | .master = &omap2420_l4_core_hwmod, | ||
143 | .slave = &omap2420_mcspi2_hwmod, | ||
144 | .clk = "mcspi2_ick", | ||
145 | .addr = omap2420_mcspi2_addr_space, | ||
146 | .addr_cnt = ARRAY_SIZE(omap2420_mcspi2_addr_space), | ||
147 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
148 | }; | ||
149 | |||
91 | /* L4_CORE -> L4_WKUP interface */ | 150 | /* L4_CORE -> L4_WKUP interface */ |
92 | static struct omap_hwmod_ocp_if omap2420_l4_core__l4_wkup = { | 151 | static struct omap_hwmod_ocp_if omap2420_l4_core__l4_wkup = { |
93 | .master = &omap2420_l4_core_hwmod, | 152 | .master = &omap2420_l4_core_hwmod, |
@@ -279,6 +338,625 @@ static struct omap_hwmod omap2420_iva_hwmod = { | |||
279 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420) | 338 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420) |
280 | }; | 339 | }; |
281 | 340 | ||
341 | /* Timer Common */ | ||
342 | static struct omap_hwmod_class_sysconfig omap2420_timer_sysc = { | ||
343 | .rev_offs = 0x0000, | ||
344 | .sysc_offs = 0x0010, | ||
345 | .syss_offs = 0x0014, | ||
346 | .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_CLOCKACTIVITY | | ||
347 | SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET | | ||
348 | SYSC_HAS_AUTOIDLE), | ||
349 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | ||
350 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
351 | }; | ||
352 | |||
353 | static struct omap_hwmod_class omap2420_timer_hwmod_class = { | ||
354 | .name = "timer", | ||
355 | .sysc = &omap2420_timer_sysc, | ||
356 | .rev = OMAP_TIMER_IP_VERSION_1, | ||
357 | }; | ||
358 | |||
359 | /* timer1 */ | ||
360 | static struct omap_hwmod omap2420_timer1_hwmod; | ||
361 | static struct omap_hwmod_irq_info omap2420_timer1_mpu_irqs[] = { | ||
362 | { .irq = 37, }, | ||
363 | }; | ||
364 | |||
365 | static struct omap_hwmod_addr_space omap2420_timer1_addrs[] = { | ||
366 | { | ||
367 | .pa_start = 0x48028000, | ||
368 | .pa_end = 0x48028000 + SZ_1K - 1, | ||
369 | .flags = ADDR_TYPE_RT | ||
370 | }, | ||
371 | }; | ||
372 | |||
373 | /* l4_wkup -> timer1 */ | ||
374 | static struct omap_hwmod_ocp_if omap2420_l4_wkup__timer1 = { | ||
375 | .master = &omap2420_l4_wkup_hwmod, | ||
376 | .slave = &omap2420_timer1_hwmod, | ||
377 | .clk = "gpt1_ick", | ||
378 | .addr = omap2420_timer1_addrs, | ||
379 | .addr_cnt = ARRAY_SIZE(omap2420_timer1_addrs), | ||
380 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
381 | }; | ||
382 | |||
383 | /* timer1 slave port */ | ||
384 | static struct omap_hwmod_ocp_if *omap2420_timer1_slaves[] = { | ||
385 | &omap2420_l4_wkup__timer1, | ||
386 | }; | ||
387 | |||
388 | /* timer1 hwmod */ | ||
389 | static struct omap_hwmod omap2420_timer1_hwmod = { | ||
390 | .name = "timer1", | ||
391 | .mpu_irqs = omap2420_timer1_mpu_irqs, | ||
392 | .mpu_irqs_cnt = ARRAY_SIZE(omap2420_timer1_mpu_irqs), | ||
393 | .main_clk = "gpt1_fck", | ||
394 | .prcm = { | ||
395 | .omap2 = { | ||
396 | .prcm_reg_id = 1, | ||
397 | .module_bit = OMAP24XX_EN_GPT1_SHIFT, | ||
398 | .module_offs = WKUP_MOD, | ||
399 | .idlest_reg_id = 1, | ||
400 | .idlest_idle_bit = OMAP24XX_ST_GPT1_SHIFT, | ||
401 | }, | ||
402 | }, | ||
403 | .slaves = omap2420_timer1_slaves, | ||
404 | .slaves_cnt = ARRAY_SIZE(omap2420_timer1_slaves), | ||
405 | .class = &omap2420_timer_hwmod_class, | ||
406 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420) | ||
407 | }; | ||
408 | |||
409 | /* timer2 */ | ||
410 | static struct omap_hwmod omap2420_timer2_hwmod; | ||
411 | static struct omap_hwmod_irq_info omap2420_timer2_mpu_irqs[] = { | ||
412 | { .irq = 38, }, | ||
413 | }; | ||
414 | |||
415 | static struct omap_hwmod_addr_space omap2420_timer2_addrs[] = { | ||
416 | { | ||
417 | .pa_start = 0x4802a000, | ||
418 | .pa_end = 0x4802a000 + SZ_1K - 1, | ||
419 | .flags = ADDR_TYPE_RT | ||
420 | }, | ||
421 | }; | ||
422 | |||
423 | /* l4_core -> timer2 */ | ||
424 | static struct omap_hwmod_ocp_if omap2420_l4_core__timer2 = { | ||
425 | .master = &omap2420_l4_core_hwmod, | ||
426 | .slave = &omap2420_timer2_hwmod, | ||
427 | .clk = "gpt2_ick", | ||
428 | .addr = omap2420_timer2_addrs, | ||
429 | .addr_cnt = ARRAY_SIZE(omap2420_timer2_addrs), | ||
430 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
431 | }; | ||
432 | |||
433 | /* timer2 slave port */ | ||
434 | static struct omap_hwmod_ocp_if *omap2420_timer2_slaves[] = { | ||
435 | &omap2420_l4_core__timer2, | ||
436 | }; | ||
437 | |||
438 | /* timer2 hwmod */ | ||
439 | static struct omap_hwmod omap2420_timer2_hwmod = { | ||
440 | .name = "timer2", | ||
441 | .mpu_irqs = omap2420_timer2_mpu_irqs, | ||
442 | .mpu_irqs_cnt = ARRAY_SIZE(omap2420_timer2_mpu_irqs), | ||
443 | .main_clk = "gpt2_fck", | ||
444 | .prcm = { | ||
445 | .omap2 = { | ||
446 | .prcm_reg_id = 1, | ||
447 | .module_bit = OMAP24XX_EN_GPT2_SHIFT, | ||
448 | .module_offs = CORE_MOD, | ||
449 | .idlest_reg_id = 1, | ||
450 | .idlest_idle_bit = OMAP24XX_ST_GPT2_SHIFT, | ||
451 | }, | ||
452 | }, | ||
453 | .slaves = omap2420_timer2_slaves, | ||
454 | .slaves_cnt = ARRAY_SIZE(omap2420_timer2_slaves), | ||
455 | .class = &omap2420_timer_hwmod_class, | ||
456 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420) | ||
457 | }; | ||
458 | |||
459 | /* timer3 */ | ||
460 | static struct omap_hwmod omap2420_timer3_hwmod; | ||
461 | static struct omap_hwmod_irq_info omap2420_timer3_mpu_irqs[] = { | ||
462 | { .irq = 39, }, | ||
463 | }; | ||
464 | |||
465 | static struct omap_hwmod_addr_space omap2420_timer3_addrs[] = { | ||
466 | { | ||
467 | .pa_start = 0x48078000, | ||
468 | .pa_end = 0x48078000 + SZ_1K - 1, | ||
469 | .flags = ADDR_TYPE_RT | ||
470 | }, | ||
471 | }; | ||
472 | |||
473 | /* l4_core -> timer3 */ | ||
474 | static struct omap_hwmod_ocp_if omap2420_l4_core__timer3 = { | ||
475 | .master = &omap2420_l4_core_hwmod, | ||
476 | .slave = &omap2420_timer3_hwmod, | ||
477 | .clk = "gpt3_ick", | ||
478 | .addr = omap2420_timer3_addrs, | ||
479 | .addr_cnt = ARRAY_SIZE(omap2420_timer3_addrs), | ||
480 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
481 | }; | ||
482 | |||
483 | /* timer3 slave port */ | ||
484 | static struct omap_hwmod_ocp_if *omap2420_timer3_slaves[] = { | ||
485 | &omap2420_l4_core__timer3, | ||
486 | }; | ||
487 | |||
488 | /* timer3 hwmod */ | ||
489 | static struct omap_hwmod omap2420_timer3_hwmod = { | ||
490 | .name = "timer3", | ||
491 | .mpu_irqs = omap2420_timer3_mpu_irqs, | ||
492 | .mpu_irqs_cnt = ARRAY_SIZE(omap2420_timer3_mpu_irqs), | ||
493 | .main_clk = "gpt3_fck", | ||
494 | .prcm = { | ||
495 | .omap2 = { | ||
496 | .prcm_reg_id = 1, | ||
497 | .module_bit = OMAP24XX_EN_GPT3_SHIFT, | ||
498 | .module_offs = CORE_MOD, | ||
499 | .idlest_reg_id = 1, | ||
500 | .idlest_idle_bit = OMAP24XX_ST_GPT3_SHIFT, | ||
501 | }, | ||
502 | }, | ||
503 | .slaves = omap2420_timer3_slaves, | ||
504 | .slaves_cnt = ARRAY_SIZE(omap2420_timer3_slaves), | ||
505 | .class = &omap2420_timer_hwmod_class, | ||
506 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420) | ||
507 | }; | ||
508 | |||
509 | /* timer4 */ | ||
510 | static struct omap_hwmod omap2420_timer4_hwmod; | ||
511 | static struct omap_hwmod_irq_info omap2420_timer4_mpu_irqs[] = { | ||
512 | { .irq = 40, }, | ||
513 | }; | ||
514 | |||
515 | static struct omap_hwmod_addr_space omap2420_timer4_addrs[] = { | ||
516 | { | ||
517 | .pa_start = 0x4807a000, | ||
518 | .pa_end = 0x4807a000 + SZ_1K - 1, | ||
519 | .flags = ADDR_TYPE_RT | ||
520 | }, | ||
521 | }; | ||
522 | |||
523 | /* l4_core -> timer4 */ | ||
524 | static struct omap_hwmod_ocp_if omap2420_l4_core__timer4 = { | ||
525 | .master = &omap2420_l4_core_hwmod, | ||
526 | .slave = &omap2420_timer4_hwmod, | ||
527 | .clk = "gpt4_ick", | ||
528 | .addr = omap2420_timer4_addrs, | ||
529 | .addr_cnt = ARRAY_SIZE(omap2420_timer4_addrs), | ||
530 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
531 | }; | ||
532 | |||
533 | /* timer4 slave port */ | ||
534 | static struct omap_hwmod_ocp_if *omap2420_timer4_slaves[] = { | ||
535 | &omap2420_l4_core__timer4, | ||
536 | }; | ||
537 | |||
538 | /* timer4 hwmod */ | ||
539 | static struct omap_hwmod omap2420_timer4_hwmod = { | ||
540 | .name = "timer4", | ||
541 | .mpu_irqs = omap2420_timer4_mpu_irqs, | ||
542 | .mpu_irqs_cnt = ARRAY_SIZE(omap2420_timer4_mpu_irqs), | ||
543 | .main_clk = "gpt4_fck", | ||
544 | .prcm = { | ||
545 | .omap2 = { | ||
546 | .prcm_reg_id = 1, | ||
547 | .module_bit = OMAP24XX_EN_GPT4_SHIFT, | ||
548 | .module_offs = CORE_MOD, | ||
549 | .idlest_reg_id = 1, | ||
550 | .idlest_idle_bit = OMAP24XX_ST_GPT4_SHIFT, | ||
551 | }, | ||
552 | }, | ||
553 | .slaves = omap2420_timer4_slaves, | ||
554 | .slaves_cnt = ARRAY_SIZE(omap2420_timer4_slaves), | ||
555 | .class = &omap2420_timer_hwmod_class, | ||
556 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420) | ||
557 | }; | ||
558 | |||
559 | /* timer5 */ | ||
560 | static struct omap_hwmod omap2420_timer5_hwmod; | ||
561 | static struct omap_hwmod_irq_info omap2420_timer5_mpu_irqs[] = { | ||
562 | { .irq = 41, }, | ||
563 | }; | ||
564 | |||
565 | static struct omap_hwmod_addr_space omap2420_timer5_addrs[] = { | ||
566 | { | ||
567 | .pa_start = 0x4807c000, | ||
568 | .pa_end = 0x4807c000 + SZ_1K - 1, | ||
569 | .flags = ADDR_TYPE_RT | ||
570 | }, | ||
571 | }; | ||
572 | |||
573 | /* l4_core -> timer5 */ | ||
574 | static struct omap_hwmod_ocp_if omap2420_l4_core__timer5 = { | ||
575 | .master = &omap2420_l4_core_hwmod, | ||
576 | .slave = &omap2420_timer5_hwmod, | ||
577 | .clk = "gpt5_ick", | ||
578 | .addr = omap2420_timer5_addrs, | ||
579 | .addr_cnt = ARRAY_SIZE(omap2420_timer5_addrs), | ||
580 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
581 | }; | ||
582 | |||
583 | /* timer5 slave port */ | ||
584 | static struct omap_hwmod_ocp_if *omap2420_timer5_slaves[] = { | ||
585 | &omap2420_l4_core__timer5, | ||
586 | }; | ||
587 | |||
588 | /* timer5 hwmod */ | ||
589 | static struct omap_hwmod omap2420_timer5_hwmod = { | ||
590 | .name = "timer5", | ||
591 | .mpu_irqs = omap2420_timer5_mpu_irqs, | ||
592 | .mpu_irqs_cnt = ARRAY_SIZE(omap2420_timer5_mpu_irqs), | ||
593 | .main_clk = "gpt5_fck", | ||
594 | .prcm = { | ||
595 | .omap2 = { | ||
596 | .prcm_reg_id = 1, | ||
597 | .module_bit = OMAP24XX_EN_GPT5_SHIFT, | ||
598 | .module_offs = CORE_MOD, | ||
599 | .idlest_reg_id = 1, | ||
600 | .idlest_idle_bit = OMAP24XX_ST_GPT5_SHIFT, | ||
601 | }, | ||
602 | }, | ||
603 | .slaves = omap2420_timer5_slaves, | ||
604 | .slaves_cnt = ARRAY_SIZE(omap2420_timer5_slaves), | ||
605 | .class = &omap2420_timer_hwmod_class, | ||
606 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420) | ||
607 | }; | ||
608 | |||
609 | |||
610 | /* timer6 */ | ||
611 | static struct omap_hwmod omap2420_timer6_hwmod; | ||
612 | static struct omap_hwmod_irq_info omap2420_timer6_mpu_irqs[] = { | ||
613 | { .irq = 42, }, | ||
614 | }; | ||
615 | |||
616 | static struct omap_hwmod_addr_space omap2420_timer6_addrs[] = { | ||
617 | { | ||
618 | .pa_start = 0x4807e000, | ||
619 | .pa_end = 0x4807e000 + SZ_1K - 1, | ||
620 | .flags = ADDR_TYPE_RT | ||
621 | }, | ||
622 | }; | ||
623 | |||
624 | /* l4_core -> timer6 */ | ||
625 | static struct omap_hwmod_ocp_if omap2420_l4_core__timer6 = { | ||
626 | .master = &omap2420_l4_core_hwmod, | ||
627 | .slave = &omap2420_timer6_hwmod, | ||
628 | .clk = "gpt6_ick", | ||
629 | .addr = omap2420_timer6_addrs, | ||
630 | .addr_cnt = ARRAY_SIZE(omap2420_timer6_addrs), | ||
631 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
632 | }; | ||
633 | |||
634 | /* timer6 slave port */ | ||
635 | static struct omap_hwmod_ocp_if *omap2420_timer6_slaves[] = { | ||
636 | &omap2420_l4_core__timer6, | ||
637 | }; | ||
638 | |||
639 | /* timer6 hwmod */ | ||
640 | static struct omap_hwmod omap2420_timer6_hwmod = { | ||
641 | .name = "timer6", | ||
642 | .mpu_irqs = omap2420_timer6_mpu_irqs, | ||
643 | .mpu_irqs_cnt = ARRAY_SIZE(omap2420_timer6_mpu_irqs), | ||
644 | .main_clk = "gpt6_fck", | ||
645 | .prcm = { | ||
646 | .omap2 = { | ||
647 | .prcm_reg_id = 1, | ||
648 | .module_bit = OMAP24XX_EN_GPT6_SHIFT, | ||
649 | .module_offs = CORE_MOD, | ||
650 | .idlest_reg_id = 1, | ||
651 | .idlest_idle_bit = OMAP24XX_ST_GPT6_SHIFT, | ||
652 | }, | ||
653 | }, | ||
654 | .slaves = omap2420_timer6_slaves, | ||
655 | .slaves_cnt = ARRAY_SIZE(omap2420_timer6_slaves), | ||
656 | .class = &omap2420_timer_hwmod_class, | ||
657 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420) | ||
658 | }; | ||
659 | |||
660 | /* timer7 */ | ||
661 | static struct omap_hwmod omap2420_timer7_hwmod; | ||
662 | static struct omap_hwmod_irq_info omap2420_timer7_mpu_irqs[] = { | ||
663 | { .irq = 43, }, | ||
664 | }; | ||
665 | |||
666 | static struct omap_hwmod_addr_space omap2420_timer7_addrs[] = { | ||
667 | { | ||
668 | .pa_start = 0x48080000, | ||
669 | .pa_end = 0x48080000 + SZ_1K - 1, | ||
670 | .flags = ADDR_TYPE_RT | ||
671 | }, | ||
672 | }; | ||
673 | |||
674 | /* l4_core -> timer7 */ | ||
675 | static struct omap_hwmod_ocp_if omap2420_l4_core__timer7 = { | ||
676 | .master = &omap2420_l4_core_hwmod, | ||
677 | .slave = &omap2420_timer7_hwmod, | ||
678 | .clk = "gpt7_ick", | ||
679 | .addr = omap2420_timer7_addrs, | ||
680 | .addr_cnt = ARRAY_SIZE(omap2420_timer7_addrs), | ||
681 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
682 | }; | ||
683 | |||
684 | /* timer7 slave port */ | ||
685 | static struct omap_hwmod_ocp_if *omap2420_timer7_slaves[] = { | ||
686 | &omap2420_l4_core__timer7, | ||
687 | }; | ||
688 | |||
689 | /* timer7 hwmod */ | ||
690 | static struct omap_hwmod omap2420_timer7_hwmod = { | ||
691 | .name = "timer7", | ||
692 | .mpu_irqs = omap2420_timer7_mpu_irqs, | ||
693 | .mpu_irqs_cnt = ARRAY_SIZE(omap2420_timer7_mpu_irqs), | ||
694 | .main_clk = "gpt7_fck", | ||
695 | .prcm = { | ||
696 | .omap2 = { | ||
697 | .prcm_reg_id = 1, | ||
698 | .module_bit = OMAP24XX_EN_GPT7_SHIFT, | ||
699 | .module_offs = CORE_MOD, | ||
700 | .idlest_reg_id = 1, | ||
701 | .idlest_idle_bit = OMAP24XX_ST_GPT7_SHIFT, | ||
702 | }, | ||
703 | }, | ||
704 | .slaves = omap2420_timer7_slaves, | ||
705 | .slaves_cnt = ARRAY_SIZE(omap2420_timer7_slaves), | ||
706 | .class = &omap2420_timer_hwmod_class, | ||
707 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420) | ||
708 | }; | ||
709 | |||
710 | /* timer8 */ | ||
711 | static struct omap_hwmod omap2420_timer8_hwmod; | ||
712 | static struct omap_hwmod_irq_info omap2420_timer8_mpu_irqs[] = { | ||
713 | { .irq = 44, }, | ||
714 | }; | ||
715 | |||
716 | static struct omap_hwmod_addr_space omap2420_timer8_addrs[] = { | ||
717 | { | ||
718 | .pa_start = 0x48082000, | ||
719 | .pa_end = 0x48082000 + SZ_1K - 1, | ||
720 | .flags = ADDR_TYPE_RT | ||
721 | }, | ||
722 | }; | ||
723 | |||
724 | /* l4_core -> timer8 */ | ||
725 | static struct omap_hwmod_ocp_if omap2420_l4_core__timer8 = { | ||
726 | .master = &omap2420_l4_core_hwmod, | ||
727 | .slave = &omap2420_timer8_hwmod, | ||
728 | .clk = "gpt8_ick", | ||
729 | .addr = omap2420_timer8_addrs, | ||
730 | .addr_cnt = ARRAY_SIZE(omap2420_timer8_addrs), | ||
731 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
732 | }; | ||
733 | |||
734 | /* timer8 slave port */ | ||
735 | static struct omap_hwmod_ocp_if *omap2420_timer8_slaves[] = { | ||
736 | &omap2420_l4_core__timer8, | ||
737 | }; | ||
738 | |||
739 | /* timer8 hwmod */ | ||
740 | static struct omap_hwmod omap2420_timer8_hwmod = { | ||
741 | .name = "timer8", | ||
742 | .mpu_irqs = omap2420_timer8_mpu_irqs, | ||
743 | .mpu_irqs_cnt = ARRAY_SIZE(omap2420_timer8_mpu_irqs), | ||
744 | .main_clk = "gpt8_fck", | ||
745 | .prcm = { | ||
746 | .omap2 = { | ||
747 | .prcm_reg_id = 1, | ||
748 | .module_bit = OMAP24XX_EN_GPT8_SHIFT, | ||
749 | .module_offs = CORE_MOD, | ||
750 | .idlest_reg_id = 1, | ||
751 | .idlest_idle_bit = OMAP24XX_ST_GPT8_SHIFT, | ||
752 | }, | ||
753 | }, | ||
754 | .slaves = omap2420_timer8_slaves, | ||
755 | .slaves_cnt = ARRAY_SIZE(omap2420_timer8_slaves), | ||
756 | .class = &omap2420_timer_hwmod_class, | ||
757 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420) | ||
758 | }; | ||
759 | |||
760 | /* timer9 */ | ||
761 | static struct omap_hwmod omap2420_timer9_hwmod; | ||
762 | static struct omap_hwmod_irq_info omap2420_timer9_mpu_irqs[] = { | ||
763 | { .irq = 45, }, | ||
764 | }; | ||
765 | |||
766 | static struct omap_hwmod_addr_space omap2420_timer9_addrs[] = { | ||
767 | { | ||
768 | .pa_start = 0x48084000, | ||
769 | .pa_end = 0x48084000 + SZ_1K - 1, | ||
770 | .flags = ADDR_TYPE_RT | ||
771 | }, | ||
772 | }; | ||
773 | |||
774 | /* l4_core -> timer9 */ | ||
775 | static struct omap_hwmod_ocp_if omap2420_l4_core__timer9 = { | ||
776 | .master = &omap2420_l4_core_hwmod, | ||
777 | .slave = &omap2420_timer9_hwmod, | ||
778 | .clk = "gpt9_ick", | ||
779 | .addr = omap2420_timer9_addrs, | ||
780 | .addr_cnt = ARRAY_SIZE(omap2420_timer9_addrs), | ||
781 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
782 | }; | ||
783 | |||
784 | /* timer9 slave port */ | ||
785 | static struct omap_hwmod_ocp_if *omap2420_timer9_slaves[] = { | ||
786 | &omap2420_l4_core__timer9, | ||
787 | }; | ||
788 | |||
789 | /* timer9 hwmod */ | ||
790 | static struct omap_hwmod omap2420_timer9_hwmod = { | ||
791 | .name = "timer9", | ||
792 | .mpu_irqs = omap2420_timer9_mpu_irqs, | ||
793 | .mpu_irqs_cnt = ARRAY_SIZE(omap2420_timer9_mpu_irqs), | ||
794 | .main_clk = "gpt9_fck", | ||
795 | .prcm = { | ||
796 | .omap2 = { | ||
797 | .prcm_reg_id = 1, | ||
798 | .module_bit = OMAP24XX_EN_GPT9_SHIFT, | ||
799 | .module_offs = CORE_MOD, | ||
800 | .idlest_reg_id = 1, | ||
801 | .idlest_idle_bit = OMAP24XX_ST_GPT9_SHIFT, | ||
802 | }, | ||
803 | }, | ||
804 | .slaves = omap2420_timer9_slaves, | ||
805 | .slaves_cnt = ARRAY_SIZE(omap2420_timer9_slaves), | ||
806 | .class = &omap2420_timer_hwmod_class, | ||
807 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420) | ||
808 | }; | ||
809 | |||
810 | /* timer10 */ | ||
811 | static struct omap_hwmod omap2420_timer10_hwmod; | ||
812 | static struct omap_hwmod_irq_info omap2420_timer10_mpu_irqs[] = { | ||
813 | { .irq = 46, }, | ||
814 | }; | ||
815 | |||
816 | static struct omap_hwmod_addr_space omap2420_timer10_addrs[] = { | ||
817 | { | ||
818 | .pa_start = 0x48086000, | ||
819 | .pa_end = 0x48086000 + SZ_1K - 1, | ||
820 | .flags = ADDR_TYPE_RT | ||
821 | }, | ||
822 | }; | ||
823 | |||
824 | /* l4_core -> timer10 */ | ||
825 | static struct omap_hwmod_ocp_if omap2420_l4_core__timer10 = { | ||
826 | .master = &omap2420_l4_core_hwmod, | ||
827 | .slave = &omap2420_timer10_hwmod, | ||
828 | .clk = "gpt10_ick", | ||
829 | .addr = omap2420_timer10_addrs, | ||
830 | .addr_cnt = ARRAY_SIZE(omap2420_timer10_addrs), | ||
831 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
832 | }; | ||
833 | |||
834 | /* timer10 slave port */ | ||
835 | static struct omap_hwmod_ocp_if *omap2420_timer10_slaves[] = { | ||
836 | &omap2420_l4_core__timer10, | ||
837 | }; | ||
838 | |||
839 | /* timer10 hwmod */ | ||
840 | static struct omap_hwmod omap2420_timer10_hwmod = { | ||
841 | .name = "timer10", | ||
842 | .mpu_irqs = omap2420_timer10_mpu_irqs, | ||
843 | .mpu_irqs_cnt = ARRAY_SIZE(omap2420_timer10_mpu_irqs), | ||
844 | .main_clk = "gpt10_fck", | ||
845 | .prcm = { | ||
846 | .omap2 = { | ||
847 | .prcm_reg_id = 1, | ||
848 | .module_bit = OMAP24XX_EN_GPT10_SHIFT, | ||
849 | .module_offs = CORE_MOD, | ||
850 | .idlest_reg_id = 1, | ||
851 | .idlest_idle_bit = OMAP24XX_ST_GPT10_SHIFT, | ||
852 | }, | ||
853 | }, | ||
854 | .slaves = omap2420_timer10_slaves, | ||
855 | .slaves_cnt = ARRAY_SIZE(omap2420_timer10_slaves), | ||
856 | .class = &omap2420_timer_hwmod_class, | ||
857 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420) | ||
858 | }; | ||
859 | |||
860 | /* timer11 */ | ||
861 | static struct omap_hwmod omap2420_timer11_hwmod; | ||
862 | static struct omap_hwmod_irq_info omap2420_timer11_mpu_irqs[] = { | ||
863 | { .irq = 47, }, | ||
864 | }; | ||
865 | |||
866 | static struct omap_hwmod_addr_space omap2420_timer11_addrs[] = { | ||
867 | { | ||
868 | .pa_start = 0x48088000, | ||
869 | .pa_end = 0x48088000 + SZ_1K - 1, | ||
870 | .flags = ADDR_TYPE_RT | ||
871 | }, | ||
872 | }; | ||
873 | |||
874 | /* l4_core -> timer11 */ | ||
875 | static struct omap_hwmod_ocp_if omap2420_l4_core__timer11 = { | ||
876 | .master = &omap2420_l4_core_hwmod, | ||
877 | .slave = &omap2420_timer11_hwmod, | ||
878 | .clk = "gpt11_ick", | ||
879 | .addr = omap2420_timer11_addrs, | ||
880 | .addr_cnt = ARRAY_SIZE(omap2420_timer11_addrs), | ||
881 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
882 | }; | ||
883 | |||
884 | /* timer11 slave port */ | ||
885 | static struct omap_hwmod_ocp_if *omap2420_timer11_slaves[] = { | ||
886 | &omap2420_l4_core__timer11, | ||
887 | }; | ||
888 | |||
889 | /* timer11 hwmod */ | ||
890 | static struct omap_hwmod omap2420_timer11_hwmod = { | ||
891 | .name = "timer11", | ||
892 | .mpu_irqs = omap2420_timer11_mpu_irqs, | ||
893 | .mpu_irqs_cnt = ARRAY_SIZE(omap2420_timer11_mpu_irqs), | ||
894 | .main_clk = "gpt11_fck", | ||
895 | .prcm = { | ||
896 | .omap2 = { | ||
897 | .prcm_reg_id = 1, | ||
898 | .module_bit = OMAP24XX_EN_GPT11_SHIFT, | ||
899 | .module_offs = CORE_MOD, | ||
900 | .idlest_reg_id = 1, | ||
901 | .idlest_idle_bit = OMAP24XX_ST_GPT11_SHIFT, | ||
902 | }, | ||
903 | }, | ||
904 | .slaves = omap2420_timer11_slaves, | ||
905 | .slaves_cnt = ARRAY_SIZE(omap2420_timer11_slaves), | ||
906 | .class = &omap2420_timer_hwmod_class, | ||
907 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420) | ||
908 | }; | ||
909 | |||
910 | /* timer12 */ | ||
911 | static struct omap_hwmod omap2420_timer12_hwmod; | ||
912 | static struct omap_hwmod_irq_info omap2420_timer12_mpu_irqs[] = { | ||
913 | { .irq = 48, }, | ||
914 | }; | ||
915 | |||
916 | static struct omap_hwmod_addr_space omap2420_timer12_addrs[] = { | ||
917 | { | ||
918 | .pa_start = 0x4808a000, | ||
919 | .pa_end = 0x4808a000 + SZ_1K - 1, | ||
920 | .flags = ADDR_TYPE_RT | ||
921 | }, | ||
922 | }; | ||
923 | |||
924 | /* l4_core -> timer12 */ | ||
925 | static struct omap_hwmod_ocp_if omap2420_l4_core__timer12 = { | ||
926 | .master = &omap2420_l4_core_hwmod, | ||
927 | .slave = &omap2420_timer12_hwmod, | ||
928 | .clk = "gpt12_ick", | ||
929 | .addr = omap2420_timer12_addrs, | ||
930 | .addr_cnt = ARRAY_SIZE(omap2420_timer12_addrs), | ||
931 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
932 | }; | ||
933 | |||
934 | /* timer12 slave port */ | ||
935 | static struct omap_hwmod_ocp_if *omap2420_timer12_slaves[] = { | ||
936 | &omap2420_l4_core__timer12, | ||
937 | }; | ||
938 | |||
939 | /* timer12 hwmod */ | ||
940 | static struct omap_hwmod omap2420_timer12_hwmod = { | ||
941 | .name = "timer12", | ||
942 | .mpu_irqs = omap2420_timer12_mpu_irqs, | ||
943 | .mpu_irqs_cnt = ARRAY_SIZE(omap2420_timer12_mpu_irqs), | ||
944 | .main_clk = "gpt12_fck", | ||
945 | .prcm = { | ||
946 | .omap2 = { | ||
947 | .prcm_reg_id = 1, | ||
948 | .module_bit = OMAP24XX_EN_GPT12_SHIFT, | ||
949 | .module_offs = CORE_MOD, | ||
950 | .idlest_reg_id = 1, | ||
951 | .idlest_idle_bit = OMAP24XX_ST_GPT12_SHIFT, | ||
952 | }, | ||
953 | }, | ||
954 | .slaves = omap2420_timer12_slaves, | ||
955 | .slaves_cnt = ARRAY_SIZE(omap2420_timer12_slaves), | ||
956 | .class = &omap2420_timer_hwmod_class, | ||
957 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420) | ||
958 | }; | ||
959 | |||
282 | /* l4_wkup -> wd_timer2 */ | 960 | /* l4_wkup -> wd_timer2 */ |
283 | static struct omap_hwmod_addr_space omap2420_wd_timer2_addrs[] = { | 961 | static struct omap_hwmod_addr_space omap2420_wd_timer2_addrs[] = { |
284 | { | 962 | { |
@@ -470,6 +1148,291 @@ static struct omap_hwmod omap2420_uart3_hwmod = { | |||
470 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420), | 1148 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420), |
471 | }; | 1149 | }; |
472 | 1150 | ||
1151 | /* | ||
1152 | * 'dss' class | ||
1153 | * display sub-system | ||
1154 | */ | ||
1155 | |||
1156 | static struct omap_hwmod_class_sysconfig omap2420_dss_sysc = { | ||
1157 | .rev_offs = 0x0000, | ||
1158 | .sysc_offs = 0x0010, | ||
1159 | .syss_offs = 0x0014, | ||
1160 | .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE), | ||
1161 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
1162 | }; | ||
1163 | |||
1164 | static struct omap_hwmod_class omap2420_dss_hwmod_class = { | ||
1165 | .name = "dss", | ||
1166 | .sysc = &omap2420_dss_sysc, | ||
1167 | }; | ||
1168 | |||
1169 | /* dss */ | ||
1170 | static struct omap_hwmod_irq_info omap2420_dss_irqs[] = { | ||
1171 | { .irq = 25 }, | ||
1172 | }; | ||
1173 | |||
1174 | static struct omap_hwmod_dma_info omap2420_dss_sdma_chs[] = { | ||
1175 | { .name = "dispc", .dma_req = 5 }, | ||
1176 | }; | ||
1177 | |||
1178 | /* dss */ | ||
1179 | /* dss master ports */ | ||
1180 | static struct omap_hwmod_ocp_if *omap2420_dss_masters[] = { | ||
1181 | &omap2420_dss__l3, | ||
1182 | }; | ||
1183 | |||
1184 | static struct omap_hwmod_addr_space omap2420_dss_addrs[] = { | ||
1185 | { | ||
1186 | .pa_start = 0x48050000, | ||
1187 | .pa_end = 0x480503FF, | ||
1188 | .flags = ADDR_TYPE_RT | ||
1189 | }, | ||
1190 | }; | ||
1191 | |||
1192 | /* l4_core -> dss */ | ||
1193 | static struct omap_hwmod_ocp_if omap2420_l4_core__dss = { | ||
1194 | .master = &omap2420_l4_core_hwmod, | ||
1195 | .slave = &omap2420_dss_core_hwmod, | ||
1196 | .clk = "dss_ick", | ||
1197 | .addr = omap2420_dss_addrs, | ||
1198 | .addr_cnt = ARRAY_SIZE(omap2420_dss_addrs), | ||
1199 | .fw = { | ||
1200 | .omap2 = { | ||
1201 | .l4_fw_region = OMAP2420_L4_CORE_FW_DSS_CORE_REGION, | ||
1202 | .flags = OMAP_FIREWALL_L4, | ||
1203 | } | ||
1204 | }, | ||
1205 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
1206 | }; | ||
1207 | |||
1208 | /* dss slave ports */ | ||
1209 | static struct omap_hwmod_ocp_if *omap2420_dss_slaves[] = { | ||
1210 | &omap2420_l4_core__dss, | ||
1211 | }; | ||
1212 | |||
1213 | static struct omap_hwmod_opt_clk dss_opt_clks[] = { | ||
1214 | { .role = "tv_clk", .clk = "dss_54m_fck" }, | ||
1215 | { .role = "sys_clk", .clk = "dss2_fck" }, | ||
1216 | }; | ||
1217 | |||
1218 | static struct omap_hwmod omap2420_dss_core_hwmod = { | ||
1219 | .name = "dss_core", | ||
1220 | .class = &omap2420_dss_hwmod_class, | ||
1221 | .main_clk = "dss1_fck", /* instead of dss_fck */ | ||
1222 | .mpu_irqs = omap2420_dss_irqs, | ||
1223 | .mpu_irqs_cnt = ARRAY_SIZE(omap2420_dss_irqs), | ||
1224 | .sdma_reqs = omap2420_dss_sdma_chs, | ||
1225 | .sdma_reqs_cnt = ARRAY_SIZE(omap2420_dss_sdma_chs), | ||
1226 | .prcm = { | ||
1227 | .omap2 = { | ||
1228 | .prcm_reg_id = 1, | ||
1229 | .module_bit = OMAP24XX_EN_DSS1_SHIFT, | ||
1230 | .module_offs = CORE_MOD, | ||
1231 | .idlest_reg_id = 1, | ||
1232 | .idlest_stdby_bit = OMAP24XX_ST_DSS_SHIFT, | ||
1233 | }, | ||
1234 | }, | ||
1235 | .opt_clks = dss_opt_clks, | ||
1236 | .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks), | ||
1237 | .slaves = omap2420_dss_slaves, | ||
1238 | .slaves_cnt = ARRAY_SIZE(omap2420_dss_slaves), | ||
1239 | .masters = omap2420_dss_masters, | ||
1240 | .masters_cnt = ARRAY_SIZE(omap2420_dss_masters), | ||
1241 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420), | ||
1242 | .flags = HWMOD_NO_IDLEST, | ||
1243 | }; | ||
1244 | |||
1245 | /* | ||
1246 | * 'dispc' class | ||
1247 | * display controller | ||
1248 | */ | ||
1249 | |||
1250 | static struct omap_hwmod_class_sysconfig omap2420_dispc_sysc = { | ||
1251 | .rev_offs = 0x0000, | ||
1252 | .sysc_offs = 0x0010, | ||
1253 | .syss_offs = 0x0014, | ||
1254 | .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE | | ||
1255 | SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE), | ||
1256 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | | ||
1257 | MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART), | ||
1258 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
1259 | }; | ||
1260 | |||
1261 | static struct omap_hwmod_class omap2420_dispc_hwmod_class = { | ||
1262 | .name = "dispc", | ||
1263 | .sysc = &omap2420_dispc_sysc, | ||
1264 | }; | ||
1265 | |||
1266 | static struct omap_hwmod_addr_space omap2420_dss_dispc_addrs[] = { | ||
1267 | { | ||
1268 | .pa_start = 0x48050400, | ||
1269 | .pa_end = 0x480507FF, | ||
1270 | .flags = ADDR_TYPE_RT | ||
1271 | }, | ||
1272 | }; | ||
1273 | |||
1274 | /* l4_core -> dss_dispc */ | ||
1275 | static struct omap_hwmod_ocp_if omap2420_l4_core__dss_dispc = { | ||
1276 | .master = &omap2420_l4_core_hwmod, | ||
1277 | .slave = &omap2420_dss_dispc_hwmod, | ||
1278 | .clk = "dss_ick", | ||
1279 | .addr = omap2420_dss_dispc_addrs, | ||
1280 | .addr_cnt = ARRAY_SIZE(omap2420_dss_dispc_addrs), | ||
1281 | .fw = { | ||
1282 | .omap2 = { | ||
1283 | .l4_fw_region = OMAP2420_L4_CORE_FW_DSS_DISPC_REGION, | ||
1284 | .flags = OMAP_FIREWALL_L4, | ||
1285 | } | ||
1286 | }, | ||
1287 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
1288 | }; | ||
1289 | |||
1290 | /* dss_dispc slave ports */ | ||
1291 | static struct omap_hwmod_ocp_if *omap2420_dss_dispc_slaves[] = { | ||
1292 | &omap2420_l4_core__dss_dispc, | ||
1293 | }; | ||
1294 | |||
1295 | static struct omap_hwmod omap2420_dss_dispc_hwmod = { | ||
1296 | .name = "dss_dispc", | ||
1297 | .class = &omap2420_dispc_hwmod_class, | ||
1298 | .main_clk = "dss1_fck", | ||
1299 | .prcm = { | ||
1300 | .omap2 = { | ||
1301 | .prcm_reg_id = 1, | ||
1302 | .module_bit = OMAP24XX_EN_DSS1_SHIFT, | ||
1303 | .module_offs = CORE_MOD, | ||
1304 | .idlest_reg_id = 1, | ||
1305 | .idlest_stdby_bit = OMAP24XX_ST_DSS_SHIFT, | ||
1306 | }, | ||
1307 | }, | ||
1308 | .slaves = omap2420_dss_dispc_slaves, | ||
1309 | .slaves_cnt = ARRAY_SIZE(omap2420_dss_dispc_slaves), | ||
1310 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420), | ||
1311 | .flags = HWMOD_NO_IDLEST, | ||
1312 | }; | ||
1313 | |||
1314 | /* | ||
1315 | * 'rfbi' class | ||
1316 | * remote frame buffer interface | ||
1317 | */ | ||
1318 | |||
1319 | static struct omap_hwmod_class_sysconfig omap2420_rfbi_sysc = { | ||
1320 | .rev_offs = 0x0000, | ||
1321 | .sysc_offs = 0x0010, | ||
1322 | .syss_offs = 0x0014, | ||
1323 | .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET | | ||
1324 | SYSC_HAS_AUTOIDLE), | ||
1325 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | ||
1326 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
1327 | }; | ||
1328 | |||
1329 | static struct omap_hwmod_class omap2420_rfbi_hwmod_class = { | ||
1330 | .name = "rfbi", | ||
1331 | .sysc = &omap2420_rfbi_sysc, | ||
1332 | }; | ||
1333 | |||
1334 | static struct omap_hwmod_addr_space omap2420_dss_rfbi_addrs[] = { | ||
1335 | { | ||
1336 | .pa_start = 0x48050800, | ||
1337 | .pa_end = 0x48050BFF, | ||
1338 | .flags = ADDR_TYPE_RT | ||
1339 | }, | ||
1340 | }; | ||
1341 | |||
1342 | /* l4_core -> dss_rfbi */ | ||
1343 | static struct omap_hwmod_ocp_if omap2420_l4_core__dss_rfbi = { | ||
1344 | .master = &omap2420_l4_core_hwmod, | ||
1345 | .slave = &omap2420_dss_rfbi_hwmod, | ||
1346 | .clk = "dss_ick", | ||
1347 | .addr = omap2420_dss_rfbi_addrs, | ||
1348 | .addr_cnt = ARRAY_SIZE(omap2420_dss_rfbi_addrs), | ||
1349 | .fw = { | ||
1350 | .omap2 = { | ||
1351 | .l4_fw_region = OMAP2420_L4_CORE_FW_DSS_CORE_REGION, | ||
1352 | .flags = OMAP_FIREWALL_L4, | ||
1353 | } | ||
1354 | }, | ||
1355 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
1356 | }; | ||
1357 | |||
1358 | /* dss_rfbi slave ports */ | ||
1359 | static struct omap_hwmod_ocp_if *omap2420_dss_rfbi_slaves[] = { | ||
1360 | &omap2420_l4_core__dss_rfbi, | ||
1361 | }; | ||
1362 | |||
1363 | static struct omap_hwmod omap2420_dss_rfbi_hwmod = { | ||
1364 | .name = "dss_rfbi", | ||
1365 | .class = &omap2420_rfbi_hwmod_class, | ||
1366 | .main_clk = "dss1_fck", | ||
1367 | .prcm = { | ||
1368 | .omap2 = { | ||
1369 | .prcm_reg_id = 1, | ||
1370 | .module_bit = OMAP24XX_EN_DSS1_SHIFT, | ||
1371 | .module_offs = CORE_MOD, | ||
1372 | }, | ||
1373 | }, | ||
1374 | .slaves = omap2420_dss_rfbi_slaves, | ||
1375 | .slaves_cnt = ARRAY_SIZE(omap2420_dss_rfbi_slaves), | ||
1376 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420), | ||
1377 | .flags = HWMOD_NO_IDLEST, | ||
1378 | }; | ||
1379 | |||
1380 | /* | ||
1381 | * 'venc' class | ||
1382 | * video encoder | ||
1383 | */ | ||
1384 | |||
1385 | static struct omap_hwmod_class omap2420_venc_hwmod_class = { | ||
1386 | .name = "venc", | ||
1387 | }; | ||
1388 | |||
1389 | /* dss_venc */ | ||
1390 | static struct omap_hwmod_addr_space omap2420_dss_venc_addrs[] = { | ||
1391 | { | ||
1392 | .pa_start = 0x48050C00, | ||
1393 | .pa_end = 0x48050FFF, | ||
1394 | .flags = ADDR_TYPE_RT | ||
1395 | }, | ||
1396 | }; | ||
1397 | |||
1398 | /* l4_core -> dss_venc */ | ||
1399 | static struct omap_hwmod_ocp_if omap2420_l4_core__dss_venc = { | ||
1400 | .master = &omap2420_l4_core_hwmod, | ||
1401 | .slave = &omap2420_dss_venc_hwmod, | ||
1402 | .clk = "dss_54m_fck", | ||
1403 | .addr = omap2420_dss_venc_addrs, | ||
1404 | .addr_cnt = ARRAY_SIZE(omap2420_dss_venc_addrs), | ||
1405 | .fw = { | ||
1406 | .omap2 = { | ||
1407 | .l4_fw_region = OMAP2420_L4_CORE_FW_DSS_VENC_REGION, | ||
1408 | .flags = OMAP_FIREWALL_L4, | ||
1409 | } | ||
1410 | }, | ||
1411 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
1412 | }; | ||
1413 | |||
1414 | /* dss_venc slave ports */ | ||
1415 | static struct omap_hwmod_ocp_if *omap2420_dss_venc_slaves[] = { | ||
1416 | &omap2420_l4_core__dss_venc, | ||
1417 | }; | ||
1418 | |||
1419 | static struct omap_hwmod omap2420_dss_venc_hwmod = { | ||
1420 | .name = "dss_venc", | ||
1421 | .class = &omap2420_venc_hwmod_class, | ||
1422 | .main_clk = "dss1_fck", | ||
1423 | .prcm = { | ||
1424 | .omap2 = { | ||
1425 | .prcm_reg_id = 1, | ||
1426 | .module_bit = OMAP24XX_EN_DSS1_SHIFT, | ||
1427 | .module_offs = CORE_MOD, | ||
1428 | }, | ||
1429 | }, | ||
1430 | .slaves = omap2420_dss_venc_slaves, | ||
1431 | .slaves_cnt = ARRAY_SIZE(omap2420_dss_venc_slaves), | ||
1432 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420), | ||
1433 | .flags = HWMOD_NO_IDLEST, | ||
1434 | }; | ||
1435 | |||
473 | /* I2C common */ | 1436 | /* I2C common */ |
474 | static struct omap_hwmod_class_sysconfig i2c_sysc = { | 1437 | static struct omap_hwmod_class_sysconfig i2c_sysc = { |
475 | .rev_offs = 0x00, | 1438 | .rev_offs = 0x00, |
@@ -864,16 +1827,149 @@ static struct omap_hwmod omap2420_dma_system_hwmod = { | |||
864 | .flags = HWMOD_NO_IDLEST, | 1827 | .flags = HWMOD_NO_IDLEST, |
865 | }; | 1828 | }; |
866 | 1829 | ||
1830 | /* | ||
1831 | * 'mcspi' class | ||
1832 | * multichannel serial port interface (mcspi) / master/slave synchronous serial | ||
1833 | * bus | ||
1834 | */ | ||
1835 | |||
1836 | static struct omap_hwmod_class_sysconfig omap2420_mcspi_sysc = { | ||
1837 | .rev_offs = 0x0000, | ||
1838 | .sysc_offs = 0x0010, | ||
1839 | .syss_offs = 0x0014, | ||
1840 | .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE | | ||
1841 | SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET | | ||
1842 | SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS), | ||
1843 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | ||
1844 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
1845 | }; | ||
1846 | |||
1847 | static struct omap_hwmod_class omap2420_mcspi_class = { | ||
1848 | .name = "mcspi", | ||
1849 | .sysc = &omap2420_mcspi_sysc, | ||
1850 | .rev = OMAP2_MCSPI_REV, | ||
1851 | }; | ||
1852 | |||
1853 | /* mcspi1 */ | ||
1854 | static struct omap_hwmod_irq_info omap2420_mcspi1_mpu_irqs[] = { | ||
1855 | { .irq = 65 }, | ||
1856 | }; | ||
1857 | |||
1858 | static struct omap_hwmod_dma_info omap2420_mcspi1_sdma_reqs[] = { | ||
1859 | { .name = "tx0", .dma_req = 35 }, /* DMA_SPI1_TX0 */ | ||
1860 | { .name = "rx0", .dma_req = 36 }, /* DMA_SPI1_RX0 */ | ||
1861 | { .name = "tx1", .dma_req = 37 }, /* DMA_SPI1_TX1 */ | ||
1862 | { .name = "rx1", .dma_req = 38 }, /* DMA_SPI1_RX1 */ | ||
1863 | { .name = "tx2", .dma_req = 39 }, /* DMA_SPI1_TX2 */ | ||
1864 | { .name = "rx2", .dma_req = 40 }, /* DMA_SPI1_RX2 */ | ||
1865 | { .name = "tx3", .dma_req = 41 }, /* DMA_SPI1_TX3 */ | ||
1866 | { .name = "rx3", .dma_req = 42 }, /* DMA_SPI1_RX3 */ | ||
1867 | }; | ||
1868 | |||
1869 | static struct omap_hwmod_ocp_if *omap2420_mcspi1_slaves[] = { | ||
1870 | &omap2420_l4_core__mcspi1, | ||
1871 | }; | ||
1872 | |||
1873 | static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = { | ||
1874 | .num_chipselect = 4, | ||
1875 | }; | ||
1876 | |||
1877 | static struct omap_hwmod omap2420_mcspi1_hwmod = { | ||
1878 | .name = "mcspi1_hwmod", | ||
1879 | .mpu_irqs = omap2420_mcspi1_mpu_irqs, | ||
1880 | .mpu_irqs_cnt = ARRAY_SIZE(omap2420_mcspi1_mpu_irqs), | ||
1881 | .sdma_reqs = omap2420_mcspi1_sdma_reqs, | ||
1882 | .sdma_reqs_cnt = ARRAY_SIZE(omap2420_mcspi1_sdma_reqs), | ||
1883 | .main_clk = "mcspi1_fck", | ||
1884 | .prcm = { | ||
1885 | .omap2 = { | ||
1886 | .module_offs = CORE_MOD, | ||
1887 | .prcm_reg_id = 1, | ||
1888 | .module_bit = OMAP24XX_EN_MCSPI1_SHIFT, | ||
1889 | .idlest_reg_id = 1, | ||
1890 | .idlest_idle_bit = OMAP24XX_ST_MCSPI1_SHIFT, | ||
1891 | }, | ||
1892 | }, | ||
1893 | .slaves = omap2420_mcspi1_slaves, | ||
1894 | .slaves_cnt = ARRAY_SIZE(omap2420_mcspi1_slaves), | ||
1895 | .class = &omap2420_mcspi_class, | ||
1896 | .dev_attr = &omap_mcspi1_dev_attr, | ||
1897 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420), | ||
1898 | }; | ||
1899 | |||
1900 | /* mcspi2 */ | ||
1901 | static struct omap_hwmod_irq_info omap2420_mcspi2_mpu_irqs[] = { | ||
1902 | { .irq = 66 }, | ||
1903 | }; | ||
1904 | |||
1905 | static struct omap_hwmod_dma_info omap2420_mcspi2_sdma_reqs[] = { | ||
1906 | { .name = "tx0", .dma_req = 43 }, /* DMA_SPI2_TX0 */ | ||
1907 | { .name = "rx0", .dma_req = 44 }, /* DMA_SPI2_RX0 */ | ||
1908 | { .name = "tx1", .dma_req = 45 }, /* DMA_SPI2_TX1 */ | ||
1909 | { .name = "rx1", .dma_req = 46 }, /* DMA_SPI2_RX1 */ | ||
1910 | }; | ||
1911 | |||
1912 | static struct omap_hwmod_ocp_if *omap2420_mcspi2_slaves[] = { | ||
1913 | &omap2420_l4_core__mcspi2, | ||
1914 | }; | ||
1915 | |||
1916 | static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = { | ||
1917 | .num_chipselect = 2, | ||
1918 | }; | ||
1919 | |||
1920 | static struct omap_hwmod omap2420_mcspi2_hwmod = { | ||
1921 | .name = "mcspi2_hwmod", | ||
1922 | .mpu_irqs = omap2420_mcspi2_mpu_irqs, | ||
1923 | .mpu_irqs_cnt = ARRAY_SIZE(omap2420_mcspi2_mpu_irqs), | ||
1924 | .sdma_reqs = omap2420_mcspi2_sdma_reqs, | ||
1925 | .sdma_reqs_cnt = ARRAY_SIZE(omap2420_mcspi2_sdma_reqs), | ||
1926 | .main_clk = "mcspi2_fck", | ||
1927 | .prcm = { | ||
1928 | .omap2 = { | ||
1929 | .module_offs = CORE_MOD, | ||
1930 | .prcm_reg_id = 1, | ||
1931 | .module_bit = OMAP24XX_EN_MCSPI2_SHIFT, | ||
1932 | .idlest_reg_id = 1, | ||
1933 | .idlest_idle_bit = OMAP24XX_ST_MCSPI2_SHIFT, | ||
1934 | }, | ||
1935 | }, | ||
1936 | .slaves = omap2420_mcspi2_slaves, | ||
1937 | .slaves_cnt = ARRAY_SIZE(omap2420_mcspi2_slaves), | ||
1938 | .class = &omap2420_mcspi_class, | ||
1939 | .dev_attr = &omap_mcspi2_dev_attr, | ||
1940 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420), | ||
1941 | }; | ||
1942 | |||
867 | static __initdata struct omap_hwmod *omap2420_hwmods[] = { | 1943 | static __initdata struct omap_hwmod *omap2420_hwmods[] = { |
868 | &omap2420_l3_main_hwmod, | 1944 | &omap2420_l3_main_hwmod, |
869 | &omap2420_l4_core_hwmod, | 1945 | &omap2420_l4_core_hwmod, |
870 | &omap2420_l4_wkup_hwmod, | 1946 | &omap2420_l4_wkup_hwmod, |
871 | &omap2420_mpu_hwmod, | 1947 | &omap2420_mpu_hwmod, |
872 | &omap2420_iva_hwmod, | 1948 | &omap2420_iva_hwmod, |
1949 | |||
1950 | &omap2420_timer1_hwmod, | ||
1951 | &omap2420_timer2_hwmod, | ||
1952 | &omap2420_timer3_hwmod, | ||
1953 | &omap2420_timer4_hwmod, | ||
1954 | &omap2420_timer5_hwmod, | ||
1955 | &omap2420_timer6_hwmod, | ||
1956 | &omap2420_timer7_hwmod, | ||
1957 | &omap2420_timer8_hwmod, | ||
1958 | &omap2420_timer9_hwmod, | ||
1959 | &omap2420_timer10_hwmod, | ||
1960 | &omap2420_timer11_hwmod, | ||
1961 | &omap2420_timer12_hwmod, | ||
1962 | |||
873 | &omap2420_wd_timer2_hwmod, | 1963 | &omap2420_wd_timer2_hwmod, |
874 | &omap2420_uart1_hwmod, | 1964 | &omap2420_uart1_hwmod, |
875 | &omap2420_uart2_hwmod, | 1965 | &omap2420_uart2_hwmod, |
876 | &omap2420_uart3_hwmod, | 1966 | &omap2420_uart3_hwmod, |
1967 | /* dss class */ | ||
1968 | &omap2420_dss_core_hwmod, | ||
1969 | &omap2420_dss_dispc_hwmod, | ||
1970 | &omap2420_dss_rfbi_hwmod, | ||
1971 | &omap2420_dss_venc_hwmod, | ||
1972 | /* i2c class */ | ||
877 | &omap2420_i2c1_hwmod, | 1973 | &omap2420_i2c1_hwmod, |
878 | &omap2420_i2c2_hwmod, | 1974 | &omap2420_i2c2_hwmod, |
879 | 1975 | ||
@@ -885,10 +1981,14 @@ static __initdata struct omap_hwmod *omap2420_hwmods[] = { | |||
885 | 1981 | ||
886 | /* dma_system class*/ | 1982 | /* dma_system class*/ |
887 | &omap2420_dma_system_hwmod, | 1983 | &omap2420_dma_system_hwmod, |
1984 | |||
1985 | /* mcspi class */ | ||
1986 | &omap2420_mcspi1_hwmod, | ||
1987 | &omap2420_mcspi2_hwmod, | ||
888 | NULL, | 1988 | NULL, |
889 | }; | 1989 | }; |
890 | 1990 | ||
891 | int __init omap2420_hwmod_init(void) | 1991 | int __init omap2420_hwmod_init(void) |
892 | { | 1992 | { |
893 | return omap_hwmod_init(omap2420_hwmods); | 1993 | return omap_hwmod_register(omap2420_hwmods); |
894 | } | 1994 | } |
diff --git a/arch/arm/mach-omap2/omap_hwmod_2430_data.c b/arch/arm/mach-omap2/omap_hwmod_2430_data.c index 8ecfbcde13ba..b46a54ce1a41 100644 --- a/arch/arm/mach-omap2/omap_hwmod_2430_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_2430_data.c | |||
@@ -18,6 +18,9 @@ | |||
18 | #include <plat/serial.h> | 18 | #include <plat/serial.h> |
19 | #include <plat/i2c.h> | 19 | #include <plat/i2c.h> |
20 | #include <plat/gpio.h> | 20 | #include <plat/gpio.h> |
21 | #include <plat/mcspi.h> | ||
22 | #include <plat/dmtimer.h> | ||
23 | #include <plat/l3_2xxx.h> | ||
21 | 24 | ||
22 | #include "omap_hwmod_common_data.h" | 25 | #include "omap_hwmod_common_data.h" |
23 | 26 | ||
@@ -38,6 +41,10 @@ static struct omap_hwmod omap2430_mpu_hwmod; | |||
38 | static struct omap_hwmod omap2430_iva_hwmod; | 41 | static struct omap_hwmod omap2430_iva_hwmod; |
39 | static struct omap_hwmod omap2430_l3_main_hwmod; | 42 | static struct omap_hwmod omap2430_l3_main_hwmod; |
40 | static struct omap_hwmod omap2430_l4_core_hwmod; | 43 | static struct omap_hwmod omap2430_l4_core_hwmod; |
44 | static struct omap_hwmod omap2430_dss_core_hwmod; | ||
45 | static struct omap_hwmod omap2430_dss_dispc_hwmod; | ||
46 | static struct omap_hwmod omap2430_dss_rfbi_hwmod; | ||
47 | static struct omap_hwmod omap2430_dss_venc_hwmod; | ||
41 | static struct omap_hwmod omap2430_wd_timer2_hwmod; | 48 | static struct omap_hwmod omap2430_wd_timer2_hwmod; |
42 | static struct omap_hwmod omap2430_gpio1_hwmod; | 49 | static struct omap_hwmod omap2430_gpio1_hwmod; |
43 | static struct omap_hwmod omap2430_gpio2_hwmod; | 50 | static struct omap_hwmod omap2430_gpio2_hwmod; |
@@ -45,6 +52,9 @@ static struct omap_hwmod omap2430_gpio3_hwmod; | |||
45 | static struct omap_hwmod omap2430_gpio4_hwmod; | 52 | static struct omap_hwmod omap2430_gpio4_hwmod; |
46 | static struct omap_hwmod omap2430_gpio5_hwmod; | 53 | static struct omap_hwmod omap2430_gpio5_hwmod; |
47 | static struct omap_hwmod omap2430_dma_system_hwmod; | 54 | static struct omap_hwmod omap2430_dma_system_hwmod; |
55 | static struct omap_hwmod omap2430_mcspi1_hwmod; | ||
56 | static struct omap_hwmod omap2430_mcspi2_hwmod; | ||
57 | static struct omap_hwmod omap2430_mcspi3_hwmod; | ||
48 | 58 | ||
49 | /* L3 -> L4_CORE interface */ | 59 | /* L3 -> L4_CORE interface */ |
50 | static struct omap_hwmod_ocp_if omap2430_l3_main__l4_core = { | 60 | static struct omap_hwmod_ocp_if omap2430_l3_main__l4_core = { |
@@ -65,6 +75,19 @@ static struct omap_hwmod_ocp_if *omap2430_l3_main_slaves[] = { | |||
65 | &omap2430_mpu__l3_main, | 75 | &omap2430_mpu__l3_main, |
66 | }; | 76 | }; |
67 | 77 | ||
78 | /* DSS -> l3 */ | ||
79 | static struct omap_hwmod_ocp_if omap2430_dss__l3 = { | ||
80 | .master = &omap2430_dss_core_hwmod, | ||
81 | .slave = &omap2430_l3_main_hwmod, | ||
82 | .fw = { | ||
83 | .omap2 = { | ||
84 | .l3_perm_bit = OMAP2_L3_CORE_FW_CONNID_DSS, | ||
85 | .flags = OMAP_FIREWALL_L3, | ||
86 | } | ||
87 | }, | ||
88 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
89 | }; | ||
90 | |||
68 | /* Master interfaces on the L3 interconnect */ | 91 | /* Master interfaces on the L3 interconnect */ |
69 | static struct omap_hwmod_ocp_if *omap2430_l3_main_masters[] = { | 92 | static struct omap_hwmod_ocp_if *omap2430_l3_main_masters[] = { |
70 | &omap2430_l3_main__l4_core, | 93 | &omap2430_l3_main__l4_core, |
@@ -89,6 +112,16 @@ static struct omap_hwmod omap2430_uart3_hwmod; | |||
89 | static struct omap_hwmod omap2430_i2c1_hwmod; | 112 | static struct omap_hwmod omap2430_i2c1_hwmod; |
90 | static struct omap_hwmod omap2430_i2c2_hwmod; | 113 | static struct omap_hwmod omap2430_i2c2_hwmod; |
91 | 114 | ||
115 | static struct omap_hwmod omap2430_usbhsotg_hwmod; | ||
116 | |||
117 | /* l3_core -> usbhsotg interface */ | ||
118 | static struct omap_hwmod_ocp_if omap2430_usbhsotg__l3 = { | ||
119 | .master = &omap2430_usbhsotg_hwmod, | ||
120 | .slave = &omap2430_l3_main_hwmod, | ||
121 | .clk = "core_l3_ck", | ||
122 | .user = OCP_USER_MPU, | ||
123 | }; | ||
124 | |||
92 | /* I2C IP block address space length (in bytes) */ | 125 | /* I2C IP block address space length (in bytes) */ |
93 | #define OMAP2_I2C_AS_LEN 128 | 126 | #define OMAP2_I2C_AS_LEN 128 |
94 | 127 | ||
@@ -189,6 +222,35 @@ static struct omap_hwmod_ocp_if omap2_l4_core__uart3 = { | |||
189 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 222 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
190 | }; | 223 | }; |
191 | 224 | ||
225 | /* | ||
226 | * usbhsotg interface data | ||
227 | */ | ||
228 | static struct omap_hwmod_addr_space omap2430_usbhsotg_addrs[] = { | ||
229 | { | ||
230 | .pa_start = OMAP243X_HS_BASE, | ||
231 | .pa_end = OMAP243X_HS_BASE + SZ_4K - 1, | ||
232 | .flags = ADDR_TYPE_RT | ||
233 | }, | ||
234 | }; | ||
235 | |||
236 | /* l4_core ->usbhsotg interface */ | ||
237 | static struct omap_hwmod_ocp_if omap2430_l4_core__usbhsotg = { | ||
238 | .master = &omap2430_l4_core_hwmod, | ||
239 | .slave = &omap2430_usbhsotg_hwmod, | ||
240 | .clk = "usb_l4_ick", | ||
241 | .addr = omap2430_usbhsotg_addrs, | ||
242 | .addr_cnt = ARRAY_SIZE(omap2430_usbhsotg_addrs), | ||
243 | .user = OCP_USER_MPU, | ||
244 | }; | ||
245 | |||
246 | static struct omap_hwmod_ocp_if *omap2430_usbhsotg_masters[] = { | ||
247 | &omap2430_usbhsotg__l3, | ||
248 | }; | ||
249 | |||
250 | static struct omap_hwmod_ocp_if *omap2430_usbhsotg_slaves[] = { | ||
251 | &omap2430_l4_core__usbhsotg, | ||
252 | }; | ||
253 | |||
192 | /* Slave interfaces on the L4_CORE interconnect */ | 254 | /* Slave interfaces on the L4_CORE interconnect */ |
193 | static struct omap_hwmod_ocp_if *omap2430_l4_core_slaves[] = { | 255 | static struct omap_hwmod_ocp_if *omap2430_l4_core_slaves[] = { |
194 | &omap2430_l3_main__l4_core, | 256 | &omap2430_l3_main__l4_core, |
@@ -223,6 +285,60 @@ static struct omap_hwmod_ocp_if *omap2430_l4_wkup_slaves[] = { | |||
223 | static struct omap_hwmod_ocp_if *omap2430_l4_wkup_masters[] = { | 285 | static struct omap_hwmod_ocp_if *omap2430_l4_wkup_masters[] = { |
224 | }; | 286 | }; |
225 | 287 | ||
288 | /* l4 core -> mcspi1 interface */ | ||
289 | static struct omap_hwmod_addr_space omap2430_mcspi1_addr_space[] = { | ||
290 | { | ||
291 | .pa_start = 0x48098000, | ||
292 | .pa_end = 0x480980ff, | ||
293 | .flags = ADDR_TYPE_RT, | ||
294 | }, | ||
295 | }; | ||
296 | |||
297 | static struct omap_hwmod_ocp_if omap2430_l4_core__mcspi1 = { | ||
298 | .master = &omap2430_l4_core_hwmod, | ||
299 | .slave = &omap2430_mcspi1_hwmod, | ||
300 | .clk = "mcspi1_ick", | ||
301 | .addr = omap2430_mcspi1_addr_space, | ||
302 | .addr_cnt = ARRAY_SIZE(omap2430_mcspi1_addr_space), | ||
303 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
304 | }; | ||
305 | |||
306 | /* l4 core -> mcspi2 interface */ | ||
307 | static struct omap_hwmod_addr_space omap2430_mcspi2_addr_space[] = { | ||
308 | { | ||
309 | .pa_start = 0x4809a000, | ||
310 | .pa_end = 0x4809a0ff, | ||
311 | .flags = ADDR_TYPE_RT, | ||
312 | }, | ||
313 | }; | ||
314 | |||
315 | static struct omap_hwmod_ocp_if omap2430_l4_core__mcspi2 = { | ||
316 | .master = &omap2430_l4_core_hwmod, | ||
317 | .slave = &omap2430_mcspi2_hwmod, | ||
318 | .clk = "mcspi2_ick", | ||
319 | .addr = omap2430_mcspi2_addr_space, | ||
320 | .addr_cnt = ARRAY_SIZE(omap2430_mcspi2_addr_space), | ||
321 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
322 | }; | ||
323 | |||
324 | /* l4 core -> mcspi3 interface */ | ||
325 | static struct omap_hwmod_addr_space omap2430_mcspi3_addr_space[] = { | ||
326 | { | ||
327 | .pa_start = 0x480b8000, | ||
328 | .pa_end = 0x480b80ff, | ||
329 | .flags = ADDR_TYPE_RT, | ||
330 | }, | ||
331 | }; | ||
332 | |||
333 | static struct omap_hwmod_ocp_if omap2430_l4_core__mcspi3 = { | ||
334 | .master = &omap2430_l4_core_hwmod, | ||
335 | .slave = &omap2430_mcspi3_hwmod, | ||
336 | .clk = "mcspi3_ick", | ||
337 | .addr = omap2430_mcspi3_addr_space, | ||
338 | .addr_cnt = ARRAY_SIZE(omap2430_mcspi3_addr_space), | ||
339 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
340 | }; | ||
341 | |||
226 | /* L4 WKUP */ | 342 | /* L4 WKUP */ |
227 | static struct omap_hwmod omap2430_l4_wkup_hwmod = { | 343 | static struct omap_hwmod omap2430_l4_wkup_hwmod = { |
228 | .name = "l4_wkup", | 344 | .name = "l4_wkup", |
@@ -278,6 +394,624 @@ static struct omap_hwmod omap2430_iva_hwmod = { | |||
278 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430) | 394 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430) |
279 | }; | 395 | }; |
280 | 396 | ||
397 | /* Timer Common */ | ||
398 | static struct omap_hwmod_class_sysconfig omap2430_timer_sysc = { | ||
399 | .rev_offs = 0x0000, | ||
400 | .sysc_offs = 0x0010, | ||
401 | .syss_offs = 0x0014, | ||
402 | .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_CLOCKACTIVITY | | ||
403 | SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET | | ||
404 | SYSC_HAS_AUTOIDLE), | ||
405 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | ||
406 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
407 | }; | ||
408 | |||
409 | static struct omap_hwmod_class omap2430_timer_hwmod_class = { | ||
410 | .name = "timer", | ||
411 | .sysc = &omap2430_timer_sysc, | ||
412 | .rev = OMAP_TIMER_IP_VERSION_1, | ||
413 | }; | ||
414 | |||
415 | /* timer1 */ | ||
416 | static struct omap_hwmod omap2430_timer1_hwmod; | ||
417 | static struct omap_hwmod_irq_info omap2430_timer1_mpu_irqs[] = { | ||
418 | { .irq = 37, }, | ||
419 | }; | ||
420 | |||
421 | static struct omap_hwmod_addr_space omap2430_timer1_addrs[] = { | ||
422 | { | ||
423 | .pa_start = 0x49018000, | ||
424 | .pa_end = 0x49018000 + SZ_1K - 1, | ||
425 | .flags = ADDR_TYPE_RT | ||
426 | }, | ||
427 | }; | ||
428 | |||
429 | /* l4_wkup -> timer1 */ | ||
430 | static struct omap_hwmod_ocp_if omap2430_l4_wkup__timer1 = { | ||
431 | .master = &omap2430_l4_wkup_hwmod, | ||
432 | .slave = &omap2430_timer1_hwmod, | ||
433 | .clk = "gpt1_ick", | ||
434 | .addr = omap2430_timer1_addrs, | ||
435 | .addr_cnt = ARRAY_SIZE(omap2430_timer1_addrs), | ||
436 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
437 | }; | ||
438 | |||
439 | /* timer1 slave port */ | ||
440 | static struct omap_hwmod_ocp_if *omap2430_timer1_slaves[] = { | ||
441 | &omap2430_l4_wkup__timer1, | ||
442 | }; | ||
443 | |||
444 | /* timer1 hwmod */ | ||
445 | static struct omap_hwmod omap2430_timer1_hwmod = { | ||
446 | .name = "timer1", | ||
447 | .mpu_irqs = omap2430_timer1_mpu_irqs, | ||
448 | .mpu_irqs_cnt = ARRAY_SIZE(omap2430_timer1_mpu_irqs), | ||
449 | .main_clk = "gpt1_fck", | ||
450 | .prcm = { | ||
451 | .omap2 = { | ||
452 | .prcm_reg_id = 1, | ||
453 | .module_bit = OMAP24XX_EN_GPT1_SHIFT, | ||
454 | .module_offs = WKUP_MOD, | ||
455 | .idlest_reg_id = 1, | ||
456 | .idlest_idle_bit = OMAP24XX_ST_GPT1_SHIFT, | ||
457 | }, | ||
458 | }, | ||
459 | .slaves = omap2430_timer1_slaves, | ||
460 | .slaves_cnt = ARRAY_SIZE(omap2430_timer1_slaves), | ||
461 | .class = &omap2430_timer_hwmod_class, | ||
462 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430) | ||
463 | }; | ||
464 | |||
465 | /* timer2 */ | ||
466 | static struct omap_hwmod omap2430_timer2_hwmod; | ||
467 | static struct omap_hwmod_irq_info omap2430_timer2_mpu_irqs[] = { | ||
468 | { .irq = 38, }, | ||
469 | }; | ||
470 | |||
471 | static struct omap_hwmod_addr_space omap2430_timer2_addrs[] = { | ||
472 | { | ||
473 | .pa_start = 0x4802a000, | ||
474 | .pa_end = 0x4802a000 + SZ_1K - 1, | ||
475 | .flags = ADDR_TYPE_RT | ||
476 | }, | ||
477 | }; | ||
478 | |||
479 | /* l4_core -> timer2 */ | ||
480 | static struct omap_hwmod_ocp_if omap2430_l4_core__timer2 = { | ||
481 | .master = &omap2430_l4_core_hwmod, | ||
482 | .slave = &omap2430_timer2_hwmod, | ||
483 | .clk = "gpt2_ick", | ||
484 | .addr = omap2430_timer2_addrs, | ||
485 | .addr_cnt = ARRAY_SIZE(omap2430_timer2_addrs), | ||
486 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
487 | }; | ||
488 | |||
489 | /* timer2 slave port */ | ||
490 | static struct omap_hwmod_ocp_if *omap2430_timer2_slaves[] = { | ||
491 | &omap2430_l4_core__timer2, | ||
492 | }; | ||
493 | |||
494 | /* timer2 hwmod */ | ||
495 | static struct omap_hwmod omap2430_timer2_hwmod = { | ||
496 | .name = "timer2", | ||
497 | .mpu_irqs = omap2430_timer2_mpu_irqs, | ||
498 | .mpu_irqs_cnt = ARRAY_SIZE(omap2430_timer2_mpu_irqs), | ||
499 | .main_clk = "gpt2_fck", | ||
500 | .prcm = { | ||
501 | .omap2 = { | ||
502 | .prcm_reg_id = 1, | ||
503 | .module_bit = OMAP24XX_EN_GPT2_SHIFT, | ||
504 | .module_offs = CORE_MOD, | ||
505 | .idlest_reg_id = 1, | ||
506 | .idlest_idle_bit = OMAP24XX_ST_GPT2_SHIFT, | ||
507 | }, | ||
508 | }, | ||
509 | .slaves = omap2430_timer2_slaves, | ||
510 | .slaves_cnt = ARRAY_SIZE(omap2430_timer2_slaves), | ||
511 | .class = &omap2430_timer_hwmod_class, | ||
512 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430) | ||
513 | }; | ||
514 | |||
515 | /* timer3 */ | ||
516 | static struct omap_hwmod omap2430_timer3_hwmod; | ||
517 | static struct omap_hwmod_irq_info omap2430_timer3_mpu_irqs[] = { | ||
518 | { .irq = 39, }, | ||
519 | }; | ||
520 | |||
521 | static struct omap_hwmod_addr_space omap2430_timer3_addrs[] = { | ||
522 | { | ||
523 | .pa_start = 0x48078000, | ||
524 | .pa_end = 0x48078000 + SZ_1K - 1, | ||
525 | .flags = ADDR_TYPE_RT | ||
526 | }, | ||
527 | }; | ||
528 | |||
529 | /* l4_core -> timer3 */ | ||
530 | static struct omap_hwmod_ocp_if omap2430_l4_core__timer3 = { | ||
531 | .master = &omap2430_l4_core_hwmod, | ||
532 | .slave = &omap2430_timer3_hwmod, | ||
533 | .clk = "gpt3_ick", | ||
534 | .addr = omap2430_timer3_addrs, | ||
535 | .addr_cnt = ARRAY_SIZE(omap2430_timer3_addrs), | ||
536 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
537 | }; | ||
538 | |||
539 | /* timer3 slave port */ | ||
540 | static struct omap_hwmod_ocp_if *omap2430_timer3_slaves[] = { | ||
541 | &omap2430_l4_core__timer3, | ||
542 | }; | ||
543 | |||
544 | /* timer3 hwmod */ | ||
545 | static struct omap_hwmod omap2430_timer3_hwmod = { | ||
546 | .name = "timer3", | ||
547 | .mpu_irqs = omap2430_timer3_mpu_irqs, | ||
548 | .mpu_irqs_cnt = ARRAY_SIZE(omap2430_timer3_mpu_irqs), | ||
549 | .main_clk = "gpt3_fck", | ||
550 | .prcm = { | ||
551 | .omap2 = { | ||
552 | .prcm_reg_id = 1, | ||
553 | .module_bit = OMAP24XX_EN_GPT3_SHIFT, | ||
554 | .module_offs = CORE_MOD, | ||
555 | .idlest_reg_id = 1, | ||
556 | .idlest_idle_bit = OMAP24XX_ST_GPT3_SHIFT, | ||
557 | }, | ||
558 | }, | ||
559 | .slaves = omap2430_timer3_slaves, | ||
560 | .slaves_cnt = ARRAY_SIZE(omap2430_timer3_slaves), | ||
561 | .class = &omap2430_timer_hwmod_class, | ||
562 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430) | ||
563 | }; | ||
564 | |||
565 | /* timer4 */ | ||
566 | static struct omap_hwmod omap2430_timer4_hwmod; | ||
567 | static struct omap_hwmod_irq_info omap2430_timer4_mpu_irqs[] = { | ||
568 | { .irq = 40, }, | ||
569 | }; | ||
570 | |||
571 | static struct omap_hwmod_addr_space omap2430_timer4_addrs[] = { | ||
572 | { | ||
573 | .pa_start = 0x4807a000, | ||
574 | .pa_end = 0x4807a000 + SZ_1K - 1, | ||
575 | .flags = ADDR_TYPE_RT | ||
576 | }, | ||
577 | }; | ||
578 | |||
579 | /* l4_core -> timer4 */ | ||
580 | static struct omap_hwmod_ocp_if omap2430_l4_core__timer4 = { | ||
581 | .master = &omap2430_l4_core_hwmod, | ||
582 | .slave = &omap2430_timer4_hwmod, | ||
583 | .clk = "gpt4_ick", | ||
584 | .addr = omap2430_timer4_addrs, | ||
585 | .addr_cnt = ARRAY_SIZE(omap2430_timer4_addrs), | ||
586 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
587 | }; | ||
588 | |||
589 | /* timer4 slave port */ | ||
590 | static struct omap_hwmod_ocp_if *omap2430_timer4_slaves[] = { | ||
591 | &omap2430_l4_core__timer4, | ||
592 | }; | ||
593 | |||
594 | /* timer4 hwmod */ | ||
595 | static struct omap_hwmod omap2430_timer4_hwmod = { | ||
596 | .name = "timer4", | ||
597 | .mpu_irqs = omap2430_timer4_mpu_irqs, | ||
598 | .mpu_irqs_cnt = ARRAY_SIZE(omap2430_timer4_mpu_irqs), | ||
599 | .main_clk = "gpt4_fck", | ||
600 | .prcm = { | ||
601 | .omap2 = { | ||
602 | .prcm_reg_id = 1, | ||
603 | .module_bit = OMAP24XX_EN_GPT4_SHIFT, | ||
604 | .module_offs = CORE_MOD, | ||
605 | .idlest_reg_id = 1, | ||
606 | .idlest_idle_bit = OMAP24XX_ST_GPT4_SHIFT, | ||
607 | }, | ||
608 | }, | ||
609 | .slaves = omap2430_timer4_slaves, | ||
610 | .slaves_cnt = ARRAY_SIZE(omap2430_timer4_slaves), | ||
611 | .class = &omap2430_timer_hwmod_class, | ||
612 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430) | ||
613 | }; | ||
614 | |||
615 | /* timer5 */ | ||
616 | static struct omap_hwmod omap2430_timer5_hwmod; | ||
617 | static struct omap_hwmod_irq_info omap2430_timer5_mpu_irqs[] = { | ||
618 | { .irq = 41, }, | ||
619 | }; | ||
620 | |||
621 | static struct omap_hwmod_addr_space omap2430_timer5_addrs[] = { | ||
622 | { | ||
623 | .pa_start = 0x4807c000, | ||
624 | .pa_end = 0x4807c000 + SZ_1K - 1, | ||
625 | .flags = ADDR_TYPE_RT | ||
626 | }, | ||
627 | }; | ||
628 | |||
629 | /* l4_core -> timer5 */ | ||
630 | static struct omap_hwmod_ocp_if omap2430_l4_core__timer5 = { | ||
631 | .master = &omap2430_l4_core_hwmod, | ||
632 | .slave = &omap2430_timer5_hwmod, | ||
633 | .clk = "gpt5_ick", | ||
634 | .addr = omap2430_timer5_addrs, | ||
635 | .addr_cnt = ARRAY_SIZE(omap2430_timer5_addrs), | ||
636 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
637 | }; | ||
638 | |||
639 | /* timer5 slave port */ | ||
640 | static struct omap_hwmod_ocp_if *omap2430_timer5_slaves[] = { | ||
641 | &omap2430_l4_core__timer5, | ||
642 | }; | ||
643 | |||
644 | /* timer5 hwmod */ | ||
645 | static struct omap_hwmod omap2430_timer5_hwmod = { | ||
646 | .name = "timer5", | ||
647 | .mpu_irqs = omap2430_timer5_mpu_irqs, | ||
648 | .mpu_irqs_cnt = ARRAY_SIZE(omap2430_timer5_mpu_irqs), | ||
649 | .main_clk = "gpt5_fck", | ||
650 | .prcm = { | ||
651 | .omap2 = { | ||
652 | .prcm_reg_id = 1, | ||
653 | .module_bit = OMAP24XX_EN_GPT5_SHIFT, | ||
654 | .module_offs = CORE_MOD, | ||
655 | .idlest_reg_id = 1, | ||
656 | .idlest_idle_bit = OMAP24XX_ST_GPT5_SHIFT, | ||
657 | }, | ||
658 | }, | ||
659 | .slaves = omap2430_timer5_slaves, | ||
660 | .slaves_cnt = ARRAY_SIZE(omap2430_timer5_slaves), | ||
661 | .class = &omap2430_timer_hwmod_class, | ||
662 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430) | ||
663 | }; | ||
664 | |||
665 | /* timer6 */ | ||
666 | static struct omap_hwmod omap2430_timer6_hwmod; | ||
667 | static struct omap_hwmod_irq_info omap2430_timer6_mpu_irqs[] = { | ||
668 | { .irq = 42, }, | ||
669 | }; | ||
670 | |||
671 | static struct omap_hwmod_addr_space omap2430_timer6_addrs[] = { | ||
672 | { | ||
673 | .pa_start = 0x4807e000, | ||
674 | .pa_end = 0x4807e000 + SZ_1K - 1, | ||
675 | .flags = ADDR_TYPE_RT | ||
676 | }, | ||
677 | }; | ||
678 | |||
679 | /* l4_core -> timer6 */ | ||
680 | static struct omap_hwmod_ocp_if omap2430_l4_core__timer6 = { | ||
681 | .master = &omap2430_l4_core_hwmod, | ||
682 | .slave = &omap2430_timer6_hwmod, | ||
683 | .clk = "gpt6_ick", | ||
684 | .addr = omap2430_timer6_addrs, | ||
685 | .addr_cnt = ARRAY_SIZE(omap2430_timer6_addrs), | ||
686 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
687 | }; | ||
688 | |||
689 | /* timer6 slave port */ | ||
690 | static struct omap_hwmod_ocp_if *omap2430_timer6_slaves[] = { | ||
691 | &omap2430_l4_core__timer6, | ||
692 | }; | ||
693 | |||
694 | /* timer6 hwmod */ | ||
695 | static struct omap_hwmod omap2430_timer6_hwmod = { | ||
696 | .name = "timer6", | ||
697 | .mpu_irqs = omap2430_timer6_mpu_irqs, | ||
698 | .mpu_irqs_cnt = ARRAY_SIZE(omap2430_timer6_mpu_irqs), | ||
699 | .main_clk = "gpt6_fck", | ||
700 | .prcm = { | ||
701 | .omap2 = { | ||
702 | .prcm_reg_id = 1, | ||
703 | .module_bit = OMAP24XX_EN_GPT6_SHIFT, | ||
704 | .module_offs = CORE_MOD, | ||
705 | .idlest_reg_id = 1, | ||
706 | .idlest_idle_bit = OMAP24XX_ST_GPT6_SHIFT, | ||
707 | }, | ||
708 | }, | ||
709 | .slaves = omap2430_timer6_slaves, | ||
710 | .slaves_cnt = ARRAY_SIZE(omap2430_timer6_slaves), | ||
711 | .class = &omap2430_timer_hwmod_class, | ||
712 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430) | ||
713 | }; | ||
714 | |||
715 | /* timer7 */ | ||
716 | static struct omap_hwmod omap2430_timer7_hwmod; | ||
717 | static struct omap_hwmod_irq_info omap2430_timer7_mpu_irqs[] = { | ||
718 | { .irq = 43, }, | ||
719 | }; | ||
720 | |||
721 | static struct omap_hwmod_addr_space omap2430_timer7_addrs[] = { | ||
722 | { | ||
723 | .pa_start = 0x48080000, | ||
724 | .pa_end = 0x48080000 + SZ_1K - 1, | ||
725 | .flags = ADDR_TYPE_RT | ||
726 | }, | ||
727 | }; | ||
728 | |||
729 | /* l4_core -> timer7 */ | ||
730 | static struct omap_hwmod_ocp_if omap2430_l4_core__timer7 = { | ||
731 | .master = &omap2430_l4_core_hwmod, | ||
732 | .slave = &omap2430_timer7_hwmod, | ||
733 | .clk = "gpt7_ick", | ||
734 | .addr = omap2430_timer7_addrs, | ||
735 | .addr_cnt = ARRAY_SIZE(omap2430_timer7_addrs), | ||
736 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
737 | }; | ||
738 | |||
739 | /* timer7 slave port */ | ||
740 | static struct omap_hwmod_ocp_if *omap2430_timer7_slaves[] = { | ||
741 | &omap2430_l4_core__timer7, | ||
742 | }; | ||
743 | |||
744 | /* timer7 hwmod */ | ||
745 | static struct omap_hwmod omap2430_timer7_hwmod = { | ||
746 | .name = "timer7", | ||
747 | .mpu_irqs = omap2430_timer7_mpu_irqs, | ||
748 | .mpu_irqs_cnt = ARRAY_SIZE(omap2430_timer7_mpu_irqs), | ||
749 | .main_clk = "gpt7_fck", | ||
750 | .prcm = { | ||
751 | .omap2 = { | ||
752 | .prcm_reg_id = 1, | ||
753 | .module_bit = OMAP24XX_EN_GPT7_SHIFT, | ||
754 | .module_offs = CORE_MOD, | ||
755 | .idlest_reg_id = 1, | ||
756 | .idlest_idle_bit = OMAP24XX_ST_GPT7_SHIFT, | ||
757 | }, | ||
758 | }, | ||
759 | .slaves = omap2430_timer7_slaves, | ||
760 | .slaves_cnt = ARRAY_SIZE(omap2430_timer7_slaves), | ||
761 | .class = &omap2430_timer_hwmod_class, | ||
762 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430) | ||
763 | }; | ||
764 | |||
765 | /* timer8 */ | ||
766 | static struct omap_hwmod omap2430_timer8_hwmod; | ||
767 | static struct omap_hwmod_irq_info omap2430_timer8_mpu_irqs[] = { | ||
768 | { .irq = 44, }, | ||
769 | }; | ||
770 | |||
771 | static struct omap_hwmod_addr_space omap2430_timer8_addrs[] = { | ||
772 | { | ||
773 | .pa_start = 0x48082000, | ||
774 | .pa_end = 0x48082000 + SZ_1K - 1, | ||
775 | .flags = ADDR_TYPE_RT | ||
776 | }, | ||
777 | }; | ||
778 | |||
779 | /* l4_core -> timer8 */ | ||
780 | static struct omap_hwmod_ocp_if omap2430_l4_core__timer8 = { | ||
781 | .master = &omap2430_l4_core_hwmod, | ||
782 | .slave = &omap2430_timer8_hwmod, | ||
783 | .clk = "gpt8_ick", | ||
784 | .addr = omap2430_timer8_addrs, | ||
785 | .addr_cnt = ARRAY_SIZE(omap2430_timer8_addrs), | ||
786 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
787 | }; | ||
788 | |||
789 | /* timer8 slave port */ | ||
790 | static struct omap_hwmod_ocp_if *omap2430_timer8_slaves[] = { | ||
791 | &omap2430_l4_core__timer8, | ||
792 | }; | ||
793 | |||
794 | /* timer8 hwmod */ | ||
795 | static struct omap_hwmod omap2430_timer8_hwmod = { | ||
796 | .name = "timer8", | ||
797 | .mpu_irqs = omap2430_timer8_mpu_irqs, | ||
798 | .mpu_irqs_cnt = ARRAY_SIZE(omap2430_timer8_mpu_irqs), | ||
799 | .main_clk = "gpt8_fck", | ||
800 | .prcm = { | ||
801 | .omap2 = { | ||
802 | .prcm_reg_id = 1, | ||
803 | .module_bit = OMAP24XX_EN_GPT8_SHIFT, | ||
804 | .module_offs = CORE_MOD, | ||
805 | .idlest_reg_id = 1, | ||
806 | .idlest_idle_bit = OMAP24XX_ST_GPT8_SHIFT, | ||
807 | }, | ||
808 | }, | ||
809 | .slaves = omap2430_timer8_slaves, | ||
810 | .slaves_cnt = ARRAY_SIZE(omap2430_timer8_slaves), | ||
811 | .class = &omap2430_timer_hwmod_class, | ||
812 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430) | ||
813 | }; | ||
814 | |||
815 | /* timer9 */ | ||
816 | static struct omap_hwmod omap2430_timer9_hwmod; | ||
817 | static struct omap_hwmod_irq_info omap2430_timer9_mpu_irqs[] = { | ||
818 | { .irq = 45, }, | ||
819 | }; | ||
820 | |||
821 | static struct omap_hwmod_addr_space omap2430_timer9_addrs[] = { | ||
822 | { | ||
823 | .pa_start = 0x48084000, | ||
824 | .pa_end = 0x48084000 + SZ_1K - 1, | ||
825 | .flags = ADDR_TYPE_RT | ||
826 | }, | ||
827 | }; | ||
828 | |||
829 | /* l4_core -> timer9 */ | ||
830 | static struct omap_hwmod_ocp_if omap2430_l4_core__timer9 = { | ||
831 | .master = &omap2430_l4_core_hwmod, | ||
832 | .slave = &omap2430_timer9_hwmod, | ||
833 | .clk = "gpt9_ick", | ||
834 | .addr = omap2430_timer9_addrs, | ||
835 | .addr_cnt = ARRAY_SIZE(omap2430_timer9_addrs), | ||
836 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
837 | }; | ||
838 | |||
839 | /* timer9 slave port */ | ||
840 | static struct omap_hwmod_ocp_if *omap2430_timer9_slaves[] = { | ||
841 | &omap2430_l4_core__timer9, | ||
842 | }; | ||
843 | |||
844 | /* timer9 hwmod */ | ||
845 | static struct omap_hwmod omap2430_timer9_hwmod = { | ||
846 | .name = "timer9", | ||
847 | .mpu_irqs = omap2430_timer9_mpu_irqs, | ||
848 | .mpu_irqs_cnt = ARRAY_SIZE(omap2430_timer9_mpu_irqs), | ||
849 | .main_clk = "gpt9_fck", | ||
850 | .prcm = { | ||
851 | .omap2 = { | ||
852 | .prcm_reg_id = 1, | ||
853 | .module_bit = OMAP24XX_EN_GPT9_SHIFT, | ||
854 | .module_offs = CORE_MOD, | ||
855 | .idlest_reg_id = 1, | ||
856 | .idlest_idle_bit = OMAP24XX_ST_GPT9_SHIFT, | ||
857 | }, | ||
858 | }, | ||
859 | .slaves = omap2430_timer9_slaves, | ||
860 | .slaves_cnt = ARRAY_SIZE(omap2430_timer9_slaves), | ||
861 | .class = &omap2430_timer_hwmod_class, | ||
862 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430) | ||
863 | }; | ||
864 | |||
865 | /* timer10 */ | ||
866 | static struct omap_hwmod omap2430_timer10_hwmod; | ||
867 | static struct omap_hwmod_irq_info omap2430_timer10_mpu_irqs[] = { | ||
868 | { .irq = 46, }, | ||
869 | }; | ||
870 | |||
871 | static struct omap_hwmod_addr_space omap2430_timer10_addrs[] = { | ||
872 | { | ||
873 | .pa_start = 0x48086000, | ||
874 | .pa_end = 0x48086000 + SZ_1K - 1, | ||
875 | .flags = ADDR_TYPE_RT | ||
876 | }, | ||
877 | }; | ||
878 | |||
879 | /* l4_core -> timer10 */ | ||
880 | static struct omap_hwmod_ocp_if omap2430_l4_core__timer10 = { | ||
881 | .master = &omap2430_l4_core_hwmod, | ||
882 | .slave = &omap2430_timer10_hwmod, | ||
883 | .clk = "gpt10_ick", | ||
884 | .addr = omap2430_timer10_addrs, | ||
885 | .addr_cnt = ARRAY_SIZE(omap2430_timer10_addrs), | ||
886 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
887 | }; | ||
888 | |||
889 | /* timer10 slave port */ | ||
890 | static struct omap_hwmod_ocp_if *omap2430_timer10_slaves[] = { | ||
891 | &omap2430_l4_core__timer10, | ||
892 | }; | ||
893 | |||
894 | /* timer10 hwmod */ | ||
895 | static struct omap_hwmod omap2430_timer10_hwmod = { | ||
896 | .name = "timer10", | ||
897 | .mpu_irqs = omap2430_timer10_mpu_irqs, | ||
898 | .mpu_irqs_cnt = ARRAY_SIZE(omap2430_timer10_mpu_irqs), | ||
899 | .main_clk = "gpt10_fck", | ||
900 | .prcm = { | ||
901 | .omap2 = { | ||
902 | .prcm_reg_id = 1, | ||
903 | .module_bit = OMAP24XX_EN_GPT10_SHIFT, | ||
904 | .module_offs = CORE_MOD, | ||
905 | .idlest_reg_id = 1, | ||
906 | .idlest_idle_bit = OMAP24XX_ST_GPT10_SHIFT, | ||
907 | }, | ||
908 | }, | ||
909 | .slaves = omap2430_timer10_slaves, | ||
910 | .slaves_cnt = ARRAY_SIZE(omap2430_timer10_slaves), | ||
911 | .class = &omap2430_timer_hwmod_class, | ||
912 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430) | ||
913 | }; | ||
914 | |||
915 | /* timer11 */ | ||
916 | static struct omap_hwmod omap2430_timer11_hwmod; | ||
917 | static struct omap_hwmod_irq_info omap2430_timer11_mpu_irqs[] = { | ||
918 | { .irq = 47, }, | ||
919 | }; | ||
920 | |||
921 | static struct omap_hwmod_addr_space omap2430_timer11_addrs[] = { | ||
922 | { | ||
923 | .pa_start = 0x48088000, | ||
924 | .pa_end = 0x48088000 + SZ_1K - 1, | ||
925 | .flags = ADDR_TYPE_RT | ||
926 | }, | ||
927 | }; | ||
928 | |||
929 | /* l4_core -> timer11 */ | ||
930 | static struct omap_hwmod_ocp_if omap2430_l4_core__timer11 = { | ||
931 | .master = &omap2430_l4_core_hwmod, | ||
932 | .slave = &omap2430_timer11_hwmod, | ||
933 | .clk = "gpt11_ick", | ||
934 | .addr = omap2430_timer11_addrs, | ||
935 | .addr_cnt = ARRAY_SIZE(omap2430_timer11_addrs), | ||
936 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
937 | }; | ||
938 | |||
939 | /* timer11 slave port */ | ||
940 | static struct omap_hwmod_ocp_if *omap2430_timer11_slaves[] = { | ||
941 | &omap2430_l4_core__timer11, | ||
942 | }; | ||
943 | |||
944 | /* timer11 hwmod */ | ||
945 | static struct omap_hwmod omap2430_timer11_hwmod = { | ||
946 | .name = "timer11", | ||
947 | .mpu_irqs = omap2430_timer11_mpu_irqs, | ||
948 | .mpu_irqs_cnt = ARRAY_SIZE(omap2430_timer11_mpu_irqs), | ||
949 | .main_clk = "gpt11_fck", | ||
950 | .prcm = { | ||
951 | .omap2 = { | ||
952 | .prcm_reg_id = 1, | ||
953 | .module_bit = OMAP24XX_EN_GPT11_SHIFT, | ||
954 | .module_offs = CORE_MOD, | ||
955 | .idlest_reg_id = 1, | ||
956 | .idlest_idle_bit = OMAP24XX_ST_GPT11_SHIFT, | ||
957 | }, | ||
958 | }, | ||
959 | .slaves = omap2430_timer11_slaves, | ||
960 | .slaves_cnt = ARRAY_SIZE(omap2430_timer11_slaves), | ||
961 | .class = &omap2430_timer_hwmod_class, | ||
962 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430) | ||
963 | }; | ||
964 | |||
965 | /* timer12 */ | ||
966 | static struct omap_hwmod omap2430_timer12_hwmod; | ||
967 | static struct omap_hwmod_irq_info omap2430_timer12_mpu_irqs[] = { | ||
968 | { .irq = 48, }, | ||
969 | }; | ||
970 | |||
971 | static struct omap_hwmod_addr_space omap2430_timer12_addrs[] = { | ||
972 | { | ||
973 | .pa_start = 0x4808a000, | ||
974 | .pa_end = 0x4808a000 + SZ_1K - 1, | ||
975 | .flags = ADDR_TYPE_RT | ||
976 | }, | ||
977 | }; | ||
978 | |||
979 | /* l4_core -> timer12 */ | ||
980 | static struct omap_hwmod_ocp_if omap2430_l4_core__timer12 = { | ||
981 | .master = &omap2430_l4_core_hwmod, | ||
982 | .slave = &omap2430_timer12_hwmod, | ||
983 | .clk = "gpt12_ick", | ||
984 | .addr = omap2430_timer12_addrs, | ||
985 | .addr_cnt = ARRAY_SIZE(omap2430_timer12_addrs), | ||
986 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
987 | }; | ||
988 | |||
989 | /* timer12 slave port */ | ||
990 | static struct omap_hwmod_ocp_if *omap2430_timer12_slaves[] = { | ||
991 | &omap2430_l4_core__timer12, | ||
992 | }; | ||
993 | |||
994 | /* timer12 hwmod */ | ||
995 | static struct omap_hwmod omap2430_timer12_hwmod = { | ||
996 | .name = "timer12", | ||
997 | .mpu_irqs = omap2430_timer12_mpu_irqs, | ||
998 | .mpu_irqs_cnt = ARRAY_SIZE(omap2430_timer12_mpu_irqs), | ||
999 | .main_clk = "gpt12_fck", | ||
1000 | .prcm = { | ||
1001 | .omap2 = { | ||
1002 | .prcm_reg_id = 1, | ||
1003 | .module_bit = OMAP24XX_EN_GPT12_SHIFT, | ||
1004 | .module_offs = CORE_MOD, | ||
1005 | .idlest_reg_id = 1, | ||
1006 | .idlest_idle_bit = OMAP24XX_ST_GPT12_SHIFT, | ||
1007 | }, | ||
1008 | }, | ||
1009 | .slaves = omap2430_timer12_slaves, | ||
1010 | .slaves_cnt = ARRAY_SIZE(omap2430_timer12_slaves), | ||
1011 | .class = &omap2430_timer_hwmod_class, | ||
1012 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430) | ||
1013 | }; | ||
1014 | |||
281 | /* l4_wkup -> wd_timer2 */ | 1015 | /* l4_wkup -> wd_timer2 */ |
282 | static struct omap_hwmod_addr_space omap2430_wd_timer2_addrs[] = { | 1016 | static struct omap_hwmod_addr_space omap2430_wd_timer2_addrs[] = { |
283 | { | 1017 | { |
@@ -469,6 +1203,266 @@ static struct omap_hwmod omap2430_uart3_hwmod = { | |||
469 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430), | 1203 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430), |
470 | }; | 1204 | }; |
471 | 1205 | ||
1206 | /* | ||
1207 | * 'dss' class | ||
1208 | * display sub-system | ||
1209 | */ | ||
1210 | |||
1211 | static struct omap_hwmod_class_sysconfig omap2430_dss_sysc = { | ||
1212 | .rev_offs = 0x0000, | ||
1213 | .sysc_offs = 0x0010, | ||
1214 | .syss_offs = 0x0014, | ||
1215 | .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE), | ||
1216 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
1217 | }; | ||
1218 | |||
1219 | static struct omap_hwmod_class omap2430_dss_hwmod_class = { | ||
1220 | .name = "dss", | ||
1221 | .sysc = &omap2430_dss_sysc, | ||
1222 | }; | ||
1223 | |||
1224 | /* dss */ | ||
1225 | static struct omap_hwmod_irq_info omap2430_dss_irqs[] = { | ||
1226 | { .irq = 25 }, | ||
1227 | }; | ||
1228 | static struct omap_hwmod_dma_info omap2430_dss_sdma_chs[] = { | ||
1229 | { .name = "dispc", .dma_req = 5 }, | ||
1230 | }; | ||
1231 | |||
1232 | /* dss */ | ||
1233 | /* dss master ports */ | ||
1234 | static struct omap_hwmod_ocp_if *omap2430_dss_masters[] = { | ||
1235 | &omap2430_dss__l3, | ||
1236 | }; | ||
1237 | |||
1238 | static struct omap_hwmod_addr_space omap2430_dss_addrs[] = { | ||
1239 | { | ||
1240 | .pa_start = 0x48050000, | ||
1241 | .pa_end = 0x480503FF, | ||
1242 | .flags = ADDR_TYPE_RT | ||
1243 | }, | ||
1244 | }; | ||
1245 | |||
1246 | /* l4_core -> dss */ | ||
1247 | static struct omap_hwmod_ocp_if omap2430_l4_core__dss = { | ||
1248 | .master = &omap2430_l4_core_hwmod, | ||
1249 | .slave = &omap2430_dss_core_hwmod, | ||
1250 | .clk = "dss_ick", | ||
1251 | .addr = omap2430_dss_addrs, | ||
1252 | .addr_cnt = ARRAY_SIZE(omap2430_dss_addrs), | ||
1253 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
1254 | }; | ||
1255 | |||
1256 | /* dss slave ports */ | ||
1257 | static struct omap_hwmod_ocp_if *omap2430_dss_slaves[] = { | ||
1258 | &omap2430_l4_core__dss, | ||
1259 | }; | ||
1260 | |||
1261 | static struct omap_hwmod_opt_clk dss_opt_clks[] = { | ||
1262 | { .role = "tv_clk", .clk = "dss_54m_fck" }, | ||
1263 | { .role = "sys_clk", .clk = "dss2_fck" }, | ||
1264 | }; | ||
1265 | |||
1266 | static struct omap_hwmod omap2430_dss_core_hwmod = { | ||
1267 | .name = "dss_core", | ||
1268 | .class = &omap2430_dss_hwmod_class, | ||
1269 | .main_clk = "dss1_fck", /* instead of dss_fck */ | ||
1270 | .mpu_irqs = omap2430_dss_irqs, | ||
1271 | .mpu_irqs_cnt = ARRAY_SIZE(omap2430_dss_irqs), | ||
1272 | .sdma_reqs = omap2430_dss_sdma_chs, | ||
1273 | .sdma_reqs_cnt = ARRAY_SIZE(omap2430_dss_sdma_chs), | ||
1274 | .prcm = { | ||
1275 | .omap2 = { | ||
1276 | .prcm_reg_id = 1, | ||
1277 | .module_bit = OMAP24XX_EN_DSS1_SHIFT, | ||
1278 | .module_offs = CORE_MOD, | ||
1279 | .idlest_reg_id = 1, | ||
1280 | .idlest_stdby_bit = OMAP24XX_ST_DSS_SHIFT, | ||
1281 | }, | ||
1282 | }, | ||
1283 | .opt_clks = dss_opt_clks, | ||
1284 | .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks), | ||
1285 | .slaves = omap2430_dss_slaves, | ||
1286 | .slaves_cnt = ARRAY_SIZE(omap2430_dss_slaves), | ||
1287 | .masters = omap2430_dss_masters, | ||
1288 | .masters_cnt = ARRAY_SIZE(omap2430_dss_masters), | ||
1289 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430), | ||
1290 | .flags = HWMOD_NO_IDLEST, | ||
1291 | }; | ||
1292 | |||
1293 | /* | ||
1294 | * 'dispc' class | ||
1295 | * display controller | ||
1296 | */ | ||
1297 | |||
1298 | static struct omap_hwmod_class_sysconfig omap2430_dispc_sysc = { | ||
1299 | .rev_offs = 0x0000, | ||
1300 | .sysc_offs = 0x0010, | ||
1301 | .syss_offs = 0x0014, | ||
1302 | .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE | | ||
1303 | SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE), | ||
1304 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | | ||
1305 | MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART), | ||
1306 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
1307 | }; | ||
1308 | |||
1309 | static struct omap_hwmod_class omap2430_dispc_hwmod_class = { | ||
1310 | .name = "dispc", | ||
1311 | .sysc = &omap2430_dispc_sysc, | ||
1312 | }; | ||
1313 | |||
1314 | static struct omap_hwmod_addr_space omap2430_dss_dispc_addrs[] = { | ||
1315 | { | ||
1316 | .pa_start = 0x48050400, | ||
1317 | .pa_end = 0x480507FF, | ||
1318 | .flags = ADDR_TYPE_RT | ||
1319 | }, | ||
1320 | }; | ||
1321 | |||
1322 | /* l4_core -> dss_dispc */ | ||
1323 | static struct omap_hwmod_ocp_if omap2430_l4_core__dss_dispc = { | ||
1324 | .master = &omap2430_l4_core_hwmod, | ||
1325 | .slave = &omap2430_dss_dispc_hwmod, | ||
1326 | .clk = "dss_ick", | ||
1327 | .addr = omap2430_dss_dispc_addrs, | ||
1328 | .addr_cnt = ARRAY_SIZE(omap2430_dss_dispc_addrs), | ||
1329 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
1330 | }; | ||
1331 | |||
1332 | /* dss_dispc slave ports */ | ||
1333 | static struct omap_hwmod_ocp_if *omap2430_dss_dispc_slaves[] = { | ||
1334 | &omap2430_l4_core__dss_dispc, | ||
1335 | }; | ||
1336 | |||
1337 | static struct omap_hwmod omap2430_dss_dispc_hwmod = { | ||
1338 | .name = "dss_dispc", | ||
1339 | .class = &omap2430_dispc_hwmod_class, | ||
1340 | .main_clk = "dss1_fck", | ||
1341 | .prcm = { | ||
1342 | .omap2 = { | ||
1343 | .prcm_reg_id = 1, | ||
1344 | .module_bit = OMAP24XX_EN_DSS1_SHIFT, | ||
1345 | .module_offs = CORE_MOD, | ||
1346 | .idlest_reg_id = 1, | ||
1347 | .idlest_stdby_bit = OMAP24XX_ST_DSS_SHIFT, | ||
1348 | }, | ||
1349 | }, | ||
1350 | .slaves = omap2430_dss_dispc_slaves, | ||
1351 | .slaves_cnt = ARRAY_SIZE(omap2430_dss_dispc_slaves), | ||
1352 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430), | ||
1353 | .flags = HWMOD_NO_IDLEST, | ||
1354 | }; | ||
1355 | |||
1356 | /* | ||
1357 | * 'rfbi' class | ||
1358 | * remote frame buffer interface | ||
1359 | */ | ||
1360 | |||
1361 | static struct omap_hwmod_class_sysconfig omap2430_rfbi_sysc = { | ||
1362 | .rev_offs = 0x0000, | ||
1363 | .sysc_offs = 0x0010, | ||
1364 | .syss_offs = 0x0014, | ||
1365 | .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET | | ||
1366 | SYSC_HAS_AUTOIDLE), | ||
1367 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | ||
1368 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
1369 | }; | ||
1370 | |||
1371 | static struct omap_hwmod_class omap2430_rfbi_hwmod_class = { | ||
1372 | .name = "rfbi", | ||
1373 | .sysc = &omap2430_rfbi_sysc, | ||
1374 | }; | ||
1375 | |||
1376 | static struct omap_hwmod_addr_space omap2430_dss_rfbi_addrs[] = { | ||
1377 | { | ||
1378 | .pa_start = 0x48050800, | ||
1379 | .pa_end = 0x48050BFF, | ||
1380 | .flags = ADDR_TYPE_RT | ||
1381 | }, | ||
1382 | }; | ||
1383 | |||
1384 | /* l4_core -> dss_rfbi */ | ||
1385 | static struct omap_hwmod_ocp_if omap2430_l4_core__dss_rfbi = { | ||
1386 | .master = &omap2430_l4_core_hwmod, | ||
1387 | .slave = &omap2430_dss_rfbi_hwmod, | ||
1388 | .clk = "dss_ick", | ||
1389 | .addr = omap2430_dss_rfbi_addrs, | ||
1390 | .addr_cnt = ARRAY_SIZE(omap2430_dss_rfbi_addrs), | ||
1391 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
1392 | }; | ||
1393 | |||
1394 | /* dss_rfbi slave ports */ | ||
1395 | static struct omap_hwmod_ocp_if *omap2430_dss_rfbi_slaves[] = { | ||
1396 | &omap2430_l4_core__dss_rfbi, | ||
1397 | }; | ||
1398 | |||
1399 | static struct omap_hwmod omap2430_dss_rfbi_hwmod = { | ||
1400 | .name = "dss_rfbi", | ||
1401 | .class = &omap2430_rfbi_hwmod_class, | ||
1402 | .main_clk = "dss1_fck", | ||
1403 | .prcm = { | ||
1404 | .omap2 = { | ||
1405 | .prcm_reg_id = 1, | ||
1406 | .module_bit = OMAP24XX_EN_DSS1_SHIFT, | ||
1407 | .module_offs = CORE_MOD, | ||
1408 | }, | ||
1409 | }, | ||
1410 | .slaves = omap2430_dss_rfbi_slaves, | ||
1411 | .slaves_cnt = ARRAY_SIZE(omap2430_dss_rfbi_slaves), | ||
1412 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430), | ||
1413 | .flags = HWMOD_NO_IDLEST, | ||
1414 | }; | ||
1415 | |||
1416 | /* | ||
1417 | * 'venc' class | ||
1418 | * video encoder | ||
1419 | */ | ||
1420 | |||
1421 | static struct omap_hwmod_class omap2430_venc_hwmod_class = { | ||
1422 | .name = "venc", | ||
1423 | }; | ||
1424 | |||
1425 | /* dss_venc */ | ||
1426 | static struct omap_hwmod_addr_space omap2430_dss_venc_addrs[] = { | ||
1427 | { | ||
1428 | .pa_start = 0x48050C00, | ||
1429 | .pa_end = 0x48050FFF, | ||
1430 | .flags = ADDR_TYPE_RT | ||
1431 | }, | ||
1432 | }; | ||
1433 | |||
1434 | /* l4_core -> dss_venc */ | ||
1435 | static struct omap_hwmod_ocp_if omap2430_l4_core__dss_venc = { | ||
1436 | .master = &omap2430_l4_core_hwmod, | ||
1437 | .slave = &omap2430_dss_venc_hwmod, | ||
1438 | .clk = "dss_54m_fck", | ||
1439 | .addr = omap2430_dss_venc_addrs, | ||
1440 | .addr_cnt = ARRAY_SIZE(omap2430_dss_venc_addrs), | ||
1441 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
1442 | }; | ||
1443 | |||
1444 | /* dss_venc slave ports */ | ||
1445 | static struct omap_hwmod_ocp_if *omap2430_dss_venc_slaves[] = { | ||
1446 | &omap2430_l4_core__dss_venc, | ||
1447 | }; | ||
1448 | |||
1449 | static struct omap_hwmod omap2430_dss_venc_hwmod = { | ||
1450 | .name = "dss_venc", | ||
1451 | .class = &omap2430_venc_hwmod_class, | ||
1452 | .main_clk = "dss1_fck", | ||
1453 | .prcm = { | ||
1454 | .omap2 = { | ||
1455 | .prcm_reg_id = 1, | ||
1456 | .module_bit = OMAP24XX_EN_DSS1_SHIFT, | ||
1457 | .module_offs = CORE_MOD, | ||
1458 | }, | ||
1459 | }, | ||
1460 | .slaves = omap2430_dss_venc_slaves, | ||
1461 | .slaves_cnt = ARRAY_SIZE(omap2430_dss_venc_slaves), | ||
1462 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430), | ||
1463 | .flags = HWMOD_NO_IDLEST, | ||
1464 | }; | ||
1465 | |||
472 | /* I2C common */ | 1466 | /* I2C common */ |
473 | static struct omap_hwmod_class_sysconfig i2c_sysc = { | 1467 | static struct omap_hwmod_class_sysconfig i2c_sysc = { |
474 | .rev_offs = 0x00, | 1468 | .rev_offs = 0x00, |
@@ -919,16 +1913,250 @@ static struct omap_hwmod omap2430_dma_system_hwmod = { | |||
919 | .flags = HWMOD_NO_IDLEST, | 1913 | .flags = HWMOD_NO_IDLEST, |
920 | }; | 1914 | }; |
921 | 1915 | ||
1916 | /* | ||
1917 | * 'mcspi' class | ||
1918 | * multichannel serial port interface (mcspi) / master/slave synchronous serial | ||
1919 | * bus | ||
1920 | */ | ||
1921 | |||
1922 | static struct omap_hwmod_class_sysconfig omap2430_mcspi_sysc = { | ||
1923 | .rev_offs = 0x0000, | ||
1924 | .sysc_offs = 0x0010, | ||
1925 | .syss_offs = 0x0014, | ||
1926 | .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE | | ||
1927 | SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET | | ||
1928 | SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS), | ||
1929 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | ||
1930 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
1931 | }; | ||
1932 | |||
1933 | static struct omap_hwmod_class omap2430_mcspi_class = { | ||
1934 | .name = "mcspi", | ||
1935 | .sysc = &omap2430_mcspi_sysc, | ||
1936 | .rev = OMAP2_MCSPI_REV, | ||
1937 | }; | ||
1938 | |||
1939 | /* mcspi1 */ | ||
1940 | static struct omap_hwmod_irq_info omap2430_mcspi1_mpu_irqs[] = { | ||
1941 | { .irq = 65 }, | ||
1942 | }; | ||
1943 | |||
1944 | static struct omap_hwmod_dma_info omap2430_mcspi1_sdma_reqs[] = { | ||
1945 | { .name = "tx0", .dma_req = 35 }, /* DMA_SPI1_TX0 */ | ||
1946 | { .name = "rx0", .dma_req = 36 }, /* DMA_SPI1_RX0 */ | ||
1947 | { .name = "tx1", .dma_req = 37 }, /* DMA_SPI1_TX1 */ | ||
1948 | { .name = "rx1", .dma_req = 38 }, /* DMA_SPI1_RX1 */ | ||
1949 | { .name = "tx2", .dma_req = 39 }, /* DMA_SPI1_TX2 */ | ||
1950 | { .name = "rx2", .dma_req = 40 }, /* DMA_SPI1_RX2 */ | ||
1951 | { .name = "tx3", .dma_req = 41 }, /* DMA_SPI1_TX3 */ | ||
1952 | { .name = "rx3", .dma_req = 42 }, /* DMA_SPI1_RX3 */ | ||
1953 | }; | ||
1954 | |||
1955 | static struct omap_hwmod_ocp_if *omap2430_mcspi1_slaves[] = { | ||
1956 | &omap2430_l4_core__mcspi1, | ||
1957 | }; | ||
1958 | |||
1959 | static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = { | ||
1960 | .num_chipselect = 4, | ||
1961 | }; | ||
1962 | |||
1963 | static struct omap_hwmod omap2430_mcspi1_hwmod = { | ||
1964 | .name = "mcspi1_hwmod", | ||
1965 | .mpu_irqs = omap2430_mcspi1_mpu_irqs, | ||
1966 | .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mcspi1_mpu_irqs), | ||
1967 | .sdma_reqs = omap2430_mcspi1_sdma_reqs, | ||
1968 | .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcspi1_sdma_reqs), | ||
1969 | .main_clk = "mcspi1_fck", | ||
1970 | .prcm = { | ||
1971 | .omap2 = { | ||
1972 | .module_offs = CORE_MOD, | ||
1973 | .prcm_reg_id = 1, | ||
1974 | .module_bit = OMAP24XX_EN_MCSPI1_SHIFT, | ||
1975 | .idlest_reg_id = 1, | ||
1976 | .idlest_idle_bit = OMAP24XX_ST_MCSPI1_SHIFT, | ||
1977 | }, | ||
1978 | }, | ||
1979 | .slaves = omap2430_mcspi1_slaves, | ||
1980 | .slaves_cnt = ARRAY_SIZE(omap2430_mcspi1_slaves), | ||
1981 | .class = &omap2430_mcspi_class, | ||
1982 | .dev_attr = &omap_mcspi1_dev_attr, | ||
1983 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430), | ||
1984 | }; | ||
1985 | |||
1986 | /* mcspi2 */ | ||
1987 | static struct omap_hwmod_irq_info omap2430_mcspi2_mpu_irqs[] = { | ||
1988 | { .irq = 66 }, | ||
1989 | }; | ||
1990 | |||
1991 | static struct omap_hwmod_dma_info omap2430_mcspi2_sdma_reqs[] = { | ||
1992 | { .name = "tx0", .dma_req = 43 }, /* DMA_SPI2_TX0 */ | ||
1993 | { .name = "rx0", .dma_req = 44 }, /* DMA_SPI2_RX0 */ | ||
1994 | { .name = "tx1", .dma_req = 45 }, /* DMA_SPI2_TX1 */ | ||
1995 | { .name = "rx1", .dma_req = 46 }, /* DMA_SPI2_RX1 */ | ||
1996 | }; | ||
1997 | |||
1998 | static struct omap_hwmod_ocp_if *omap2430_mcspi2_slaves[] = { | ||
1999 | &omap2430_l4_core__mcspi2, | ||
2000 | }; | ||
2001 | |||
2002 | static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = { | ||
2003 | .num_chipselect = 2, | ||
2004 | }; | ||
2005 | |||
2006 | static struct omap_hwmod omap2430_mcspi2_hwmod = { | ||
2007 | .name = "mcspi2_hwmod", | ||
2008 | .mpu_irqs = omap2430_mcspi2_mpu_irqs, | ||
2009 | .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mcspi2_mpu_irqs), | ||
2010 | .sdma_reqs = omap2430_mcspi2_sdma_reqs, | ||
2011 | .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcspi2_sdma_reqs), | ||
2012 | .main_clk = "mcspi2_fck", | ||
2013 | .prcm = { | ||
2014 | .omap2 = { | ||
2015 | .module_offs = CORE_MOD, | ||
2016 | .prcm_reg_id = 1, | ||
2017 | .module_bit = OMAP24XX_EN_MCSPI2_SHIFT, | ||
2018 | .idlest_reg_id = 1, | ||
2019 | .idlest_idle_bit = OMAP24XX_ST_MCSPI2_SHIFT, | ||
2020 | }, | ||
2021 | }, | ||
2022 | .slaves = omap2430_mcspi2_slaves, | ||
2023 | .slaves_cnt = ARRAY_SIZE(omap2430_mcspi2_slaves), | ||
2024 | .class = &omap2430_mcspi_class, | ||
2025 | .dev_attr = &omap_mcspi2_dev_attr, | ||
2026 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430), | ||
2027 | }; | ||
2028 | |||
2029 | /* mcspi3 */ | ||
2030 | static struct omap_hwmod_irq_info omap2430_mcspi3_mpu_irqs[] = { | ||
2031 | { .irq = 91 }, | ||
2032 | }; | ||
2033 | |||
2034 | static struct omap_hwmod_dma_info omap2430_mcspi3_sdma_reqs[] = { | ||
2035 | { .name = "tx0", .dma_req = 15 }, /* DMA_SPI3_TX0 */ | ||
2036 | { .name = "rx0", .dma_req = 16 }, /* DMA_SPI3_RX0 */ | ||
2037 | { .name = "tx1", .dma_req = 23 }, /* DMA_SPI3_TX1 */ | ||
2038 | { .name = "rx1", .dma_req = 24 }, /* DMA_SPI3_RX1 */ | ||
2039 | }; | ||
2040 | |||
2041 | static struct omap_hwmod_ocp_if *omap2430_mcspi3_slaves[] = { | ||
2042 | &omap2430_l4_core__mcspi3, | ||
2043 | }; | ||
2044 | |||
2045 | static struct omap2_mcspi_dev_attr omap_mcspi3_dev_attr = { | ||
2046 | .num_chipselect = 2, | ||
2047 | }; | ||
2048 | |||
2049 | static struct omap_hwmod omap2430_mcspi3_hwmod = { | ||
2050 | .name = "mcspi3_hwmod", | ||
2051 | .mpu_irqs = omap2430_mcspi3_mpu_irqs, | ||
2052 | .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mcspi3_mpu_irqs), | ||
2053 | .sdma_reqs = omap2430_mcspi3_sdma_reqs, | ||
2054 | .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcspi3_sdma_reqs), | ||
2055 | .main_clk = "mcspi3_fck", | ||
2056 | .prcm = { | ||
2057 | .omap2 = { | ||
2058 | .module_offs = CORE_MOD, | ||
2059 | .prcm_reg_id = 2, | ||
2060 | .module_bit = OMAP2430_EN_MCSPI3_SHIFT, | ||
2061 | .idlest_reg_id = 2, | ||
2062 | .idlest_idle_bit = OMAP2430_ST_MCSPI3_SHIFT, | ||
2063 | }, | ||
2064 | }, | ||
2065 | .slaves = omap2430_mcspi3_slaves, | ||
2066 | .slaves_cnt = ARRAY_SIZE(omap2430_mcspi3_slaves), | ||
2067 | .class = &omap2430_mcspi_class, | ||
2068 | .dev_attr = &omap_mcspi3_dev_attr, | ||
2069 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430), | ||
2070 | }; | ||
2071 | |||
2072 | /* | ||
2073 | * usbhsotg | ||
2074 | */ | ||
2075 | static struct omap_hwmod_class_sysconfig omap2430_usbhsotg_sysc = { | ||
2076 | .rev_offs = 0x0400, | ||
2077 | .sysc_offs = 0x0404, | ||
2078 | .syss_offs = 0x0408, | ||
2079 | .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE| | ||
2080 | SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET | | ||
2081 | SYSC_HAS_AUTOIDLE), | ||
2082 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | | ||
2083 | MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART), | ||
2084 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
2085 | }; | ||
2086 | |||
2087 | static struct omap_hwmod_class usbotg_class = { | ||
2088 | .name = "usbotg", | ||
2089 | .sysc = &omap2430_usbhsotg_sysc, | ||
2090 | }; | ||
2091 | |||
2092 | /* usb_otg_hs */ | ||
2093 | static struct omap_hwmod_irq_info omap2430_usbhsotg_mpu_irqs[] = { | ||
2094 | |||
2095 | { .name = "mc", .irq = 92 }, | ||
2096 | { .name = "dma", .irq = 93 }, | ||
2097 | }; | ||
2098 | |||
2099 | static struct omap_hwmod omap2430_usbhsotg_hwmod = { | ||
2100 | .name = "usb_otg_hs", | ||
2101 | .mpu_irqs = omap2430_usbhsotg_mpu_irqs, | ||
2102 | .mpu_irqs_cnt = ARRAY_SIZE(omap2430_usbhsotg_mpu_irqs), | ||
2103 | .main_clk = "usbhs_ick", | ||
2104 | .prcm = { | ||
2105 | .omap2 = { | ||
2106 | .prcm_reg_id = 1, | ||
2107 | .module_bit = OMAP2430_EN_USBHS_MASK, | ||
2108 | .module_offs = CORE_MOD, | ||
2109 | .idlest_reg_id = 1, | ||
2110 | .idlest_idle_bit = OMAP2430_ST_USBHS_SHIFT, | ||
2111 | }, | ||
2112 | }, | ||
2113 | .masters = omap2430_usbhsotg_masters, | ||
2114 | .masters_cnt = ARRAY_SIZE(omap2430_usbhsotg_masters), | ||
2115 | .slaves = omap2430_usbhsotg_slaves, | ||
2116 | .slaves_cnt = ARRAY_SIZE(omap2430_usbhsotg_slaves), | ||
2117 | .class = &usbotg_class, | ||
2118 | /* | ||
2119 | * Erratum ID: i479 idle_req / idle_ack mechanism potentially | ||
2120 | * broken when autoidle is enabled | ||
2121 | * workaround is to disable the autoidle bit at module level. | ||
2122 | */ | ||
2123 | .flags = HWMOD_NO_OCP_AUTOIDLE | HWMOD_SWSUP_SIDLE | ||
2124 | | HWMOD_SWSUP_MSTANDBY, | ||
2125 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430) | ||
2126 | }; | ||
2127 | |||
2128 | |||
2129 | |||
922 | static __initdata struct omap_hwmod *omap2430_hwmods[] = { | 2130 | static __initdata struct omap_hwmod *omap2430_hwmods[] = { |
923 | &omap2430_l3_main_hwmod, | 2131 | &omap2430_l3_main_hwmod, |
924 | &omap2430_l4_core_hwmod, | 2132 | &omap2430_l4_core_hwmod, |
925 | &omap2430_l4_wkup_hwmod, | 2133 | &omap2430_l4_wkup_hwmod, |
926 | &omap2430_mpu_hwmod, | 2134 | &omap2430_mpu_hwmod, |
927 | &omap2430_iva_hwmod, | 2135 | &omap2430_iva_hwmod, |
2136 | |||
2137 | &omap2430_timer1_hwmod, | ||
2138 | &omap2430_timer2_hwmod, | ||
2139 | &omap2430_timer3_hwmod, | ||
2140 | &omap2430_timer4_hwmod, | ||
2141 | &omap2430_timer5_hwmod, | ||
2142 | &omap2430_timer6_hwmod, | ||
2143 | &omap2430_timer7_hwmod, | ||
2144 | &omap2430_timer8_hwmod, | ||
2145 | &omap2430_timer9_hwmod, | ||
2146 | &omap2430_timer10_hwmod, | ||
2147 | &omap2430_timer11_hwmod, | ||
2148 | &omap2430_timer12_hwmod, | ||
2149 | |||
928 | &omap2430_wd_timer2_hwmod, | 2150 | &omap2430_wd_timer2_hwmod, |
929 | &omap2430_uart1_hwmod, | 2151 | &omap2430_uart1_hwmod, |
930 | &omap2430_uart2_hwmod, | 2152 | &omap2430_uart2_hwmod, |
931 | &omap2430_uart3_hwmod, | 2153 | &omap2430_uart3_hwmod, |
2154 | /* dss class */ | ||
2155 | &omap2430_dss_core_hwmod, | ||
2156 | &omap2430_dss_dispc_hwmod, | ||
2157 | &omap2430_dss_rfbi_hwmod, | ||
2158 | &omap2430_dss_venc_hwmod, | ||
2159 | /* i2c class */ | ||
932 | &omap2430_i2c1_hwmod, | 2160 | &omap2430_i2c1_hwmod, |
933 | &omap2430_i2c2_hwmod, | 2161 | &omap2430_i2c2_hwmod, |
934 | 2162 | ||
@@ -941,10 +2169,19 @@ static __initdata struct omap_hwmod *omap2430_hwmods[] = { | |||
941 | 2169 | ||
942 | /* dma_system class*/ | 2170 | /* dma_system class*/ |
943 | &omap2430_dma_system_hwmod, | 2171 | &omap2430_dma_system_hwmod, |
2172 | |||
2173 | /* mcspi class */ | ||
2174 | &omap2430_mcspi1_hwmod, | ||
2175 | &omap2430_mcspi2_hwmod, | ||
2176 | &omap2430_mcspi3_hwmod, | ||
2177 | |||
2178 | /* usbotg class*/ | ||
2179 | &omap2430_usbhsotg_hwmod, | ||
2180 | |||
944 | NULL, | 2181 | NULL, |
945 | }; | 2182 | }; |
946 | 2183 | ||
947 | int __init omap2430_hwmod_init(void) | 2184 | int __init omap2430_hwmod_init(void) |
948 | { | 2185 | { |
949 | return omap_hwmod_init(omap2430_hwmods); | 2186 | return omap_hwmod_register(omap2430_hwmods); |
950 | } | 2187 | } |
diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c index 8d8181334f86..fc1b2b963bb9 100644 --- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | |||
@@ -18,16 +18,20 @@ | |||
18 | #include <plat/cpu.h> | 18 | #include <plat/cpu.h> |
19 | #include <plat/dma.h> | 19 | #include <plat/dma.h> |
20 | #include <plat/serial.h> | 20 | #include <plat/serial.h> |
21 | #include <plat/l3_3xxx.h> | ||
21 | #include <plat/l4_3xxx.h> | 22 | #include <plat/l4_3xxx.h> |
22 | #include <plat/i2c.h> | 23 | #include <plat/i2c.h> |
23 | #include <plat/gpio.h> | 24 | #include <plat/gpio.h> |
24 | #include <plat/smartreflex.h> | 25 | #include <plat/smartreflex.h> |
26 | #include <plat/mcspi.h> | ||
27 | #include <plat/dmtimer.h> | ||
25 | 28 | ||
26 | #include "omap_hwmod_common_data.h" | 29 | #include "omap_hwmod_common_data.h" |
27 | 30 | ||
28 | #include "prm-regbits-34xx.h" | 31 | #include "prm-regbits-34xx.h" |
29 | #include "cm-regbits-34xx.h" | 32 | #include "cm-regbits-34xx.h" |
30 | #include "wd_timer.h" | 33 | #include "wd_timer.h" |
34 | #include <mach/am35xx.h> | ||
31 | 35 | ||
32 | /* | 36 | /* |
33 | * OMAP3xxx hardware module integration data | 37 | * OMAP3xxx hardware module integration data |
@@ -44,6 +48,12 @@ static struct omap_hwmod omap3xxx_l3_main_hwmod; | |||
44 | static struct omap_hwmod omap3xxx_l4_core_hwmod; | 48 | static struct omap_hwmod omap3xxx_l4_core_hwmod; |
45 | static struct omap_hwmod omap3xxx_l4_per_hwmod; | 49 | static struct omap_hwmod omap3xxx_l4_per_hwmod; |
46 | static struct omap_hwmod omap3xxx_wd_timer2_hwmod; | 50 | static struct omap_hwmod omap3xxx_wd_timer2_hwmod; |
51 | static struct omap_hwmod omap3430es1_dss_core_hwmod; | ||
52 | static struct omap_hwmod omap3xxx_dss_core_hwmod; | ||
53 | static struct omap_hwmod omap3xxx_dss_dispc_hwmod; | ||
54 | static struct omap_hwmod omap3xxx_dss_dsi1_hwmod; | ||
55 | static struct omap_hwmod omap3xxx_dss_rfbi_hwmod; | ||
56 | static struct omap_hwmod omap3xxx_dss_venc_hwmod; | ||
47 | static struct omap_hwmod omap3xxx_i2c1_hwmod; | 57 | static struct omap_hwmod omap3xxx_i2c1_hwmod; |
48 | static struct omap_hwmod omap3xxx_i2c2_hwmod; | 58 | static struct omap_hwmod omap3xxx_i2c2_hwmod; |
49 | static struct omap_hwmod omap3xxx_i2c3_hwmod; | 59 | static struct omap_hwmod omap3xxx_i2c3_hwmod; |
@@ -55,6 +65,11 @@ static struct omap_hwmod omap3xxx_gpio5_hwmod; | |||
55 | static struct omap_hwmod omap3xxx_gpio6_hwmod; | 65 | static struct omap_hwmod omap3xxx_gpio6_hwmod; |
56 | static struct omap_hwmod omap34xx_sr1_hwmod; | 66 | static struct omap_hwmod omap34xx_sr1_hwmod; |
57 | static struct omap_hwmod omap34xx_sr2_hwmod; | 67 | static struct omap_hwmod omap34xx_sr2_hwmod; |
68 | static struct omap_hwmod omap34xx_mcspi1; | ||
69 | static struct omap_hwmod omap34xx_mcspi2; | ||
70 | static struct omap_hwmod omap34xx_mcspi3; | ||
71 | static struct omap_hwmod omap34xx_mcspi4; | ||
72 | static struct omap_hwmod am35xx_usbhsotg_hwmod; | ||
58 | 73 | ||
59 | static struct omap_hwmod omap3xxx_dma_system_hwmod; | 74 | static struct omap_hwmod omap3xxx_dma_system_hwmod; |
60 | 75 | ||
@@ -84,6 +99,19 @@ static struct omap_hwmod_ocp_if *omap3xxx_l3_main_slaves[] = { | |||
84 | &omap3xxx_mpu__l3_main, | 99 | &omap3xxx_mpu__l3_main, |
85 | }; | 100 | }; |
86 | 101 | ||
102 | /* DSS -> l3 */ | ||
103 | static struct omap_hwmod_ocp_if omap3xxx_dss__l3 = { | ||
104 | .master = &omap3xxx_dss_core_hwmod, | ||
105 | .slave = &omap3xxx_l3_main_hwmod, | ||
106 | .fw = { | ||
107 | .omap2 = { | ||
108 | .l3_perm_bit = OMAP3_L3_CORE_FW_INIT_ID_DSS, | ||
109 | .flags = OMAP_FIREWALL_L3, | ||
110 | } | ||
111 | }, | ||
112 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
113 | }; | ||
114 | |||
87 | /* Master interfaces on the L3 interconnect */ | 115 | /* Master interfaces on the L3 interconnect */ |
88 | static struct omap_hwmod_ocp_if *omap3xxx_l3_main_masters[] = { | 116 | static struct omap_hwmod_ocp_if *omap3xxx_l3_main_masters[] = { |
89 | &omap3xxx_l3_main__l4_core, | 117 | &omap3xxx_l3_main__l4_core, |
@@ -107,7 +135,23 @@ static struct omap_hwmod omap3xxx_uart1_hwmod; | |||
107 | static struct omap_hwmod omap3xxx_uart2_hwmod; | 135 | static struct omap_hwmod omap3xxx_uart2_hwmod; |
108 | static struct omap_hwmod omap3xxx_uart3_hwmod; | 136 | static struct omap_hwmod omap3xxx_uart3_hwmod; |
109 | static struct omap_hwmod omap3xxx_uart4_hwmod; | 137 | static struct omap_hwmod omap3xxx_uart4_hwmod; |
138 | static struct omap_hwmod omap3xxx_usbhsotg_hwmod; | ||
139 | |||
140 | /* l3_core -> usbhsotg interface */ | ||
141 | static struct omap_hwmod_ocp_if omap3xxx_usbhsotg__l3 = { | ||
142 | .master = &omap3xxx_usbhsotg_hwmod, | ||
143 | .slave = &omap3xxx_l3_main_hwmod, | ||
144 | .clk = "core_l3_ick", | ||
145 | .user = OCP_USER_MPU, | ||
146 | }; | ||
110 | 147 | ||
148 | /* l3_core -> am35xx_usbhsotg interface */ | ||
149 | static struct omap_hwmod_ocp_if am35xx_usbhsotg__l3 = { | ||
150 | .master = &am35xx_usbhsotg_hwmod, | ||
151 | .slave = &omap3xxx_l3_main_hwmod, | ||
152 | .clk = "core_l3_ick", | ||
153 | .user = OCP_USER_MPU, | ||
154 | }; | ||
111 | /* L4_CORE -> L4_WKUP interface */ | 155 | /* L4_CORE -> L4_WKUP interface */ |
112 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__l4_wkup = { | 156 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__l4_wkup = { |
113 | .master = &omap3xxx_l4_core_hwmod, | 157 | .master = &omap3xxx_l4_core_hwmod, |
@@ -301,6 +345,61 @@ static struct omap_hwmod_ocp_if omap3_l4_core__sr2 = { | |||
301 | .user = OCP_USER_MPU, | 345 | .user = OCP_USER_MPU, |
302 | }; | 346 | }; |
303 | 347 | ||
348 | /* | ||
349 | * usbhsotg interface data | ||
350 | */ | ||
351 | |||
352 | static struct omap_hwmod_addr_space omap3xxx_usbhsotg_addrs[] = { | ||
353 | { | ||
354 | .pa_start = OMAP34XX_HSUSB_OTG_BASE, | ||
355 | .pa_end = OMAP34XX_HSUSB_OTG_BASE + SZ_4K - 1, | ||
356 | .flags = ADDR_TYPE_RT | ||
357 | }, | ||
358 | }; | ||
359 | |||
360 | /* l4_core -> usbhsotg */ | ||
361 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__usbhsotg = { | ||
362 | .master = &omap3xxx_l4_core_hwmod, | ||
363 | .slave = &omap3xxx_usbhsotg_hwmod, | ||
364 | .clk = "l4_ick", | ||
365 | .addr = omap3xxx_usbhsotg_addrs, | ||
366 | .addr_cnt = ARRAY_SIZE(omap3xxx_usbhsotg_addrs), | ||
367 | .user = OCP_USER_MPU, | ||
368 | }; | ||
369 | |||
370 | static struct omap_hwmod_ocp_if *omap3xxx_usbhsotg_masters[] = { | ||
371 | &omap3xxx_usbhsotg__l3, | ||
372 | }; | ||
373 | |||
374 | static struct omap_hwmod_ocp_if *omap3xxx_usbhsotg_slaves[] = { | ||
375 | &omap3xxx_l4_core__usbhsotg, | ||
376 | }; | ||
377 | |||
378 | static struct omap_hwmod_addr_space am35xx_usbhsotg_addrs[] = { | ||
379 | { | ||
380 | .pa_start = AM35XX_IPSS_USBOTGSS_BASE, | ||
381 | .pa_end = AM35XX_IPSS_USBOTGSS_BASE + SZ_4K - 1, | ||
382 | .flags = ADDR_TYPE_RT | ||
383 | }, | ||
384 | }; | ||
385 | |||
386 | /* l4_core -> usbhsotg */ | ||
387 | static struct omap_hwmod_ocp_if am35xx_l4_core__usbhsotg = { | ||
388 | .master = &omap3xxx_l4_core_hwmod, | ||
389 | .slave = &am35xx_usbhsotg_hwmod, | ||
390 | .clk = "l4_ick", | ||
391 | .addr = am35xx_usbhsotg_addrs, | ||
392 | .addr_cnt = ARRAY_SIZE(am35xx_usbhsotg_addrs), | ||
393 | .user = OCP_USER_MPU, | ||
394 | }; | ||
395 | |||
396 | static struct omap_hwmod_ocp_if *am35xx_usbhsotg_masters[] = { | ||
397 | &am35xx_usbhsotg__l3, | ||
398 | }; | ||
399 | |||
400 | static struct omap_hwmod_ocp_if *am35xx_usbhsotg_slaves[] = { | ||
401 | &am35xx_l4_core__usbhsotg, | ||
402 | }; | ||
304 | /* Slave interfaces on the L4_CORE interconnect */ | 403 | /* Slave interfaces on the L4_CORE interconnect */ |
305 | static struct omap_hwmod_ocp_if *omap3xxx_l4_core_slaves[] = { | 404 | static struct omap_hwmod_ocp_if *omap3xxx_l4_core_slaves[] = { |
306 | &omap3xxx_l3_main__l4_core, | 405 | &omap3xxx_l3_main__l4_core, |
@@ -417,6 +516,640 @@ static struct omap_hwmod omap3xxx_iva_hwmod = { | |||
417 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430) | 516 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430) |
418 | }; | 517 | }; |
419 | 518 | ||
519 | /* timer class */ | ||
520 | static struct omap_hwmod_class_sysconfig omap3xxx_timer_1ms_sysc = { | ||
521 | .rev_offs = 0x0000, | ||
522 | .sysc_offs = 0x0010, | ||
523 | .syss_offs = 0x0014, | ||
524 | .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_CLOCKACTIVITY | | ||
525 | SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET | | ||
526 | SYSC_HAS_EMUFREE | SYSC_HAS_AUTOIDLE), | ||
527 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | ||
528 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
529 | }; | ||
530 | |||
531 | static struct omap_hwmod_class omap3xxx_timer_1ms_hwmod_class = { | ||
532 | .name = "timer", | ||
533 | .sysc = &omap3xxx_timer_1ms_sysc, | ||
534 | .rev = OMAP_TIMER_IP_VERSION_1, | ||
535 | }; | ||
536 | |||
537 | static struct omap_hwmod_class_sysconfig omap3xxx_timer_sysc = { | ||
538 | .rev_offs = 0x0000, | ||
539 | .sysc_offs = 0x0010, | ||
540 | .syss_offs = 0x0014, | ||
541 | .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_ENAWAKEUP | | ||
542 | SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE), | ||
543 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | ||
544 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
545 | }; | ||
546 | |||
547 | static struct omap_hwmod_class omap3xxx_timer_hwmod_class = { | ||
548 | .name = "timer", | ||
549 | .sysc = &omap3xxx_timer_sysc, | ||
550 | .rev = OMAP_TIMER_IP_VERSION_1, | ||
551 | }; | ||
552 | |||
553 | /* timer1 */ | ||
554 | static struct omap_hwmod omap3xxx_timer1_hwmod; | ||
555 | static struct omap_hwmod_irq_info omap3xxx_timer1_mpu_irqs[] = { | ||
556 | { .irq = 37, }, | ||
557 | }; | ||
558 | |||
559 | static struct omap_hwmod_addr_space omap3xxx_timer1_addrs[] = { | ||
560 | { | ||
561 | .pa_start = 0x48318000, | ||
562 | .pa_end = 0x48318000 + SZ_1K - 1, | ||
563 | .flags = ADDR_TYPE_RT | ||
564 | }, | ||
565 | }; | ||
566 | |||
567 | /* l4_wkup -> timer1 */ | ||
568 | static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__timer1 = { | ||
569 | .master = &omap3xxx_l4_wkup_hwmod, | ||
570 | .slave = &omap3xxx_timer1_hwmod, | ||
571 | .clk = "gpt1_ick", | ||
572 | .addr = omap3xxx_timer1_addrs, | ||
573 | .addr_cnt = ARRAY_SIZE(omap3xxx_timer1_addrs), | ||
574 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
575 | }; | ||
576 | |||
577 | /* timer1 slave port */ | ||
578 | static struct omap_hwmod_ocp_if *omap3xxx_timer1_slaves[] = { | ||
579 | &omap3xxx_l4_wkup__timer1, | ||
580 | }; | ||
581 | |||
582 | /* timer1 hwmod */ | ||
583 | static struct omap_hwmod omap3xxx_timer1_hwmod = { | ||
584 | .name = "timer1", | ||
585 | .mpu_irqs = omap3xxx_timer1_mpu_irqs, | ||
586 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_timer1_mpu_irqs), | ||
587 | .main_clk = "gpt1_fck", | ||
588 | .prcm = { | ||
589 | .omap2 = { | ||
590 | .prcm_reg_id = 1, | ||
591 | .module_bit = OMAP3430_EN_GPT1_SHIFT, | ||
592 | .module_offs = WKUP_MOD, | ||
593 | .idlest_reg_id = 1, | ||
594 | .idlest_idle_bit = OMAP3430_ST_GPT1_SHIFT, | ||
595 | }, | ||
596 | }, | ||
597 | .slaves = omap3xxx_timer1_slaves, | ||
598 | .slaves_cnt = ARRAY_SIZE(omap3xxx_timer1_slaves), | ||
599 | .class = &omap3xxx_timer_1ms_hwmod_class, | ||
600 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430) | ||
601 | }; | ||
602 | |||
603 | /* timer2 */ | ||
604 | static struct omap_hwmod omap3xxx_timer2_hwmod; | ||
605 | static struct omap_hwmod_irq_info omap3xxx_timer2_mpu_irqs[] = { | ||
606 | { .irq = 38, }, | ||
607 | }; | ||
608 | |||
609 | static struct omap_hwmod_addr_space omap3xxx_timer2_addrs[] = { | ||
610 | { | ||
611 | .pa_start = 0x49032000, | ||
612 | .pa_end = 0x49032000 + SZ_1K - 1, | ||
613 | .flags = ADDR_TYPE_RT | ||
614 | }, | ||
615 | }; | ||
616 | |||
617 | /* l4_per -> timer2 */ | ||
618 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer2 = { | ||
619 | .master = &omap3xxx_l4_per_hwmod, | ||
620 | .slave = &omap3xxx_timer2_hwmod, | ||
621 | .clk = "gpt2_ick", | ||
622 | .addr = omap3xxx_timer2_addrs, | ||
623 | .addr_cnt = ARRAY_SIZE(omap3xxx_timer2_addrs), | ||
624 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
625 | }; | ||
626 | |||
627 | /* timer2 slave port */ | ||
628 | static struct omap_hwmod_ocp_if *omap3xxx_timer2_slaves[] = { | ||
629 | &omap3xxx_l4_per__timer2, | ||
630 | }; | ||
631 | |||
632 | /* timer2 hwmod */ | ||
633 | static struct omap_hwmod omap3xxx_timer2_hwmod = { | ||
634 | .name = "timer2", | ||
635 | .mpu_irqs = omap3xxx_timer2_mpu_irqs, | ||
636 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_timer2_mpu_irqs), | ||
637 | .main_clk = "gpt2_fck", | ||
638 | .prcm = { | ||
639 | .omap2 = { | ||
640 | .prcm_reg_id = 1, | ||
641 | .module_bit = OMAP3430_EN_GPT2_SHIFT, | ||
642 | .module_offs = OMAP3430_PER_MOD, | ||
643 | .idlest_reg_id = 1, | ||
644 | .idlest_idle_bit = OMAP3430_ST_GPT2_SHIFT, | ||
645 | }, | ||
646 | }, | ||
647 | .slaves = omap3xxx_timer2_slaves, | ||
648 | .slaves_cnt = ARRAY_SIZE(omap3xxx_timer2_slaves), | ||
649 | .class = &omap3xxx_timer_1ms_hwmod_class, | ||
650 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430) | ||
651 | }; | ||
652 | |||
653 | /* timer3 */ | ||
654 | static struct omap_hwmod omap3xxx_timer3_hwmod; | ||
655 | static struct omap_hwmod_irq_info omap3xxx_timer3_mpu_irqs[] = { | ||
656 | { .irq = 39, }, | ||
657 | }; | ||
658 | |||
659 | static struct omap_hwmod_addr_space omap3xxx_timer3_addrs[] = { | ||
660 | { | ||
661 | .pa_start = 0x49034000, | ||
662 | .pa_end = 0x49034000 + SZ_1K - 1, | ||
663 | .flags = ADDR_TYPE_RT | ||
664 | }, | ||
665 | }; | ||
666 | |||
667 | /* l4_per -> timer3 */ | ||
668 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer3 = { | ||
669 | .master = &omap3xxx_l4_per_hwmod, | ||
670 | .slave = &omap3xxx_timer3_hwmod, | ||
671 | .clk = "gpt3_ick", | ||
672 | .addr = omap3xxx_timer3_addrs, | ||
673 | .addr_cnt = ARRAY_SIZE(omap3xxx_timer3_addrs), | ||
674 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
675 | }; | ||
676 | |||
677 | /* timer3 slave port */ | ||
678 | static struct omap_hwmod_ocp_if *omap3xxx_timer3_slaves[] = { | ||
679 | &omap3xxx_l4_per__timer3, | ||
680 | }; | ||
681 | |||
682 | /* timer3 hwmod */ | ||
683 | static struct omap_hwmod omap3xxx_timer3_hwmod = { | ||
684 | .name = "timer3", | ||
685 | .mpu_irqs = omap3xxx_timer3_mpu_irqs, | ||
686 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_timer3_mpu_irqs), | ||
687 | .main_clk = "gpt3_fck", | ||
688 | .prcm = { | ||
689 | .omap2 = { | ||
690 | .prcm_reg_id = 1, | ||
691 | .module_bit = OMAP3430_EN_GPT3_SHIFT, | ||
692 | .module_offs = OMAP3430_PER_MOD, | ||
693 | .idlest_reg_id = 1, | ||
694 | .idlest_idle_bit = OMAP3430_ST_GPT3_SHIFT, | ||
695 | }, | ||
696 | }, | ||
697 | .slaves = omap3xxx_timer3_slaves, | ||
698 | .slaves_cnt = ARRAY_SIZE(omap3xxx_timer3_slaves), | ||
699 | .class = &omap3xxx_timer_hwmod_class, | ||
700 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430) | ||
701 | }; | ||
702 | |||
703 | /* timer4 */ | ||
704 | static struct omap_hwmod omap3xxx_timer4_hwmod; | ||
705 | static struct omap_hwmod_irq_info omap3xxx_timer4_mpu_irqs[] = { | ||
706 | { .irq = 40, }, | ||
707 | }; | ||
708 | |||
709 | static struct omap_hwmod_addr_space omap3xxx_timer4_addrs[] = { | ||
710 | { | ||
711 | .pa_start = 0x49036000, | ||
712 | .pa_end = 0x49036000 + SZ_1K - 1, | ||
713 | .flags = ADDR_TYPE_RT | ||
714 | }, | ||
715 | }; | ||
716 | |||
717 | /* l4_per -> timer4 */ | ||
718 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer4 = { | ||
719 | .master = &omap3xxx_l4_per_hwmod, | ||
720 | .slave = &omap3xxx_timer4_hwmod, | ||
721 | .clk = "gpt4_ick", | ||
722 | .addr = omap3xxx_timer4_addrs, | ||
723 | .addr_cnt = ARRAY_SIZE(omap3xxx_timer4_addrs), | ||
724 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
725 | }; | ||
726 | |||
727 | /* timer4 slave port */ | ||
728 | static struct omap_hwmod_ocp_if *omap3xxx_timer4_slaves[] = { | ||
729 | &omap3xxx_l4_per__timer4, | ||
730 | }; | ||
731 | |||
732 | /* timer4 hwmod */ | ||
733 | static struct omap_hwmod omap3xxx_timer4_hwmod = { | ||
734 | .name = "timer4", | ||
735 | .mpu_irqs = omap3xxx_timer4_mpu_irqs, | ||
736 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_timer4_mpu_irqs), | ||
737 | .main_clk = "gpt4_fck", | ||
738 | .prcm = { | ||
739 | .omap2 = { | ||
740 | .prcm_reg_id = 1, | ||
741 | .module_bit = OMAP3430_EN_GPT4_SHIFT, | ||
742 | .module_offs = OMAP3430_PER_MOD, | ||
743 | .idlest_reg_id = 1, | ||
744 | .idlest_idle_bit = OMAP3430_ST_GPT4_SHIFT, | ||
745 | }, | ||
746 | }, | ||
747 | .slaves = omap3xxx_timer4_slaves, | ||
748 | .slaves_cnt = ARRAY_SIZE(omap3xxx_timer4_slaves), | ||
749 | .class = &omap3xxx_timer_hwmod_class, | ||
750 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430) | ||
751 | }; | ||
752 | |||
753 | /* timer5 */ | ||
754 | static struct omap_hwmod omap3xxx_timer5_hwmod; | ||
755 | static struct omap_hwmod_irq_info omap3xxx_timer5_mpu_irqs[] = { | ||
756 | { .irq = 41, }, | ||
757 | }; | ||
758 | |||
759 | static struct omap_hwmod_addr_space omap3xxx_timer5_addrs[] = { | ||
760 | { | ||
761 | .pa_start = 0x49038000, | ||
762 | .pa_end = 0x49038000 + SZ_1K - 1, | ||
763 | .flags = ADDR_TYPE_RT | ||
764 | }, | ||
765 | }; | ||
766 | |||
767 | /* l4_per -> timer5 */ | ||
768 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer5 = { | ||
769 | .master = &omap3xxx_l4_per_hwmod, | ||
770 | .slave = &omap3xxx_timer5_hwmod, | ||
771 | .clk = "gpt5_ick", | ||
772 | .addr = omap3xxx_timer5_addrs, | ||
773 | .addr_cnt = ARRAY_SIZE(omap3xxx_timer5_addrs), | ||
774 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
775 | }; | ||
776 | |||
777 | /* timer5 slave port */ | ||
778 | static struct omap_hwmod_ocp_if *omap3xxx_timer5_slaves[] = { | ||
779 | &omap3xxx_l4_per__timer5, | ||
780 | }; | ||
781 | |||
782 | /* timer5 hwmod */ | ||
783 | static struct omap_hwmod omap3xxx_timer5_hwmod = { | ||
784 | .name = "timer5", | ||
785 | .mpu_irqs = omap3xxx_timer5_mpu_irqs, | ||
786 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_timer5_mpu_irqs), | ||
787 | .main_clk = "gpt5_fck", | ||
788 | .prcm = { | ||
789 | .omap2 = { | ||
790 | .prcm_reg_id = 1, | ||
791 | .module_bit = OMAP3430_EN_GPT5_SHIFT, | ||
792 | .module_offs = OMAP3430_PER_MOD, | ||
793 | .idlest_reg_id = 1, | ||
794 | .idlest_idle_bit = OMAP3430_ST_GPT5_SHIFT, | ||
795 | }, | ||
796 | }, | ||
797 | .slaves = omap3xxx_timer5_slaves, | ||
798 | .slaves_cnt = ARRAY_SIZE(omap3xxx_timer5_slaves), | ||
799 | .class = &omap3xxx_timer_hwmod_class, | ||
800 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430) | ||
801 | }; | ||
802 | |||
803 | /* timer6 */ | ||
804 | static struct omap_hwmod omap3xxx_timer6_hwmod; | ||
805 | static struct omap_hwmod_irq_info omap3xxx_timer6_mpu_irqs[] = { | ||
806 | { .irq = 42, }, | ||
807 | }; | ||
808 | |||
809 | static struct omap_hwmod_addr_space omap3xxx_timer6_addrs[] = { | ||
810 | { | ||
811 | .pa_start = 0x4903A000, | ||
812 | .pa_end = 0x4903A000 + SZ_1K - 1, | ||
813 | .flags = ADDR_TYPE_RT | ||
814 | }, | ||
815 | }; | ||
816 | |||
817 | /* l4_per -> timer6 */ | ||
818 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer6 = { | ||
819 | .master = &omap3xxx_l4_per_hwmod, | ||
820 | .slave = &omap3xxx_timer6_hwmod, | ||
821 | .clk = "gpt6_ick", | ||
822 | .addr = omap3xxx_timer6_addrs, | ||
823 | .addr_cnt = ARRAY_SIZE(omap3xxx_timer6_addrs), | ||
824 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
825 | }; | ||
826 | |||
827 | /* timer6 slave port */ | ||
828 | static struct omap_hwmod_ocp_if *omap3xxx_timer6_slaves[] = { | ||
829 | &omap3xxx_l4_per__timer6, | ||
830 | }; | ||
831 | |||
832 | /* timer6 hwmod */ | ||
833 | static struct omap_hwmod omap3xxx_timer6_hwmod = { | ||
834 | .name = "timer6", | ||
835 | .mpu_irqs = omap3xxx_timer6_mpu_irqs, | ||
836 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_timer6_mpu_irqs), | ||
837 | .main_clk = "gpt6_fck", | ||
838 | .prcm = { | ||
839 | .omap2 = { | ||
840 | .prcm_reg_id = 1, | ||
841 | .module_bit = OMAP3430_EN_GPT6_SHIFT, | ||
842 | .module_offs = OMAP3430_PER_MOD, | ||
843 | .idlest_reg_id = 1, | ||
844 | .idlest_idle_bit = OMAP3430_ST_GPT6_SHIFT, | ||
845 | }, | ||
846 | }, | ||
847 | .slaves = omap3xxx_timer6_slaves, | ||
848 | .slaves_cnt = ARRAY_SIZE(omap3xxx_timer6_slaves), | ||
849 | .class = &omap3xxx_timer_hwmod_class, | ||
850 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430) | ||
851 | }; | ||
852 | |||
853 | /* timer7 */ | ||
854 | static struct omap_hwmod omap3xxx_timer7_hwmod; | ||
855 | static struct omap_hwmod_irq_info omap3xxx_timer7_mpu_irqs[] = { | ||
856 | { .irq = 43, }, | ||
857 | }; | ||
858 | |||
859 | static struct omap_hwmod_addr_space omap3xxx_timer7_addrs[] = { | ||
860 | { | ||
861 | .pa_start = 0x4903C000, | ||
862 | .pa_end = 0x4903C000 + SZ_1K - 1, | ||
863 | .flags = ADDR_TYPE_RT | ||
864 | }, | ||
865 | }; | ||
866 | |||
867 | /* l4_per -> timer7 */ | ||
868 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer7 = { | ||
869 | .master = &omap3xxx_l4_per_hwmod, | ||
870 | .slave = &omap3xxx_timer7_hwmod, | ||
871 | .clk = "gpt7_ick", | ||
872 | .addr = omap3xxx_timer7_addrs, | ||
873 | .addr_cnt = ARRAY_SIZE(omap3xxx_timer7_addrs), | ||
874 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
875 | }; | ||
876 | |||
877 | /* timer7 slave port */ | ||
878 | static struct omap_hwmod_ocp_if *omap3xxx_timer7_slaves[] = { | ||
879 | &omap3xxx_l4_per__timer7, | ||
880 | }; | ||
881 | |||
882 | /* timer7 hwmod */ | ||
883 | static struct omap_hwmod omap3xxx_timer7_hwmod = { | ||
884 | .name = "timer7", | ||
885 | .mpu_irqs = omap3xxx_timer7_mpu_irqs, | ||
886 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_timer7_mpu_irqs), | ||
887 | .main_clk = "gpt7_fck", | ||
888 | .prcm = { | ||
889 | .omap2 = { | ||
890 | .prcm_reg_id = 1, | ||
891 | .module_bit = OMAP3430_EN_GPT7_SHIFT, | ||
892 | .module_offs = OMAP3430_PER_MOD, | ||
893 | .idlest_reg_id = 1, | ||
894 | .idlest_idle_bit = OMAP3430_ST_GPT7_SHIFT, | ||
895 | }, | ||
896 | }, | ||
897 | .slaves = omap3xxx_timer7_slaves, | ||
898 | .slaves_cnt = ARRAY_SIZE(omap3xxx_timer7_slaves), | ||
899 | .class = &omap3xxx_timer_hwmod_class, | ||
900 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430) | ||
901 | }; | ||
902 | |||
903 | /* timer8 */ | ||
904 | static struct omap_hwmod omap3xxx_timer8_hwmod; | ||
905 | static struct omap_hwmod_irq_info omap3xxx_timer8_mpu_irqs[] = { | ||
906 | { .irq = 44, }, | ||
907 | }; | ||
908 | |||
909 | static struct omap_hwmod_addr_space omap3xxx_timer8_addrs[] = { | ||
910 | { | ||
911 | .pa_start = 0x4903E000, | ||
912 | .pa_end = 0x4903E000 + SZ_1K - 1, | ||
913 | .flags = ADDR_TYPE_RT | ||
914 | }, | ||
915 | }; | ||
916 | |||
917 | /* l4_per -> timer8 */ | ||
918 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer8 = { | ||
919 | .master = &omap3xxx_l4_per_hwmod, | ||
920 | .slave = &omap3xxx_timer8_hwmod, | ||
921 | .clk = "gpt8_ick", | ||
922 | .addr = omap3xxx_timer8_addrs, | ||
923 | .addr_cnt = ARRAY_SIZE(omap3xxx_timer8_addrs), | ||
924 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
925 | }; | ||
926 | |||
927 | /* timer8 slave port */ | ||
928 | static struct omap_hwmod_ocp_if *omap3xxx_timer8_slaves[] = { | ||
929 | &omap3xxx_l4_per__timer8, | ||
930 | }; | ||
931 | |||
932 | /* timer8 hwmod */ | ||
933 | static struct omap_hwmod omap3xxx_timer8_hwmod = { | ||
934 | .name = "timer8", | ||
935 | .mpu_irqs = omap3xxx_timer8_mpu_irqs, | ||
936 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_timer8_mpu_irqs), | ||
937 | .main_clk = "gpt8_fck", | ||
938 | .prcm = { | ||
939 | .omap2 = { | ||
940 | .prcm_reg_id = 1, | ||
941 | .module_bit = OMAP3430_EN_GPT8_SHIFT, | ||
942 | .module_offs = OMAP3430_PER_MOD, | ||
943 | .idlest_reg_id = 1, | ||
944 | .idlest_idle_bit = OMAP3430_ST_GPT8_SHIFT, | ||
945 | }, | ||
946 | }, | ||
947 | .slaves = omap3xxx_timer8_slaves, | ||
948 | .slaves_cnt = ARRAY_SIZE(omap3xxx_timer8_slaves), | ||
949 | .class = &omap3xxx_timer_hwmod_class, | ||
950 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430) | ||
951 | }; | ||
952 | |||
953 | /* timer9 */ | ||
954 | static struct omap_hwmod omap3xxx_timer9_hwmod; | ||
955 | static struct omap_hwmod_irq_info omap3xxx_timer9_mpu_irqs[] = { | ||
956 | { .irq = 45, }, | ||
957 | }; | ||
958 | |||
959 | static struct omap_hwmod_addr_space omap3xxx_timer9_addrs[] = { | ||
960 | { | ||
961 | .pa_start = 0x49040000, | ||
962 | .pa_end = 0x49040000 + SZ_1K - 1, | ||
963 | .flags = ADDR_TYPE_RT | ||
964 | }, | ||
965 | }; | ||
966 | |||
967 | /* l4_per -> timer9 */ | ||
968 | static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer9 = { | ||
969 | .master = &omap3xxx_l4_per_hwmod, | ||
970 | .slave = &omap3xxx_timer9_hwmod, | ||
971 | .clk = "gpt9_ick", | ||
972 | .addr = omap3xxx_timer9_addrs, | ||
973 | .addr_cnt = ARRAY_SIZE(omap3xxx_timer9_addrs), | ||
974 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
975 | }; | ||
976 | |||
977 | /* timer9 slave port */ | ||
978 | static struct omap_hwmod_ocp_if *omap3xxx_timer9_slaves[] = { | ||
979 | &omap3xxx_l4_per__timer9, | ||
980 | }; | ||
981 | |||
982 | /* timer9 hwmod */ | ||
983 | static struct omap_hwmod omap3xxx_timer9_hwmod = { | ||
984 | .name = "timer9", | ||
985 | .mpu_irqs = omap3xxx_timer9_mpu_irqs, | ||
986 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_timer9_mpu_irqs), | ||
987 | .main_clk = "gpt9_fck", | ||
988 | .prcm = { | ||
989 | .omap2 = { | ||
990 | .prcm_reg_id = 1, | ||
991 | .module_bit = OMAP3430_EN_GPT9_SHIFT, | ||
992 | .module_offs = OMAP3430_PER_MOD, | ||
993 | .idlest_reg_id = 1, | ||
994 | .idlest_idle_bit = OMAP3430_ST_GPT9_SHIFT, | ||
995 | }, | ||
996 | }, | ||
997 | .slaves = omap3xxx_timer9_slaves, | ||
998 | .slaves_cnt = ARRAY_SIZE(omap3xxx_timer9_slaves), | ||
999 | .class = &omap3xxx_timer_hwmod_class, | ||
1000 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430) | ||
1001 | }; | ||
1002 | |||
1003 | /* timer10 */ | ||
1004 | static struct omap_hwmod omap3xxx_timer10_hwmod; | ||
1005 | static struct omap_hwmod_irq_info omap3xxx_timer10_mpu_irqs[] = { | ||
1006 | { .irq = 46, }, | ||
1007 | }; | ||
1008 | |||
1009 | static struct omap_hwmod_addr_space omap3xxx_timer10_addrs[] = { | ||
1010 | { | ||
1011 | .pa_start = 0x48086000, | ||
1012 | .pa_end = 0x48086000 + SZ_1K - 1, | ||
1013 | .flags = ADDR_TYPE_RT | ||
1014 | }, | ||
1015 | }; | ||
1016 | |||
1017 | /* l4_core -> timer10 */ | ||
1018 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer10 = { | ||
1019 | .master = &omap3xxx_l4_core_hwmod, | ||
1020 | .slave = &omap3xxx_timer10_hwmod, | ||
1021 | .clk = "gpt10_ick", | ||
1022 | .addr = omap3xxx_timer10_addrs, | ||
1023 | .addr_cnt = ARRAY_SIZE(omap3xxx_timer10_addrs), | ||
1024 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
1025 | }; | ||
1026 | |||
1027 | /* timer10 slave port */ | ||
1028 | static struct omap_hwmod_ocp_if *omap3xxx_timer10_slaves[] = { | ||
1029 | &omap3xxx_l4_core__timer10, | ||
1030 | }; | ||
1031 | |||
1032 | /* timer10 hwmod */ | ||
1033 | static struct omap_hwmod omap3xxx_timer10_hwmod = { | ||
1034 | .name = "timer10", | ||
1035 | .mpu_irqs = omap3xxx_timer10_mpu_irqs, | ||
1036 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_timer10_mpu_irqs), | ||
1037 | .main_clk = "gpt10_fck", | ||
1038 | .prcm = { | ||
1039 | .omap2 = { | ||
1040 | .prcm_reg_id = 1, | ||
1041 | .module_bit = OMAP3430_EN_GPT10_SHIFT, | ||
1042 | .module_offs = CORE_MOD, | ||
1043 | .idlest_reg_id = 1, | ||
1044 | .idlest_idle_bit = OMAP3430_ST_GPT10_SHIFT, | ||
1045 | }, | ||
1046 | }, | ||
1047 | .slaves = omap3xxx_timer10_slaves, | ||
1048 | .slaves_cnt = ARRAY_SIZE(omap3xxx_timer10_slaves), | ||
1049 | .class = &omap3xxx_timer_1ms_hwmod_class, | ||
1050 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430) | ||
1051 | }; | ||
1052 | |||
1053 | /* timer11 */ | ||
1054 | static struct omap_hwmod omap3xxx_timer11_hwmod; | ||
1055 | static struct omap_hwmod_irq_info omap3xxx_timer11_mpu_irqs[] = { | ||
1056 | { .irq = 47, }, | ||
1057 | }; | ||
1058 | |||
1059 | static struct omap_hwmod_addr_space omap3xxx_timer11_addrs[] = { | ||
1060 | { | ||
1061 | .pa_start = 0x48088000, | ||
1062 | .pa_end = 0x48088000 + SZ_1K - 1, | ||
1063 | .flags = ADDR_TYPE_RT | ||
1064 | }, | ||
1065 | }; | ||
1066 | |||
1067 | /* l4_core -> timer11 */ | ||
1068 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer11 = { | ||
1069 | .master = &omap3xxx_l4_core_hwmod, | ||
1070 | .slave = &omap3xxx_timer11_hwmod, | ||
1071 | .clk = "gpt11_ick", | ||
1072 | .addr = omap3xxx_timer11_addrs, | ||
1073 | .addr_cnt = ARRAY_SIZE(omap3xxx_timer11_addrs), | ||
1074 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
1075 | }; | ||
1076 | |||
1077 | /* timer11 slave port */ | ||
1078 | static struct omap_hwmod_ocp_if *omap3xxx_timer11_slaves[] = { | ||
1079 | &omap3xxx_l4_core__timer11, | ||
1080 | }; | ||
1081 | |||
1082 | /* timer11 hwmod */ | ||
1083 | static struct omap_hwmod omap3xxx_timer11_hwmod = { | ||
1084 | .name = "timer11", | ||
1085 | .mpu_irqs = omap3xxx_timer11_mpu_irqs, | ||
1086 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_timer11_mpu_irqs), | ||
1087 | .main_clk = "gpt11_fck", | ||
1088 | .prcm = { | ||
1089 | .omap2 = { | ||
1090 | .prcm_reg_id = 1, | ||
1091 | .module_bit = OMAP3430_EN_GPT11_SHIFT, | ||
1092 | .module_offs = CORE_MOD, | ||
1093 | .idlest_reg_id = 1, | ||
1094 | .idlest_idle_bit = OMAP3430_ST_GPT11_SHIFT, | ||
1095 | }, | ||
1096 | }, | ||
1097 | .slaves = omap3xxx_timer11_slaves, | ||
1098 | .slaves_cnt = ARRAY_SIZE(omap3xxx_timer11_slaves), | ||
1099 | .class = &omap3xxx_timer_hwmod_class, | ||
1100 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430) | ||
1101 | }; | ||
1102 | |||
1103 | /* timer12*/ | ||
1104 | static struct omap_hwmod omap3xxx_timer12_hwmod; | ||
1105 | static struct omap_hwmod_irq_info omap3xxx_timer12_mpu_irqs[] = { | ||
1106 | { .irq = 95, }, | ||
1107 | }; | ||
1108 | |||
1109 | static struct omap_hwmod_addr_space omap3xxx_timer12_addrs[] = { | ||
1110 | { | ||
1111 | .pa_start = 0x48304000, | ||
1112 | .pa_end = 0x48304000 + SZ_1K - 1, | ||
1113 | .flags = ADDR_TYPE_RT | ||
1114 | }, | ||
1115 | }; | ||
1116 | |||
1117 | /* l4_core -> timer12 */ | ||
1118 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer12 = { | ||
1119 | .master = &omap3xxx_l4_core_hwmod, | ||
1120 | .slave = &omap3xxx_timer12_hwmod, | ||
1121 | .clk = "gpt12_ick", | ||
1122 | .addr = omap3xxx_timer12_addrs, | ||
1123 | .addr_cnt = ARRAY_SIZE(omap3xxx_timer12_addrs), | ||
1124 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
1125 | }; | ||
1126 | |||
1127 | /* timer12 slave port */ | ||
1128 | static struct omap_hwmod_ocp_if *omap3xxx_timer12_slaves[] = { | ||
1129 | &omap3xxx_l4_core__timer12, | ||
1130 | }; | ||
1131 | |||
1132 | /* timer12 hwmod */ | ||
1133 | static struct omap_hwmod omap3xxx_timer12_hwmod = { | ||
1134 | .name = "timer12", | ||
1135 | .mpu_irqs = omap3xxx_timer12_mpu_irqs, | ||
1136 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_timer12_mpu_irqs), | ||
1137 | .main_clk = "gpt12_fck", | ||
1138 | .prcm = { | ||
1139 | .omap2 = { | ||
1140 | .prcm_reg_id = 1, | ||
1141 | .module_bit = OMAP3430_EN_GPT12_SHIFT, | ||
1142 | .module_offs = WKUP_MOD, | ||
1143 | .idlest_reg_id = 1, | ||
1144 | .idlest_idle_bit = OMAP3430_ST_GPT12_SHIFT, | ||
1145 | }, | ||
1146 | }, | ||
1147 | .slaves = omap3xxx_timer12_slaves, | ||
1148 | .slaves_cnt = ARRAY_SIZE(omap3xxx_timer12_slaves), | ||
1149 | .class = &omap3xxx_timer_hwmod_class, | ||
1150 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430) | ||
1151 | }; | ||
1152 | |||
420 | /* l4_wkup -> wd_timer2 */ | 1153 | /* l4_wkup -> wd_timer2 */ |
421 | static struct omap_hwmod_addr_space omap3xxx_wd_timer2_addrs[] = { | 1154 | static struct omap_hwmod_addr_space omap3xxx_wd_timer2_addrs[] = { |
422 | { | 1155 | { |
@@ -664,6 +1397,410 @@ static struct omap_hwmod_class i2c_class = { | |||
664 | .sysc = &i2c_sysc, | 1397 | .sysc = &i2c_sysc, |
665 | }; | 1398 | }; |
666 | 1399 | ||
1400 | /* | ||
1401 | * 'dss' class | ||
1402 | * display sub-system | ||
1403 | */ | ||
1404 | |||
1405 | static struct omap_hwmod_class_sysconfig omap3xxx_dss_sysc = { | ||
1406 | .rev_offs = 0x0000, | ||
1407 | .sysc_offs = 0x0010, | ||
1408 | .syss_offs = 0x0014, | ||
1409 | .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE), | ||
1410 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
1411 | }; | ||
1412 | |||
1413 | static struct omap_hwmod_class omap3xxx_dss_hwmod_class = { | ||
1414 | .name = "dss", | ||
1415 | .sysc = &omap3xxx_dss_sysc, | ||
1416 | }; | ||
1417 | |||
1418 | /* dss */ | ||
1419 | static struct omap_hwmod_irq_info omap3xxx_dss_irqs[] = { | ||
1420 | { .irq = 25 }, | ||
1421 | }; | ||
1422 | |||
1423 | static struct omap_hwmod_dma_info omap3xxx_dss_sdma_chs[] = { | ||
1424 | { .name = "dispc", .dma_req = 5 }, | ||
1425 | { .name = "dsi1", .dma_req = 74 }, | ||
1426 | }; | ||
1427 | |||
1428 | /* dss */ | ||
1429 | /* dss master ports */ | ||
1430 | static struct omap_hwmod_ocp_if *omap3xxx_dss_masters[] = { | ||
1431 | &omap3xxx_dss__l3, | ||
1432 | }; | ||
1433 | |||
1434 | static struct omap_hwmod_addr_space omap3xxx_dss_addrs[] = { | ||
1435 | { | ||
1436 | .pa_start = 0x48050000, | ||
1437 | .pa_end = 0x480503FF, | ||
1438 | .flags = ADDR_TYPE_RT | ||
1439 | }, | ||
1440 | }; | ||
1441 | |||
1442 | /* l4_core -> dss */ | ||
1443 | static struct omap_hwmod_ocp_if omap3430es1_l4_core__dss = { | ||
1444 | .master = &omap3xxx_l4_core_hwmod, | ||
1445 | .slave = &omap3430es1_dss_core_hwmod, | ||
1446 | .clk = "dss_ick", | ||
1447 | .addr = omap3xxx_dss_addrs, | ||
1448 | .addr_cnt = ARRAY_SIZE(omap3xxx_dss_addrs), | ||
1449 | .fw = { | ||
1450 | .omap2 = { | ||
1451 | .l4_fw_region = OMAP3ES1_L4_CORE_FW_DSS_CORE_REGION, | ||
1452 | .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP, | ||
1453 | .flags = OMAP_FIREWALL_L4, | ||
1454 | } | ||
1455 | }, | ||
1456 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
1457 | }; | ||
1458 | |||
1459 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss = { | ||
1460 | .master = &omap3xxx_l4_core_hwmod, | ||
1461 | .slave = &omap3xxx_dss_core_hwmod, | ||
1462 | .clk = "dss_ick", | ||
1463 | .addr = omap3xxx_dss_addrs, | ||
1464 | .addr_cnt = ARRAY_SIZE(omap3xxx_dss_addrs), | ||
1465 | .fw = { | ||
1466 | .omap2 = { | ||
1467 | .l4_fw_region = OMAP3_L4_CORE_FW_DSS_CORE_REGION, | ||
1468 | .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP, | ||
1469 | .flags = OMAP_FIREWALL_L4, | ||
1470 | } | ||
1471 | }, | ||
1472 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
1473 | }; | ||
1474 | |||
1475 | /* dss slave ports */ | ||
1476 | static struct omap_hwmod_ocp_if *omap3430es1_dss_slaves[] = { | ||
1477 | &omap3430es1_l4_core__dss, | ||
1478 | }; | ||
1479 | |||
1480 | static struct omap_hwmod_ocp_if *omap3xxx_dss_slaves[] = { | ||
1481 | &omap3xxx_l4_core__dss, | ||
1482 | }; | ||
1483 | |||
1484 | static struct omap_hwmod_opt_clk dss_opt_clks[] = { | ||
1485 | { .role = "tv_clk", .clk = "dss_tv_fck" }, | ||
1486 | { .role = "dssclk", .clk = "dss_96m_fck" }, | ||
1487 | { .role = "sys_clk", .clk = "dss2_alwon_fck" }, | ||
1488 | }; | ||
1489 | |||
1490 | static struct omap_hwmod omap3430es1_dss_core_hwmod = { | ||
1491 | .name = "dss_core", | ||
1492 | .class = &omap3xxx_dss_hwmod_class, | ||
1493 | .main_clk = "dss1_alwon_fck", /* instead of dss_fck */ | ||
1494 | .mpu_irqs = omap3xxx_dss_irqs, | ||
1495 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_dss_irqs), | ||
1496 | .sdma_reqs = omap3xxx_dss_sdma_chs, | ||
1497 | .sdma_reqs_cnt = ARRAY_SIZE(omap3xxx_dss_sdma_chs), | ||
1498 | |||
1499 | .prcm = { | ||
1500 | .omap2 = { | ||
1501 | .prcm_reg_id = 1, | ||
1502 | .module_bit = OMAP3430_EN_DSS1_SHIFT, | ||
1503 | .module_offs = OMAP3430_DSS_MOD, | ||
1504 | .idlest_reg_id = 1, | ||
1505 | .idlest_stdby_bit = OMAP3430ES1_ST_DSS_SHIFT, | ||
1506 | }, | ||
1507 | }, | ||
1508 | .opt_clks = dss_opt_clks, | ||
1509 | .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks), | ||
1510 | .slaves = omap3430es1_dss_slaves, | ||
1511 | .slaves_cnt = ARRAY_SIZE(omap3430es1_dss_slaves), | ||
1512 | .masters = omap3xxx_dss_masters, | ||
1513 | .masters_cnt = ARRAY_SIZE(omap3xxx_dss_masters), | ||
1514 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES1), | ||
1515 | .flags = HWMOD_NO_IDLEST, | ||
1516 | }; | ||
1517 | |||
1518 | static struct omap_hwmod omap3xxx_dss_core_hwmod = { | ||
1519 | .name = "dss_core", | ||
1520 | .class = &omap3xxx_dss_hwmod_class, | ||
1521 | .main_clk = "dss1_alwon_fck", /* instead of dss_fck */ | ||
1522 | .mpu_irqs = omap3xxx_dss_irqs, | ||
1523 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_dss_irqs), | ||
1524 | .sdma_reqs = omap3xxx_dss_sdma_chs, | ||
1525 | .sdma_reqs_cnt = ARRAY_SIZE(omap3xxx_dss_sdma_chs), | ||
1526 | |||
1527 | .prcm = { | ||
1528 | .omap2 = { | ||
1529 | .prcm_reg_id = 1, | ||
1530 | .module_bit = OMAP3430_EN_DSS1_SHIFT, | ||
1531 | .module_offs = OMAP3430_DSS_MOD, | ||
1532 | .idlest_reg_id = 1, | ||
1533 | .idlest_idle_bit = OMAP3430ES2_ST_DSS_IDLE_SHIFT, | ||
1534 | .idlest_stdby_bit = OMAP3430ES2_ST_DSS_STDBY_SHIFT, | ||
1535 | }, | ||
1536 | }, | ||
1537 | .opt_clks = dss_opt_clks, | ||
1538 | .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks), | ||
1539 | .slaves = omap3xxx_dss_slaves, | ||
1540 | .slaves_cnt = ARRAY_SIZE(omap3xxx_dss_slaves), | ||
1541 | .masters = omap3xxx_dss_masters, | ||
1542 | .masters_cnt = ARRAY_SIZE(omap3xxx_dss_masters), | ||
1543 | .omap_chip = OMAP_CHIP_INIT(CHIP_GE_OMAP3430ES2 | | ||
1544 | CHIP_IS_OMAP3630ES1 | CHIP_GE_OMAP3630ES1_1), | ||
1545 | }; | ||
1546 | |||
1547 | /* | ||
1548 | * 'dispc' class | ||
1549 | * display controller | ||
1550 | */ | ||
1551 | |||
1552 | static struct omap_hwmod_class_sysconfig omap3xxx_dispc_sysc = { | ||
1553 | .rev_offs = 0x0000, | ||
1554 | .sysc_offs = 0x0010, | ||
1555 | .syss_offs = 0x0014, | ||
1556 | .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_CLOCKACTIVITY | | ||
1557 | SYSC_HAS_MIDLEMODE | SYSC_HAS_ENAWAKEUP | | ||
1558 | SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE), | ||
1559 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | | ||
1560 | MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART), | ||
1561 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
1562 | }; | ||
1563 | |||
1564 | static struct omap_hwmod_class omap3xxx_dispc_hwmod_class = { | ||
1565 | .name = "dispc", | ||
1566 | .sysc = &omap3xxx_dispc_sysc, | ||
1567 | }; | ||
1568 | |||
1569 | static struct omap_hwmod_addr_space omap3xxx_dss_dispc_addrs[] = { | ||
1570 | { | ||
1571 | .pa_start = 0x48050400, | ||
1572 | .pa_end = 0x480507FF, | ||
1573 | .flags = ADDR_TYPE_RT | ||
1574 | }, | ||
1575 | }; | ||
1576 | |||
1577 | /* l4_core -> dss_dispc */ | ||
1578 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dispc = { | ||
1579 | .master = &omap3xxx_l4_core_hwmod, | ||
1580 | .slave = &omap3xxx_dss_dispc_hwmod, | ||
1581 | .clk = "dss_ick", | ||
1582 | .addr = omap3xxx_dss_dispc_addrs, | ||
1583 | .addr_cnt = ARRAY_SIZE(omap3xxx_dss_dispc_addrs), | ||
1584 | .fw = { | ||
1585 | .omap2 = { | ||
1586 | .l4_fw_region = OMAP3_L4_CORE_FW_DSS_DISPC_REGION, | ||
1587 | .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP, | ||
1588 | .flags = OMAP_FIREWALL_L4, | ||
1589 | } | ||
1590 | }, | ||
1591 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
1592 | }; | ||
1593 | |||
1594 | /* dss_dispc slave ports */ | ||
1595 | static struct omap_hwmod_ocp_if *omap3xxx_dss_dispc_slaves[] = { | ||
1596 | &omap3xxx_l4_core__dss_dispc, | ||
1597 | }; | ||
1598 | |||
1599 | static struct omap_hwmod omap3xxx_dss_dispc_hwmod = { | ||
1600 | .name = "dss_dispc", | ||
1601 | .class = &omap3xxx_dispc_hwmod_class, | ||
1602 | .main_clk = "dss1_alwon_fck", | ||
1603 | .prcm = { | ||
1604 | .omap2 = { | ||
1605 | .prcm_reg_id = 1, | ||
1606 | .module_bit = OMAP3430_EN_DSS1_SHIFT, | ||
1607 | .module_offs = OMAP3430_DSS_MOD, | ||
1608 | }, | ||
1609 | }, | ||
1610 | .slaves = omap3xxx_dss_dispc_slaves, | ||
1611 | .slaves_cnt = ARRAY_SIZE(omap3xxx_dss_dispc_slaves), | ||
1612 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES1 | | ||
1613 | CHIP_GE_OMAP3430ES2 | CHIP_IS_OMAP3630ES1 | | ||
1614 | CHIP_GE_OMAP3630ES1_1), | ||
1615 | .flags = HWMOD_NO_IDLEST, | ||
1616 | }; | ||
1617 | |||
1618 | /* | ||
1619 | * 'dsi' class | ||
1620 | * display serial interface controller | ||
1621 | */ | ||
1622 | |||
1623 | static struct omap_hwmod_class omap3xxx_dsi_hwmod_class = { | ||
1624 | .name = "dsi", | ||
1625 | }; | ||
1626 | |||
1627 | /* dss_dsi1 */ | ||
1628 | static struct omap_hwmod_addr_space omap3xxx_dss_dsi1_addrs[] = { | ||
1629 | { | ||
1630 | .pa_start = 0x4804FC00, | ||
1631 | .pa_end = 0x4804FFFF, | ||
1632 | .flags = ADDR_TYPE_RT | ||
1633 | }, | ||
1634 | }; | ||
1635 | |||
1636 | /* l4_core -> dss_dsi1 */ | ||
1637 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dsi1 = { | ||
1638 | .master = &omap3xxx_l4_core_hwmod, | ||
1639 | .slave = &omap3xxx_dss_dsi1_hwmod, | ||
1640 | .addr = omap3xxx_dss_dsi1_addrs, | ||
1641 | .addr_cnt = ARRAY_SIZE(omap3xxx_dss_dsi1_addrs), | ||
1642 | .fw = { | ||
1643 | .omap2 = { | ||
1644 | .l4_fw_region = OMAP3_L4_CORE_FW_DSS_DSI_REGION, | ||
1645 | .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP, | ||
1646 | .flags = OMAP_FIREWALL_L4, | ||
1647 | } | ||
1648 | }, | ||
1649 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
1650 | }; | ||
1651 | |||
1652 | /* dss_dsi1 slave ports */ | ||
1653 | static struct omap_hwmod_ocp_if *omap3xxx_dss_dsi1_slaves[] = { | ||
1654 | &omap3xxx_l4_core__dss_dsi1, | ||
1655 | }; | ||
1656 | |||
1657 | static struct omap_hwmod omap3xxx_dss_dsi1_hwmod = { | ||
1658 | .name = "dss_dsi1", | ||
1659 | .class = &omap3xxx_dsi_hwmod_class, | ||
1660 | .main_clk = "dss1_alwon_fck", | ||
1661 | .prcm = { | ||
1662 | .omap2 = { | ||
1663 | .prcm_reg_id = 1, | ||
1664 | .module_bit = OMAP3430_EN_DSS1_SHIFT, | ||
1665 | .module_offs = OMAP3430_DSS_MOD, | ||
1666 | }, | ||
1667 | }, | ||
1668 | .slaves = omap3xxx_dss_dsi1_slaves, | ||
1669 | .slaves_cnt = ARRAY_SIZE(omap3xxx_dss_dsi1_slaves), | ||
1670 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES1 | | ||
1671 | CHIP_GE_OMAP3430ES2 | CHIP_IS_OMAP3630ES1 | | ||
1672 | CHIP_GE_OMAP3630ES1_1), | ||
1673 | .flags = HWMOD_NO_IDLEST, | ||
1674 | }; | ||
1675 | |||
1676 | /* | ||
1677 | * 'rfbi' class | ||
1678 | * remote frame buffer interface | ||
1679 | */ | ||
1680 | |||
1681 | static struct omap_hwmod_class_sysconfig omap3xxx_rfbi_sysc = { | ||
1682 | .rev_offs = 0x0000, | ||
1683 | .sysc_offs = 0x0010, | ||
1684 | .syss_offs = 0x0014, | ||
1685 | .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET | | ||
1686 | SYSC_HAS_AUTOIDLE), | ||
1687 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | ||
1688 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
1689 | }; | ||
1690 | |||
1691 | static struct omap_hwmod_class omap3xxx_rfbi_hwmod_class = { | ||
1692 | .name = "rfbi", | ||
1693 | .sysc = &omap3xxx_rfbi_sysc, | ||
1694 | }; | ||
1695 | |||
1696 | static struct omap_hwmod_addr_space omap3xxx_dss_rfbi_addrs[] = { | ||
1697 | { | ||
1698 | .pa_start = 0x48050800, | ||
1699 | .pa_end = 0x48050BFF, | ||
1700 | .flags = ADDR_TYPE_RT | ||
1701 | }, | ||
1702 | }; | ||
1703 | |||
1704 | /* l4_core -> dss_rfbi */ | ||
1705 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_rfbi = { | ||
1706 | .master = &omap3xxx_l4_core_hwmod, | ||
1707 | .slave = &omap3xxx_dss_rfbi_hwmod, | ||
1708 | .clk = "dss_ick", | ||
1709 | .addr = omap3xxx_dss_rfbi_addrs, | ||
1710 | .addr_cnt = ARRAY_SIZE(omap3xxx_dss_rfbi_addrs), | ||
1711 | .fw = { | ||
1712 | .omap2 = { | ||
1713 | .l4_fw_region = OMAP3_L4_CORE_FW_DSS_RFBI_REGION, | ||
1714 | .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP , | ||
1715 | .flags = OMAP_FIREWALL_L4, | ||
1716 | } | ||
1717 | }, | ||
1718 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
1719 | }; | ||
1720 | |||
1721 | /* dss_rfbi slave ports */ | ||
1722 | static struct omap_hwmod_ocp_if *omap3xxx_dss_rfbi_slaves[] = { | ||
1723 | &omap3xxx_l4_core__dss_rfbi, | ||
1724 | }; | ||
1725 | |||
1726 | static struct omap_hwmod omap3xxx_dss_rfbi_hwmod = { | ||
1727 | .name = "dss_rfbi", | ||
1728 | .class = &omap3xxx_rfbi_hwmod_class, | ||
1729 | .main_clk = "dss1_alwon_fck", | ||
1730 | .prcm = { | ||
1731 | .omap2 = { | ||
1732 | .prcm_reg_id = 1, | ||
1733 | .module_bit = OMAP3430_EN_DSS1_SHIFT, | ||
1734 | .module_offs = OMAP3430_DSS_MOD, | ||
1735 | }, | ||
1736 | }, | ||
1737 | .slaves = omap3xxx_dss_rfbi_slaves, | ||
1738 | .slaves_cnt = ARRAY_SIZE(omap3xxx_dss_rfbi_slaves), | ||
1739 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES1 | | ||
1740 | CHIP_GE_OMAP3430ES2 | CHIP_IS_OMAP3630ES1 | | ||
1741 | CHIP_GE_OMAP3630ES1_1), | ||
1742 | .flags = HWMOD_NO_IDLEST, | ||
1743 | }; | ||
1744 | |||
1745 | /* | ||
1746 | * 'venc' class | ||
1747 | * video encoder | ||
1748 | */ | ||
1749 | |||
1750 | static struct omap_hwmod_class omap3xxx_venc_hwmod_class = { | ||
1751 | .name = "venc", | ||
1752 | }; | ||
1753 | |||
1754 | /* dss_venc */ | ||
1755 | static struct omap_hwmod_addr_space omap3xxx_dss_venc_addrs[] = { | ||
1756 | { | ||
1757 | .pa_start = 0x48050C00, | ||
1758 | .pa_end = 0x48050FFF, | ||
1759 | .flags = ADDR_TYPE_RT | ||
1760 | }, | ||
1761 | }; | ||
1762 | |||
1763 | /* l4_core -> dss_venc */ | ||
1764 | static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_venc = { | ||
1765 | .master = &omap3xxx_l4_core_hwmod, | ||
1766 | .slave = &omap3xxx_dss_venc_hwmod, | ||
1767 | .clk = "dss_tv_fck", | ||
1768 | .addr = omap3xxx_dss_venc_addrs, | ||
1769 | .addr_cnt = ARRAY_SIZE(omap3xxx_dss_venc_addrs), | ||
1770 | .fw = { | ||
1771 | .omap2 = { | ||
1772 | .l4_fw_region = OMAP3_L4_CORE_FW_DSS_VENC_REGION, | ||
1773 | .l4_prot_group = OMAP3_L4_CORE_FW_DSS_PROT_GROUP, | ||
1774 | .flags = OMAP_FIREWALL_L4, | ||
1775 | } | ||
1776 | }, | ||
1777 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
1778 | }; | ||
1779 | |||
1780 | /* dss_venc slave ports */ | ||
1781 | static struct omap_hwmod_ocp_if *omap3xxx_dss_venc_slaves[] = { | ||
1782 | &omap3xxx_l4_core__dss_venc, | ||
1783 | }; | ||
1784 | |||
1785 | static struct omap_hwmod omap3xxx_dss_venc_hwmod = { | ||
1786 | .name = "dss_venc", | ||
1787 | .class = &omap3xxx_venc_hwmod_class, | ||
1788 | .main_clk = "dss1_alwon_fck", | ||
1789 | .prcm = { | ||
1790 | .omap2 = { | ||
1791 | .prcm_reg_id = 1, | ||
1792 | .module_bit = OMAP3430_EN_DSS1_SHIFT, | ||
1793 | .module_offs = OMAP3430_DSS_MOD, | ||
1794 | }, | ||
1795 | }, | ||
1796 | .slaves = omap3xxx_dss_venc_slaves, | ||
1797 | .slaves_cnt = ARRAY_SIZE(omap3xxx_dss_venc_slaves), | ||
1798 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES1 | | ||
1799 | CHIP_GE_OMAP3430ES2 | CHIP_IS_OMAP3630ES1 | | ||
1800 | CHIP_GE_OMAP3630ES1_1), | ||
1801 | .flags = HWMOD_NO_IDLEST, | ||
1802 | }; | ||
1803 | |||
667 | /* I2C1 */ | 1804 | /* I2C1 */ |
668 | 1805 | ||
669 | static struct omap_i2c_dev_attr i2c1_dev_attr = { | 1806 | static struct omap_i2c_dev_attr i2c1_dev_attr = { |
@@ -1356,6 +2493,360 @@ static struct omap_hwmod omap36xx_sr2_hwmod = { | |||
1356 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3630ES1), | 2493 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3630ES1), |
1357 | }; | 2494 | }; |
1358 | 2495 | ||
2496 | /* l4 core -> mcspi1 interface */ | ||
2497 | static struct omap_hwmod_addr_space omap34xx_mcspi1_addr_space[] = { | ||
2498 | { | ||
2499 | .pa_start = 0x48098000, | ||
2500 | .pa_end = 0x480980ff, | ||
2501 | .flags = ADDR_TYPE_RT, | ||
2502 | }, | ||
2503 | }; | ||
2504 | |||
2505 | static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi1 = { | ||
2506 | .master = &omap3xxx_l4_core_hwmod, | ||
2507 | .slave = &omap34xx_mcspi1, | ||
2508 | .clk = "mcspi1_ick", | ||
2509 | .addr = omap34xx_mcspi1_addr_space, | ||
2510 | .addr_cnt = ARRAY_SIZE(omap34xx_mcspi1_addr_space), | ||
2511 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2512 | }; | ||
2513 | |||
2514 | /* l4 core -> mcspi2 interface */ | ||
2515 | static struct omap_hwmod_addr_space omap34xx_mcspi2_addr_space[] = { | ||
2516 | { | ||
2517 | .pa_start = 0x4809a000, | ||
2518 | .pa_end = 0x4809a0ff, | ||
2519 | .flags = ADDR_TYPE_RT, | ||
2520 | }, | ||
2521 | }; | ||
2522 | |||
2523 | static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi2 = { | ||
2524 | .master = &omap3xxx_l4_core_hwmod, | ||
2525 | .slave = &omap34xx_mcspi2, | ||
2526 | .clk = "mcspi2_ick", | ||
2527 | .addr = omap34xx_mcspi2_addr_space, | ||
2528 | .addr_cnt = ARRAY_SIZE(omap34xx_mcspi2_addr_space), | ||
2529 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2530 | }; | ||
2531 | |||
2532 | /* l4 core -> mcspi3 interface */ | ||
2533 | static struct omap_hwmod_addr_space omap34xx_mcspi3_addr_space[] = { | ||
2534 | { | ||
2535 | .pa_start = 0x480b8000, | ||
2536 | .pa_end = 0x480b80ff, | ||
2537 | .flags = ADDR_TYPE_RT, | ||
2538 | }, | ||
2539 | }; | ||
2540 | |||
2541 | static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi3 = { | ||
2542 | .master = &omap3xxx_l4_core_hwmod, | ||
2543 | .slave = &omap34xx_mcspi3, | ||
2544 | .clk = "mcspi3_ick", | ||
2545 | .addr = omap34xx_mcspi3_addr_space, | ||
2546 | .addr_cnt = ARRAY_SIZE(omap34xx_mcspi3_addr_space), | ||
2547 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2548 | }; | ||
2549 | |||
2550 | /* l4 core -> mcspi4 interface */ | ||
2551 | static struct omap_hwmod_addr_space omap34xx_mcspi4_addr_space[] = { | ||
2552 | { | ||
2553 | .pa_start = 0x480ba000, | ||
2554 | .pa_end = 0x480ba0ff, | ||
2555 | .flags = ADDR_TYPE_RT, | ||
2556 | }, | ||
2557 | }; | ||
2558 | |||
2559 | static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi4 = { | ||
2560 | .master = &omap3xxx_l4_core_hwmod, | ||
2561 | .slave = &omap34xx_mcspi4, | ||
2562 | .clk = "mcspi4_ick", | ||
2563 | .addr = omap34xx_mcspi4_addr_space, | ||
2564 | .addr_cnt = ARRAY_SIZE(omap34xx_mcspi4_addr_space), | ||
2565 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2566 | }; | ||
2567 | |||
2568 | /* | ||
2569 | * 'mcspi' class | ||
2570 | * multichannel serial port interface (mcspi) / master/slave synchronous serial | ||
2571 | * bus | ||
2572 | */ | ||
2573 | |||
2574 | static struct omap_hwmod_class_sysconfig omap34xx_mcspi_sysc = { | ||
2575 | .rev_offs = 0x0000, | ||
2576 | .sysc_offs = 0x0010, | ||
2577 | .syss_offs = 0x0014, | ||
2578 | .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE | | ||
2579 | SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET | | ||
2580 | SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS), | ||
2581 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | ||
2582 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
2583 | }; | ||
2584 | |||
2585 | static struct omap_hwmod_class omap34xx_mcspi_class = { | ||
2586 | .name = "mcspi", | ||
2587 | .sysc = &omap34xx_mcspi_sysc, | ||
2588 | .rev = OMAP3_MCSPI_REV, | ||
2589 | }; | ||
2590 | |||
2591 | /* mcspi1 */ | ||
2592 | static struct omap_hwmod_irq_info omap34xx_mcspi1_mpu_irqs[] = { | ||
2593 | { .name = "irq", .irq = 65 }, | ||
2594 | }; | ||
2595 | |||
2596 | static struct omap_hwmod_dma_info omap34xx_mcspi1_sdma_reqs[] = { | ||
2597 | { .name = "tx0", .dma_req = 35 }, | ||
2598 | { .name = "rx0", .dma_req = 36 }, | ||
2599 | { .name = "tx1", .dma_req = 37 }, | ||
2600 | { .name = "rx1", .dma_req = 38 }, | ||
2601 | { .name = "tx2", .dma_req = 39 }, | ||
2602 | { .name = "rx2", .dma_req = 40 }, | ||
2603 | { .name = "tx3", .dma_req = 41 }, | ||
2604 | { .name = "rx3", .dma_req = 42 }, | ||
2605 | }; | ||
2606 | |||
2607 | static struct omap_hwmod_ocp_if *omap34xx_mcspi1_slaves[] = { | ||
2608 | &omap34xx_l4_core__mcspi1, | ||
2609 | }; | ||
2610 | |||
2611 | static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = { | ||
2612 | .num_chipselect = 4, | ||
2613 | }; | ||
2614 | |||
2615 | static struct omap_hwmod omap34xx_mcspi1 = { | ||
2616 | .name = "mcspi1", | ||
2617 | .mpu_irqs = omap34xx_mcspi1_mpu_irqs, | ||
2618 | .mpu_irqs_cnt = ARRAY_SIZE(omap34xx_mcspi1_mpu_irqs), | ||
2619 | .sdma_reqs = omap34xx_mcspi1_sdma_reqs, | ||
2620 | .sdma_reqs_cnt = ARRAY_SIZE(omap34xx_mcspi1_sdma_reqs), | ||
2621 | .main_clk = "mcspi1_fck", | ||
2622 | .prcm = { | ||
2623 | .omap2 = { | ||
2624 | .module_offs = CORE_MOD, | ||
2625 | .prcm_reg_id = 1, | ||
2626 | .module_bit = OMAP3430_EN_MCSPI1_SHIFT, | ||
2627 | .idlest_reg_id = 1, | ||
2628 | .idlest_idle_bit = OMAP3430_ST_MCSPI1_SHIFT, | ||
2629 | }, | ||
2630 | }, | ||
2631 | .slaves = omap34xx_mcspi1_slaves, | ||
2632 | .slaves_cnt = ARRAY_SIZE(omap34xx_mcspi1_slaves), | ||
2633 | .class = &omap34xx_mcspi_class, | ||
2634 | .dev_attr = &omap_mcspi1_dev_attr, | ||
2635 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430), | ||
2636 | }; | ||
2637 | |||
2638 | /* mcspi2 */ | ||
2639 | static struct omap_hwmod_irq_info omap34xx_mcspi2_mpu_irqs[] = { | ||
2640 | { .name = "irq", .irq = 66 }, | ||
2641 | }; | ||
2642 | |||
2643 | static struct omap_hwmod_dma_info omap34xx_mcspi2_sdma_reqs[] = { | ||
2644 | { .name = "tx0", .dma_req = 43 }, | ||
2645 | { .name = "rx0", .dma_req = 44 }, | ||
2646 | { .name = "tx1", .dma_req = 45 }, | ||
2647 | { .name = "rx1", .dma_req = 46 }, | ||
2648 | }; | ||
2649 | |||
2650 | static struct omap_hwmod_ocp_if *omap34xx_mcspi2_slaves[] = { | ||
2651 | &omap34xx_l4_core__mcspi2, | ||
2652 | }; | ||
2653 | |||
2654 | static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = { | ||
2655 | .num_chipselect = 2, | ||
2656 | }; | ||
2657 | |||
2658 | static struct omap_hwmod omap34xx_mcspi2 = { | ||
2659 | .name = "mcspi2", | ||
2660 | .mpu_irqs = omap34xx_mcspi2_mpu_irqs, | ||
2661 | .mpu_irqs_cnt = ARRAY_SIZE(omap34xx_mcspi2_mpu_irqs), | ||
2662 | .sdma_reqs = omap34xx_mcspi2_sdma_reqs, | ||
2663 | .sdma_reqs_cnt = ARRAY_SIZE(omap34xx_mcspi2_sdma_reqs), | ||
2664 | .main_clk = "mcspi2_fck", | ||
2665 | .prcm = { | ||
2666 | .omap2 = { | ||
2667 | .module_offs = CORE_MOD, | ||
2668 | .prcm_reg_id = 1, | ||
2669 | .module_bit = OMAP3430_EN_MCSPI2_SHIFT, | ||
2670 | .idlest_reg_id = 1, | ||
2671 | .idlest_idle_bit = OMAP3430_ST_MCSPI2_SHIFT, | ||
2672 | }, | ||
2673 | }, | ||
2674 | .slaves = omap34xx_mcspi2_slaves, | ||
2675 | .slaves_cnt = ARRAY_SIZE(omap34xx_mcspi2_slaves), | ||
2676 | .class = &omap34xx_mcspi_class, | ||
2677 | .dev_attr = &omap_mcspi2_dev_attr, | ||
2678 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430), | ||
2679 | }; | ||
2680 | |||
2681 | /* mcspi3 */ | ||
2682 | static struct omap_hwmod_irq_info omap34xx_mcspi3_mpu_irqs[] = { | ||
2683 | { .name = "irq", .irq = 91 }, /* 91 */ | ||
2684 | }; | ||
2685 | |||
2686 | static struct omap_hwmod_dma_info omap34xx_mcspi3_sdma_reqs[] = { | ||
2687 | { .name = "tx0", .dma_req = 15 }, | ||
2688 | { .name = "rx0", .dma_req = 16 }, | ||
2689 | { .name = "tx1", .dma_req = 23 }, | ||
2690 | { .name = "rx1", .dma_req = 24 }, | ||
2691 | }; | ||
2692 | |||
2693 | static struct omap_hwmod_ocp_if *omap34xx_mcspi3_slaves[] = { | ||
2694 | &omap34xx_l4_core__mcspi3, | ||
2695 | }; | ||
2696 | |||
2697 | static struct omap2_mcspi_dev_attr omap_mcspi3_dev_attr = { | ||
2698 | .num_chipselect = 2, | ||
2699 | }; | ||
2700 | |||
2701 | static struct omap_hwmod omap34xx_mcspi3 = { | ||
2702 | .name = "mcspi3", | ||
2703 | .mpu_irqs = omap34xx_mcspi3_mpu_irqs, | ||
2704 | .mpu_irqs_cnt = ARRAY_SIZE(omap34xx_mcspi3_mpu_irqs), | ||
2705 | .sdma_reqs = omap34xx_mcspi3_sdma_reqs, | ||
2706 | .sdma_reqs_cnt = ARRAY_SIZE(omap34xx_mcspi3_sdma_reqs), | ||
2707 | .main_clk = "mcspi3_fck", | ||
2708 | .prcm = { | ||
2709 | .omap2 = { | ||
2710 | .module_offs = CORE_MOD, | ||
2711 | .prcm_reg_id = 1, | ||
2712 | .module_bit = OMAP3430_EN_MCSPI3_SHIFT, | ||
2713 | .idlest_reg_id = 1, | ||
2714 | .idlest_idle_bit = OMAP3430_ST_MCSPI3_SHIFT, | ||
2715 | }, | ||
2716 | }, | ||
2717 | .slaves = omap34xx_mcspi3_slaves, | ||
2718 | .slaves_cnt = ARRAY_SIZE(omap34xx_mcspi3_slaves), | ||
2719 | .class = &omap34xx_mcspi_class, | ||
2720 | .dev_attr = &omap_mcspi3_dev_attr, | ||
2721 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430), | ||
2722 | }; | ||
2723 | |||
2724 | /* SPI4 */ | ||
2725 | static struct omap_hwmod_irq_info omap34xx_mcspi4_mpu_irqs[] = { | ||
2726 | { .name = "irq", .irq = INT_34XX_SPI4_IRQ }, /* 48 */ | ||
2727 | }; | ||
2728 | |||
2729 | static struct omap_hwmod_dma_info omap34xx_mcspi4_sdma_reqs[] = { | ||
2730 | { .name = "tx0", .dma_req = 70 }, /* DMA_SPI4_TX0 */ | ||
2731 | { .name = "rx0", .dma_req = 71 }, /* DMA_SPI4_RX0 */ | ||
2732 | }; | ||
2733 | |||
2734 | static struct omap_hwmod_ocp_if *omap34xx_mcspi4_slaves[] = { | ||
2735 | &omap34xx_l4_core__mcspi4, | ||
2736 | }; | ||
2737 | |||
2738 | static struct omap2_mcspi_dev_attr omap_mcspi4_dev_attr = { | ||
2739 | .num_chipselect = 1, | ||
2740 | }; | ||
2741 | |||
2742 | static struct omap_hwmod omap34xx_mcspi4 = { | ||
2743 | .name = "mcspi4", | ||
2744 | .mpu_irqs = omap34xx_mcspi4_mpu_irqs, | ||
2745 | .mpu_irqs_cnt = ARRAY_SIZE(omap34xx_mcspi4_mpu_irqs), | ||
2746 | .sdma_reqs = omap34xx_mcspi4_sdma_reqs, | ||
2747 | .sdma_reqs_cnt = ARRAY_SIZE(omap34xx_mcspi4_sdma_reqs), | ||
2748 | .main_clk = "mcspi4_fck", | ||
2749 | .prcm = { | ||
2750 | .omap2 = { | ||
2751 | .module_offs = CORE_MOD, | ||
2752 | .prcm_reg_id = 1, | ||
2753 | .module_bit = OMAP3430_EN_MCSPI4_SHIFT, | ||
2754 | .idlest_reg_id = 1, | ||
2755 | .idlest_idle_bit = OMAP3430_ST_MCSPI4_SHIFT, | ||
2756 | }, | ||
2757 | }, | ||
2758 | .slaves = omap34xx_mcspi4_slaves, | ||
2759 | .slaves_cnt = ARRAY_SIZE(omap34xx_mcspi4_slaves), | ||
2760 | .class = &omap34xx_mcspi_class, | ||
2761 | .dev_attr = &omap_mcspi4_dev_attr, | ||
2762 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430), | ||
2763 | }; | ||
2764 | |||
2765 | /* | ||
2766 | * usbhsotg | ||
2767 | */ | ||
2768 | static struct omap_hwmod_class_sysconfig omap3xxx_usbhsotg_sysc = { | ||
2769 | .rev_offs = 0x0400, | ||
2770 | .sysc_offs = 0x0404, | ||
2771 | .syss_offs = 0x0408, | ||
2772 | .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE| | ||
2773 | SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET | | ||
2774 | SYSC_HAS_AUTOIDLE), | ||
2775 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | | ||
2776 | MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART), | ||
2777 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
2778 | }; | ||
2779 | |||
2780 | static struct omap_hwmod_class usbotg_class = { | ||
2781 | .name = "usbotg", | ||
2782 | .sysc = &omap3xxx_usbhsotg_sysc, | ||
2783 | }; | ||
2784 | /* usb_otg_hs */ | ||
2785 | static struct omap_hwmod_irq_info omap3xxx_usbhsotg_mpu_irqs[] = { | ||
2786 | |||
2787 | { .name = "mc", .irq = 92 }, | ||
2788 | { .name = "dma", .irq = 93 }, | ||
2789 | }; | ||
2790 | |||
2791 | static struct omap_hwmod omap3xxx_usbhsotg_hwmod = { | ||
2792 | .name = "usb_otg_hs", | ||
2793 | .mpu_irqs = omap3xxx_usbhsotg_mpu_irqs, | ||
2794 | .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_usbhsotg_mpu_irqs), | ||
2795 | .main_clk = "hsotgusb_ick", | ||
2796 | .prcm = { | ||
2797 | .omap2 = { | ||
2798 | .prcm_reg_id = 1, | ||
2799 | .module_bit = OMAP3430_EN_HSOTGUSB_SHIFT, | ||
2800 | .module_offs = CORE_MOD, | ||
2801 | .idlest_reg_id = 1, | ||
2802 | .idlest_idle_bit = OMAP3430ES2_ST_HSOTGUSB_IDLE_SHIFT, | ||
2803 | .idlest_stdby_bit = OMAP3430ES2_ST_HSOTGUSB_STDBY_SHIFT | ||
2804 | }, | ||
2805 | }, | ||
2806 | .masters = omap3xxx_usbhsotg_masters, | ||
2807 | .masters_cnt = ARRAY_SIZE(omap3xxx_usbhsotg_masters), | ||
2808 | .slaves = omap3xxx_usbhsotg_slaves, | ||
2809 | .slaves_cnt = ARRAY_SIZE(omap3xxx_usbhsotg_slaves), | ||
2810 | .class = &usbotg_class, | ||
2811 | |||
2812 | /* | ||
2813 | * Erratum ID: i479 idle_req / idle_ack mechanism potentially | ||
2814 | * broken when autoidle is enabled | ||
2815 | * workaround is to disable the autoidle bit at module level. | ||
2816 | */ | ||
2817 | .flags = HWMOD_NO_OCP_AUTOIDLE | HWMOD_SWSUP_SIDLE | ||
2818 | | HWMOD_SWSUP_MSTANDBY, | ||
2819 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430) | ||
2820 | }; | ||
2821 | |||
2822 | /* usb_otg_hs */ | ||
2823 | static struct omap_hwmod_irq_info am35xx_usbhsotg_mpu_irqs[] = { | ||
2824 | |||
2825 | { .name = "mc", .irq = 71 }, | ||
2826 | }; | ||
2827 | |||
2828 | static struct omap_hwmod_class am35xx_usbotg_class = { | ||
2829 | .name = "am35xx_usbotg", | ||
2830 | .sysc = NULL, | ||
2831 | }; | ||
2832 | |||
2833 | static struct omap_hwmod am35xx_usbhsotg_hwmod = { | ||
2834 | .name = "am35x_otg_hs", | ||
2835 | .mpu_irqs = am35xx_usbhsotg_mpu_irqs, | ||
2836 | .mpu_irqs_cnt = ARRAY_SIZE(am35xx_usbhsotg_mpu_irqs), | ||
2837 | .main_clk = NULL, | ||
2838 | .prcm = { | ||
2839 | .omap2 = { | ||
2840 | }, | ||
2841 | }, | ||
2842 | .masters = am35xx_usbhsotg_masters, | ||
2843 | .masters_cnt = ARRAY_SIZE(am35xx_usbhsotg_masters), | ||
2844 | .slaves = am35xx_usbhsotg_slaves, | ||
2845 | .slaves_cnt = ARRAY_SIZE(am35xx_usbhsotg_slaves), | ||
2846 | .class = &am35xx_usbotg_class, | ||
2847 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES3_1) | ||
2848 | }; | ||
2849 | |||
1359 | static __initdata struct omap_hwmod *omap3xxx_hwmods[] = { | 2850 | static __initdata struct omap_hwmod *omap3xxx_hwmods[] = { |
1360 | &omap3xxx_l3_main_hwmod, | 2851 | &omap3xxx_l3_main_hwmod, |
1361 | &omap3xxx_l4_core_hwmod, | 2852 | &omap3xxx_l4_core_hwmod, |
@@ -1363,11 +2854,34 @@ static __initdata struct omap_hwmod *omap3xxx_hwmods[] = { | |||
1363 | &omap3xxx_l4_wkup_hwmod, | 2854 | &omap3xxx_l4_wkup_hwmod, |
1364 | &omap3xxx_mpu_hwmod, | 2855 | &omap3xxx_mpu_hwmod, |
1365 | &omap3xxx_iva_hwmod, | 2856 | &omap3xxx_iva_hwmod, |
2857 | |||
2858 | &omap3xxx_timer1_hwmod, | ||
2859 | &omap3xxx_timer2_hwmod, | ||
2860 | &omap3xxx_timer3_hwmod, | ||
2861 | &omap3xxx_timer4_hwmod, | ||
2862 | &omap3xxx_timer5_hwmod, | ||
2863 | &omap3xxx_timer6_hwmod, | ||
2864 | &omap3xxx_timer7_hwmod, | ||
2865 | &omap3xxx_timer8_hwmod, | ||
2866 | &omap3xxx_timer9_hwmod, | ||
2867 | &omap3xxx_timer10_hwmod, | ||
2868 | &omap3xxx_timer11_hwmod, | ||
2869 | &omap3xxx_timer12_hwmod, | ||
2870 | |||
1366 | &omap3xxx_wd_timer2_hwmod, | 2871 | &omap3xxx_wd_timer2_hwmod, |
1367 | &omap3xxx_uart1_hwmod, | 2872 | &omap3xxx_uart1_hwmod, |
1368 | &omap3xxx_uart2_hwmod, | 2873 | &omap3xxx_uart2_hwmod, |
1369 | &omap3xxx_uart3_hwmod, | 2874 | &omap3xxx_uart3_hwmod, |
1370 | &omap3xxx_uart4_hwmod, | 2875 | &omap3xxx_uart4_hwmod, |
2876 | /* dss class */ | ||
2877 | &omap3430es1_dss_core_hwmod, | ||
2878 | &omap3xxx_dss_core_hwmod, | ||
2879 | &omap3xxx_dss_dispc_hwmod, | ||
2880 | &omap3xxx_dss_dsi1_hwmod, | ||
2881 | &omap3xxx_dss_rfbi_hwmod, | ||
2882 | &omap3xxx_dss_venc_hwmod, | ||
2883 | |||
2884 | /* i2c class */ | ||
1371 | &omap3xxx_i2c1_hwmod, | 2885 | &omap3xxx_i2c1_hwmod, |
1372 | &omap3xxx_i2c2_hwmod, | 2886 | &omap3xxx_i2c2_hwmod, |
1373 | &omap3xxx_i2c3_hwmod, | 2887 | &omap3xxx_i2c3_hwmod, |
@@ -1387,10 +2901,23 @@ static __initdata struct omap_hwmod *omap3xxx_hwmods[] = { | |||
1387 | 2901 | ||
1388 | /* dma_system class*/ | 2902 | /* dma_system class*/ |
1389 | &omap3xxx_dma_system_hwmod, | 2903 | &omap3xxx_dma_system_hwmod, |
2904 | |||
2905 | /* mcspi class */ | ||
2906 | &omap34xx_mcspi1, | ||
2907 | &omap34xx_mcspi2, | ||
2908 | &omap34xx_mcspi3, | ||
2909 | &omap34xx_mcspi4, | ||
2910 | |||
2911 | /* usbotg class */ | ||
2912 | &omap3xxx_usbhsotg_hwmod, | ||
2913 | |||
2914 | /* usbotg for am35x */ | ||
2915 | &am35xx_usbhsotg_hwmod, | ||
2916 | |||
1390 | NULL, | 2917 | NULL, |
1391 | }; | 2918 | }; |
1392 | 2919 | ||
1393 | int __init omap3xxx_hwmod_init(void) | 2920 | int __init omap3xxx_hwmod_init(void) |
1394 | { | 2921 | { |
1395 | return omap_hwmod_init(omap3xxx_hwmods); | 2922 | return omap_hwmod_register(omap3xxx_hwmods); |
1396 | } | 2923 | } |
diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c index c2806bd11fbf..2c5882792e01 100644 --- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Hardware modules present on the OMAP44xx chips | 2 | * Hardware modules present on the OMAP44xx chips |
3 | * | 3 | * |
4 | * Copyright (C) 2009-2010 Texas Instruments, Inc. | 4 | * Copyright (C) 2009-2011 Texas Instruments, Inc. |
5 | * Copyright (C) 2009-2010 Nokia Corporation | 5 | * Copyright (C) 2009-2010 Nokia Corporation |
6 | * | 6 | * |
7 | * Paul Walmsley | 7 | * Paul Walmsley |
@@ -24,6 +24,7 @@ | |||
24 | #include <plat/cpu.h> | 24 | #include <plat/cpu.h> |
25 | #include <plat/gpio.h> | 25 | #include <plat/gpio.h> |
26 | #include <plat/dma.h> | 26 | #include <plat/dma.h> |
27 | #include <plat/mcspi.h> | ||
27 | 28 | ||
28 | #include "omap_hwmod_common_data.h" | 29 | #include "omap_hwmod_common_data.h" |
29 | 30 | ||
@@ -40,10 +41,15 @@ | |||
40 | #define OMAP44XX_DMA_REQ_START 1 | 41 | #define OMAP44XX_DMA_REQ_START 1 |
41 | 42 | ||
42 | /* Backward references (IPs with Bus Master capability) */ | 43 | /* Backward references (IPs with Bus Master capability) */ |
44 | static struct omap_hwmod omap44xx_aess_hwmod; | ||
43 | static struct omap_hwmod omap44xx_dma_system_hwmod; | 45 | static struct omap_hwmod omap44xx_dma_system_hwmod; |
44 | static struct omap_hwmod omap44xx_dmm_hwmod; | 46 | static struct omap_hwmod omap44xx_dmm_hwmod; |
45 | static struct omap_hwmod omap44xx_dsp_hwmod; | 47 | static struct omap_hwmod omap44xx_dsp_hwmod; |
48 | static struct omap_hwmod omap44xx_dss_hwmod; | ||
46 | static struct omap_hwmod omap44xx_emif_fw_hwmod; | 49 | static struct omap_hwmod omap44xx_emif_fw_hwmod; |
50 | static struct omap_hwmod omap44xx_hsi_hwmod; | ||
51 | static struct omap_hwmod omap44xx_ipu_hwmod; | ||
52 | static struct omap_hwmod omap44xx_iss_hwmod; | ||
47 | static struct omap_hwmod omap44xx_iva_hwmod; | 53 | static struct omap_hwmod omap44xx_iva_hwmod; |
48 | static struct omap_hwmod omap44xx_l3_instr_hwmod; | 54 | static struct omap_hwmod omap44xx_l3_instr_hwmod; |
49 | static struct omap_hwmod omap44xx_l3_main_1_hwmod; | 55 | static struct omap_hwmod omap44xx_l3_main_1_hwmod; |
@@ -53,8 +59,11 @@ static struct omap_hwmod omap44xx_l4_abe_hwmod; | |||
53 | static struct omap_hwmod omap44xx_l4_cfg_hwmod; | 59 | static struct omap_hwmod omap44xx_l4_cfg_hwmod; |
54 | static struct omap_hwmod omap44xx_l4_per_hwmod; | 60 | static struct omap_hwmod omap44xx_l4_per_hwmod; |
55 | static struct omap_hwmod omap44xx_l4_wkup_hwmod; | 61 | static struct omap_hwmod omap44xx_l4_wkup_hwmod; |
62 | static struct omap_hwmod omap44xx_mmc1_hwmod; | ||
63 | static struct omap_hwmod omap44xx_mmc2_hwmod; | ||
56 | static struct omap_hwmod omap44xx_mpu_hwmod; | 64 | static struct omap_hwmod omap44xx_mpu_hwmod; |
57 | static struct omap_hwmod omap44xx_mpu_private_hwmod; | 65 | static struct omap_hwmod omap44xx_mpu_private_hwmod; |
66 | static struct omap_hwmod omap44xx_usb_otg_hs_hwmod; | ||
58 | 67 | ||
59 | /* | 68 | /* |
60 | * Interconnects omap_hwmod structures | 69 | * Interconnects omap_hwmod structures |
@@ -213,6 +222,14 @@ static struct omap_hwmod_ocp_if omap44xx_dsp__l3_main_1 = { | |||
213 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 222 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
214 | }; | 223 | }; |
215 | 224 | ||
225 | /* dss -> l3_main_1 */ | ||
226 | static struct omap_hwmod_ocp_if omap44xx_dss__l3_main_1 = { | ||
227 | .master = &omap44xx_dss_hwmod, | ||
228 | .slave = &omap44xx_l3_main_1_hwmod, | ||
229 | .clk = "l3_div_ck", | ||
230 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
231 | }; | ||
232 | |||
216 | /* l3_main_2 -> l3_main_1 */ | 233 | /* l3_main_2 -> l3_main_1 */ |
217 | static struct omap_hwmod_ocp_if omap44xx_l3_main_2__l3_main_1 = { | 234 | static struct omap_hwmod_ocp_if omap44xx_l3_main_2__l3_main_1 = { |
218 | .master = &omap44xx_l3_main_2_hwmod, | 235 | .master = &omap44xx_l3_main_2_hwmod, |
@@ -229,6 +246,22 @@ static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l3_main_1 = { | |||
229 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 246 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
230 | }; | 247 | }; |
231 | 248 | ||
249 | /* mmc1 -> l3_main_1 */ | ||
250 | static struct omap_hwmod_ocp_if omap44xx_mmc1__l3_main_1 = { | ||
251 | .master = &omap44xx_mmc1_hwmod, | ||
252 | .slave = &omap44xx_l3_main_1_hwmod, | ||
253 | .clk = "l3_div_ck", | ||
254 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
255 | }; | ||
256 | |||
257 | /* mmc2 -> l3_main_1 */ | ||
258 | static struct omap_hwmod_ocp_if omap44xx_mmc2__l3_main_1 = { | ||
259 | .master = &omap44xx_mmc2_hwmod, | ||
260 | .slave = &omap44xx_l3_main_1_hwmod, | ||
261 | .clk = "l3_div_ck", | ||
262 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
263 | }; | ||
264 | |||
232 | /* mpu -> l3_main_1 */ | 265 | /* mpu -> l3_main_1 */ |
233 | static struct omap_hwmod_ocp_if omap44xx_mpu__l3_main_1 = { | 266 | static struct omap_hwmod_ocp_if omap44xx_mpu__l3_main_1 = { |
234 | .master = &omap44xx_mpu_hwmod, | 267 | .master = &omap44xx_mpu_hwmod, |
@@ -240,8 +273,11 @@ static struct omap_hwmod_ocp_if omap44xx_mpu__l3_main_1 = { | |||
240 | /* l3_main_1 slave ports */ | 273 | /* l3_main_1 slave ports */ |
241 | static struct omap_hwmod_ocp_if *omap44xx_l3_main_1_slaves[] = { | 274 | static struct omap_hwmod_ocp_if *omap44xx_l3_main_1_slaves[] = { |
242 | &omap44xx_dsp__l3_main_1, | 275 | &omap44xx_dsp__l3_main_1, |
276 | &omap44xx_dss__l3_main_1, | ||
243 | &omap44xx_l3_main_2__l3_main_1, | 277 | &omap44xx_l3_main_2__l3_main_1, |
244 | &omap44xx_l4_cfg__l3_main_1, | 278 | &omap44xx_l4_cfg__l3_main_1, |
279 | &omap44xx_mmc1__l3_main_1, | ||
280 | &omap44xx_mmc2__l3_main_1, | ||
245 | &omap44xx_mpu__l3_main_1, | 281 | &omap44xx_mpu__l3_main_1, |
246 | }; | 282 | }; |
247 | 283 | ||
@@ -262,6 +298,30 @@ static struct omap_hwmod_ocp_if omap44xx_dma_system__l3_main_2 = { | |||
262 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 298 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
263 | }; | 299 | }; |
264 | 300 | ||
301 | /* hsi -> l3_main_2 */ | ||
302 | static struct omap_hwmod_ocp_if omap44xx_hsi__l3_main_2 = { | ||
303 | .master = &omap44xx_hsi_hwmod, | ||
304 | .slave = &omap44xx_l3_main_2_hwmod, | ||
305 | .clk = "l3_div_ck", | ||
306 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
307 | }; | ||
308 | |||
309 | /* ipu -> l3_main_2 */ | ||
310 | static struct omap_hwmod_ocp_if omap44xx_ipu__l3_main_2 = { | ||
311 | .master = &omap44xx_ipu_hwmod, | ||
312 | .slave = &omap44xx_l3_main_2_hwmod, | ||
313 | .clk = "l3_div_ck", | ||
314 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
315 | }; | ||
316 | |||
317 | /* iss -> l3_main_2 */ | ||
318 | static struct omap_hwmod_ocp_if omap44xx_iss__l3_main_2 = { | ||
319 | .master = &omap44xx_iss_hwmod, | ||
320 | .slave = &omap44xx_l3_main_2_hwmod, | ||
321 | .clk = "l3_div_ck", | ||
322 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
323 | }; | ||
324 | |||
265 | /* iva -> l3_main_2 */ | 325 | /* iva -> l3_main_2 */ |
266 | static struct omap_hwmod_ocp_if omap44xx_iva__l3_main_2 = { | 326 | static struct omap_hwmod_ocp_if omap44xx_iva__l3_main_2 = { |
267 | .master = &omap44xx_iva_hwmod, | 327 | .master = &omap44xx_iva_hwmod, |
@@ -286,12 +346,24 @@ static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l3_main_2 = { | |||
286 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 346 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
287 | }; | 347 | }; |
288 | 348 | ||
349 | /* usb_otg_hs -> l3_main_2 */ | ||
350 | static struct omap_hwmod_ocp_if omap44xx_usb_otg_hs__l3_main_2 = { | ||
351 | .master = &omap44xx_usb_otg_hs_hwmod, | ||
352 | .slave = &omap44xx_l3_main_2_hwmod, | ||
353 | .clk = "l3_div_ck", | ||
354 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
355 | }; | ||
356 | |||
289 | /* l3_main_2 slave ports */ | 357 | /* l3_main_2 slave ports */ |
290 | static struct omap_hwmod_ocp_if *omap44xx_l3_main_2_slaves[] = { | 358 | static struct omap_hwmod_ocp_if *omap44xx_l3_main_2_slaves[] = { |
291 | &omap44xx_dma_system__l3_main_2, | 359 | &omap44xx_dma_system__l3_main_2, |
360 | &omap44xx_hsi__l3_main_2, | ||
361 | &omap44xx_ipu__l3_main_2, | ||
362 | &omap44xx_iss__l3_main_2, | ||
292 | &omap44xx_iva__l3_main_2, | 363 | &omap44xx_iva__l3_main_2, |
293 | &omap44xx_l3_main_1__l3_main_2, | 364 | &omap44xx_l3_main_1__l3_main_2, |
294 | &omap44xx_l4_cfg__l3_main_2, | 365 | &omap44xx_l4_cfg__l3_main_2, |
366 | &omap44xx_usb_otg_hs__l3_main_2, | ||
295 | }; | 367 | }; |
296 | 368 | ||
297 | static struct omap_hwmod omap44xx_l3_main_2_hwmod = { | 369 | static struct omap_hwmod omap44xx_l3_main_2_hwmod = { |
@@ -351,6 +423,14 @@ static struct omap_hwmod_class omap44xx_l4_hwmod_class = { | |||
351 | }; | 423 | }; |
352 | 424 | ||
353 | /* l4_abe interface data */ | 425 | /* l4_abe interface data */ |
426 | /* aess -> l4_abe */ | ||
427 | static struct omap_hwmod_ocp_if omap44xx_aess__l4_abe = { | ||
428 | .master = &omap44xx_aess_hwmod, | ||
429 | .slave = &omap44xx_l4_abe_hwmod, | ||
430 | .clk = "ocp_abe_iclk", | ||
431 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
432 | }; | ||
433 | |||
354 | /* dsp -> l4_abe */ | 434 | /* dsp -> l4_abe */ |
355 | static struct omap_hwmod_ocp_if omap44xx_dsp__l4_abe = { | 435 | static struct omap_hwmod_ocp_if omap44xx_dsp__l4_abe = { |
356 | .master = &omap44xx_dsp_hwmod, | 436 | .master = &omap44xx_dsp_hwmod, |
@@ -377,6 +457,7 @@ static struct omap_hwmod_ocp_if omap44xx_mpu__l4_abe = { | |||
377 | 457 | ||
378 | /* l4_abe slave ports */ | 458 | /* l4_abe slave ports */ |
379 | static struct omap_hwmod_ocp_if *omap44xx_l4_abe_slaves[] = { | 459 | static struct omap_hwmod_ocp_if *omap44xx_l4_abe_slaves[] = { |
460 | &omap44xx_aess__l4_abe, | ||
380 | &omap44xx_dsp__l4_abe, | 461 | &omap44xx_dsp__l4_abe, |
381 | &omap44xx_l3_main_1__l4_abe, | 462 | &omap44xx_l3_main_1__l4_abe, |
382 | &omap44xx_mpu__l4_abe, | 463 | &omap44xx_mpu__l4_abe, |
@@ -494,26 +575,15 @@ static struct omap_hwmod omap44xx_mpu_private_hwmod = { | |||
494 | * - They still need to be validated with the driver | 575 | * - They still need to be validated with the driver |
495 | * properly adapted to omap_hwmod / omap_device | 576 | * properly adapted to omap_hwmod / omap_device |
496 | * | 577 | * |
497 | * aess | ||
498 | * bandgap | ||
499 | * c2c | 578 | * c2c |
500 | * c2c_target_fw | 579 | * c2c_target_fw |
501 | * cm_core | 580 | * cm_core |
502 | * cm_core_aon | 581 | * cm_core_aon |
503 | * counter_32k | ||
504 | * ctrl_module_core | 582 | * ctrl_module_core |
505 | * ctrl_module_pad_core | 583 | * ctrl_module_pad_core |
506 | * ctrl_module_pad_wkup | 584 | * ctrl_module_pad_wkup |
507 | * ctrl_module_wkup | 585 | * ctrl_module_wkup |
508 | * debugss | 586 | * debugss |
509 | * dmic | ||
510 | * dss | ||
511 | * dss_dispc | ||
512 | * dss_dsi1 | ||
513 | * dss_dsi2 | ||
514 | * dss_hdmi | ||
515 | * dss_rfbi | ||
516 | * dss_venc | ||
517 | * efuse_ctrl_cust | 587 | * efuse_ctrl_cust |
518 | * efuse_ctrl_std | 588 | * efuse_ctrl_std |
519 | * elm | 589 | * elm |
@@ -524,58 +594,211 @@ static struct omap_hwmod omap44xx_mpu_private_hwmod = { | |||
524 | * gpu | 594 | * gpu |
525 | * hdq1w | 595 | * hdq1w |
526 | * hsi | 596 | * hsi |
527 | * ipu | ||
528 | * iss | ||
529 | * kbd | ||
530 | * mailbox | ||
531 | * mcasp | ||
532 | * mcbsp1 | ||
533 | * mcbsp2 | ||
534 | * mcbsp3 | ||
535 | * mcbsp4 | ||
536 | * mcpdm | ||
537 | * mcspi1 | ||
538 | * mcspi2 | ||
539 | * mcspi3 | ||
540 | * mcspi4 | ||
541 | * mmc1 | ||
542 | * mmc2 | ||
543 | * mmc3 | ||
544 | * mmc4 | ||
545 | * mmc5 | ||
546 | * mpu_c0 | ||
547 | * mpu_c1 | ||
548 | * ocmc_ram | 597 | * ocmc_ram |
549 | * ocp2scp_usb_phy | 598 | * ocp2scp_usb_phy |
550 | * ocp_wp_noc | 599 | * ocp_wp_noc |
551 | * prcm | ||
552 | * prcm_mpu | 600 | * prcm_mpu |
553 | * prm | 601 | * prm |
554 | * scrm | 602 | * scrm |
555 | * sl2if | 603 | * sl2if |
556 | * slimbus1 | 604 | * slimbus1 |
557 | * slimbus2 | 605 | * slimbus2 |
558 | * spinlock | ||
559 | * timer1 | ||
560 | * timer10 | ||
561 | * timer11 | ||
562 | * timer2 | ||
563 | * timer3 | ||
564 | * timer4 | ||
565 | * timer5 | ||
566 | * timer6 | ||
567 | * timer7 | ||
568 | * timer8 | ||
569 | * timer9 | ||
570 | * usb_host_fs | 606 | * usb_host_fs |
571 | * usb_host_hs | 607 | * usb_host_hs |
572 | * usb_otg_hs | ||
573 | * usb_phy_cm | 608 | * usb_phy_cm |
574 | * usb_tll_hs | 609 | * usb_tll_hs |
575 | * usim | 610 | * usim |
576 | */ | 611 | */ |
577 | 612 | ||
578 | /* | 613 | /* |
614 | * 'aess' class | ||
615 | * audio engine sub system | ||
616 | */ | ||
617 | |||
618 | static struct omap_hwmod_class_sysconfig omap44xx_aess_sysc = { | ||
619 | .rev_offs = 0x0000, | ||
620 | .sysc_offs = 0x0010, | ||
621 | .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE), | ||
622 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | | ||
623 | MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART), | ||
624 | .sysc_fields = &omap_hwmod_sysc_type2, | ||
625 | }; | ||
626 | |||
627 | static struct omap_hwmod_class omap44xx_aess_hwmod_class = { | ||
628 | .name = "aess", | ||
629 | .sysc = &omap44xx_aess_sysc, | ||
630 | }; | ||
631 | |||
632 | /* aess */ | ||
633 | static struct omap_hwmod_irq_info omap44xx_aess_irqs[] = { | ||
634 | { .irq = 99 + OMAP44XX_IRQ_GIC_START }, | ||
635 | }; | ||
636 | |||
637 | static struct omap_hwmod_dma_info omap44xx_aess_sdma_reqs[] = { | ||
638 | { .name = "fifo0", .dma_req = 100 + OMAP44XX_DMA_REQ_START }, | ||
639 | { .name = "fifo1", .dma_req = 101 + OMAP44XX_DMA_REQ_START }, | ||
640 | { .name = "fifo2", .dma_req = 102 + OMAP44XX_DMA_REQ_START }, | ||
641 | { .name = "fifo3", .dma_req = 103 + OMAP44XX_DMA_REQ_START }, | ||
642 | { .name = "fifo4", .dma_req = 104 + OMAP44XX_DMA_REQ_START }, | ||
643 | { .name = "fifo5", .dma_req = 105 + OMAP44XX_DMA_REQ_START }, | ||
644 | { .name = "fifo6", .dma_req = 106 + OMAP44XX_DMA_REQ_START }, | ||
645 | { .name = "fifo7", .dma_req = 107 + OMAP44XX_DMA_REQ_START }, | ||
646 | }; | ||
647 | |||
648 | /* aess master ports */ | ||
649 | static struct omap_hwmod_ocp_if *omap44xx_aess_masters[] = { | ||
650 | &omap44xx_aess__l4_abe, | ||
651 | }; | ||
652 | |||
653 | static struct omap_hwmod_addr_space omap44xx_aess_addrs[] = { | ||
654 | { | ||
655 | .pa_start = 0x401f1000, | ||
656 | .pa_end = 0x401f13ff, | ||
657 | .flags = ADDR_TYPE_RT | ||
658 | }, | ||
659 | }; | ||
660 | |||
661 | /* l4_abe -> aess */ | ||
662 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__aess = { | ||
663 | .master = &omap44xx_l4_abe_hwmod, | ||
664 | .slave = &omap44xx_aess_hwmod, | ||
665 | .clk = "ocp_abe_iclk", | ||
666 | .addr = omap44xx_aess_addrs, | ||
667 | .addr_cnt = ARRAY_SIZE(omap44xx_aess_addrs), | ||
668 | .user = OCP_USER_MPU, | ||
669 | }; | ||
670 | |||
671 | static struct omap_hwmod_addr_space omap44xx_aess_dma_addrs[] = { | ||
672 | { | ||
673 | .pa_start = 0x490f1000, | ||
674 | .pa_end = 0x490f13ff, | ||
675 | .flags = ADDR_TYPE_RT | ||
676 | }, | ||
677 | }; | ||
678 | |||
679 | /* l4_abe -> aess (dma) */ | ||
680 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__aess_dma = { | ||
681 | .master = &omap44xx_l4_abe_hwmod, | ||
682 | .slave = &omap44xx_aess_hwmod, | ||
683 | .clk = "ocp_abe_iclk", | ||
684 | .addr = omap44xx_aess_dma_addrs, | ||
685 | .addr_cnt = ARRAY_SIZE(omap44xx_aess_dma_addrs), | ||
686 | .user = OCP_USER_SDMA, | ||
687 | }; | ||
688 | |||
689 | /* aess slave ports */ | ||
690 | static struct omap_hwmod_ocp_if *omap44xx_aess_slaves[] = { | ||
691 | &omap44xx_l4_abe__aess, | ||
692 | &omap44xx_l4_abe__aess_dma, | ||
693 | }; | ||
694 | |||
695 | static struct omap_hwmod omap44xx_aess_hwmod = { | ||
696 | .name = "aess", | ||
697 | .class = &omap44xx_aess_hwmod_class, | ||
698 | .mpu_irqs = omap44xx_aess_irqs, | ||
699 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_aess_irqs), | ||
700 | .sdma_reqs = omap44xx_aess_sdma_reqs, | ||
701 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_aess_sdma_reqs), | ||
702 | .main_clk = "aess_fck", | ||
703 | .prcm = { | ||
704 | .omap4 = { | ||
705 | .clkctrl_reg = OMAP4430_CM1_ABE_AESS_CLKCTRL, | ||
706 | }, | ||
707 | }, | ||
708 | .slaves = omap44xx_aess_slaves, | ||
709 | .slaves_cnt = ARRAY_SIZE(omap44xx_aess_slaves), | ||
710 | .masters = omap44xx_aess_masters, | ||
711 | .masters_cnt = ARRAY_SIZE(omap44xx_aess_masters), | ||
712 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
713 | }; | ||
714 | |||
715 | /* | ||
716 | * 'bandgap' class | ||
717 | * bangap reference for ldo regulators | ||
718 | */ | ||
719 | |||
720 | static struct omap_hwmod_class omap44xx_bandgap_hwmod_class = { | ||
721 | .name = "bandgap", | ||
722 | }; | ||
723 | |||
724 | /* bandgap */ | ||
725 | static struct omap_hwmod_opt_clk bandgap_opt_clks[] = { | ||
726 | { .role = "fclk", .clk = "bandgap_fclk" }, | ||
727 | }; | ||
728 | |||
729 | static struct omap_hwmod omap44xx_bandgap_hwmod = { | ||
730 | .name = "bandgap", | ||
731 | .class = &omap44xx_bandgap_hwmod_class, | ||
732 | .prcm = { | ||
733 | .omap4 = { | ||
734 | .clkctrl_reg = OMAP4430_CM_WKUP_BANDGAP_CLKCTRL, | ||
735 | }, | ||
736 | }, | ||
737 | .opt_clks = bandgap_opt_clks, | ||
738 | .opt_clks_cnt = ARRAY_SIZE(bandgap_opt_clks), | ||
739 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
740 | }; | ||
741 | |||
742 | /* | ||
743 | * 'counter' class | ||
744 | * 32-bit ordinary counter, clocked by the falling edge of the 32 khz clock | ||
745 | */ | ||
746 | |||
747 | static struct omap_hwmod_class_sysconfig omap44xx_counter_sysc = { | ||
748 | .rev_offs = 0x0000, | ||
749 | .sysc_offs = 0x0004, | ||
750 | .sysc_flags = SYSC_HAS_SIDLEMODE, | ||
751 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | | ||
752 | SIDLE_SMART_WKUP), | ||
753 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
754 | }; | ||
755 | |||
756 | static struct omap_hwmod_class omap44xx_counter_hwmod_class = { | ||
757 | .name = "counter", | ||
758 | .sysc = &omap44xx_counter_sysc, | ||
759 | }; | ||
760 | |||
761 | /* counter_32k */ | ||
762 | static struct omap_hwmod omap44xx_counter_32k_hwmod; | ||
763 | static struct omap_hwmod_addr_space omap44xx_counter_32k_addrs[] = { | ||
764 | { | ||
765 | .pa_start = 0x4a304000, | ||
766 | .pa_end = 0x4a30401f, | ||
767 | .flags = ADDR_TYPE_RT | ||
768 | }, | ||
769 | }; | ||
770 | |||
771 | /* l4_wkup -> counter_32k */ | ||
772 | static struct omap_hwmod_ocp_if omap44xx_l4_wkup__counter_32k = { | ||
773 | .master = &omap44xx_l4_wkup_hwmod, | ||
774 | .slave = &omap44xx_counter_32k_hwmod, | ||
775 | .clk = "l4_wkup_clk_mux_ck", | ||
776 | .addr = omap44xx_counter_32k_addrs, | ||
777 | .addr_cnt = ARRAY_SIZE(omap44xx_counter_32k_addrs), | ||
778 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
779 | }; | ||
780 | |||
781 | /* counter_32k slave ports */ | ||
782 | static struct omap_hwmod_ocp_if *omap44xx_counter_32k_slaves[] = { | ||
783 | &omap44xx_l4_wkup__counter_32k, | ||
784 | }; | ||
785 | |||
786 | static struct omap_hwmod omap44xx_counter_32k_hwmod = { | ||
787 | .name = "counter_32k", | ||
788 | .class = &omap44xx_counter_hwmod_class, | ||
789 | .flags = HWMOD_SWSUP_SIDLE, | ||
790 | .main_clk = "sys_32k_ck", | ||
791 | .prcm = { | ||
792 | .omap4 = { | ||
793 | .clkctrl_reg = OMAP4430_CM_WKUP_SYNCTIMER_CLKCTRL, | ||
794 | }, | ||
795 | }, | ||
796 | .slaves = omap44xx_counter_32k_slaves, | ||
797 | .slaves_cnt = ARRAY_SIZE(omap44xx_counter_32k_slaves), | ||
798 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
799 | }; | ||
800 | |||
801 | /* | ||
579 | * 'dma' class | 802 | * 'dma' class |
580 | * dma controller for data exchange between memory to memory (i.e. internal or | 803 | * dma controller for data exchange between memory to memory (i.e. internal or |
581 | * external memory) and gp peripherals to memory or memory to gp peripherals | 804 | * external memory) and gp peripherals to memory or memory to gp peripherals |
@@ -662,6 +885,96 @@ static struct omap_hwmod omap44xx_dma_system_hwmod = { | |||
662 | }; | 885 | }; |
663 | 886 | ||
664 | /* | 887 | /* |
888 | * 'dmic' class | ||
889 | * digital microphone controller | ||
890 | */ | ||
891 | |||
892 | static struct omap_hwmod_class_sysconfig omap44xx_dmic_sysc = { | ||
893 | .rev_offs = 0x0000, | ||
894 | .sysc_offs = 0x0010, | ||
895 | .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS | | ||
896 | SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET), | ||
897 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | | ||
898 | SIDLE_SMART_WKUP), | ||
899 | .sysc_fields = &omap_hwmod_sysc_type2, | ||
900 | }; | ||
901 | |||
902 | static struct omap_hwmod_class omap44xx_dmic_hwmod_class = { | ||
903 | .name = "dmic", | ||
904 | .sysc = &omap44xx_dmic_sysc, | ||
905 | }; | ||
906 | |||
907 | /* dmic */ | ||
908 | static struct omap_hwmod omap44xx_dmic_hwmod; | ||
909 | static struct omap_hwmod_irq_info omap44xx_dmic_irqs[] = { | ||
910 | { .irq = 114 + OMAP44XX_IRQ_GIC_START }, | ||
911 | }; | ||
912 | |||
913 | static struct omap_hwmod_dma_info omap44xx_dmic_sdma_reqs[] = { | ||
914 | { .dma_req = 66 + OMAP44XX_DMA_REQ_START }, | ||
915 | }; | ||
916 | |||
917 | static struct omap_hwmod_addr_space omap44xx_dmic_addrs[] = { | ||
918 | { | ||
919 | .pa_start = 0x4012e000, | ||
920 | .pa_end = 0x4012e07f, | ||
921 | .flags = ADDR_TYPE_RT | ||
922 | }, | ||
923 | }; | ||
924 | |||
925 | /* l4_abe -> dmic */ | ||
926 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__dmic = { | ||
927 | .master = &omap44xx_l4_abe_hwmod, | ||
928 | .slave = &omap44xx_dmic_hwmod, | ||
929 | .clk = "ocp_abe_iclk", | ||
930 | .addr = omap44xx_dmic_addrs, | ||
931 | .addr_cnt = ARRAY_SIZE(omap44xx_dmic_addrs), | ||
932 | .user = OCP_USER_MPU, | ||
933 | }; | ||
934 | |||
935 | static struct omap_hwmod_addr_space omap44xx_dmic_dma_addrs[] = { | ||
936 | { | ||
937 | .pa_start = 0x4902e000, | ||
938 | .pa_end = 0x4902e07f, | ||
939 | .flags = ADDR_TYPE_RT | ||
940 | }, | ||
941 | }; | ||
942 | |||
943 | /* l4_abe -> dmic (dma) */ | ||
944 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__dmic_dma = { | ||
945 | .master = &omap44xx_l4_abe_hwmod, | ||
946 | .slave = &omap44xx_dmic_hwmod, | ||
947 | .clk = "ocp_abe_iclk", | ||
948 | .addr = omap44xx_dmic_dma_addrs, | ||
949 | .addr_cnt = ARRAY_SIZE(omap44xx_dmic_dma_addrs), | ||
950 | .user = OCP_USER_SDMA, | ||
951 | }; | ||
952 | |||
953 | /* dmic slave ports */ | ||
954 | static struct omap_hwmod_ocp_if *omap44xx_dmic_slaves[] = { | ||
955 | &omap44xx_l4_abe__dmic, | ||
956 | &omap44xx_l4_abe__dmic_dma, | ||
957 | }; | ||
958 | |||
959 | static struct omap_hwmod omap44xx_dmic_hwmod = { | ||
960 | .name = "dmic", | ||
961 | .class = &omap44xx_dmic_hwmod_class, | ||
962 | .mpu_irqs = omap44xx_dmic_irqs, | ||
963 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_dmic_irqs), | ||
964 | .sdma_reqs = omap44xx_dmic_sdma_reqs, | ||
965 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_dmic_sdma_reqs), | ||
966 | .main_clk = "dmic_fck", | ||
967 | .prcm = { | ||
968 | .omap4 = { | ||
969 | .clkctrl_reg = OMAP4430_CM1_ABE_DMIC_CLKCTRL, | ||
970 | }, | ||
971 | }, | ||
972 | .slaves = omap44xx_dmic_slaves, | ||
973 | .slaves_cnt = ARRAY_SIZE(omap44xx_dmic_slaves), | ||
974 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
975 | }; | ||
976 | |||
977 | /* | ||
665 | * 'dsp' class | 978 | * 'dsp' class |
666 | * dsp sub-system | 979 | * dsp sub-system |
667 | */ | 980 | */ |
@@ -747,6 +1060,590 @@ static struct omap_hwmod omap44xx_dsp_hwmod = { | |||
747 | }; | 1060 | }; |
748 | 1061 | ||
749 | /* | 1062 | /* |
1063 | * 'dss' class | ||
1064 | * display sub-system | ||
1065 | */ | ||
1066 | |||
1067 | static struct omap_hwmod_class_sysconfig omap44xx_dss_sysc = { | ||
1068 | .rev_offs = 0x0000, | ||
1069 | .syss_offs = 0x0014, | ||
1070 | .sysc_flags = SYSS_HAS_RESET_STATUS, | ||
1071 | }; | ||
1072 | |||
1073 | static struct omap_hwmod_class omap44xx_dss_hwmod_class = { | ||
1074 | .name = "dss", | ||
1075 | .sysc = &omap44xx_dss_sysc, | ||
1076 | }; | ||
1077 | |||
1078 | /* dss */ | ||
1079 | /* dss master ports */ | ||
1080 | static struct omap_hwmod_ocp_if *omap44xx_dss_masters[] = { | ||
1081 | &omap44xx_dss__l3_main_1, | ||
1082 | }; | ||
1083 | |||
1084 | static struct omap_hwmod_addr_space omap44xx_dss_dma_addrs[] = { | ||
1085 | { | ||
1086 | .pa_start = 0x58000000, | ||
1087 | .pa_end = 0x5800007f, | ||
1088 | .flags = ADDR_TYPE_RT | ||
1089 | }, | ||
1090 | }; | ||
1091 | |||
1092 | /* l3_main_2 -> dss */ | ||
1093 | static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss = { | ||
1094 | .master = &omap44xx_l3_main_2_hwmod, | ||
1095 | .slave = &omap44xx_dss_hwmod, | ||
1096 | .clk = "l3_div_ck", | ||
1097 | .addr = omap44xx_dss_dma_addrs, | ||
1098 | .addr_cnt = ARRAY_SIZE(omap44xx_dss_dma_addrs), | ||
1099 | .user = OCP_USER_SDMA, | ||
1100 | }; | ||
1101 | |||
1102 | static struct omap_hwmod_addr_space omap44xx_dss_addrs[] = { | ||
1103 | { | ||
1104 | .pa_start = 0x48040000, | ||
1105 | .pa_end = 0x4804007f, | ||
1106 | .flags = ADDR_TYPE_RT | ||
1107 | }, | ||
1108 | }; | ||
1109 | |||
1110 | /* l4_per -> dss */ | ||
1111 | static struct omap_hwmod_ocp_if omap44xx_l4_per__dss = { | ||
1112 | .master = &omap44xx_l4_per_hwmod, | ||
1113 | .slave = &omap44xx_dss_hwmod, | ||
1114 | .clk = "l4_div_ck", | ||
1115 | .addr = omap44xx_dss_addrs, | ||
1116 | .addr_cnt = ARRAY_SIZE(omap44xx_dss_addrs), | ||
1117 | .user = OCP_USER_MPU, | ||
1118 | }; | ||
1119 | |||
1120 | /* dss slave ports */ | ||
1121 | static struct omap_hwmod_ocp_if *omap44xx_dss_slaves[] = { | ||
1122 | &omap44xx_l3_main_2__dss, | ||
1123 | &omap44xx_l4_per__dss, | ||
1124 | }; | ||
1125 | |||
1126 | static struct omap_hwmod_opt_clk dss_opt_clks[] = { | ||
1127 | { .role = "sys_clk", .clk = "dss_sys_clk" }, | ||
1128 | { .role = "tv_clk", .clk = "dss_tv_clk" }, | ||
1129 | { .role = "dss_clk", .clk = "dss_dss_clk" }, | ||
1130 | { .role = "video_clk", .clk = "dss_48mhz_clk" }, | ||
1131 | }; | ||
1132 | |||
1133 | static struct omap_hwmod omap44xx_dss_hwmod = { | ||
1134 | .name = "dss_core", | ||
1135 | .class = &omap44xx_dss_hwmod_class, | ||
1136 | .main_clk = "dss_fck", | ||
1137 | .prcm = { | ||
1138 | .omap4 = { | ||
1139 | .clkctrl_reg = OMAP4430_CM_DSS_DSS_CLKCTRL, | ||
1140 | }, | ||
1141 | }, | ||
1142 | .opt_clks = dss_opt_clks, | ||
1143 | .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks), | ||
1144 | .slaves = omap44xx_dss_slaves, | ||
1145 | .slaves_cnt = ARRAY_SIZE(omap44xx_dss_slaves), | ||
1146 | .masters = omap44xx_dss_masters, | ||
1147 | .masters_cnt = ARRAY_SIZE(omap44xx_dss_masters), | ||
1148 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
1149 | }; | ||
1150 | |||
1151 | /* | ||
1152 | * 'dispc' class | ||
1153 | * display controller | ||
1154 | */ | ||
1155 | |||
1156 | static struct omap_hwmod_class_sysconfig omap44xx_dispc_sysc = { | ||
1157 | .rev_offs = 0x0000, | ||
1158 | .sysc_offs = 0x0010, | ||
1159 | .syss_offs = 0x0014, | ||
1160 | .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY | | ||
1161 | SYSC_HAS_ENAWAKEUP | SYSC_HAS_MIDLEMODE | | ||
1162 | SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET | | ||
1163 | SYSS_HAS_RESET_STATUS), | ||
1164 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | | ||
1165 | MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART), | ||
1166 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
1167 | }; | ||
1168 | |||
1169 | static struct omap_hwmod_class omap44xx_dispc_hwmod_class = { | ||
1170 | .name = "dispc", | ||
1171 | .sysc = &omap44xx_dispc_sysc, | ||
1172 | }; | ||
1173 | |||
1174 | /* dss_dispc */ | ||
1175 | static struct omap_hwmod omap44xx_dss_dispc_hwmod; | ||
1176 | static struct omap_hwmod_irq_info omap44xx_dss_dispc_irqs[] = { | ||
1177 | { .irq = 25 + OMAP44XX_IRQ_GIC_START }, | ||
1178 | }; | ||
1179 | |||
1180 | static struct omap_hwmod_dma_info omap44xx_dss_dispc_sdma_reqs[] = { | ||
1181 | { .dma_req = 5 + OMAP44XX_DMA_REQ_START }, | ||
1182 | }; | ||
1183 | |||
1184 | static struct omap_hwmod_addr_space omap44xx_dss_dispc_dma_addrs[] = { | ||
1185 | { | ||
1186 | .pa_start = 0x58001000, | ||
1187 | .pa_end = 0x58001fff, | ||
1188 | .flags = ADDR_TYPE_RT | ||
1189 | }, | ||
1190 | }; | ||
1191 | |||
1192 | /* l3_main_2 -> dss_dispc */ | ||
1193 | static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_dispc = { | ||
1194 | .master = &omap44xx_l3_main_2_hwmod, | ||
1195 | .slave = &omap44xx_dss_dispc_hwmod, | ||
1196 | .clk = "l3_div_ck", | ||
1197 | .addr = omap44xx_dss_dispc_dma_addrs, | ||
1198 | .addr_cnt = ARRAY_SIZE(omap44xx_dss_dispc_dma_addrs), | ||
1199 | .user = OCP_USER_SDMA, | ||
1200 | }; | ||
1201 | |||
1202 | static struct omap_hwmod_addr_space omap44xx_dss_dispc_addrs[] = { | ||
1203 | { | ||
1204 | .pa_start = 0x48041000, | ||
1205 | .pa_end = 0x48041fff, | ||
1206 | .flags = ADDR_TYPE_RT | ||
1207 | }, | ||
1208 | }; | ||
1209 | |||
1210 | /* l4_per -> dss_dispc */ | ||
1211 | static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_dispc = { | ||
1212 | .master = &omap44xx_l4_per_hwmod, | ||
1213 | .slave = &omap44xx_dss_dispc_hwmod, | ||
1214 | .clk = "l4_div_ck", | ||
1215 | .addr = omap44xx_dss_dispc_addrs, | ||
1216 | .addr_cnt = ARRAY_SIZE(omap44xx_dss_dispc_addrs), | ||
1217 | .user = OCP_USER_MPU, | ||
1218 | }; | ||
1219 | |||
1220 | /* dss_dispc slave ports */ | ||
1221 | static struct omap_hwmod_ocp_if *omap44xx_dss_dispc_slaves[] = { | ||
1222 | &omap44xx_l3_main_2__dss_dispc, | ||
1223 | &omap44xx_l4_per__dss_dispc, | ||
1224 | }; | ||
1225 | |||
1226 | static struct omap_hwmod omap44xx_dss_dispc_hwmod = { | ||
1227 | .name = "dss_dispc", | ||
1228 | .class = &omap44xx_dispc_hwmod_class, | ||
1229 | .mpu_irqs = omap44xx_dss_dispc_irqs, | ||
1230 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_dss_dispc_irqs), | ||
1231 | .sdma_reqs = omap44xx_dss_dispc_sdma_reqs, | ||
1232 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_dss_dispc_sdma_reqs), | ||
1233 | .main_clk = "dss_fck", | ||
1234 | .prcm = { | ||
1235 | .omap4 = { | ||
1236 | .clkctrl_reg = OMAP4430_CM_DSS_DSS_CLKCTRL, | ||
1237 | }, | ||
1238 | }, | ||
1239 | .slaves = omap44xx_dss_dispc_slaves, | ||
1240 | .slaves_cnt = ARRAY_SIZE(omap44xx_dss_dispc_slaves), | ||
1241 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
1242 | }; | ||
1243 | |||
1244 | /* | ||
1245 | * 'dsi' class | ||
1246 | * display serial interface controller | ||
1247 | */ | ||
1248 | |||
1249 | static struct omap_hwmod_class_sysconfig omap44xx_dsi_sysc = { | ||
1250 | .rev_offs = 0x0000, | ||
1251 | .sysc_offs = 0x0010, | ||
1252 | .syss_offs = 0x0014, | ||
1253 | .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY | | ||
1254 | SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE | | ||
1255 | SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS), | ||
1256 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | ||
1257 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
1258 | }; | ||
1259 | |||
1260 | static struct omap_hwmod_class omap44xx_dsi_hwmod_class = { | ||
1261 | .name = "dsi", | ||
1262 | .sysc = &omap44xx_dsi_sysc, | ||
1263 | }; | ||
1264 | |||
1265 | /* dss_dsi1 */ | ||
1266 | static struct omap_hwmod omap44xx_dss_dsi1_hwmod; | ||
1267 | static struct omap_hwmod_irq_info omap44xx_dss_dsi1_irqs[] = { | ||
1268 | { .irq = 53 + OMAP44XX_IRQ_GIC_START }, | ||
1269 | }; | ||
1270 | |||
1271 | static struct omap_hwmod_dma_info omap44xx_dss_dsi1_sdma_reqs[] = { | ||
1272 | { .dma_req = 74 + OMAP44XX_DMA_REQ_START }, | ||
1273 | }; | ||
1274 | |||
1275 | static struct omap_hwmod_addr_space omap44xx_dss_dsi1_dma_addrs[] = { | ||
1276 | { | ||
1277 | .pa_start = 0x58004000, | ||
1278 | .pa_end = 0x580041ff, | ||
1279 | .flags = ADDR_TYPE_RT | ||
1280 | }, | ||
1281 | }; | ||
1282 | |||
1283 | /* l3_main_2 -> dss_dsi1 */ | ||
1284 | static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_dsi1 = { | ||
1285 | .master = &omap44xx_l3_main_2_hwmod, | ||
1286 | .slave = &omap44xx_dss_dsi1_hwmod, | ||
1287 | .clk = "l3_div_ck", | ||
1288 | .addr = omap44xx_dss_dsi1_dma_addrs, | ||
1289 | .addr_cnt = ARRAY_SIZE(omap44xx_dss_dsi1_dma_addrs), | ||
1290 | .user = OCP_USER_SDMA, | ||
1291 | }; | ||
1292 | |||
1293 | static struct omap_hwmod_addr_space omap44xx_dss_dsi1_addrs[] = { | ||
1294 | { | ||
1295 | .pa_start = 0x48044000, | ||
1296 | .pa_end = 0x480441ff, | ||
1297 | .flags = ADDR_TYPE_RT | ||
1298 | }, | ||
1299 | }; | ||
1300 | |||
1301 | /* l4_per -> dss_dsi1 */ | ||
1302 | static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_dsi1 = { | ||
1303 | .master = &omap44xx_l4_per_hwmod, | ||
1304 | .slave = &omap44xx_dss_dsi1_hwmod, | ||
1305 | .clk = "l4_div_ck", | ||
1306 | .addr = omap44xx_dss_dsi1_addrs, | ||
1307 | .addr_cnt = ARRAY_SIZE(omap44xx_dss_dsi1_addrs), | ||
1308 | .user = OCP_USER_MPU, | ||
1309 | }; | ||
1310 | |||
1311 | /* dss_dsi1 slave ports */ | ||
1312 | static struct omap_hwmod_ocp_if *omap44xx_dss_dsi1_slaves[] = { | ||
1313 | &omap44xx_l3_main_2__dss_dsi1, | ||
1314 | &omap44xx_l4_per__dss_dsi1, | ||
1315 | }; | ||
1316 | |||
1317 | static struct omap_hwmod omap44xx_dss_dsi1_hwmod = { | ||
1318 | .name = "dss_dsi1", | ||
1319 | .class = &omap44xx_dsi_hwmod_class, | ||
1320 | .mpu_irqs = omap44xx_dss_dsi1_irqs, | ||
1321 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_dss_dsi1_irqs), | ||
1322 | .sdma_reqs = omap44xx_dss_dsi1_sdma_reqs, | ||
1323 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_dss_dsi1_sdma_reqs), | ||
1324 | .main_clk = "dss_fck", | ||
1325 | .prcm = { | ||
1326 | .omap4 = { | ||
1327 | .clkctrl_reg = OMAP4430_CM_DSS_DSS_CLKCTRL, | ||
1328 | }, | ||
1329 | }, | ||
1330 | .slaves = omap44xx_dss_dsi1_slaves, | ||
1331 | .slaves_cnt = ARRAY_SIZE(omap44xx_dss_dsi1_slaves), | ||
1332 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
1333 | }; | ||
1334 | |||
1335 | /* dss_dsi2 */ | ||
1336 | static struct omap_hwmod omap44xx_dss_dsi2_hwmod; | ||
1337 | static struct omap_hwmod_irq_info omap44xx_dss_dsi2_irqs[] = { | ||
1338 | { .irq = 84 + OMAP44XX_IRQ_GIC_START }, | ||
1339 | }; | ||
1340 | |||
1341 | static struct omap_hwmod_dma_info omap44xx_dss_dsi2_sdma_reqs[] = { | ||
1342 | { .dma_req = 83 + OMAP44XX_DMA_REQ_START }, | ||
1343 | }; | ||
1344 | |||
1345 | static struct omap_hwmod_addr_space omap44xx_dss_dsi2_dma_addrs[] = { | ||
1346 | { | ||
1347 | .pa_start = 0x58005000, | ||
1348 | .pa_end = 0x580051ff, | ||
1349 | .flags = ADDR_TYPE_RT | ||
1350 | }, | ||
1351 | }; | ||
1352 | |||
1353 | /* l3_main_2 -> dss_dsi2 */ | ||
1354 | static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_dsi2 = { | ||
1355 | .master = &omap44xx_l3_main_2_hwmod, | ||
1356 | .slave = &omap44xx_dss_dsi2_hwmod, | ||
1357 | .clk = "l3_div_ck", | ||
1358 | .addr = omap44xx_dss_dsi2_dma_addrs, | ||
1359 | .addr_cnt = ARRAY_SIZE(omap44xx_dss_dsi2_dma_addrs), | ||
1360 | .user = OCP_USER_SDMA, | ||
1361 | }; | ||
1362 | |||
1363 | static struct omap_hwmod_addr_space omap44xx_dss_dsi2_addrs[] = { | ||
1364 | { | ||
1365 | .pa_start = 0x48045000, | ||
1366 | .pa_end = 0x480451ff, | ||
1367 | .flags = ADDR_TYPE_RT | ||
1368 | }, | ||
1369 | }; | ||
1370 | |||
1371 | /* l4_per -> dss_dsi2 */ | ||
1372 | static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_dsi2 = { | ||
1373 | .master = &omap44xx_l4_per_hwmod, | ||
1374 | .slave = &omap44xx_dss_dsi2_hwmod, | ||
1375 | .clk = "l4_div_ck", | ||
1376 | .addr = omap44xx_dss_dsi2_addrs, | ||
1377 | .addr_cnt = ARRAY_SIZE(omap44xx_dss_dsi2_addrs), | ||
1378 | .user = OCP_USER_MPU, | ||
1379 | }; | ||
1380 | |||
1381 | /* dss_dsi2 slave ports */ | ||
1382 | static struct omap_hwmod_ocp_if *omap44xx_dss_dsi2_slaves[] = { | ||
1383 | &omap44xx_l3_main_2__dss_dsi2, | ||
1384 | &omap44xx_l4_per__dss_dsi2, | ||
1385 | }; | ||
1386 | |||
1387 | static struct omap_hwmod omap44xx_dss_dsi2_hwmod = { | ||
1388 | .name = "dss_dsi2", | ||
1389 | .class = &omap44xx_dsi_hwmod_class, | ||
1390 | .mpu_irqs = omap44xx_dss_dsi2_irqs, | ||
1391 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_dss_dsi2_irqs), | ||
1392 | .sdma_reqs = omap44xx_dss_dsi2_sdma_reqs, | ||
1393 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_dss_dsi2_sdma_reqs), | ||
1394 | .main_clk = "dss_fck", | ||
1395 | .prcm = { | ||
1396 | .omap4 = { | ||
1397 | .clkctrl_reg = OMAP4430_CM_DSS_DSS_CLKCTRL, | ||
1398 | }, | ||
1399 | }, | ||
1400 | .slaves = omap44xx_dss_dsi2_slaves, | ||
1401 | .slaves_cnt = ARRAY_SIZE(omap44xx_dss_dsi2_slaves), | ||
1402 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
1403 | }; | ||
1404 | |||
1405 | /* | ||
1406 | * 'hdmi' class | ||
1407 | * hdmi controller | ||
1408 | */ | ||
1409 | |||
1410 | static struct omap_hwmod_class_sysconfig omap44xx_hdmi_sysc = { | ||
1411 | .rev_offs = 0x0000, | ||
1412 | .sysc_offs = 0x0010, | ||
1413 | .sysc_flags = (SYSC_HAS_RESET_STATUS | SYSC_HAS_SIDLEMODE | | ||
1414 | SYSC_HAS_SOFTRESET), | ||
1415 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | | ||
1416 | SIDLE_SMART_WKUP), | ||
1417 | .sysc_fields = &omap_hwmod_sysc_type2, | ||
1418 | }; | ||
1419 | |||
1420 | static struct omap_hwmod_class omap44xx_hdmi_hwmod_class = { | ||
1421 | .name = "hdmi", | ||
1422 | .sysc = &omap44xx_hdmi_sysc, | ||
1423 | }; | ||
1424 | |||
1425 | /* dss_hdmi */ | ||
1426 | static struct omap_hwmod omap44xx_dss_hdmi_hwmod; | ||
1427 | static struct omap_hwmod_irq_info omap44xx_dss_hdmi_irqs[] = { | ||
1428 | { .irq = 101 + OMAP44XX_IRQ_GIC_START }, | ||
1429 | }; | ||
1430 | |||
1431 | static struct omap_hwmod_dma_info omap44xx_dss_hdmi_sdma_reqs[] = { | ||
1432 | { .dma_req = 75 + OMAP44XX_DMA_REQ_START }, | ||
1433 | }; | ||
1434 | |||
1435 | static struct omap_hwmod_addr_space omap44xx_dss_hdmi_dma_addrs[] = { | ||
1436 | { | ||
1437 | .pa_start = 0x58006000, | ||
1438 | .pa_end = 0x58006fff, | ||
1439 | .flags = ADDR_TYPE_RT | ||
1440 | }, | ||
1441 | }; | ||
1442 | |||
1443 | /* l3_main_2 -> dss_hdmi */ | ||
1444 | static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_hdmi = { | ||
1445 | .master = &omap44xx_l3_main_2_hwmod, | ||
1446 | .slave = &omap44xx_dss_hdmi_hwmod, | ||
1447 | .clk = "l3_div_ck", | ||
1448 | .addr = omap44xx_dss_hdmi_dma_addrs, | ||
1449 | .addr_cnt = ARRAY_SIZE(omap44xx_dss_hdmi_dma_addrs), | ||
1450 | .user = OCP_USER_SDMA, | ||
1451 | }; | ||
1452 | |||
1453 | static struct omap_hwmod_addr_space omap44xx_dss_hdmi_addrs[] = { | ||
1454 | { | ||
1455 | .pa_start = 0x48046000, | ||
1456 | .pa_end = 0x48046fff, | ||
1457 | .flags = ADDR_TYPE_RT | ||
1458 | }, | ||
1459 | }; | ||
1460 | |||
1461 | /* l4_per -> dss_hdmi */ | ||
1462 | static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_hdmi = { | ||
1463 | .master = &omap44xx_l4_per_hwmod, | ||
1464 | .slave = &omap44xx_dss_hdmi_hwmod, | ||
1465 | .clk = "l4_div_ck", | ||
1466 | .addr = omap44xx_dss_hdmi_addrs, | ||
1467 | .addr_cnt = ARRAY_SIZE(omap44xx_dss_hdmi_addrs), | ||
1468 | .user = OCP_USER_MPU, | ||
1469 | }; | ||
1470 | |||
1471 | /* dss_hdmi slave ports */ | ||
1472 | static struct omap_hwmod_ocp_if *omap44xx_dss_hdmi_slaves[] = { | ||
1473 | &omap44xx_l3_main_2__dss_hdmi, | ||
1474 | &omap44xx_l4_per__dss_hdmi, | ||
1475 | }; | ||
1476 | |||
1477 | static struct omap_hwmod omap44xx_dss_hdmi_hwmod = { | ||
1478 | .name = "dss_hdmi", | ||
1479 | .class = &omap44xx_hdmi_hwmod_class, | ||
1480 | .mpu_irqs = omap44xx_dss_hdmi_irqs, | ||
1481 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_dss_hdmi_irqs), | ||
1482 | .sdma_reqs = omap44xx_dss_hdmi_sdma_reqs, | ||
1483 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_dss_hdmi_sdma_reqs), | ||
1484 | .main_clk = "dss_fck", | ||
1485 | .prcm = { | ||
1486 | .omap4 = { | ||
1487 | .clkctrl_reg = OMAP4430_CM_DSS_DSS_CLKCTRL, | ||
1488 | }, | ||
1489 | }, | ||
1490 | .slaves = omap44xx_dss_hdmi_slaves, | ||
1491 | .slaves_cnt = ARRAY_SIZE(omap44xx_dss_hdmi_slaves), | ||
1492 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
1493 | }; | ||
1494 | |||
1495 | /* | ||
1496 | * 'rfbi' class | ||
1497 | * remote frame buffer interface | ||
1498 | */ | ||
1499 | |||
1500 | static struct omap_hwmod_class_sysconfig omap44xx_rfbi_sysc = { | ||
1501 | .rev_offs = 0x0000, | ||
1502 | .sysc_offs = 0x0010, | ||
1503 | .syss_offs = 0x0014, | ||
1504 | .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE | | ||
1505 | SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS), | ||
1506 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | ||
1507 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
1508 | }; | ||
1509 | |||
1510 | static struct omap_hwmod_class omap44xx_rfbi_hwmod_class = { | ||
1511 | .name = "rfbi", | ||
1512 | .sysc = &omap44xx_rfbi_sysc, | ||
1513 | }; | ||
1514 | |||
1515 | /* dss_rfbi */ | ||
1516 | static struct omap_hwmod omap44xx_dss_rfbi_hwmod; | ||
1517 | static struct omap_hwmod_dma_info omap44xx_dss_rfbi_sdma_reqs[] = { | ||
1518 | { .dma_req = 13 + OMAP44XX_DMA_REQ_START }, | ||
1519 | }; | ||
1520 | |||
1521 | static struct omap_hwmod_addr_space omap44xx_dss_rfbi_dma_addrs[] = { | ||
1522 | { | ||
1523 | .pa_start = 0x58002000, | ||
1524 | .pa_end = 0x580020ff, | ||
1525 | .flags = ADDR_TYPE_RT | ||
1526 | }, | ||
1527 | }; | ||
1528 | |||
1529 | /* l3_main_2 -> dss_rfbi */ | ||
1530 | static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_rfbi = { | ||
1531 | .master = &omap44xx_l3_main_2_hwmod, | ||
1532 | .slave = &omap44xx_dss_rfbi_hwmod, | ||
1533 | .clk = "l3_div_ck", | ||
1534 | .addr = omap44xx_dss_rfbi_dma_addrs, | ||
1535 | .addr_cnt = ARRAY_SIZE(omap44xx_dss_rfbi_dma_addrs), | ||
1536 | .user = OCP_USER_SDMA, | ||
1537 | }; | ||
1538 | |||
1539 | static struct omap_hwmod_addr_space omap44xx_dss_rfbi_addrs[] = { | ||
1540 | { | ||
1541 | .pa_start = 0x48042000, | ||
1542 | .pa_end = 0x480420ff, | ||
1543 | .flags = ADDR_TYPE_RT | ||
1544 | }, | ||
1545 | }; | ||
1546 | |||
1547 | /* l4_per -> dss_rfbi */ | ||
1548 | static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_rfbi = { | ||
1549 | .master = &omap44xx_l4_per_hwmod, | ||
1550 | .slave = &omap44xx_dss_rfbi_hwmod, | ||
1551 | .clk = "l4_div_ck", | ||
1552 | .addr = omap44xx_dss_rfbi_addrs, | ||
1553 | .addr_cnt = ARRAY_SIZE(omap44xx_dss_rfbi_addrs), | ||
1554 | .user = OCP_USER_MPU, | ||
1555 | }; | ||
1556 | |||
1557 | /* dss_rfbi slave ports */ | ||
1558 | static struct omap_hwmod_ocp_if *omap44xx_dss_rfbi_slaves[] = { | ||
1559 | &omap44xx_l3_main_2__dss_rfbi, | ||
1560 | &omap44xx_l4_per__dss_rfbi, | ||
1561 | }; | ||
1562 | |||
1563 | static struct omap_hwmod omap44xx_dss_rfbi_hwmod = { | ||
1564 | .name = "dss_rfbi", | ||
1565 | .class = &omap44xx_rfbi_hwmod_class, | ||
1566 | .sdma_reqs = omap44xx_dss_rfbi_sdma_reqs, | ||
1567 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_dss_rfbi_sdma_reqs), | ||
1568 | .main_clk = "dss_fck", | ||
1569 | .prcm = { | ||
1570 | .omap4 = { | ||
1571 | .clkctrl_reg = OMAP4430_CM_DSS_DSS_CLKCTRL, | ||
1572 | }, | ||
1573 | }, | ||
1574 | .slaves = omap44xx_dss_rfbi_slaves, | ||
1575 | .slaves_cnt = ARRAY_SIZE(omap44xx_dss_rfbi_slaves), | ||
1576 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
1577 | }; | ||
1578 | |||
1579 | /* | ||
1580 | * 'venc' class | ||
1581 | * video encoder | ||
1582 | */ | ||
1583 | |||
1584 | static struct omap_hwmod_class omap44xx_venc_hwmod_class = { | ||
1585 | .name = "venc", | ||
1586 | }; | ||
1587 | |||
1588 | /* dss_venc */ | ||
1589 | static struct omap_hwmod omap44xx_dss_venc_hwmod; | ||
1590 | static struct omap_hwmod_addr_space omap44xx_dss_venc_dma_addrs[] = { | ||
1591 | { | ||
1592 | .pa_start = 0x58003000, | ||
1593 | .pa_end = 0x580030ff, | ||
1594 | .flags = ADDR_TYPE_RT | ||
1595 | }, | ||
1596 | }; | ||
1597 | |||
1598 | /* l3_main_2 -> dss_venc */ | ||
1599 | static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_venc = { | ||
1600 | .master = &omap44xx_l3_main_2_hwmod, | ||
1601 | .slave = &omap44xx_dss_venc_hwmod, | ||
1602 | .clk = "l3_div_ck", | ||
1603 | .addr = omap44xx_dss_venc_dma_addrs, | ||
1604 | .addr_cnt = ARRAY_SIZE(omap44xx_dss_venc_dma_addrs), | ||
1605 | .user = OCP_USER_SDMA, | ||
1606 | }; | ||
1607 | |||
1608 | static struct omap_hwmod_addr_space omap44xx_dss_venc_addrs[] = { | ||
1609 | { | ||
1610 | .pa_start = 0x48043000, | ||
1611 | .pa_end = 0x480430ff, | ||
1612 | .flags = ADDR_TYPE_RT | ||
1613 | }, | ||
1614 | }; | ||
1615 | |||
1616 | /* l4_per -> dss_venc */ | ||
1617 | static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_venc = { | ||
1618 | .master = &omap44xx_l4_per_hwmod, | ||
1619 | .slave = &omap44xx_dss_venc_hwmod, | ||
1620 | .clk = "l4_div_ck", | ||
1621 | .addr = omap44xx_dss_venc_addrs, | ||
1622 | .addr_cnt = ARRAY_SIZE(omap44xx_dss_venc_addrs), | ||
1623 | .user = OCP_USER_MPU, | ||
1624 | }; | ||
1625 | |||
1626 | /* dss_venc slave ports */ | ||
1627 | static struct omap_hwmod_ocp_if *omap44xx_dss_venc_slaves[] = { | ||
1628 | &omap44xx_l3_main_2__dss_venc, | ||
1629 | &omap44xx_l4_per__dss_venc, | ||
1630 | }; | ||
1631 | |||
1632 | static struct omap_hwmod omap44xx_dss_venc_hwmod = { | ||
1633 | .name = "dss_venc", | ||
1634 | .class = &omap44xx_venc_hwmod_class, | ||
1635 | .main_clk = "dss_fck", | ||
1636 | .prcm = { | ||
1637 | .omap4 = { | ||
1638 | .clkctrl_reg = OMAP4430_CM_DSS_DSS_CLKCTRL, | ||
1639 | }, | ||
1640 | }, | ||
1641 | .slaves = omap44xx_dss_venc_slaves, | ||
1642 | .slaves_cnt = ARRAY_SIZE(omap44xx_dss_venc_slaves), | ||
1643 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
1644 | }; | ||
1645 | |||
1646 | /* | ||
750 | * 'gpio' class | 1647 | * 'gpio' class |
751 | * general purpose io module | 1648 | * general purpose io module |
752 | */ | 1649 | */ |
@@ -1093,6 +1990,83 @@ static struct omap_hwmod omap44xx_gpio6_hwmod = { | |||
1093 | }; | 1990 | }; |
1094 | 1991 | ||
1095 | /* | 1992 | /* |
1993 | * 'hsi' class | ||
1994 | * mipi high-speed synchronous serial interface (multichannel and full-duplex | ||
1995 | * serial if) | ||
1996 | */ | ||
1997 | |||
1998 | static struct omap_hwmod_class_sysconfig omap44xx_hsi_sysc = { | ||
1999 | .rev_offs = 0x0000, | ||
2000 | .sysc_offs = 0x0010, | ||
2001 | .syss_offs = 0x0014, | ||
2002 | .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_EMUFREE | | ||
2003 | SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE | | ||
2004 | SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS), | ||
2005 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | | ||
2006 | SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO | | ||
2007 | MSTANDBY_SMART), | ||
2008 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
2009 | }; | ||
2010 | |||
2011 | static struct omap_hwmod_class omap44xx_hsi_hwmod_class = { | ||
2012 | .name = "hsi", | ||
2013 | .sysc = &omap44xx_hsi_sysc, | ||
2014 | }; | ||
2015 | |||
2016 | /* hsi */ | ||
2017 | static struct omap_hwmod_irq_info omap44xx_hsi_irqs[] = { | ||
2018 | { .name = "mpu_p1", .irq = 67 + OMAP44XX_IRQ_GIC_START }, | ||
2019 | { .name = "mpu_p2", .irq = 68 + OMAP44XX_IRQ_GIC_START }, | ||
2020 | { .name = "mpu_dma", .irq = 71 + OMAP44XX_IRQ_GIC_START }, | ||
2021 | }; | ||
2022 | |||
2023 | /* hsi master ports */ | ||
2024 | static struct omap_hwmod_ocp_if *omap44xx_hsi_masters[] = { | ||
2025 | &omap44xx_hsi__l3_main_2, | ||
2026 | }; | ||
2027 | |||
2028 | static struct omap_hwmod_addr_space omap44xx_hsi_addrs[] = { | ||
2029 | { | ||
2030 | .pa_start = 0x4a058000, | ||
2031 | .pa_end = 0x4a05bfff, | ||
2032 | .flags = ADDR_TYPE_RT | ||
2033 | }, | ||
2034 | }; | ||
2035 | |||
2036 | /* l4_cfg -> hsi */ | ||
2037 | static struct omap_hwmod_ocp_if omap44xx_l4_cfg__hsi = { | ||
2038 | .master = &omap44xx_l4_cfg_hwmod, | ||
2039 | .slave = &omap44xx_hsi_hwmod, | ||
2040 | .clk = "l4_div_ck", | ||
2041 | .addr = omap44xx_hsi_addrs, | ||
2042 | .addr_cnt = ARRAY_SIZE(omap44xx_hsi_addrs), | ||
2043 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2044 | }; | ||
2045 | |||
2046 | /* hsi slave ports */ | ||
2047 | static struct omap_hwmod_ocp_if *omap44xx_hsi_slaves[] = { | ||
2048 | &omap44xx_l4_cfg__hsi, | ||
2049 | }; | ||
2050 | |||
2051 | static struct omap_hwmod omap44xx_hsi_hwmod = { | ||
2052 | .name = "hsi", | ||
2053 | .class = &omap44xx_hsi_hwmod_class, | ||
2054 | .mpu_irqs = omap44xx_hsi_irqs, | ||
2055 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_hsi_irqs), | ||
2056 | .main_clk = "hsi_fck", | ||
2057 | .prcm = { | ||
2058 | .omap4 = { | ||
2059 | .clkctrl_reg = OMAP4430_CM_L3INIT_HSI_CLKCTRL, | ||
2060 | }, | ||
2061 | }, | ||
2062 | .slaves = omap44xx_hsi_slaves, | ||
2063 | .slaves_cnt = ARRAY_SIZE(omap44xx_hsi_slaves), | ||
2064 | .masters = omap44xx_hsi_masters, | ||
2065 | .masters_cnt = ARRAY_SIZE(omap44xx_hsi_masters), | ||
2066 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
2067 | }; | ||
2068 | |||
2069 | /* | ||
1096 | * 'i2c' class | 2070 | * 'i2c' class |
1097 | * multimaster high-speed i2c controller | 2071 | * multimaster high-speed i2c controller |
1098 | */ | 2072 | */ |
@@ -1326,6 +2300,188 @@ static struct omap_hwmod omap44xx_i2c4_hwmod = { | |||
1326 | }; | 2300 | }; |
1327 | 2301 | ||
1328 | /* | 2302 | /* |
2303 | * 'ipu' class | ||
2304 | * imaging processor unit | ||
2305 | */ | ||
2306 | |||
2307 | static struct omap_hwmod_class omap44xx_ipu_hwmod_class = { | ||
2308 | .name = "ipu", | ||
2309 | }; | ||
2310 | |||
2311 | /* ipu */ | ||
2312 | static struct omap_hwmod_irq_info omap44xx_ipu_irqs[] = { | ||
2313 | { .irq = 100 + OMAP44XX_IRQ_GIC_START }, | ||
2314 | }; | ||
2315 | |||
2316 | static struct omap_hwmod_rst_info omap44xx_ipu_c0_resets[] = { | ||
2317 | { .name = "cpu0", .rst_shift = 0 }, | ||
2318 | }; | ||
2319 | |||
2320 | static struct omap_hwmod_rst_info omap44xx_ipu_c1_resets[] = { | ||
2321 | { .name = "cpu1", .rst_shift = 1 }, | ||
2322 | }; | ||
2323 | |||
2324 | static struct omap_hwmod_rst_info omap44xx_ipu_resets[] = { | ||
2325 | { .name = "mmu_cache", .rst_shift = 2 }, | ||
2326 | }; | ||
2327 | |||
2328 | /* ipu master ports */ | ||
2329 | static struct omap_hwmod_ocp_if *omap44xx_ipu_masters[] = { | ||
2330 | &omap44xx_ipu__l3_main_2, | ||
2331 | }; | ||
2332 | |||
2333 | /* l3_main_2 -> ipu */ | ||
2334 | static struct omap_hwmod_ocp_if omap44xx_l3_main_2__ipu = { | ||
2335 | .master = &omap44xx_l3_main_2_hwmod, | ||
2336 | .slave = &omap44xx_ipu_hwmod, | ||
2337 | .clk = "l3_div_ck", | ||
2338 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2339 | }; | ||
2340 | |||
2341 | /* ipu slave ports */ | ||
2342 | static struct omap_hwmod_ocp_if *omap44xx_ipu_slaves[] = { | ||
2343 | &omap44xx_l3_main_2__ipu, | ||
2344 | }; | ||
2345 | |||
2346 | /* Pseudo hwmod for reset control purpose only */ | ||
2347 | static struct omap_hwmod omap44xx_ipu_c0_hwmod = { | ||
2348 | .name = "ipu_c0", | ||
2349 | .class = &omap44xx_ipu_hwmod_class, | ||
2350 | .flags = HWMOD_INIT_NO_RESET, | ||
2351 | .rst_lines = omap44xx_ipu_c0_resets, | ||
2352 | .rst_lines_cnt = ARRAY_SIZE(omap44xx_ipu_c0_resets), | ||
2353 | .prcm = { | ||
2354 | .omap4 = { | ||
2355 | .rstctrl_reg = OMAP4430_RM_DUCATI_RSTCTRL, | ||
2356 | }, | ||
2357 | }, | ||
2358 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
2359 | }; | ||
2360 | |||
2361 | /* Pseudo hwmod for reset control purpose only */ | ||
2362 | static struct omap_hwmod omap44xx_ipu_c1_hwmod = { | ||
2363 | .name = "ipu_c1", | ||
2364 | .class = &omap44xx_ipu_hwmod_class, | ||
2365 | .flags = HWMOD_INIT_NO_RESET, | ||
2366 | .rst_lines = omap44xx_ipu_c1_resets, | ||
2367 | .rst_lines_cnt = ARRAY_SIZE(omap44xx_ipu_c1_resets), | ||
2368 | .prcm = { | ||
2369 | .omap4 = { | ||
2370 | .rstctrl_reg = OMAP4430_RM_DUCATI_RSTCTRL, | ||
2371 | }, | ||
2372 | }, | ||
2373 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
2374 | }; | ||
2375 | |||
2376 | static struct omap_hwmod omap44xx_ipu_hwmod = { | ||
2377 | .name = "ipu", | ||
2378 | .class = &omap44xx_ipu_hwmod_class, | ||
2379 | .mpu_irqs = omap44xx_ipu_irqs, | ||
2380 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_ipu_irqs), | ||
2381 | .rst_lines = omap44xx_ipu_resets, | ||
2382 | .rst_lines_cnt = ARRAY_SIZE(omap44xx_ipu_resets), | ||
2383 | .main_clk = "ipu_fck", | ||
2384 | .prcm = { | ||
2385 | .omap4 = { | ||
2386 | .clkctrl_reg = OMAP4430_CM_DUCATI_DUCATI_CLKCTRL, | ||
2387 | .rstctrl_reg = OMAP4430_RM_DUCATI_RSTCTRL, | ||
2388 | }, | ||
2389 | }, | ||
2390 | .slaves = omap44xx_ipu_slaves, | ||
2391 | .slaves_cnt = ARRAY_SIZE(omap44xx_ipu_slaves), | ||
2392 | .masters = omap44xx_ipu_masters, | ||
2393 | .masters_cnt = ARRAY_SIZE(omap44xx_ipu_masters), | ||
2394 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
2395 | }; | ||
2396 | |||
2397 | /* | ||
2398 | * 'iss' class | ||
2399 | * external images sensor pixel data processor | ||
2400 | */ | ||
2401 | |||
2402 | static struct omap_hwmod_class_sysconfig omap44xx_iss_sysc = { | ||
2403 | .rev_offs = 0x0000, | ||
2404 | .sysc_offs = 0x0010, | ||
2405 | .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_RESET_STATUS | | ||
2406 | SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET), | ||
2407 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | | ||
2408 | SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO | | ||
2409 | MSTANDBY_SMART), | ||
2410 | .sysc_fields = &omap_hwmod_sysc_type2, | ||
2411 | }; | ||
2412 | |||
2413 | static struct omap_hwmod_class omap44xx_iss_hwmod_class = { | ||
2414 | .name = "iss", | ||
2415 | .sysc = &omap44xx_iss_sysc, | ||
2416 | }; | ||
2417 | |||
2418 | /* iss */ | ||
2419 | static struct omap_hwmod_irq_info omap44xx_iss_irqs[] = { | ||
2420 | { .irq = 24 + OMAP44XX_IRQ_GIC_START }, | ||
2421 | }; | ||
2422 | |||
2423 | static struct omap_hwmod_dma_info omap44xx_iss_sdma_reqs[] = { | ||
2424 | { .name = "1", .dma_req = 8 + OMAP44XX_DMA_REQ_START }, | ||
2425 | { .name = "2", .dma_req = 9 + OMAP44XX_DMA_REQ_START }, | ||
2426 | { .name = "3", .dma_req = 11 + OMAP44XX_DMA_REQ_START }, | ||
2427 | { .name = "4", .dma_req = 12 + OMAP44XX_DMA_REQ_START }, | ||
2428 | }; | ||
2429 | |||
2430 | /* iss master ports */ | ||
2431 | static struct omap_hwmod_ocp_if *omap44xx_iss_masters[] = { | ||
2432 | &omap44xx_iss__l3_main_2, | ||
2433 | }; | ||
2434 | |||
2435 | static struct omap_hwmod_addr_space omap44xx_iss_addrs[] = { | ||
2436 | { | ||
2437 | .pa_start = 0x52000000, | ||
2438 | .pa_end = 0x520000ff, | ||
2439 | .flags = ADDR_TYPE_RT | ||
2440 | }, | ||
2441 | }; | ||
2442 | |||
2443 | /* l3_main_2 -> iss */ | ||
2444 | static struct omap_hwmod_ocp_if omap44xx_l3_main_2__iss = { | ||
2445 | .master = &omap44xx_l3_main_2_hwmod, | ||
2446 | .slave = &omap44xx_iss_hwmod, | ||
2447 | .clk = "l3_div_ck", | ||
2448 | .addr = omap44xx_iss_addrs, | ||
2449 | .addr_cnt = ARRAY_SIZE(omap44xx_iss_addrs), | ||
2450 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2451 | }; | ||
2452 | |||
2453 | /* iss slave ports */ | ||
2454 | static struct omap_hwmod_ocp_if *omap44xx_iss_slaves[] = { | ||
2455 | &omap44xx_l3_main_2__iss, | ||
2456 | }; | ||
2457 | |||
2458 | static struct omap_hwmod_opt_clk iss_opt_clks[] = { | ||
2459 | { .role = "ctrlclk", .clk = "iss_ctrlclk" }, | ||
2460 | }; | ||
2461 | |||
2462 | static struct omap_hwmod omap44xx_iss_hwmod = { | ||
2463 | .name = "iss", | ||
2464 | .class = &omap44xx_iss_hwmod_class, | ||
2465 | .mpu_irqs = omap44xx_iss_irqs, | ||
2466 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_iss_irqs), | ||
2467 | .sdma_reqs = omap44xx_iss_sdma_reqs, | ||
2468 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_iss_sdma_reqs), | ||
2469 | .main_clk = "iss_fck", | ||
2470 | .prcm = { | ||
2471 | .omap4 = { | ||
2472 | .clkctrl_reg = OMAP4430_CM_CAM_ISS_CLKCTRL, | ||
2473 | }, | ||
2474 | }, | ||
2475 | .opt_clks = iss_opt_clks, | ||
2476 | .opt_clks_cnt = ARRAY_SIZE(iss_opt_clks), | ||
2477 | .slaves = omap44xx_iss_slaves, | ||
2478 | .slaves_cnt = ARRAY_SIZE(omap44xx_iss_slaves), | ||
2479 | .masters = omap44xx_iss_masters, | ||
2480 | .masters_cnt = ARRAY_SIZE(omap44xx_iss_masters), | ||
2481 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
2482 | }; | ||
2483 | |||
2484 | /* | ||
1329 | * 'iva' class | 2485 | * 'iva' class |
1330 | * multi-standard video encoder/decoder hardware accelerator | 2486 | * multi-standard video encoder/decoder hardware accelerator |
1331 | */ | 2487 | */ |
@@ -1435,6 +2591,1070 @@ static struct omap_hwmod omap44xx_iva_hwmod = { | |||
1435 | }; | 2591 | }; |
1436 | 2592 | ||
1437 | /* | 2593 | /* |
2594 | * 'kbd' class | ||
2595 | * keyboard controller | ||
2596 | */ | ||
2597 | |||
2598 | static struct omap_hwmod_class_sysconfig omap44xx_kbd_sysc = { | ||
2599 | .rev_offs = 0x0000, | ||
2600 | .sysc_offs = 0x0010, | ||
2601 | .syss_offs = 0x0014, | ||
2602 | .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY | | ||
2603 | SYSC_HAS_EMUFREE | SYSC_HAS_ENAWAKEUP | | ||
2604 | SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET | | ||
2605 | SYSS_HAS_RESET_STATUS), | ||
2606 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | ||
2607 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
2608 | }; | ||
2609 | |||
2610 | static struct omap_hwmod_class omap44xx_kbd_hwmod_class = { | ||
2611 | .name = "kbd", | ||
2612 | .sysc = &omap44xx_kbd_sysc, | ||
2613 | }; | ||
2614 | |||
2615 | /* kbd */ | ||
2616 | static struct omap_hwmod omap44xx_kbd_hwmod; | ||
2617 | static struct omap_hwmod_irq_info omap44xx_kbd_irqs[] = { | ||
2618 | { .irq = 120 + OMAP44XX_IRQ_GIC_START }, | ||
2619 | }; | ||
2620 | |||
2621 | static struct omap_hwmod_addr_space omap44xx_kbd_addrs[] = { | ||
2622 | { | ||
2623 | .pa_start = 0x4a31c000, | ||
2624 | .pa_end = 0x4a31c07f, | ||
2625 | .flags = ADDR_TYPE_RT | ||
2626 | }, | ||
2627 | }; | ||
2628 | |||
2629 | /* l4_wkup -> kbd */ | ||
2630 | static struct omap_hwmod_ocp_if omap44xx_l4_wkup__kbd = { | ||
2631 | .master = &omap44xx_l4_wkup_hwmod, | ||
2632 | .slave = &omap44xx_kbd_hwmod, | ||
2633 | .clk = "l4_wkup_clk_mux_ck", | ||
2634 | .addr = omap44xx_kbd_addrs, | ||
2635 | .addr_cnt = ARRAY_SIZE(omap44xx_kbd_addrs), | ||
2636 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2637 | }; | ||
2638 | |||
2639 | /* kbd slave ports */ | ||
2640 | static struct omap_hwmod_ocp_if *omap44xx_kbd_slaves[] = { | ||
2641 | &omap44xx_l4_wkup__kbd, | ||
2642 | }; | ||
2643 | |||
2644 | static struct omap_hwmod omap44xx_kbd_hwmod = { | ||
2645 | .name = "kbd", | ||
2646 | .class = &omap44xx_kbd_hwmod_class, | ||
2647 | .mpu_irqs = omap44xx_kbd_irqs, | ||
2648 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_kbd_irqs), | ||
2649 | .main_clk = "kbd_fck", | ||
2650 | .prcm = { | ||
2651 | .omap4 = { | ||
2652 | .clkctrl_reg = OMAP4430_CM_WKUP_KEYBOARD_CLKCTRL, | ||
2653 | }, | ||
2654 | }, | ||
2655 | .slaves = omap44xx_kbd_slaves, | ||
2656 | .slaves_cnt = ARRAY_SIZE(omap44xx_kbd_slaves), | ||
2657 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
2658 | }; | ||
2659 | |||
2660 | /* | ||
2661 | * 'mailbox' class | ||
2662 | * mailbox module allowing communication between the on-chip processors using a | ||
2663 | * queued mailbox-interrupt mechanism. | ||
2664 | */ | ||
2665 | |||
2666 | static struct omap_hwmod_class_sysconfig omap44xx_mailbox_sysc = { | ||
2667 | .rev_offs = 0x0000, | ||
2668 | .sysc_offs = 0x0010, | ||
2669 | .sysc_flags = (SYSC_HAS_RESET_STATUS | SYSC_HAS_SIDLEMODE | | ||
2670 | SYSC_HAS_SOFTRESET), | ||
2671 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | ||
2672 | .sysc_fields = &omap_hwmod_sysc_type2, | ||
2673 | }; | ||
2674 | |||
2675 | static struct omap_hwmod_class omap44xx_mailbox_hwmod_class = { | ||
2676 | .name = "mailbox", | ||
2677 | .sysc = &omap44xx_mailbox_sysc, | ||
2678 | }; | ||
2679 | |||
2680 | /* mailbox */ | ||
2681 | static struct omap_hwmod omap44xx_mailbox_hwmod; | ||
2682 | static struct omap_hwmod_irq_info omap44xx_mailbox_irqs[] = { | ||
2683 | { .irq = 26 + OMAP44XX_IRQ_GIC_START }, | ||
2684 | }; | ||
2685 | |||
2686 | static struct omap_hwmod_addr_space omap44xx_mailbox_addrs[] = { | ||
2687 | { | ||
2688 | .pa_start = 0x4a0f4000, | ||
2689 | .pa_end = 0x4a0f41ff, | ||
2690 | .flags = ADDR_TYPE_RT | ||
2691 | }, | ||
2692 | }; | ||
2693 | |||
2694 | /* l4_cfg -> mailbox */ | ||
2695 | static struct omap_hwmod_ocp_if omap44xx_l4_cfg__mailbox = { | ||
2696 | .master = &omap44xx_l4_cfg_hwmod, | ||
2697 | .slave = &omap44xx_mailbox_hwmod, | ||
2698 | .clk = "l4_div_ck", | ||
2699 | .addr = omap44xx_mailbox_addrs, | ||
2700 | .addr_cnt = ARRAY_SIZE(omap44xx_mailbox_addrs), | ||
2701 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2702 | }; | ||
2703 | |||
2704 | /* mailbox slave ports */ | ||
2705 | static struct omap_hwmod_ocp_if *omap44xx_mailbox_slaves[] = { | ||
2706 | &omap44xx_l4_cfg__mailbox, | ||
2707 | }; | ||
2708 | |||
2709 | static struct omap_hwmod omap44xx_mailbox_hwmod = { | ||
2710 | .name = "mailbox", | ||
2711 | .class = &omap44xx_mailbox_hwmod_class, | ||
2712 | .mpu_irqs = omap44xx_mailbox_irqs, | ||
2713 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mailbox_irqs), | ||
2714 | .prcm = { | ||
2715 | .omap4 = { | ||
2716 | .clkctrl_reg = OMAP4430_CM_L4CFG_MAILBOX_CLKCTRL, | ||
2717 | }, | ||
2718 | }, | ||
2719 | .slaves = omap44xx_mailbox_slaves, | ||
2720 | .slaves_cnt = ARRAY_SIZE(omap44xx_mailbox_slaves), | ||
2721 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
2722 | }; | ||
2723 | |||
2724 | /* | ||
2725 | * 'mcbsp' class | ||
2726 | * multi channel buffered serial port controller | ||
2727 | */ | ||
2728 | |||
2729 | static struct omap_hwmod_class_sysconfig omap44xx_mcbsp_sysc = { | ||
2730 | .sysc_offs = 0x008c, | ||
2731 | .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_ENAWAKEUP | | ||
2732 | SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET), | ||
2733 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | ||
2734 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
2735 | }; | ||
2736 | |||
2737 | static struct omap_hwmod_class omap44xx_mcbsp_hwmod_class = { | ||
2738 | .name = "mcbsp", | ||
2739 | .sysc = &omap44xx_mcbsp_sysc, | ||
2740 | }; | ||
2741 | |||
2742 | /* mcbsp1 */ | ||
2743 | static struct omap_hwmod omap44xx_mcbsp1_hwmod; | ||
2744 | static struct omap_hwmod_irq_info omap44xx_mcbsp1_irqs[] = { | ||
2745 | { .irq = 17 + OMAP44XX_IRQ_GIC_START }, | ||
2746 | }; | ||
2747 | |||
2748 | static struct omap_hwmod_dma_info omap44xx_mcbsp1_sdma_reqs[] = { | ||
2749 | { .name = "tx", .dma_req = 32 + OMAP44XX_DMA_REQ_START }, | ||
2750 | { .name = "rx", .dma_req = 33 + OMAP44XX_DMA_REQ_START }, | ||
2751 | }; | ||
2752 | |||
2753 | static struct omap_hwmod_addr_space omap44xx_mcbsp1_addrs[] = { | ||
2754 | { | ||
2755 | .pa_start = 0x40122000, | ||
2756 | .pa_end = 0x401220ff, | ||
2757 | .flags = ADDR_TYPE_RT | ||
2758 | }, | ||
2759 | }; | ||
2760 | |||
2761 | /* l4_abe -> mcbsp1 */ | ||
2762 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp1 = { | ||
2763 | .master = &omap44xx_l4_abe_hwmod, | ||
2764 | .slave = &omap44xx_mcbsp1_hwmod, | ||
2765 | .clk = "ocp_abe_iclk", | ||
2766 | .addr = omap44xx_mcbsp1_addrs, | ||
2767 | .addr_cnt = ARRAY_SIZE(omap44xx_mcbsp1_addrs), | ||
2768 | .user = OCP_USER_MPU, | ||
2769 | }; | ||
2770 | |||
2771 | static struct omap_hwmod_addr_space omap44xx_mcbsp1_dma_addrs[] = { | ||
2772 | { | ||
2773 | .pa_start = 0x49022000, | ||
2774 | .pa_end = 0x490220ff, | ||
2775 | .flags = ADDR_TYPE_RT | ||
2776 | }, | ||
2777 | }; | ||
2778 | |||
2779 | /* l4_abe -> mcbsp1 (dma) */ | ||
2780 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp1_dma = { | ||
2781 | .master = &omap44xx_l4_abe_hwmod, | ||
2782 | .slave = &omap44xx_mcbsp1_hwmod, | ||
2783 | .clk = "ocp_abe_iclk", | ||
2784 | .addr = omap44xx_mcbsp1_dma_addrs, | ||
2785 | .addr_cnt = ARRAY_SIZE(omap44xx_mcbsp1_dma_addrs), | ||
2786 | .user = OCP_USER_SDMA, | ||
2787 | }; | ||
2788 | |||
2789 | /* mcbsp1 slave ports */ | ||
2790 | static struct omap_hwmod_ocp_if *omap44xx_mcbsp1_slaves[] = { | ||
2791 | &omap44xx_l4_abe__mcbsp1, | ||
2792 | &omap44xx_l4_abe__mcbsp1_dma, | ||
2793 | }; | ||
2794 | |||
2795 | static struct omap_hwmod omap44xx_mcbsp1_hwmod = { | ||
2796 | .name = "mcbsp1", | ||
2797 | .class = &omap44xx_mcbsp_hwmod_class, | ||
2798 | .mpu_irqs = omap44xx_mcbsp1_irqs, | ||
2799 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mcbsp1_irqs), | ||
2800 | .sdma_reqs = omap44xx_mcbsp1_sdma_reqs, | ||
2801 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_mcbsp1_sdma_reqs), | ||
2802 | .main_clk = "mcbsp1_fck", | ||
2803 | .prcm = { | ||
2804 | .omap4 = { | ||
2805 | .clkctrl_reg = OMAP4430_CM1_ABE_MCBSP1_CLKCTRL, | ||
2806 | }, | ||
2807 | }, | ||
2808 | .slaves = omap44xx_mcbsp1_slaves, | ||
2809 | .slaves_cnt = ARRAY_SIZE(omap44xx_mcbsp1_slaves), | ||
2810 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
2811 | }; | ||
2812 | |||
2813 | /* mcbsp2 */ | ||
2814 | static struct omap_hwmod omap44xx_mcbsp2_hwmod; | ||
2815 | static struct omap_hwmod_irq_info omap44xx_mcbsp2_irqs[] = { | ||
2816 | { .irq = 22 + OMAP44XX_IRQ_GIC_START }, | ||
2817 | }; | ||
2818 | |||
2819 | static struct omap_hwmod_dma_info omap44xx_mcbsp2_sdma_reqs[] = { | ||
2820 | { .name = "tx", .dma_req = 16 + OMAP44XX_DMA_REQ_START }, | ||
2821 | { .name = "rx", .dma_req = 17 + OMAP44XX_DMA_REQ_START }, | ||
2822 | }; | ||
2823 | |||
2824 | static struct omap_hwmod_addr_space omap44xx_mcbsp2_addrs[] = { | ||
2825 | { | ||
2826 | .pa_start = 0x40124000, | ||
2827 | .pa_end = 0x401240ff, | ||
2828 | .flags = ADDR_TYPE_RT | ||
2829 | }, | ||
2830 | }; | ||
2831 | |||
2832 | /* l4_abe -> mcbsp2 */ | ||
2833 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp2 = { | ||
2834 | .master = &omap44xx_l4_abe_hwmod, | ||
2835 | .slave = &omap44xx_mcbsp2_hwmod, | ||
2836 | .clk = "ocp_abe_iclk", | ||
2837 | .addr = omap44xx_mcbsp2_addrs, | ||
2838 | .addr_cnt = ARRAY_SIZE(omap44xx_mcbsp2_addrs), | ||
2839 | .user = OCP_USER_MPU, | ||
2840 | }; | ||
2841 | |||
2842 | static struct omap_hwmod_addr_space omap44xx_mcbsp2_dma_addrs[] = { | ||
2843 | { | ||
2844 | .pa_start = 0x49024000, | ||
2845 | .pa_end = 0x490240ff, | ||
2846 | .flags = ADDR_TYPE_RT | ||
2847 | }, | ||
2848 | }; | ||
2849 | |||
2850 | /* l4_abe -> mcbsp2 (dma) */ | ||
2851 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp2_dma = { | ||
2852 | .master = &omap44xx_l4_abe_hwmod, | ||
2853 | .slave = &omap44xx_mcbsp2_hwmod, | ||
2854 | .clk = "ocp_abe_iclk", | ||
2855 | .addr = omap44xx_mcbsp2_dma_addrs, | ||
2856 | .addr_cnt = ARRAY_SIZE(omap44xx_mcbsp2_dma_addrs), | ||
2857 | .user = OCP_USER_SDMA, | ||
2858 | }; | ||
2859 | |||
2860 | /* mcbsp2 slave ports */ | ||
2861 | static struct omap_hwmod_ocp_if *omap44xx_mcbsp2_slaves[] = { | ||
2862 | &omap44xx_l4_abe__mcbsp2, | ||
2863 | &omap44xx_l4_abe__mcbsp2_dma, | ||
2864 | }; | ||
2865 | |||
2866 | static struct omap_hwmod omap44xx_mcbsp2_hwmod = { | ||
2867 | .name = "mcbsp2", | ||
2868 | .class = &omap44xx_mcbsp_hwmod_class, | ||
2869 | .mpu_irqs = omap44xx_mcbsp2_irqs, | ||
2870 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mcbsp2_irqs), | ||
2871 | .sdma_reqs = omap44xx_mcbsp2_sdma_reqs, | ||
2872 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_mcbsp2_sdma_reqs), | ||
2873 | .main_clk = "mcbsp2_fck", | ||
2874 | .prcm = { | ||
2875 | .omap4 = { | ||
2876 | .clkctrl_reg = OMAP4430_CM1_ABE_MCBSP2_CLKCTRL, | ||
2877 | }, | ||
2878 | }, | ||
2879 | .slaves = omap44xx_mcbsp2_slaves, | ||
2880 | .slaves_cnt = ARRAY_SIZE(omap44xx_mcbsp2_slaves), | ||
2881 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
2882 | }; | ||
2883 | |||
2884 | /* mcbsp3 */ | ||
2885 | static struct omap_hwmod omap44xx_mcbsp3_hwmod; | ||
2886 | static struct omap_hwmod_irq_info omap44xx_mcbsp3_irqs[] = { | ||
2887 | { .irq = 23 + OMAP44XX_IRQ_GIC_START }, | ||
2888 | }; | ||
2889 | |||
2890 | static struct omap_hwmod_dma_info omap44xx_mcbsp3_sdma_reqs[] = { | ||
2891 | { .name = "tx", .dma_req = 18 + OMAP44XX_DMA_REQ_START }, | ||
2892 | { .name = "rx", .dma_req = 19 + OMAP44XX_DMA_REQ_START }, | ||
2893 | }; | ||
2894 | |||
2895 | static struct omap_hwmod_addr_space omap44xx_mcbsp3_addrs[] = { | ||
2896 | { | ||
2897 | .pa_start = 0x40126000, | ||
2898 | .pa_end = 0x401260ff, | ||
2899 | .flags = ADDR_TYPE_RT | ||
2900 | }, | ||
2901 | }; | ||
2902 | |||
2903 | /* l4_abe -> mcbsp3 */ | ||
2904 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp3 = { | ||
2905 | .master = &omap44xx_l4_abe_hwmod, | ||
2906 | .slave = &omap44xx_mcbsp3_hwmod, | ||
2907 | .clk = "ocp_abe_iclk", | ||
2908 | .addr = omap44xx_mcbsp3_addrs, | ||
2909 | .addr_cnt = ARRAY_SIZE(omap44xx_mcbsp3_addrs), | ||
2910 | .user = OCP_USER_MPU, | ||
2911 | }; | ||
2912 | |||
2913 | static struct omap_hwmod_addr_space omap44xx_mcbsp3_dma_addrs[] = { | ||
2914 | { | ||
2915 | .pa_start = 0x49026000, | ||
2916 | .pa_end = 0x490260ff, | ||
2917 | .flags = ADDR_TYPE_RT | ||
2918 | }, | ||
2919 | }; | ||
2920 | |||
2921 | /* l4_abe -> mcbsp3 (dma) */ | ||
2922 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp3_dma = { | ||
2923 | .master = &omap44xx_l4_abe_hwmod, | ||
2924 | .slave = &omap44xx_mcbsp3_hwmod, | ||
2925 | .clk = "ocp_abe_iclk", | ||
2926 | .addr = omap44xx_mcbsp3_dma_addrs, | ||
2927 | .addr_cnt = ARRAY_SIZE(omap44xx_mcbsp3_dma_addrs), | ||
2928 | .user = OCP_USER_SDMA, | ||
2929 | }; | ||
2930 | |||
2931 | /* mcbsp3 slave ports */ | ||
2932 | static struct omap_hwmod_ocp_if *omap44xx_mcbsp3_slaves[] = { | ||
2933 | &omap44xx_l4_abe__mcbsp3, | ||
2934 | &omap44xx_l4_abe__mcbsp3_dma, | ||
2935 | }; | ||
2936 | |||
2937 | static struct omap_hwmod omap44xx_mcbsp3_hwmod = { | ||
2938 | .name = "mcbsp3", | ||
2939 | .class = &omap44xx_mcbsp_hwmod_class, | ||
2940 | .mpu_irqs = omap44xx_mcbsp3_irqs, | ||
2941 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mcbsp3_irqs), | ||
2942 | .sdma_reqs = omap44xx_mcbsp3_sdma_reqs, | ||
2943 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_mcbsp3_sdma_reqs), | ||
2944 | .main_clk = "mcbsp3_fck", | ||
2945 | .prcm = { | ||
2946 | .omap4 = { | ||
2947 | .clkctrl_reg = OMAP4430_CM1_ABE_MCBSP3_CLKCTRL, | ||
2948 | }, | ||
2949 | }, | ||
2950 | .slaves = omap44xx_mcbsp3_slaves, | ||
2951 | .slaves_cnt = ARRAY_SIZE(omap44xx_mcbsp3_slaves), | ||
2952 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
2953 | }; | ||
2954 | |||
2955 | /* mcbsp4 */ | ||
2956 | static struct omap_hwmod omap44xx_mcbsp4_hwmod; | ||
2957 | static struct omap_hwmod_irq_info omap44xx_mcbsp4_irqs[] = { | ||
2958 | { .irq = 16 + OMAP44XX_IRQ_GIC_START }, | ||
2959 | }; | ||
2960 | |||
2961 | static struct omap_hwmod_dma_info omap44xx_mcbsp4_sdma_reqs[] = { | ||
2962 | { .name = "tx", .dma_req = 30 + OMAP44XX_DMA_REQ_START }, | ||
2963 | { .name = "rx", .dma_req = 31 + OMAP44XX_DMA_REQ_START }, | ||
2964 | }; | ||
2965 | |||
2966 | static struct omap_hwmod_addr_space omap44xx_mcbsp4_addrs[] = { | ||
2967 | { | ||
2968 | .pa_start = 0x48096000, | ||
2969 | .pa_end = 0x480960ff, | ||
2970 | .flags = ADDR_TYPE_RT | ||
2971 | }, | ||
2972 | }; | ||
2973 | |||
2974 | /* l4_per -> mcbsp4 */ | ||
2975 | static struct omap_hwmod_ocp_if omap44xx_l4_per__mcbsp4 = { | ||
2976 | .master = &omap44xx_l4_per_hwmod, | ||
2977 | .slave = &omap44xx_mcbsp4_hwmod, | ||
2978 | .clk = "l4_div_ck", | ||
2979 | .addr = omap44xx_mcbsp4_addrs, | ||
2980 | .addr_cnt = ARRAY_SIZE(omap44xx_mcbsp4_addrs), | ||
2981 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
2982 | }; | ||
2983 | |||
2984 | /* mcbsp4 slave ports */ | ||
2985 | static struct omap_hwmod_ocp_if *omap44xx_mcbsp4_slaves[] = { | ||
2986 | &omap44xx_l4_per__mcbsp4, | ||
2987 | }; | ||
2988 | |||
2989 | static struct omap_hwmod omap44xx_mcbsp4_hwmod = { | ||
2990 | .name = "mcbsp4", | ||
2991 | .class = &omap44xx_mcbsp_hwmod_class, | ||
2992 | .mpu_irqs = omap44xx_mcbsp4_irqs, | ||
2993 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mcbsp4_irqs), | ||
2994 | .sdma_reqs = omap44xx_mcbsp4_sdma_reqs, | ||
2995 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_mcbsp4_sdma_reqs), | ||
2996 | .main_clk = "mcbsp4_fck", | ||
2997 | .prcm = { | ||
2998 | .omap4 = { | ||
2999 | .clkctrl_reg = OMAP4430_CM_L4PER_MCBSP4_CLKCTRL, | ||
3000 | }, | ||
3001 | }, | ||
3002 | .slaves = omap44xx_mcbsp4_slaves, | ||
3003 | .slaves_cnt = ARRAY_SIZE(omap44xx_mcbsp4_slaves), | ||
3004 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
3005 | }; | ||
3006 | |||
3007 | /* | ||
3008 | * 'mcpdm' class | ||
3009 | * multi channel pdm controller (proprietary interface with phoenix power | ||
3010 | * ic) | ||
3011 | */ | ||
3012 | |||
3013 | static struct omap_hwmod_class_sysconfig omap44xx_mcpdm_sysc = { | ||
3014 | .rev_offs = 0x0000, | ||
3015 | .sysc_offs = 0x0010, | ||
3016 | .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS | | ||
3017 | SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET), | ||
3018 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | | ||
3019 | SIDLE_SMART_WKUP), | ||
3020 | .sysc_fields = &omap_hwmod_sysc_type2, | ||
3021 | }; | ||
3022 | |||
3023 | static struct omap_hwmod_class omap44xx_mcpdm_hwmod_class = { | ||
3024 | .name = "mcpdm", | ||
3025 | .sysc = &omap44xx_mcpdm_sysc, | ||
3026 | }; | ||
3027 | |||
3028 | /* mcpdm */ | ||
3029 | static struct omap_hwmod omap44xx_mcpdm_hwmod; | ||
3030 | static struct omap_hwmod_irq_info omap44xx_mcpdm_irqs[] = { | ||
3031 | { .irq = 112 + OMAP44XX_IRQ_GIC_START }, | ||
3032 | }; | ||
3033 | |||
3034 | static struct omap_hwmod_dma_info omap44xx_mcpdm_sdma_reqs[] = { | ||
3035 | { .name = "up_link", .dma_req = 64 + OMAP44XX_DMA_REQ_START }, | ||
3036 | { .name = "dn_link", .dma_req = 65 + OMAP44XX_DMA_REQ_START }, | ||
3037 | }; | ||
3038 | |||
3039 | static struct omap_hwmod_addr_space omap44xx_mcpdm_addrs[] = { | ||
3040 | { | ||
3041 | .pa_start = 0x40132000, | ||
3042 | .pa_end = 0x4013207f, | ||
3043 | .flags = ADDR_TYPE_RT | ||
3044 | }, | ||
3045 | }; | ||
3046 | |||
3047 | /* l4_abe -> mcpdm */ | ||
3048 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcpdm = { | ||
3049 | .master = &omap44xx_l4_abe_hwmod, | ||
3050 | .slave = &omap44xx_mcpdm_hwmod, | ||
3051 | .clk = "ocp_abe_iclk", | ||
3052 | .addr = omap44xx_mcpdm_addrs, | ||
3053 | .addr_cnt = ARRAY_SIZE(omap44xx_mcpdm_addrs), | ||
3054 | .user = OCP_USER_MPU, | ||
3055 | }; | ||
3056 | |||
3057 | static struct omap_hwmod_addr_space omap44xx_mcpdm_dma_addrs[] = { | ||
3058 | { | ||
3059 | .pa_start = 0x49032000, | ||
3060 | .pa_end = 0x4903207f, | ||
3061 | .flags = ADDR_TYPE_RT | ||
3062 | }, | ||
3063 | }; | ||
3064 | |||
3065 | /* l4_abe -> mcpdm (dma) */ | ||
3066 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcpdm_dma = { | ||
3067 | .master = &omap44xx_l4_abe_hwmod, | ||
3068 | .slave = &omap44xx_mcpdm_hwmod, | ||
3069 | .clk = "ocp_abe_iclk", | ||
3070 | .addr = omap44xx_mcpdm_dma_addrs, | ||
3071 | .addr_cnt = ARRAY_SIZE(omap44xx_mcpdm_dma_addrs), | ||
3072 | .user = OCP_USER_SDMA, | ||
3073 | }; | ||
3074 | |||
3075 | /* mcpdm slave ports */ | ||
3076 | static struct omap_hwmod_ocp_if *omap44xx_mcpdm_slaves[] = { | ||
3077 | &omap44xx_l4_abe__mcpdm, | ||
3078 | &omap44xx_l4_abe__mcpdm_dma, | ||
3079 | }; | ||
3080 | |||
3081 | static struct omap_hwmod omap44xx_mcpdm_hwmod = { | ||
3082 | .name = "mcpdm", | ||
3083 | .class = &omap44xx_mcpdm_hwmod_class, | ||
3084 | .mpu_irqs = omap44xx_mcpdm_irqs, | ||
3085 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mcpdm_irqs), | ||
3086 | .sdma_reqs = omap44xx_mcpdm_sdma_reqs, | ||
3087 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_mcpdm_sdma_reqs), | ||
3088 | .main_clk = "mcpdm_fck", | ||
3089 | .prcm = { | ||
3090 | .omap4 = { | ||
3091 | .clkctrl_reg = OMAP4430_CM1_ABE_PDM_CLKCTRL, | ||
3092 | }, | ||
3093 | }, | ||
3094 | .slaves = omap44xx_mcpdm_slaves, | ||
3095 | .slaves_cnt = ARRAY_SIZE(omap44xx_mcpdm_slaves), | ||
3096 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
3097 | }; | ||
3098 | |||
3099 | /* | ||
3100 | * 'mcspi' class | ||
3101 | * multichannel serial port interface (mcspi) / master/slave synchronous serial | ||
3102 | * bus | ||
3103 | */ | ||
3104 | |||
3105 | static struct omap_hwmod_class_sysconfig omap44xx_mcspi_sysc = { | ||
3106 | .rev_offs = 0x0000, | ||
3107 | .sysc_offs = 0x0010, | ||
3108 | .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS | | ||
3109 | SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET), | ||
3110 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | | ||
3111 | SIDLE_SMART_WKUP), | ||
3112 | .sysc_fields = &omap_hwmod_sysc_type2, | ||
3113 | }; | ||
3114 | |||
3115 | static struct omap_hwmod_class omap44xx_mcspi_hwmod_class = { | ||
3116 | .name = "mcspi", | ||
3117 | .sysc = &omap44xx_mcspi_sysc, | ||
3118 | .rev = OMAP4_MCSPI_REV, | ||
3119 | }; | ||
3120 | |||
3121 | /* mcspi1 */ | ||
3122 | static struct omap_hwmod omap44xx_mcspi1_hwmod; | ||
3123 | static struct omap_hwmod_irq_info omap44xx_mcspi1_irqs[] = { | ||
3124 | { .irq = 65 + OMAP44XX_IRQ_GIC_START }, | ||
3125 | }; | ||
3126 | |||
3127 | static struct omap_hwmod_dma_info omap44xx_mcspi1_sdma_reqs[] = { | ||
3128 | { .name = "tx0", .dma_req = 34 + OMAP44XX_DMA_REQ_START }, | ||
3129 | { .name = "rx0", .dma_req = 35 + OMAP44XX_DMA_REQ_START }, | ||
3130 | { .name = "tx1", .dma_req = 36 + OMAP44XX_DMA_REQ_START }, | ||
3131 | { .name = "rx1", .dma_req = 37 + OMAP44XX_DMA_REQ_START }, | ||
3132 | { .name = "tx2", .dma_req = 38 + OMAP44XX_DMA_REQ_START }, | ||
3133 | { .name = "rx2", .dma_req = 39 + OMAP44XX_DMA_REQ_START }, | ||
3134 | { .name = "tx3", .dma_req = 40 + OMAP44XX_DMA_REQ_START }, | ||
3135 | { .name = "rx3", .dma_req = 41 + OMAP44XX_DMA_REQ_START }, | ||
3136 | }; | ||
3137 | |||
3138 | static struct omap_hwmod_addr_space omap44xx_mcspi1_addrs[] = { | ||
3139 | { | ||
3140 | .pa_start = 0x48098000, | ||
3141 | .pa_end = 0x480981ff, | ||
3142 | .flags = ADDR_TYPE_RT | ||
3143 | }, | ||
3144 | }; | ||
3145 | |||
3146 | /* l4_per -> mcspi1 */ | ||
3147 | static struct omap_hwmod_ocp_if omap44xx_l4_per__mcspi1 = { | ||
3148 | .master = &omap44xx_l4_per_hwmod, | ||
3149 | .slave = &omap44xx_mcspi1_hwmod, | ||
3150 | .clk = "l4_div_ck", | ||
3151 | .addr = omap44xx_mcspi1_addrs, | ||
3152 | .addr_cnt = ARRAY_SIZE(omap44xx_mcspi1_addrs), | ||
3153 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
3154 | }; | ||
3155 | |||
3156 | /* mcspi1 slave ports */ | ||
3157 | static struct omap_hwmod_ocp_if *omap44xx_mcspi1_slaves[] = { | ||
3158 | &omap44xx_l4_per__mcspi1, | ||
3159 | }; | ||
3160 | |||
3161 | /* mcspi1 dev_attr */ | ||
3162 | static struct omap2_mcspi_dev_attr mcspi1_dev_attr = { | ||
3163 | .num_chipselect = 4, | ||
3164 | }; | ||
3165 | |||
3166 | static struct omap_hwmod omap44xx_mcspi1_hwmod = { | ||
3167 | .name = "mcspi1", | ||
3168 | .class = &omap44xx_mcspi_hwmod_class, | ||
3169 | .mpu_irqs = omap44xx_mcspi1_irqs, | ||
3170 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mcspi1_irqs), | ||
3171 | .sdma_reqs = omap44xx_mcspi1_sdma_reqs, | ||
3172 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_mcspi1_sdma_reqs), | ||
3173 | .main_clk = "mcspi1_fck", | ||
3174 | .prcm = { | ||
3175 | .omap4 = { | ||
3176 | .clkctrl_reg = OMAP4430_CM_L4PER_MCSPI1_CLKCTRL, | ||
3177 | }, | ||
3178 | }, | ||
3179 | .dev_attr = &mcspi1_dev_attr, | ||
3180 | .slaves = omap44xx_mcspi1_slaves, | ||
3181 | .slaves_cnt = ARRAY_SIZE(omap44xx_mcspi1_slaves), | ||
3182 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
3183 | }; | ||
3184 | |||
3185 | /* mcspi2 */ | ||
3186 | static struct omap_hwmod omap44xx_mcspi2_hwmod; | ||
3187 | static struct omap_hwmod_irq_info omap44xx_mcspi2_irqs[] = { | ||
3188 | { .irq = 66 + OMAP44XX_IRQ_GIC_START }, | ||
3189 | }; | ||
3190 | |||
3191 | static struct omap_hwmod_dma_info omap44xx_mcspi2_sdma_reqs[] = { | ||
3192 | { .name = "tx0", .dma_req = 42 + OMAP44XX_DMA_REQ_START }, | ||
3193 | { .name = "rx0", .dma_req = 43 + OMAP44XX_DMA_REQ_START }, | ||
3194 | { .name = "tx1", .dma_req = 44 + OMAP44XX_DMA_REQ_START }, | ||
3195 | { .name = "rx1", .dma_req = 45 + OMAP44XX_DMA_REQ_START }, | ||
3196 | }; | ||
3197 | |||
3198 | static struct omap_hwmod_addr_space omap44xx_mcspi2_addrs[] = { | ||
3199 | { | ||
3200 | .pa_start = 0x4809a000, | ||
3201 | .pa_end = 0x4809a1ff, | ||
3202 | .flags = ADDR_TYPE_RT | ||
3203 | }, | ||
3204 | }; | ||
3205 | |||
3206 | /* l4_per -> mcspi2 */ | ||
3207 | static struct omap_hwmod_ocp_if omap44xx_l4_per__mcspi2 = { | ||
3208 | .master = &omap44xx_l4_per_hwmod, | ||
3209 | .slave = &omap44xx_mcspi2_hwmod, | ||
3210 | .clk = "l4_div_ck", | ||
3211 | .addr = omap44xx_mcspi2_addrs, | ||
3212 | .addr_cnt = ARRAY_SIZE(omap44xx_mcspi2_addrs), | ||
3213 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
3214 | }; | ||
3215 | |||
3216 | /* mcspi2 slave ports */ | ||
3217 | static struct omap_hwmod_ocp_if *omap44xx_mcspi2_slaves[] = { | ||
3218 | &omap44xx_l4_per__mcspi2, | ||
3219 | }; | ||
3220 | |||
3221 | /* mcspi2 dev_attr */ | ||
3222 | static struct omap2_mcspi_dev_attr mcspi2_dev_attr = { | ||
3223 | .num_chipselect = 2, | ||
3224 | }; | ||
3225 | |||
3226 | static struct omap_hwmod omap44xx_mcspi2_hwmod = { | ||
3227 | .name = "mcspi2", | ||
3228 | .class = &omap44xx_mcspi_hwmod_class, | ||
3229 | .mpu_irqs = omap44xx_mcspi2_irqs, | ||
3230 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mcspi2_irqs), | ||
3231 | .sdma_reqs = omap44xx_mcspi2_sdma_reqs, | ||
3232 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_mcspi2_sdma_reqs), | ||
3233 | .main_clk = "mcspi2_fck", | ||
3234 | .prcm = { | ||
3235 | .omap4 = { | ||
3236 | .clkctrl_reg = OMAP4430_CM_L4PER_MCSPI2_CLKCTRL, | ||
3237 | }, | ||
3238 | }, | ||
3239 | .dev_attr = &mcspi2_dev_attr, | ||
3240 | .slaves = omap44xx_mcspi2_slaves, | ||
3241 | .slaves_cnt = ARRAY_SIZE(omap44xx_mcspi2_slaves), | ||
3242 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
3243 | }; | ||
3244 | |||
3245 | /* mcspi3 */ | ||
3246 | static struct omap_hwmod omap44xx_mcspi3_hwmod; | ||
3247 | static struct omap_hwmod_irq_info omap44xx_mcspi3_irqs[] = { | ||
3248 | { .irq = 91 + OMAP44XX_IRQ_GIC_START }, | ||
3249 | }; | ||
3250 | |||
3251 | static struct omap_hwmod_dma_info omap44xx_mcspi3_sdma_reqs[] = { | ||
3252 | { .name = "tx0", .dma_req = 14 + OMAP44XX_DMA_REQ_START }, | ||
3253 | { .name = "rx0", .dma_req = 15 + OMAP44XX_DMA_REQ_START }, | ||
3254 | { .name = "tx1", .dma_req = 22 + OMAP44XX_DMA_REQ_START }, | ||
3255 | { .name = "rx1", .dma_req = 23 + OMAP44XX_DMA_REQ_START }, | ||
3256 | }; | ||
3257 | |||
3258 | static struct omap_hwmod_addr_space omap44xx_mcspi3_addrs[] = { | ||
3259 | { | ||
3260 | .pa_start = 0x480b8000, | ||
3261 | .pa_end = 0x480b81ff, | ||
3262 | .flags = ADDR_TYPE_RT | ||
3263 | }, | ||
3264 | }; | ||
3265 | |||
3266 | /* l4_per -> mcspi3 */ | ||
3267 | static struct omap_hwmod_ocp_if omap44xx_l4_per__mcspi3 = { | ||
3268 | .master = &omap44xx_l4_per_hwmod, | ||
3269 | .slave = &omap44xx_mcspi3_hwmod, | ||
3270 | .clk = "l4_div_ck", | ||
3271 | .addr = omap44xx_mcspi3_addrs, | ||
3272 | .addr_cnt = ARRAY_SIZE(omap44xx_mcspi3_addrs), | ||
3273 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
3274 | }; | ||
3275 | |||
3276 | /* mcspi3 slave ports */ | ||
3277 | static struct omap_hwmod_ocp_if *omap44xx_mcspi3_slaves[] = { | ||
3278 | &omap44xx_l4_per__mcspi3, | ||
3279 | }; | ||
3280 | |||
3281 | /* mcspi3 dev_attr */ | ||
3282 | static struct omap2_mcspi_dev_attr mcspi3_dev_attr = { | ||
3283 | .num_chipselect = 2, | ||
3284 | }; | ||
3285 | |||
3286 | static struct omap_hwmod omap44xx_mcspi3_hwmod = { | ||
3287 | .name = "mcspi3", | ||
3288 | .class = &omap44xx_mcspi_hwmod_class, | ||
3289 | .mpu_irqs = omap44xx_mcspi3_irqs, | ||
3290 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mcspi3_irqs), | ||
3291 | .sdma_reqs = omap44xx_mcspi3_sdma_reqs, | ||
3292 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_mcspi3_sdma_reqs), | ||
3293 | .main_clk = "mcspi3_fck", | ||
3294 | .prcm = { | ||
3295 | .omap4 = { | ||
3296 | .clkctrl_reg = OMAP4430_CM_L4PER_MCSPI3_CLKCTRL, | ||
3297 | }, | ||
3298 | }, | ||
3299 | .dev_attr = &mcspi3_dev_attr, | ||
3300 | .slaves = omap44xx_mcspi3_slaves, | ||
3301 | .slaves_cnt = ARRAY_SIZE(omap44xx_mcspi3_slaves), | ||
3302 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
3303 | }; | ||
3304 | |||
3305 | /* mcspi4 */ | ||
3306 | static struct omap_hwmod omap44xx_mcspi4_hwmod; | ||
3307 | static struct omap_hwmod_irq_info omap44xx_mcspi4_irqs[] = { | ||
3308 | { .irq = 48 + OMAP44XX_IRQ_GIC_START }, | ||
3309 | }; | ||
3310 | |||
3311 | static struct omap_hwmod_dma_info omap44xx_mcspi4_sdma_reqs[] = { | ||
3312 | { .name = "tx0", .dma_req = 69 + OMAP44XX_DMA_REQ_START }, | ||
3313 | { .name = "rx0", .dma_req = 70 + OMAP44XX_DMA_REQ_START }, | ||
3314 | }; | ||
3315 | |||
3316 | static struct omap_hwmod_addr_space omap44xx_mcspi4_addrs[] = { | ||
3317 | { | ||
3318 | .pa_start = 0x480ba000, | ||
3319 | .pa_end = 0x480ba1ff, | ||
3320 | .flags = ADDR_TYPE_RT | ||
3321 | }, | ||
3322 | }; | ||
3323 | |||
3324 | /* l4_per -> mcspi4 */ | ||
3325 | static struct omap_hwmod_ocp_if omap44xx_l4_per__mcspi4 = { | ||
3326 | .master = &omap44xx_l4_per_hwmod, | ||
3327 | .slave = &omap44xx_mcspi4_hwmod, | ||
3328 | .clk = "l4_div_ck", | ||
3329 | .addr = omap44xx_mcspi4_addrs, | ||
3330 | .addr_cnt = ARRAY_SIZE(omap44xx_mcspi4_addrs), | ||
3331 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
3332 | }; | ||
3333 | |||
3334 | /* mcspi4 slave ports */ | ||
3335 | static struct omap_hwmod_ocp_if *omap44xx_mcspi4_slaves[] = { | ||
3336 | &omap44xx_l4_per__mcspi4, | ||
3337 | }; | ||
3338 | |||
3339 | /* mcspi4 dev_attr */ | ||
3340 | static struct omap2_mcspi_dev_attr mcspi4_dev_attr = { | ||
3341 | .num_chipselect = 1, | ||
3342 | }; | ||
3343 | |||
3344 | static struct omap_hwmod omap44xx_mcspi4_hwmod = { | ||
3345 | .name = "mcspi4", | ||
3346 | .class = &omap44xx_mcspi_hwmod_class, | ||
3347 | .mpu_irqs = omap44xx_mcspi4_irqs, | ||
3348 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mcspi4_irqs), | ||
3349 | .sdma_reqs = omap44xx_mcspi4_sdma_reqs, | ||
3350 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_mcspi4_sdma_reqs), | ||
3351 | .main_clk = "mcspi4_fck", | ||
3352 | .prcm = { | ||
3353 | .omap4 = { | ||
3354 | .clkctrl_reg = OMAP4430_CM_L4PER_MCSPI4_CLKCTRL, | ||
3355 | }, | ||
3356 | }, | ||
3357 | .dev_attr = &mcspi4_dev_attr, | ||
3358 | .slaves = omap44xx_mcspi4_slaves, | ||
3359 | .slaves_cnt = ARRAY_SIZE(omap44xx_mcspi4_slaves), | ||
3360 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
3361 | }; | ||
3362 | |||
3363 | /* | ||
3364 | * 'mmc' class | ||
3365 | * multimedia card high-speed/sd/sdio (mmc/sd/sdio) host controller | ||
3366 | */ | ||
3367 | |||
3368 | static struct omap_hwmod_class_sysconfig omap44xx_mmc_sysc = { | ||
3369 | .rev_offs = 0x0000, | ||
3370 | .sysc_offs = 0x0010, | ||
3371 | .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_MIDLEMODE | | ||
3372 | SYSC_HAS_RESET_STATUS | SYSC_HAS_SIDLEMODE | | ||
3373 | SYSC_HAS_SOFTRESET), | ||
3374 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | | ||
3375 | SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO | | ||
3376 | MSTANDBY_SMART), | ||
3377 | .sysc_fields = &omap_hwmod_sysc_type2, | ||
3378 | }; | ||
3379 | |||
3380 | static struct omap_hwmod_class omap44xx_mmc_hwmod_class = { | ||
3381 | .name = "mmc", | ||
3382 | .sysc = &omap44xx_mmc_sysc, | ||
3383 | }; | ||
3384 | |||
3385 | /* mmc1 */ | ||
3386 | static struct omap_hwmod_irq_info omap44xx_mmc1_irqs[] = { | ||
3387 | { .irq = 83 + OMAP44XX_IRQ_GIC_START }, | ||
3388 | }; | ||
3389 | |||
3390 | static struct omap_hwmod_dma_info omap44xx_mmc1_sdma_reqs[] = { | ||
3391 | { .name = "tx", .dma_req = 60 + OMAP44XX_DMA_REQ_START }, | ||
3392 | { .name = "rx", .dma_req = 61 + OMAP44XX_DMA_REQ_START }, | ||
3393 | }; | ||
3394 | |||
3395 | /* mmc1 master ports */ | ||
3396 | static struct omap_hwmod_ocp_if *omap44xx_mmc1_masters[] = { | ||
3397 | &omap44xx_mmc1__l3_main_1, | ||
3398 | }; | ||
3399 | |||
3400 | static struct omap_hwmod_addr_space omap44xx_mmc1_addrs[] = { | ||
3401 | { | ||
3402 | .pa_start = 0x4809c000, | ||
3403 | .pa_end = 0x4809c3ff, | ||
3404 | .flags = ADDR_TYPE_RT | ||
3405 | }, | ||
3406 | }; | ||
3407 | |||
3408 | /* l4_per -> mmc1 */ | ||
3409 | static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc1 = { | ||
3410 | .master = &omap44xx_l4_per_hwmod, | ||
3411 | .slave = &omap44xx_mmc1_hwmod, | ||
3412 | .clk = "l4_div_ck", | ||
3413 | .addr = omap44xx_mmc1_addrs, | ||
3414 | .addr_cnt = ARRAY_SIZE(omap44xx_mmc1_addrs), | ||
3415 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
3416 | }; | ||
3417 | |||
3418 | /* mmc1 slave ports */ | ||
3419 | static struct omap_hwmod_ocp_if *omap44xx_mmc1_slaves[] = { | ||
3420 | &omap44xx_l4_per__mmc1, | ||
3421 | }; | ||
3422 | |||
3423 | static struct omap_hwmod omap44xx_mmc1_hwmod = { | ||
3424 | .name = "mmc1", | ||
3425 | .class = &omap44xx_mmc_hwmod_class, | ||
3426 | .mpu_irqs = omap44xx_mmc1_irqs, | ||
3427 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mmc1_irqs), | ||
3428 | .sdma_reqs = omap44xx_mmc1_sdma_reqs, | ||
3429 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_mmc1_sdma_reqs), | ||
3430 | .main_clk = "mmc1_fck", | ||
3431 | .prcm = { | ||
3432 | .omap4 = { | ||
3433 | .clkctrl_reg = OMAP4430_CM_L3INIT_MMC1_CLKCTRL, | ||
3434 | }, | ||
3435 | }, | ||
3436 | .slaves = omap44xx_mmc1_slaves, | ||
3437 | .slaves_cnt = ARRAY_SIZE(omap44xx_mmc1_slaves), | ||
3438 | .masters = omap44xx_mmc1_masters, | ||
3439 | .masters_cnt = ARRAY_SIZE(omap44xx_mmc1_masters), | ||
3440 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
3441 | }; | ||
3442 | |||
3443 | /* mmc2 */ | ||
3444 | static struct omap_hwmod_irq_info omap44xx_mmc2_irqs[] = { | ||
3445 | { .irq = 86 + OMAP44XX_IRQ_GIC_START }, | ||
3446 | }; | ||
3447 | |||
3448 | static struct omap_hwmod_dma_info omap44xx_mmc2_sdma_reqs[] = { | ||
3449 | { .name = "tx", .dma_req = 46 + OMAP44XX_DMA_REQ_START }, | ||
3450 | { .name = "rx", .dma_req = 47 + OMAP44XX_DMA_REQ_START }, | ||
3451 | }; | ||
3452 | |||
3453 | /* mmc2 master ports */ | ||
3454 | static struct omap_hwmod_ocp_if *omap44xx_mmc2_masters[] = { | ||
3455 | &omap44xx_mmc2__l3_main_1, | ||
3456 | }; | ||
3457 | |||
3458 | static struct omap_hwmod_addr_space omap44xx_mmc2_addrs[] = { | ||
3459 | { | ||
3460 | .pa_start = 0x480b4000, | ||
3461 | .pa_end = 0x480b43ff, | ||
3462 | .flags = ADDR_TYPE_RT | ||
3463 | }, | ||
3464 | }; | ||
3465 | |||
3466 | /* l4_per -> mmc2 */ | ||
3467 | static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc2 = { | ||
3468 | .master = &omap44xx_l4_per_hwmod, | ||
3469 | .slave = &omap44xx_mmc2_hwmod, | ||
3470 | .clk = "l4_div_ck", | ||
3471 | .addr = omap44xx_mmc2_addrs, | ||
3472 | .addr_cnt = ARRAY_SIZE(omap44xx_mmc2_addrs), | ||
3473 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
3474 | }; | ||
3475 | |||
3476 | /* mmc2 slave ports */ | ||
3477 | static struct omap_hwmod_ocp_if *omap44xx_mmc2_slaves[] = { | ||
3478 | &omap44xx_l4_per__mmc2, | ||
3479 | }; | ||
3480 | |||
3481 | static struct omap_hwmod omap44xx_mmc2_hwmod = { | ||
3482 | .name = "mmc2", | ||
3483 | .class = &omap44xx_mmc_hwmod_class, | ||
3484 | .mpu_irqs = omap44xx_mmc2_irqs, | ||
3485 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mmc2_irqs), | ||
3486 | .sdma_reqs = omap44xx_mmc2_sdma_reqs, | ||
3487 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_mmc2_sdma_reqs), | ||
3488 | .main_clk = "mmc2_fck", | ||
3489 | .prcm = { | ||
3490 | .omap4 = { | ||
3491 | .clkctrl_reg = OMAP4430_CM_L3INIT_MMC2_CLKCTRL, | ||
3492 | }, | ||
3493 | }, | ||
3494 | .slaves = omap44xx_mmc2_slaves, | ||
3495 | .slaves_cnt = ARRAY_SIZE(omap44xx_mmc2_slaves), | ||
3496 | .masters = omap44xx_mmc2_masters, | ||
3497 | .masters_cnt = ARRAY_SIZE(omap44xx_mmc2_masters), | ||
3498 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
3499 | }; | ||
3500 | |||
3501 | /* mmc3 */ | ||
3502 | static struct omap_hwmod omap44xx_mmc3_hwmod; | ||
3503 | static struct omap_hwmod_irq_info omap44xx_mmc3_irqs[] = { | ||
3504 | { .irq = 94 + OMAP44XX_IRQ_GIC_START }, | ||
3505 | }; | ||
3506 | |||
3507 | static struct omap_hwmod_dma_info omap44xx_mmc3_sdma_reqs[] = { | ||
3508 | { .name = "tx", .dma_req = 76 + OMAP44XX_DMA_REQ_START }, | ||
3509 | { .name = "rx", .dma_req = 77 + OMAP44XX_DMA_REQ_START }, | ||
3510 | }; | ||
3511 | |||
3512 | static struct omap_hwmod_addr_space omap44xx_mmc3_addrs[] = { | ||
3513 | { | ||
3514 | .pa_start = 0x480ad000, | ||
3515 | .pa_end = 0x480ad3ff, | ||
3516 | .flags = ADDR_TYPE_RT | ||
3517 | }, | ||
3518 | }; | ||
3519 | |||
3520 | /* l4_per -> mmc3 */ | ||
3521 | static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc3 = { | ||
3522 | .master = &omap44xx_l4_per_hwmod, | ||
3523 | .slave = &omap44xx_mmc3_hwmod, | ||
3524 | .clk = "l4_div_ck", | ||
3525 | .addr = omap44xx_mmc3_addrs, | ||
3526 | .addr_cnt = ARRAY_SIZE(omap44xx_mmc3_addrs), | ||
3527 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
3528 | }; | ||
3529 | |||
3530 | /* mmc3 slave ports */ | ||
3531 | static struct omap_hwmod_ocp_if *omap44xx_mmc3_slaves[] = { | ||
3532 | &omap44xx_l4_per__mmc3, | ||
3533 | }; | ||
3534 | |||
3535 | static struct omap_hwmod omap44xx_mmc3_hwmod = { | ||
3536 | .name = "mmc3", | ||
3537 | .class = &omap44xx_mmc_hwmod_class, | ||
3538 | .mpu_irqs = omap44xx_mmc3_irqs, | ||
3539 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mmc3_irqs), | ||
3540 | .sdma_reqs = omap44xx_mmc3_sdma_reqs, | ||
3541 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_mmc3_sdma_reqs), | ||
3542 | .main_clk = "mmc3_fck", | ||
3543 | .prcm = { | ||
3544 | .omap4 = { | ||
3545 | .clkctrl_reg = OMAP4430_CM_L4PER_MMCSD3_CLKCTRL, | ||
3546 | }, | ||
3547 | }, | ||
3548 | .slaves = omap44xx_mmc3_slaves, | ||
3549 | .slaves_cnt = ARRAY_SIZE(omap44xx_mmc3_slaves), | ||
3550 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
3551 | }; | ||
3552 | |||
3553 | /* mmc4 */ | ||
3554 | static struct omap_hwmod omap44xx_mmc4_hwmod; | ||
3555 | static struct omap_hwmod_irq_info omap44xx_mmc4_irqs[] = { | ||
3556 | { .irq = 96 + OMAP44XX_IRQ_GIC_START }, | ||
3557 | }; | ||
3558 | |||
3559 | static struct omap_hwmod_dma_info omap44xx_mmc4_sdma_reqs[] = { | ||
3560 | { .name = "tx", .dma_req = 56 + OMAP44XX_DMA_REQ_START }, | ||
3561 | { .name = "rx", .dma_req = 57 + OMAP44XX_DMA_REQ_START }, | ||
3562 | }; | ||
3563 | |||
3564 | static struct omap_hwmod_addr_space omap44xx_mmc4_addrs[] = { | ||
3565 | { | ||
3566 | .pa_start = 0x480d1000, | ||
3567 | .pa_end = 0x480d13ff, | ||
3568 | .flags = ADDR_TYPE_RT | ||
3569 | }, | ||
3570 | }; | ||
3571 | |||
3572 | /* l4_per -> mmc4 */ | ||
3573 | static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc4 = { | ||
3574 | .master = &omap44xx_l4_per_hwmod, | ||
3575 | .slave = &omap44xx_mmc4_hwmod, | ||
3576 | .clk = "l4_div_ck", | ||
3577 | .addr = omap44xx_mmc4_addrs, | ||
3578 | .addr_cnt = ARRAY_SIZE(omap44xx_mmc4_addrs), | ||
3579 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
3580 | }; | ||
3581 | |||
3582 | /* mmc4 slave ports */ | ||
3583 | static struct omap_hwmod_ocp_if *omap44xx_mmc4_slaves[] = { | ||
3584 | &omap44xx_l4_per__mmc4, | ||
3585 | }; | ||
3586 | |||
3587 | static struct omap_hwmod omap44xx_mmc4_hwmod = { | ||
3588 | .name = "mmc4", | ||
3589 | .class = &omap44xx_mmc_hwmod_class, | ||
3590 | .mpu_irqs = omap44xx_mmc4_irqs, | ||
3591 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mmc4_irqs), | ||
3592 | .sdma_reqs = omap44xx_mmc4_sdma_reqs, | ||
3593 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_mmc4_sdma_reqs), | ||
3594 | .main_clk = "mmc4_fck", | ||
3595 | .prcm = { | ||
3596 | .omap4 = { | ||
3597 | .clkctrl_reg = OMAP4430_CM_L4PER_MMCSD4_CLKCTRL, | ||
3598 | }, | ||
3599 | }, | ||
3600 | .slaves = omap44xx_mmc4_slaves, | ||
3601 | .slaves_cnt = ARRAY_SIZE(omap44xx_mmc4_slaves), | ||
3602 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
3603 | }; | ||
3604 | |||
3605 | /* mmc5 */ | ||
3606 | static struct omap_hwmod omap44xx_mmc5_hwmod; | ||
3607 | static struct omap_hwmod_irq_info omap44xx_mmc5_irqs[] = { | ||
3608 | { .irq = 59 + OMAP44XX_IRQ_GIC_START }, | ||
3609 | }; | ||
3610 | |||
3611 | static struct omap_hwmod_dma_info omap44xx_mmc5_sdma_reqs[] = { | ||
3612 | { .name = "tx", .dma_req = 58 + OMAP44XX_DMA_REQ_START }, | ||
3613 | { .name = "rx", .dma_req = 59 + OMAP44XX_DMA_REQ_START }, | ||
3614 | }; | ||
3615 | |||
3616 | static struct omap_hwmod_addr_space omap44xx_mmc5_addrs[] = { | ||
3617 | { | ||
3618 | .pa_start = 0x480d5000, | ||
3619 | .pa_end = 0x480d53ff, | ||
3620 | .flags = ADDR_TYPE_RT | ||
3621 | }, | ||
3622 | }; | ||
3623 | |||
3624 | /* l4_per -> mmc5 */ | ||
3625 | static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc5 = { | ||
3626 | .master = &omap44xx_l4_per_hwmod, | ||
3627 | .slave = &omap44xx_mmc5_hwmod, | ||
3628 | .clk = "l4_div_ck", | ||
3629 | .addr = omap44xx_mmc5_addrs, | ||
3630 | .addr_cnt = ARRAY_SIZE(omap44xx_mmc5_addrs), | ||
3631 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
3632 | }; | ||
3633 | |||
3634 | /* mmc5 slave ports */ | ||
3635 | static struct omap_hwmod_ocp_if *omap44xx_mmc5_slaves[] = { | ||
3636 | &omap44xx_l4_per__mmc5, | ||
3637 | }; | ||
3638 | |||
3639 | static struct omap_hwmod omap44xx_mmc5_hwmod = { | ||
3640 | .name = "mmc5", | ||
3641 | .class = &omap44xx_mmc_hwmod_class, | ||
3642 | .mpu_irqs = omap44xx_mmc5_irqs, | ||
3643 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mmc5_irqs), | ||
3644 | .sdma_reqs = omap44xx_mmc5_sdma_reqs, | ||
3645 | .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_mmc5_sdma_reqs), | ||
3646 | .main_clk = "mmc5_fck", | ||
3647 | .prcm = { | ||
3648 | .omap4 = { | ||
3649 | .clkctrl_reg = OMAP4430_CM_L4PER_MMCSD5_CLKCTRL, | ||
3650 | }, | ||
3651 | }, | ||
3652 | .slaves = omap44xx_mmc5_slaves, | ||
3653 | .slaves_cnt = ARRAY_SIZE(omap44xx_mmc5_slaves), | ||
3654 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
3655 | }; | ||
3656 | |||
3657 | /* | ||
1438 | * 'mpu' class | 3658 | * 'mpu' class |
1439 | * mpu sub-system | 3659 | * mpu sub-system |
1440 | */ | 3660 | */ |
@@ -1639,6 +3859,677 @@ static struct omap_hwmod omap44xx_smartreflex_mpu_hwmod = { | |||
1639 | }; | 3859 | }; |
1640 | 3860 | ||
1641 | /* | 3861 | /* |
3862 | * 'spinlock' class | ||
3863 | * spinlock provides hardware assistance for synchronizing the processes | ||
3864 | * running on multiple processors | ||
3865 | */ | ||
3866 | |||
3867 | static struct omap_hwmod_class_sysconfig omap44xx_spinlock_sysc = { | ||
3868 | .rev_offs = 0x0000, | ||
3869 | .sysc_offs = 0x0010, | ||
3870 | .syss_offs = 0x0014, | ||
3871 | .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY | | ||
3872 | SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE | | ||
3873 | SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS), | ||
3874 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | | ||
3875 | SIDLE_SMART_WKUP), | ||
3876 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
3877 | }; | ||
3878 | |||
3879 | static struct omap_hwmod_class omap44xx_spinlock_hwmod_class = { | ||
3880 | .name = "spinlock", | ||
3881 | .sysc = &omap44xx_spinlock_sysc, | ||
3882 | }; | ||
3883 | |||
3884 | /* spinlock */ | ||
3885 | static struct omap_hwmod omap44xx_spinlock_hwmod; | ||
3886 | static struct omap_hwmod_addr_space omap44xx_spinlock_addrs[] = { | ||
3887 | { | ||
3888 | .pa_start = 0x4a0f6000, | ||
3889 | .pa_end = 0x4a0f6fff, | ||
3890 | .flags = ADDR_TYPE_RT | ||
3891 | }, | ||
3892 | }; | ||
3893 | |||
3894 | /* l4_cfg -> spinlock */ | ||
3895 | static struct omap_hwmod_ocp_if omap44xx_l4_cfg__spinlock = { | ||
3896 | .master = &omap44xx_l4_cfg_hwmod, | ||
3897 | .slave = &omap44xx_spinlock_hwmod, | ||
3898 | .clk = "l4_div_ck", | ||
3899 | .addr = omap44xx_spinlock_addrs, | ||
3900 | .addr_cnt = ARRAY_SIZE(omap44xx_spinlock_addrs), | ||
3901 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
3902 | }; | ||
3903 | |||
3904 | /* spinlock slave ports */ | ||
3905 | static struct omap_hwmod_ocp_if *omap44xx_spinlock_slaves[] = { | ||
3906 | &omap44xx_l4_cfg__spinlock, | ||
3907 | }; | ||
3908 | |||
3909 | static struct omap_hwmod omap44xx_spinlock_hwmod = { | ||
3910 | .name = "spinlock", | ||
3911 | .class = &omap44xx_spinlock_hwmod_class, | ||
3912 | .prcm = { | ||
3913 | .omap4 = { | ||
3914 | .clkctrl_reg = OMAP4430_CM_L4CFG_HW_SEM_CLKCTRL, | ||
3915 | }, | ||
3916 | }, | ||
3917 | .slaves = omap44xx_spinlock_slaves, | ||
3918 | .slaves_cnt = ARRAY_SIZE(omap44xx_spinlock_slaves), | ||
3919 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
3920 | }; | ||
3921 | |||
3922 | /* | ||
3923 | * 'timer' class | ||
3924 | * general purpose timer module with accurate 1ms tick | ||
3925 | * This class contains several variants: ['timer_1ms', 'timer'] | ||
3926 | */ | ||
3927 | |||
3928 | static struct omap_hwmod_class_sysconfig omap44xx_timer_1ms_sysc = { | ||
3929 | .rev_offs = 0x0000, | ||
3930 | .sysc_offs = 0x0010, | ||
3931 | .syss_offs = 0x0014, | ||
3932 | .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY | | ||
3933 | SYSC_HAS_EMUFREE | SYSC_HAS_ENAWAKEUP | | ||
3934 | SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET | | ||
3935 | SYSS_HAS_RESET_STATUS), | ||
3936 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART), | ||
3937 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
3938 | }; | ||
3939 | |||
3940 | static struct omap_hwmod_class omap44xx_timer_1ms_hwmod_class = { | ||
3941 | .name = "timer", | ||
3942 | .sysc = &omap44xx_timer_1ms_sysc, | ||
3943 | }; | ||
3944 | |||
3945 | static struct omap_hwmod_class_sysconfig omap44xx_timer_sysc = { | ||
3946 | .rev_offs = 0x0000, | ||
3947 | .sysc_offs = 0x0010, | ||
3948 | .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS | | ||
3949 | SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET), | ||
3950 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | | ||
3951 | SIDLE_SMART_WKUP), | ||
3952 | .sysc_fields = &omap_hwmod_sysc_type2, | ||
3953 | }; | ||
3954 | |||
3955 | static struct omap_hwmod_class omap44xx_timer_hwmod_class = { | ||
3956 | .name = "timer", | ||
3957 | .sysc = &omap44xx_timer_sysc, | ||
3958 | }; | ||
3959 | |||
3960 | /* timer1 */ | ||
3961 | static struct omap_hwmod omap44xx_timer1_hwmod; | ||
3962 | static struct omap_hwmod_irq_info omap44xx_timer1_irqs[] = { | ||
3963 | { .irq = 37 + OMAP44XX_IRQ_GIC_START }, | ||
3964 | }; | ||
3965 | |||
3966 | static struct omap_hwmod_addr_space omap44xx_timer1_addrs[] = { | ||
3967 | { | ||
3968 | .pa_start = 0x4a318000, | ||
3969 | .pa_end = 0x4a31807f, | ||
3970 | .flags = ADDR_TYPE_RT | ||
3971 | }, | ||
3972 | }; | ||
3973 | |||
3974 | /* l4_wkup -> timer1 */ | ||
3975 | static struct omap_hwmod_ocp_if omap44xx_l4_wkup__timer1 = { | ||
3976 | .master = &omap44xx_l4_wkup_hwmod, | ||
3977 | .slave = &omap44xx_timer1_hwmod, | ||
3978 | .clk = "l4_wkup_clk_mux_ck", | ||
3979 | .addr = omap44xx_timer1_addrs, | ||
3980 | .addr_cnt = ARRAY_SIZE(omap44xx_timer1_addrs), | ||
3981 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
3982 | }; | ||
3983 | |||
3984 | /* timer1 slave ports */ | ||
3985 | static struct omap_hwmod_ocp_if *omap44xx_timer1_slaves[] = { | ||
3986 | &omap44xx_l4_wkup__timer1, | ||
3987 | }; | ||
3988 | |||
3989 | static struct omap_hwmod omap44xx_timer1_hwmod = { | ||
3990 | .name = "timer1", | ||
3991 | .class = &omap44xx_timer_1ms_hwmod_class, | ||
3992 | .flags = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET, | ||
3993 | .mpu_irqs = omap44xx_timer1_irqs, | ||
3994 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_timer1_irqs), | ||
3995 | .main_clk = "timer1_fck", | ||
3996 | .prcm = { | ||
3997 | .omap4 = { | ||
3998 | .clkctrl_reg = OMAP4430_CM_WKUP_TIMER1_CLKCTRL, | ||
3999 | }, | ||
4000 | }, | ||
4001 | .slaves = omap44xx_timer1_slaves, | ||
4002 | .slaves_cnt = ARRAY_SIZE(omap44xx_timer1_slaves), | ||
4003 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
4004 | }; | ||
4005 | |||
4006 | /* timer2 */ | ||
4007 | static struct omap_hwmod omap44xx_timer2_hwmod; | ||
4008 | static struct omap_hwmod_irq_info omap44xx_timer2_irqs[] = { | ||
4009 | { .irq = 38 + OMAP44XX_IRQ_GIC_START }, | ||
4010 | }; | ||
4011 | |||
4012 | static struct omap_hwmod_addr_space omap44xx_timer2_addrs[] = { | ||
4013 | { | ||
4014 | .pa_start = 0x48032000, | ||
4015 | .pa_end = 0x4803207f, | ||
4016 | .flags = ADDR_TYPE_RT | ||
4017 | }, | ||
4018 | }; | ||
4019 | |||
4020 | /* l4_per -> timer2 */ | ||
4021 | static struct omap_hwmod_ocp_if omap44xx_l4_per__timer2 = { | ||
4022 | .master = &omap44xx_l4_per_hwmod, | ||
4023 | .slave = &omap44xx_timer2_hwmod, | ||
4024 | .clk = "l4_div_ck", | ||
4025 | .addr = omap44xx_timer2_addrs, | ||
4026 | .addr_cnt = ARRAY_SIZE(omap44xx_timer2_addrs), | ||
4027 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
4028 | }; | ||
4029 | |||
4030 | /* timer2 slave ports */ | ||
4031 | static struct omap_hwmod_ocp_if *omap44xx_timer2_slaves[] = { | ||
4032 | &omap44xx_l4_per__timer2, | ||
4033 | }; | ||
4034 | |||
4035 | static struct omap_hwmod omap44xx_timer2_hwmod = { | ||
4036 | .name = "timer2", | ||
4037 | .class = &omap44xx_timer_1ms_hwmod_class, | ||
4038 | .mpu_irqs = omap44xx_timer2_irqs, | ||
4039 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_timer2_irqs), | ||
4040 | .main_clk = "timer2_fck", | ||
4041 | .prcm = { | ||
4042 | .omap4 = { | ||
4043 | .clkctrl_reg = OMAP4430_CM_L4PER_DMTIMER2_CLKCTRL, | ||
4044 | }, | ||
4045 | }, | ||
4046 | .slaves = omap44xx_timer2_slaves, | ||
4047 | .slaves_cnt = ARRAY_SIZE(omap44xx_timer2_slaves), | ||
4048 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
4049 | }; | ||
4050 | |||
4051 | /* timer3 */ | ||
4052 | static struct omap_hwmod omap44xx_timer3_hwmod; | ||
4053 | static struct omap_hwmod_irq_info omap44xx_timer3_irqs[] = { | ||
4054 | { .irq = 39 + OMAP44XX_IRQ_GIC_START }, | ||
4055 | }; | ||
4056 | |||
4057 | static struct omap_hwmod_addr_space omap44xx_timer3_addrs[] = { | ||
4058 | { | ||
4059 | .pa_start = 0x48034000, | ||
4060 | .pa_end = 0x4803407f, | ||
4061 | .flags = ADDR_TYPE_RT | ||
4062 | }, | ||
4063 | }; | ||
4064 | |||
4065 | /* l4_per -> timer3 */ | ||
4066 | static struct omap_hwmod_ocp_if omap44xx_l4_per__timer3 = { | ||
4067 | .master = &omap44xx_l4_per_hwmod, | ||
4068 | .slave = &omap44xx_timer3_hwmod, | ||
4069 | .clk = "l4_div_ck", | ||
4070 | .addr = omap44xx_timer3_addrs, | ||
4071 | .addr_cnt = ARRAY_SIZE(omap44xx_timer3_addrs), | ||
4072 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
4073 | }; | ||
4074 | |||
4075 | /* timer3 slave ports */ | ||
4076 | static struct omap_hwmod_ocp_if *omap44xx_timer3_slaves[] = { | ||
4077 | &omap44xx_l4_per__timer3, | ||
4078 | }; | ||
4079 | |||
4080 | static struct omap_hwmod omap44xx_timer3_hwmod = { | ||
4081 | .name = "timer3", | ||
4082 | .class = &omap44xx_timer_hwmod_class, | ||
4083 | .mpu_irqs = omap44xx_timer3_irqs, | ||
4084 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_timer3_irqs), | ||
4085 | .main_clk = "timer3_fck", | ||
4086 | .prcm = { | ||
4087 | .omap4 = { | ||
4088 | .clkctrl_reg = OMAP4430_CM_L4PER_DMTIMER3_CLKCTRL, | ||
4089 | }, | ||
4090 | }, | ||
4091 | .slaves = omap44xx_timer3_slaves, | ||
4092 | .slaves_cnt = ARRAY_SIZE(omap44xx_timer3_slaves), | ||
4093 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
4094 | }; | ||
4095 | |||
4096 | /* timer4 */ | ||
4097 | static struct omap_hwmod omap44xx_timer4_hwmod; | ||
4098 | static struct omap_hwmod_irq_info omap44xx_timer4_irqs[] = { | ||
4099 | { .irq = 40 + OMAP44XX_IRQ_GIC_START }, | ||
4100 | }; | ||
4101 | |||
4102 | static struct omap_hwmod_addr_space omap44xx_timer4_addrs[] = { | ||
4103 | { | ||
4104 | .pa_start = 0x48036000, | ||
4105 | .pa_end = 0x4803607f, | ||
4106 | .flags = ADDR_TYPE_RT | ||
4107 | }, | ||
4108 | }; | ||
4109 | |||
4110 | /* l4_per -> timer4 */ | ||
4111 | static struct omap_hwmod_ocp_if omap44xx_l4_per__timer4 = { | ||
4112 | .master = &omap44xx_l4_per_hwmod, | ||
4113 | .slave = &omap44xx_timer4_hwmod, | ||
4114 | .clk = "l4_div_ck", | ||
4115 | .addr = omap44xx_timer4_addrs, | ||
4116 | .addr_cnt = ARRAY_SIZE(omap44xx_timer4_addrs), | ||
4117 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
4118 | }; | ||
4119 | |||
4120 | /* timer4 slave ports */ | ||
4121 | static struct omap_hwmod_ocp_if *omap44xx_timer4_slaves[] = { | ||
4122 | &omap44xx_l4_per__timer4, | ||
4123 | }; | ||
4124 | |||
4125 | static struct omap_hwmod omap44xx_timer4_hwmod = { | ||
4126 | .name = "timer4", | ||
4127 | .class = &omap44xx_timer_hwmod_class, | ||
4128 | .mpu_irqs = omap44xx_timer4_irqs, | ||
4129 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_timer4_irqs), | ||
4130 | .main_clk = "timer4_fck", | ||
4131 | .prcm = { | ||
4132 | .omap4 = { | ||
4133 | .clkctrl_reg = OMAP4430_CM_L4PER_DMTIMER4_CLKCTRL, | ||
4134 | }, | ||
4135 | }, | ||
4136 | .slaves = omap44xx_timer4_slaves, | ||
4137 | .slaves_cnt = ARRAY_SIZE(omap44xx_timer4_slaves), | ||
4138 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
4139 | }; | ||
4140 | |||
4141 | /* timer5 */ | ||
4142 | static struct omap_hwmod omap44xx_timer5_hwmod; | ||
4143 | static struct omap_hwmod_irq_info omap44xx_timer5_irqs[] = { | ||
4144 | { .irq = 41 + OMAP44XX_IRQ_GIC_START }, | ||
4145 | }; | ||
4146 | |||
4147 | static struct omap_hwmod_addr_space omap44xx_timer5_addrs[] = { | ||
4148 | { | ||
4149 | .pa_start = 0x40138000, | ||
4150 | .pa_end = 0x4013807f, | ||
4151 | .flags = ADDR_TYPE_RT | ||
4152 | }, | ||
4153 | }; | ||
4154 | |||
4155 | /* l4_abe -> timer5 */ | ||
4156 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer5 = { | ||
4157 | .master = &omap44xx_l4_abe_hwmod, | ||
4158 | .slave = &omap44xx_timer5_hwmod, | ||
4159 | .clk = "ocp_abe_iclk", | ||
4160 | .addr = omap44xx_timer5_addrs, | ||
4161 | .addr_cnt = ARRAY_SIZE(omap44xx_timer5_addrs), | ||
4162 | .user = OCP_USER_MPU, | ||
4163 | }; | ||
4164 | |||
4165 | static struct omap_hwmod_addr_space omap44xx_timer5_dma_addrs[] = { | ||
4166 | { | ||
4167 | .pa_start = 0x49038000, | ||
4168 | .pa_end = 0x4903807f, | ||
4169 | .flags = ADDR_TYPE_RT | ||
4170 | }, | ||
4171 | }; | ||
4172 | |||
4173 | /* l4_abe -> timer5 (dma) */ | ||
4174 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer5_dma = { | ||
4175 | .master = &omap44xx_l4_abe_hwmod, | ||
4176 | .slave = &omap44xx_timer5_hwmod, | ||
4177 | .clk = "ocp_abe_iclk", | ||
4178 | .addr = omap44xx_timer5_dma_addrs, | ||
4179 | .addr_cnt = ARRAY_SIZE(omap44xx_timer5_dma_addrs), | ||
4180 | .user = OCP_USER_SDMA, | ||
4181 | }; | ||
4182 | |||
4183 | /* timer5 slave ports */ | ||
4184 | static struct omap_hwmod_ocp_if *omap44xx_timer5_slaves[] = { | ||
4185 | &omap44xx_l4_abe__timer5, | ||
4186 | &omap44xx_l4_abe__timer5_dma, | ||
4187 | }; | ||
4188 | |||
4189 | static struct omap_hwmod omap44xx_timer5_hwmod = { | ||
4190 | .name = "timer5", | ||
4191 | .class = &omap44xx_timer_hwmod_class, | ||
4192 | .mpu_irqs = omap44xx_timer5_irqs, | ||
4193 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_timer5_irqs), | ||
4194 | .main_clk = "timer5_fck", | ||
4195 | .prcm = { | ||
4196 | .omap4 = { | ||
4197 | .clkctrl_reg = OMAP4430_CM1_ABE_TIMER5_CLKCTRL, | ||
4198 | }, | ||
4199 | }, | ||
4200 | .slaves = omap44xx_timer5_slaves, | ||
4201 | .slaves_cnt = ARRAY_SIZE(omap44xx_timer5_slaves), | ||
4202 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
4203 | }; | ||
4204 | |||
4205 | /* timer6 */ | ||
4206 | static struct omap_hwmod omap44xx_timer6_hwmod; | ||
4207 | static struct omap_hwmod_irq_info omap44xx_timer6_irqs[] = { | ||
4208 | { .irq = 42 + OMAP44XX_IRQ_GIC_START }, | ||
4209 | }; | ||
4210 | |||
4211 | static struct omap_hwmod_addr_space omap44xx_timer6_addrs[] = { | ||
4212 | { | ||
4213 | .pa_start = 0x4013a000, | ||
4214 | .pa_end = 0x4013a07f, | ||
4215 | .flags = ADDR_TYPE_RT | ||
4216 | }, | ||
4217 | }; | ||
4218 | |||
4219 | /* l4_abe -> timer6 */ | ||
4220 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer6 = { | ||
4221 | .master = &omap44xx_l4_abe_hwmod, | ||
4222 | .slave = &omap44xx_timer6_hwmod, | ||
4223 | .clk = "ocp_abe_iclk", | ||
4224 | .addr = omap44xx_timer6_addrs, | ||
4225 | .addr_cnt = ARRAY_SIZE(omap44xx_timer6_addrs), | ||
4226 | .user = OCP_USER_MPU, | ||
4227 | }; | ||
4228 | |||
4229 | static struct omap_hwmod_addr_space omap44xx_timer6_dma_addrs[] = { | ||
4230 | { | ||
4231 | .pa_start = 0x4903a000, | ||
4232 | .pa_end = 0x4903a07f, | ||
4233 | .flags = ADDR_TYPE_RT | ||
4234 | }, | ||
4235 | }; | ||
4236 | |||
4237 | /* l4_abe -> timer6 (dma) */ | ||
4238 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer6_dma = { | ||
4239 | .master = &omap44xx_l4_abe_hwmod, | ||
4240 | .slave = &omap44xx_timer6_hwmod, | ||
4241 | .clk = "ocp_abe_iclk", | ||
4242 | .addr = omap44xx_timer6_dma_addrs, | ||
4243 | .addr_cnt = ARRAY_SIZE(omap44xx_timer6_dma_addrs), | ||
4244 | .user = OCP_USER_SDMA, | ||
4245 | }; | ||
4246 | |||
4247 | /* timer6 slave ports */ | ||
4248 | static struct omap_hwmod_ocp_if *omap44xx_timer6_slaves[] = { | ||
4249 | &omap44xx_l4_abe__timer6, | ||
4250 | &omap44xx_l4_abe__timer6_dma, | ||
4251 | }; | ||
4252 | |||
4253 | static struct omap_hwmod omap44xx_timer6_hwmod = { | ||
4254 | .name = "timer6", | ||
4255 | .class = &omap44xx_timer_hwmod_class, | ||
4256 | .mpu_irqs = omap44xx_timer6_irqs, | ||
4257 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_timer6_irqs), | ||
4258 | .main_clk = "timer6_fck", | ||
4259 | .prcm = { | ||
4260 | .omap4 = { | ||
4261 | .clkctrl_reg = OMAP4430_CM1_ABE_TIMER6_CLKCTRL, | ||
4262 | }, | ||
4263 | }, | ||
4264 | .slaves = omap44xx_timer6_slaves, | ||
4265 | .slaves_cnt = ARRAY_SIZE(omap44xx_timer6_slaves), | ||
4266 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
4267 | }; | ||
4268 | |||
4269 | /* timer7 */ | ||
4270 | static struct omap_hwmod omap44xx_timer7_hwmod; | ||
4271 | static struct omap_hwmod_irq_info omap44xx_timer7_irqs[] = { | ||
4272 | { .irq = 43 + OMAP44XX_IRQ_GIC_START }, | ||
4273 | }; | ||
4274 | |||
4275 | static struct omap_hwmod_addr_space omap44xx_timer7_addrs[] = { | ||
4276 | { | ||
4277 | .pa_start = 0x4013c000, | ||
4278 | .pa_end = 0x4013c07f, | ||
4279 | .flags = ADDR_TYPE_RT | ||
4280 | }, | ||
4281 | }; | ||
4282 | |||
4283 | /* l4_abe -> timer7 */ | ||
4284 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer7 = { | ||
4285 | .master = &omap44xx_l4_abe_hwmod, | ||
4286 | .slave = &omap44xx_timer7_hwmod, | ||
4287 | .clk = "ocp_abe_iclk", | ||
4288 | .addr = omap44xx_timer7_addrs, | ||
4289 | .addr_cnt = ARRAY_SIZE(omap44xx_timer7_addrs), | ||
4290 | .user = OCP_USER_MPU, | ||
4291 | }; | ||
4292 | |||
4293 | static struct omap_hwmod_addr_space omap44xx_timer7_dma_addrs[] = { | ||
4294 | { | ||
4295 | .pa_start = 0x4903c000, | ||
4296 | .pa_end = 0x4903c07f, | ||
4297 | .flags = ADDR_TYPE_RT | ||
4298 | }, | ||
4299 | }; | ||
4300 | |||
4301 | /* l4_abe -> timer7 (dma) */ | ||
4302 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer7_dma = { | ||
4303 | .master = &omap44xx_l4_abe_hwmod, | ||
4304 | .slave = &omap44xx_timer7_hwmod, | ||
4305 | .clk = "ocp_abe_iclk", | ||
4306 | .addr = omap44xx_timer7_dma_addrs, | ||
4307 | .addr_cnt = ARRAY_SIZE(omap44xx_timer7_dma_addrs), | ||
4308 | .user = OCP_USER_SDMA, | ||
4309 | }; | ||
4310 | |||
4311 | /* timer7 slave ports */ | ||
4312 | static struct omap_hwmod_ocp_if *omap44xx_timer7_slaves[] = { | ||
4313 | &omap44xx_l4_abe__timer7, | ||
4314 | &omap44xx_l4_abe__timer7_dma, | ||
4315 | }; | ||
4316 | |||
4317 | static struct omap_hwmod omap44xx_timer7_hwmod = { | ||
4318 | .name = "timer7", | ||
4319 | .class = &omap44xx_timer_hwmod_class, | ||
4320 | .mpu_irqs = omap44xx_timer7_irqs, | ||
4321 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_timer7_irqs), | ||
4322 | .main_clk = "timer7_fck", | ||
4323 | .prcm = { | ||
4324 | .omap4 = { | ||
4325 | .clkctrl_reg = OMAP4430_CM1_ABE_TIMER7_CLKCTRL, | ||
4326 | }, | ||
4327 | }, | ||
4328 | .slaves = omap44xx_timer7_slaves, | ||
4329 | .slaves_cnt = ARRAY_SIZE(omap44xx_timer7_slaves), | ||
4330 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
4331 | }; | ||
4332 | |||
4333 | /* timer8 */ | ||
4334 | static struct omap_hwmod omap44xx_timer8_hwmod; | ||
4335 | static struct omap_hwmod_irq_info omap44xx_timer8_irqs[] = { | ||
4336 | { .irq = 44 + OMAP44XX_IRQ_GIC_START }, | ||
4337 | }; | ||
4338 | |||
4339 | static struct omap_hwmod_addr_space omap44xx_timer8_addrs[] = { | ||
4340 | { | ||
4341 | .pa_start = 0x4013e000, | ||
4342 | .pa_end = 0x4013e07f, | ||
4343 | .flags = ADDR_TYPE_RT | ||
4344 | }, | ||
4345 | }; | ||
4346 | |||
4347 | /* l4_abe -> timer8 */ | ||
4348 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer8 = { | ||
4349 | .master = &omap44xx_l4_abe_hwmod, | ||
4350 | .slave = &omap44xx_timer8_hwmod, | ||
4351 | .clk = "ocp_abe_iclk", | ||
4352 | .addr = omap44xx_timer8_addrs, | ||
4353 | .addr_cnt = ARRAY_SIZE(omap44xx_timer8_addrs), | ||
4354 | .user = OCP_USER_MPU, | ||
4355 | }; | ||
4356 | |||
4357 | static struct omap_hwmod_addr_space omap44xx_timer8_dma_addrs[] = { | ||
4358 | { | ||
4359 | .pa_start = 0x4903e000, | ||
4360 | .pa_end = 0x4903e07f, | ||
4361 | .flags = ADDR_TYPE_RT | ||
4362 | }, | ||
4363 | }; | ||
4364 | |||
4365 | /* l4_abe -> timer8 (dma) */ | ||
4366 | static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer8_dma = { | ||
4367 | .master = &omap44xx_l4_abe_hwmod, | ||
4368 | .slave = &omap44xx_timer8_hwmod, | ||
4369 | .clk = "ocp_abe_iclk", | ||
4370 | .addr = omap44xx_timer8_dma_addrs, | ||
4371 | .addr_cnt = ARRAY_SIZE(omap44xx_timer8_dma_addrs), | ||
4372 | .user = OCP_USER_SDMA, | ||
4373 | }; | ||
4374 | |||
4375 | /* timer8 slave ports */ | ||
4376 | static struct omap_hwmod_ocp_if *omap44xx_timer8_slaves[] = { | ||
4377 | &omap44xx_l4_abe__timer8, | ||
4378 | &omap44xx_l4_abe__timer8_dma, | ||
4379 | }; | ||
4380 | |||
4381 | static struct omap_hwmod omap44xx_timer8_hwmod = { | ||
4382 | .name = "timer8", | ||
4383 | .class = &omap44xx_timer_hwmod_class, | ||
4384 | .mpu_irqs = omap44xx_timer8_irqs, | ||
4385 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_timer8_irqs), | ||
4386 | .main_clk = "timer8_fck", | ||
4387 | .prcm = { | ||
4388 | .omap4 = { | ||
4389 | .clkctrl_reg = OMAP4430_CM1_ABE_TIMER8_CLKCTRL, | ||
4390 | }, | ||
4391 | }, | ||
4392 | .slaves = omap44xx_timer8_slaves, | ||
4393 | .slaves_cnt = ARRAY_SIZE(omap44xx_timer8_slaves), | ||
4394 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
4395 | }; | ||
4396 | |||
4397 | /* timer9 */ | ||
4398 | static struct omap_hwmod omap44xx_timer9_hwmod; | ||
4399 | static struct omap_hwmod_irq_info omap44xx_timer9_irqs[] = { | ||
4400 | { .irq = 45 + OMAP44XX_IRQ_GIC_START }, | ||
4401 | }; | ||
4402 | |||
4403 | static struct omap_hwmod_addr_space omap44xx_timer9_addrs[] = { | ||
4404 | { | ||
4405 | .pa_start = 0x4803e000, | ||
4406 | .pa_end = 0x4803e07f, | ||
4407 | .flags = ADDR_TYPE_RT | ||
4408 | }, | ||
4409 | }; | ||
4410 | |||
4411 | /* l4_per -> timer9 */ | ||
4412 | static struct omap_hwmod_ocp_if omap44xx_l4_per__timer9 = { | ||
4413 | .master = &omap44xx_l4_per_hwmod, | ||
4414 | .slave = &omap44xx_timer9_hwmod, | ||
4415 | .clk = "l4_div_ck", | ||
4416 | .addr = omap44xx_timer9_addrs, | ||
4417 | .addr_cnt = ARRAY_SIZE(omap44xx_timer9_addrs), | ||
4418 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
4419 | }; | ||
4420 | |||
4421 | /* timer9 slave ports */ | ||
4422 | static struct omap_hwmod_ocp_if *omap44xx_timer9_slaves[] = { | ||
4423 | &omap44xx_l4_per__timer9, | ||
4424 | }; | ||
4425 | |||
4426 | static struct omap_hwmod omap44xx_timer9_hwmod = { | ||
4427 | .name = "timer9", | ||
4428 | .class = &omap44xx_timer_hwmod_class, | ||
4429 | .mpu_irqs = omap44xx_timer9_irqs, | ||
4430 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_timer9_irqs), | ||
4431 | .main_clk = "timer9_fck", | ||
4432 | .prcm = { | ||
4433 | .omap4 = { | ||
4434 | .clkctrl_reg = OMAP4430_CM_L4PER_DMTIMER9_CLKCTRL, | ||
4435 | }, | ||
4436 | }, | ||
4437 | .slaves = omap44xx_timer9_slaves, | ||
4438 | .slaves_cnt = ARRAY_SIZE(omap44xx_timer9_slaves), | ||
4439 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
4440 | }; | ||
4441 | |||
4442 | /* timer10 */ | ||
4443 | static struct omap_hwmod omap44xx_timer10_hwmod; | ||
4444 | static struct omap_hwmod_irq_info omap44xx_timer10_irqs[] = { | ||
4445 | { .irq = 46 + OMAP44XX_IRQ_GIC_START }, | ||
4446 | }; | ||
4447 | |||
4448 | static struct omap_hwmod_addr_space omap44xx_timer10_addrs[] = { | ||
4449 | { | ||
4450 | .pa_start = 0x48086000, | ||
4451 | .pa_end = 0x4808607f, | ||
4452 | .flags = ADDR_TYPE_RT | ||
4453 | }, | ||
4454 | }; | ||
4455 | |||
4456 | /* l4_per -> timer10 */ | ||
4457 | static struct omap_hwmod_ocp_if omap44xx_l4_per__timer10 = { | ||
4458 | .master = &omap44xx_l4_per_hwmod, | ||
4459 | .slave = &omap44xx_timer10_hwmod, | ||
4460 | .clk = "l4_div_ck", | ||
4461 | .addr = omap44xx_timer10_addrs, | ||
4462 | .addr_cnt = ARRAY_SIZE(omap44xx_timer10_addrs), | ||
4463 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
4464 | }; | ||
4465 | |||
4466 | /* timer10 slave ports */ | ||
4467 | static struct omap_hwmod_ocp_if *omap44xx_timer10_slaves[] = { | ||
4468 | &omap44xx_l4_per__timer10, | ||
4469 | }; | ||
4470 | |||
4471 | static struct omap_hwmod omap44xx_timer10_hwmod = { | ||
4472 | .name = "timer10", | ||
4473 | .class = &omap44xx_timer_1ms_hwmod_class, | ||
4474 | .mpu_irqs = omap44xx_timer10_irqs, | ||
4475 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_timer10_irqs), | ||
4476 | .main_clk = "timer10_fck", | ||
4477 | .prcm = { | ||
4478 | .omap4 = { | ||
4479 | .clkctrl_reg = OMAP4430_CM_L4PER_DMTIMER10_CLKCTRL, | ||
4480 | }, | ||
4481 | }, | ||
4482 | .slaves = omap44xx_timer10_slaves, | ||
4483 | .slaves_cnt = ARRAY_SIZE(omap44xx_timer10_slaves), | ||
4484 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
4485 | }; | ||
4486 | |||
4487 | /* timer11 */ | ||
4488 | static struct omap_hwmod omap44xx_timer11_hwmod; | ||
4489 | static struct omap_hwmod_irq_info omap44xx_timer11_irqs[] = { | ||
4490 | { .irq = 47 + OMAP44XX_IRQ_GIC_START }, | ||
4491 | }; | ||
4492 | |||
4493 | static struct omap_hwmod_addr_space omap44xx_timer11_addrs[] = { | ||
4494 | { | ||
4495 | .pa_start = 0x48088000, | ||
4496 | .pa_end = 0x4808807f, | ||
4497 | .flags = ADDR_TYPE_RT | ||
4498 | }, | ||
4499 | }; | ||
4500 | |||
4501 | /* l4_per -> timer11 */ | ||
4502 | static struct omap_hwmod_ocp_if omap44xx_l4_per__timer11 = { | ||
4503 | .master = &omap44xx_l4_per_hwmod, | ||
4504 | .slave = &omap44xx_timer11_hwmod, | ||
4505 | .clk = "l4_div_ck", | ||
4506 | .addr = omap44xx_timer11_addrs, | ||
4507 | .addr_cnt = ARRAY_SIZE(omap44xx_timer11_addrs), | ||
4508 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
4509 | }; | ||
4510 | |||
4511 | /* timer11 slave ports */ | ||
4512 | static struct omap_hwmod_ocp_if *omap44xx_timer11_slaves[] = { | ||
4513 | &omap44xx_l4_per__timer11, | ||
4514 | }; | ||
4515 | |||
4516 | static struct omap_hwmod omap44xx_timer11_hwmod = { | ||
4517 | .name = "timer11", | ||
4518 | .class = &omap44xx_timer_hwmod_class, | ||
4519 | .mpu_irqs = omap44xx_timer11_irqs, | ||
4520 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_timer11_irqs), | ||
4521 | .main_clk = "timer11_fck", | ||
4522 | .prcm = { | ||
4523 | .omap4 = { | ||
4524 | .clkctrl_reg = OMAP4430_CM_L4PER_DMTIMER11_CLKCTRL, | ||
4525 | }, | ||
4526 | }, | ||
4527 | .slaves = omap44xx_timer11_slaves, | ||
4528 | .slaves_cnt = ARRAY_SIZE(omap44xx_timer11_slaves), | ||
4529 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
4530 | }; | ||
4531 | |||
4532 | /* | ||
1642 | * 'uart' class | 4533 | * 'uart' class |
1643 | * universal asynchronous receiver/transmitter (uart) | 4534 | * universal asynchronous receiver/transmitter (uart) |
1644 | */ | 4535 | */ |
@@ -1870,6 +4761,88 @@ static struct omap_hwmod omap44xx_uart4_hwmod = { | |||
1870 | }; | 4761 | }; |
1871 | 4762 | ||
1872 | /* | 4763 | /* |
4764 | * 'usb_otg_hs' class | ||
4765 | * high-speed on-the-go universal serial bus (usb_otg_hs) controller | ||
4766 | */ | ||
4767 | |||
4768 | static struct omap_hwmod_class_sysconfig omap44xx_usb_otg_hs_sysc = { | ||
4769 | .rev_offs = 0x0400, | ||
4770 | .sysc_offs = 0x0404, | ||
4771 | .syss_offs = 0x0408, | ||
4772 | .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP | | ||
4773 | SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE | | ||
4774 | SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS), | ||
4775 | .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | | ||
4776 | SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO | | ||
4777 | MSTANDBY_SMART), | ||
4778 | .sysc_fields = &omap_hwmod_sysc_type1, | ||
4779 | }; | ||
4780 | |||
4781 | static struct omap_hwmod_class omap44xx_usb_otg_hs_hwmod_class = { | ||
4782 | .name = "usb_otg_hs", | ||
4783 | .sysc = &omap44xx_usb_otg_hs_sysc, | ||
4784 | }; | ||
4785 | |||
4786 | /* usb_otg_hs */ | ||
4787 | static struct omap_hwmod_irq_info omap44xx_usb_otg_hs_irqs[] = { | ||
4788 | { .name = "mc", .irq = 92 + OMAP44XX_IRQ_GIC_START }, | ||
4789 | { .name = "dma", .irq = 93 + OMAP44XX_IRQ_GIC_START }, | ||
4790 | }; | ||
4791 | |||
4792 | /* usb_otg_hs master ports */ | ||
4793 | static struct omap_hwmod_ocp_if *omap44xx_usb_otg_hs_masters[] = { | ||
4794 | &omap44xx_usb_otg_hs__l3_main_2, | ||
4795 | }; | ||
4796 | |||
4797 | static struct omap_hwmod_addr_space omap44xx_usb_otg_hs_addrs[] = { | ||
4798 | { | ||
4799 | .pa_start = 0x4a0ab000, | ||
4800 | .pa_end = 0x4a0ab003, | ||
4801 | .flags = ADDR_TYPE_RT | ||
4802 | }, | ||
4803 | }; | ||
4804 | |||
4805 | /* l4_cfg -> usb_otg_hs */ | ||
4806 | static struct omap_hwmod_ocp_if omap44xx_l4_cfg__usb_otg_hs = { | ||
4807 | .master = &omap44xx_l4_cfg_hwmod, | ||
4808 | .slave = &omap44xx_usb_otg_hs_hwmod, | ||
4809 | .clk = "l4_div_ck", | ||
4810 | .addr = omap44xx_usb_otg_hs_addrs, | ||
4811 | .addr_cnt = ARRAY_SIZE(omap44xx_usb_otg_hs_addrs), | ||
4812 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
4813 | }; | ||
4814 | |||
4815 | /* usb_otg_hs slave ports */ | ||
4816 | static struct omap_hwmod_ocp_if *omap44xx_usb_otg_hs_slaves[] = { | ||
4817 | &omap44xx_l4_cfg__usb_otg_hs, | ||
4818 | }; | ||
4819 | |||
4820 | static struct omap_hwmod_opt_clk usb_otg_hs_opt_clks[] = { | ||
4821 | { .role = "xclk", .clk = "usb_otg_hs_xclk" }, | ||
4822 | }; | ||
4823 | |||
4824 | static struct omap_hwmod omap44xx_usb_otg_hs_hwmod = { | ||
4825 | .name = "usb_otg_hs", | ||
4826 | .class = &omap44xx_usb_otg_hs_hwmod_class, | ||
4827 | .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY, | ||
4828 | .mpu_irqs = omap44xx_usb_otg_hs_irqs, | ||
4829 | .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_usb_otg_hs_irqs), | ||
4830 | .main_clk = "usb_otg_hs_ick", | ||
4831 | .prcm = { | ||
4832 | .omap4 = { | ||
4833 | .clkctrl_reg = OMAP4430_CM_L3INIT_USB_OTG_CLKCTRL, | ||
4834 | }, | ||
4835 | }, | ||
4836 | .opt_clks = usb_otg_hs_opt_clks, | ||
4837 | .opt_clks_cnt = ARRAY_SIZE(usb_otg_hs_opt_clks), | ||
4838 | .slaves = omap44xx_usb_otg_hs_slaves, | ||
4839 | .slaves_cnt = ARRAY_SIZE(omap44xx_usb_otg_hs_slaves), | ||
4840 | .masters = omap44xx_usb_otg_hs_masters, | ||
4841 | .masters_cnt = ARRAY_SIZE(omap44xx_usb_otg_hs_masters), | ||
4842 | .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), | ||
4843 | }; | ||
4844 | |||
4845 | /* | ||
1873 | * 'wd_timer' class | 4846 | * 'wd_timer' class |
1874 | * 32-bit watchdog upward counter that generates a pulse on the reset pin on | 4847 | * 32-bit watchdog upward counter that generates a pulse on the reset pin on |
1875 | * overflow condition | 4848 | * overflow condition |
@@ -2024,13 +4997,34 @@ static __initdata struct omap_hwmod *omap44xx_hwmods[] = { | |||
2024 | /* mpu_bus class */ | 4997 | /* mpu_bus class */ |
2025 | &omap44xx_mpu_private_hwmod, | 4998 | &omap44xx_mpu_private_hwmod, |
2026 | 4999 | ||
5000 | /* aess class */ | ||
5001 | /* &omap44xx_aess_hwmod, */ | ||
5002 | |||
5003 | /* bandgap class */ | ||
5004 | &omap44xx_bandgap_hwmod, | ||
5005 | |||
5006 | /* counter class */ | ||
5007 | /* &omap44xx_counter_32k_hwmod, */ | ||
5008 | |||
2027 | /* dma class */ | 5009 | /* dma class */ |
2028 | &omap44xx_dma_system_hwmod, | 5010 | &omap44xx_dma_system_hwmod, |
2029 | 5011 | ||
5012 | /* dmic class */ | ||
5013 | &omap44xx_dmic_hwmod, | ||
5014 | |||
2030 | /* dsp class */ | 5015 | /* dsp class */ |
2031 | &omap44xx_dsp_hwmod, | 5016 | &omap44xx_dsp_hwmod, |
2032 | &omap44xx_dsp_c0_hwmod, | 5017 | &omap44xx_dsp_c0_hwmod, |
2033 | 5018 | ||
5019 | /* dss class */ | ||
5020 | &omap44xx_dss_hwmod, | ||
5021 | &omap44xx_dss_dispc_hwmod, | ||
5022 | &omap44xx_dss_dsi1_hwmod, | ||
5023 | &omap44xx_dss_dsi2_hwmod, | ||
5024 | &omap44xx_dss_hdmi_hwmod, | ||
5025 | &omap44xx_dss_rfbi_hwmod, | ||
5026 | &omap44xx_dss_venc_hwmod, | ||
5027 | |||
2034 | /* gpio class */ | 5028 | /* gpio class */ |
2035 | &omap44xx_gpio1_hwmod, | 5029 | &omap44xx_gpio1_hwmod, |
2036 | &omap44xx_gpio2_hwmod, | 5030 | &omap44xx_gpio2_hwmod, |
@@ -2039,17 +5033,56 @@ static __initdata struct omap_hwmod *omap44xx_hwmods[] = { | |||
2039 | &omap44xx_gpio5_hwmod, | 5033 | &omap44xx_gpio5_hwmod, |
2040 | &omap44xx_gpio6_hwmod, | 5034 | &omap44xx_gpio6_hwmod, |
2041 | 5035 | ||
5036 | /* hsi class */ | ||
5037 | /* &omap44xx_hsi_hwmod, */ | ||
5038 | |||
2042 | /* i2c class */ | 5039 | /* i2c class */ |
2043 | &omap44xx_i2c1_hwmod, | 5040 | &omap44xx_i2c1_hwmod, |
2044 | &omap44xx_i2c2_hwmod, | 5041 | &omap44xx_i2c2_hwmod, |
2045 | &omap44xx_i2c3_hwmod, | 5042 | &omap44xx_i2c3_hwmod, |
2046 | &omap44xx_i2c4_hwmod, | 5043 | &omap44xx_i2c4_hwmod, |
2047 | 5044 | ||
5045 | /* ipu class */ | ||
5046 | &omap44xx_ipu_hwmod, | ||
5047 | &omap44xx_ipu_c0_hwmod, | ||
5048 | &omap44xx_ipu_c1_hwmod, | ||
5049 | |||
5050 | /* iss class */ | ||
5051 | /* &omap44xx_iss_hwmod, */ | ||
5052 | |||
2048 | /* iva class */ | 5053 | /* iva class */ |
2049 | &omap44xx_iva_hwmod, | 5054 | &omap44xx_iva_hwmod, |
2050 | &omap44xx_iva_seq0_hwmod, | 5055 | &omap44xx_iva_seq0_hwmod, |
2051 | &omap44xx_iva_seq1_hwmod, | 5056 | &omap44xx_iva_seq1_hwmod, |
2052 | 5057 | ||
5058 | /* kbd class */ | ||
5059 | /* &omap44xx_kbd_hwmod, */ | ||
5060 | |||
5061 | /* mailbox class */ | ||
5062 | &omap44xx_mailbox_hwmod, | ||
5063 | |||
5064 | /* mcbsp class */ | ||
5065 | &omap44xx_mcbsp1_hwmod, | ||
5066 | &omap44xx_mcbsp2_hwmod, | ||
5067 | &omap44xx_mcbsp3_hwmod, | ||
5068 | &omap44xx_mcbsp4_hwmod, | ||
5069 | |||
5070 | /* mcpdm class */ | ||
5071 | /* &omap44xx_mcpdm_hwmod, */ | ||
5072 | |||
5073 | /* mcspi class */ | ||
5074 | &omap44xx_mcspi1_hwmod, | ||
5075 | &omap44xx_mcspi2_hwmod, | ||
5076 | &omap44xx_mcspi3_hwmod, | ||
5077 | &omap44xx_mcspi4_hwmod, | ||
5078 | |||
5079 | /* mmc class */ | ||
5080 | /* &omap44xx_mmc1_hwmod, */ | ||
5081 | /* &omap44xx_mmc2_hwmod, */ | ||
5082 | /* &omap44xx_mmc3_hwmod, */ | ||
5083 | /* &omap44xx_mmc4_hwmod, */ | ||
5084 | /* &omap44xx_mmc5_hwmod, */ | ||
5085 | |||
2053 | /* mpu class */ | 5086 | /* mpu class */ |
2054 | &omap44xx_mpu_hwmod, | 5087 | &omap44xx_mpu_hwmod, |
2055 | 5088 | ||
@@ -2058,12 +5091,31 @@ static __initdata struct omap_hwmod *omap44xx_hwmods[] = { | |||
2058 | &omap44xx_smartreflex_iva_hwmod, | 5091 | &omap44xx_smartreflex_iva_hwmod, |
2059 | &omap44xx_smartreflex_mpu_hwmod, | 5092 | &omap44xx_smartreflex_mpu_hwmod, |
2060 | 5093 | ||
5094 | /* spinlock class */ | ||
5095 | &omap44xx_spinlock_hwmod, | ||
5096 | |||
5097 | /* timer class */ | ||
5098 | &omap44xx_timer1_hwmod, | ||
5099 | &omap44xx_timer2_hwmod, | ||
5100 | &omap44xx_timer3_hwmod, | ||
5101 | &omap44xx_timer4_hwmod, | ||
5102 | &omap44xx_timer5_hwmod, | ||
5103 | &omap44xx_timer6_hwmod, | ||
5104 | &omap44xx_timer7_hwmod, | ||
5105 | &omap44xx_timer8_hwmod, | ||
5106 | &omap44xx_timer9_hwmod, | ||
5107 | &omap44xx_timer10_hwmod, | ||
5108 | &omap44xx_timer11_hwmod, | ||
5109 | |||
2061 | /* uart class */ | 5110 | /* uart class */ |
2062 | &omap44xx_uart1_hwmod, | 5111 | &omap44xx_uart1_hwmod, |
2063 | &omap44xx_uart2_hwmod, | 5112 | &omap44xx_uart2_hwmod, |
2064 | &omap44xx_uart3_hwmod, | 5113 | &omap44xx_uart3_hwmod, |
2065 | &omap44xx_uart4_hwmod, | 5114 | &omap44xx_uart4_hwmod, |
2066 | 5115 | ||
5116 | /* usb_otg_hs class */ | ||
5117 | &omap44xx_usb_otg_hs_hwmod, | ||
5118 | |||
2067 | /* wd_timer class */ | 5119 | /* wd_timer class */ |
2068 | &omap44xx_wd_timer2_hwmod, | 5120 | &omap44xx_wd_timer2_hwmod, |
2069 | &omap44xx_wd_timer3_hwmod, | 5121 | &omap44xx_wd_timer3_hwmod, |
@@ -2073,6 +5125,6 @@ static __initdata struct omap_hwmod *omap44xx_hwmods[] = { | |||
2073 | 5125 | ||
2074 | int __init omap44xx_hwmod_init(void) | 5126 | int __init omap44xx_hwmod_init(void) |
2075 | { | 5127 | { |
2076 | return omap_hwmod_init(omap44xx_hwmods); | 5128 | return omap_hwmod_register(omap44xx_hwmods); |
2077 | } | 5129 | } |
2078 | 5130 | ||
diff --git a/arch/arm/mach-omap2/omap_phy_internal.c b/arch/arm/mach-omap2/omap_phy_internal.c index 745252c60e32..f172ec06c06a 100644 --- a/arch/arm/mach-omap2/omap_phy_internal.c +++ b/arch/arm/mach-omap2/omap_phy_internal.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/usb.h> | 29 | #include <linux/usb.h> |
30 | 30 | ||
31 | #include <plat/usb.h> | 31 | #include <plat/usb.h> |
32 | #include "control.h" | ||
32 | 33 | ||
33 | /* OMAP control module register for UTMI PHY */ | 34 | /* OMAP control module register for UTMI PHY */ |
34 | #define CONTROL_DEV_CONF 0x300 | 35 | #define CONTROL_DEV_CONF 0x300 |
@@ -147,3 +148,95 @@ int omap4430_phy_exit(struct device *dev) | |||
147 | 148 | ||
148 | return 0; | 149 | return 0; |
149 | } | 150 | } |
151 | |||
152 | void am35x_musb_reset(void) | ||
153 | { | ||
154 | u32 regval; | ||
155 | |||
156 | /* Reset the musb interface */ | ||
157 | regval = omap_ctrl_readl(AM35XX_CONTROL_IP_SW_RESET); | ||
158 | |||
159 | regval |= AM35XX_USBOTGSS_SW_RST; | ||
160 | omap_ctrl_writel(regval, AM35XX_CONTROL_IP_SW_RESET); | ||
161 | |||
162 | regval &= ~AM35XX_USBOTGSS_SW_RST; | ||
163 | omap_ctrl_writel(regval, AM35XX_CONTROL_IP_SW_RESET); | ||
164 | |||
165 | regval = omap_ctrl_readl(AM35XX_CONTROL_IP_SW_RESET); | ||
166 | } | ||
167 | |||
168 | void am35x_musb_phy_power(u8 on) | ||
169 | { | ||
170 | unsigned long timeout = jiffies + msecs_to_jiffies(100); | ||
171 | u32 devconf2; | ||
172 | |||
173 | if (on) { | ||
174 | /* | ||
175 | * Start the on-chip PHY and its PLL. | ||
176 | */ | ||
177 | devconf2 = omap_ctrl_readl(AM35XX_CONTROL_DEVCONF2); | ||
178 | |||
179 | devconf2 &= ~(CONF2_RESET | CONF2_PHYPWRDN | CONF2_OTGPWRDN); | ||
180 | devconf2 |= CONF2_PHY_PLLON; | ||
181 | |||
182 | omap_ctrl_writel(devconf2, AM35XX_CONTROL_DEVCONF2); | ||
183 | |||
184 | pr_info(KERN_INFO "Waiting for PHY clock good...\n"); | ||
185 | while (!(omap_ctrl_readl(AM35XX_CONTROL_DEVCONF2) | ||
186 | & CONF2_PHYCLKGD)) { | ||
187 | cpu_relax(); | ||
188 | |||
189 | if (time_after(jiffies, timeout)) { | ||
190 | pr_err(KERN_ERR "musb PHY clock good timed out\n"); | ||
191 | break; | ||
192 | } | ||
193 | } | ||
194 | } else { | ||
195 | /* | ||
196 | * Power down the on-chip PHY. | ||
197 | */ | ||
198 | devconf2 = omap_ctrl_readl(AM35XX_CONTROL_DEVCONF2); | ||
199 | |||
200 | devconf2 &= ~CONF2_PHY_PLLON; | ||
201 | devconf2 |= CONF2_PHYPWRDN | CONF2_OTGPWRDN; | ||
202 | omap_ctrl_writel(devconf2, AM35XX_CONTROL_DEVCONF2); | ||
203 | } | ||
204 | } | ||
205 | |||
206 | void am35x_musb_clear_irq(void) | ||
207 | { | ||
208 | u32 regval; | ||
209 | |||
210 | regval = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR); | ||
211 | regval |= AM35XX_USBOTGSS_INT_CLR; | ||
212 | omap_ctrl_writel(regval, AM35XX_CONTROL_LVL_INTR_CLEAR); | ||
213 | regval = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR); | ||
214 | } | ||
215 | |||
216 | void am35x_musb_set_mode(u8 musb_mode) | ||
217 | { | ||
218 | u32 devconf2 = omap_ctrl_readl(AM35XX_CONTROL_DEVCONF2); | ||
219 | |||
220 | devconf2 &= ~CONF2_OTGMODE; | ||
221 | switch (musb_mode) { | ||
222 | #ifdef CONFIG_USB_MUSB_HDRC_HCD | ||
223 | case MUSB_HOST: /* Force VBUS valid, ID = 0 */ | ||
224 | devconf2 |= CONF2_FORCE_HOST; | ||
225 | break; | ||
226 | #endif | ||
227 | #ifdef CONFIG_USB_GADGET_MUSB_HDRC | ||
228 | case MUSB_PERIPHERAL: /* Force VBUS valid, ID = 1 */ | ||
229 | devconf2 |= CONF2_FORCE_DEVICE; | ||
230 | break; | ||
231 | #endif | ||
232 | #ifdef CONFIG_USB_MUSB_OTG | ||
233 | case MUSB_OTG: /* Don't override the VBUS/ID comparators */ | ||
234 | devconf2 |= CONF2_NO_OVERRIDE; | ||
235 | break; | ||
236 | #endif | ||
237 | default: | ||
238 | pr_info(KERN_INFO "Unsupported mode %u\n", musb_mode); | ||
239 | } | ||
240 | |||
241 | omap_ctrl_writel(devconf2, AM35XX_CONTROL_DEVCONF2); | ||
242 | } | ||
diff --git a/arch/arm/mach-omap2/opp2xxx.h b/arch/arm/mach-omap2/opp2xxx.h index 38b730550506..8affc66a92c2 100644 --- a/arch/arm/mach-omap2/opp2xxx.h +++ b/arch/arm/mach-omap2/opp2xxx.h | |||
@@ -418,7 +418,7 @@ struct prcm_config { | |||
418 | 418 | ||
419 | extern const struct prcm_config omap2420_rate_table[]; | 419 | extern const struct prcm_config omap2420_rate_table[]; |
420 | 420 | ||
421 | #ifdef CONFIG_ARCH_OMAP2430 | 421 | #ifdef CONFIG_SOC_OMAP2430 |
422 | extern const struct prcm_config omap2430_rate_table[]; | 422 | extern const struct prcm_config omap2430_rate_table[]; |
423 | #else | 423 | #else |
424 | #define omap2430_rate_table NULL | 424 | #define omap2430_rate_table NULL |
diff --git a/arch/arm/mach-omap2/powerdomains2xxx_data.c b/arch/arm/mach-omap2/powerdomains2xxx_data.c index 9b1a33500577..78739e10f5b9 100644 --- a/arch/arm/mach-omap2/powerdomains2xxx_data.c +++ b/arch/arm/mach-omap2/powerdomains2xxx_data.c | |||
@@ -78,7 +78,7 @@ static struct powerdomain core_24xx_pwrdm = { | |||
78 | * 2430-specific powerdomains | 78 | * 2430-specific powerdomains |
79 | */ | 79 | */ |
80 | 80 | ||
81 | #ifdef CONFIG_ARCH_OMAP2430 | 81 | #ifdef CONFIG_SOC_OMAP2430 |
82 | 82 | ||
83 | /* XXX 2430 KILLDOMAINWKUP bit? No current users apparently */ | 83 | /* XXX 2430 KILLDOMAINWKUP bit? No current users apparently */ |
84 | 84 | ||
@@ -97,7 +97,7 @@ static struct powerdomain mdm_pwrdm = { | |||
97 | }, | 97 | }, |
98 | }; | 98 | }; |
99 | 99 | ||
100 | #endif /* CONFIG_ARCH_OMAP2430 */ | 100 | #endif /* CONFIG_SOC_OMAP2430 */ |
101 | 101 | ||
102 | /* As powerdomains are added or removed above, this list must also be changed */ | 102 | /* As powerdomains are added or removed above, this list must also be changed */ |
103 | static struct powerdomain *powerdomains_omap2xxx[] __initdata = { | 103 | static struct powerdomain *powerdomains_omap2xxx[] __initdata = { |
@@ -111,7 +111,7 @@ static struct powerdomain *powerdomains_omap2xxx[] __initdata = { | |||
111 | &core_24xx_pwrdm, | 111 | &core_24xx_pwrdm, |
112 | #endif | 112 | #endif |
113 | 113 | ||
114 | #ifdef CONFIG_ARCH_OMAP2430 | 114 | #ifdef CONFIG_SOC_OMAP2430 |
115 | &mdm_pwrdm, | 115 | &mdm_pwrdm, |
116 | #endif | 116 | #endif |
117 | NULL | 117 | NULL |
diff --git a/arch/arm/mach-omap2/prcm.c b/arch/arm/mach-omap2/prcm.c index 679bcd28576e..6be14389e4f3 100644 --- a/arch/arm/mach-omap2/prcm.c +++ b/arch/arm/mach-omap2/prcm.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/io.h> | 24 | #include <linux/io.h> |
25 | #include <linux/delay.h> | 25 | #include <linux/delay.h> |
26 | 26 | ||
27 | #include <mach/system.h> | ||
27 | #include <plat/common.h> | 28 | #include <plat/common.h> |
28 | #include <plat/prcm.h> | 29 | #include <plat/prcm.h> |
29 | #include <plat/irqs.h> | 30 | #include <plat/irqs.h> |
@@ -57,7 +58,7 @@ u32 omap_prcm_get_reset_sources(void) | |||
57 | EXPORT_SYMBOL(omap_prcm_get_reset_sources); | 58 | EXPORT_SYMBOL(omap_prcm_get_reset_sources); |
58 | 59 | ||
59 | /* Resets clock rates and reboots the system. Only called from system.h */ | 60 | /* Resets clock rates and reboots the system. Only called from system.h */ |
60 | void omap_prcm_arch_reset(char mode, const char *cmd) | 61 | static void omap_prcm_arch_reset(char mode, const char *cmd) |
61 | { | 62 | { |
62 | s16 prcm_offs = 0; | 63 | s16 prcm_offs = 0; |
63 | 64 | ||
@@ -108,6 +109,8 @@ void omap_prcm_arch_reset(char mode, const char *cmd) | |||
108 | omap2_prm_read_mod_reg(prcm_offs, OMAP2_RM_RSTCTRL); /* OCP barrier */ | 109 | omap2_prm_read_mod_reg(prcm_offs, OMAP2_RM_RSTCTRL); /* OCP barrier */ |
109 | } | 110 | } |
110 | 111 | ||
112 | void (*arch_reset)(char, const char *) = omap_prcm_arch_reset; | ||
113 | |||
111 | /** | 114 | /** |
112 | * omap2_cm_wait_idlest - wait for IDLEST bit to indicate module readiness | 115 | * omap2_cm_wait_idlest - wait for IDLEST bit to indicate module readiness |
113 | * @reg: physical address of module IDLEST register | 116 | * @reg: physical address of module IDLEST register |
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c index 32e91a9c8b6b..1ac361b7b8cb 100644 --- a/arch/arm/mach-omap2/serial.c +++ b/arch/arm/mach-omap2/serial.c | |||
@@ -486,7 +486,7 @@ static void omap_uart_idle_init(struct omap_uart_state *uart) | |||
486 | mod_timer(&uart->timer, jiffies + uart->timeout); | 486 | mod_timer(&uart->timer, jiffies + uart->timeout); |
487 | omap_uart_smart_idle_enable(uart, 0); | 487 | omap_uart_smart_idle_enable(uart, 0); |
488 | 488 | ||
489 | if (cpu_is_omap34xx()) { | 489 | if (cpu_is_omap34xx() && !cpu_is_ti816x()) { |
490 | u32 mod = (uart->num > 1) ? OMAP3430_PER_MOD : CORE_MOD; | 490 | u32 mod = (uart->num > 1) ? OMAP3430_PER_MOD : CORE_MOD; |
491 | u32 wk_mask = 0; | 491 | u32 wk_mask = 0; |
492 | u32 padconf = 0; | 492 | u32 padconf = 0; |
@@ -655,7 +655,7 @@ static void serial_out_override(struct uart_port *up, int offset, int value) | |||
655 | } | 655 | } |
656 | #endif | 656 | #endif |
657 | 657 | ||
658 | void __init omap_serial_early_init(void) | 658 | static int __init omap_serial_early_init(void) |
659 | { | 659 | { |
660 | int i = 0; | 660 | int i = 0; |
661 | 661 | ||
@@ -672,7 +672,7 @@ void __init omap_serial_early_init(void) | |||
672 | 672 | ||
673 | uart = kzalloc(sizeof(struct omap_uart_state), GFP_KERNEL); | 673 | uart = kzalloc(sizeof(struct omap_uart_state), GFP_KERNEL); |
674 | if (WARN_ON(!uart)) | 674 | if (WARN_ON(!uart)) |
675 | return; | 675 | return -ENODEV; |
676 | 676 | ||
677 | uart->oh = oh; | 677 | uart->oh = oh; |
678 | uart->num = i++; | 678 | uart->num = i++; |
@@ -680,7 +680,7 @@ void __init omap_serial_early_init(void) | |||
680 | num_uarts++; | 680 | num_uarts++; |
681 | 681 | ||
682 | /* | 682 | /* |
683 | * NOTE: omap_hwmod_init() has not yet been called, | 683 | * NOTE: omap_hwmod_setup*() has not yet been called, |
684 | * so no hwmod functions will work yet. | 684 | * so no hwmod functions will work yet. |
685 | */ | 685 | */ |
686 | 686 | ||
@@ -691,7 +691,10 @@ void __init omap_serial_early_init(void) | |||
691 | */ | 691 | */ |
692 | uart->oh->flags |= HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET; | 692 | uart->oh->flags |= HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET; |
693 | } while (1); | 693 | } while (1); |
694 | |||
695 | return 0; | ||
694 | } | 696 | } |
697 | core_initcall(omap_serial_early_init); | ||
695 | 698 | ||
696 | /** | 699 | /** |
697 | * omap_serial_init_port() - initialize single serial port | 700 | * omap_serial_init_port() - initialize single serial port |
@@ -759,13 +762,13 @@ void __init omap_serial_init_port(struct omap_board_data *bdata) | |||
759 | p->private_data = uart; | 762 | p->private_data = uart; |
760 | 763 | ||
761 | /* | 764 | /* |
762 | * omap44xx: Never read empty UART fifo | 765 | * omap44xx, ti816x: Never read empty UART fifo |
763 | * omap3xxx: Never read empty UART fifo on UARTs | 766 | * omap3xxx: Never read empty UART fifo on UARTs |
764 | * with IP rev >=0x52 | 767 | * with IP rev >=0x52 |
765 | */ | 768 | */ |
766 | uart->regshift = p->regshift; | 769 | uart->regshift = p->regshift; |
767 | uart->membase = p->membase; | 770 | uart->membase = p->membase; |
768 | if (cpu_is_omap44xx()) | 771 | if (cpu_is_omap44xx() || cpu_is_ti816x()) |
769 | uart->errata |= UART_ERRATA_FIFO_FULL_ABORT; | 772 | uart->errata |= UART_ERRATA_FIFO_FULL_ABORT; |
770 | else if ((serial_read_reg(uart, UART_OMAP_MVER) & 0xFF) | 773 | else if ((serial_read_reg(uart, UART_OMAP_MVER) & 0xFF) |
771 | >= UART_OMAP_NO_EMPTY_FIFO_READ_IP_REV) | 774 | >= UART_OMAP_NO_EMPTY_FIFO_READ_IP_REV) |
@@ -847,7 +850,7 @@ void __init omap_serial_init_port(struct omap_board_data *bdata) | |||
847 | } | 850 | } |
848 | 851 | ||
849 | /* Enable the MDR1 errata for OMAP3 */ | 852 | /* Enable the MDR1 errata for OMAP3 */ |
850 | if (cpu_is_omap34xx()) | 853 | if (cpu_is_omap34xx() && !cpu_is_ti816x()) |
851 | uart->errata |= UART_ERRATA_i202_MDR1_ACCESS; | 854 | uart->errata |= UART_ERRATA_i202_MDR1_ACCESS; |
852 | } | 855 | } |
853 | 856 | ||
diff --git a/arch/arm/mach-omap2/timer-gp.c b/arch/arm/mach-omap2/timer-gp.c index 0fc550e7e482..3b9cf85f4bb9 100644 --- a/arch/arm/mach-omap2/timer-gp.c +++ b/arch/arm/mach-omap2/timer-gp.c | |||
@@ -40,10 +40,11 @@ | |||
40 | #include <plat/dmtimer.h> | 40 | #include <plat/dmtimer.h> |
41 | #include <asm/localtimer.h> | 41 | #include <asm/localtimer.h> |
42 | #include <asm/sched_clock.h> | 42 | #include <asm/sched_clock.h> |
43 | #include <plat/common.h> | ||
44 | #include <plat/omap_hwmod.h> | ||
43 | 45 | ||
44 | #include "timer-gp.h" | 46 | #include "timer-gp.h" |
45 | 47 | ||
46 | #include <plat/common.h> | ||
47 | 48 | ||
48 | /* MAX_GPTIMER_ID: number of GPTIMERs on the chip */ | 49 | /* MAX_GPTIMER_ID: number of GPTIMERs on the chip */ |
49 | #define MAX_GPTIMER_ID 12 | 50 | #define MAX_GPTIMER_ID 12 |
@@ -133,9 +134,13 @@ static void __init omap2_gp_clockevent_init(void) | |||
133 | { | 134 | { |
134 | u32 tick_rate; | 135 | u32 tick_rate; |
135 | int src; | 136 | int src; |
137 | char clockevent_hwmod_name[8]; /* 8 = sizeof("timerXX0") */ | ||
136 | 138 | ||
137 | inited = 1; | 139 | inited = 1; |
138 | 140 | ||
141 | sprintf(clockevent_hwmod_name, "timer%d", gptimer_id); | ||
142 | omap_hwmod_setup_one(clockevent_hwmod_name); | ||
143 | |||
139 | gptimer = omap_dm_timer_request_specific(gptimer_id); | 144 | gptimer = omap_dm_timer_request_specific(gptimer_id); |
140 | BUG_ON(gptimer == NULL); | 145 | BUG_ON(gptimer == NULL); |
141 | gptimer_wakeup = gptimer; | 146 | gptimer_wakeup = gptimer; |
diff --git a/arch/arm/mach-omap2/usb-musb.c b/arch/arm/mach-omap2/usb-musb.c index 5298949d4b11..a9d4d143086d 100644 --- a/arch/arm/mach-omap2/usb-musb.c +++ b/arch/arm/mach-omap2/usb-musb.c | |||
@@ -30,118 +30,11 @@ | |||
30 | #include <mach/irqs.h> | 30 | #include <mach/irqs.h> |
31 | #include <mach/am35xx.h> | 31 | #include <mach/am35xx.h> |
32 | #include <plat/usb.h> | 32 | #include <plat/usb.h> |
33 | #include "control.h" | 33 | #include <plat/omap_device.h> |
34 | #include "mux.h" | ||
34 | 35 | ||
35 | #if defined(CONFIG_USB_MUSB_OMAP2PLUS) || defined (CONFIG_USB_MUSB_AM35X) | 36 | #if defined(CONFIG_USB_MUSB_OMAP2PLUS) || defined (CONFIG_USB_MUSB_AM35X) |
36 | 37 | ||
37 | static void am35x_musb_reset(void) | ||
38 | { | ||
39 | u32 regval; | ||
40 | |||
41 | /* Reset the musb interface */ | ||
42 | regval = omap_ctrl_readl(AM35XX_CONTROL_IP_SW_RESET); | ||
43 | |||
44 | regval |= AM35XX_USBOTGSS_SW_RST; | ||
45 | omap_ctrl_writel(regval, AM35XX_CONTROL_IP_SW_RESET); | ||
46 | |||
47 | regval &= ~AM35XX_USBOTGSS_SW_RST; | ||
48 | omap_ctrl_writel(regval, AM35XX_CONTROL_IP_SW_RESET); | ||
49 | |||
50 | regval = omap_ctrl_readl(AM35XX_CONTROL_IP_SW_RESET); | ||
51 | } | ||
52 | |||
53 | static void am35x_musb_phy_power(u8 on) | ||
54 | { | ||
55 | unsigned long timeout = jiffies + msecs_to_jiffies(100); | ||
56 | u32 devconf2; | ||
57 | |||
58 | if (on) { | ||
59 | /* | ||
60 | * Start the on-chip PHY and its PLL. | ||
61 | */ | ||
62 | devconf2 = omap_ctrl_readl(AM35XX_CONTROL_DEVCONF2); | ||
63 | |||
64 | devconf2 &= ~(CONF2_RESET | CONF2_PHYPWRDN | CONF2_OTGPWRDN); | ||
65 | devconf2 |= CONF2_PHY_PLLON; | ||
66 | |||
67 | omap_ctrl_writel(devconf2, AM35XX_CONTROL_DEVCONF2); | ||
68 | |||
69 | pr_info(KERN_INFO "Waiting for PHY clock good...\n"); | ||
70 | while (!(omap_ctrl_readl(AM35XX_CONTROL_DEVCONF2) | ||
71 | & CONF2_PHYCLKGD)) { | ||
72 | cpu_relax(); | ||
73 | |||
74 | if (time_after(jiffies, timeout)) { | ||
75 | pr_err(KERN_ERR "musb PHY clock good timed out\n"); | ||
76 | break; | ||
77 | } | ||
78 | } | ||
79 | } else { | ||
80 | /* | ||
81 | * Power down the on-chip PHY. | ||
82 | */ | ||
83 | devconf2 = omap_ctrl_readl(AM35XX_CONTROL_DEVCONF2); | ||
84 | |||
85 | devconf2 &= ~CONF2_PHY_PLLON; | ||
86 | devconf2 |= CONF2_PHYPWRDN | CONF2_OTGPWRDN; | ||
87 | omap_ctrl_writel(devconf2, AM35XX_CONTROL_DEVCONF2); | ||
88 | } | ||
89 | } | ||
90 | |||
91 | static void am35x_musb_clear_irq(void) | ||
92 | { | ||
93 | u32 regval; | ||
94 | |||
95 | regval = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR); | ||
96 | regval |= AM35XX_USBOTGSS_INT_CLR; | ||
97 | omap_ctrl_writel(regval, AM35XX_CONTROL_LVL_INTR_CLEAR); | ||
98 | regval = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR); | ||
99 | } | ||
100 | |||
101 | static void am35x_musb_set_mode(u8 musb_mode) | ||
102 | { | ||
103 | u32 devconf2 = omap_ctrl_readl(AM35XX_CONTROL_DEVCONF2); | ||
104 | |||
105 | devconf2 &= ~CONF2_OTGMODE; | ||
106 | switch (musb_mode) { | ||
107 | #ifdef CONFIG_USB_MUSB_HDRC_HCD | ||
108 | case MUSB_HOST: /* Force VBUS valid, ID = 0 */ | ||
109 | devconf2 |= CONF2_FORCE_HOST; | ||
110 | break; | ||
111 | #endif | ||
112 | #ifdef CONFIG_USB_GADGET_MUSB_HDRC | ||
113 | case MUSB_PERIPHERAL: /* Force VBUS valid, ID = 1 */ | ||
114 | devconf2 |= CONF2_FORCE_DEVICE; | ||
115 | break; | ||
116 | #endif | ||
117 | #ifdef CONFIG_USB_MUSB_OTG | ||
118 | case MUSB_OTG: /* Don't override the VBUS/ID comparators */ | ||
119 | devconf2 |= CONF2_NO_OVERRIDE; | ||
120 | break; | ||
121 | #endif | ||
122 | default: | ||
123 | pr_info(KERN_INFO "Unsupported mode %u\n", musb_mode); | ||
124 | } | ||
125 | |||
126 | omap_ctrl_writel(devconf2, AM35XX_CONTROL_DEVCONF2); | ||
127 | } | ||
128 | |||
129 | static struct resource musb_resources[] = { | ||
130 | [0] = { /* start and end set dynamically */ | ||
131 | .flags = IORESOURCE_MEM, | ||
132 | }, | ||
133 | [1] = { /* general IRQ */ | ||
134 | .start = INT_243X_HS_USB_MC, | ||
135 | .flags = IORESOURCE_IRQ, | ||
136 | .name = "mc", | ||
137 | }, | ||
138 | [2] = { /* DMA IRQ */ | ||
139 | .start = INT_243X_HS_USB_DMA, | ||
140 | .flags = IORESOURCE_IRQ, | ||
141 | .name = "dma", | ||
142 | }, | ||
143 | }; | ||
144 | |||
145 | static struct musb_hdrc_config musb_config = { | 38 | static struct musb_hdrc_config musb_config = { |
146 | .multipoint = 1, | 39 | .multipoint = 1, |
147 | .dyn_fifo = 1, | 40 | .dyn_fifo = 1, |
@@ -169,38 +62,65 @@ static struct musb_hdrc_platform_data musb_plat = { | |||
169 | 62 | ||
170 | static u64 musb_dmamask = DMA_BIT_MASK(32); | 63 | static u64 musb_dmamask = DMA_BIT_MASK(32); |
171 | 64 | ||
172 | static struct platform_device musb_device = { | 65 | static struct omap_device_pm_latency omap_musb_latency[] = { |
173 | .name = "musb-omap2430", | 66 | { |
174 | .id = -1, | 67 | .deactivate_func = omap_device_idle_hwmods, |
175 | .dev = { | 68 | .activate_func = omap_device_enable_hwmods, |
176 | .dma_mask = &musb_dmamask, | 69 | .flags = OMAP_DEVICE_LATENCY_AUTO_ADJUST, |
177 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
178 | .platform_data = &musb_plat, | ||
179 | }, | 70 | }, |
180 | .num_resources = ARRAY_SIZE(musb_resources), | ||
181 | .resource = musb_resources, | ||
182 | }; | 71 | }; |
183 | 72 | ||
73 | static void usb_musb_mux_init(struct omap_musb_board_data *board_data) | ||
74 | { | ||
75 | switch (board_data->interface_type) { | ||
76 | case MUSB_INTERFACE_UTMI: | ||
77 | omap_mux_init_signal("usba0_otg_dp", OMAP_PIN_INPUT); | ||
78 | omap_mux_init_signal("usba0_otg_dm", OMAP_PIN_INPUT); | ||
79 | break; | ||
80 | case MUSB_INTERFACE_ULPI: | ||
81 | omap_mux_init_signal("usba0_ulpiphy_clk", | ||
82 | OMAP_PIN_INPUT_PULLDOWN); | ||
83 | omap_mux_init_signal("usba0_ulpiphy_stp", | ||
84 | OMAP_PIN_INPUT_PULLDOWN); | ||
85 | omap_mux_init_signal("usba0_ulpiphy_dir", | ||
86 | OMAP_PIN_INPUT_PULLDOWN); | ||
87 | omap_mux_init_signal("usba0_ulpiphy_nxt", | ||
88 | OMAP_PIN_INPUT_PULLDOWN); | ||
89 | omap_mux_init_signal("usba0_ulpiphy_dat0", | ||
90 | OMAP_PIN_INPUT_PULLDOWN); | ||
91 | omap_mux_init_signal("usba0_ulpiphy_dat1", | ||
92 | OMAP_PIN_INPUT_PULLDOWN); | ||
93 | omap_mux_init_signal("usba0_ulpiphy_dat2", | ||
94 | OMAP_PIN_INPUT_PULLDOWN); | ||
95 | omap_mux_init_signal("usba0_ulpiphy_dat3", | ||
96 | OMAP_PIN_INPUT_PULLDOWN); | ||
97 | omap_mux_init_signal("usba0_ulpiphy_dat4", | ||
98 | OMAP_PIN_INPUT_PULLDOWN); | ||
99 | omap_mux_init_signal("usba0_ulpiphy_dat5", | ||
100 | OMAP_PIN_INPUT_PULLDOWN); | ||
101 | omap_mux_init_signal("usba0_ulpiphy_dat6", | ||
102 | OMAP_PIN_INPUT_PULLDOWN); | ||
103 | omap_mux_init_signal("usba0_ulpiphy_dat7", | ||
104 | OMAP_PIN_INPUT_PULLDOWN); | ||
105 | break; | ||
106 | default: | ||
107 | break; | ||
108 | } | ||
109 | } | ||
110 | |||
184 | void __init usb_musb_init(struct omap_musb_board_data *board_data) | 111 | void __init usb_musb_init(struct omap_musb_board_data *board_data) |
185 | { | 112 | { |
186 | if (cpu_is_omap243x()) { | 113 | struct omap_hwmod *oh; |
187 | musb_resources[0].start = OMAP243X_HS_BASE; | 114 | struct omap_device *od; |
188 | } else if (cpu_is_omap3517() || cpu_is_omap3505()) { | 115 | struct platform_device *pdev; |
189 | musb_device.name = "musb-am35x"; | 116 | struct device *dev; |
190 | musb_resources[0].start = AM35XX_IPSS_USBOTGSS_BASE; | 117 | int bus_id = -1; |
191 | musb_resources[1].start = INT_35XX_USBOTG_IRQ; | 118 | const char *oh_name, *name; |
192 | board_data->set_phy_power = am35x_musb_phy_power; | 119 | |
193 | board_data->clear_irq = am35x_musb_clear_irq; | 120 | if (cpu_is_omap3517() || cpu_is_omap3505()) { |
194 | board_data->set_mode = am35x_musb_set_mode; | ||
195 | board_data->reset = am35x_musb_reset; | ||
196 | } else if (cpu_is_omap34xx()) { | ||
197 | musb_resources[0].start = OMAP34XX_HSUSB_OTG_BASE; | ||
198 | } else if (cpu_is_omap44xx()) { | 121 | } else if (cpu_is_omap44xx()) { |
199 | musb_resources[0].start = OMAP44XX_HSUSB_OTG_BASE; | 122 | usb_musb_mux_init(board_data); |
200 | musb_resources[1].start = OMAP44XX_IRQ_HS_USB_MC_N; | ||
201 | musb_resources[2].start = OMAP44XX_IRQ_HS_USB_DMA_N; | ||
202 | } | 123 | } |
203 | musb_resources[0].end = musb_resources[0].start + SZ_4K - 1; | ||
204 | 124 | ||
205 | /* | 125 | /* |
206 | * REVISIT: This line can be removed once all the platforms using | 126 | * REVISIT: This line can be removed once all the platforms using |
@@ -212,8 +132,35 @@ void __init usb_musb_init(struct omap_musb_board_data *board_data) | |||
212 | musb_plat.mode = board_data->mode; | 132 | musb_plat.mode = board_data->mode; |
213 | musb_plat.extvbus = board_data->extvbus; | 133 | musb_plat.extvbus = board_data->extvbus; |
214 | 134 | ||
215 | if (platform_device_register(&musb_device) < 0) | 135 | if (cpu_is_omap3517() || cpu_is_omap3505()) { |
216 | printk(KERN_ERR "Unable to register HS-USB (MUSB) device\n"); | 136 | oh_name = "am35x_otg_hs"; |
137 | name = "musb-am35x"; | ||
138 | } else { | ||
139 | oh_name = "usb_otg_hs"; | ||
140 | name = "musb-omap2430"; | ||
141 | } | ||
142 | |||
143 | oh = omap_hwmod_lookup(oh_name); | ||
144 | if (!oh) { | ||
145 | pr_err("Could not look up %s\n", oh_name); | ||
146 | return; | ||
147 | } | ||
148 | |||
149 | od = omap_device_build(name, bus_id, oh, &musb_plat, | ||
150 | sizeof(musb_plat), omap_musb_latency, | ||
151 | ARRAY_SIZE(omap_musb_latency), false); | ||
152 | if (IS_ERR(od)) { | ||
153 | pr_err("Could not build omap_device for %s %s\n", | ||
154 | name, oh_name); | ||
155 | return; | ||
156 | } | ||
157 | |||
158 | pdev = &od->pdev; | ||
159 | dev = &pdev->dev; | ||
160 | get_device(dev); | ||
161 | dev->dma_mask = &musb_dmamask; | ||
162 | dev->coherent_dma_mask = musb_dmamask; | ||
163 | put_device(dev); | ||
217 | } | 164 | } |
218 | 165 | ||
219 | #else | 166 | #else |
diff --git a/arch/arm/plat-omap/common.c b/arch/arm/plat-omap/common.c index f04731820301..d9f10a31e604 100644 --- a/arch/arm/plat-omap/common.c +++ b/arch/arm/plat-omap/common.c | |||
@@ -24,10 +24,11 @@ | |||
24 | 24 | ||
25 | #define NO_LENGTH_CHECK 0xffffffff | 25 | #define NO_LENGTH_CHECK 0xffffffff |
26 | 26 | ||
27 | struct omap_board_config_kernel *omap_board_config; | 27 | struct omap_board_config_kernel *omap_board_config __initdata; |
28 | int omap_board_config_size; | 28 | int omap_board_config_size; |
29 | 29 | ||
30 | static const void *get_config(u16 tag, size_t len, int skip, size_t *len_out) | 30 | static const void *__init get_config(u16 tag, size_t len, |
31 | int skip, size_t *len_out) | ||
31 | { | 32 | { |
32 | struct omap_board_config_kernel *kinfo = NULL; | 33 | struct omap_board_config_kernel *kinfo = NULL; |
33 | int i; | 34 | int i; |
@@ -49,17 +50,15 @@ static const void *get_config(u16 tag, size_t len, int skip, size_t *len_out) | |||
49 | return kinfo->data; | 50 | return kinfo->data; |
50 | } | 51 | } |
51 | 52 | ||
52 | const void *__omap_get_config(u16 tag, size_t len, int nr) | 53 | const void *__init __omap_get_config(u16 tag, size_t len, int nr) |
53 | { | 54 | { |
54 | return get_config(tag, len, nr, NULL); | 55 | return get_config(tag, len, nr, NULL); |
55 | } | 56 | } |
56 | EXPORT_SYMBOL(__omap_get_config); | ||
57 | 57 | ||
58 | const void *omap_get_var_config(u16 tag, size_t *len) | 58 | const void *__init omap_get_var_config(u16 tag, size_t *len) |
59 | { | 59 | { |
60 | return get_config(tag, NO_LENGTH_CHECK, 0, len); | 60 | return get_config(tag, NO_LENGTH_CHECK, 0, len); |
61 | } | 61 | } |
62 | EXPORT_SYMBOL(omap_get_var_config); | ||
63 | 62 | ||
64 | void __init omap_reserve(void) | 63 | void __init omap_reserve(void) |
65 | { | 64 | { |
diff --git a/arch/arm/plat-omap/counter_32k.c b/arch/arm/plat-omap/counter_32k.c index 862dda95d61d..f7fed6080190 100644 --- a/arch/arm/plat-omap/counter_32k.c +++ b/arch/arm/plat-omap/counter_32k.c | |||
@@ -54,7 +54,7 @@ static cycle_t notrace omap16xx_32k_read(struct clocksource *cs) | |||
54 | #define omap16xx_32k_read NULL | 54 | #define omap16xx_32k_read NULL |
55 | #endif | 55 | #endif |
56 | 56 | ||
57 | #ifdef CONFIG_ARCH_OMAP2420 | 57 | #ifdef CONFIG_SOC_OMAP2420 |
58 | static cycle_t notrace omap2420_32k_read(struct clocksource *cs) | 58 | static cycle_t notrace omap2420_32k_read(struct clocksource *cs) |
59 | { | 59 | { |
60 | return omap_readl(OMAP2420_32KSYNCT_BASE + 0x10) - offset_32k; | 60 | return omap_readl(OMAP2420_32KSYNCT_BASE + 0x10) - offset_32k; |
@@ -63,7 +63,7 @@ static cycle_t notrace omap2420_32k_read(struct clocksource *cs) | |||
63 | #define omap2420_32k_read NULL | 63 | #define omap2420_32k_read NULL |
64 | #endif | 64 | #endif |
65 | 65 | ||
66 | #ifdef CONFIG_ARCH_OMAP2430 | 66 | #ifdef CONFIG_SOC_OMAP2430 |
67 | static cycle_t notrace omap2430_32k_read(struct clocksource *cs) | 67 | static cycle_t notrace omap2430_32k_read(struct clocksource *cs) |
68 | { | 68 | { |
69 | return omap_readl(OMAP2430_32KSYNCT_BASE + 0x10) - offset_32k; | 69 | return omap_readl(OMAP2430_32KSYNCT_BASE + 0x10) - offset_32k; |
diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c index 85363084cc1a..2ec3b5d9f214 100644 --- a/arch/arm/plat-omap/dma.c +++ b/arch/arm/plat-omap/dma.c | |||
@@ -134,7 +134,7 @@ static inline void omap_enable_channel_irq(int lch); | |||
134 | 134 | ||
135 | #ifdef CONFIG_ARCH_OMAP15XX | 135 | #ifdef CONFIG_ARCH_OMAP15XX |
136 | /* Returns 1 if the DMA module is in OMAP1510-compatible mode, 0 otherwise */ | 136 | /* Returns 1 if the DMA module is in OMAP1510-compatible mode, 0 otherwise */ |
137 | int omap_dma_in_1510_mode(void) | 137 | static int omap_dma_in_1510_mode(void) |
138 | { | 138 | { |
139 | return enable_1510_mode; | 139 | return enable_1510_mode; |
140 | } | 140 | } |
diff --git a/arch/arm/plat-omap/i2c.c b/arch/arm/plat-omap/i2c.c index a4f8003de664..3341ca4703e9 100644 --- a/arch/arm/plat-omap/i2c.c +++ b/arch/arm/plat-omap/i2c.c | |||
@@ -112,6 +112,7 @@ static inline int omap1_i2c_add_bus(int bus_id) | |||
112 | } | 112 | } |
113 | 113 | ||
114 | 114 | ||
115 | #ifdef CONFIG_ARCH_OMAP2PLUS | ||
115 | /* | 116 | /* |
116 | * XXX This function is a temporary compatibility wrapper - only | 117 | * XXX This function is a temporary compatibility wrapper - only |
117 | * needed until the I2C driver can be converted to call | 118 | * needed until the I2C driver can be converted to call |
@@ -130,7 +131,6 @@ static struct omap_device_pm_latency omap_i2c_latency[] = { | |||
130 | }, | 131 | }, |
131 | }; | 132 | }; |
132 | 133 | ||
133 | #ifdef CONFIG_ARCH_OMAP2PLUS | ||
134 | static inline int omap2_i2c_add_bus(int bus_id) | 134 | static inline int omap2_i2c_add_bus(int bus_id) |
135 | { | 135 | { |
136 | int l; | 136 | int l; |
diff --git a/arch/arm/plat-omap/include/plat/board.h b/arch/arm/plat-omap/include/plat/board.h index 3cf4fa25ab3d..97126dfd2888 100644 --- a/arch/arm/plat-omap/include/plat/board.h +++ b/arch/arm/plat-omap/include/plat/board.h | |||
@@ -151,14 +151,14 @@ struct omap_board_config_kernel { | |||
151 | const void *data; | 151 | const void *data; |
152 | }; | 152 | }; |
153 | 153 | ||
154 | extern const void *__omap_get_config(u16 tag, size_t len, int nr); | 154 | extern const void *__init __omap_get_config(u16 tag, size_t len, int nr); |
155 | 155 | ||
156 | #define omap_get_config(tag, type) \ | 156 | #define omap_get_config(tag, type) \ |
157 | ((const type *) __omap_get_config((tag), sizeof(type), 0)) | 157 | ((const type *) __omap_get_config((tag), sizeof(type), 0)) |
158 | #define omap_get_nr_config(tag, type, nr) \ | 158 | #define omap_get_nr_config(tag, type, nr) \ |
159 | ((const type *) __omap_get_config((tag), sizeof(type), (nr))) | 159 | ((const type *) __omap_get_config((tag), sizeof(type), (nr))) |
160 | 160 | ||
161 | extern const void *omap_get_var_config(u16 tag, size_t *len); | 161 | extern const void *__init omap_get_var_config(u16 tag, size_t *len); |
162 | 162 | ||
163 | extern struct omap_board_config_kernel *omap_board_config; | 163 | extern struct omap_board_config_kernel *omap_board_config; |
164 | extern int omap_board_config_size; | 164 | extern int omap_board_config_size; |
diff --git a/arch/arm/plat-omap/include/plat/clkdev_omap.h b/arch/arm/plat-omap/include/plat/clkdev_omap.h index 256ab3f1ec8f..f1899a3e4174 100644 --- a/arch/arm/plat-omap/include/plat/clkdev_omap.h +++ b/arch/arm/plat-omap/include/plat/clkdev_omap.h | |||
@@ -38,6 +38,7 @@ struct omap_clk { | |||
38 | #define CK_3517 (1 << 9) | 38 | #define CK_3517 (1 << 9) |
39 | #define CK_36XX (1 << 10) /* 36xx/37xx-specific clocks */ | 39 | #define CK_36XX (1 << 10) /* 36xx/37xx-specific clocks */ |
40 | #define CK_443X (1 << 11) | 40 | #define CK_443X (1 << 11) |
41 | #define CK_TI816X (1 << 12) | ||
41 | 42 | ||
42 | 43 | ||
43 | #define CK_34XX (CK_3430ES1 | CK_3430ES2PLUS) | 44 | #define CK_34XX (CK_3430ES1 | CK_3430ES2PLUS) |
diff --git a/arch/arm/plat-omap/include/plat/clock.h b/arch/arm/plat-omap/include/plat/clock.h index 8eb0adab19ea..d43e6234dbbb 100644 --- a/arch/arm/plat-omap/include/plat/clock.h +++ b/arch/arm/plat-omap/include/plat/clock.h | |||
@@ -53,6 +53,7 @@ struct clkops { | |||
53 | #define RATE_IN_3430ES2PLUS (1 << 3) /* 3430 ES >= 2 rates only */ | 53 | #define RATE_IN_3430ES2PLUS (1 << 3) /* 3430 ES >= 2 rates only */ |
54 | #define RATE_IN_36XX (1 << 4) | 54 | #define RATE_IN_36XX (1 << 4) |
55 | #define RATE_IN_4430 (1 << 5) | 55 | #define RATE_IN_4430 (1 << 5) |
56 | #define RATE_IN_TI816X (1 << 6) | ||
56 | 57 | ||
57 | #define RATE_IN_24XX (RATE_IN_242X | RATE_IN_243X) | 58 | #define RATE_IN_24XX (RATE_IN_242X | RATE_IN_243X) |
58 | #define RATE_IN_34XX (RATE_IN_3430ES1 | RATE_IN_3430ES2PLUS) | 59 | #define RATE_IN_34XX (RATE_IN_3430ES1 | RATE_IN_3430ES2PLUS) |
diff --git a/arch/arm/plat-omap/include/plat/common.h b/arch/arm/plat-omap/include/plat/common.h index 29b2afb4288f..1dd97e7461c9 100644 --- a/arch/arm/plat-omap/include/plat/common.h +++ b/arch/arm/plat-omap/include/plat/common.h | |||
@@ -66,6 +66,7 @@ void omap2_set_globals_242x(void); | |||
66 | void omap2_set_globals_243x(void); | 66 | void omap2_set_globals_243x(void); |
67 | void omap2_set_globals_3xxx(void); | 67 | void omap2_set_globals_3xxx(void); |
68 | void omap2_set_globals_443x(void); | 68 | void omap2_set_globals_443x(void); |
69 | void omap2_set_globals_ti816x(void); | ||
69 | 70 | ||
70 | /* These get called from omap2_set_globals_xxxx(), do not call these */ | 71 | /* These get called from omap2_set_globals_xxxx(), do not call these */ |
71 | void omap2_set_globals_tap(struct omap_globals *); | 72 | void omap2_set_globals_tap(struct omap_globals *); |
diff --git a/arch/arm/plat-omap/include/plat/cpu.h b/arch/arm/plat-omap/include/plat/cpu.h index 3fd8b4055727..8198bb6cdb5e 100644 --- a/arch/arm/plat-omap/include/plat/cpu.h +++ b/arch/arm/plat-omap/include/plat/cpu.h | |||
@@ -5,7 +5,7 @@ | |||
5 | * | 5 | * |
6 | * Copyright (C) 2004, 2008 Nokia Corporation | 6 | * Copyright (C) 2004, 2008 Nokia Corporation |
7 | * | 7 | * |
8 | * Copyright (C) 2009 Texas Instruments. | 8 | * Copyright (C) 2009-11 Texas Instruments. |
9 | * | 9 | * |
10 | * Written by Tony Lindgren <tony.lindgren@nokia.com> | 10 | * Written by Tony Lindgren <tony.lindgren@nokia.com> |
11 | * | 11 | * |
@@ -105,6 +105,12 @@ static inline int is_omap ##subclass (void) \ | |||
105 | return (GET_OMAP_SUBCLASS == (id)) ? 1 : 0; \ | 105 | return (GET_OMAP_SUBCLASS == (id)) ? 1 : 0; \ |
106 | } | 106 | } |
107 | 107 | ||
108 | #define IS_TI_SUBCLASS(subclass, id) \ | ||
109 | static inline int is_ti ##subclass (void) \ | ||
110 | { \ | ||
111 | return (GET_OMAP_SUBCLASS == (id)) ? 1 : 0; \ | ||
112 | } | ||
113 | |||
108 | IS_OMAP_CLASS(7xx, 0x07) | 114 | IS_OMAP_CLASS(7xx, 0x07) |
109 | IS_OMAP_CLASS(15xx, 0x15) | 115 | IS_OMAP_CLASS(15xx, 0x15) |
110 | IS_OMAP_CLASS(16xx, 0x16) | 116 | IS_OMAP_CLASS(16xx, 0x16) |
@@ -118,6 +124,8 @@ IS_OMAP_SUBCLASS(343x, 0x343) | |||
118 | IS_OMAP_SUBCLASS(363x, 0x363) | 124 | IS_OMAP_SUBCLASS(363x, 0x363) |
119 | IS_OMAP_SUBCLASS(443x, 0x443) | 125 | IS_OMAP_SUBCLASS(443x, 0x443) |
120 | 126 | ||
127 | IS_TI_SUBCLASS(816x, 0x816) | ||
128 | |||
121 | #define cpu_is_omap7xx() 0 | 129 | #define cpu_is_omap7xx() 0 |
122 | #define cpu_is_omap15xx() 0 | 130 | #define cpu_is_omap15xx() 0 |
123 | #define cpu_is_omap16xx() 0 | 131 | #define cpu_is_omap16xx() 0 |
@@ -126,6 +134,7 @@ IS_OMAP_SUBCLASS(443x, 0x443) | |||
126 | #define cpu_is_omap243x() 0 | 134 | #define cpu_is_omap243x() 0 |
127 | #define cpu_is_omap34xx() 0 | 135 | #define cpu_is_omap34xx() 0 |
128 | #define cpu_is_omap343x() 0 | 136 | #define cpu_is_omap343x() 0 |
137 | #define cpu_is_ti816x() 0 | ||
129 | #define cpu_is_omap44xx() 0 | 138 | #define cpu_is_omap44xx() 0 |
130 | #define cpu_is_omap443x() 0 | 139 | #define cpu_is_omap443x() 0 |
131 | 140 | ||
@@ -170,11 +179,11 @@ IS_OMAP_SUBCLASS(443x, 0x443) | |||
170 | # undef cpu_is_omap24xx | 179 | # undef cpu_is_omap24xx |
171 | # define cpu_is_omap24xx() is_omap24xx() | 180 | # define cpu_is_omap24xx() is_omap24xx() |
172 | # endif | 181 | # endif |
173 | # if defined (CONFIG_ARCH_OMAP2420) | 182 | # if defined (CONFIG_SOC_OMAP2420) |
174 | # undef cpu_is_omap242x | 183 | # undef cpu_is_omap242x |
175 | # define cpu_is_omap242x() is_omap242x() | 184 | # define cpu_is_omap242x() is_omap242x() |
176 | # endif | 185 | # endif |
177 | # if defined (CONFIG_ARCH_OMAP2430) | 186 | # if defined (CONFIG_SOC_OMAP2430) |
178 | # undef cpu_is_omap243x | 187 | # undef cpu_is_omap243x |
179 | # define cpu_is_omap243x() is_omap243x() | 188 | # define cpu_is_omap243x() is_omap243x() |
180 | # endif | 189 | # endif |
@@ -189,11 +198,11 @@ IS_OMAP_SUBCLASS(443x, 0x443) | |||
189 | # undef cpu_is_omap24xx | 198 | # undef cpu_is_omap24xx |
190 | # define cpu_is_omap24xx() 1 | 199 | # define cpu_is_omap24xx() 1 |
191 | # endif | 200 | # endif |
192 | # if defined(CONFIG_ARCH_OMAP2420) | 201 | # if defined(CONFIG_SOC_OMAP2420) |
193 | # undef cpu_is_omap242x | 202 | # undef cpu_is_omap242x |
194 | # define cpu_is_omap242x() 1 | 203 | # define cpu_is_omap242x() 1 |
195 | # endif | 204 | # endif |
196 | # if defined(CONFIG_ARCH_OMAP2430) | 205 | # if defined(CONFIG_SOC_OMAP2430) |
197 | # undef cpu_is_omap243x | 206 | # undef cpu_is_omap243x |
198 | # define cpu_is_omap243x() 1 | 207 | # define cpu_is_omap243x() 1 |
199 | # endif | 208 | # endif |
@@ -201,7 +210,7 @@ IS_OMAP_SUBCLASS(443x, 0x443) | |||
201 | # undef cpu_is_omap34xx | 210 | # undef cpu_is_omap34xx |
202 | # define cpu_is_omap34xx() 1 | 211 | # define cpu_is_omap34xx() 1 |
203 | # endif | 212 | # endif |
204 | # if defined(CONFIG_ARCH_OMAP3430) | 213 | # if defined(CONFIG_SOC_OMAP3430) |
205 | # undef cpu_is_omap343x | 214 | # undef cpu_is_omap343x |
206 | # define cpu_is_omap343x() 1 | 215 | # define cpu_is_omap343x() 1 |
207 | # endif | 216 | # endif |
@@ -330,6 +339,7 @@ IS_OMAP_TYPE(3517, 0x3517) | |||
330 | # undef cpu_is_omap3530 | 339 | # undef cpu_is_omap3530 |
331 | # undef cpu_is_omap3505 | 340 | # undef cpu_is_omap3505 |
332 | # undef cpu_is_omap3517 | 341 | # undef cpu_is_omap3517 |
342 | # undef cpu_is_ti816x | ||
333 | # define cpu_is_omap3430() is_omap3430() | 343 | # define cpu_is_omap3430() is_omap3430() |
334 | # define cpu_is_omap3503() (cpu_is_omap3430() && \ | 344 | # define cpu_is_omap3503() (cpu_is_omap3430() && \ |
335 | (!omap3_has_iva()) && \ | 345 | (!omap3_has_iva()) && \ |
@@ -345,6 +355,7 @@ IS_OMAP_TYPE(3517, 0x3517) | |||
345 | # define cpu_is_omap3517() is_omap3517() | 355 | # define cpu_is_omap3517() is_omap3517() |
346 | # undef cpu_is_omap3630 | 356 | # undef cpu_is_omap3630 |
347 | # define cpu_is_omap3630() is_omap363x() | 357 | # define cpu_is_omap3630() is_omap363x() |
358 | # define cpu_is_ti816x() is_ti816x() | ||
348 | #endif | 359 | #endif |
349 | 360 | ||
350 | # if defined(CONFIG_ARCH_OMAP4) | 361 | # if defined(CONFIG_ARCH_OMAP4) |
@@ -389,9 +400,15 @@ IS_OMAP_TYPE(3517, 0x3517) | |||
389 | #define OMAP3505_REV(v) (OMAP35XX_CLASS | (0x3505 << 16) | (v << 8)) | 400 | #define OMAP3505_REV(v) (OMAP35XX_CLASS | (0x3505 << 16) | (v << 8)) |
390 | #define OMAP3517_REV(v) (OMAP35XX_CLASS | (0x3517 << 16) | (v << 8)) | 401 | #define OMAP3517_REV(v) (OMAP35XX_CLASS | (0x3517 << 16) | (v << 8)) |
391 | 402 | ||
403 | #define TI816X_CLASS 0x81600034 | ||
404 | #define TI8168_REV_ES1_0 TI816X_CLASS | ||
405 | #define TI8168_REV_ES1_1 (TI816X_CLASS | (OMAP_REVBITS_01 << 8)) | ||
406 | |||
392 | #define OMAP443X_CLASS 0x44300044 | 407 | #define OMAP443X_CLASS 0x44300044 |
393 | #define OMAP4430_REV_ES1_0 OMAP443X_CLASS | 408 | #define OMAP4430_REV_ES1_0 (OMAP443X_CLASS | (0x10 << 8)) |
394 | #define OMAP4430_REV_ES2_0 0x44301044 | 409 | #define OMAP4430_REV_ES2_0 (OMAP443X_CLASS | (0x20 << 8)) |
410 | #define OMAP4430_REV_ES2_1 (OMAP443X_CLASS | (0x21 << 8)) | ||
411 | #define OMAP4430_REV_ES2_2 (OMAP443X_CLASS | (0x22 << 8)) | ||
395 | 412 | ||
396 | /* | 413 | /* |
397 | * omap_chip bits | 414 | * omap_chip bits |
@@ -419,11 +436,16 @@ IS_OMAP_TYPE(3517, 0x3517) | |||
419 | #define CHIP_IS_OMAP3630ES1_1 (1 << 9) | 436 | #define CHIP_IS_OMAP3630ES1_1 (1 << 9) |
420 | #define CHIP_IS_OMAP3630ES1_2 (1 << 10) | 437 | #define CHIP_IS_OMAP3630ES1_2 (1 << 10) |
421 | #define CHIP_IS_OMAP4430ES2 (1 << 11) | 438 | #define CHIP_IS_OMAP4430ES2 (1 << 11) |
439 | #define CHIP_IS_OMAP4430ES2_1 (1 << 12) | ||
440 | #define CHIP_IS_OMAP4430ES2_2 (1 << 13) | ||
441 | #define CHIP_IS_TI816X (1 << 14) | ||
422 | 442 | ||
423 | #define CHIP_IS_OMAP24XX (CHIP_IS_OMAP2420 | CHIP_IS_OMAP2430) | 443 | #define CHIP_IS_OMAP24XX (CHIP_IS_OMAP2420 | CHIP_IS_OMAP2430) |
424 | 444 | ||
425 | #define CHIP_IS_OMAP4430 (CHIP_IS_OMAP4430ES1 | \ | 445 | #define CHIP_IS_OMAP4430 (CHIP_IS_OMAP4430ES1 | \ |
426 | CHIP_IS_OMAP4430ES2) | 446 | CHIP_IS_OMAP4430ES2 | \ |
447 | CHIP_IS_OMAP4430ES2_1 | \ | ||
448 | CHIP_IS_OMAP4430ES2_2) | ||
427 | 449 | ||
428 | /* | 450 | /* |
429 | * "GE" here represents "greater than or equal to" in terms of ES | 451 | * "GE" here represents "greater than or equal to" in terms of ES |
@@ -455,6 +477,7 @@ extern u32 omap3_features; | |||
455 | #define OMAP3_HAS_ISP BIT(4) | 477 | #define OMAP3_HAS_ISP BIT(4) |
456 | #define OMAP3_HAS_192MHZ_CLK BIT(5) | 478 | #define OMAP3_HAS_192MHZ_CLK BIT(5) |
457 | #define OMAP3_HAS_IO_WAKEUP BIT(6) | 479 | #define OMAP3_HAS_IO_WAKEUP BIT(6) |
480 | #define OMAP3_HAS_SDRC BIT(7) | ||
458 | 481 | ||
459 | #define OMAP3_HAS_FEATURE(feat,flag) \ | 482 | #define OMAP3_HAS_FEATURE(feat,flag) \ |
460 | static inline unsigned int omap3_has_ ##feat(void) \ | 483 | static inline unsigned int omap3_has_ ##feat(void) \ |
@@ -469,5 +492,6 @@ OMAP3_HAS_FEATURE(neon, NEON) | |||
469 | OMAP3_HAS_FEATURE(isp, ISP) | 492 | OMAP3_HAS_FEATURE(isp, ISP) |
470 | OMAP3_HAS_FEATURE(192mhz_clk, 192MHZ_CLK) | 493 | OMAP3_HAS_FEATURE(192mhz_clk, 192MHZ_CLK) |
471 | OMAP3_HAS_FEATURE(io_wakeup, IO_WAKEUP) | 494 | OMAP3_HAS_FEATURE(io_wakeup, IO_WAKEUP) |
495 | OMAP3_HAS_FEATURE(sdrc, SDRC) | ||
472 | 496 | ||
473 | #endif | 497 | #endif |
diff --git a/arch/arm/plat-omap/include/plat/display.h b/arch/arm/plat-omap/include/plat/display.h index 537f4e449f50..0f140ecedb01 100644 --- a/arch/arm/plat-omap/include/plat/display.h +++ b/arch/arm/plat-omap/include/plat/display.h | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/list.h> | 23 | #include <linux/list.h> |
24 | #include <linux/kobject.h> | 24 | #include <linux/kobject.h> |
25 | #include <linux/device.h> | 25 | #include <linux/device.h> |
26 | #include <linux/platform_device.h> | ||
26 | #include <asm/atomic.h> | 27 | #include <asm/atomic.h> |
27 | 28 | ||
28 | #define DISPC_IRQ_FRAMEDONE (1 << 0) | 29 | #define DISPC_IRQ_FRAMEDONE (1 << 0) |
@@ -226,6 +227,16 @@ struct omap_dss_board_info { | |||
226 | struct omap_dss_device *default_device; | 227 | struct omap_dss_device *default_device; |
227 | }; | 228 | }; |
228 | 229 | ||
230 | #if defined(CONFIG_OMAP2_DSS_MODULE) || defined(CONFIG_OMAP2_DSS) | ||
231 | /* Init with the board info */ | ||
232 | extern int omap_display_init(struct omap_dss_board_info *board_data); | ||
233 | #else | ||
234 | static inline int omap_display_init(struct omap_dss_board_info *board_data) | ||
235 | { | ||
236 | return 0; | ||
237 | } | ||
238 | #endif | ||
239 | |||
229 | struct omap_video_timings { | 240 | struct omap_video_timings { |
230 | /* Unit: pixels */ | 241 | /* Unit: pixels */ |
231 | u16 x_res; | 242 | u16 x_res; |
diff --git a/arch/arm/plat-omap/include/plat/dmtimer.h b/arch/arm/plat-omap/include/plat/dmtimer.h index dfa3aff9761b..d6c70d2f4030 100644 --- a/arch/arm/plat-omap/include/plat/dmtimer.h +++ b/arch/arm/plat-omap/include/plat/dmtimer.h | |||
@@ -3,6 +3,12 @@ | |||
3 | * | 3 | * |
4 | * OMAP Dual-Mode Timers | 4 | * OMAP Dual-Mode Timers |
5 | * | 5 | * |
6 | * Copyright (C) 2010 Texas Instruments Incorporated - http://www.ti.com/ | ||
7 | * Tarun Kanti DebBarma <tarun.kanti@ti.com> | ||
8 | * Thara Gopinath <thara@ti.com> | ||
9 | * | ||
10 | * Platform device conversion and hwmod support. | ||
11 | * | ||
6 | * Copyright (C) 2005 Nokia Corporation | 12 | * Copyright (C) 2005 Nokia Corporation |
7 | * Author: Lauri Leukkunen <lauri.leukkunen@nokia.com> | 13 | * Author: Lauri Leukkunen <lauri.leukkunen@nokia.com> |
8 | * PWM and clock framwork support by Timo Teras. | 14 | * PWM and clock framwork support by Timo Teras. |
@@ -44,6 +50,11 @@ | |||
44 | #define OMAP_TIMER_TRIGGER_OVERFLOW 0x01 | 50 | #define OMAP_TIMER_TRIGGER_OVERFLOW 0x01 |
45 | #define OMAP_TIMER_TRIGGER_OVERFLOW_AND_COMPARE 0x02 | 51 | #define OMAP_TIMER_TRIGGER_OVERFLOW_AND_COMPARE 0x02 |
46 | 52 | ||
53 | /* | ||
54 | * IP revision identifier so that Highlander IP | ||
55 | * in OMAP4 can be distinguished. | ||
56 | */ | ||
57 | #define OMAP_TIMER_IP_VERSION_1 0x1 | ||
47 | struct omap_dm_timer; | 58 | struct omap_dm_timer; |
48 | extern struct omap_dm_timer *gptimer_wakeup; | 59 | extern struct omap_dm_timer *gptimer_wakeup; |
49 | extern struct sys_timer omap_timer; | 60 | extern struct sys_timer omap_timer; |
diff --git a/arch/arm/plat-omap/include/plat/fpga.h b/arch/arm/plat-omap/include/plat/fpga.h index ae39bcb3f5ba..bd3c6324ae1f 100644 --- a/arch/arm/plat-omap/include/plat/fpga.h +++ b/arch/arm/plat-omap/include/plat/fpga.h | |||
@@ -30,18 +30,18 @@ extern void omap1510_fpga_init_irq(void); | |||
30 | * --------------------------------------------------------------------------- | 30 | * --------------------------------------------------------------------------- |
31 | */ | 31 | */ |
32 | /* maps in the FPGA registers and the ETHR registers */ | 32 | /* maps in the FPGA registers and the ETHR registers */ |
33 | #define H2P2_DBG_FPGA_BASE IOMEM(0xE8000000) /* VA */ | 33 | #define H2P2_DBG_FPGA_BASE 0xE8000000 /* VA */ |
34 | #define H2P2_DBG_FPGA_SIZE SZ_4K /* SIZE */ | 34 | #define H2P2_DBG_FPGA_SIZE SZ_4K /* SIZE */ |
35 | #define H2P2_DBG_FPGA_START 0x04000000 /* PA */ | 35 | #define H2P2_DBG_FPGA_START 0x04000000 /* PA */ |
36 | 36 | ||
37 | #define H2P2_DBG_FPGA_ETHR_START (H2P2_DBG_FPGA_START + 0x300) | 37 | #define H2P2_DBG_FPGA_ETHR_START (H2P2_DBG_FPGA_START + 0x300) |
38 | #define H2P2_DBG_FPGA_FPGA_REV (H2P2_DBG_FPGA_BASE + 0x10) /* FPGA Revision */ | 38 | #define H2P2_DBG_FPGA_FPGA_REV IOMEM(H2P2_DBG_FPGA_BASE + 0x10) /* FPGA Revision */ |
39 | #define H2P2_DBG_FPGA_BOARD_REV (H2P2_DBG_FPGA_BASE + 0x12) /* Board Revision */ | 39 | #define H2P2_DBG_FPGA_BOARD_REV IOMEM(H2P2_DBG_FPGA_BASE + 0x12) /* Board Revision */ |
40 | #define H2P2_DBG_FPGA_GPIO (H2P2_DBG_FPGA_BASE + 0x14) /* GPIO outputs */ | 40 | #define H2P2_DBG_FPGA_GPIO IOMEM(H2P2_DBG_FPGA_BASE + 0x14) /* GPIO outputs */ |
41 | #define H2P2_DBG_FPGA_LEDS (H2P2_DBG_FPGA_BASE + 0x16) /* LEDs outputs */ | 41 | #define H2P2_DBG_FPGA_LEDS IOMEM(H2P2_DBG_FPGA_BASE + 0x16) /* LEDs outputs */ |
42 | #define H2P2_DBG_FPGA_MISC_INPUTS (H2P2_DBG_FPGA_BASE + 0x18) /* Misc inputs */ | 42 | #define H2P2_DBG_FPGA_MISC_INPUTS IOMEM(H2P2_DBG_FPGA_BASE + 0x18) /* Misc inputs */ |
43 | #define H2P2_DBG_FPGA_LAN_STATUS (H2P2_DBG_FPGA_BASE + 0x1A) /* LAN Status line */ | 43 | #define H2P2_DBG_FPGA_LAN_STATUS IOMEM(H2P2_DBG_FPGA_BASE + 0x1A) /* LAN Status line */ |
44 | #define H2P2_DBG_FPGA_LAN_RESET (H2P2_DBG_FPGA_BASE + 0x1C) /* LAN Reset line */ | 44 | #define H2P2_DBG_FPGA_LAN_RESET IOMEM(H2P2_DBG_FPGA_BASE + 0x1C) /* LAN Reset line */ |
45 | 45 | ||
46 | /* NOTE: most boards don't have a static mapping for the FPGA ... */ | 46 | /* NOTE: most boards don't have a static mapping for the FPGA ... */ |
47 | struct h2p2_dbg_fpga { | 47 | struct h2p2_dbg_fpga { |
@@ -81,55 +81,55 @@ struct h2p2_dbg_fpga { | |||
81 | * OMAP-1510 FPGA | 81 | * OMAP-1510 FPGA |
82 | * --------------------------------------------------------------------------- | 82 | * --------------------------------------------------------------------------- |
83 | */ | 83 | */ |
84 | #define OMAP1510_FPGA_BASE IOMEM(0xE8000000) /* VA */ | 84 | #define OMAP1510_FPGA_BASE 0xE8000000 /* VA */ |
85 | #define OMAP1510_FPGA_SIZE SZ_4K | 85 | #define OMAP1510_FPGA_SIZE SZ_4K |
86 | #define OMAP1510_FPGA_START 0x08000000 /* PA */ | 86 | #define OMAP1510_FPGA_START 0x08000000 /* PA */ |
87 | 87 | ||
88 | /* Revision */ | 88 | /* Revision */ |
89 | #define OMAP1510_FPGA_REV_LOW (OMAP1510_FPGA_BASE + 0x0) | 89 | #define OMAP1510_FPGA_REV_LOW IOMEM(OMAP1510_FPGA_BASE + 0x0) |
90 | #define OMAP1510_FPGA_REV_HIGH (OMAP1510_FPGA_BASE + 0x1) | 90 | #define OMAP1510_FPGA_REV_HIGH IOMEM(OMAP1510_FPGA_BASE + 0x1) |
91 | 91 | ||
92 | #define OMAP1510_FPGA_LCD_PANEL_CONTROL (OMAP1510_FPGA_BASE + 0x2) | 92 | #define OMAP1510_FPGA_LCD_PANEL_CONTROL IOMEM(OMAP1510_FPGA_BASE + 0x2) |
93 | #define OMAP1510_FPGA_LED_DIGIT (OMAP1510_FPGA_BASE + 0x3) | 93 | #define OMAP1510_FPGA_LED_DIGIT IOMEM(OMAP1510_FPGA_BASE + 0x3) |
94 | #define INNOVATOR_FPGA_HID_SPI (OMAP1510_FPGA_BASE + 0x4) | 94 | #define INNOVATOR_FPGA_HID_SPI IOMEM(OMAP1510_FPGA_BASE + 0x4) |
95 | #define OMAP1510_FPGA_POWER (OMAP1510_FPGA_BASE + 0x5) | 95 | #define OMAP1510_FPGA_POWER IOMEM(OMAP1510_FPGA_BASE + 0x5) |
96 | 96 | ||
97 | /* Interrupt status */ | 97 | /* Interrupt status */ |
98 | #define OMAP1510_FPGA_ISR_LO (OMAP1510_FPGA_BASE + 0x6) | 98 | #define OMAP1510_FPGA_ISR_LO IOMEM(OMAP1510_FPGA_BASE + 0x6) |
99 | #define OMAP1510_FPGA_ISR_HI (OMAP1510_FPGA_BASE + 0x7) | 99 | #define OMAP1510_FPGA_ISR_HI IOMEM(OMAP1510_FPGA_BASE + 0x7) |
100 | 100 | ||
101 | /* Interrupt mask */ | 101 | /* Interrupt mask */ |
102 | #define OMAP1510_FPGA_IMR_LO (OMAP1510_FPGA_BASE + 0x8) | 102 | #define OMAP1510_FPGA_IMR_LO IOMEM(OMAP1510_FPGA_BASE + 0x8) |
103 | #define OMAP1510_FPGA_IMR_HI (OMAP1510_FPGA_BASE + 0x9) | 103 | #define OMAP1510_FPGA_IMR_HI IOMEM(OMAP1510_FPGA_BASE + 0x9) |
104 | 104 | ||
105 | /* Reset registers */ | 105 | /* Reset registers */ |
106 | #define OMAP1510_FPGA_HOST_RESET (OMAP1510_FPGA_BASE + 0xa) | 106 | #define OMAP1510_FPGA_HOST_RESET IOMEM(OMAP1510_FPGA_BASE + 0xa) |
107 | #define OMAP1510_FPGA_RST (OMAP1510_FPGA_BASE + 0xb) | 107 | #define OMAP1510_FPGA_RST IOMEM(OMAP1510_FPGA_BASE + 0xb) |
108 | 108 | ||
109 | #define OMAP1510_FPGA_AUDIO (OMAP1510_FPGA_BASE + 0xc) | 109 | #define OMAP1510_FPGA_AUDIO IOMEM(OMAP1510_FPGA_BASE + 0xc) |
110 | #define OMAP1510_FPGA_DIP (OMAP1510_FPGA_BASE + 0xe) | 110 | #define OMAP1510_FPGA_DIP IOMEM(OMAP1510_FPGA_BASE + 0xe) |
111 | #define OMAP1510_FPGA_FPGA_IO (OMAP1510_FPGA_BASE + 0xf) | 111 | #define OMAP1510_FPGA_FPGA_IO IOMEM(OMAP1510_FPGA_BASE + 0xf) |
112 | #define OMAP1510_FPGA_UART1 (OMAP1510_FPGA_BASE + 0x14) | 112 | #define OMAP1510_FPGA_UART1 IOMEM(OMAP1510_FPGA_BASE + 0x14) |
113 | #define OMAP1510_FPGA_UART2 (OMAP1510_FPGA_BASE + 0x15) | 113 | #define OMAP1510_FPGA_UART2 IOMEM(OMAP1510_FPGA_BASE + 0x15) |
114 | #define OMAP1510_FPGA_OMAP1510_STATUS (OMAP1510_FPGA_BASE + 0x16) | 114 | #define OMAP1510_FPGA_OMAP1510_STATUS IOMEM(OMAP1510_FPGA_BASE + 0x16) |
115 | #define OMAP1510_FPGA_BOARD_REV (OMAP1510_FPGA_BASE + 0x18) | 115 | #define OMAP1510_FPGA_BOARD_REV IOMEM(OMAP1510_FPGA_BASE + 0x18) |
116 | #define OMAP1510P1_PPT_DATA (OMAP1510_FPGA_BASE + 0x100) | 116 | #define OMAP1510P1_PPT_DATA IOMEM(OMAP1510_FPGA_BASE + 0x100) |
117 | #define OMAP1510P1_PPT_STATUS (OMAP1510_FPGA_BASE + 0x101) | 117 | #define OMAP1510P1_PPT_STATUS IOMEM(OMAP1510_FPGA_BASE + 0x101) |
118 | #define OMAP1510P1_PPT_CONTROL (OMAP1510_FPGA_BASE + 0x102) | 118 | #define OMAP1510P1_PPT_CONTROL IOMEM(OMAP1510_FPGA_BASE + 0x102) |
119 | 119 | ||
120 | #define OMAP1510_FPGA_TOUCHSCREEN (OMAP1510_FPGA_BASE + 0x204) | 120 | #define OMAP1510_FPGA_TOUCHSCREEN IOMEM(OMAP1510_FPGA_BASE + 0x204) |
121 | 121 | ||
122 | #define INNOVATOR_FPGA_INFO (OMAP1510_FPGA_BASE + 0x205) | 122 | #define INNOVATOR_FPGA_INFO IOMEM(OMAP1510_FPGA_BASE + 0x205) |
123 | #define INNOVATOR_FPGA_LCD_BRIGHT_LO (OMAP1510_FPGA_BASE + 0x206) | 123 | #define INNOVATOR_FPGA_LCD_BRIGHT_LO IOMEM(OMAP1510_FPGA_BASE + 0x206) |
124 | #define INNOVATOR_FPGA_LCD_BRIGHT_HI (OMAP1510_FPGA_BASE + 0x207) | 124 | #define INNOVATOR_FPGA_LCD_BRIGHT_HI IOMEM(OMAP1510_FPGA_BASE + 0x207) |
125 | #define INNOVATOR_FPGA_LED_GRN_LO (OMAP1510_FPGA_BASE + 0x208) | 125 | #define INNOVATOR_FPGA_LED_GRN_LO IOMEM(OMAP1510_FPGA_BASE + 0x208) |
126 | #define INNOVATOR_FPGA_LED_GRN_HI (OMAP1510_FPGA_BASE + 0x209) | 126 | #define INNOVATOR_FPGA_LED_GRN_HI IOMEM(OMAP1510_FPGA_BASE + 0x209) |
127 | #define INNOVATOR_FPGA_LED_RED_LO (OMAP1510_FPGA_BASE + 0x20a) | 127 | #define INNOVATOR_FPGA_LED_RED_LO IOMEM(OMAP1510_FPGA_BASE + 0x20a) |
128 | #define INNOVATOR_FPGA_LED_RED_HI (OMAP1510_FPGA_BASE + 0x20b) | 128 | #define INNOVATOR_FPGA_LED_RED_HI IOMEM(OMAP1510_FPGA_BASE + 0x20b) |
129 | #define INNOVATOR_FPGA_CAM_USB_CONTROL (OMAP1510_FPGA_BASE + 0x20c) | 129 | #define INNOVATOR_FPGA_CAM_USB_CONTROL IOMEM(OMAP1510_FPGA_BASE + 0x20c) |
130 | #define INNOVATOR_FPGA_EXP_CONTROL (OMAP1510_FPGA_BASE + 0x20d) | 130 | #define INNOVATOR_FPGA_EXP_CONTROL IOMEM(OMAP1510_FPGA_BASE + 0x20d) |
131 | #define INNOVATOR_FPGA_ISR2 (OMAP1510_FPGA_BASE + 0x20e) | 131 | #define INNOVATOR_FPGA_ISR2 IOMEM(OMAP1510_FPGA_BASE + 0x20e) |
132 | #define INNOVATOR_FPGA_IMR2 (OMAP1510_FPGA_BASE + 0x210) | 132 | #define INNOVATOR_FPGA_IMR2 IOMEM(OMAP1510_FPGA_BASE + 0x210) |
133 | 133 | ||
134 | #define OMAP1510_FPGA_ETHR_START (OMAP1510_FPGA_START + 0x300) | 134 | #define OMAP1510_FPGA_ETHR_START (OMAP1510_FPGA_START + 0x300) |
135 | 135 | ||
diff --git a/arch/arm/plat-omap/include/plat/gpmc.h b/arch/arm/plat-omap/include/plat/gpmc.h index 85ded598853e..12b316165037 100644 --- a/arch/arm/plat-omap/include/plat/gpmc.h +++ b/arch/arm/plat-omap/include/plat/gpmc.h | |||
@@ -41,6 +41,8 @@ | |||
41 | #define GPMC_NAND_ADDRESS 0x0000000b | 41 | #define GPMC_NAND_ADDRESS 0x0000000b |
42 | #define GPMC_NAND_DATA 0x0000000c | 42 | #define GPMC_NAND_DATA 0x0000000c |
43 | 43 | ||
44 | #define GPMC_ENABLE_IRQ 0x0000000d | ||
45 | |||
44 | /* ECC commands */ | 46 | /* ECC commands */ |
45 | #define GPMC_ECC_READ 0 /* Reset Hardware ECC for read */ | 47 | #define GPMC_ECC_READ 0 /* Reset Hardware ECC for read */ |
46 | #define GPMC_ECC_WRITE 1 /* Reset Hardware ECC for write */ | 48 | #define GPMC_ECC_WRITE 1 /* Reset Hardware ECC for write */ |
@@ -78,6 +80,19 @@ | |||
78 | #define WR_RD_PIN_MONITORING 0x00600000 | 80 | #define WR_RD_PIN_MONITORING 0x00600000 |
79 | #define GPMC_PREFETCH_STATUS_FIFO_CNT(val) ((val >> 24) & 0x7F) | 81 | #define GPMC_PREFETCH_STATUS_FIFO_CNT(val) ((val >> 24) & 0x7F) |
80 | #define GPMC_PREFETCH_STATUS_COUNT(val) (val & 0x00003fff) | 82 | #define GPMC_PREFETCH_STATUS_COUNT(val) (val & 0x00003fff) |
83 | #define GPMC_IRQ_FIFOEVENTENABLE 0x01 | ||
84 | #define GPMC_IRQ_COUNT_EVENT 0x02 | ||
85 | |||
86 | #define PREFETCH_FIFOTHRESHOLD_MAX 0x40 | ||
87 | #define PREFETCH_FIFOTHRESHOLD(val) ((val) << 8) | ||
88 | |||
89 | enum omap_ecc { | ||
90 | /* 1-bit ecc: stored at end of spare area */ | ||
91 | OMAP_ECC_HAMMING_CODE_DEFAULT = 0, /* Default, s/w method */ | ||
92 | OMAP_ECC_HAMMING_CODE_HW, /* gpmc to detect the error */ | ||
93 | /* 1-bit ecc: stored at begining of spare area as romcode */ | ||
94 | OMAP_ECC_HAMMING_CODE_HW_ROMCODE, /* gpmc method & romcode layout */ | ||
95 | }; | ||
81 | 96 | ||
82 | /* | 97 | /* |
83 | * Note that all values in this struct are in nanoseconds except sync_clk | 98 | * Note that all values in this struct are in nanoseconds except sync_clk |
@@ -130,12 +145,11 @@ extern int gpmc_cs_request(int cs, unsigned long size, unsigned long *base); | |||
130 | extern void gpmc_cs_free(int cs); | 145 | extern void gpmc_cs_free(int cs); |
131 | extern int gpmc_cs_set_reserved(int cs, int reserved); | 146 | extern int gpmc_cs_set_reserved(int cs, int reserved); |
132 | extern int gpmc_cs_reserved(int cs); | 147 | extern int gpmc_cs_reserved(int cs); |
133 | extern int gpmc_prefetch_enable(int cs, int dma_mode, | 148 | extern int gpmc_prefetch_enable(int cs, int fifo_th, int dma_mode, |
134 | unsigned int u32_count, int is_write); | 149 | unsigned int u32_count, int is_write); |
135 | extern int gpmc_prefetch_reset(int cs); | 150 | extern int gpmc_prefetch_reset(int cs); |
136 | extern void omap3_gpmc_save_context(void); | 151 | extern void omap3_gpmc_save_context(void); |
137 | extern void omap3_gpmc_restore_context(void); | 152 | extern void omap3_gpmc_restore_context(void); |
138 | extern void gpmc_init(void); | ||
139 | extern int gpmc_read_status(int cmd); | 153 | extern int gpmc_read_status(int cmd); |
140 | extern int gpmc_cs_configure(int cs, int cmd, int wval); | 154 | extern int gpmc_cs_configure(int cs, int cmd, int wval); |
141 | extern int gpmc_nand_read(int cs, int cmd); | 155 | extern int gpmc_nand_read(int cs, int cmd); |
diff --git a/arch/arm/plat-omap/include/plat/hardware.h b/arch/arm/plat-omap/include/plat/hardware.h index d5b26adfb890..e87efe1499b8 100644 --- a/arch/arm/plat-omap/include/plat/hardware.h +++ b/arch/arm/plat-omap/include/plat/hardware.h | |||
@@ -286,5 +286,6 @@ | |||
286 | #include <plat/omap24xx.h> | 286 | #include <plat/omap24xx.h> |
287 | #include <plat/omap34xx.h> | 287 | #include <plat/omap34xx.h> |
288 | #include <plat/omap44xx.h> | 288 | #include <plat/omap44xx.h> |
289 | #include <plat/ti816x.h> | ||
289 | 290 | ||
290 | #endif /* __ASM_ARCH_OMAP_HARDWARE_H */ | 291 | #endif /* __ASM_ARCH_OMAP_HARDWARE_H */ |
diff --git a/arch/arm/plat-omap/include/plat/io.h b/arch/arm/plat-omap/include/plat/io.h index ef4106c13183..d72ec85c97e6 100644 --- a/arch/arm/plat-omap/include/plat/io.h +++ b/arch/arm/plat-omap/include/plat/io.h | |||
@@ -259,7 +259,7 @@ struct omap_sdrc_params; | |||
259 | extern void omap1_map_common_io(void); | 259 | extern void omap1_map_common_io(void); |
260 | extern void omap1_init_common_hw(void); | 260 | extern void omap1_init_common_hw(void); |
261 | 261 | ||
262 | #ifdef CONFIG_ARCH_OMAP2420 | 262 | #ifdef CONFIG_SOC_OMAP2420 |
263 | extern void omap242x_map_common_io(void); | 263 | extern void omap242x_map_common_io(void); |
264 | #else | 264 | #else |
265 | static inline void omap242x_map_common_io(void) | 265 | static inline void omap242x_map_common_io(void) |
@@ -267,7 +267,7 @@ static inline void omap242x_map_common_io(void) | |||
267 | } | 267 | } |
268 | #endif | 268 | #endif |
269 | 269 | ||
270 | #ifdef CONFIG_ARCH_OMAP2430 | 270 | #ifdef CONFIG_SOC_OMAP2430 |
271 | extern void omap243x_map_common_io(void); | 271 | extern void omap243x_map_common_io(void); |
272 | #else | 272 | #else |
273 | static inline void omap243x_map_common_io(void) | 273 | static inline void omap243x_map_common_io(void) |
@@ -283,6 +283,14 @@ static inline void omap34xx_map_common_io(void) | |||
283 | } | 283 | } |
284 | #endif | 284 | #endif |
285 | 285 | ||
286 | #ifdef CONFIG_SOC_OMAPTI816X | ||
287 | extern void omapti816x_map_common_io(void); | ||
288 | #else | ||
289 | static inline void omapti816x_map_common_io(void) | ||
290 | { | ||
291 | } | ||
292 | #endif | ||
293 | |||
286 | #ifdef CONFIG_ARCH_OMAP4 | 294 | #ifdef CONFIG_ARCH_OMAP4 |
287 | extern void omap44xx_map_common_io(void); | 295 | extern void omap44xx_map_common_io(void); |
288 | #else | 296 | #else |
diff --git a/arch/arm/plat-omap/include/plat/iommu.h b/arch/arm/plat-omap/include/plat/iommu.h index 69230d685538..19cbb5e9ece2 100644 --- a/arch/arm/plat-omap/include/plat/iommu.h +++ b/arch/arm/plat-omap/include/plat/iommu.h | |||
@@ -154,6 +154,8 @@ extern void flush_iotlb_range(struct iommu *obj, u32 start, u32 end); | |||
154 | extern void flush_iotlb_all(struct iommu *obj); | 154 | extern void flush_iotlb_all(struct iommu *obj); |
155 | 155 | ||
156 | extern int iopgtable_store_entry(struct iommu *obj, struct iotlb_entry *e); | 156 | extern int iopgtable_store_entry(struct iommu *obj, struct iotlb_entry *e); |
157 | extern void iopgtable_lookup_entry(struct iommu *obj, u32 da, u32 **ppgd, | ||
158 | u32 **ppte); | ||
157 | extern size_t iopgtable_clear_entry(struct iommu *obj, u32 iova); | 159 | extern size_t iopgtable_clear_entry(struct iommu *obj, u32 iova); |
158 | 160 | ||
159 | extern int iommu_set_da_range(struct iommu *obj, u32 start, u32 end); | 161 | extern int iommu_set_da_range(struct iommu *obj, u32 start, u32 end); |
diff --git a/arch/arm/plat-omap/include/plat/irqs.h b/arch/arm/plat-omap/include/plat/irqs.h index 2910de921c52..1b911681e911 100644 --- a/arch/arm/plat-omap/include/plat/irqs.h +++ b/arch/arm/plat-omap/include/plat/irqs.h | |||
@@ -318,6 +318,7 @@ | |||
318 | #define INT_34XX_PRCM_MPU_IRQ 11 | 318 | #define INT_34XX_PRCM_MPU_IRQ 11 |
319 | #define INT_34XX_MCBSP1_IRQ 16 | 319 | #define INT_34XX_MCBSP1_IRQ 16 |
320 | #define INT_34XX_MCBSP2_IRQ 17 | 320 | #define INT_34XX_MCBSP2_IRQ 17 |
321 | #define INT_34XX_GPMC_IRQ 20 | ||
321 | #define INT_34XX_MCBSP3_IRQ 22 | 322 | #define INT_34XX_MCBSP3_IRQ 22 |
322 | #define INT_34XX_MCBSP4_IRQ 23 | 323 | #define INT_34XX_MCBSP4_IRQ 23 |
323 | #define INT_34XX_CAM_IRQ 24 | 324 | #define INT_34XX_CAM_IRQ 24 |
@@ -411,7 +412,13 @@ | |||
411 | #define TWL_IRQ_END TWL6030_IRQ_END | 412 | #define TWL_IRQ_END TWL6030_IRQ_END |
412 | #endif | 413 | #endif |
413 | 414 | ||
414 | #define NR_IRQS TWL_IRQ_END | 415 | /* GPMC related */ |
416 | #define OMAP_GPMC_IRQ_BASE (TWL_IRQ_END) | ||
417 | #define OMAP_GPMC_NR_IRQS 7 | ||
418 | #define OMAP_GPMC_IRQ_END (OMAP_GPMC_IRQ_BASE + OMAP_GPMC_NR_IRQS) | ||
419 | |||
420 | |||
421 | #define NR_IRQS OMAP_GPMC_IRQ_END | ||
415 | 422 | ||
416 | #define OMAP_IRQ_BIT(irq) (1 << ((irq) % 32)) | 423 | #define OMAP_IRQ_BIT(irq) (1 << ((irq) % 32)) |
417 | 424 | ||
diff --git a/arch/arm/plat-omap/include/plat/l3_2xxx.h b/arch/arm/plat-omap/include/plat/l3_2xxx.h new file mode 100644 index 000000000000..b8b5641379b0 --- /dev/null +++ b/arch/arm/plat-omap/include/plat/l3_2xxx.h | |||
@@ -0,0 +1,20 @@ | |||
1 | /* | ||
2 | * arch/arm/plat-omap/include/plat/l3_2xxx.h - L3 firewall definitions | ||
3 | * | ||
4 | * Copyright (C) 2010 Texas Instruments Incorporated - http://www.ti.com/ | ||
5 | * Sumit Semwal | ||
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 as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | * | ||
12 | */ | ||
13 | #ifndef __ARCH_ARM_PLAT_OMAP_INCLUDE_PLAT_L3_2XXX_H | ||
14 | #define __ARCH_ARM_PLAT_OMAP_INCLUDE_PLAT_L3_2XXX_H | ||
15 | |||
16 | /* L3 CONNIDs */ | ||
17 | /* Display Sub system (DSS) */ | ||
18 | #define OMAP2_L3_CORE_FW_CONNID_DSS 8 | ||
19 | |||
20 | #endif | ||
diff --git a/arch/arm/plat-omap/include/plat/l3_3xxx.h b/arch/arm/plat-omap/include/plat/l3_3xxx.h new file mode 100644 index 000000000000..cde1938c5f82 --- /dev/null +++ b/arch/arm/plat-omap/include/plat/l3_3xxx.h | |||
@@ -0,0 +1,20 @@ | |||
1 | /* | ||
2 | * arch/arm/plat-omap/include/plat/l3_3xxx.h - L3 firewall definitions | ||
3 | * | ||
4 | * Copyright (C) 2010 Texas Instruments Incorporated - http://www.ti.com/ | ||
5 | * Sumit Semwal | ||
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 as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | * | ||
12 | */ | ||
13 | #ifndef __ARCH_ARM_PLAT_OMAP_INCLUDE_PLAT_L3_3XXX_H | ||
14 | #define __ARCH_ARM_PLAT_OMAP_INCLUDE_PLAT_L3_3XXX_H | ||
15 | |||
16 | /* L3 Initiator IDs */ | ||
17 | /* Display Sub system (DSS) */ | ||
18 | #define OMAP3_L3_CORE_FW_INIT_ID_DSS 29 | ||
19 | |||
20 | #endif | ||
diff --git a/arch/arm/plat-omap/include/plat/l4_2xxx.h b/arch/arm/plat-omap/include/plat/l4_2xxx.h new file mode 100644 index 000000000000..3f39cf8a35c6 --- /dev/null +++ b/arch/arm/plat-omap/include/plat/l4_2xxx.h | |||
@@ -0,0 +1,24 @@ | |||
1 | /* | ||
2 | * arch/arm/plat-omap/include/plat/l4_2xxx.h - L4 firewall definitions | ||
3 | * | ||
4 | * Copyright (C) 2010 Texas Instruments Incorporated - http://www.ti.com/ | ||
5 | * Sumit Semwal | ||
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 as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | * | ||
12 | */ | ||
13 | #ifndef __ARCH_ARM_PLAT_OMAP_INCLUDE_PLAT_L4_2XXX_H | ||
14 | #define __ARCH_ARM_PLAT_OMAP_INCLUDE_PLAT_L4_2XXX_H | ||
15 | |||
16 | /* L4 CORE */ | ||
17 | /* Display Sub system (DSS) */ | ||
18 | #define OMAP2420_L4_CORE_FW_DSS_CORE_REGION 28 | ||
19 | #define OMAP2420_L4_CORE_FW_DSS_DISPC_REGION 29 | ||
20 | #define OMAP2420_L4_CORE_FW_DSS_RFBI_REGION 30 | ||
21 | #define OMAP2420_L4_CORE_FW_DSS_VENC_REGION 31 | ||
22 | #define OMAP2420_L4_CORE_FW_DSS_TA_REGION 32 | ||
23 | |||
24 | #endif | ||
diff --git a/arch/arm/plat-omap/include/plat/l4_3xxx.h b/arch/arm/plat-omap/include/plat/l4_3xxx.h index 5e1949375422..881a858b1ffc 100644 --- a/arch/arm/plat-omap/include/plat/l4_3xxx.h +++ b/arch/arm/plat-omap/include/plat/l4_3xxx.h | |||
@@ -21,4 +21,14 @@ | |||
21 | #define OMAP3_L4_CORE_FW_I2C3_REGION 73 | 21 | #define OMAP3_L4_CORE_FW_I2C3_REGION 73 |
22 | #define OMAP3_L4_CORE_FW_I2C3_TA_REGION 74 | 22 | #define OMAP3_L4_CORE_FW_I2C3_TA_REGION 74 |
23 | 23 | ||
24 | /* Display Sub system (DSS) */ | ||
25 | #define OMAP3_L4_CORE_FW_DSS_PROT_GROUP 2 | ||
26 | |||
27 | #define OMAP3_L4_CORE_FW_DSS_DSI_REGION 104 | ||
28 | #define OMAP3ES1_L4_CORE_FW_DSS_CORE_REGION 3 | ||
29 | #define OMAP3_L4_CORE_FW_DSS_CORE_REGION 4 | ||
30 | #define OMAP3_L4_CORE_FW_DSS_DISPC_REGION 4 | ||
31 | #define OMAP3_L4_CORE_FW_DSS_RFBI_REGION 5 | ||
32 | #define OMAP3_L4_CORE_FW_DSS_VENC_REGION 6 | ||
33 | #define OMAP3_L4_CORE_FW_DSS_TA_REGION 7 | ||
24 | #endif | 34 | #endif |
diff --git a/arch/arm/plat-omap/include/plat/mcbsp.h b/arch/arm/plat-omap/include/plat/mcbsp.h index b87d83ccd545..6ecf1051e5f4 100644 --- a/arch/arm/plat-omap/include/plat/mcbsp.h +++ b/arch/arm/plat-omap/include/plat/mcbsp.h | |||
@@ -106,13 +106,6 @@ static struct platform_device omap_mcbsp##port_nr = { \ | |||
106 | #define OMAP_MCBSP_REG_XCCR 0x00 | 106 | #define OMAP_MCBSP_REG_XCCR 0x00 |
107 | #define OMAP_MCBSP_REG_RCCR 0x00 | 107 | #define OMAP_MCBSP_REG_RCCR 0x00 |
108 | 108 | ||
109 | #define AUDIO_MCBSP_DATAWRITE (OMAP1510_MCBSP1_BASE + OMAP_MCBSP_REG_DXR1) | ||
110 | #define AUDIO_MCBSP_DATAREAD (OMAP1510_MCBSP1_BASE + OMAP_MCBSP_REG_DRR1) | ||
111 | |||
112 | #define AUDIO_MCBSP OMAP_MCBSP1 | ||
113 | #define AUDIO_DMA_TX OMAP_DMA_MCBSP1_TX | ||
114 | #define AUDIO_DMA_RX OMAP_DMA_MCBSP1_RX | ||
115 | |||
116 | #else | 109 | #else |
117 | 110 | ||
118 | #define OMAP_MCBSP_REG_DRR2 0x00 | 111 | #define OMAP_MCBSP_REG_DRR2 0x00 |
@@ -168,13 +161,6 @@ static struct platform_device omap_mcbsp##port_nr = { \ | |||
168 | #define OMAP_ST_REG_SFIRCR 0x28 | 161 | #define OMAP_ST_REG_SFIRCR 0x28 |
169 | #define OMAP_ST_REG_SSELCR 0x2C | 162 | #define OMAP_ST_REG_SSELCR 0x2C |
170 | 163 | ||
171 | #define AUDIO_MCBSP_DATAWRITE (OMAP24XX_MCBSP2_BASE + OMAP_MCBSP_REG_DXR1) | ||
172 | #define AUDIO_MCBSP_DATAREAD (OMAP24XX_MCBSP2_BASE + OMAP_MCBSP_REG_DRR1) | ||
173 | |||
174 | #define AUDIO_MCBSP OMAP_MCBSP2 | ||
175 | #define AUDIO_DMA_TX OMAP24XX_DMA_MCBSP2_TX | ||
176 | #define AUDIO_DMA_RX OMAP24XX_DMA_MCBSP2_RX | ||
177 | |||
178 | #endif | 164 | #endif |
179 | 165 | ||
180 | /************************** McBSP SPCR1 bit definitions ***********************/ | 166 | /************************** McBSP SPCR1 bit definitions ***********************/ |
diff --git a/arch/arm/plat-omap/include/plat/mcspi.h b/arch/arm/plat-omap/include/plat/mcspi.h index 1254e4945b6f..3d51b18131cc 100644 --- a/arch/arm/plat-omap/include/plat/mcspi.h +++ b/arch/arm/plat-omap/include/plat/mcspi.h | |||
@@ -1,8 +1,19 @@ | |||
1 | #ifndef _OMAP2_MCSPI_H | 1 | #ifndef _OMAP2_MCSPI_H |
2 | #define _OMAP2_MCSPI_H | 2 | #define _OMAP2_MCSPI_H |
3 | 3 | ||
4 | #define OMAP2_MCSPI_REV 0 | ||
5 | #define OMAP3_MCSPI_REV 1 | ||
6 | #define OMAP4_MCSPI_REV 2 | ||
7 | |||
8 | #define OMAP4_MCSPI_REG_OFFSET 0x100 | ||
9 | |||
4 | struct omap2_mcspi_platform_config { | 10 | struct omap2_mcspi_platform_config { |
5 | unsigned short num_cs; | 11 | unsigned short num_cs; |
12 | unsigned int regs_offset; | ||
13 | }; | ||
14 | |||
15 | struct omap2_mcspi_dev_attr { | ||
16 | unsigned short num_chipselect; | ||
6 | }; | 17 | }; |
7 | 18 | ||
8 | struct omap2_mcspi_device_config { | 19 | struct omap2_mcspi_device_config { |
diff --git a/arch/arm/plat-omap/include/plat/multi.h b/arch/arm/plat-omap/include/plat/multi.h index ffd909fa5287..999ffba2690c 100644 --- a/arch/arm/plat-omap/include/plat/multi.h +++ b/arch/arm/plat-omap/include/plat/multi.h | |||
@@ -66,7 +66,7 @@ | |||
66 | # error "OMAP1 and OMAP2PLUS can't be selected at the same time" | 66 | # error "OMAP1 and OMAP2PLUS can't be selected at the same time" |
67 | # endif | 67 | # endif |
68 | #endif | 68 | #endif |
69 | #ifdef CONFIG_ARCH_OMAP2420 | 69 | #ifdef CONFIG_SOC_OMAP2420 |
70 | # ifdef OMAP_NAME | 70 | # ifdef OMAP_NAME |
71 | # undef MULTI_OMAP2 | 71 | # undef MULTI_OMAP2 |
72 | # define MULTI_OMAP2 | 72 | # define MULTI_OMAP2 |
@@ -74,7 +74,7 @@ | |||
74 | # define OMAP_NAME omap2420 | 74 | # define OMAP_NAME omap2420 |
75 | # endif | 75 | # endif |
76 | #endif | 76 | #endif |
77 | #ifdef CONFIG_ARCH_OMAP2430 | 77 | #ifdef CONFIG_SOC_OMAP2430 |
78 | # ifdef OMAP_NAME | 78 | # ifdef OMAP_NAME |
79 | # undef MULTI_OMAP2 | 79 | # undef MULTI_OMAP2 |
80 | # define MULTI_OMAP2 | 80 | # define MULTI_OMAP2 |
diff --git a/arch/arm/plat-omap/include/plat/nand.h b/arch/arm/plat-omap/include/plat/nand.h index 6562cd082bb1..d86d1ecf0068 100644 --- a/arch/arm/plat-omap/include/plat/nand.h +++ b/arch/arm/plat-omap/include/plat/nand.h | |||
@@ -8,8 +8,16 @@ | |||
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <plat/gpmc.h> | ||
11 | #include <linux/mtd/partitions.h> | 12 | #include <linux/mtd/partitions.h> |
12 | 13 | ||
14 | enum nand_io { | ||
15 | NAND_OMAP_PREFETCH_POLLED = 0, /* prefetch polled mode, default */ | ||
16 | NAND_OMAP_POLLED, /* polled mode, without prefetch */ | ||
17 | NAND_OMAP_PREFETCH_DMA, /* prefetch enabled sDMA mode */ | ||
18 | NAND_OMAP_PREFETCH_IRQ /* prefetch enabled irq mode */ | ||
19 | }; | ||
20 | |||
13 | struct omap_nand_platform_data { | 21 | struct omap_nand_platform_data { |
14 | unsigned int options; | 22 | unsigned int options; |
15 | int cs; | 23 | int cs; |
@@ -20,8 +28,11 @@ struct omap_nand_platform_data { | |||
20 | int (*nand_setup)(void); | 28 | int (*nand_setup)(void); |
21 | int (*dev_ready)(struct omap_nand_platform_data *); | 29 | int (*dev_ready)(struct omap_nand_platform_data *); |
22 | int dma_channel; | 30 | int dma_channel; |
31 | int gpmc_irq; | ||
32 | enum nand_io xfer_type; | ||
23 | unsigned long phys_base; | 33 | unsigned long phys_base; |
24 | int devsize; | 34 | int devsize; |
35 | enum omap_ecc ecc_opt; | ||
25 | }; | 36 | }; |
26 | 37 | ||
27 | /* minimum size for IO mapping */ | 38 | /* minimum size for IO mapping */ |
diff --git a/arch/arm/plat-omap/include/plat/omap_hwmod.h b/arch/arm/plat-omap/include/plat/omap_hwmod.h index 1eee85a8abb3..f96e72ed4db1 100644 --- a/arch/arm/plat-omap/include/plat/omap_hwmod.h +++ b/arch/arm/plat-omap/include/plat/omap_hwmod.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * omap_hwmod macros, structures | 2 | * omap_hwmod macros, structures |
3 | * | 3 | * |
4 | * Copyright (C) 2009-2010 Nokia Corporation | 4 | * Copyright (C) 2009-2011 Nokia Corporation |
5 | * Paul Walmsley | 5 | * Paul Walmsley |
6 | * | 6 | * |
7 | * Created in collaboration with (alphabetical order): Benoît Cousson, | 7 | * Created in collaboration with (alphabetical order): Benoît Cousson, |
@@ -30,6 +30,7 @@ | |||
30 | #define __ARCH_ARM_PLAT_OMAP_INCLUDE_MACH_OMAP_HWMOD_H | 30 | #define __ARCH_ARM_PLAT_OMAP_INCLUDE_MACH_OMAP_HWMOD_H |
31 | 31 | ||
32 | #include <linux/kernel.h> | 32 | #include <linux/kernel.h> |
33 | #include <linux/init.h> | ||
33 | #include <linux/list.h> | 34 | #include <linux/list.h> |
34 | #include <linux/ioport.h> | 35 | #include <linux/ioport.h> |
35 | #include <linux/spinlock.h> | 36 | #include <linux/spinlock.h> |
@@ -370,8 +371,10 @@ struct omap_hwmod_omap4_prcm { | |||
370 | * of standby, rather than relying on module smart-standby | 371 | * of standby, rather than relying on module smart-standby |
371 | * HWMOD_INIT_NO_RESET: don't reset this module at boot - important for | 372 | * HWMOD_INIT_NO_RESET: don't reset this module at boot - important for |
372 | * SDRAM controller, etc. XXX probably belongs outside the main hwmod file | 373 | * SDRAM controller, etc. XXX probably belongs outside the main hwmod file |
374 | * XXX Should be HWMOD_SETUP_NO_RESET | ||
373 | * HWMOD_INIT_NO_IDLE: don't idle this module at boot - important for SDRAM | 375 | * HWMOD_INIT_NO_IDLE: don't idle this module at boot - important for SDRAM |
374 | * controller, etc. XXX probably belongs outside the main hwmod file | 376 | * controller, etc. XXX probably belongs outside the main hwmod file |
377 | * XXX Should be HWMOD_SETUP_NO_IDLE | ||
375 | * HWMOD_NO_AUTOIDLE: disable module autoidle (OCP_SYSCONFIG.AUTOIDLE) | 378 | * HWMOD_NO_AUTOIDLE: disable module autoidle (OCP_SYSCONFIG.AUTOIDLE) |
376 | * when module is enabled, rather than the default, which is to | 379 | * when module is enabled, rather than the default, which is to |
377 | * enable autoidle | 380 | * enable autoidle |
@@ -535,11 +538,12 @@ struct omap_hwmod { | |||
535 | const struct omap_chip_id omap_chip; | 538 | const struct omap_chip_id omap_chip; |
536 | }; | 539 | }; |
537 | 540 | ||
538 | int omap_hwmod_init(struct omap_hwmod **ohs); | 541 | int omap_hwmod_register(struct omap_hwmod **ohs); |
539 | struct omap_hwmod *omap_hwmod_lookup(const char *name); | 542 | struct omap_hwmod *omap_hwmod_lookup(const char *name); |
540 | int omap_hwmod_for_each(int (*fn)(struct omap_hwmod *oh, void *data), | 543 | int omap_hwmod_for_each(int (*fn)(struct omap_hwmod *oh, void *data), |
541 | void *data); | 544 | void *data); |
542 | int omap_hwmod_late_init(void); | 545 | |
546 | int __init omap_hwmod_setup_one(const char *name); | ||
543 | 547 | ||
544 | int omap_hwmod_enable(struct omap_hwmod *oh); | 548 | int omap_hwmod_enable(struct omap_hwmod *oh); |
545 | int _omap_hwmod_enable(struct omap_hwmod *oh); | 549 | int _omap_hwmod_enable(struct omap_hwmod *oh); |
diff --git a/arch/arm/plat-omap/include/plat/onenand.h b/arch/arm/plat-omap/include/plat/onenand.h index affe87e9ece7..cbe897ca7f9e 100644 --- a/arch/arm/plat-omap/include/plat/onenand.h +++ b/arch/arm/plat-omap/include/plat/onenand.h | |||
@@ -15,12 +15,20 @@ | |||
15 | #define ONENAND_SYNC_READ (1 << 0) | 15 | #define ONENAND_SYNC_READ (1 << 0) |
16 | #define ONENAND_SYNC_READWRITE (1 << 1) | 16 | #define ONENAND_SYNC_READWRITE (1 << 1) |
17 | 17 | ||
18 | struct onenand_freq_info { | ||
19 | u16 maf_id; | ||
20 | u16 dev_id; | ||
21 | u16 ver_id; | ||
22 | }; | ||
23 | |||
18 | struct omap_onenand_platform_data { | 24 | struct omap_onenand_platform_data { |
19 | int cs; | 25 | int cs; |
20 | int gpio_irq; | 26 | int gpio_irq; |
21 | struct mtd_partition *parts; | 27 | struct mtd_partition *parts; |
22 | int nr_parts; | 28 | int nr_parts; |
23 | int (*onenand_setup)(void __iomem *, int freq); | 29 | int (*onenand_setup)(void __iomem *, int *freq_ptr); |
30 | int (*get_freq)(const struct onenand_freq_info *freq_info, | ||
31 | bool *clk_dep); | ||
24 | int dma_channel; | 32 | int dma_channel; |
25 | u8 flags; | 33 | u8 flags; |
26 | u8 regulator_can_sleep; | 34 | u8 regulator_can_sleep; |
diff --git a/arch/arm/plat-omap/include/plat/prcm.h b/arch/arm/plat-omap/include/plat/prcm.h index 2fdf8c80d390..267f43bb2a4e 100644 --- a/arch/arm/plat-omap/include/plat/prcm.h +++ b/arch/arm/plat-omap/include/plat/prcm.h | |||
@@ -28,7 +28,6 @@ | |||
28 | #define __ASM_ARM_ARCH_OMAP_PRCM_H | 28 | #define __ASM_ARM_ARCH_OMAP_PRCM_H |
29 | 29 | ||
30 | u32 omap_prcm_get_reset_sources(void); | 30 | u32 omap_prcm_get_reset_sources(void); |
31 | void omap_prcm_arch_reset(char mode, const char *cmd); | ||
32 | int omap2_cm_wait_idlest(void __iomem *reg, u32 mask, u8 idlest, | 31 | int omap2_cm_wait_idlest(void __iomem *reg, u32 mask, u8 idlest, |
33 | const char *name); | 32 | const char *name); |
34 | 33 | ||
diff --git a/arch/arm/plat-omap/include/plat/sdrc.h b/arch/arm/plat-omap/include/plat/sdrc.h index efd87c8dda69..925b12b500dc 100644 --- a/arch/arm/plat-omap/include/plat/sdrc.h +++ b/arch/arm/plat-omap/include/plat/sdrc.h | |||
@@ -124,8 +124,14 @@ struct omap_sdrc_params { | |||
124 | u32 mr; | 124 | u32 mr; |
125 | }; | 125 | }; |
126 | 126 | ||
127 | void __init omap2_sdrc_init(struct omap_sdrc_params *sdrc_cs0, | 127 | #if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3) |
128 | void omap2_sdrc_init(struct omap_sdrc_params *sdrc_cs0, | ||
128 | struct omap_sdrc_params *sdrc_cs1); | 129 | struct omap_sdrc_params *sdrc_cs1); |
130 | #else | ||
131 | static inline void __init omap2_sdrc_init(struct omap_sdrc_params *sdrc_cs0, | ||
132 | struct omap_sdrc_params *sdrc_cs1) {}; | ||
133 | #endif | ||
134 | |||
129 | int omap2_sdrc_get_params(unsigned long r, | 135 | int omap2_sdrc_get_params(unsigned long r, |
130 | struct omap_sdrc_params **sdrc_cs0, | 136 | struct omap_sdrc_params **sdrc_cs0, |
131 | struct omap_sdrc_params **sdrc_cs1); | 137 | struct omap_sdrc_params **sdrc_cs1); |
diff --git a/arch/arm/plat-omap/include/plat/serial.h b/arch/arm/plat-omap/include/plat/serial.h index cec5d56db2eb..8061695aa523 100644 --- a/arch/arm/plat-omap/include/plat/serial.h +++ b/arch/arm/plat-omap/include/plat/serial.h | |||
@@ -51,6 +51,11 @@ | |||
51 | #define OMAP4_UART3_BASE 0x48020000 | 51 | #define OMAP4_UART3_BASE 0x48020000 |
52 | #define OMAP4_UART4_BASE 0x4806e000 | 52 | #define OMAP4_UART4_BASE 0x4806e000 |
53 | 53 | ||
54 | /* TI816X serial ports */ | ||
55 | #define TI816X_UART1_BASE 0x48020000 | ||
56 | #define TI816X_UART2_BASE 0x48022000 | ||
57 | #define TI816X_UART3_BASE 0x48024000 | ||
58 | |||
54 | /* External port on Zoom2/3 */ | 59 | /* External port on Zoom2/3 */ |
55 | #define ZOOM_UART_BASE 0x10000000 | 60 | #define ZOOM_UART_BASE 0x10000000 |
56 | #define ZOOM_UART_VIRT 0xfa400000 | 61 | #define ZOOM_UART_VIRT 0xfa400000 |
@@ -81,6 +86,9 @@ | |||
81 | #define OMAP4UART2 OMAP2UART2 | 86 | #define OMAP4UART2 OMAP2UART2 |
82 | #define OMAP4UART3 43 | 87 | #define OMAP4UART3 43 |
83 | #define OMAP4UART4 44 | 88 | #define OMAP4UART4 44 |
89 | #define TI816XUART1 81 | ||
90 | #define TI816XUART2 82 | ||
91 | #define TI816XUART3 83 | ||
84 | #define ZOOM_UART 95 /* Only on zoom2/3 */ | 92 | #define ZOOM_UART 95 /* Only on zoom2/3 */ |
85 | 93 | ||
86 | /* This is only used by 8250.c for omap1510 */ | 94 | /* This is only used by 8250.c for omap1510 */ |
@@ -96,7 +104,6 @@ | |||
96 | 104 | ||
97 | struct omap_board_data; | 105 | struct omap_board_data; |
98 | 106 | ||
99 | extern void __init omap_serial_early_init(void); | ||
100 | extern void omap_serial_init(void); | 107 | extern void omap_serial_init(void); |
101 | extern void omap_serial_init_port(struct omap_board_data *bdata); | 108 | extern void omap_serial_init_port(struct omap_board_data *bdata); |
102 | extern int omap_uart_can_sleep(void); | 109 | extern int omap_uart_can_sleep(void); |
diff --git a/arch/arm/plat-omap/include/plat/system.h b/arch/arm/plat-omap/include/plat/system.h index d0a119f735b4..c5fa9e929009 100644 --- a/arch/arm/plat-omap/include/plat/system.h +++ b/arch/arm/plat-omap/include/plat/system.h | |||
@@ -4,48 +4,14 @@ | |||
4 | */ | 4 | */ |
5 | #ifndef __ASM_ARCH_SYSTEM_H | 5 | #ifndef __ASM_ARCH_SYSTEM_H |
6 | #define __ASM_ARCH_SYSTEM_H | 6 | #define __ASM_ARCH_SYSTEM_H |
7 | #include <linux/clk.h> | ||
8 | 7 | ||
9 | #include <asm/mach-types.h> | 8 | #include <asm/proc-fns.h> |
10 | #include <mach/hardware.h> | ||
11 | |||
12 | #include <plat/prcm.h> | ||
13 | |||
14 | #ifndef CONFIG_MACH_VOICEBLUE | ||
15 | #define voiceblue_reset() do {} while (0) | ||
16 | #else | ||
17 | extern void voiceblue_reset(void); | ||
18 | #endif | ||
19 | 9 | ||
20 | static inline void arch_idle(void) | 10 | static inline void arch_idle(void) |
21 | { | 11 | { |
22 | cpu_do_idle(); | 12 | cpu_do_idle(); |
23 | } | 13 | } |
24 | 14 | ||
25 | static inline void omap1_arch_reset(char mode, const char *cmd) | 15 | extern void (*arch_reset)(char, const char *); |
26 | { | ||
27 | /* | ||
28 | * Workaround for 5912/1611b bug mentioned in sprz209d.pdf p. 28 | ||
29 | * "Global Software Reset Affects Traffic Controller Frequency". | ||
30 | */ | ||
31 | if (cpu_is_omap5912()) { | ||
32 | omap_writew(omap_readw(DPLL_CTL) & ~(1 << 4), | ||
33 | DPLL_CTL); | ||
34 | omap_writew(0x8, ARM_RSTCT1); | ||
35 | } | ||
36 | |||
37 | if (machine_is_voiceblue()) | ||
38 | voiceblue_reset(); | ||
39 | else | ||
40 | omap_writew(1, ARM_RSTCT1); | ||
41 | } | ||
42 | |||
43 | static inline void arch_reset(char mode, const char *cmd) | ||
44 | { | ||
45 | if (!cpu_class_is_omap2()) | ||
46 | omap1_arch_reset(mode, cmd); | ||
47 | else | ||
48 | omap_prcm_arch_reset(mode, cmd); | ||
49 | } | ||
50 | 16 | ||
51 | #endif | 17 | #endif |
diff --git a/arch/arm/plat-omap/include/plat/ti816x.h b/arch/arm/plat-omap/include/plat/ti816x.h new file mode 100644 index 000000000000..50510f5dda1e --- /dev/null +++ b/arch/arm/plat-omap/include/plat/ti816x.h | |||
@@ -0,0 +1,27 @@ | |||
1 | /* | ||
2 | * This file contains the address data for various TI816X modules. | ||
3 | * | ||
4 | * Copyright (C) 2010 Texas Instruments, Inc. - http://www.ti.com/ | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or | ||
7 | * modify it under the terms of the GNU General Public License as | ||
8 | * published by the Free Software Foundation version 2. | ||
9 | * | ||
10 | * This program is distributed "as is" WITHOUT ANY WARRANTY of any | ||
11 | * kind, whether express or implied; without even the implied warranty | ||
12 | * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | */ | ||
15 | |||
16 | #ifndef __ASM_ARCH_TI816X_H | ||
17 | #define __ASM_ARCH_TI816X_H | ||
18 | |||
19 | #define L4_SLOW_TI816X_BASE 0x48000000 | ||
20 | |||
21 | #define TI816X_SCM_BASE 0x48140000 | ||
22 | #define TI816X_CTRL_BASE TI816X_SCM_BASE | ||
23 | #define TI816X_PRCM_BASE 0x48180000 | ||
24 | |||
25 | #define TI816X_ARM_INTC_BASE 0x48200000 | ||
26 | |||
27 | #endif /* __ASM_ARCH_TI816X_H */ | ||
diff --git a/arch/arm/plat-omap/include/plat/uncompress.h b/arch/arm/plat-omap/include/plat/uncompress.h index ad98b85cae21..30b891c4a93f 100644 --- a/arch/arm/plat-omap/include/plat/uncompress.h +++ b/arch/arm/plat-omap/include/plat/uncompress.h | |||
@@ -93,6 +93,10 @@ static inline void flush(void) | |||
93 | #define DEBUG_LL_ZOOM(mach) \ | 93 | #define DEBUG_LL_ZOOM(mach) \ |
94 | _DEBUG_LL_ENTRY(mach, ZOOM_UART_BASE, ZOOM_PORT_SHIFT, ZOOM_UART) | 94 | _DEBUG_LL_ENTRY(mach, ZOOM_UART_BASE, ZOOM_PORT_SHIFT, ZOOM_UART) |
95 | 95 | ||
96 | #define DEBUG_LL_TI816X(p, mach) \ | ||
97 | _DEBUG_LL_ENTRY(mach, TI816X_UART##p##_BASE, OMAP_PORT_SHIFT, \ | ||
98 | TI816XUART##p) | ||
99 | |||
96 | static inline void __arch_decomp_setup(unsigned long arch_id) | 100 | static inline void __arch_decomp_setup(unsigned long arch_id) |
97 | { | 101 | { |
98 | int port = 0; | 102 | int port = 0; |
@@ -166,6 +170,9 @@ static inline void __arch_decomp_setup(unsigned long arch_id) | |||
166 | DEBUG_LL_ZOOM(omap_zoom2); | 170 | DEBUG_LL_ZOOM(omap_zoom2); |
167 | DEBUG_LL_ZOOM(omap_zoom3); | 171 | DEBUG_LL_ZOOM(omap_zoom3); |
168 | 172 | ||
173 | /* TI8168 base boards using UART3 */ | ||
174 | DEBUG_LL_TI816X(3, ti8168evm); | ||
175 | |||
169 | } while (0); | 176 | } while (0); |
170 | } | 177 | } |
171 | 178 | ||
diff --git a/arch/arm/plat-omap/include/plat/usb.h b/arch/arm/plat-omap/include/plat/usb.h index 450a332f1009..077192759afc 100644 --- a/arch/arm/plat-omap/include/plat/usb.h +++ b/arch/arm/plat-omap/include/plat/usb.h | |||
@@ -91,6 +91,10 @@ extern int omap4430_phy_exit(struct device *dev); | |||
91 | 91 | ||
92 | #endif | 92 | #endif |
93 | 93 | ||
94 | extern void am35x_musb_reset(void); | ||
95 | extern void am35x_musb_phy_power(u8 on); | ||
96 | extern void am35x_musb_clear_irq(void); | ||
97 | extern void am35x_musb_set_mode(u8 musb_mode); | ||
94 | 98 | ||
95 | /* | 99 | /* |
96 | * FIXME correct answer depends on hmc_mode, | 100 | * FIXME correct answer depends on hmc_mode, |
diff --git a/arch/arm/plat-omap/io.c b/arch/arm/plat-omap/io.c index f1295fafcd31..f1ecfa9fc61d 100644 --- a/arch/arm/plat-omap/io.c +++ b/arch/arm/plat-omap/io.c | |||
@@ -85,7 +85,10 @@ void __iomem *omap_ioremap(unsigned long p, size_t size, unsigned int type) | |||
85 | } | 85 | } |
86 | #endif | 86 | #endif |
87 | #ifdef CONFIG_ARCH_OMAP3 | 87 | #ifdef CONFIG_ARCH_OMAP3 |
88 | if (cpu_is_omap34xx()) { | 88 | if (cpu_is_ti816x()) { |
89 | if (BETWEEN(p, L4_34XX_PHYS, L4_34XX_SIZE)) | ||
90 | return XLATE(p, L4_34XX_PHYS, L4_34XX_VIRT); | ||
91 | } else if (cpu_is_omap34xx()) { | ||
89 | if (BETWEEN(p, L3_34XX_PHYS, L3_34XX_SIZE)) | 92 | if (BETWEEN(p, L3_34XX_PHYS, L3_34XX_SIZE)) |
90 | return XLATE(p, L3_34XX_PHYS, L3_34XX_VIRT); | 93 | return XLATE(p, L3_34XX_PHYS, L3_34XX_VIRT); |
91 | if (BETWEEN(p, L4_34XX_PHYS, L4_34XX_SIZE)) | 94 | if (BETWEEN(p, L4_34XX_PHYS, L4_34XX_SIZE)) |
diff --git a/arch/arm/plat-omap/sram.c b/arch/arm/plat-omap/sram.c index e26e50487d60..9d80064e979b 100644 --- a/arch/arm/plat-omap/sram.c +++ b/arch/arm/plat-omap/sram.c | |||
@@ -312,7 +312,7 @@ u32 omap2_set_prcm(u32 dpll_ctrl_val, u32 sdrc_rfr_val, int bypass) | |||
312 | } | 312 | } |
313 | #endif | 313 | #endif |
314 | 314 | ||
315 | #ifdef CONFIG_ARCH_OMAP2420 | 315 | #ifdef CONFIG_SOC_OMAP2420 |
316 | static int __init omap242x_sram_init(void) | 316 | static int __init omap242x_sram_init(void) |
317 | { | 317 | { |
318 | _omap2_sram_ddr_init = omap_sram_push(omap242x_sram_ddr_init, | 318 | _omap2_sram_ddr_init = omap_sram_push(omap242x_sram_ddr_init, |
@@ -333,7 +333,7 @@ static inline int omap242x_sram_init(void) | |||
333 | } | 333 | } |
334 | #endif | 334 | #endif |
335 | 335 | ||
336 | #ifdef CONFIG_ARCH_OMAP2430 | 336 | #ifdef CONFIG_SOC_OMAP2430 |
337 | static int __init omap243x_sram_init(void) | 337 | static int __init omap243x_sram_init(void) |
338 | { | 338 | { |
339 | _omap2_sram_ddr_init = omap_sram_push(omap243x_sram_ddr_init, | 339 | _omap2_sram_ddr_init = omap_sram_push(omap243x_sram_ddr_init, |
@@ -405,20 +405,6 @@ static inline int omap34xx_sram_init(void) | |||
405 | } | 405 | } |
406 | #endif | 406 | #endif |
407 | 407 | ||
408 | #ifdef CONFIG_ARCH_OMAP4 | ||
409 | static int __init omap44xx_sram_init(void) | ||
410 | { | ||
411 | printk(KERN_ERR "FIXME: %s not implemented\n", __func__); | ||
412 | |||
413 | return -ENODEV; | ||
414 | } | ||
415 | #else | ||
416 | static inline int omap44xx_sram_init(void) | ||
417 | { | ||
418 | return 0; | ||
419 | } | ||
420 | #endif | ||
421 | |||
422 | int __init omap_sram_init(void) | 408 | int __init omap_sram_init(void) |
423 | { | 409 | { |
424 | omap_detect_sram(); | 410 | omap_detect_sram(); |
@@ -432,8 +418,6 @@ int __init omap_sram_init(void) | |||
432 | omap243x_sram_init(); | 418 | omap243x_sram_init(); |
433 | else if (cpu_is_omap34xx()) | 419 | else if (cpu_is_omap34xx()) |
434 | omap34xx_sram_init(); | 420 | omap34xx_sram_init(); |
435 | else if (cpu_is_omap44xx()) | ||
436 | omap44xx_sram_init(); | ||
437 | 421 | ||
438 | return 0; | 422 | return 0; |
439 | } | 423 | } |