aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2011-07-28 11:25:46 -0400
committerArnd Bergmann <arnd@arndb.de>2011-07-28 11:25:46 -0400
commit6124a4e430b64d1577438c8648c59e996d02e73e (patch)
tree49cfafad785d1c9e403a5b0d755298b9af2c260f /arch/arm/mach-omap2
parent8e267f3da5f117d2f1316cf6ddf740f93f1c73aa (diff)
parent580975d7f48d7d047e22bb0f42adf7557801d8d4 (diff)
Merge branch 'imx/dt' into next/dt
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r--arch/arm/mach-omap2/Kconfig6
-rw-r--r--arch/arm/mach-omap2/Makefile20
-rw-r--r--arch/arm/mach-omap2/board-2430sdp.c4
-rw-r--r--arch/arm/mach-omap2/board-3430sdp.c93
-rw-r--r--arch/arm/mach-omap2/board-3630sdp.c4
-rw-r--r--arch/arm/mach-omap2/board-4430sdp.c341
-rw-r--r--arch/arm/mach-omap2/board-am3517crane.c4
-rw-r--r--arch/arm/mach-omap2/board-am3517evm.c4
-rw-r--r--arch/arm/mach-omap2/board-apollon.c4
-rw-r--r--arch/arm/mach-omap2/board-cm-t35.c176
-rw-r--r--arch/arm/mach-omap2/board-cm-t3517.c5
-rw-r--r--arch/arm/mach-omap2/board-devkit8000.c64
-rw-r--r--arch/arm/mach-omap2/board-flash.c4
-rw-r--r--arch/arm/mach-omap2/board-generic.c4
-rw-r--r--arch/arm/mach-omap2/board-h4.c4
-rw-r--r--arch/arm/mach-omap2/board-igep0020.c79
-rw-r--r--arch/arm/mach-omap2/board-ldp.c29
-rw-r--r--arch/arm/mach-omap2/board-n8x0.c12
-rw-r--r--arch/arm/mach-omap2/board-omap3beagle.c167
-rw-r--r--arch/arm/mach-omap2/board-omap3evm.c111
-rw-r--r--arch/arm/mach-omap2/board-omap3logic.c19
-rw-r--r--arch/arm/mach-omap2/board-omap3pandora.c119
-rw-r--r--arch/arm/mach-omap2/board-omap3stalker.c99
-rw-r--r--arch/arm/mach-omap2/board-omap3touchbook.c97
-rw-r--r--arch/arm/mach-omap2/board-omap4panda.c161
-rw-r--r--arch/arm/mach-omap2/board-overo.c84
-rw-r--r--arch/arm/mach-omap2/board-rm680.c12
-rw-r--r--arch/arm/mach-omap2/board-rx51-peripherals.c194
-rw-r--r--arch/arm/mach-omap2/board-rx51.c4
-rw-r--r--arch/arm/mach-omap2/board-ti8168evm.c9
-rw-r--r--arch/arm/mach-omap2/board-zoom-debugboard.c9
-rw-r--r--arch/arm/mach-omap2/board-zoom-peripherals.c128
-rw-r--r--arch/arm/mach-omap2/board-zoom.c8
-rw-r--r--arch/arm/mach-omap2/clock.c28
-rw-r--r--arch/arm/mach-omap2/clock.h3
-rw-r--r--arch/arm/mach-omap2/clock2420_data.c22
-rw-r--r--arch/arm/mach-omap2/clock2430_data.c32
-rw-r--r--arch/arm/mach-omap2/clock3xxx_data.c44
-rw-r--r--arch/arm/mach-omap2/clock44xx.h7
-rw-r--r--arch/arm/mach-omap2/clock44xx_data.c490
-rw-r--r--arch/arm/mach-omap2/clockdomain.c210
-rw-r--r--arch/arm/mach-omap2/clockdomain.h11
-rw-r--r--arch/arm/mach-omap2/clockdomain2xxx_3xxx.c6
-rw-r--r--arch/arm/mach-omap2/clockdomain44xx.c13
-rw-r--r--arch/arm/mach-omap2/clockdomains44xx_data.c124
-rw-r--r--arch/arm/mach-omap2/cm-regbits-44xx.h659
-rw-r--r--arch/arm/mach-omap2/cm1_44xx.h64
-rw-r--r--arch/arm/mach-omap2/cm2_44xx.h73
-rw-r--r--arch/arm/mach-omap2/cm44xx.h8
-rw-r--r--arch/arm/mach-omap2/cminst44xx.c150
-rw-r--r--arch/arm/mach-omap2/cminst44xx.h10
-rw-r--r--arch/arm/mach-omap2/common-board-devices.c27
-rw-r--r--arch/arm/mach-omap2/common-board-devices.h26
-rw-r--r--arch/arm/mach-omap2/devices.c3
-rw-r--r--arch/arm/mach-omap2/gpmc-nand.c10
-rw-r--r--arch/arm/mach-omap2/hsmmc.c7
-rw-r--r--arch/arm/mach-omap2/i2c.c68
-rw-r--r--arch/arm/mach-omap2/id.c53
-rw-r--r--arch/arm/mach-omap2/include/mach/clkdev.h5
-rw-r--r--arch/arm/mach-omap2/io.c17
-rw-r--r--arch/arm/mach-omap2/iommu2.c4
-rw-r--r--arch/arm/mach-omap2/irq.c32
-rw-r--r--arch/arm/mach-omap2/omap-iommu.c2
-rw-r--r--arch/arm/mach-omap2/omap4-common.c10
-rw-r--r--arch/arm/mach-omap2/omap_hwmod.c404
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_2420_data.c841
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_2430_data.c917
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_interconnect_data.c173
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c322
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_2xxx_interconnect_data.c130
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c150
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_3xxx_data.c672
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_44xx_data.c959
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_common_data.c20
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_common_data.h93
-rw-r--r--arch/arm/mach-omap2/pm-debug.c372
-rw-r--r--arch/arm/mach-omap2/pm.c6
-rw-r--r--arch/arm/mach-omap2/pm.h16
-rw-r--r--arch/arm/mach-omap2/pm24xx.c6
-rw-r--r--arch/arm/mach-omap2/pm34xx.c6
-rw-r--r--arch/arm/mach-omap2/powerdomains44xx_data.c27
-rw-r--r--arch/arm/mach-omap2/prcm.c2
-rw-r--r--arch/arm/mach-omap2/prcm_mpu44xx.h69
-rw-r--r--arch/arm/mach-omap2/prm-regbits-44xx.h8
-rw-r--r--arch/arm/mach-omap2/prm44xx.c145
-rw-r--r--arch/arm/mach-omap2/prm44xx.h44
-rw-r--r--arch/arm/mach-omap2/prminst44xx.c112
-rw-r--r--arch/arm/mach-omap2/prminst44xx.h12
-rw-r--r--arch/arm/mach-omap2/smartreflex.c38
-rw-r--r--arch/arm/mach-omap2/timer-gp.c266
-rw-r--r--arch/arm/mach-omap2/timer-gp.h16
-rw-r--r--arch/arm/mach-omap2/timer.c342
-rw-r--r--arch/arm/mach-omap2/twl-common.c304
-rw-r--r--arch/arm/mach-omap2/twl-common.h59
-rw-r--r--arch/arm/mach-omap2/usb-musb.c10
95 files changed, 5209 insertions, 5628 deletions
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index 19d5891c48e..4ae6257b39a 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -266,9 +266,10 @@ config MACH_OMAP_ZOOM3
266 select REGULATOR_FIXED_VOLTAGE 266 select REGULATOR_FIXED_VOLTAGE
267 267
268config MACH_CM_T35 268config MACH_CM_T35
269 bool "CompuLab CM-T35 module" 269 bool "CompuLab CM-T35/CM-T3730 modules"
270 depends on ARCH_OMAP3 270 depends on ARCH_OMAP3
271 default y 271 default y
272 select MACH_CM_T3730
272 select OMAP_PACKAGE_CUS 273 select OMAP_PACKAGE_CUS
273 274
274config MACH_CM_T3517 275config MACH_CM_T3517
@@ -277,6 +278,9 @@ config MACH_CM_T3517
277 default y 278 default y
278 select OMAP_PACKAGE_CBB 279 select OMAP_PACKAGE_CBB
279 280
281config MACH_CM_T3730
282 bool
283
280config MACH_IGEP0020 284config MACH_IGEP0020
281 bool "IGEP v2 board" 285 bool "IGEP v2 board"
282 depends on ARCH_OMAP3 286 depends on ARCH_OMAP3
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index b1480779440..f3433656043 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -3,7 +3,7 @@
3# 3#
4 4
5# Common support 5# Common support
6obj-y := id.o io.o control.o mux.o devices.o serial.o gpmc.o timer-gp.o pm.o \ 6obj-y := id.o io.o control.o mux.o devices.o serial.o gpmc.o timer.o pm.o \
7 common.o gpio.o dma.o wd_timer.o 7 common.o gpio.o dma.o wd_timer.o
8 8
9omap-2-3-common = irq.o sdrc.o 9omap-2-3-common = irq.o sdrc.o
@@ -145,9 +145,19 @@ obj-$(CONFIG_SOC_OMAP2420) += opp2420_data.o
145obj-$(CONFIG_SOC_OMAP2430) += opp2430_data.o 145obj-$(CONFIG_SOC_OMAP2430) += opp2430_data.o
146 146
147# hwmod data 147# hwmod data
148obj-$(CONFIG_SOC_OMAP2420) += omap_hwmod_2420_data.o 148obj-$(CONFIG_SOC_OMAP2420) += omap_hwmod_2xxx_ipblock_data.o \
149obj-$(CONFIG_SOC_OMAP2430) += omap_hwmod_2430_data.o 149 omap_hwmod_2xxx_3xxx_ipblock_data.o \
150obj-$(CONFIG_ARCH_OMAP3) += omap_hwmod_3xxx_data.o 150 omap_hwmod_2xxx_interconnect_data.o \
151 omap_hwmod_2xxx_3xxx_interconnect_data.o \
152 omap_hwmod_2420_data.o
153obj-$(CONFIG_SOC_OMAP2430) += omap_hwmod_2xxx_ipblock_data.o \
154 omap_hwmod_2xxx_3xxx_ipblock_data.o \
155 omap_hwmod_2xxx_interconnect_data.o \
156 omap_hwmod_2xxx_3xxx_interconnect_data.o \
157 omap_hwmod_2430_data.o
158obj-$(CONFIG_ARCH_OMAP3) += omap_hwmod_2xxx_3xxx_ipblock_data.o \
159 omap_hwmod_2xxx_3xxx_interconnect_data.o \
160 omap_hwmod_3xxx_data.o
151obj-$(CONFIG_ARCH_OMAP4) += omap_hwmod_44xx_data.o 161obj-$(CONFIG_ARCH_OMAP4) += omap_hwmod_44xx_data.o
152 162
153# EMU peripherals 163# EMU peripherals
@@ -269,4 +279,4 @@ obj-$(CONFIG_ARCH_OMAP4) += hwspinlock.o
269disp-$(CONFIG_OMAP2_DSS) := display.o 279disp-$(CONFIG_OMAP2_DSS) := display.o
270obj-y += $(disp-m) $(disp-y) 280obj-y += $(disp-m) $(disp-y)
271 281
272obj-y += common-board-devices.o 282obj-y += common-board-devices.o twl-common.o
diff --git a/arch/arm/mach-omap2/board-2430sdp.c b/arch/arm/mach-omap2/board-2430sdp.c
index 5de6eac0a72..2028464cf5b 100644
--- a/arch/arm/mach-omap2/board-2430sdp.c
+++ b/arch/arm/mach-omap2/board-2430sdp.c
@@ -260,7 +260,7 @@ MACHINE_START(OMAP_2430SDP, "OMAP2430 sdp2430 board")
260 .reserve = omap_reserve, 260 .reserve = omap_reserve,
261 .map_io = omap_2430sdp_map_io, 261 .map_io = omap_2430sdp_map_io,
262 .init_early = omap_2430sdp_init_early, 262 .init_early = omap_2430sdp_init_early,
263 .init_irq = omap_init_irq, 263 .init_irq = omap2_init_irq,
264 .init_machine = omap_2430sdp_init, 264 .init_machine = omap_2430sdp_init,
265 .timer = &omap_timer, 265 .timer = &omap2_timer,
266MACHINE_END 266MACHINE_END
diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c
index 5dac974be62..bd600cfb7f8 100644
--- a/arch/arm/mach-omap2/board-3430sdp.c
+++ b/arch/arm/mach-omap2/board-3430sdp.c
@@ -231,22 +231,6 @@ static void __init omap_3430sdp_init_early(void)
231 omap2_init_common_devices(hyb18m512160af6_sdrc_params, NULL); 231 omap2_init_common_devices(hyb18m512160af6_sdrc_params, NULL);
232} 232}
233 233
234static int sdp3430_batt_table[] = {
235/* 0 C*/
23630800, 29500, 28300, 27100,
23726000, 24900, 23900, 22900, 22000, 21100, 20300, 19400, 18700, 17900,
23817200, 16500, 15900, 15300, 14700, 14100, 13600, 13100, 12600, 12100,
23911600, 11200, 10800, 10400, 10000, 9630, 9280, 8950, 8620, 8310,
2408020, 7730, 7460, 7200, 6950, 6710, 6470, 6250, 6040, 5830,
2415640, 5450, 5260, 5090, 4920, 4760, 4600, 4450, 4310, 4170,
2424040, 3910, 3790, 3670, 3550
243};
244
245static struct twl4030_bci_platform_data sdp3430_bci_data = {
246 .battery_tmp_tbl = sdp3430_batt_table,
247 .tblsize = ARRAY_SIZE(sdp3430_batt_table),
248};
249
250static struct omap2_hsmmc_info mmc[] = { 234static struct omap2_hsmmc_info mmc[] = {
251 { 235 {
252 .mmc = 1, 236 .mmc = 1,
@@ -292,14 +276,6 @@ static struct twl4030_gpio_platform_data sdp3430_gpio_data = {
292 .setup = sdp3430_twl_gpio_setup, 276 .setup = sdp3430_twl_gpio_setup,
293}; 277};
294 278
295static struct twl4030_usb_data sdp3430_usb_data = {
296 .usb_mode = T2_USB_MODE_ULPI,
297};
298
299static struct twl4030_madc_platform_data sdp3430_madc_data = {
300 .irq_line = 1,
301};
302
303/* regulator consumer mappings */ 279/* regulator consumer mappings */
304 280
305/* ads7846 on SPI */ 281/* ads7846 on SPI */
@@ -307,16 +283,6 @@ static struct regulator_consumer_supply sdp3430_vaux3_supplies[] = {
307 REGULATOR_SUPPLY("vcc", "spi1.0"), 283 REGULATOR_SUPPLY("vcc", "spi1.0"),
308}; 284};
309 285
310static struct regulator_consumer_supply sdp3430_vdda_dac_supplies[] = {
311 REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"),
312};
313
314/* VPLL2 for digital video outputs */
315static struct regulator_consumer_supply sdp3430_vpll2_supplies[] = {
316 REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
317 REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"),
318};
319
320static struct regulator_consumer_supply sdp3430_vmmc1_supplies[] = { 286static struct regulator_consumer_supply sdp3430_vmmc1_supplies[] = {
321 REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"), 287 REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
322}; 288};
@@ -433,54 +399,10 @@ static struct regulator_init_data sdp3430_vsim = {
433 .consumer_supplies = sdp3430_vsim_supplies, 399 .consumer_supplies = sdp3430_vsim_supplies,
434}; 400};
435 401
436/* VDAC for DSS driving S-Video */
437static struct regulator_init_data sdp3430_vdac = {
438 .constraints = {
439 .min_uV = 1800000,
440 .max_uV = 1800000,
441 .apply_uV = true,
442 .valid_modes_mask = REGULATOR_MODE_NORMAL
443 | REGULATOR_MODE_STANDBY,
444 .valid_ops_mask = REGULATOR_CHANGE_MODE
445 | REGULATOR_CHANGE_STATUS,
446 },
447 .num_consumer_supplies = ARRAY_SIZE(sdp3430_vdda_dac_supplies),
448 .consumer_supplies = sdp3430_vdda_dac_supplies,
449};
450
451static struct regulator_init_data sdp3430_vpll2 = {
452 .constraints = {
453 .name = "VDVI",
454 .min_uV = 1800000,
455 .max_uV = 1800000,
456 .apply_uV = true,
457 .valid_modes_mask = REGULATOR_MODE_NORMAL
458 | REGULATOR_MODE_STANDBY,
459 .valid_ops_mask = REGULATOR_CHANGE_MODE
460 | REGULATOR_CHANGE_STATUS,
461 },
462 .num_consumer_supplies = ARRAY_SIZE(sdp3430_vpll2_supplies),
463 .consumer_supplies = sdp3430_vpll2_supplies,
464};
465
466static struct twl4030_codec_audio_data sdp3430_audio;
467
468static struct twl4030_codec_data sdp3430_codec = {
469 .audio_mclk = 26000000,
470 .audio = &sdp3430_audio,
471};
472
473static struct twl4030_platform_data sdp3430_twldata = { 402static struct twl4030_platform_data sdp3430_twldata = {
474 .irq_base = TWL4030_IRQ_BASE,
475 .irq_end = TWL4030_IRQ_END,
476
477 /* platform_data for children goes here */ 403 /* platform_data for children goes here */
478 .bci = &sdp3430_bci_data,
479 .gpio = &sdp3430_gpio_data, 404 .gpio = &sdp3430_gpio_data,
480 .madc = &sdp3430_madc_data,
481 .keypad = &sdp3430_kp_data, 405 .keypad = &sdp3430_kp_data,
482 .usb = &sdp3430_usb_data,
483 .codec = &sdp3430_codec,
484 406
485 .vaux1 = &sdp3430_vaux1, 407 .vaux1 = &sdp3430_vaux1,
486 .vaux2 = &sdp3430_vaux2, 408 .vaux2 = &sdp3430_vaux2,
@@ -489,14 +411,21 @@ static struct twl4030_platform_data sdp3430_twldata = {
489 .vmmc1 = &sdp3430_vmmc1, 411 .vmmc1 = &sdp3430_vmmc1,
490 .vmmc2 = &sdp3430_vmmc2, 412 .vmmc2 = &sdp3430_vmmc2,
491 .vsim = &sdp3430_vsim, 413 .vsim = &sdp3430_vsim,
492 .vdac = &sdp3430_vdac,
493 .vpll2 = &sdp3430_vpll2,
494}; 414};
495 415
496static int __init omap3430_i2c_init(void) 416static int __init omap3430_i2c_init(void)
497{ 417{
498 /* i2c1 for PMIC only */ 418 /* i2c1 for PMIC only */
419 omap3_pmic_get_config(&sdp3430_twldata,
420 TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_BCI |
421 TWL_COMMON_PDATA_MADC | TWL_COMMON_PDATA_AUDIO,
422 TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2);
423 sdp3430_twldata.vdac->constraints.apply_uV = true;
424 sdp3430_twldata.vpll2->constraints.apply_uV = true;
425 sdp3430_twldata.vpll2->constraints.name = "VDVI";
426
499 omap3_pmic_init("twl4030", &sdp3430_twldata); 427 omap3_pmic_init("twl4030", &sdp3430_twldata);
428
500 /* i2c2 on camera connector (for sensor control) and optional isp1301 */ 429 /* i2c2 on camera connector (for sensor control) and optional isp1301 */
501 omap_register_i2c_bus(2, 400, NULL, 0); 430 omap_register_i2c_bus(2, 400, NULL, 0);
502 /* i2c3 on display connector (for DVI, tfp410) */ 431 /* i2c3 on display connector (for DVI, tfp410) */
@@ -804,7 +733,7 @@ MACHINE_START(OMAP_3430SDP, "OMAP3430 3430SDP board")
804 .reserve = omap_reserve, 733 .reserve = omap_reserve,
805 .map_io = omap3_map_io, 734 .map_io = omap3_map_io,
806 .init_early = omap_3430sdp_init_early, 735 .init_early = omap_3430sdp_init_early,
807 .init_irq = omap_init_irq, 736 .init_irq = omap3_init_irq,
808 .init_machine = omap_3430sdp_init, 737 .init_machine = omap_3430sdp_init,
809 .timer = &omap_timer, 738 .timer = &omap3_timer,
810MACHINE_END 739MACHINE_END
diff --git a/arch/arm/mach-omap2/board-3630sdp.c b/arch/arm/mach-omap2/board-3630sdp.c
index a5933cc15ca..e4f37b57a0c 100644
--- a/arch/arm/mach-omap2/board-3630sdp.c
+++ b/arch/arm/mach-omap2/board-3630sdp.c
@@ -219,7 +219,7 @@ MACHINE_START(OMAP_3630SDP, "OMAP 3630SDP board")
219 .reserve = omap_reserve, 219 .reserve = omap_reserve,
220 .map_io = omap3_map_io, 220 .map_io = omap3_map_io,
221 .init_early = omap_sdp_init_early, 221 .init_early = omap_sdp_init_early,
222 .init_irq = omap_init_irq, 222 .init_irq = omap3_init_irq,
223 .init_machine = omap_sdp_init, 223 .init_machine = omap_sdp_init,
224 .timer = &omap_timer, 224 .timer = &omap3_timer,
225MACHINE_END 225MACHINE_END
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c
index 63de2d396e2..c7cef44c75d 100644
--- a/arch/arm/mach-omap2/board-4430sdp.c
+++ b/arch/arm/mach-omap2/board-4430sdp.c
@@ -22,6 +22,7 @@
22#include <linux/i2c/twl.h> 22#include <linux/i2c/twl.h>
23#include <linux/gpio_keys.h> 23#include <linux/gpio_keys.h>
24#include <linux/regulator/machine.h> 24#include <linux/regulator/machine.h>
25#include <linux/regulator/fixed.h>
25#include <linux/leds.h> 26#include <linux/leds.h>
26#include <linux/leds_pwm.h> 27#include <linux/leds_pwm.h>
27 28
@@ -37,10 +38,10 @@
37#include <plat/mmc.h> 38#include <plat/mmc.h>
38#include <plat/omap4-keypad.h> 39#include <plat/omap4-keypad.h>
39#include <video/omapdss.h> 40#include <video/omapdss.h>
41#include <linux/wl12xx.h>
40 42
41#include "mux.h" 43#include "mux.h"
42#include "hsmmc.h" 44#include "hsmmc.h"
43#include "timer-gp.h"
44#include "control.h" 45#include "control.h"
45#include "common-board-devices.h" 46#include "common-board-devices.h"
46 47
@@ -52,6 +53,9 @@
52#define HDMI_GPIO_HPD 60 /* Hot plug pin for HDMI */ 53#define HDMI_GPIO_HPD 60 /* Hot plug pin for HDMI */
53#define HDMI_GPIO_LS_OE 41 /* Level shifter for HDMI */ 54#define HDMI_GPIO_LS_OE 41 /* Level shifter for HDMI */
54 55
56#define GPIO_WIFI_PMENA 54
57#define GPIO_WIFI_IRQ 53
58
55static const int sdp4430_keymap[] = { 59static const int sdp4430_keymap[] = {
56 KEY(0, 0, KEY_E), 60 KEY(0, 0, KEY_E),
57 KEY(0, 1, KEY_R), 61 KEY(0, 1, KEY_R),
@@ -125,6 +129,64 @@ static const int sdp4430_keymap[] = {
125 KEY(7, 6, KEY_OK), 129 KEY(7, 6, KEY_OK),
126 KEY(7, 7, KEY_DOWN), 130 KEY(7, 7, KEY_DOWN),
127}; 131};
132static struct omap_device_pad keypad_pads[] __initdata = {
133 { .name = "kpd_col1.kpd_col1",
134 .enable = OMAP_WAKEUP_EN | OMAP_MUX_MODE1,
135 },
136 { .name = "kpd_col1.kpd_col1",
137 .enable = OMAP_WAKEUP_EN | OMAP_MUX_MODE1,
138 },
139 { .name = "kpd_col2.kpd_col2",
140 .enable = OMAP_WAKEUP_EN | OMAP_MUX_MODE1,
141 },
142 { .name = "kpd_col3.kpd_col3",
143 .enable = OMAP_WAKEUP_EN | OMAP_MUX_MODE1,
144 },
145 { .name = "kpd_col4.kpd_col4",
146 .enable = OMAP_WAKEUP_EN | OMAP_MUX_MODE1,
147 },
148 { .name = "kpd_col5.kpd_col5",
149 .enable = OMAP_WAKEUP_EN | OMAP_MUX_MODE1,
150 },
151 { .name = "gpmc_a23.kpd_col7",
152 .enable = OMAP_WAKEUP_EN | OMAP_MUX_MODE1,
153 },
154 { .name = "gpmc_a22.kpd_col6",
155 .enable = OMAP_WAKEUP_EN | OMAP_MUX_MODE1,
156 },
157 { .name = "kpd_row0.kpd_row0",
158 .enable = OMAP_PULL_ENA | OMAP_PULL_UP | OMAP_WAKEUP_EN |
159 OMAP_MUX_MODE1 | OMAP_INPUT_EN,
160 },
161 { .name = "kpd_row1.kpd_row1",
162 .enable = OMAP_PULL_ENA | OMAP_PULL_UP | OMAP_WAKEUP_EN |
163 OMAP_MUX_MODE1 | OMAP_INPUT_EN,
164 },
165 { .name = "kpd_row2.kpd_row2",
166 .enable = OMAP_PULL_ENA | OMAP_PULL_UP | OMAP_WAKEUP_EN |
167 OMAP_MUX_MODE1 | OMAP_INPUT_EN,
168 },
169 { .name = "kpd_row3.kpd_row3",
170 .enable = OMAP_PULL_ENA | OMAP_PULL_UP | OMAP_WAKEUP_EN |
171 OMAP_MUX_MODE1 | OMAP_INPUT_EN,
172 },
173 { .name = "kpd_row4.kpd_row4",
174 .enable = OMAP_PULL_ENA | OMAP_PULL_UP | OMAP_WAKEUP_EN |
175 OMAP_MUX_MODE1 | OMAP_INPUT_EN,
176 },
177 { .name = "kpd_row5.kpd_row5",
178 .enable = OMAP_PULL_ENA | OMAP_PULL_UP | OMAP_WAKEUP_EN |
179 OMAP_MUX_MODE1 | OMAP_INPUT_EN,
180 },
181 { .name = "gpmc_a18.kpd_row6",
182 .enable = OMAP_PULL_ENA | OMAP_PULL_UP | OMAP_WAKEUP_EN |
183 OMAP_MUX_MODE1 | OMAP_INPUT_EN,
184 },
185 { .name = "gpmc_a19.kpd_row7",
186 .enable = OMAP_PULL_ENA | OMAP_PULL_UP | OMAP_WAKEUP_EN |
187 OMAP_MUX_MODE1 | OMAP_INPUT_EN,
188 },
189};
128 190
129static struct matrix_keymap_data sdp4430_keymap_data = { 191static struct matrix_keymap_data sdp4430_keymap_data = {
130 .keymap = sdp4430_keymap, 192 .keymap = sdp4430_keymap,
@@ -136,6 +198,13 @@ static struct omap4_keypad_platform_data sdp4430_keypad_data = {
136 .rows = 8, 198 .rows = 8,
137 .cols = 8, 199 .cols = 8,
138}; 200};
201
202static struct omap_board_data keypad_data = {
203 .id = 1,
204 .pads = keypad_pads,
205 .pads_cnt = ARRAY_SIZE(keypad_pads),
206};
207
139static struct gpio_led sdp4430_gpio_leds[] = { 208static struct gpio_led sdp4430_gpio_leds[] = {
140 { 209 {
141 .name = "omap4:green:debug0", 210 .name = "omap4:green:debug0",
@@ -276,11 +345,40 @@ static struct platform_device sdp4430_lcd_device = {
276 .id = -1, 345 .id = -1,
277}; 346};
278 347
348static struct regulator_consumer_supply sdp4430_vbat_supply[] = {
349 REGULATOR_SUPPLY("vddvibl", "twl6040-vibra"),
350 REGULATOR_SUPPLY("vddvibr", "twl6040-vibra"),
351};
352
353static struct regulator_init_data sdp4430_vbat_data = {
354 .constraints = {
355 .always_on = 1,
356 },
357 .num_consumer_supplies = ARRAY_SIZE(sdp4430_vbat_supply),
358 .consumer_supplies = sdp4430_vbat_supply,
359};
360
361static struct fixed_voltage_config sdp4430_vbat_pdata = {
362 .supply_name = "VBAT",
363 .microvolts = 3750000,
364 .init_data = &sdp4430_vbat_data,
365 .gpio = -EINVAL,
366};
367
368static struct platform_device sdp4430_vbat = {
369 .name = "reg-fixed-voltage",
370 .id = -1,
371 .dev = {
372 .platform_data = &sdp4430_vbat_pdata,
373 },
374};
375
279static struct platform_device *sdp4430_devices[] __initdata = { 376static struct platform_device *sdp4430_devices[] __initdata = {
280 &sdp4430_lcd_device, 377 &sdp4430_lcd_device,
281 &sdp4430_gpio_keys_device, 378 &sdp4430_gpio_keys_device,
282 &sdp4430_leds_gpio, 379 &sdp4430_leds_gpio,
283 &sdp4430_leds_pwm, 380 &sdp4430_leds_pwm,
381 &sdp4430_vbat,
284}; 382};
285 383
286static struct omap_lcd_config sdp4430_lcd_config __initdata = { 384static struct omap_lcd_config sdp4430_lcd_config __initdata = {
@@ -295,9 +393,6 @@ static void __init omap_4430sdp_init_early(void)
295{ 393{
296 omap2_init_common_infrastructure(); 394 omap2_init_common_infrastructure();
297 omap2_init_common_devices(NULL, NULL); 395 omap2_init_common_devices(NULL, NULL);
298#ifdef CONFIG_OMAP_32K_TIMER
299 omap2_gp_clockevent_set_gptimer(1);
300#endif
301} 396}
302 397
303static struct omap_musb_board_data musb_board_data = { 398static struct omap_musb_board_data musb_board_data = {
@@ -306,14 +401,6 @@ static struct omap_musb_board_data musb_board_data = {
306 .power = 100, 401 .power = 100,
307}; 402};
308 403
309static struct twl4030_usb_data omap4_usbphy_data = {
310 .phy_init = omap4430_phy_init,
311 .phy_exit = omap4430_phy_exit,
312 .phy_power = omap4430_phy_power,
313 .phy_set_clock = omap4430_phy_set_clk,
314 .phy_suspend = omap4430_phy_suspend,
315};
316
317static struct omap2_hsmmc_info mmc[] = { 404static struct omap2_hsmmc_info mmc[] = {
318 { 405 {
319 .mmc = 2, 406 .mmc = 2,
@@ -327,21 +414,52 @@ static struct omap2_hsmmc_info mmc[] = {
327 { 414 {
328 .mmc = 1, 415 .mmc = 1,
329 .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA, 416 .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA,
417 .gpio_cd = -EINVAL,
330 .gpio_wp = -EINVAL, 418 .gpio_wp = -EINVAL,
331 }, 419 },
420 {
421 .mmc = 5,
422 .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_POWER_OFF_CARD,
423 .gpio_cd = -EINVAL,
424 .gpio_wp = -EINVAL,
425 .ocr_mask = MMC_VDD_165_195,
426 .nonremovable = true,
427 },
332 {} /* Terminator */ 428 {} /* Terminator */
333}; 429};
334 430
335static struct regulator_consumer_supply sdp4430_vaux_supply[] = { 431static struct regulator_consumer_supply sdp4430_vaux_supply[] = {
336 { 432 REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"),
337 .supply = "vmmc", 433};
338 .dev_name = "omap_hsmmc.1", 434
435static struct regulator_consumer_supply omap4_sdp4430_vmmc5_supply = {
436 .supply = "vmmc",
437 .dev_name = "omap_hsmmc.4",
438};
439
440static struct regulator_init_data sdp4430_vmmc5 = {
441 .constraints = {
442 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
339 }, 443 },
444 .num_consumer_supplies = 1,
445 .consumer_supplies = &omap4_sdp4430_vmmc5_supply,
340}; 446};
341static struct regulator_consumer_supply sdp4430_vmmc_supply[] = { 447
342 { 448static struct fixed_voltage_config sdp4430_vwlan = {
343 .supply = "vmmc", 449 .supply_name = "vwl1271",
344 .dev_name = "omap_hsmmc.0", 450 .microvolts = 1800000, /* 1.8V */
451 .gpio = GPIO_WIFI_PMENA,
452 .startup_delay = 70000, /* 70msec */
453 .enable_high = 1,
454 .enabled_at_boot = 0,
455 .init_data = &sdp4430_vmmc5,
456};
457
458static struct platform_device omap_vwlan_device = {
459 .name = "reg-fixed-voltage",
460 .id = 1,
461 .dev = {
462 .platform_data = &sdp4430_vwlan,
345 }, 463 },
346}; 464};
347 465
@@ -399,65 +517,10 @@ static struct regulator_init_data sdp4430_vaux1 = {
399 | REGULATOR_CHANGE_MODE 517 | REGULATOR_CHANGE_MODE
400 | REGULATOR_CHANGE_STATUS, 518 | REGULATOR_CHANGE_STATUS,
401 }, 519 },
402 .num_consumer_supplies = 1, 520 .num_consumer_supplies = ARRAY_SIZE(sdp4430_vaux_supply),
403 .consumer_supplies = sdp4430_vaux_supply, 521 .consumer_supplies = sdp4430_vaux_supply,
404}; 522};
405 523
406static struct regulator_init_data sdp4430_vaux2 = {
407 .constraints = {
408 .min_uV = 1200000,
409 .max_uV = 2800000,
410 .apply_uV = true,
411 .valid_modes_mask = REGULATOR_MODE_NORMAL
412 | REGULATOR_MODE_STANDBY,
413 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
414 | REGULATOR_CHANGE_MODE
415 | REGULATOR_CHANGE_STATUS,
416 },
417};
418
419static struct regulator_init_data sdp4430_vaux3 = {
420 .constraints = {
421 .min_uV = 1000000,
422 .max_uV = 3000000,
423 .apply_uV = true,
424 .valid_modes_mask = REGULATOR_MODE_NORMAL
425 | REGULATOR_MODE_STANDBY,
426 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
427 | REGULATOR_CHANGE_MODE
428 | REGULATOR_CHANGE_STATUS,
429 },
430};
431
432/* VMMC1 for MMC1 card */
433static struct regulator_init_data sdp4430_vmmc = {
434 .constraints = {
435 .min_uV = 1200000,
436 .max_uV = 3000000,
437 .apply_uV = true,
438 .valid_modes_mask = REGULATOR_MODE_NORMAL
439 | REGULATOR_MODE_STANDBY,
440 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
441 | REGULATOR_CHANGE_MODE
442 | REGULATOR_CHANGE_STATUS,
443 },
444 .num_consumer_supplies = 1,
445 .consumer_supplies = sdp4430_vmmc_supply,
446};
447
448static struct regulator_init_data sdp4430_vpp = {
449 .constraints = {
450 .min_uV = 1800000,
451 .max_uV = 2500000,
452 .apply_uV = true,
453 .valid_modes_mask = REGULATOR_MODE_NORMAL
454 | REGULATOR_MODE_STANDBY,
455 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
456 | REGULATOR_CHANGE_MODE
457 | REGULATOR_CHANGE_STATUS,
458 },
459};
460
461static struct regulator_init_data sdp4430_vusim = { 524static struct regulator_init_data sdp4430_vusim = {
462 .constraints = { 525 .constraints = {
463 .min_uV = 1200000, 526 .min_uV = 1200000,
@@ -471,74 +534,36 @@ static struct regulator_init_data sdp4430_vusim = {
471 }, 534 },
472}; 535};
473 536
474static struct regulator_init_data sdp4430_vana = { 537static struct twl4030_codec_data twl6040_codec = {
475 .constraints = { 538 /* single-step ramp for headset and handsfree */
476 .min_uV = 2100000, 539 .hs_left_step = 0x0f,
477 .max_uV = 2100000, 540 .hs_right_step = 0x0f,
478 .valid_modes_mask = REGULATOR_MODE_NORMAL 541 .hf_left_step = 0x1d,
479 | REGULATOR_MODE_STANDBY, 542 .hf_right_step = 0x1d,
480 .valid_ops_mask = REGULATOR_CHANGE_MODE
481 | REGULATOR_CHANGE_STATUS,
482 },
483};
484
485static struct regulator_init_data sdp4430_vcxio = {
486 .constraints = {
487 .min_uV = 1800000,
488 .max_uV = 1800000,
489 .valid_modes_mask = REGULATOR_MODE_NORMAL
490 | REGULATOR_MODE_STANDBY,
491 .valid_ops_mask = REGULATOR_CHANGE_MODE
492 | REGULATOR_CHANGE_STATUS,
493 },
494}; 543};
495 544
496static struct regulator_init_data sdp4430_vdac = { 545static struct twl4030_vibra_data twl6040_vibra = {
497 .constraints = { 546 .vibldrv_res = 8,
498 .min_uV = 1800000, 547 .vibrdrv_res = 3,
499 .max_uV = 1800000, 548 .viblmotor_res = 10,
500 .valid_modes_mask = REGULATOR_MODE_NORMAL 549 .vibrmotor_res = 10,
501 | REGULATOR_MODE_STANDBY, 550 .vddvibl_uV = 0, /* fixed volt supply - VBAT */
502 .valid_ops_mask = REGULATOR_CHANGE_MODE 551 .vddvibr_uV = 0, /* fixed volt supply - VBAT */
503 | REGULATOR_CHANGE_STATUS,
504 },
505}; 552};
506 553
507static struct regulator_init_data sdp4430_vusb = { 554static struct twl4030_audio_data twl6040_audio = {
508 .constraints = { 555 .codec = &twl6040_codec,
509 .min_uV = 3300000, 556 .vibra = &twl6040_vibra,
510 .max_uV = 3300000, 557 .audpwron_gpio = 127,
511 .apply_uV = true, 558 .naudint_irq = OMAP44XX_IRQ_SYS_2N,
512 .valid_modes_mask = REGULATOR_MODE_NORMAL 559 .irq_base = TWL6040_CODEC_IRQ_BASE,
513 | REGULATOR_MODE_STANDBY,
514 .valid_ops_mask = REGULATOR_CHANGE_MODE
515 | REGULATOR_CHANGE_STATUS,
516 },
517};
518
519static struct regulator_init_data sdp4430_clk32kg = {
520 .constraints = {
521 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
522 },
523}; 560};
524 561
525static struct twl4030_platform_data sdp4430_twldata = { 562static struct twl4030_platform_data sdp4430_twldata = {
526 .irq_base = TWL6030_IRQ_BASE, 563 .audio = &twl6040_audio,
527 .irq_end = TWL6030_IRQ_END,
528
529 /* Regulators */ 564 /* Regulators */
530 .vmmc = &sdp4430_vmmc,
531 .vpp = &sdp4430_vpp,
532 .vusim = &sdp4430_vusim, 565 .vusim = &sdp4430_vusim,
533 .vana = &sdp4430_vana,
534 .vcxio = &sdp4430_vcxio,
535 .vdac = &sdp4430_vdac,
536 .vusb = &sdp4430_vusb,
537 .vaux1 = &sdp4430_vaux1, 566 .vaux1 = &sdp4430_vaux1,
538 .vaux2 = &sdp4430_vaux2,
539 .vaux3 = &sdp4430_vaux3,
540 .clk32kg = &sdp4430_clk32kg,
541 .usb = &omap4_usbphy_data
542}; 567};
543 568
544static struct i2c_board_info __initdata sdp4430_i2c_3_boardinfo[] = { 569static struct i2c_board_info __initdata sdp4430_i2c_3_boardinfo[] = {
@@ -556,6 +581,16 @@ static struct i2c_board_info __initdata sdp4430_i2c_4_boardinfo[] = {
556}; 581};
557static int __init omap4_i2c_init(void) 582static int __init omap4_i2c_init(void)
558{ 583{
584 omap4_pmic_get_config(&sdp4430_twldata, TWL_COMMON_PDATA_USB,
585 TWL_COMMON_REGULATOR_VDAC |
586 TWL_COMMON_REGULATOR_VAUX2 |
587 TWL_COMMON_REGULATOR_VAUX3 |
588 TWL_COMMON_REGULATOR_VMMC |
589 TWL_COMMON_REGULATOR_VPP |
590 TWL_COMMON_REGULATOR_VANA |
591 TWL_COMMON_REGULATOR_VCXIO |
592 TWL_COMMON_REGULATOR_VUSB |
593 TWL_COMMON_REGULATOR_CLK32KG);
559 omap4_pmic_init("twl6030", &sdp4430_twldata); 594 omap4_pmic_init("twl6030", &sdp4430_twldata);
560 omap_register_i2c_bus(2, 400, NULL, 0); 595 omap_register_i2c_bus(2, 400, NULL, 0);
561 omap_register_i2c_bus(3, 400, sdp4430_i2c_3_boardinfo, 596 omap_register_i2c_bus(3, 400, sdp4430_i2c_3_boardinfo,
@@ -723,6 +758,41 @@ static inline void board_serial_init(void)
723} 758}
724 #endif 759 #endif
725 760
761static void omap4_sdp4430_wifi_mux_init(void)
762{
763 omap_mux_init_gpio(GPIO_WIFI_IRQ, OMAP_PIN_INPUT |
764 OMAP_PIN_OFF_WAKEUPENABLE);
765 omap_mux_init_gpio(GPIO_WIFI_PMENA, OMAP_PIN_OUTPUT);
766
767 omap_mux_init_signal("sdmmc5_cmd.sdmmc5_cmd",
768 OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP);
769 omap_mux_init_signal("sdmmc5_clk.sdmmc5_clk",
770 OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP);
771 omap_mux_init_signal("sdmmc5_dat0.sdmmc5_dat0",
772 OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP);
773 omap_mux_init_signal("sdmmc5_dat1.sdmmc5_dat1",
774 OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP);
775 omap_mux_init_signal("sdmmc5_dat2.sdmmc5_dat2",
776 OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP);
777 omap_mux_init_signal("sdmmc5_dat3.sdmmc5_dat3",
778 OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP);
779
780}
781
782static struct wl12xx_platform_data omap4_sdp4430_wlan_data __initdata = {
783 .irq = OMAP_GPIO_IRQ(GPIO_WIFI_IRQ),
784 .board_ref_clock = WL12XX_REFCLOCK_26,
785 .board_tcxo_clock = WL12XX_TCXOCLOCK_26,
786};
787
788static void omap4_sdp4430_wifi_init(void)
789{
790 omap4_sdp4430_wifi_mux_init();
791 if (wl12xx_set_platform_data(&omap4_sdp4430_wlan_data))
792 pr_err("Error setting wl12xx data\n");
793 platform_device_register(&omap_vwlan_device);
794}
795
726static void __init omap_4430sdp_init(void) 796static void __init omap_4430sdp_init(void)
727{ 797{
728 int status; 798 int status;
@@ -739,6 +809,7 @@ static void __init omap_4430sdp_init(void)
739 omap_sfh7741prox_init(); 809 omap_sfh7741prox_init();
740 platform_add_devices(sdp4430_devices, ARRAY_SIZE(sdp4430_devices)); 810 platform_add_devices(sdp4430_devices, ARRAY_SIZE(sdp4430_devices));
741 board_serial_init(); 811 board_serial_init();
812 omap4_sdp4430_wifi_init();
742 omap4_twl6030_hsmmc_init(mmc); 813 omap4_twl6030_hsmmc_init(mmc);
743 814
744 usb_musb_init(&musb_board_data); 815 usb_musb_init(&musb_board_data);
@@ -752,7 +823,7 @@ static void __init omap_4430sdp_init(void)
752 ARRAY_SIZE(sdp4430_spi_board_info)); 823 ARRAY_SIZE(sdp4430_spi_board_info));
753 } 824 }
754 825
755 status = omap4_keyboard_init(&sdp4430_keypad_data); 826 status = omap4_keyboard_init(&sdp4430_keypad_data, &keypad_data);
756 if (status) 827 if (status)
757 pr_err("Keypad initialization failed: %d\n", status); 828 pr_err("Keypad initialization failed: %d\n", status);
758 829
@@ -773,5 +844,5 @@ MACHINE_START(OMAP_4430SDP, "OMAP4430 4430SDP board")
773 .init_early = omap_4430sdp_init_early, 844 .init_early = omap_4430sdp_init_early,
774 .init_irq = gic_init_irq, 845 .init_irq = gic_init_irq,
775 .init_machine = omap_4430sdp_init, 846 .init_machine = omap_4430sdp_init,
776 .timer = &omap_timer, 847 .timer = &omap4_timer,
777MACHINE_END 848MACHINE_END
diff --git a/arch/arm/mach-omap2/board-am3517crane.c b/arch/arm/mach-omap2/board-am3517crane.c
index 5e438a77cd7..5f2b55ff04f 100644
--- a/arch/arm/mach-omap2/board-am3517crane.c
+++ b/arch/arm/mach-omap2/board-am3517crane.c
@@ -104,7 +104,7 @@ MACHINE_START(CRANEBOARD, "AM3517/05 CRANEBOARD")
104 .reserve = omap_reserve, 104 .reserve = omap_reserve,
105 .map_io = omap3_map_io, 105 .map_io = omap3_map_io,
106 .init_early = am3517_crane_init_early, 106 .init_early = am3517_crane_init_early,
107 .init_irq = omap_init_irq, 107 .init_irq = omap3_init_irq,
108 .init_machine = am3517_crane_init, 108 .init_machine = am3517_crane_init,
109 .timer = &omap_timer, 109 .timer = &omap3_timer,
110MACHINE_END 110MACHINE_END
diff --git a/arch/arm/mach-omap2/board-am3517evm.c b/arch/arm/mach-omap2/board-am3517evm.c
index 63af4171c04..f3006c30415 100644
--- a/arch/arm/mach-omap2/board-am3517evm.c
+++ b/arch/arm/mach-omap2/board-am3517evm.c
@@ -494,7 +494,7 @@ MACHINE_START(OMAP3517EVM, "OMAP3517/AM3517 EVM")
494 .reserve = omap_reserve, 494 .reserve = omap_reserve,
495 .map_io = omap3_map_io, 495 .map_io = omap3_map_io,
496 .init_early = am3517_evm_init_early, 496 .init_early = am3517_evm_init_early,
497 .init_irq = omap_init_irq, 497 .init_irq = omap3_init_irq,
498 .init_machine = am3517_evm_init, 498 .init_machine = am3517_evm_init,
499 .timer = &omap_timer, 499 .timer = &omap3_timer,
500MACHINE_END 500MACHINE_END
diff --git a/arch/arm/mach-omap2/board-apollon.c b/arch/arm/mach-omap2/board-apollon.c
index b124bdfb423..70211703ff9 100644
--- a/arch/arm/mach-omap2/board-apollon.c
+++ b/arch/arm/mach-omap2/board-apollon.c
@@ -354,7 +354,7 @@ MACHINE_START(OMAP_APOLLON, "OMAP24xx Apollon")
354 .reserve = omap_reserve, 354 .reserve = omap_reserve,
355 .map_io = omap_apollon_map_io, 355 .map_io = omap_apollon_map_io,
356 .init_early = omap_apollon_init_early, 356 .init_early = omap_apollon_init_early,
357 .init_irq = omap_init_irq, 357 .init_irq = omap2_init_irq,
358 .init_machine = omap_apollon_init, 358 .init_machine = omap_apollon_init,
359 .timer = &omap_timer, 359 .timer = &omap2_timer,
360MACHINE_END 360MACHINE_END
diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c
index 77456dec93e..3af8aab435b 100644
--- a/arch/arm/mach-omap2/board-cm-t35.c
+++ b/arch/arm/mach-omap2/board-cm-t35.c
@@ -1,8 +1,9 @@
1/* 1/*
2 * board-cm-t35.c (CompuLab CM-T35 module) 2 * CompuLab CM-T35/CM-T3730 modules support
3 * 3 *
4 * Copyright (C) 2009 CompuLab, Ltd. 4 * Copyright (C) 2009-2011 CompuLab, Ltd.
5 * Author: Mike Rapoport <mike@compulab.co.il> 5 * Authors: Mike Rapoport <mike@compulab.co.il>
6 * Igor Grinberg <grinberg@compulab.co.il>
6 * 7 *
7 * This program is free software; you can redistribute it and/or 8 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License 9 * modify it under the terms of the GNU General Public License
@@ -13,11 +14,6 @@
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details. 15 * General Public License for more details.
15 * 16 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
19 * 02110-1301 USA
20 *
21 */ 17 */
22 18
23#include <linux/kernel.h> 19#include <linux/kernel.h>
@@ -149,12 +145,12 @@ static struct mtd_partition cm_t35_nand_partitions[] = {
149 }, 145 },
150 { 146 {
151 .name = "linux", 147 .name = "linux",
152 .offset = MTDPART_OFS_APPEND, /* Offset = 0x280000 */ 148 .offset = MTDPART_OFS_APPEND, /* Offset = 0x2A0000 */
153 .size = 32 * NAND_BLOCK_SIZE, 149 .size = 32 * NAND_BLOCK_SIZE,
154 }, 150 },
155 { 151 {
156 .name = "rootfs", 152 .name = "rootfs",
157 .offset = MTDPART_OFS_APPEND, /* Offset = 0x680000 */ 153 .offset = MTDPART_OFS_APPEND, /* Offset = 0x6A0000 */
158 .size = MTDPART_SIZ_FULL, 154 .size = MTDPART_SIZ_FULL,
159 }, 155 },
160}; 156};
@@ -162,9 +158,7 @@ static struct mtd_partition cm_t35_nand_partitions[] = {
162static struct omap_nand_platform_data cm_t35_nand_data = { 158static struct omap_nand_platform_data cm_t35_nand_data = {
163 .parts = cm_t35_nand_partitions, 159 .parts = cm_t35_nand_partitions,
164 .nr_parts = ARRAY_SIZE(cm_t35_nand_partitions), 160 .nr_parts = ARRAY_SIZE(cm_t35_nand_partitions),
165 .dma_channel = -1, /* disable DMA in OMAP NAND driver */
166 .cs = 0, 161 .cs = 0,
167
168}; 162};
169 163
170static void __init cm_t35_init_nand(void) 164static void __init cm_t35_init_nand(void)
@@ -337,19 +331,17 @@ static void __init cm_t35_init_display(void)
337 } 331 }
338} 332}
339 333
340static struct regulator_consumer_supply cm_t35_vmmc1_supply = { 334static struct regulator_consumer_supply cm_t35_vmmc1_supply[] = {
341 .supply = "vmmc", 335 REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
342}; 336};
343 337
344static struct regulator_consumer_supply cm_t35_vsim_supply = { 338static struct regulator_consumer_supply cm_t35_vsim_supply[] = {
345 .supply = "vmmc_aux", 339 REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.0"),
346}; 340};
347 341
348static struct regulator_consumer_supply cm_t35_vdac_supply = 342static struct regulator_consumer_supply cm_t35_vdvi_supply[] = {
349 REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"); 343 REGULATOR_SUPPLY("vdvi", "omapdss"),
350 344};
351static struct regulator_consumer_supply cm_t35_vdvi_supply =
352 REGULATOR_SUPPLY("vdvi", "omapdss");
353 345
354/* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */ 346/* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */
355static struct regulator_init_data cm_t35_vmmc1 = { 347static struct regulator_init_data cm_t35_vmmc1 = {
@@ -362,8 +354,8 @@ static struct regulator_init_data cm_t35_vmmc1 = {
362 | REGULATOR_CHANGE_MODE 354 | REGULATOR_CHANGE_MODE
363 | REGULATOR_CHANGE_STATUS, 355 | REGULATOR_CHANGE_STATUS,
364 }, 356 },
365 .num_consumer_supplies = 1, 357 .num_consumer_supplies = ARRAY_SIZE(cm_t35_vmmc1_supply),
366 .consumer_supplies = &cm_t35_vmmc1_supply, 358 .consumer_supplies = cm_t35_vmmc1_supply,
367}; 359};
368 360
369/* VSIM for MMC1 pins DAT4..DAT7 (2 mA, plus card == max 50 mA) */ 361/* VSIM for MMC1 pins DAT4..DAT7 (2 mA, plus card == max 50 mA) */
@@ -377,41 +369,8 @@ static struct regulator_init_data cm_t35_vsim = {
377 | REGULATOR_CHANGE_MODE 369 | REGULATOR_CHANGE_MODE
378 | REGULATOR_CHANGE_STATUS, 370 | REGULATOR_CHANGE_STATUS,
379 }, 371 },
380 .num_consumer_supplies = 1, 372 .num_consumer_supplies = ARRAY_SIZE(cm_t35_vsim_supply),
381 .consumer_supplies = &cm_t35_vsim_supply, 373 .consumer_supplies = cm_t35_vsim_supply,
382};
383
384/* VDAC for DSS driving S-Video (8 mA unloaded, max 65 mA) */
385static struct regulator_init_data cm_t35_vdac = {
386 .constraints = {
387 .min_uV = 1800000,
388 .max_uV = 1800000,
389 .valid_modes_mask = REGULATOR_MODE_NORMAL
390 | REGULATOR_MODE_STANDBY,
391 .valid_ops_mask = REGULATOR_CHANGE_MODE
392 | REGULATOR_CHANGE_STATUS,
393 },
394 .num_consumer_supplies = 1,
395 .consumer_supplies = &cm_t35_vdac_supply,
396};
397
398/* VPLL2 for digital video outputs */
399static struct regulator_init_data cm_t35_vpll2 = {
400 .constraints = {
401 .name = "VDVI",
402 .min_uV = 1800000,
403 .max_uV = 1800000,
404 .valid_modes_mask = REGULATOR_MODE_NORMAL
405 | REGULATOR_MODE_STANDBY,
406 .valid_ops_mask = REGULATOR_CHANGE_MODE
407 | REGULATOR_CHANGE_STATUS,
408 },
409 .num_consumer_supplies = 1,
410 .consumer_supplies = &cm_t35_vdvi_supply,
411};
412
413static struct twl4030_usb_data cm_t35_usb_data = {
414 .usb_mode = T2_USB_MODE_ULPI,
415}; 374};
416 375
417static uint32_t cm_t35_keymap[] = { 376static uint32_t cm_t35_keymap[] = {
@@ -470,9 +429,9 @@ static int cm_t35_twl_gpio_setup(struct device *dev, unsigned gpio,
470 if (gpio_request_one(wlan_rst, GPIOF_OUT_INIT_HIGH, "WLAN RST") == 0) { 429 if (gpio_request_one(wlan_rst, GPIOF_OUT_INIT_HIGH, "WLAN RST") == 0) {
471 gpio_export(wlan_rst, 0); 430 gpio_export(wlan_rst, 0);
472 udelay(10); 431 udelay(10);
473 gpio_set_value(wlan_rst, 0); 432 gpio_set_value_cansleep(wlan_rst, 0);
474 udelay(10); 433 udelay(10);
475 gpio_set_value(wlan_rst, 1); 434 gpio_set_value_cansleep(wlan_rst, 1);
476 } else { 435 } else {
477 pr_err("CM-T35: could not obtain gpio for WiFi reset\n"); 436 pr_err("CM-T35: could not obtain gpio for WiFi reset\n");
478 } 437 }
@@ -481,10 +440,6 @@ static int cm_t35_twl_gpio_setup(struct device *dev, unsigned gpio,
481 mmc[0].gpio_cd = gpio + 0; 440 mmc[0].gpio_cd = gpio + 0;
482 omap2_hsmmc_init(mmc); 441 omap2_hsmmc_init(mmc);
483 442
484 /* link regulators to MMC adapters */
485 cm_t35_vmmc1_supply.dev = mmc[0].dev;
486 cm_t35_vsim_supply.dev = mmc[0].dev;
487
488 return 0; 443 return 0;
489} 444}
490 445
@@ -496,21 +451,23 @@ static struct twl4030_gpio_platform_data cm_t35_gpio_data = {
496}; 451};
497 452
498static struct twl4030_platform_data cm_t35_twldata = { 453static struct twl4030_platform_data cm_t35_twldata = {
499 .irq_base = TWL4030_IRQ_BASE,
500 .irq_end = TWL4030_IRQ_END,
501
502 /* platform_data for children goes here */ 454 /* platform_data for children goes here */
503 .keypad = &cm_t35_kp_data, 455 .keypad = &cm_t35_kp_data,
504 .usb = &cm_t35_usb_data,
505 .gpio = &cm_t35_gpio_data, 456 .gpio = &cm_t35_gpio_data,
506 .vmmc1 = &cm_t35_vmmc1, 457 .vmmc1 = &cm_t35_vmmc1,
507 .vsim = &cm_t35_vsim, 458 .vsim = &cm_t35_vsim,
508 .vdac = &cm_t35_vdac,
509 .vpll2 = &cm_t35_vpll2,
510}; 459};
511 460
512static void __init cm_t35_init_i2c(void) 461static void __init cm_t35_init_i2c(void)
513{ 462{
463 omap3_pmic_get_config(&cm_t35_twldata, TWL_COMMON_PDATA_USB,
464 TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2);
465
466 cm_t35_twldata.vpll2->constraints.name = "VDVI";
467 cm_t35_twldata.vpll2->num_consumer_supplies =
468 ARRAY_SIZE(cm_t35_vdvi_supply);
469 cm_t35_twldata.vpll2->consumer_supplies = cm_t35_vdvi_supply;
470
514 omap3_pmic_init("tps65930", &cm_t35_twldata); 471 omap3_pmic_init("tps65930", &cm_t35_twldata);
515} 472}
516 473
@@ -578,17 +535,11 @@ static struct omap_board_mux board_mux[] __initdata = {
578 OMAP3_MUX(UART1_TX, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), 535 OMAP3_MUX(UART1_TX, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
579 OMAP3_MUX(UART1_RX, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), 536 OMAP3_MUX(UART1_RX, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
580 537
581 /* DSS */ 538 /* common DSS */
582 OMAP3_MUX(DSS_PCLK, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), 539 OMAP3_MUX(DSS_PCLK, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
583 OMAP3_MUX(DSS_HSYNC, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), 540 OMAP3_MUX(DSS_HSYNC, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
584 OMAP3_MUX(DSS_VSYNC, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), 541 OMAP3_MUX(DSS_VSYNC, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
585 OMAP3_MUX(DSS_ACBIAS, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), 542 OMAP3_MUX(DSS_ACBIAS, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
586 OMAP3_MUX(DSS_DATA0, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
587 OMAP3_MUX(DSS_DATA1, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
588 OMAP3_MUX(DSS_DATA2, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
589 OMAP3_MUX(DSS_DATA3, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
590 OMAP3_MUX(DSS_DATA4, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
591 OMAP3_MUX(DSS_DATA5, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
592 OMAP3_MUX(DSS_DATA6, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), 543 OMAP3_MUX(DSS_DATA6, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
593 OMAP3_MUX(DSS_DATA7, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), 544 OMAP3_MUX(DSS_DATA7, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
594 OMAP3_MUX(DSS_DATA8, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), 545 OMAP3_MUX(DSS_DATA8, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
@@ -601,12 +552,6 @@ static struct omap_board_mux board_mux[] __initdata = {
601 OMAP3_MUX(DSS_DATA15, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), 552 OMAP3_MUX(DSS_DATA15, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
602 OMAP3_MUX(DSS_DATA16, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), 553 OMAP3_MUX(DSS_DATA16, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
603 OMAP3_MUX(DSS_DATA17, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), 554 OMAP3_MUX(DSS_DATA17, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
604 OMAP3_MUX(DSS_DATA18, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
605 OMAP3_MUX(DSS_DATA19, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
606 OMAP3_MUX(DSS_DATA20, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
607 OMAP3_MUX(DSS_DATA21, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
608 OMAP3_MUX(DSS_DATA22, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
609 OMAP3_MUX(DSS_DATA23, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
610 555
611 /* display controls */ 556 /* display controls */
612 OMAP3_MUX(MCBSP1_FSR, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT), 557 OMAP3_MUX(MCBSP1_FSR, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT),
@@ -619,19 +564,53 @@ static struct omap_board_mux board_mux[] __initdata = {
619 564
620 { .reg_offset = OMAP_MUX_TERMINATOR }, 565 { .reg_offset = OMAP_MUX_TERMINATOR },
621}; 566};
567
568static void __init cm_t3x_common_dss_mux_init(int mux_mode)
569{
570 omap_mux_init_signal("dss_data18", mux_mode);
571 omap_mux_init_signal("dss_data19", mux_mode);
572 omap_mux_init_signal("dss_data20", mux_mode);
573 omap_mux_init_signal("dss_data21", mux_mode);
574 omap_mux_init_signal("dss_data22", mux_mode);
575 omap_mux_init_signal("dss_data23", mux_mode);
576}
577
578static void __init cm_t35_init_mux(void)
579{
580 omap_mux_init_signal("gpio_70", OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT);
581 omap_mux_init_signal("gpio_71", OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT);
582 omap_mux_init_signal("gpio_72", OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT);
583 omap_mux_init_signal("gpio_73", OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT);
584 omap_mux_init_signal("gpio_74", OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT);
585 omap_mux_init_signal("gpio_75", OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT);
586 cm_t3x_common_dss_mux_init(OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT);
587}
588
589static void __init cm_t3730_init_mux(void)
590{
591 omap_mux_init_signal("sys_boot0", OMAP_MUX_MODE3 | OMAP_PIN_OUTPUT);
592 omap_mux_init_signal("sys_boot1", OMAP_MUX_MODE3 | OMAP_PIN_OUTPUT);
593 omap_mux_init_signal("sys_boot3", OMAP_MUX_MODE3 | OMAP_PIN_OUTPUT);
594 omap_mux_init_signal("sys_boot4", OMAP_MUX_MODE3 | OMAP_PIN_OUTPUT);
595 omap_mux_init_signal("sys_boot5", OMAP_MUX_MODE3 | OMAP_PIN_OUTPUT);
596 omap_mux_init_signal("sys_boot6", OMAP_MUX_MODE3 | OMAP_PIN_OUTPUT);
597 cm_t3x_common_dss_mux_init(OMAP_MUX_MODE3 | OMAP_PIN_OUTPUT);
598}
599#else
600static inline void cm_t35_init_mux(void) {}
601static inline void cm_t3730_init_mux(void) {}
622#endif 602#endif
623 603
624static struct omap_board_config_kernel cm_t35_config[] __initdata = { 604static struct omap_board_config_kernel cm_t35_config[] __initdata = {
625}; 605};
626 606
627static void __init cm_t35_init(void) 607static void __init cm_t3x_common_init(void)
628{ 608{
629 omap_board_config = cm_t35_config; 609 omap_board_config = cm_t35_config;
630 omap_board_config_size = ARRAY_SIZE(cm_t35_config); 610 omap_board_config_size = ARRAY_SIZE(cm_t35_config);
631 omap3_mux_init(board_mux, OMAP_PACKAGE_CUS); 611 omap3_mux_init(board_mux, OMAP_PACKAGE_CUS);
632 omap_serial_init(); 612 omap_serial_init();
633 cm_t35_init_i2c(); 613 cm_t35_init_i2c();
634 cm_t35_init_nand();
635 omap_ads7846_init(1, CM_T35_GPIO_PENDOWN, 0, NULL); 614 omap_ads7846_init(1, CM_T35_GPIO_PENDOWN, 0, NULL);
636 cm_t35_init_ethernet(); 615 cm_t35_init_ethernet();
637 cm_t35_init_led(); 616 cm_t35_init_led();
@@ -641,12 +620,35 @@ static void __init cm_t35_init(void)
641 usbhs_init(&usbhs_bdata); 620 usbhs_init(&usbhs_bdata);
642} 621}
643 622
623static void __init cm_t35_init(void)
624{
625 cm_t3x_common_init();
626 cm_t35_init_mux();
627 cm_t35_init_nand();
628}
629
630static void __init cm_t3730_init(void)
631{
632 cm_t3x_common_init();
633 cm_t3730_init_mux();
634}
635
644MACHINE_START(CM_T35, "Compulab CM-T35") 636MACHINE_START(CM_T35, "Compulab CM-T35")
645 .boot_params = 0x80000100, 637 .boot_params = 0x80000100,
646 .reserve = omap_reserve, 638 .reserve = omap_reserve,
647 .map_io = omap3_map_io, 639 .map_io = omap3_map_io,
648 .init_early = cm_t35_init_early, 640 .init_early = cm_t35_init_early,
649 .init_irq = omap_init_irq, 641 .init_irq = omap3_init_irq,
650 .init_machine = cm_t35_init, 642 .init_machine = cm_t35_init,
651 .timer = &omap_timer, 643 .timer = &omap3_timer,
644MACHINE_END
645
646MACHINE_START(CM_T3730, "Compulab CM-T3730")
647 .boot_params = 0x80000100,
648 .reserve = omap_reserve,
649 .map_io = omap3_map_io,
650 .init_early = cm_t35_init_early,
651 .init_irq = omap3_init_irq,
652 .init_machine = cm_t3730_init,
653 .timer = &omap3_timer,
652MACHINE_END 654MACHINE_END
diff --git a/arch/arm/mach-omap2/board-cm-t3517.c b/arch/arm/mach-omap2/board-cm-t3517.c
index c3a9fd35034..05c72f4c1b5 100644
--- a/arch/arm/mach-omap2/board-cm-t3517.c
+++ b/arch/arm/mach-omap2/board-cm-t3517.c
@@ -236,7 +236,6 @@ static struct mtd_partition cm_t3517_nand_partitions[] = {
236static struct omap_nand_platform_data cm_t3517_nand_data = { 236static struct omap_nand_platform_data cm_t3517_nand_data = {
237 .parts = cm_t3517_nand_partitions, 237 .parts = cm_t3517_nand_partitions,
238 .nr_parts = ARRAY_SIZE(cm_t3517_nand_partitions), 238 .nr_parts = ARRAY_SIZE(cm_t3517_nand_partitions),
239 .dma_channel = -1, /* disable DMA in OMAP NAND driver */
240 .cs = 0, 239 .cs = 0,
241}; 240};
242 241
@@ -304,7 +303,7 @@ MACHINE_START(CM_T3517, "Compulab CM-T3517")
304 .reserve = omap_reserve, 303 .reserve = omap_reserve,
305 .map_io = omap3_map_io, 304 .map_io = omap3_map_io,
306 .init_early = cm_t3517_init_early, 305 .init_early = cm_t3517_init_early,
307 .init_irq = omap_init_irq, 306 .init_irq = omap3_init_irq,
308 .init_machine = cm_t3517_init, 307 .init_machine = cm_t3517_init,
309 .timer = &omap_timer, 308 .timer = &omap3_timer,
310MACHINE_END 309MACHINE_END
diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c
index 34956ec8329..b6002ec31c6 100644
--- a/arch/arm/mach-omap2/board-devkit8000.c
+++ b/arch/arm/mach-omap2/board-devkit8000.c
@@ -58,7 +58,6 @@
58 58
59#include "mux.h" 59#include "mux.h"
60#include "hsmmc.h" 60#include "hsmmc.h"
61#include "timer-gp.h"
62#include "common-board-devices.h" 61#include "common-board-devices.h"
63 62
64#define OMAP_DM9000_GPIO_IRQ 25 63#define OMAP_DM9000_GPIO_IRQ 25
@@ -130,13 +129,14 @@ static void devkit8000_panel_disable_dvi(struct omap_dss_device *dssdev)
130 gpio_set_value_cansleep(dssdev->reset_gpio, 0); 129 gpio_set_value_cansleep(dssdev->reset_gpio, 0);
131} 130}
132 131
133static struct regulator_consumer_supply devkit8000_vmmc1_supply = 132static struct regulator_consumer_supply devkit8000_vmmc1_supply[] = {
134 REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"); 133 REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
135 134};
136 135
137/* ads7846 on SPI */ 136/* ads7846 on SPI */
138static struct regulator_consumer_supply devkit8000_vio_supply = 137static struct regulator_consumer_supply devkit8000_vio_supply[] = {
139 REGULATOR_SUPPLY("vcc", "spi2.0"); 138 REGULATOR_SUPPLY("vcc", "spi2.0"),
139};
140 140
141static struct panel_generic_dpi_data lcd_panel = { 141static struct panel_generic_dpi_data lcd_panel = {
142 .name = "generic", 142 .name = "generic",
@@ -186,9 +186,6 @@ static struct omap_dss_board_info devkit8000_dss_data = {
186 .default_device = &devkit8000_lcd_device, 186 .default_device = &devkit8000_lcd_device,
187}; 187};
188 188
189static struct regulator_consumer_supply devkit8000_vdda_dac_supply =
190 REGULATOR_SUPPLY("vdda_dac", "omapdss_venc");
191
192static uint32_t board_keymap[] = { 189static uint32_t board_keymap[] = {
193 KEY(0, 0, KEY_1), 190 KEY(0, 0, KEY_1),
194 KEY(1, 0, KEY_2), 191 KEY(1, 0, KEY_2),
@@ -284,22 +281,8 @@ static struct regulator_init_data devkit8000_vmmc1 = {
284 | REGULATOR_CHANGE_MODE 281 | REGULATOR_CHANGE_MODE
285 | REGULATOR_CHANGE_STATUS, 282 | REGULATOR_CHANGE_STATUS,
286 }, 283 },
287 .num_consumer_supplies = 1, 284 .num_consumer_supplies = ARRAY_SIZE(devkit8000_vmmc1_supply),
288 .consumer_supplies = &devkit8000_vmmc1_supply, 285 .consumer_supplies = devkit8000_vmmc1_supply,
289};
290
291/* VDAC for DSS driving S-Video (8 mA unloaded, max 65 mA) */
292static struct regulator_init_data devkit8000_vdac = {
293 .constraints = {
294 .min_uV = 1800000,
295 .max_uV = 1800000,
296 .valid_modes_mask = REGULATOR_MODE_NORMAL
297 | REGULATOR_MODE_STANDBY,
298 .valid_ops_mask = REGULATOR_CHANGE_MODE
299 | REGULATOR_CHANGE_STATUS,
300 },
301 .num_consumer_supplies = 1,
302 .consumer_supplies = &devkit8000_vdda_dac_supply,
303}; 286};
304 287
305/* VPLL1 for digital video outputs */ 288/* VPLL1 for digital video outputs */
@@ -327,31 +310,14 @@ static struct regulator_init_data devkit8000_vio = {
327 .valid_ops_mask = REGULATOR_CHANGE_MODE 310 .valid_ops_mask = REGULATOR_CHANGE_MODE
328 | REGULATOR_CHANGE_STATUS, 311 | REGULATOR_CHANGE_STATUS,
329 }, 312 },
330 .num_consumer_supplies = 1, 313 .num_consumer_supplies = ARRAY_SIZE(devkit8000_vio_supply),
331 .consumer_supplies = &devkit8000_vio_supply, 314 .consumer_supplies = devkit8000_vio_supply,
332};
333
334static struct twl4030_usb_data devkit8000_usb_data = {
335 .usb_mode = T2_USB_MODE_ULPI,
336};
337
338static struct twl4030_codec_audio_data devkit8000_audio_data;
339
340static struct twl4030_codec_data devkit8000_codec_data = {
341 .audio_mclk = 26000000,
342 .audio = &devkit8000_audio_data,
343}; 315};
344 316
345static struct twl4030_platform_data devkit8000_twldata = { 317static struct twl4030_platform_data devkit8000_twldata = {
346 .irq_base = TWL4030_IRQ_BASE,
347 .irq_end = TWL4030_IRQ_END,
348
349 /* platform_data for children goes here */ 318 /* platform_data for children goes here */
350 .usb = &devkit8000_usb_data,
351 .gpio = &devkit8000_gpio_data, 319 .gpio = &devkit8000_gpio_data,
352 .codec = &devkit8000_codec_data,
353 .vmmc1 = &devkit8000_vmmc1, 320 .vmmc1 = &devkit8000_vmmc1,
354 .vdac = &devkit8000_vdac,
355 .vpll1 = &devkit8000_vpll1, 321 .vpll1 = &devkit8000_vpll1,
356 .vio = &devkit8000_vio, 322 .vio = &devkit8000_vio,
357 .keypad = &devkit8000_kp_data, 323 .keypad = &devkit8000_kp_data,
@@ -359,6 +325,9 @@ static struct twl4030_platform_data devkit8000_twldata = {
359 325
360static int __init devkit8000_i2c_init(void) 326static int __init devkit8000_i2c_init(void)
361{ 327{
328 omap3_pmic_get_config(&devkit8000_twldata,
329 TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_AUDIO,
330 TWL_COMMON_REGULATOR_VDAC);
362 omap3_pmic_init("tps65930", &devkit8000_twldata); 331 omap3_pmic_init("tps65930", &devkit8000_twldata);
363 /* Bus 3 is attached to the DVI port where devices like the pico DLP 332 /* Bus 3 is attached to the DVI port where devices like the pico DLP
364 * projector don't work reliably with 400kHz */ 333 * projector don't work reliably with 400kHz */
@@ -438,10 +407,7 @@ static void __init devkit8000_init_early(void)
438 407
439static void __init devkit8000_init_irq(void) 408static void __init devkit8000_init_irq(void)
440{ 409{
441 omap_init_irq(); 410 omap3_init_irq();
442#ifdef CONFIG_OMAP_32K_TIMER
443 omap2_gp_clockevent_set_gptimer(12);
444#endif
445} 411}
446 412
447#define OMAP_DM9000_BASE 0x2c000000 413#define OMAP_DM9000_BASE 0x2c000000
@@ -707,5 +673,5 @@ MACHINE_START(DEVKIT8000, "OMAP3 Devkit8000")
707 .init_early = devkit8000_init_early, 673 .init_early = devkit8000_init_early,
708 .init_irq = devkit8000_init_irq, 674 .init_irq = devkit8000_init_irq,
709 .init_machine = devkit8000_init, 675 .init_machine = devkit8000_init,
710 .timer = &omap_timer, 676 .timer = &omap3_secure_timer,
711MACHINE_END 677MACHINE_END
diff --git a/arch/arm/mach-omap2/board-flash.c b/arch/arm/mach-omap2/board-flash.c
index 729892fdcf2..aa1b0cbe19d 100644
--- a/arch/arm/mach-omap2/board-flash.c
+++ b/arch/arm/mach-omap2/board-flash.c
@@ -132,11 +132,7 @@ static struct gpmc_timings nand_timings = {
132}; 132};
133 133
134static struct omap_nand_platform_data board_nand_data = { 134static struct omap_nand_platform_data board_nand_data = {
135 .nand_setup = NULL,
136 .gpmc_t = &nand_timings, 135 .gpmc_t = &nand_timings,
137 .dma_channel = -1, /* disable DMA in OMAP NAND driver */
138 .dev_ready = NULL,
139 .devsize = 0, /* '0' for 8-bit, '1' for 16-bit device */
140}; 136};
141 137
142void 138void
diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c
index 73e3c31e850..54db41a84a9 100644
--- a/arch/arm/mach-omap2/board-generic.c
+++ b/arch/arm/mach-omap2/board-generic.c
@@ -70,7 +70,7 @@ MACHINE_START(OMAP_GENERIC, "Generic OMAP24xx")
70 .reserve = omap_reserve, 70 .reserve = omap_reserve,
71 .map_io = omap_generic_map_io, 71 .map_io = omap_generic_map_io,
72 .init_early = omap_generic_init_early, 72 .init_early = omap_generic_init_early,
73 .init_irq = omap_init_irq, 73 .init_irq = omap2_init_irq,
74 .init_machine = omap_generic_init, 74 .init_machine = omap_generic_init,
75 .timer = &omap_timer, 75 .timer = &omap2_timer,
76MACHINE_END 76MACHINE_END
diff --git a/arch/arm/mach-omap2/board-h4.c b/arch/arm/mach-omap2/board-h4.c
index bac7933b8cb..45de2b319ec 100644
--- a/arch/arm/mach-omap2/board-h4.c
+++ b/arch/arm/mach-omap2/board-h4.c
@@ -298,7 +298,7 @@ static void __init omap_h4_init_early(void)
298 298
299static void __init omap_h4_init_irq(void) 299static void __init omap_h4_init_irq(void)
300{ 300{
301 omap_init_irq(); 301 omap2_init_irq();
302} 302}
303 303
304static struct at24_platform_data m24c01 = { 304static struct at24_platform_data m24c01 = {
@@ -388,5 +388,5 @@ MACHINE_START(OMAP_H4, "OMAP2420 H4 board")
388 .init_early = omap_h4_init_early, 388 .init_early = omap_h4_init_early,
389 .init_irq = omap_h4_init_irq, 389 .init_irq = omap_h4_init_irq,
390 .init_machine = omap_h4_init, 390 .init_machine = omap_h4_init,
391 .timer = &omap_timer, 391 .timer = &omap2_timer,
392MACHINE_END 392MACHINE_END
diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c
index 0c1bfca3f73..35be778caf1 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -222,8 +222,9 @@ static inline void __init igep2_init_smsc911x(void)
222static inline void __init igep2_init_smsc911x(void) { } 222static inline void __init igep2_init_smsc911x(void) { }
223#endif 223#endif
224 224
225static struct regulator_consumer_supply igep_vmmc1_supply = 225static struct regulator_consumer_supply igep_vmmc1_supply[] = {
226 REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"); 226 REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
227};
227 228
228/* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */ 229/* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */
229static struct regulator_init_data igep_vmmc1 = { 230static struct regulator_init_data igep_vmmc1 = {
@@ -236,12 +237,13 @@ static struct regulator_init_data igep_vmmc1 = {
236 | REGULATOR_CHANGE_MODE 237 | REGULATOR_CHANGE_MODE
237 | REGULATOR_CHANGE_STATUS, 238 | REGULATOR_CHANGE_STATUS,
238 }, 239 },
239 .num_consumer_supplies = 1, 240 .num_consumer_supplies = ARRAY_SIZE(igep_vmmc1_supply),
240 .consumer_supplies = &igep_vmmc1_supply, 241 .consumer_supplies = igep_vmmc1_supply,
241}; 242};
242 243
243static struct regulator_consumer_supply igep_vio_supply = 244static struct regulator_consumer_supply igep_vio_supply[] = {
244 REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.1"); 245 REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.1"),
246};
245 247
246static struct regulator_init_data igep_vio = { 248static struct regulator_init_data igep_vio = {
247 .constraints = { 249 .constraints = {
@@ -254,20 +256,21 @@ static struct regulator_init_data igep_vio = {
254 | REGULATOR_CHANGE_MODE 256 | REGULATOR_CHANGE_MODE
255 | REGULATOR_CHANGE_STATUS, 257 | REGULATOR_CHANGE_STATUS,
256 }, 258 },
257 .num_consumer_supplies = 1, 259 .num_consumer_supplies = ARRAY_SIZE(igep_vio_supply),
258 .consumer_supplies = &igep_vio_supply, 260 .consumer_supplies = igep_vio_supply,
259}; 261};
260 262
261static struct regulator_consumer_supply igep_vmmc2_supply = 263static struct regulator_consumer_supply igep_vmmc2_supply[] = {
262 REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"); 264 REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"),
265};
263 266
264static struct regulator_init_data igep_vmmc2 = { 267static struct regulator_init_data igep_vmmc2 = {
265 .constraints = { 268 .constraints = {
266 .valid_modes_mask = REGULATOR_MODE_NORMAL, 269 .valid_modes_mask = REGULATOR_MODE_NORMAL,
267 .always_on = 1, 270 .always_on = 1,
268 }, 271 },
269 .num_consumer_supplies = 1, 272 .num_consumer_supplies = ARRAY_SIZE(igep_vmmc2_supply),
270 .consumer_supplies = &igep_vmmc2_supply, 273 .consumer_supplies = igep_vmmc2_supply,
271}; 274};
272 275
273static struct fixed_voltage_config igep_vwlan = { 276static struct fixed_voltage_config igep_vwlan = {
@@ -440,10 +443,6 @@ static struct twl4030_gpio_platform_data igep_twl4030_gpio_pdata = {
440 .setup = igep_twl_gpio_setup, 443 .setup = igep_twl_gpio_setup,
441}; 444};
442 445
443static struct twl4030_usb_data igep_usb_data = {
444 .usb_mode = T2_USB_MODE_ULPI,
445};
446
447static int igep2_enable_dvi(struct omap_dss_device *dssdev) 446static int igep2_enable_dvi(struct omap_dss_device *dssdev)
448{ 447{
449 gpio_direction_output(IGEP2_GPIO_DVI_PUP, 1); 448 gpio_direction_output(IGEP2_GPIO_DVI_PUP, 1);
@@ -480,26 +479,6 @@ static struct omap_dss_board_info igep2_dss_data = {
480 .default_device = &igep2_dvi_device, 479 .default_device = &igep2_dvi_device,
481}; 480};
482 481
483static struct regulator_consumer_supply igep2_vpll2_supplies[] = {
484 REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
485 REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"),
486};
487
488static struct regulator_init_data igep2_vpll2 = {
489 .constraints = {
490 .name = "VDVI",
491 .min_uV = 1800000,
492 .max_uV = 1800000,
493 .apply_uV = true,
494 .valid_modes_mask = REGULATOR_MODE_NORMAL
495 | REGULATOR_MODE_STANDBY,
496 .valid_ops_mask = REGULATOR_CHANGE_MODE
497 | REGULATOR_CHANGE_STATUS,
498 },
499 .num_consumer_supplies = ARRAY_SIZE(igep2_vpll2_supplies),
500 .consumer_supplies = igep2_vpll2_supplies,
501};
502
503static void __init igep2_display_init(void) 482static void __init igep2_display_init(void)
504{ 483{
505 int err = gpio_request_one(IGEP2_GPIO_DVI_PUP, GPIOF_OUT_INIT_HIGH, 484 int err = gpio_request_one(IGEP2_GPIO_DVI_PUP, GPIOF_OUT_INIT_HIGH,
@@ -519,13 +498,6 @@ static void __init igep_init_early(void)
519 m65kxxxxam_sdrc_params); 498 m65kxxxxam_sdrc_params);
520} 499}
521 500
522static struct twl4030_codec_audio_data igep2_audio_data;
523
524static struct twl4030_codec_data igep2_codec_data = {
525 .audio_mclk = 26000000,
526 .audio = &igep2_audio_data,
527};
528
529static int igep2_keymap[] = { 501static int igep2_keymap[] = {
530 KEY(0, 0, KEY_LEFT), 502 KEY(0, 0, KEY_LEFT),
531 KEY(0, 1, KEY_RIGHT), 503 KEY(0, 1, KEY_RIGHT),
@@ -558,11 +530,7 @@ static struct twl4030_keypad_data igep2_keypad_pdata = {
558}; 530};
559 531
560static struct twl4030_platform_data igep_twldata = { 532static struct twl4030_platform_data igep_twldata = {
561 .irq_base = TWL4030_IRQ_BASE,
562 .irq_end = TWL4030_IRQ_END,
563
564 /* platform_data for children goes here */ 533 /* platform_data for children goes here */
565 .usb = &igep_usb_data,
566 .gpio = &igep_twl4030_gpio_pdata, 534 .gpio = &igep_twl4030_gpio_pdata,
567 .vmmc1 = &igep_vmmc1, 535 .vmmc1 = &igep_vmmc1,
568 .vio = &igep_vio, 536 .vio = &igep_vio,
@@ -578,6 +546,8 @@ static void __init igep_i2c_init(void)
578{ 546{
579 int ret; 547 int ret;
580 548
549 omap3_pmic_get_config(&igep_twldata, TWL_COMMON_PDATA_USB, 0);
550
581 if (machine_is_igep0020()) { 551 if (machine_is_igep0020()) {
582 /* 552 /*
583 * Bus 3 is attached to the DVI port where devices like the 553 * Bus 3 is attached to the DVI port where devices like the
@@ -588,9 +558,12 @@ static void __init igep_i2c_init(void)
588 if (ret) 558 if (ret)
589 pr_warning("IGEP2: Could not register I2C3 bus (%d)\n", ret); 559 pr_warning("IGEP2: Could not register I2C3 bus (%d)\n", ret);
590 560
591 igep_twldata.codec = &igep2_codec_data;
592 igep_twldata.keypad = &igep2_keypad_pdata; 561 igep_twldata.keypad = &igep2_keypad_pdata;
593 igep_twldata.vpll2 = &igep2_vpll2; 562 /* Get common pmic data */
563 omap3_pmic_get_config(&igep_twldata, TWL_COMMON_PDATA_AUDIO,
564 TWL_COMMON_REGULATOR_VPLL2);
565 igep_twldata.vpll2->constraints.apply_uV = true;
566 igep_twldata.vpll2->constraints.name = "VDVI";
594 } 567 }
595 568
596 omap3_pmic_init("twl4030", &igep_twldata); 569 omap3_pmic_init("twl4030", &igep_twldata);
@@ -703,9 +676,9 @@ MACHINE_START(IGEP0020, "IGEP v2 board")
703 .reserve = omap_reserve, 676 .reserve = omap_reserve,
704 .map_io = omap3_map_io, 677 .map_io = omap3_map_io,
705 .init_early = igep_init_early, 678 .init_early = igep_init_early,
706 .init_irq = omap_init_irq, 679 .init_irq = omap3_init_irq,
707 .init_machine = igep_init, 680 .init_machine = igep_init,
708 .timer = &omap_timer, 681 .timer = &omap3_timer,
709MACHINE_END 682MACHINE_END
710 683
711MACHINE_START(IGEP0030, "IGEP OMAP3 module") 684MACHINE_START(IGEP0030, "IGEP OMAP3 module")
@@ -713,7 +686,7 @@ MACHINE_START(IGEP0030, "IGEP OMAP3 module")
713 .reserve = omap_reserve, 686 .reserve = omap_reserve,
714 .map_io = omap3_map_io, 687 .map_io = omap3_map_io,
715 .init_early = igep_init_early, 688 .init_early = igep_init_early,
716 .init_irq = omap_init_irq, 689 .init_irq = omap3_init_irq,
717 .init_machine = igep_init, 690 .init_machine = igep_init,
718 .timer = &omap_timer, 691 .timer = &omap3_timer,
719MACHINE_END 692MACHINE_END
diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c
index f7d6038075f..218764c9377 100644
--- a/arch/arm/mach-omap2/board-ldp.c
+++ b/arch/arm/mach-omap2/board-ldp.c
@@ -199,22 +199,14 @@ static void __init omap_ldp_init_early(void)
199 omap2_init_common_devices(NULL, NULL); 199 omap2_init_common_devices(NULL, NULL);
200} 200}
201 201
202static struct twl4030_usb_data ldp_usb_data = {
203 .usb_mode = T2_USB_MODE_ULPI,
204};
205
206static struct twl4030_gpio_platform_data ldp_gpio_data = { 202static struct twl4030_gpio_platform_data ldp_gpio_data = {
207 .gpio_base = OMAP_MAX_GPIO_LINES, 203 .gpio_base = OMAP_MAX_GPIO_LINES,
208 .irq_base = TWL4030_GPIO_IRQ_BASE, 204 .irq_base = TWL4030_GPIO_IRQ_BASE,
209 .irq_end = TWL4030_GPIO_IRQ_END, 205 .irq_end = TWL4030_GPIO_IRQ_END,
210}; 206};
211 207
212static struct twl4030_madc_platform_data ldp_madc_data = { 208static struct regulator_consumer_supply ldp_vmmc1_supply[] = {
213 .irq_line = 1, 209 REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
214};
215
216static struct regulator_consumer_supply ldp_vmmc1_supply = {
217 .supply = "vmmc",
218}; 210};
219 211
220/* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */ 212/* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */
@@ -228,8 +220,8 @@ static struct regulator_init_data ldp_vmmc1 = {
228 | REGULATOR_CHANGE_MODE 220 | REGULATOR_CHANGE_MODE
229 | REGULATOR_CHANGE_STATUS, 221 | REGULATOR_CHANGE_STATUS,
230 }, 222 },
231 .num_consumer_supplies = 1, 223 .num_consumer_supplies = ARRAY_SIZE(ldp_vmmc1_supply),
232 .consumer_supplies = &ldp_vmmc1_supply, 224 .consumer_supplies = ldp_vmmc1_supply,
233}; 225};
234 226
235/* ads7846 on SPI */ 227/* ads7846 on SPI */
@@ -253,12 +245,7 @@ static struct regulator_init_data ldp_vaux1 = {
253}; 245};
254 246
255static struct twl4030_platform_data ldp_twldata = { 247static struct twl4030_platform_data ldp_twldata = {
256 .irq_base = TWL4030_IRQ_BASE,
257 .irq_end = TWL4030_IRQ_END,
258
259 /* platform_data for children goes here */ 248 /* platform_data for children goes here */
260 .madc = &ldp_madc_data,
261 .usb = &ldp_usb_data,
262 .vmmc1 = &ldp_vmmc1, 249 .vmmc1 = &ldp_vmmc1,
263 .vaux1 = &ldp_vaux1, 250 .vaux1 = &ldp_vaux1,
264 .gpio = &ldp_gpio_data, 251 .gpio = &ldp_gpio_data,
@@ -267,6 +254,8 @@ static struct twl4030_platform_data ldp_twldata = {
267 254
268static int __init omap_i2c_init(void) 255static int __init omap_i2c_init(void)
269{ 256{
257 omap3_pmic_get_config(&ldp_twldata,
258 TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_MADC, 0);
270 omap3_pmic_init("twl4030", &ldp_twldata); 259 omap3_pmic_init("twl4030", &ldp_twldata);
271 omap_register_i2c_bus(2, 400, NULL, 0); 260 omap_register_i2c_bus(2, 400, NULL, 0);
272 omap_register_i2c_bus(3, 400, NULL, 0); 261 omap_register_i2c_bus(3, 400, NULL, 0);
@@ -341,8 +330,6 @@ static void __init omap_ldp_init(void)
341 ARRAY_SIZE(ldp_nand_partitions), ZOOM_NAND_CS, 0); 330 ARRAY_SIZE(ldp_nand_partitions), ZOOM_NAND_CS, 0);
342 331
343 omap2_hsmmc_init(mmc); 332 omap2_hsmmc_init(mmc);
344 /* link regulators to MMC adapters */
345 ldp_vmmc1_supply.dev = mmc[0].dev;
346} 333}
347 334
348MACHINE_START(OMAP_LDP, "OMAP LDP board") 335MACHINE_START(OMAP_LDP, "OMAP LDP board")
@@ -350,7 +337,7 @@ MACHINE_START(OMAP_LDP, "OMAP LDP board")
350 .reserve = omap_reserve, 337 .reserve = omap_reserve,
351 .map_io = omap3_map_io, 338 .map_io = omap3_map_io,
352 .init_early = omap_ldp_init_early, 339 .init_early = omap_ldp_init_early,
353 .init_irq = omap_init_irq, 340 .init_irq = omap3_init_irq,
354 .init_machine = omap_ldp_init, 341 .init_machine = omap_ldp_init,
355 .timer = &omap_timer, 342 .timer = &omap3_timer,
356MACHINE_END 343MACHINE_END
diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c
index 8d74318ed49..e11f0c5d608 100644
--- a/arch/arm/mach-omap2/board-n8x0.c
+++ b/arch/arm/mach-omap2/board-n8x0.c
@@ -699,9 +699,9 @@ MACHINE_START(NOKIA_N800, "Nokia N800")
699 .reserve = omap_reserve, 699 .reserve = omap_reserve,
700 .map_io = n8x0_map_io, 700 .map_io = n8x0_map_io,
701 .init_early = n8x0_init_early, 701 .init_early = n8x0_init_early,
702 .init_irq = omap_init_irq, 702 .init_irq = omap2_init_irq,
703 .init_machine = n8x0_init_machine, 703 .init_machine = n8x0_init_machine,
704 .timer = &omap_timer, 704 .timer = &omap2_timer,
705MACHINE_END 705MACHINE_END
706 706
707MACHINE_START(NOKIA_N810, "Nokia N810") 707MACHINE_START(NOKIA_N810, "Nokia N810")
@@ -709,9 +709,9 @@ MACHINE_START(NOKIA_N810, "Nokia N810")
709 .reserve = omap_reserve, 709 .reserve = omap_reserve,
710 .map_io = n8x0_map_io, 710 .map_io = n8x0_map_io,
711 .init_early = n8x0_init_early, 711 .init_early = n8x0_init_early,
712 .init_irq = omap_init_irq, 712 .init_irq = omap2_init_irq,
713 .init_machine = n8x0_init_machine, 713 .init_machine = n8x0_init_machine,
714 .timer = &omap_timer, 714 .timer = &omap2_timer,
715MACHINE_END 715MACHINE_END
716 716
717MACHINE_START(NOKIA_N810_WIMAX, "Nokia N810 WiMAX") 717MACHINE_START(NOKIA_N810_WIMAX, "Nokia N810 WiMAX")
@@ -719,7 +719,7 @@ MACHINE_START(NOKIA_N810_WIMAX, "Nokia N810 WiMAX")
719 .reserve = omap_reserve, 719 .reserve = omap_reserve,
720 .map_io = n8x0_map_io, 720 .map_io = n8x0_map_io,
721 .init_early = n8x0_init_early, 721 .init_early = n8x0_init_early,
722 .init_irq = omap_init_irq, 722 .init_irq = omap2_init_irq,
723 .init_machine = n8x0_init_machine, 723 .init_machine = n8x0_init_machine,
724 .timer = &omap_timer, 724 .timer = &omap2_timer,
725MACHINE_END 725MACHINE_END
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
index 7f21d24bd43..32f5f895568 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -50,7 +50,6 @@
50 50
51#include "mux.h" 51#include "mux.h"
52#include "hsmmc.h" 52#include "hsmmc.h"
53#include "timer-gp.h"
54#include "pm.h" 53#include "pm.h"
55#include "common-board-devices.h" 54#include "common-board-devices.h"
56 55
@@ -61,7 +60,8 @@
61 * AXBX = GPIO173, GPIO172, GPIO171: 1 1 1 60 * AXBX = GPIO173, GPIO172, GPIO171: 1 1 1
62 * C1_3 = GPIO173, GPIO172, GPIO171: 1 1 0 61 * C1_3 = GPIO173, GPIO172, GPIO171: 1 1 0
63 * C4 = GPIO173, GPIO172, GPIO171: 1 0 1 62 * C4 = GPIO173, GPIO172, GPIO171: 1 0 1
64 * XM = GPIO173, GPIO172, GPIO171: 0 0 0 63 * XMA/XMB = GPIO173, GPIO172, GPIO171: 0 0 0
64 * XMC = GPIO173, GPIO172, GPIO171: 0 1 0
65 */ 65 */
66enum { 66enum {
67 OMAP3BEAGLE_BOARD_UNKN = 0, 67 OMAP3BEAGLE_BOARD_UNKN = 0,
@@ -69,14 +69,26 @@ enum {
69 OMAP3BEAGLE_BOARD_C1_3, 69 OMAP3BEAGLE_BOARD_C1_3,
70 OMAP3BEAGLE_BOARD_C4, 70 OMAP3BEAGLE_BOARD_C4,
71 OMAP3BEAGLE_BOARD_XM, 71 OMAP3BEAGLE_BOARD_XM,
72 OMAP3BEAGLE_BOARD_XMC,
72}; 73};
73 74
74static u8 omap3_beagle_version; 75static u8 omap3_beagle_version;
75 76
76static u8 omap3_beagle_get_rev(void) 77/*
77{ 78 * Board-specific configuration
78 return omap3_beagle_version; 79 * Defaults to BeagleBoard-xMC
79} 80 */
81static struct {
82 int mmc1_gpio_wp;
83 int usb_pwr_level;
84 int reset_gpio;
85 int usr_button_gpio;
86} beagle_config = {
87 .mmc1_gpio_wp = -EINVAL,
88 .usb_pwr_level = GPIOF_OUT_INIT_LOW,
89 .reset_gpio = 129,
90 .usr_button_gpio = 4,
91};
80 92
81static struct gpio omap3_beagle_rev_gpios[] __initdata = { 93static struct gpio omap3_beagle_rev_gpios[] __initdata = {
82 { 171, GPIOF_IN, "rev_id_0" }, 94 { 171, GPIOF_IN, "rev_id_0" },
@@ -111,18 +123,32 @@ static void __init omap3_beagle_init_rev(void)
111 case 7: 123 case 7:
112 printk(KERN_INFO "OMAP3 Beagle Rev: Ax/Bx\n"); 124 printk(KERN_INFO "OMAP3 Beagle Rev: Ax/Bx\n");
113 omap3_beagle_version = OMAP3BEAGLE_BOARD_AXBX; 125 omap3_beagle_version = OMAP3BEAGLE_BOARD_AXBX;
126 beagle_config.mmc1_gpio_wp = 29;
127 beagle_config.reset_gpio = 170;
128 beagle_config.usr_button_gpio = 7;
114 break; 129 break;
115 case 6: 130 case 6:
116 printk(KERN_INFO "OMAP3 Beagle Rev: C1/C2/C3\n"); 131 printk(KERN_INFO "OMAP3 Beagle Rev: C1/C2/C3\n");
117 omap3_beagle_version = OMAP3BEAGLE_BOARD_C1_3; 132 omap3_beagle_version = OMAP3BEAGLE_BOARD_C1_3;
133 beagle_config.mmc1_gpio_wp = 23;
134 beagle_config.reset_gpio = 170;
135 beagle_config.usr_button_gpio = 7;
118 break; 136 break;
119 case 5: 137 case 5:
120 printk(KERN_INFO "OMAP3 Beagle Rev: C4\n"); 138 printk(KERN_INFO "OMAP3 Beagle Rev: C4\n");
121 omap3_beagle_version = OMAP3BEAGLE_BOARD_C4; 139 omap3_beagle_version = OMAP3BEAGLE_BOARD_C4;
140 beagle_config.mmc1_gpio_wp = 23;
141 beagle_config.reset_gpio = 170;
142 beagle_config.usr_button_gpio = 7;
122 break; 143 break;
123 case 0: 144 case 0:
124 printk(KERN_INFO "OMAP3 Beagle Rev: xM\n"); 145 printk(KERN_INFO "OMAP3 Beagle Rev: xM Ax/Bx\n");
125 omap3_beagle_version = OMAP3BEAGLE_BOARD_XM; 146 omap3_beagle_version = OMAP3BEAGLE_BOARD_XM;
147 beagle_config.usb_pwr_level = GPIOF_OUT_INIT_HIGH;
148 break;
149 case 2:
150 printk(KERN_INFO "OMAP3 Beagle Rev: xM C\n");
151 omap3_beagle_version = OMAP3BEAGLE_BOARD_XMC;
126 break; 152 break;
127 default: 153 default:
128 printk(KERN_INFO "OMAP3 Beagle Rev: unknown %hd\n", beagle_rev); 154 printk(KERN_INFO "OMAP3 Beagle Rev: unknown %hd\n", beagle_rev);
@@ -210,14 +236,6 @@ static struct omap_dss_board_info beagle_dss_data = {
210 .default_device = &beagle_dvi_device, 236 .default_device = &beagle_dvi_device,
211}; 237};
212 238
213static struct regulator_consumer_supply beagle_vdac_supply =
214 REGULATOR_SUPPLY("vdda_dac", "omapdss_venc");
215
216static struct regulator_consumer_supply beagle_vdvi_supplies[] = {
217 REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
218 REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"),
219};
220
221static void __init beagle_display_init(void) 239static void __init beagle_display_init(void)
222{ 240{
223 int r; 241 int r;
@@ -234,17 +252,17 @@ static struct omap2_hsmmc_info mmc[] = {
234 { 252 {
235 .mmc = 1, 253 .mmc = 1,
236 .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA, 254 .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA,
237 .gpio_wp = 29, 255 .gpio_wp = -EINVAL,
238 }, 256 },
239 {} /* Terminator */ 257 {} /* Terminator */
240}; 258};
241 259
242static struct regulator_consumer_supply beagle_vmmc1_supply = { 260static struct regulator_consumer_supply beagle_vmmc1_supply[] = {
243 .supply = "vmmc", 261 REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
244}; 262};
245 263
246static struct regulator_consumer_supply beagle_vsim_supply = { 264static struct regulator_consumer_supply beagle_vsim_supply[] = {
247 .supply = "vmmc_aux", 265 REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.0"),
248}; 266};
249 267
250static struct gpio_led gpio_leds[]; 268static struct gpio_led gpio_leds[];
@@ -252,33 +270,22 @@ static struct gpio_led gpio_leds[];
252static int beagle_twl_gpio_setup(struct device *dev, 270static int beagle_twl_gpio_setup(struct device *dev,
253 unsigned gpio, unsigned ngpio) 271 unsigned gpio, unsigned ngpio)
254{ 272{
255 int r, usb_pwr_level; 273 int r;
256 274
257 if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) { 275 if (beagle_config.mmc1_gpio_wp != -EINVAL)
258 mmc[0].gpio_wp = -EINVAL; 276 omap_mux_init_gpio(beagle_config.mmc1_gpio_wp, OMAP_PIN_INPUT);
259 } else if ((omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_C1_3) || 277 mmc[0].gpio_wp = beagle_config.mmc1_gpio_wp;
260 (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_C4)) {
261 omap_mux_init_gpio(23, OMAP_PIN_INPUT);
262 mmc[0].gpio_wp = 23;
263 } else {
264 omap_mux_init_gpio(29, OMAP_PIN_INPUT);
265 }
266 /* gpio + 0 is "mmc0_cd" (input/IRQ) */ 278 /* gpio + 0 is "mmc0_cd" (input/IRQ) */
267 mmc[0].gpio_cd = gpio + 0; 279 mmc[0].gpio_cd = gpio + 0;
268 omap2_hsmmc_init(mmc); 280 omap2_hsmmc_init(mmc);
269 281
270 /* link regulators to MMC adapters */
271 beagle_vmmc1_supply.dev = mmc[0].dev;
272 beagle_vsim_supply.dev = mmc[0].dev;
273
274 /* 282 /*
275 * TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, XM active 283 * TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, XM active
276 * high / others active low) 284 * high / others active low)
277 * DVI reset GPIO is different between beagle revisions 285 * DVI reset GPIO is different between beagle revisions
278 */ 286 */
279 if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) { 287 /* Valid for all -xM revisions */
280 usb_pwr_level = GPIOF_OUT_INIT_HIGH; 288 if (cpu_is_omap3630()) {
281 beagle_dvi_device.reset_gpio = 129;
282 /* 289 /*
283 * gpio + 1 on Xm controls the TFP410's enable line (active low) 290 * gpio + 1 on Xm controls the TFP410's enable line (active low)
284 * gpio + 2 control varies depending on the board rev as below: 291 * gpio + 2 control varies depending on the board rev as below:
@@ -296,8 +303,6 @@ static int beagle_twl_gpio_setup(struct device *dev,
296 pr_err("%s: unable to configure DVI_LDO_EN\n", 303 pr_err("%s: unable to configure DVI_LDO_EN\n",
297 __func__); 304 __func__);
298 } else { 305 } else {
299 usb_pwr_level = GPIOF_OUT_INIT_LOW;
300 beagle_dvi_device.reset_gpio = 170;
301 /* 306 /*
302 * REVISIT: need ehci-omap hooks for external VBUS 307 * REVISIT: need ehci-omap hooks for external VBUS
303 * power switch and overcurrent detect 308 * power switch and overcurrent detect
@@ -305,8 +310,10 @@ static int beagle_twl_gpio_setup(struct device *dev,
305 if (gpio_request_one(gpio + 1, GPIOF_IN, "EHCI_nOC")) 310 if (gpio_request_one(gpio + 1, GPIOF_IN, "EHCI_nOC"))
306 pr_err("%s: unable to configure EHCI_nOC\n", __func__); 311 pr_err("%s: unable to configure EHCI_nOC\n", __func__);
307 } 312 }
313 beagle_dvi_device.reset_gpio = beagle_config.reset_gpio;
308 314
309 gpio_request_one(gpio + TWL4030_GPIO_MAX, usb_pwr_level, "nEN_USB_PWR"); 315 gpio_request_one(gpio + TWL4030_GPIO_MAX, beagle_config.usb_pwr_level,
316 "nEN_USB_PWR");
310 317
311 /* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */ 318 /* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */
312 gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1; 319 gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1;
@@ -336,8 +343,8 @@ static struct regulator_init_data beagle_vmmc1 = {
336 | REGULATOR_CHANGE_MODE 343 | REGULATOR_CHANGE_MODE
337 | REGULATOR_CHANGE_STATUS, 344 | REGULATOR_CHANGE_STATUS,
338 }, 345 },
339 .num_consumer_supplies = 1, 346 .num_consumer_supplies = ARRAY_SIZE(beagle_vmmc1_supply),
340 .consumer_supplies = &beagle_vmmc1_supply, 347 .consumer_supplies = beagle_vmmc1_supply,
341}; 348};
342 349
343/* VSIM for MMC1 pins DAT4..DAT7 (2 mA, plus card == max 50 mA) */ 350/* VSIM for MMC1 pins DAT4..DAT7 (2 mA, plus card == max 50 mA) */
@@ -351,62 +358,15 @@ static struct regulator_init_data beagle_vsim = {
351 | REGULATOR_CHANGE_MODE 358 | REGULATOR_CHANGE_MODE
352 | REGULATOR_CHANGE_STATUS, 359 | REGULATOR_CHANGE_STATUS,
353 }, 360 },
354 .num_consumer_supplies = 1, 361 .num_consumer_supplies = ARRAY_SIZE(beagle_vsim_supply),
355 .consumer_supplies = &beagle_vsim_supply, 362 .consumer_supplies = beagle_vsim_supply,
356};
357
358/* VDAC for DSS driving S-Video (8 mA unloaded, max 65 mA) */
359static struct regulator_init_data beagle_vdac = {
360 .constraints = {
361 .min_uV = 1800000,
362 .max_uV = 1800000,
363 .valid_modes_mask = REGULATOR_MODE_NORMAL
364 | REGULATOR_MODE_STANDBY,
365 .valid_ops_mask = REGULATOR_CHANGE_MODE
366 | REGULATOR_CHANGE_STATUS,
367 },
368 .num_consumer_supplies = 1,
369 .consumer_supplies = &beagle_vdac_supply,
370};
371
372/* VPLL2 for digital video outputs */
373static struct regulator_init_data beagle_vpll2 = {
374 .constraints = {
375 .name = "VDVI",
376 .min_uV = 1800000,
377 .max_uV = 1800000,
378 .valid_modes_mask = REGULATOR_MODE_NORMAL
379 | REGULATOR_MODE_STANDBY,
380 .valid_ops_mask = REGULATOR_CHANGE_MODE
381 | REGULATOR_CHANGE_STATUS,
382 },
383 .num_consumer_supplies = ARRAY_SIZE(beagle_vdvi_supplies),
384 .consumer_supplies = beagle_vdvi_supplies,
385};
386
387static struct twl4030_usb_data beagle_usb_data = {
388 .usb_mode = T2_USB_MODE_ULPI,
389};
390
391static struct twl4030_codec_audio_data beagle_audio_data;
392
393static struct twl4030_codec_data beagle_codec_data = {
394 .audio_mclk = 26000000,
395 .audio = &beagle_audio_data,
396}; 363};
397 364
398static struct twl4030_platform_data beagle_twldata = { 365static struct twl4030_platform_data beagle_twldata = {
399 .irq_base = TWL4030_IRQ_BASE,
400 .irq_end = TWL4030_IRQ_END,
401
402 /* platform_data for children goes here */ 366 /* platform_data for children goes here */
403 .usb = &beagle_usb_data,
404 .gpio = &beagle_gpio_data, 367 .gpio = &beagle_gpio_data,
405 .codec = &beagle_codec_data,
406 .vmmc1 = &beagle_vmmc1, 368 .vmmc1 = &beagle_vmmc1,
407 .vsim = &beagle_vsim, 369 .vsim = &beagle_vsim,
408 .vdac = &beagle_vdac,
409 .vpll2 = &beagle_vpll2,
410}; 370};
411 371
412static struct i2c_board_info __initdata beagle_i2c_eeprom[] = { 372static struct i2c_board_info __initdata beagle_i2c_eeprom[] = {
@@ -417,6 +377,12 @@ static struct i2c_board_info __initdata beagle_i2c_eeprom[] = {
417 377
418static int __init omap3_beagle_i2c_init(void) 378static int __init omap3_beagle_i2c_init(void)
419{ 379{
380 omap3_pmic_get_config(&beagle_twldata,
381 TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_AUDIO,
382 TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2);
383
384 beagle_twldata.vpll2->constraints.name = "VDVI";
385
420 omap3_pmic_init("twl4030", &beagle_twldata); 386 omap3_pmic_init("twl4030", &beagle_twldata);
421 /* Bus 3 is attached to the DVI port where devices like the pico DLP 387 /* Bus 3 is attached to the DVI port where devices like the pico DLP
422 * projector don't work reliably with 400kHz */ 388 * projector don't work reliably with 400kHz */
@@ -458,7 +424,8 @@ static struct platform_device leds_gpio = {
458static struct gpio_keys_button gpio_buttons[] = { 424static struct gpio_keys_button gpio_buttons[] = {
459 { 425 {
460 .code = BTN_EXTRA, 426 .code = BTN_EXTRA,
461 .gpio = 7, 427 /* Dynamically assigned depending on board */
428 .gpio = -EINVAL,
462 .desc = "user", 429 .desc = "user",
463 .wakeup = 1, 430 .wakeup = 1,
464 }, 431 },
@@ -486,10 +453,7 @@ static void __init omap3_beagle_init_early(void)
486 453
487static void __init omap3_beagle_init_irq(void) 454static void __init omap3_beagle_init_irq(void)
488{ 455{
489 omap_init_irq(); 456 omap3_init_irq();
490#ifdef CONFIG_OMAP_32K_TIMER
491 omap2_gp_clockevent_set_gptimer(12);
492#endif
493} 457}
494 458
495static struct platform_device *omap3_beagle_devices[] __initdata = { 459static struct platform_device *omap3_beagle_devices[] __initdata = {
@@ -525,8 +489,8 @@ static void __init beagle_opp_init(void)
525 return; 489 return;
526 } 490 }
527 491
528 /* Custom OPP enabled for XM */ 492 /* Custom OPP enabled for all xM versions */
529 if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) { 493 if (cpu_is_omap3630()) {
530 struct omap_hwmod *mh = omap_hwmod_lookup("mpu"); 494 struct omap_hwmod *mh = omap_hwmod_lookup("mpu");
531 struct omap_hwmod *dh = omap_hwmod_lookup("iva"); 495 struct omap_hwmod *dh = omap_hwmod_lookup("iva");
532 struct device *dev; 496 struct device *dev;
@@ -566,6 +530,9 @@ static void __init omap3_beagle_init(void)
566 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); 530 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
567 omap3_beagle_init_rev(); 531 omap3_beagle_init_rev();
568 omap3_beagle_i2c_init(); 532 omap3_beagle_i2c_init();
533
534 gpio_buttons[0].gpio = beagle_config.usr_button_gpio;
535
569 platform_add_devices(omap3_beagle_devices, 536 platform_add_devices(omap3_beagle_devices,
570 ARRAY_SIZE(omap3_beagle_devices)); 537 ARRAY_SIZE(omap3_beagle_devices));
571 omap_display_init(&beagle_dss_data); 538 omap_display_init(&beagle_dss_data);
@@ -599,5 +566,5 @@ MACHINE_START(OMAP3_BEAGLE, "OMAP3 Beagle Board")
599 .init_early = omap3_beagle_init_early, 566 .init_early = omap3_beagle_init_early,
600 .init_irq = omap3_beagle_init_irq, 567 .init_irq = omap3_beagle_init_irq,
601 .init_machine = omap3_beagle_init, 568 .init_machine = omap3_beagle_init,
602 .timer = &omap_timer, 569 .timer = &omap3_secure_timer,
603MACHINE_END 570MACHINE_END
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
index b4d43464a30..c452b3f3331 100644
--- a/arch/arm/mach-omap2/board-omap3evm.c
+++ b/arch/arm/mach-omap2/board-omap3evm.c
@@ -273,12 +273,12 @@ static struct omap_dss_board_info omap3_evm_dss_data = {
273 .default_device = &omap3_evm_lcd_device, 273 .default_device = &omap3_evm_lcd_device,
274}; 274};
275 275
276static struct regulator_consumer_supply omap3evm_vmmc1_supply = { 276static struct regulator_consumer_supply omap3evm_vmmc1_supply[] = {
277 .supply = "vmmc", 277 REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
278}; 278};
279 279
280static struct regulator_consumer_supply omap3evm_vsim_supply = { 280static struct regulator_consumer_supply omap3evm_vsim_supply[] = {
281 .supply = "vmmc_aux", 281 REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.0"),
282}; 282};
283 283
284/* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */ 284/* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */
@@ -292,8 +292,8 @@ static struct regulator_init_data omap3evm_vmmc1 = {
292 | REGULATOR_CHANGE_MODE 292 | REGULATOR_CHANGE_MODE
293 | REGULATOR_CHANGE_STATUS, 293 | REGULATOR_CHANGE_STATUS,
294 }, 294 },
295 .num_consumer_supplies = 1, 295 .num_consumer_supplies = ARRAY_SIZE(omap3evm_vmmc1_supply),
296 .consumer_supplies = &omap3evm_vmmc1_supply, 296 .consumer_supplies = omap3evm_vmmc1_supply,
297}; 297};
298 298
299/* VSIM for MMC1 pins DAT4..DAT7 (2 mA, plus card == max 50 mA) */ 299/* VSIM for MMC1 pins DAT4..DAT7 (2 mA, plus card == max 50 mA) */
@@ -307,8 +307,8 @@ static struct regulator_init_data omap3evm_vsim = {
307 | REGULATOR_CHANGE_MODE 307 | REGULATOR_CHANGE_MODE
308 | REGULATOR_CHANGE_STATUS, 308 | REGULATOR_CHANGE_STATUS,
309 }, 309 },
310 .num_consumer_supplies = 1, 310 .num_consumer_supplies = ARRAY_SIZE(omap3evm_vsim_supply),
311 .consumer_supplies = &omap3evm_vsim_supply, 311 .consumer_supplies = omap3evm_vsim_supply,
312}; 312};
313 313
314static struct omap2_hsmmc_info mmc[] = { 314static struct omap2_hsmmc_info mmc[] = {
@@ -365,10 +365,6 @@ static int omap3evm_twl_gpio_setup(struct device *dev,
365 mmc[0].gpio_cd = gpio + 0; 365 mmc[0].gpio_cd = gpio + 0;
366 omap2_hsmmc_init(mmc); 366 omap2_hsmmc_init(mmc);
367 367
368 /* link regulators to MMC adapters */
369 omap3evm_vmmc1_supply.dev = mmc[0].dev;
370 omap3evm_vsim_supply.dev = mmc[0].dev;
371
372 /* 368 /*
373 * Most GPIOs are for USB OTG. Some are mostly sent to 369 * Most GPIOs are for USB OTG. Some are mostly sent to
374 * the P2 connector; notably LEDA for the LCD backlight. 370 * the P2 connector; notably LEDA for the LCD backlight.
@@ -400,10 +396,6 @@ static struct twl4030_gpio_platform_data omap3evm_gpio_data = {
400 .setup = omap3evm_twl_gpio_setup, 396 .setup = omap3evm_twl_gpio_setup,
401}; 397};
402 398
403static struct twl4030_usb_data omap3evm_usb_data = {
404 .usb_mode = T2_USB_MODE_ULPI,
405};
406
407static uint32_t board_keymap[] = { 399static uint32_t board_keymap[] = {
408 KEY(0, 0, KEY_LEFT), 400 KEY(0, 0, KEY_LEFT),
409 KEY(0, 1, KEY_DOWN), 401 KEY(0, 1, KEY_DOWN),
@@ -438,58 +430,10 @@ static struct twl4030_keypad_data omap3evm_kp_data = {
438 .rep = 1, 430 .rep = 1,
439}; 431};
440 432
441static struct twl4030_madc_platform_data omap3evm_madc_data = {
442 .irq_line = 1,
443};
444
445static struct twl4030_codec_audio_data omap3evm_audio_data;
446
447static struct twl4030_codec_data omap3evm_codec_data = {
448 .audio_mclk = 26000000,
449 .audio = &omap3evm_audio_data,
450};
451
452static struct regulator_consumer_supply omap3_evm_vdda_dac_supply =
453 REGULATOR_SUPPLY("vdda_dac", "omapdss_venc");
454
455/* VDAC for DSS driving S-Video */
456static struct regulator_init_data omap3_evm_vdac = {
457 .constraints = {
458 .min_uV = 1800000,
459 .max_uV = 1800000,
460 .apply_uV = true,
461 .valid_modes_mask = REGULATOR_MODE_NORMAL
462 | REGULATOR_MODE_STANDBY,
463 .valid_ops_mask = REGULATOR_CHANGE_MODE
464 | REGULATOR_CHANGE_STATUS,
465 },
466 .num_consumer_supplies = 1,
467 .consumer_supplies = &omap3_evm_vdda_dac_supply,
468};
469
470/* VPLL2 for digital video outputs */
471static struct regulator_consumer_supply omap3_evm_vpll2_supplies[] = {
472 REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
473 REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"),
474};
475
476static struct regulator_init_data omap3_evm_vpll2 = {
477 .constraints = {
478 .min_uV = 1800000,
479 .max_uV = 1800000,
480 .apply_uV = true,
481 .valid_modes_mask = REGULATOR_MODE_NORMAL
482 | REGULATOR_MODE_STANDBY,
483 .valid_ops_mask = REGULATOR_CHANGE_MODE
484 | REGULATOR_CHANGE_STATUS,
485 },
486 .num_consumer_supplies = ARRAY_SIZE(omap3_evm_vpll2_supplies),
487 .consumer_supplies = omap3_evm_vpll2_supplies,
488};
489
490/* ads7846 on SPI */ 433/* ads7846 on SPI */
491static struct regulator_consumer_supply omap3evm_vio_supply = 434static struct regulator_consumer_supply omap3evm_vio_supply[] = {
492 REGULATOR_SUPPLY("vcc", "spi1.0"); 435 REGULATOR_SUPPLY("vcc", "spi1.0"),
436};
493 437
494/* VIO for ads7846 */ 438/* VIO for ads7846 */
495static struct regulator_init_data omap3evm_vio = { 439static struct regulator_init_data omap3evm_vio = {
@@ -502,8 +446,8 @@ static struct regulator_init_data omap3evm_vio = {
502 .valid_ops_mask = REGULATOR_CHANGE_MODE 446 .valid_ops_mask = REGULATOR_CHANGE_MODE
503 | REGULATOR_CHANGE_STATUS, 447 | REGULATOR_CHANGE_STATUS,
504 }, 448 },
505 .num_consumer_supplies = 1, 449 .num_consumer_supplies = ARRAY_SIZE(omap3evm_vio_supply),
506 .consumer_supplies = &omap3evm_vio_supply, 450 .consumer_supplies = omap3evm_vio_supply,
507}; 451};
508 452
509#ifdef CONFIG_WL12XX_PLATFORM_DATA 453#ifdef CONFIG_WL12XX_PLATFORM_DATA
@@ -511,16 +455,17 @@ static struct regulator_init_data omap3evm_vio = {
511#define OMAP3EVM_WLAN_PMENA_GPIO (150) 455#define OMAP3EVM_WLAN_PMENA_GPIO (150)
512#define OMAP3EVM_WLAN_IRQ_GPIO (149) 456#define OMAP3EVM_WLAN_IRQ_GPIO (149)
513 457
514static struct regulator_consumer_supply omap3evm_vmmc2_supply = 458static struct regulator_consumer_supply omap3evm_vmmc2_supply[] = {
515 REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"); 459 REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"),
460};
516 461
517/* VMMC2 for driving the WL12xx module */ 462/* VMMC2 for driving the WL12xx module */
518static struct regulator_init_data omap3evm_vmmc2 = { 463static struct regulator_init_data omap3evm_vmmc2 = {
519 .constraints = { 464 .constraints = {
520 .valid_ops_mask = REGULATOR_CHANGE_STATUS, 465 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
521 }, 466 },
522 .num_consumer_supplies = 1, 467 .num_consumer_supplies = ARRAY_SIZE(omap3evm_vmmc2_supply),
523 .consumer_supplies = &omap3evm_vmmc2_supply, 468 .consumer_supplies = omap3evm_vmmc2_supply,
524}; 469};
525 470
526static struct fixed_voltage_config omap3evm_vwlan = { 471static struct fixed_voltage_config omap3evm_vwlan = {
@@ -548,17 +493,9 @@ struct wl12xx_platform_data omap3evm_wlan_data __initdata = {
548#endif 493#endif
549 494
550static struct twl4030_platform_data omap3evm_twldata = { 495static struct twl4030_platform_data omap3evm_twldata = {
551 .irq_base = TWL4030_IRQ_BASE,
552 .irq_end = TWL4030_IRQ_END,
553
554 /* platform_data for children goes here */ 496 /* platform_data for children goes here */
555 .keypad = &omap3evm_kp_data, 497 .keypad = &omap3evm_kp_data,
556 .madc = &omap3evm_madc_data,
557 .usb = &omap3evm_usb_data,
558 .gpio = &omap3evm_gpio_data, 498 .gpio = &omap3evm_gpio_data,
559 .codec = &omap3evm_codec_data,
560 .vdac = &omap3_evm_vdac,
561 .vpll2 = &omap3_evm_vpll2,
562 .vio = &omap3evm_vio, 499 .vio = &omap3evm_vio,
563 .vmmc1 = &omap3evm_vmmc1, 500 .vmmc1 = &omap3evm_vmmc1,
564 .vsim = &omap3evm_vsim, 501 .vsim = &omap3evm_vsim,
@@ -566,6 +503,14 @@ static struct twl4030_platform_data omap3evm_twldata = {
566 503
567static int __init omap3_evm_i2c_init(void) 504static int __init omap3_evm_i2c_init(void)
568{ 505{
506 omap3_pmic_get_config(&omap3evm_twldata,
507 TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_MADC |
508 TWL_COMMON_PDATA_AUDIO,
509 TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2);
510
511 omap3evm_twldata.vdac->constraints.apply_uV = true;
512 omap3evm_twldata.vpll2->constraints.apply_uV = true;
513
569 omap3_pmic_init("twl4030", &omap3evm_twldata); 514 omap3_pmic_init("twl4030", &omap3evm_twldata);
570 omap_register_i2c_bus(2, 400, NULL, 0); 515 omap_register_i2c_bus(2, 400, NULL, 0);
571 omap_register_i2c_bus(3, 400, NULL, 0); 516 omap_register_i2c_bus(3, 400, NULL, 0);
@@ -740,7 +685,7 @@ MACHINE_START(OMAP3EVM, "OMAP3 EVM")
740 .reserve = omap_reserve, 685 .reserve = omap_reserve,
741 .map_io = omap3_map_io, 686 .map_io = omap3_map_io,
742 .init_early = omap3_evm_init_early, 687 .init_early = omap3_evm_init_early,
743 .init_irq = omap_init_irq, 688 .init_irq = omap3_init_irq,
744 .init_machine = omap3_evm_init, 689 .init_machine = omap3_evm_init,
745 .timer = &omap_timer, 690 .timer = &omap3_timer,
746MACHINE_END 691MACHINE_END
diff --git a/arch/arm/mach-omap2/board-omap3logic.c b/arch/arm/mach-omap2/board-omap3logic.c
index 60d9be49dba..703aeb5b8fd 100644
--- a/arch/arm/mach-omap2/board-omap3logic.c
+++ b/arch/arm/mach-omap2/board-omap3logic.c
@@ -35,7 +35,6 @@
35 35
36#include "mux.h" 36#include "mux.h"
37#include "hsmmc.h" 37#include "hsmmc.h"
38#include "timer-gp.h"
39#include "control.h" 38#include "control.h"
40#include "common-board-devices.h" 39#include "common-board-devices.h"
41 40
@@ -55,8 +54,8 @@
55#define OMAP3_TORPEDO_MMC_GPIO_CD 127 54#define OMAP3_TORPEDO_MMC_GPIO_CD 127
56#define OMAP3_TORPEDO_SMSC911X_GPIO_IRQ 129 55#define OMAP3_TORPEDO_SMSC911X_GPIO_IRQ 129
57 56
58static struct regulator_consumer_supply omap3logic_vmmc1_supply = { 57static struct regulator_consumer_supply omap3logic_vmmc1_supply[] = {
59 .supply = "vmmc", 58 REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
60}; 59};
61 60
62/* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */ 61/* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */
@@ -71,8 +70,8 @@ static struct regulator_init_data omap3logic_vmmc1 = {
71 | REGULATOR_CHANGE_MODE 70 | REGULATOR_CHANGE_MODE
72 | REGULATOR_CHANGE_STATUS, 71 | REGULATOR_CHANGE_STATUS,
73 }, 72 },
74 .num_consumer_supplies = 1, 73 .num_consumer_supplies = ARRAY_SIZE(omap3logic_vmmc1_supply),
75 .consumer_supplies = &omap3logic_vmmc1_supply, 74 .consumer_supplies = omap3logic_vmmc1_supply,
76}; 75};
77 76
78static struct twl4030_gpio_platform_data omap3logic_gpio_data = { 77static struct twl4030_gpio_platform_data omap3logic_gpio_data = {
@@ -130,8 +129,6 @@ static void __init board_mmc_init(void)
130 } 129 }
131 130
132 omap2_hsmmc_init(board_mmc_info); 131 omap2_hsmmc_init(board_mmc_info);
133 /* link regulators to MMC adapters */
134 omap3logic_vmmc1_supply.dev = board_mmc_info[0].dev;
135} 132}
136 133
137static struct omap_smsc911x_platform_data __initdata board_smsc911x_data = { 134static struct omap_smsc911x_platform_data __initdata board_smsc911x_data = {
@@ -215,16 +212,16 @@ MACHINE_START(OMAP3_TORPEDO, "Logic OMAP3 Torpedo board")
215 .boot_params = 0x80000100, 212 .boot_params = 0x80000100,
216 .map_io = omap3_map_io, 213 .map_io = omap3_map_io,
217 .init_early = omap3logic_init_early, 214 .init_early = omap3logic_init_early,
218 .init_irq = omap_init_irq, 215 .init_irq = omap3_init_irq,
219 .init_machine = omap3logic_init, 216 .init_machine = omap3logic_init,
220 .timer = &omap_timer, 217 .timer = &omap3_timer,
221MACHINE_END 218MACHINE_END
222 219
223MACHINE_START(OMAP3530_LV_SOM, "OMAP Logic 3530 LV SOM board") 220MACHINE_START(OMAP3530_LV_SOM, "OMAP Logic 3530 LV SOM board")
224 .boot_params = 0x80000100, 221 .boot_params = 0x80000100,
225 .map_io = omap3_map_io, 222 .map_io = omap3_map_io,
226 .init_early = omap3logic_init_early, 223 .init_early = omap3logic_init_early,
227 .init_irq = omap_init_irq, 224 .init_irq = omap3_init_irq,
228 .init_machine = omap3logic_init, 225 .init_machine = omap3logic_init,
229 .timer = &omap_timer, 226 .timer = &omap3_timer,
230MACHINE_END 227MACHINE_END
diff --git a/arch/arm/mach-omap2/board-omap3pandora.c b/arch/arm/mach-omap2/board-omap3pandora.c
index 23f71d40883..080d7bd6795 100644
--- a/arch/arm/mach-omap2/board-omap3pandora.c
+++ b/arch/arm/mach-omap2/board-omap3pandora.c
@@ -320,17 +320,17 @@ static struct twl4030_gpio_platform_data omap3pandora_gpio_data = {
320 .setup = omap3pandora_twl_gpio_setup, 320 .setup = omap3pandora_twl_gpio_setup,
321}; 321};
322 322
323static struct regulator_consumer_supply pandora_vmmc1_supply = 323static struct regulator_consumer_supply pandora_vmmc1_supply[] = {
324 REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"); 324 REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
325 325};
326static struct regulator_consumer_supply pandora_vmmc2_supply =
327 REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1");
328 326
329static struct regulator_consumer_supply pandora_vmmc3_supply = 327static struct regulator_consumer_supply pandora_vmmc2_supply[] = {
330 REGULATOR_SUPPLY("vmmc", "omap_hsmmc.2"); 328 REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1")
329};
331 330
332static struct regulator_consumer_supply pandora_vdda_dac_supply = 331static struct regulator_consumer_supply pandora_vmmc3_supply[] = {
333 REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"); 332 REGULATOR_SUPPLY("vmmc", "omap_hsmmc.2"),
333};
334 334
335static struct regulator_consumer_supply pandora_vdds_supplies[] = { 335static struct regulator_consumer_supply pandora_vdds_supplies[] = {
336 REGULATOR_SUPPLY("vdds_sdi", "omapdss"), 336 REGULATOR_SUPPLY("vdds_sdi", "omapdss"),
@@ -338,11 +338,13 @@ static struct regulator_consumer_supply pandora_vdds_supplies[] = {
338 REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"), 338 REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"),
339}; 339};
340 340
341static struct regulator_consumer_supply pandora_vcc_lcd_supply = 341static struct regulator_consumer_supply pandora_vcc_lcd_supply[] = {
342 REGULATOR_SUPPLY("vcc", "display0"); 342 REGULATOR_SUPPLY("vcc", "display0"),
343};
343 344
344static struct regulator_consumer_supply pandora_usb_phy_supply = 345static struct regulator_consumer_supply pandora_usb_phy_supply[] = {
345 REGULATOR_SUPPLY("hsusb0", "ehci-omap.0"); 346 REGULATOR_SUPPLY("hsusb0", "ehci-omap.0"),
347};
346 348
347/* ads7846 on SPI and 2 nub controllers on I2C */ 349/* ads7846 on SPI and 2 nub controllers on I2C */
348static struct regulator_consumer_supply pandora_vaux4_supplies[] = { 350static struct regulator_consumer_supply pandora_vaux4_supplies[] = {
@@ -351,8 +353,9 @@ static struct regulator_consumer_supply pandora_vaux4_supplies[] = {
351 REGULATOR_SUPPLY("vcc", "3-0067"), 353 REGULATOR_SUPPLY("vcc", "3-0067"),
352}; 354};
353 355
354static struct regulator_consumer_supply pandora_adac_supply = 356static struct regulator_consumer_supply pandora_adac_supply[] = {
355 REGULATOR_SUPPLY("vcc", "soc-audio"); 357 REGULATOR_SUPPLY("vcc", "soc-audio"),
358};
356 359
357/* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */ 360/* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */
358static struct regulator_init_data pandora_vmmc1 = { 361static struct regulator_init_data pandora_vmmc1 = {
@@ -365,8 +368,8 @@ static struct regulator_init_data pandora_vmmc1 = {
365 | REGULATOR_CHANGE_MODE 368 | REGULATOR_CHANGE_MODE
366 | REGULATOR_CHANGE_STATUS, 369 | REGULATOR_CHANGE_STATUS,
367 }, 370 },
368 .num_consumer_supplies = 1, 371 .num_consumer_supplies = ARRAY_SIZE(pandora_vmmc1_supply),
369 .consumer_supplies = &pandora_vmmc1_supply, 372 .consumer_supplies = pandora_vmmc1_supply,
370}; 373};
371 374
372/* VMMC2 for MMC2 pins CMD, CLK, DAT0..DAT3 (max 100 mA) */ 375/* VMMC2 for MMC2 pins CMD, CLK, DAT0..DAT3 (max 100 mA) */
@@ -380,38 +383,8 @@ static struct regulator_init_data pandora_vmmc2 = {
380 | REGULATOR_CHANGE_MODE 383 | REGULATOR_CHANGE_MODE
381 | REGULATOR_CHANGE_STATUS, 384 | REGULATOR_CHANGE_STATUS,
382 }, 385 },
383 .num_consumer_supplies = 1, 386 .num_consumer_supplies = ARRAY_SIZE(pandora_vmmc2_supply),
384 .consumer_supplies = &pandora_vmmc2_supply, 387 .consumer_supplies = pandora_vmmc2_supply,
385};
386
387/* VDAC for DSS driving S-Video */
388static struct regulator_init_data pandora_vdac = {
389 .constraints = {
390 .min_uV = 1800000,
391 .max_uV = 1800000,
392 .apply_uV = true,
393 .valid_modes_mask = REGULATOR_MODE_NORMAL
394 | REGULATOR_MODE_STANDBY,
395 .valid_ops_mask = REGULATOR_CHANGE_MODE
396 | REGULATOR_CHANGE_STATUS,
397 },
398 .num_consumer_supplies = 1,
399 .consumer_supplies = &pandora_vdda_dac_supply,
400};
401
402/* VPLL2 for digital video outputs */
403static struct regulator_init_data pandora_vpll2 = {
404 .constraints = {
405 .min_uV = 1800000,
406 .max_uV = 1800000,
407 .apply_uV = true,
408 .valid_modes_mask = REGULATOR_MODE_NORMAL
409 | REGULATOR_MODE_STANDBY,
410 .valid_ops_mask = REGULATOR_CHANGE_MODE
411 | REGULATOR_CHANGE_STATUS,
412 },
413 .num_consumer_supplies = ARRAY_SIZE(pandora_vdds_supplies),
414 .consumer_supplies = pandora_vdds_supplies,
415}; 388};
416 389
417/* VAUX1 for LCD */ 390/* VAUX1 for LCD */
@@ -425,8 +398,8 @@ static struct regulator_init_data pandora_vaux1 = {
425 .valid_ops_mask = REGULATOR_CHANGE_MODE 398 .valid_ops_mask = REGULATOR_CHANGE_MODE
426 | REGULATOR_CHANGE_STATUS, 399 | REGULATOR_CHANGE_STATUS,
427 }, 400 },
428 .num_consumer_supplies = 1, 401 .num_consumer_supplies = ARRAY_SIZE(pandora_vcc_lcd_supply),
429 .consumer_supplies = &pandora_vcc_lcd_supply, 402 .consumer_supplies = pandora_vcc_lcd_supply,
430}; 403};
431 404
432/* VAUX2 for USB host PHY */ 405/* VAUX2 for USB host PHY */
@@ -440,8 +413,8 @@ static struct regulator_init_data pandora_vaux2 = {
440 .valid_ops_mask = REGULATOR_CHANGE_MODE 413 .valid_ops_mask = REGULATOR_CHANGE_MODE
441 | REGULATOR_CHANGE_STATUS, 414 | REGULATOR_CHANGE_STATUS,
442 }, 415 },
443 .num_consumer_supplies = 1, 416 .num_consumer_supplies = ARRAY_SIZE(pandora_usb_phy_supply),
444 .consumer_supplies = &pandora_usb_phy_supply, 417 .consumer_supplies = pandora_usb_phy_supply,
445}; 418};
446 419
447/* VAUX4 for ads7846 and nubs */ 420/* VAUX4 for ads7846 and nubs */
@@ -470,8 +443,8 @@ static struct regulator_init_data pandora_vsim = {
470 .valid_ops_mask = REGULATOR_CHANGE_MODE 443 .valid_ops_mask = REGULATOR_CHANGE_MODE
471 | REGULATOR_CHANGE_STATUS, 444 | REGULATOR_CHANGE_STATUS,
472 }, 445 },
473 .num_consumer_supplies = 1, 446 .num_consumer_supplies = ARRAY_SIZE(pandora_adac_supply),
474 .consumer_supplies = &pandora_adac_supply, 447 .consumer_supplies = pandora_adac_supply,
475}; 448};
476 449
477/* Fixed regulator internal to Wifi module */ 450/* Fixed regulator internal to Wifi module */
@@ -479,8 +452,8 @@ static struct regulator_init_data pandora_vmmc3 = {
479 .constraints = { 452 .constraints = {
480 .valid_ops_mask = REGULATOR_CHANGE_STATUS, 453 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
481 }, 454 },
482 .num_consumer_supplies = 1, 455 .num_consumer_supplies = ARRAY_SIZE(pandora_vmmc3_supply),
483 .consumer_supplies = &pandora_vmmc3_supply, 456 .consumer_supplies = pandora_vmmc3_supply,
484}; 457};
485 458
486static struct fixed_voltage_config pandora_vwlan = { 459static struct fixed_voltage_config pandora_vwlan = {
@@ -501,29 +474,12 @@ static struct platform_device pandora_vwlan_device = {
501 }, 474 },
502}; 475};
503 476
504static struct twl4030_usb_data omap3pandora_usb_data = {
505 .usb_mode = T2_USB_MODE_ULPI,
506};
507
508static struct twl4030_codec_audio_data omap3pandora_audio_data;
509
510static struct twl4030_codec_data omap3pandora_codec_data = {
511 .audio_mclk = 26000000,
512 .audio = &omap3pandora_audio_data,
513};
514
515static struct twl4030_bci_platform_data pandora_bci_data; 477static struct twl4030_bci_platform_data pandora_bci_data;
516 478
517static struct twl4030_platform_data omap3pandora_twldata = { 479static struct twl4030_platform_data omap3pandora_twldata = {
518 .irq_base = TWL4030_IRQ_BASE,
519 .irq_end = TWL4030_IRQ_END,
520 .gpio = &omap3pandora_gpio_data, 480 .gpio = &omap3pandora_gpio_data,
521 .usb = &omap3pandora_usb_data,
522 .codec = &omap3pandora_codec_data,
523 .vmmc1 = &pandora_vmmc1, 481 .vmmc1 = &pandora_vmmc1,
524 .vmmc2 = &pandora_vmmc2, 482 .vmmc2 = &pandora_vmmc2,
525 .vdac = &pandora_vdac,
526 .vpll2 = &pandora_vpll2,
527 .vaux1 = &pandora_vaux1, 483 .vaux1 = &pandora_vaux1,
528 .vaux2 = &pandora_vaux2, 484 .vaux2 = &pandora_vaux2,
529 .vaux4 = &pandora_vaux4, 485 .vaux4 = &pandora_vaux4,
@@ -541,6 +497,17 @@ static struct i2c_board_info __initdata omap3pandora_i2c3_boardinfo[] = {
541 497
542static int __init omap3pandora_i2c_init(void) 498static int __init omap3pandora_i2c_init(void)
543{ 499{
500 omap3_pmic_get_config(&omap3pandora_twldata,
501 TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_AUDIO,
502 TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2);
503
504 omap3pandora_twldata.vdac->constraints.apply_uV = true;
505
506 omap3pandora_twldata.vpll2->constraints.apply_uV = true;
507 omap3pandora_twldata.vpll2->num_consumer_supplies =
508 ARRAY_SIZE(pandora_vdds_supplies);
509 omap3pandora_twldata.vpll2->consumer_supplies = pandora_vdds_supplies;
510
544 omap3_pmic_init("tps65950", &omap3pandora_twldata); 511 omap3_pmic_init("tps65950", &omap3pandora_twldata);
545 /* i2c2 pins are not connected */ 512 /* i2c2 pins are not connected */
546 omap_register_i2c_bus(3, 100, omap3pandora_i2c3_boardinfo, 513 omap_register_i2c_bus(3, 100, omap3pandora_i2c3_boardinfo,
@@ -643,7 +610,7 @@ MACHINE_START(OMAP3_PANDORA, "Pandora Handheld Console")
643 .reserve = omap_reserve, 610 .reserve = omap_reserve,
644 .map_io = omap3_map_io, 611 .map_io = omap3_map_io,
645 .init_early = omap3pandora_init_early, 612 .init_early = omap3pandora_init_early,
646 .init_irq = omap_init_irq, 613 .init_irq = omap3_init_irq,
647 .init_machine = omap3pandora_init, 614 .init_machine = omap3pandora_init,
648 .timer = &omap_timer, 615 .timer = &omap3_timer,
649MACHINE_END 616MACHINE_END
diff --git a/arch/arm/mach-omap2/board-omap3stalker.c b/arch/arm/mach-omap2/board-omap3stalker.c
index 0c108a212ea..8e104980ea2 100644
--- a/arch/arm/mach-omap2/board-omap3stalker.c
+++ b/arch/arm/mach-omap2/board-omap3stalker.c
@@ -52,7 +52,6 @@
52#include "sdram-micron-mt46h32m32lf-6.h" 52#include "sdram-micron-mt46h32m32lf-6.h"
53#include "mux.h" 53#include "mux.h"
54#include "hsmmc.h" 54#include "hsmmc.h"
55#include "timer-gp.h"
56#include "common-board-devices.h" 55#include "common-board-devices.h"
57 56
58#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE) 57#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE)
@@ -206,12 +205,12 @@ static struct omap_dss_board_info omap3_stalker_dss_data = {
206 .default_device = &omap3_stalker_dvi_device, 205 .default_device = &omap3_stalker_dvi_device,
207}; 206};
208 207
209static struct regulator_consumer_supply omap3stalker_vmmc1_supply = { 208static struct regulator_consumer_supply omap3stalker_vmmc1_supply[] = {
210 .supply = "vmmc", 209 REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
211}; 210};
212 211
213static struct regulator_consumer_supply omap3stalker_vsim_supply = { 212static struct regulator_consumer_supply omap3stalker_vsim_supply[] = {
214 .supply = "vmmc_aux", 213 REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.0"),
215}; 214};
216 215
217/* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */ 216/* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */
@@ -224,8 +223,8 @@ static struct regulator_init_data omap3stalker_vmmc1 = {
224 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE 223 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
225 | REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS, 224 | REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS,
226 }, 225 },
227 .num_consumer_supplies = 1, 226 .num_consumer_supplies = ARRAY_SIZE(omap3stalker_vmmc1_supply),
228 .consumer_supplies = &omap3stalker_vmmc1_supply, 227 .consumer_supplies = omap3stalker_vmmc1_supply,
229}; 228};
230 229
231/* VSIM for MMC1 pins DAT4..DAT7 (2 mA, plus card == max 50 mA) */ 230/* VSIM for MMC1 pins DAT4..DAT7 (2 mA, plus card == max 50 mA) */
@@ -238,8 +237,8 @@ static struct regulator_init_data omap3stalker_vsim = {
238 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE 237 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
239 | REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS, 238 | REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS,
240 }, 239 },
241 .num_consumer_supplies = 1, 240 .num_consumer_supplies = ARRAY_SIZE(omap3stalker_vsim_supply),
242 .consumer_supplies = &omap3stalker_vsim_supply, 241 .consumer_supplies = omap3stalker_vsim_supply,
243}; 242};
244 243
245static struct omap2_hsmmc_info mmc[] = { 244static struct omap2_hsmmc_info mmc[] = {
@@ -321,10 +320,6 @@ omap3stalker_twl_gpio_setup(struct device *dev,
321 mmc[0].gpio_cd = gpio + 0; 320 mmc[0].gpio_cd = gpio + 0;
322 omap2_hsmmc_init(mmc); 321 omap2_hsmmc_init(mmc);
323 322
324 /* link regulators to MMC adapters */
325 omap3stalker_vmmc1_supply.dev = mmc[0].dev;
326 omap3stalker_vsim_supply.dev = mmc[0].dev;
327
328 /* 323 /*
329 * Most GPIOs are for USB OTG. Some are mostly sent to 324 * Most GPIOs are for USB OTG. Some are mostly sent to
330 * the P2 connector; notably LEDA for the LCD backlight. 325 * the P2 connector; notably LEDA for the LCD backlight.
@@ -354,10 +349,6 @@ static struct twl4030_gpio_platform_data omap3stalker_gpio_data = {
354 .setup = omap3stalker_twl_gpio_setup, 349 .setup = omap3stalker_twl_gpio_setup,
355}; 350};
356 351
357static struct twl4030_usb_data omap3stalker_usb_data = {
358 .usb_mode = T2_USB_MODE_ULPI,
359};
360
361static uint32_t board_keymap[] = { 352static uint32_t board_keymap[] = {
362 KEY(0, 0, KEY_LEFT), 353 KEY(0, 0, KEY_LEFT),
363 KEY(0, 1, KEY_DOWN), 354 KEY(0, 1, KEY_DOWN),
@@ -392,68 +383,10 @@ static struct twl4030_keypad_data omap3stalker_kp_data = {
392 .rep = 1, 383 .rep = 1,
393}; 384};
394 385
395static struct twl4030_madc_platform_data omap3stalker_madc_data = {
396 .irq_line = 1,
397};
398
399static struct twl4030_codec_audio_data omap3stalker_audio_data;
400
401static struct twl4030_codec_data omap3stalker_codec_data = {
402 .audio_mclk = 26000000,
403 .audio = &omap3stalker_audio_data,
404};
405
406static struct regulator_consumer_supply omap3_stalker_vdda_dac_supply =
407 REGULATOR_SUPPLY("vdda_dac", "omapdss_venc");
408
409/* VDAC for DSS driving S-Video */
410static struct regulator_init_data omap3_stalker_vdac = {
411 .constraints = {
412 .min_uV = 1800000,
413 .max_uV = 1800000,
414 .apply_uV = true,
415 .valid_modes_mask = REGULATOR_MODE_NORMAL
416 | REGULATOR_MODE_STANDBY,
417 .valid_ops_mask = REGULATOR_CHANGE_MODE
418 | REGULATOR_CHANGE_STATUS,
419 },
420 .num_consumer_supplies = 1,
421 .consumer_supplies = &omap3_stalker_vdda_dac_supply,
422};
423
424/* VPLL2 for digital video outputs */
425static struct regulator_consumer_supply omap3_stalker_vpll2_supplies[] = {
426 REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
427 REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"),
428};
429
430static struct regulator_init_data omap3_stalker_vpll2 = {
431 .constraints = {
432 .name = "VDVI",
433 .min_uV = 1800000,
434 .max_uV = 1800000,
435 .apply_uV = true,
436 .valid_modes_mask = REGULATOR_MODE_NORMAL
437 | REGULATOR_MODE_STANDBY,
438 .valid_ops_mask = REGULATOR_CHANGE_MODE
439 | REGULATOR_CHANGE_STATUS,
440 },
441 .num_consumer_supplies = ARRAY_SIZE(omap3_stalker_vpll2_supplies),
442 .consumer_supplies = omap3_stalker_vpll2_supplies,
443};
444
445static struct twl4030_platform_data omap3stalker_twldata = { 386static struct twl4030_platform_data omap3stalker_twldata = {
446 .irq_base = TWL4030_IRQ_BASE,
447 .irq_end = TWL4030_IRQ_END,
448
449 /* platform_data for children goes here */ 387 /* platform_data for children goes here */
450 .keypad = &omap3stalker_kp_data, 388 .keypad = &omap3stalker_kp_data,
451 .madc = &omap3stalker_madc_data,
452 .usb = &omap3stalker_usb_data,
453 .gpio = &omap3stalker_gpio_data, 389 .gpio = &omap3stalker_gpio_data,
454 .codec = &omap3stalker_codec_data,
455 .vdac = &omap3_stalker_vdac,
456 .vpll2 = &omap3_stalker_vpll2,
457 .vmmc1 = &omap3stalker_vmmc1, 390 .vmmc1 = &omap3stalker_vmmc1,
458 .vsim = &omap3stalker_vsim, 391 .vsim = &omap3stalker_vsim,
459}; 392};
@@ -474,6 +407,15 @@ static struct i2c_board_info __initdata omap3stalker_i2c_boardinfo3[] = {
474 407
475static int __init omap3_stalker_i2c_init(void) 408static int __init omap3_stalker_i2c_init(void)
476{ 409{
410 omap3_pmic_get_config(&omap3stalker_twldata,
411 TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_MADC |
412 TWL_COMMON_PDATA_AUDIO,
413 TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2);
414
415 omap3stalker_twldata.vdac->constraints.apply_uV = true;
416 omap3stalker_twldata.vpll2->constraints.apply_uV = true;
417 omap3stalker_twldata.vpll2->constraints.name = "VDVI";
418
477 omap3_pmic_init("twl4030", &omap3stalker_twldata); 419 omap3_pmic_init("twl4030", &omap3stalker_twldata);
478 omap_register_i2c_bus(2, 400, NULL, 0); 420 omap_register_i2c_bus(2, 400, NULL, 0);
479 omap_register_i2c_bus(3, 400, omap3stalker_i2c_boardinfo3, 421 omap_register_i2c_bus(3, 400, omap3stalker_i2c_boardinfo3,
@@ -494,10 +436,7 @@ static void __init omap3_stalker_init_early(void)
494 436
495static void __init omap3_stalker_init_irq(void) 437static void __init omap3_stalker_init_irq(void)
496{ 438{
497 omap_init_irq(); 439 omap3_init_irq();
498#ifdef CONFIG_OMAP_32K_TIMER
499 omap2_gp_clockevent_set_gptimer(12);
500#endif
501} 440}
502 441
503static struct platform_device *omap3_stalker_devices[] __initdata = { 442static struct platform_device *omap3_stalker_devices[] __initdata = {
@@ -560,5 +499,5 @@ MACHINE_START(SBC3530, "OMAP3 STALKER")
560 .init_early = omap3_stalker_init_early, 499 .init_early = omap3_stalker_init_early,
561 .init_irq = omap3_stalker_init_irq, 500 .init_irq = omap3_stalker_init_irq,
562 .init_machine = omap3_stalker_init, 501 .init_machine = omap3_stalker_init,
563 .timer = &omap_timer, 502 .timer = &omap3_secure_timer,
564MACHINE_END 503MACHINE_END
diff --git a/arch/arm/mach-omap2/board-omap3touchbook.c b/arch/arm/mach-omap2/board-omap3touchbook.c
index 5f649faf737..852ea046405 100644
--- a/arch/arm/mach-omap2/board-omap3touchbook.c
+++ b/arch/arm/mach-omap2/board-omap3touchbook.c
@@ -51,7 +51,6 @@
51 51
52#include "mux.h" 52#include "mux.h"
53#include "hsmmc.h" 53#include "hsmmc.h"
54#include "timer-gp.h"
55#include "common-board-devices.h" 54#include "common-board-devices.h"
56 55
57#include <asm/setup.h> 56#include <asm/setup.h>
@@ -114,12 +113,12 @@ static struct omap_lcd_config omap3_touchbook_lcd_config __initdata = {
114 .ctrl_name = "internal", 113 .ctrl_name = "internal",
115}; 114};
116 115
117static struct regulator_consumer_supply touchbook_vmmc1_supply = { 116static struct regulator_consumer_supply touchbook_vmmc1_supply[] = {
118 .supply = "vmmc", 117 REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
119}; 118};
120 119
121static struct regulator_consumer_supply touchbook_vsim_supply = { 120static struct regulator_consumer_supply touchbook_vsim_supply[] = {
122 .supply = "vmmc_aux", 121 REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.0"),
123}; 122};
124 123
125static struct gpio_led gpio_leds[]; 124static struct gpio_led gpio_leds[];
@@ -137,10 +136,6 @@ static int touchbook_twl_gpio_setup(struct device *dev,
137 mmc[0].gpio_cd = gpio + 0; 136 mmc[0].gpio_cd = gpio + 0;
138 omap2_hsmmc_init(mmc); 137 omap2_hsmmc_init(mmc);
139 138
140 /* link regulators to MMC adapters */
141 touchbook_vmmc1_supply.dev = mmc[0].dev;
142 touchbook_vsim_supply.dev = mmc[0].dev;
143
144 /* REVISIT: need ehci-omap hooks for external VBUS 139 /* REVISIT: need ehci-omap hooks for external VBUS
145 * power switch and overcurrent detect 140 * power switch and overcurrent detect
146 */ 141 */
@@ -167,14 +162,18 @@ static struct twl4030_gpio_platform_data touchbook_gpio_data = {
167 .setup = touchbook_twl_gpio_setup, 162 .setup = touchbook_twl_gpio_setup,
168}; 163};
169 164
170static struct regulator_consumer_supply touchbook_vdac_supply = { 165static struct regulator_consumer_supply touchbook_vdac_supply[] = {
166{
171 .supply = "vdac", 167 .supply = "vdac",
172 .dev = &omap3_touchbook_lcd_device.dev, 168 .dev = &omap3_touchbook_lcd_device.dev,
169},
173}; 170};
174 171
175static struct regulator_consumer_supply touchbook_vdvi_supply = { 172static struct regulator_consumer_supply touchbook_vdvi_supply[] = {
173{
176 .supply = "vdvi", 174 .supply = "vdvi",
177 .dev = &omap3_touchbook_lcd_device.dev, 175 .dev = &omap3_touchbook_lcd_device.dev,
176},
178}; 177};
179 178
180/* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */ 179/* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */
@@ -188,8 +187,8 @@ static struct regulator_init_data touchbook_vmmc1 = {
188 | REGULATOR_CHANGE_MODE 187 | REGULATOR_CHANGE_MODE
189 | REGULATOR_CHANGE_STATUS, 188 | REGULATOR_CHANGE_STATUS,
190 }, 189 },
191 .num_consumer_supplies = 1, 190 .num_consumer_supplies = ARRAY_SIZE(touchbook_vmmc1_supply),
192 .consumer_supplies = &touchbook_vmmc1_supply, 191 .consumer_supplies = touchbook_vmmc1_supply,
193}; 192};
194 193
195/* VSIM for MMC1 pins DAT4..DAT7 (2 mA, plus card == max 50 mA) */ 194/* VSIM for MMC1 pins DAT4..DAT7 (2 mA, plus card == max 50 mA) */
@@ -203,62 +202,15 @@ static struct regulator_init_data touchbook_vsim = {
203 | REGULATOR_CHANGE_MODE 202 | REGULATOR_CHANGE_MODE
204 | REGULATOR_CHANGE_STATUS, 203 | REGULATOR_CHANGE_STATUS,
205 }, 204 },
206 .num_consumer_supplies = 1, 205 .num_consumer_supplies = ARRAY_SIZE(touchbook_vsim_supply),
207 .consumer_supplies = &touchbook_vsim_supply, 206 .consumer_supplies = touchbook_vsim_supply,
208};
209
210/* VDAC for DSS driving S-Video (8 mA unloaded, max 65 mA) */
211static struct regulator_init_data touchbook_vdac = {
212 .constraints = {
213 .min_uV = 1800000,
214 .max_uV = 1800000,
215 .valid_modes_mask = REGULATOR_MODE_NORMAL
216 | REGULATOR_MODE_STANDBY,
217 .valid_ops_mask = REGULATOR_CHANGE_MODE
218 | REGULATOR_CHANGE_STATUS,
219 },
220 .num_consumer_supplies = 1,
221 .consumer_supplies = &touchbook_vdac_supply,
222};
223
224/* VPLL2 for digital video outputs */
225static struct regulator_init_data touchbook_vpll2 = {
226 .constraints = {
227 .name = "VDVI",
228 .min_uV = 1800000,
229 .max_uV = 1800000,
230 .valid_modes_mask = REGULATOR_MODE_NORMAL
231 | REGULATOR_MODE_STANDBY,
232 .valid_ops_mask = REGULATOR_CHANGE_MODE
233 | REGULATOR_CHANGE_STATUS,
234 },
235 .num_consumer_supplies = 1,
236 .consumer_supplies = &touchbook_vdvi_supply,
237};
238
239static struct twl4030_usb_data touchbook_usb_data = {
240 .usb_mode = T2_USB_MODE_ULPI,
241};
242
243static struct twl4030_codec_audio_data touchbook_audio_data;
244
245static struct twl4030_codec_data touchbook_codec_data = {
246 .audio_mclk = 26000000,
247 .audio = &touchbook_audio_data,
248}; 207};
249 208
250static struct twl4030_platform_data touchbook_twldata = { 209static struct twl4030_platform_data touchbook_twldata = {
251 .irq_base = TWL4030_IRQ_BASE,
252 .irq_end = TWL4030_IRQ_END,
253
254 /* platform_data for children goes here */ 210 /* platform_data for children goes here */
255 .usb = &touchbook_usb_data,
256 .gpio = &touchbook_gpio_data, 211 .gpio = &touchbook_gpio_data,
257 .codec = &touchbook_codec_data,
258 .vmmc1 = &touchbook_vmmc1, 212 .vmmc1 = &touchbook_vmmc1,
259 .vsim = &touchbook_vsim, 213 .vsim = &touchbook_vsim,
260 .vdac = &touchbook_vdac,
261 .vpll2 = &touchbook_vpll2,
262}; 214};
263 215
264static struct i2c_board_info __initdata touchBook_i2c_boardinfo[] = { 216static struct i2c_board_info __initdata touchBook_i2c_boardinfo[] = {
@@ -270,8 +222,20 @@ static struct i2c_board_info __initdata touchBook_i2c_boardinfo[] = {
270static int __init omap3_touchbook_i2c_init(void) 222static int __init omap3_touchbook_i2c_init(void)
271{ 223{
272 /* Standard TouchBook bus */ 224 /* Standard TouchBook bus */
273 omap3_pmic_init("twl4030", &touchbook_twldata); 225 omap3_pmic_get_config(&touchbook_twldata,
226 TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_AUDIO,
227 TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2);
228
229 touchbook_twldata.vdac->num_consumer_supplies =
230 ARRAY_SIZE(touchbook_vdac_supply);
231 touchbook_twldata.vdac->consumer_supplies = touchbook_vdac_supply;
274 232
233 touchbook_twldata.vpll2->constraints.name = "VDVI";
234 touchbook_twldata.vpll2->num_consumer_supplies =
235 ARRAY_SIZE(touchbook_vdvi_supply);
236 touchbook_twldata.vpll2->consumer_supplies = touchbook_vdvi_supply;
237
238 omap3_pmic_init("twl4030", &touchbook_twldata);
275 /* Additional TouchBook bus */ 239 /* Additional TouchBook bus */
276 omap_register_i2c_bus(3, 100, touchBook_i2c_boardinfo, 240 omap_register_i2c_bus(3, 100, touchBook_i2c_boardinfo,
277 ARRAY_SIZE(touchBook_i2c_boardinfo)); 241 ARRAY_SIZE(touchBook_i2c_boardinfo));
@@ -371,10 +335,7 @@ static void __init omap3_touchbook_init_early(void)
371 335
372static void __init omap3_touchbook_init_irq(void) 336static void __init omap3_touchbook_init_irq(void)
373{ 337{
374 omap_init_irq(); 338 omap3_init_irq();
375#ifdef CONFIG_OMAP_32K_TIMER
376 omap2_gp_clockevent_set_gptimer(12);
377#endif
378} 339}
379 340
380static struct platform_device *omap3_touchbook_devices[] __initdata = { 341static struct platform_device *omap3_touchbook_devices[] __initdata = {
@@ -449,5 +410,5 @@ MACHINE_START(TOUCHBOOK, "OMAP3 touchbook Board")
449 .init_early = omap3_touchbook_init_early, 410 .init_early = omap3_touchbook_init_early,
450 .init_irq = omap3_touchbook_init_irq, 411 .init_irq = omap3_touchbook_init_irq,
451 .init_machine = omap3_touchbook_init, 412 .init_machine = omap3_touchbook_init,
452 .timer = &omap_timer, 413 .timer = &omap3_secure_timer,
453MACHINE_END 414MACHINE_END
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
index 0cfe2005cb5..9aaa9605766 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -41,7 +41,6 @@
41#include <plat/usb.h> 41#include <plat/usb.h>
42#include <plat/mmc.h> 42#include <plat/mmc.h>
43#include <video/omap-panel-generic-dpi.h> 43#include <video/omap-panel-generic-dpi.h>
44#include "timer-gp.h"
45 44
46#include "hsmmc.h" 45#include "hsmmc.h"
47#include "control.h" 46#include "control.h"
@@ -155,14 +154,6 @@ static struct omap_musb_board_data musb_board_data = {
155 .power = 100, 154 .power = 100,
156}; 155};
157 156
158static struct twl4030_usb_data omap4_usbphy_data = {
159 .phy_init = omap4430_phy_init,
160 .phy_exit = omap4430_phy_exit,
161 .phy_power = omap4430_phy_power,
162 .phy_set_clock = omap4430_phy_set_clk,
163 .phy_suspend = omap4430_phy_suspend,
164};
165
166static struct omap2_hsmmc_info mmc[] = { 157static struct omap2_hsmmc_info mmc[] = {
167 { 158 {
168 .mmc = 1, 159 .mmc = 1,
@@ -182,24 +173,16 @@ static struct omap2_hsmmc_info mmc[] = {
182 {} /* Terminator */ 173 {} /* Terminator */
183}; 174};
184 175
185static struct regulator_consumer_supply omap4_panda_vmmc_supply[] = { 176static struct regulator_consumer_supply omap4_panda_vmmc5_supply[] = {
186 { 177 REGULATOR_SUPPLY("vmmc", "omap_hsmmc.4"),
187 .supply = "vmmc",
188 .dev_name = "omap_hsmmc.0",
189 },
190};
191
192static struct regulator_consumer_supply omap4_panda_vmmc5_supply = {
193 .supply = "vmmc",
194 .dev_name = "omap_hsmmc.4",
195}; 178};
196 179
197static struct regulator_init_data panda_vmmc5 = { 180static struct regulator_init_data panda_vmmc5 = {
198 .constraints = { 181 .constraints = {
199 .valid_ops_mask = REGULATOR_CHANGE_STATUS, 182 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
200 }, 183 },
201 .num_consumer_supplies = 1, 184 .num_consumer_supplies = ARRAY_SIZE(omap4_panda_vmmc5_supply),
202 .consumer_supplies = &omap4_panda_vmmc5_supply, 185 .consumer_supplies = omap4_panda_vmmc5_supply,
203}; 186};
204 187
205static struct fixed_voltage_config panda_vwlan = { 188static struct fixed_voltage_config panda_vwlan = {
@@ -274,128 +257,8 @@ static int __init omap4_twl6030_hsmmc_init(struct omap2_hsmmc_info *controllers)
274 return 0; 257 return 0;
275} 258}
276 259
277static struct regulator_init_data omap4_panda_vaux2 = { 260/* Panda board uses the common PMIC configuration */
278 .constraints = { 261static struct twl4030_platform_data omap4_panda_twldata;
279 .min_uV = 1200000,
280 .max_uV = 2800000,
281 .apply_uV = true,
282 .valid_modes_mask = REGULATOR_MODE_NORMAL
283 | REGULATOR_MODE_STANDBY,
284 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
285 | REGULATOR_CHANGE_MODE
286 | REGULATOR_CHANGE_STATUS,
287 },
288};
289
290static struct regulator_init_data omap4_panda_vaux3 = {
291 .constraints = {
292 .min_uV = 1000000,
293 .max_uV = 3000000,
294 .apply_uV = true,
295 .valid_modes_mask = REGULATOR_MODE_NORMAL
296 | REGULATOR_MODE_STANDBY,
297 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
298 | REGULATOR_CHANGE_MODE
299 | REGULATOR_CHANGE_STATUS,
300 },
301};
302
303/* VMMC1 for MMC1 card */
304static struct regulator_init_data omap4_panda_vmmc = {
305 .constraints = {
306 .min_uV = 1200000,
307 .max_uV = 3000000,
308 .apply_uV = true,
309 .valid_modes_mask = REGULATOR_MODE_NORMAL
310 | REGULATOR_MODE_STANDBY,
311 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
312 | REGULATOR_CHANGE_MODE
313 | REGULATOR_CHANGE_STATUS,
314 },
315 .num_consumer_supplies = 1,
316 .consumer_supplies = omap4_panda_vmmc_supply,
317};
318
319static struct regulator_init_data omap4_panda_vpp = {
320 .constraints = {
321 .min_uV = 1800000,
322 .max_uV = 2500000,
323 .apply_uV = true,
324 .valid_modes_mask = REGULATOR_MODE_NORMAL
325 | REGULATOR_MODE_STANDBY,
326 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
327 | REGULATOR_CHANGE_MODE
328 | REGULATOR_CHANGE_STATUS,
329 },
330};
331
332static struct regulator_init_data omap4_panda_vana = {
333 .constraints = {
334 .min_uV = 2100000,
335 .max_uV = 2100000,
336 .valid_modes_mask = REGULATOR_MODE_NORMAL
337 | REGULATOR_MODE_STANDBY,
338 .valid_ops_mask = REGULATOR_CHANGE_MODE
339 | REGULATOR_CHANGE_STATUS,
340 },
341};
342
343static struct regulator_init_data omap4_panda_vcxio = {
344 .constraints = {
345 .min_uV = 1800000,
346 .max_uV = 1800000,
347 .valid_modes_mask = REGULATOR_MODE_NORMAL
348 | REGULATOR_MODE_STANDBY,
349 .valid_ops_mask = REGULATOR_CHANGE_MODE
350 | REGULATOR_CHANGE_STATUS,
351 },
352};
353
354static struct regulator_init_data omap4_panda_vdac = {
355 .constraints = {
356 .min_uV = 1800000,
357 .max_uV = 1800000,
358 .valid_modes_mask = REGULATOR_MODE_NORMAL
359 | REGULATOR_MODE_STANDBY,
360 .valid_ops_mask = REGULATOR_CHANGE_MODE
361 | REGULATOR_CHANGE_STATUS,
362 },
363};
364
365static struct regulator_init_data omap4_panda_vusb = {
366 .constraints = {
367 .min_uV = 3300000,
368 .max_uV = 3300000,
369 .apply_uV = true,
370 .valid_modes_mask = REGULATOR_MODE_NORMAL
371 | REGULATOR_MODE_STANDBY,
372 .valid_ops_mask = REGULATOR_CHANGE_MODE
373 | REGULATOR_CHANGE_STATUS,
374 },
375};
376
377static struct regulator_init_data omap4_panda_clk32kg = {
378 .constraints = {
379 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
380 },
381};
382
383static struct twl4030_platform_data omap4_panda_twldata = {
384 .irq_base = TWL6030_IRQ_BASE,
385 .irq_end = TWL6030_IRQ_END,
386
387 /* Regulators */
388 .vmmc = &omap4_panda_vmmc,
389 .vpp = &omap4_panda_vpp,
390 .vana = &omap4_panda_vana,
391 .vcxio = &omap4_panda_vcxio,
392 .vdac = &omap4_panda_vdac,
393 .vusb = &omap4_panda_vusb,
394 .vaux2 = &omap4_panda_vaux2,
395 .vaux3 = &omap4_panda_vaux3,
396 .clk32kg = &omap4_panda_clk32kg,
397 .usb = &omap4_usbphy_data,
398};
399 262
400/* 263/*
401 * Display monitor features are burnt in their EEPROM as EDID data. The EEPROM 264 * Display monitor features are burnt in their EEPROM as EDID data. The EEPROM
@@ -409,6 +272,16 @@ static struct i2c_board_info __initdata panda_i2c_eeprom[] = {
409 272
410static int __init omap4_panda_i2c_init(void) 273static int __init omap4_panda_i2c_init(void)
411{ 274{
275 omap4_pmic_get_config(&omap4_panda_twldata, TWL_COMMON_PDATA_USB,
276 TWL_COMMON_REGULATOR_VDAC |
277 TWL_COMMON_REGULATOR_VAUX2 |
278 TWL_COMMON_REGULATOR_VAUX3 |
279 TWL_COMMON_REGULATOR_VMMC |
280 TWL_COMMON_REGULATOR_VPP |
281 TWL_COMMON_REGULATOR_VANA |
282 TWL_COMMON_REGULATOR_VCXIO |
283 TWL_COMMON_REGULATOR_VUSB |
284 TWL_COMMON_REGULATOR_CLK32KG);
412 omap4_pmic_init("twl6030", &omap4_panda_twldata); 285 omap4_pmic_init("twl6030", &omap4_panda_twldata);
413 omap_register_i2c_bus(2, 400, NULL, 0); 286 omap_register_i2c_bus(2, 400, NULL, 0);
414 /* 287 /*
@@ -716,5 +589,5 @@ MACHINE_START(OMAP4_PANDA, "OMAP4 Panda board")
716 .init_early = omap4_panda_init_early, 589 .init_early = omap4_panda_init_early,
717 .init_irq = gic_init_irq, 590 .init_irq = gic_init_irq,
718 .init_machine = omap4_panda_init, 591 .init_machine = omap4_panda_init,
719 .timer = &omap_timer, 592 .timer = &omap4_timer,
720MACHINE_END 593MACHINE_END
diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c
index 175e1ab2b04..f949a9954d7 100644
--- a/arch/arm/mach-omap2/board-overo.c
+++ b/arch/arm/mach-omap2/board-overo.c
@@ -74,15 +74,16 @@
74 defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE) 74 defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE)
75 75
76/* fixed regulator for ads7846 */ 76/* fixed regulator for ads7846 */
77static struct regulator_consumer_supply ads7846_supply = 77static struct regulator_consumer_supply ads7846_supply[] = {
78 REGULATOR_SUPPLY("vcc", "spi1.0"); 78 REGULATOR_SUPPLY("vcc", "spi1.0"),
79};
79 80
80static struct regulator_init_data vads7846_regulator = { 81static struct regulator_init_data vads7846_regulator = {
81 .constraints = { 82 .constraints = {
82 .valid_ops_mask = REGULATOR_CHANGE_STATUS, 83 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
83 }, 84 },
84 .num_consumer_supplies = 1, 85 .num_consumer_supplies = ARRAY_SIZE(ads7846_supply),
85 .consumer_supplies = &ads7846_supply, 86 .consumer_supplies = ads7846_supply,
86}; 87};
87 88
88static struct fixed_voltage_config vads7846 = { 89static struct fixed_voltage_config vads7846 = {
@@ -264,14 +265,6 @@ static struct omap_dss_board_info overo_dss_data = {
264 .default_device = &overo_dvi_device, 265 .default_device = &overo_dvi_device,
265}; 266};
266 267
267static struct regulator_consumer_supply overo_vdda_dac_supply =
268 REGULATOR_SUPPLY("vdda_dac", "omapdss_venc");
269
270static struct regulator_consumer_supply overo_vdds_dsi_supply[] = {
271 REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
272 REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"),
273};
274
275static struct mtd_partition overo_nand_partitions[] = { 268static struct mtd_partition overo_nand_partitions[] = {
276 { 269 {
277 .name = "xloader", 270 .name = "xloader",
@@ -319,8 +312,8 @@ static struct omap2_hsmmc_info mmc[] = {
319 {} /* Terminator */ 312 {} /* Terminator */
320}; 313};
321 314
322static struct regulator_consumer_supply overo_vmmc1_supply = { 315static struct regulator_consumer_supply overo_vmmc1_supply[] = {
323 .supply = "vmmc", 316 REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
324}; 317};
325 318
326#if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE) 319#if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE)
@@ -415,8 +408,6 @@ static int overo_twl_gpio_setup(struct device *dev,
415{ 408{
416 omap2_hsmmc_init(mmc); 409 omap2_hsmmc_init(mmc);
417 410
418 overo_vmmc1_supply.dev = mmc[0].dev;
419
420#if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE) 411#if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE)
421 /* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */ 412 /* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */
422 gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1; 413 gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1;
@@ -433,10 +424,6 @@ static struct twl4030_gpio_platform_data overo_gpio_data = {
433 .setup = overo_twl_gpio_setup, 424 .setup = overo_twl_gpio_setup,
434}; 425};
435 426
436static struct twl4030_usb_data overo_usb_data = {
437 .usb_mode = T2_USB_MODE_ULPI,
438};
439
440static struct regulator_init_data overo_vmmc1 = { 427static struct regulator_init_data overo_vmmc1 = {
441 .constraints = { 428 .constraints = {
442 .min_uV = 1850000, 429 .min_uV = 1850000,
@@ -447,59 +434,23 @@ static struct regulator_init_data overo_vmmc1 = {
447 | REGULATOR_CHANGE_MODE 434 | REGULATOR_CHANGE_MODE
448 | REGULATOR_CHANGE_STATUS, 435 | REGULATOR_CHANGE_STATUS,
449 }, 436 },
450 .num_consumer_supplies = 1, 437 .num_consumer_supplies = ARRAY_SIZE(overo_vmmc1_supply),
451 .consumer_supplies = &overo_vmmc1_supply, 438 .consumer_supplies = overo_vmmc1_supply,
452};
453
454/* VDAC for DSS driving S-Video (8 mA unloaded, max 65 mA) */
455static struct regulator_init_data overo_vdac = {
456 .constraints = {
457 .min_uV = 1800000,
458 .max_uV = 1800000,
459 .valid_modes_mask = REGULATOR_MODE_NORMAL
460 | REGULATOR_MODE_STANDBY,
461 .valid_ops_mask = REGULATOR_CHANGE_MODE
462 | REGULATOR_CHANGE_STATUS,
463 },
464 .num_consumer_supplies = 1,
465 .consumer_supplies = &overo_vdda_dac_supply,
466};
467
468/* VPLL2 for digital video outputs */
469static struct regulator_init_data overo_vpll2 = {
470 .constraints = {
471 .name = "VDVI",
472 .min_uV = 1800000,
473 .max_uV = 1800000,
474 .valid_modes_mask = REGULATOR_MODE_NORMAL
475 | REGULATOR_MODE_STANDBY,
476 .valid_ops_mask = REGULATOR_CHANGE_MODE
477 | REGULATOR_CHANGE_STATUS,
478 },
479 .num_consumer_supplies = ARRAY_SIZE(overo_vdds_dsi_supply),
480 .consumer_supplies = overo_vdds_dsi_supply,
481};
482
483static struct twl4030_codec_audio_data overo_audio_data;
484
485static struct twl4030_codec_data overo_codec_data = {
486 .audio_mclk = 26000000,
487 .audio = &overo_audio_data,
488}; 439};
489 440
490static struct twl4030_platform_data overo_twldata = { 441static struct twl4030_platform_data overo_twldata = {
491 .irq_base = TWL4030_IRQ_BASE,
492 .irq_end = TWL4030_IRQ_END,
493 .gpio = &overo_gpio_data, 442 .gpio = &overo_gpio_data,
494 .usb = &overo_usb_data,
495 .codec = &overo_codec_data,
496 .vmmc1 = &overo_vmmc1, 443 .vmmc1 = &overo_vmmc1,
497 .vdac = &overo_vdac,
498 .vpll2 = &overo_vpll2,
499}; 444};
500 445
501static int __init overo_i2c_init(void) 446static int __init overo_i2c_init(void)
502{ 447{
448 omap3_pmic_get_config(&overo_twldata,
449 TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_AUDIO,
450 TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2);
451
452 overo_twldata.vpll2->constraints.name = "VDVI";
453
503 omap3_pmic_init("tps65950", &overo_twldata); 454 omap3_pmic_init("tps65950", &overo_twldata);
504 /* i2c2 pins are used for gpio */ 455 /* i2c2 pins are used for gpio */
505 omap_register_i2c_bus(3, 400, NULL, 0); 456 omap_register_i2c_bus(3, 400, NULL, 0);
@@ -568,7 +519,6 @@ static void __init overo_init(void)
568 usb_musb_init(NULL); 519 usb_musb_init(NULL);
569 usbhs_init(&usbhs_bdata); 520 usbhs_init(&usbhs_bdata);
570 overo_spi_init(); 521 overo_spi_init();
571 overo_ads7846_init();
572 overo_init_smsc911x(); 522 overo_init_smsc911x();
573 overo_display_init(); 523 overo_display_init();
574 overo_init_led(); 524 overo_init_led();
@@ -615,7 +565,7 @@ MACHINE_START(OVERO, "Gumstix Overo")
615 .reserve = omap_reserve, 565 .reserve = omap_reserve,
616 .map_io = omap3_map_io, 566 .map_io = omap3_map_io,
617 .init_early = overo_init_early, 567 .init_early = overo_init_early,
618 .init_irq = omap_init_irq, 568 .init_irq = omap3_init_irq,
619 .init_machine = overo_init, 569 .init_machine = overo_init,
620 .timer = &omap_timer, 570 .timer = &omap3_timer,
621MACHINE_END 571MACHINE_END
diff --git a/arch/arm/mach-omap2/board-rm680.c b/arch/arm/mach-omap2/board-rm680.c
index 42d10b12da3..7dfed24ee12 100644
--- a/arch/arm/mach-omap2/board-rm680.c
+++ b/arch/arm/mach-omap2/board-rm680.c
@@ -79,20 +79,14 @@ static struct twl4030_gpio_platform_data rm680_gpio_data = {
79 .pulldowns = BIT(1) | BIT(2) | BIT(8) | BIT(15), 79 .pulldowns = BIT(1) | BIT(2) | BIT(8) | BIT(15),
80}; 80};
81 81
82static struct twl4030_usb_data rm680_usb_data = {
83 .usb_mode = T2_USB_MODE_ULPI,
84};
85
86static struct twl4030_platform_data rm680_twl_data = { 82static struct twl4030_platform_data rm680_twl_data = {
87 .irq_base = TWL4030_IRQ_BASE,
88 .irq_end = TWL4030_IRQ_END,
89 .gpio = &rm680_gpio_data, 83 .gpio = &rm680_gpio_data,
90 .usb = &rm680_usb_data,
91 /* add rest of the children here */ 84 /* add rest of the children here */
92}; 85};
93 86
94static void __init rm680_i2c_init(void) 87static void __init rm680_i2c_init(void)
95{ 88{
89 omap3_pmic_get_config(&rm680_twl_data, TWL_COMMON_PDATA_USB, 0);
96 omap_pmic_init(1, 2900, "twl5031", INT_34XX_SYS_NIRQ, &rm680_twl_data); 90 omap_pmic_init(1, 2900, "twl5031", INT_34XX_SYS_NIRQ, &rm680_twl_data);
97 omap_register_i2c_bus(2, 400, NULL, 0); 91 omap_register_i2c_bus(2, 400, NULL, 0);
98 omap_register_i2c_bus(3, 400, NULL, 0); 92 omap_register_i2c_bus(3, 400, NULL, 0);
@@ -163,7 +157,7 @@ MACHINE_START(NOKIA_RM680, "Nokia RM-680 board")
163 .reserve = omap_reserve, 157 .reserve = omap_reserve,
164 .map_io = rm680_map_io, 158 .map_io = rm680_map_io,
165 .init_early = rm680_init_early, 159 .init_early = rm680_init_early,
166 .init_irq = omap_init_irq, 160 .init_irq = omap3_init_irq,
167 .init_machine = rm680_init, 161 .init_machine = rm680_init,
168 .timer = &omap_timer, 162 .timer = &omap3_timer,
169MACHINE_END 163MACHINE_END
diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c
index 88bd6f7705f..cc503aa89c5 100644
--- a/arch/arm/mach-omap2/board-rx51-peripherals.c
+++ b/arch/arm/mach-omap2/board-rx51-peripherals.c
@@ -39,6 +39,7 @@
39#include <sound/tpa6130a2-plat.h> 39#include <sound/tpa6130a2-plat.h>
40#include <media/radio-si4713.h> 40#include <media/radio-si4713.h>
41#include <media/si4713.h> 41#include <media/si4713.h>
42#include <linux/leds-lp5523.h>
42 43
43#include <../drivers/staging/iio/light/tsl2563.h> 44#include <../drivers/staging/iio/light/tsl2563.h>
44 45
@@ -53,6 +54,7 @@
53#define RX51_WL1251_IRQ_GPIO 42 54#define RX51_WL1251_IRQ_GPIO 42
54#define RX51_FMTX_RESET_GPIO 163 55#define RX51_FMTX_RESET_GPIO 163
55#define RX51_FMTX_IRQ 53 56#define RX51_FMTX_IRQ 53
57#define RX51_LP5523_CHIP_EN_GPIO 41
56 58
57#define RX51_USB_TRANSCEIVER_RST_GPIO 67 59#define RX51_USB_TRANSCEIVER_RST_GPIO 67
58 60
@@ -71,6 +73,64 @@ static struct tsl2563_platform_data rx51_tsl2563_platform_data = {
71}; 73};
72#endif 74#endif
73 75
76#if defined(CONFIG_LEDS_LP5523) || defined(CONFIG_LEDS_LP5523_MODULE)
77static struct lp5523_led_config rx51_lp5523_led_config[] = {
78 {
79 .chan_nr = 0,
80 .led_current = 50,
81 }, {
82 .chan_nr = 1,
83 .led_current = 50,
84 }, {
85 .chan_nr = 2,
86 .led_current = 50,
87 }, {
88 .chan_nr = 3,
89 .led_current = 50,
90 }, {
91 .chan_nr = 4,
92 .led_current = 50,
93 }, {
94 .chan_nr = 5,
95 .led_current = 50,
96 }, {
97 .chan_nr = 6,
98 .led_current = 50,
99 }, {
100 .chan_nr = 7,
101 .led_current = 50,
102 }, {
103 .chan_nr = 8,
104 .led_current = 50,
105 }
106};
107
108static int rx51_lp5523_setup(void)
109{
110 return gpio_request_one(RX51_LP5523_CHIP_EN_GPIO, GPIOF_DIR_OUT,
111 "lp5523_enable");
112}
113
114static void rx51_lp5523_release(void)
115{
116 gpio_free(RX51_LP5523_CHIP_EN_GPIO);
117}
118
119static void rx51_lp5523_enable(bool state)
120{
121 gpio_set_value(RX51_LP5523_CHIP_EN_GPIO, !!state);
122}
123
124static struct lp5523_platform_data rx51_lp5523_platform_data = {
125 .led_config = rx51_lp5523_led_config,
126 .num_channels = ARRAY_SIZE(rx51_lp5523_led_config),
127 .clock_mode = LP5523_CLOCK_AUTO,
128 .setup_resources = rx51_lp5523_setup,
129 .release_resources = rx51_lp5523_release,
130 .enable = rx51_lp5523_enable,
131};
132#endif
133
74static struct omap2_mcspi_device_config wl1251_mcspi_config = { 134static struct omap2_mcspi_device_config wl1251_mcspi_config = {
75 .turbo_mode = 0, 135 .turbo_mode = 0,
76 .single_channel = 1, 136 .single_channel = 1,
@@ -288,10 +348,6 @@ static struct twl4030_keypad_data rx51_kp_data = {
288 .rep = 1, 348 .rep = 1,
289}; 349};
290 350
291static struct twl4030_madc_platform_data rx51_madc_data = {
292 .irq_line = 1,
293};
294
295/* Enable input logic and pull all lines up when eMMC is on. */ 351/* Enable input logic and pull all lines up when eMMC is on. */
296static struct omap_board_mux rx51_mmc2_on_mux[] = { 352static struct omap_board_mux rx51_mmc2_on_mux[] = {
297 OMAP3_MUX(SDMMC2_CMD, OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0), 353 OMAP3_MUX(SDMMC2_CMD, OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0),
@@ -358,14 +414,17 @@ static struct omap2_hsmmc_info mmc[] __initdata = {
358 {} /* Terminator */ 414 {} /* Terminator */
359}; 415};
360 416
361static struct regulator_consumer_supply rx51_vmmc1_supply = 417static struct regulator_consumer_supply rx51_vmmc1_supply[] = {
362 REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"); 418 REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
419};
363 420
364static struct regulator_consumer_supply rx51_vaux3_supply = 421static struct regulator_consumer_supply rx51_vaux3_supply[] = {
365 REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"); 422 REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"),
423};
366 424
367static struct regulator_consumer_supply rx51_vsim_supply = 425static struct regulator_consumer_supply rx51_vsim_supply[] = {
368 REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.1"); 426 REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.1"),
427};
369 428
370static struct regulator_consumer_supply rx51_vmmc2_supplies[] = { 429static struct regulator_consumer_supply rx51_vmmc2_supplies[] = {
371 /* tlv320aic3x analog supplies */ 430 /* tlv320aic3x analog supplies */
@@ -395,10 +454,6 @@ static struct regulator_consumer_supply rx51_vaux1_consumers[] = {
395 REGULATOR_SUPPLY("vdd", "2-0063"), 454 REGULATOR_SUPPLY("vdd", "2-0063"),
396}; 455};
397 456
398static struct regulator_consumer_supply rx51_vdac_supply[] = {
399 REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"),
400};
401
402static struct regulator_init_data rx51_vaux1 = { 457static struct regulator_init_data rx51_vaux1 = {
403 .constraints = { 458 .constraints = {
404 .name = "V28", 459 .name = "V28",
@@ -452,8 +507,8 @@ static struct regulator_init_data rx51_vaux3_mmc = {
452 | REGULATOR_CHANGE_MODE 507 | REGULATOR_CHANGE_MODE
453 | REGULATOR_CHANGE_STATUS, 508 | REGULATOR_CHANGE_STATUS,
454 }, 509 },
455 .num_consumer_supplies = 1, 510 .num_consumer_supplies = ARRAY_SIZE(rx51_vaux3_supply),
456 .consumer_supplies = &rx51_vaux3_supply, 511 .consumer_supplies = rx51_vaux3_supply,
457}; 512};
458 513
459static struct regulator_init_data rx51_vaux4 = { 514static struct regulator_init_data rx51_vaux4 = {
@@ -479,8 +534,8 @@ static struct regulator_init_data rx51_vmmc1 = {
479 | REGULATOR_CHANGE_MODE 534 | REGULATOR_CHANGE_MODE
480 | REGULATOR_CHANGE_STATUS, 535 | REGULATOR_CHANGE_STATUS,
481 }, 536 },
482 .num_consumer_supplies = 1, 537 .num_consumer_supplies = ARRAY_SIZE(rx51_vmmc1_supply),
483 .consumer_supplies = &rx51_vmmc1_supply, 538 .consumer_supplies = rx51_vmmc1_supply,
484}; 539};
485 540
486static struct regulator_init_data rx51_vmmc2 = { 541static struct regulator_init_data rx51_vmmc2 = {
@@ -500,24 +555,35 @@ static struct regulator_init_data rx51_vmmc2 = {
500 .consumer_supplies = rx51_vmmc2_supplies, 555 .consumer_supplies = rx51_vmmc2_supplies,
501}; 556};
502 557
503static struct regulator_init_data rx51_vsim = { 558static struct regulator_init_data rx51_vpll1 = {
504 .constraints = { 559 .constraints = {
505 .name = "VMMC2_IO_18", 560 .name = "VPLL",
506 .min_uV = 1800000, 561 .min_uV = 1800000,
507 .max_uV = 1800000, 562 .max_uV = 1800000,
508 .apply_uV = true, 563 .apply_uV = true,
564 .always_on = true,
509 .valid_modes_mask = REGULATOR_MODE_NORMAL 565 .valid_modes_mask = REGULATOR_MODE_NORMAL
510 | REGULATOR_MODE_STANDBY, 566 | REGULATOR_MODE_STANDBY,
511 .valid_ops_mask = REGULATOR_CHANGE_MODE 567 .valid_ops_mask = REGULATOR_CHANGE_MODE,
512 | REGULATOR_CHANGE_STATUS, 568 },
569};
570
571static struct regulator_init_data rx51_vpll2 = {
572 .constraints = {
573 .name = "VSDI_CSI",
574 .min_uV = 1800000,
575 .max_uV = 1800000,
576 .apply_uV = true,
577 .always_on = true,
578 .valid_modes_mask = REGULATOR_MODE_NORMAL
579 | REGULATOR_MODE_STANDBY,
580 .valid_ops_mask = REGULATOR_CHANGE_MODE,
513 }, 581 },
514 .num_consumer_supplies = 1,
515 .consumer_supplies = &rx51_vsim_supply,
516}; 582};
517 583
518static struct regulator_init_data rx51_vdac = { 584static struct regulator_init_data rx51_vsim = {
519 .constraints = { 585 .constraints = {
520 .name = "VDAC", 586 .name = "VMMC2_IO_18",
521 .min_uV = 1800000, 587 .min_uV = 1800000,
522 .max_uV = 1800000, 588 .max_uV = 1800000,
523 .apply_uV = true, 589 .apply_uV = true,
@@ -526,8 +592,8 @@ static struct regulator_init_data rx51_vdac = {
526 .valid_ops_mask = REGULATOR_CHANGE_MODE 592 .valid_ops_mask = REGULATOR_CHANGE_MODE
527 | REGULATOR_CHANGE_STATUS, 593 | REGULATOR_CHANGE_STATUS,
528 }, 594 },
529 .num_consumer_supplies = 1, 595 .num_consumer_supplies = ARRAY_SIZE(rx51_vsim_supply),
530 .consumer_supplies = rx51_vdac_supply, 596 .consumer_supplies = rx51_vsim_supply,
531}; 597};
532 598
533static struct regulator_init_data rx51_vio = { 599static struct regulator_init_data rx51_vio = {
@@ -544,6 +610,43 @@ static struct regulator_init_data rx51_vio = {
544 .consumer_supplies = rx51_vio_supplies, 610 .consumer_supplies = rx51_vio_supplies,
545}; 611};
546 612
613static struct regulator_init_data rx51_vintana1 = {
614 .constraints = {
615 .name = "VINTANA1",
616 .min_uV = 1500000,
617 .max_uV = 1500000,
618 .always_on = true,
619 .valid_modes_mask = REGULATOR_MODE_NORMAL
620 | REGULATOR_MODE_STANDBY,
621 .valid_ops_mask = REGULATOR_CHANGE_MODE,
622 },
623};
624
625static struct regulator_init_data rx51_vintana2 = {
626 .constraints = {
627 .name = "VINTANA2",
628 .min_uV = 2750000,
629 .max_uV = 2750000,
630 .apply_uV = true,
631 .always_on = true,
632 .valid_modes_mask = REGULATOR_MODE_NORMAL
633 | REGULATOR_MODE_STANDBY,
634 .valid_ops_mask = REGULATOR_CHANGE_MODE,
635 },
636};
637
638static struct regulator_init_data rx51_vintdig = {
639 .constraints = {
640 .name = "VINTDIG",
641 .min_uV = 1500000,
642 .max_uV = 1500000,
643 .always_on = true,
644 .valid_modes_mask = REGULATOR_MODE_NORMAL
645 | REGULATOR_MODE_STANDBY,
646 .valid_ops_mask = REGULATOR_CHANGE_MODE,
647 },
648};
649
547static struct si4713_platform_data rx51_si4713_i2c_data __initdata_or_module = { 650static struct si4713_platform_data rx51_si4713_i2c_data __initdata_or_module = {
548 .gpio_reset = RX51_FMTX_RESET_GPIO, 651 .gpio_reset = RX51_FMTX_RESET_GPIO,
549}; 652};
@@ -600,10 +703,6 @@ static struct twl4030_gpio_platform_data rx51_gpio_data = {
600 .setup = rx51_twlgpio_setup, 703 .setup = rx51_twlgpio_setup,
601}; 704};
602 705
603static struct twl4030_usb_data rx51_usb_data = {
604 .usb_mode = T2_USB_MODE_ULPI,
605};
606
607static struct twl4030_ins sleep_on_seq[] __initdata = { 706static struct twl4030_ins sleep_on_seq[] __initdata = {
608/* 707/*
609 * Turn off everything 708 * Turn off everything
@@ -765,33 +864,32 @@ static struct twl4030_power_data rx51_t2scripts_data __initdata = {
765 .resource_config = twl4030_rconfig, 864 .resource_config = twl4030_rconfig,
766}; 865};
767 866
768struct twl4030_codec_vibra_data rx51_vibra_data __initdata = { 867struct twl4030_vibra_data rx51_vibra_data __initdata = {
769 .coexist = 0, 868 .coexist = 0,
770}; 869};
771 870
772struct twl4030_codec_data rx51_codec_data __initdata = { 871struct twl4030_audio_data rx51_audio_data __initdata = {
773 .audio_mclk = 26000000, 872 .audio_mclk = 26000000,
774 .vibra = &rx51_vibra_data, 873 .vibra = &rx51_vibra_data,
775}; 874};
776 875
777static struct twl4030_platform_data rx51_twldata __initdata = { 876static struct twl4030_platform_data rx51_twldata __initdata = {
778 .irq_base = TWL4030_IRQ_BASE,
779 .irq_end = TWL4030_IRQ_END,
780
781 /* platform_data for children goes here */ 877 /* platform_data for children goes here */
782 .gpio = &rx51_gpio_data, 878 .gpio = &rx51_gpio_data,
783 .keypad = &rx51_kp_data, 879 .keypad = &rx51_kp_data,
784 .madc = &rx51_madc_data,
785 .usb = &rx51_usb_data,
786 .power = &rx51_t2scripts_data, 880 .power = &rx51_t2scripts_data,
787 .codec = &rx51_codec_data, 881 .audio = &rx51_audio_data,
788 882
789 .vaux1 = &rx51_vaux1, 883 .vaux1 = &rx51_vaux1,
790 .vaux2 = &rx51_vaux2, 884 .vaux2 = &rx51_vaux2,
791 .vaux4 = &rx51_vaux4, 885 .vaux4 = &rx51_vaux4,
792 .vmmc1 = &rx51_vmmc1, 886 .vmmc1 = &rx51_vmmc1,
887 .vpll1 = &rx51_vpll1,
888 .vpll2 = &rx51_vpll2,
793 .vsim = &rx51_vsim, 889 .vsim = &rx51_vsim,
794 .vdac = &rx51_vdac, 890 .vintana1 = &rx51_vintana1,
891 .vintana2 = &rx51_vintana2,
892 .vintdig = &rx51_vintdig,
795 .vio = &rx51_vio, 893 .vio = &rx51_vio,
796}; 894};
797 895
@@ -830,6 +928,12 @@ static struct i2c_board_info __initdata rx51_peripherals_i2c_board_info_2[] = {
830 .platform_data = &rx51_tsl2563_platform_data, 928 .platform_data = &rx51_tsl2563_platform_data,
831 }, 929 },
832#endif 930#endif
931#if defined(CONFIG_LEDS_LP5523) || defined(CONFIG_LEDS_LP5523_MODULE)
932 {
933 I2C_BOARD_INFO("lp5523", 0x32),
934 .platform_data = &rx51_lp5523_platform_data,
935 },
936#endif
833 { 937 {
834 I2C_BOARD_INFO("tpa6130a2", 0x60), 938 I2C_BOARD_INFO("tpa6130a2", 0x60),
835 .platform_data = &rx51_tpa6130a2_data, 939 .platform_data = &rx51_tpa6130a2_data,
@@ -847,6 +951,13 @@ static int __init rx51_i2c_init(void)
847 rx51_twldata.vaux3 = &rx51_vaux3_cam; 951 rx51_twldata.vaux3 = &rx51_vaux3_cam;
848 } 952 }
849 rx51_twldata.vmmc2 = &rx51_vmmc2; 953 rx51_twldata.vmmc2 = &rx51_vmmc2;
954 omap3_pmic_get_config(&rx51_twldata,
955 TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_MADC,
956 TWL_COMMON_REGULATOR_VDAC);
957
958 rx51_twldata.vdac->constraints.apply_uV = true;
959 rx51_twldata.vdac->constraints.name = "VDAC";
960
850 omap_pmic_init(1, 2200, "twl5030", INT_34XX_SYS_NIRQ, &rx51_twldata); 961 omap_pmic_init(1, 2200, "twl5030", INT_34XX_SYS_NIRQ, &rx51_twldata);
851 omap_register_i2c_bus(2, 100, rx51_peripherals_i2c_board_info_2, 962 omap_register_i2c_bus(2, 100, rx51_peripherals_i2c_board_info_2,
852 ARRAY_SIZE(rx51_peripherals_i2c_board_info_2)); 963 ARRAY_SIZE(rx51_peripherals_i2c_board_info_2));
@@ -973,6 +1084,7 @@ error:
973void __init rx51_peripherals_init(void) 1084void __init rx51_peripherals_init(void)
974{ 1085{
975 rx51_i2c_init(); 1086 rx51_i2c_init();
1087 regulator_has_full_constraints();
976 gpmc_onenand_init(board_onenand_data); 1088 gpmc_onenand_init(board_onenand_data);
977 board_smc91x_init(); 1089 board_smc91x_init();
978 rx51_add_gpio_keys(); 1090 rx51_add_gpio_keys();
diff --git a/arch/arm/mach-omap2/board-rx51.c b/arch/arm/mach-omap2/board-rx51.c
index fec4cac8fa0..5ea142f9bc9 100644
--- a/arch/arm/mach-omap2/board-rx51.c
+++ b/arch/arm/mach-omap2/board-rx51.c
@@ -160,7 +160,7 @@ MACHINE_START(NOKIA_RX51, "Nokia RX-51 board")
160 .reserve = rx51_reserve, 160 .reserve = rx51_reserve,
161 .map_io = rx51_map_io, 161 .map_io = rx51_map_io,
162 .init_early = rx51_init_early, 162 .init_early = rx51_init_early,
163 .init_irq = omap_init_irq, 163 .init_irq = omap3_init_irq,
164 .init_machine = rx51_init, 164 .init_machine = rx51_init,
165 .timer = &omap_timer, 165 .timer = &omap3_timer,
166MACHINE_END 166MACHINE_END
diff --git a/arch/arm/mach-omap2/board-ti8168evm.c b/arch/arm/mach-omap2/board-ti8168evm.c
index 09fa7bfff8d..a85d5b0b11d 100644
--- a/arch/arm/mach-omap2/board-ti8168evm.c
+++ b/arch/arm/mach-omap2/board-ti8168evm.c
@@ -33,11 +33,6 @@ static void __init ti8168_init_early(void)
33 omap2_init_common_devices(NULL, NULL); 33 omap2_init_common_devices(NULL, NULL);
34} 34}
35 35
36static void __init ti8168_evm_init_irq(void)
37{
38 omap_init_irq();
39}
40
41static void __init ti8168_evm_init(void) 36static void __init ti8168_evm_init(void)
42{ 37{
43 omap_serial_init(); 38 omap_serial_init();
@@ -56,7 +51,7 @@ MACHINE_START(TI8168EVM, "ti8168evm")
56 .boot_params = 0x80000100, 51 .boot_params = 0x80000100,
57 .map_io = ti8168_evm_map_io, 52 .map_io = ti8168_evm_map_io,
58 .init_early = ti8168_init_early, 53 .init_early = ti8168_init_early,
59 .init_irq = ti8168_evm_init_irq, 54 .init_irq = ti816x_init_irq,
60 .timer = &omap_timer, 55 .timer = &omap3_timer,
61 .init_machine = ti8168_evm_init, 56 .init_machine = ti8168_evm_init,
62MACHINE_END 57MACHINE_END
diff --git a/arch/arm/mach-omap2/board-zoom-debugboard.c b/arch/arm/mach-omap2/board-zoom-debugboard.c
index 6402e781c45..369c2eb7715 100644
--- a/arch/arm/mach-omap2/board-zoom-debugboard.c
+++ b/arch/arm/mach-omap2/board-zoom-debugboard.c
@@ -23,6 +23,7 @@
23#define ZOOM_SMSC911X_GPIO 158 23#define ZOOM_SMSC911X_GPIO 158
24#define ZOOM_QUADUART_CS 3 24#define ZOOM_QUADUART_CS 3
25#define ZOOM_QUADUART_GPIO 102 25#define ZOOM_QUADUART_GPIO 102
26#define ZOOM_QUADUART_RST_GPIO 152
26#define QUART_CLK 1843200 27#define QUART_CLK 1843200
27#define DEBUG_BASE 0x08000000 28#define DEBUG_BASE 0x08000000
28#define ZOOM_ETHR_START DEBUG_BASE 29#define ZOOM_ETHR_START DEBUG_BASE
@@ -67,6 +68,14 @@ static inline void __init zoom_init_quaduart(void)
67 unsigned long cs_mem_base; 68 unsigned long cs_mem_base;
68 int quart_gpio = 0; 69 int quart_gpio = 0;
69 70
71 if (gpio_request_one(ZOOM_QUADUART_RST_GPIO,
72 GPIOF_OUT_INIT_LOW,
73 "TL16CP754C GPIO") < 0) {
74 pr_err("Failed to request GPIO%d for TL16CP754C\n",
75 ZOOM_QUADUART_RST_GPIO);
76 return;
77 }
78
70 quart_cs = ZOOM_QUADUART_CS; 79 quart_cs = ZOOM_QUADUART_CS;
71 80
72 if (gpmc_cs_request(quart_cs, SZ_1M, &cs_mem_base) < 0) { 81 if (gpmc_cs_request(quart_cs, SZ_1M, &cs_mem_base) < 0) {
diff --git a/arch/arm/mach-omap2/board-zoom-peripherals.c b/arch/arm/mach-omap2/board-zoom-peripherals.c
index 118c6f53c5e..6d0aa4fcb7c 100644
--- a/arch/arm/mach-omap2/board-zoom-peripherals.c
+++ b/arch/arm/mach-omap2/board-zoom-peripherals.c
@@ -105,21 +105,20 @@ static struct twl4030_keypad_data zoom_kp_twl4030_data = {
105 .rep = 1, 105 .rep = 1,
106}; 106};
107 107
108static struct regulator_consumer_supply zoom_vmmc1_supply = { 108static struct regulator_consumer_supply zoom_vmmc1_supply[] = {
109 .supply = "vmmc", 109 REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
110}; 110};
111 111
112static struct regulator_consumer_supply zoom_vsim_supply = { 112static struct regulator_consumer_supply zoom_vsim_supply[] = {
113 .supply = "vmmc_aux", 113 REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.0"),
114}; 114};
115 115
116static struct regulator_consumer_supply zoom_vmmc2_supply = { 116static struct regulator_consumer_supply zoom_vmmc2_supply[] = {
117 .supply = "vmmc", 117 REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"),
118}; 118};
119 119
120static struct regulator_consumer_supply zoom_vmmc3_supply = { 120static struct regulator_consumer_supply zoom_vmmc3_supply[] = {
121 .supply = "vmmc", 121 REGULATOR_SUPPLY("vmmc", "omap_hsmmc.2"),
122 .dev_name = "omap_hsmmc.2",
123}; 122};
124 123
125/* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */ 124/* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */
@@ -133,8 +132,8 @@ static struct regulator_init_data zoom_vmmc1 = {
133 | REGULATOR_CHANGE_MODE 132 | REGULATOR_CHANGE_MODE
134 | REGULATOR_CHANGE_STATUS, 133 | REGULATOR_CHANGE_STATUS,
135 }, 134 },
136 .num_consumer_supplies = 1, 135 .num_consumer_supplies = ARRAY_SIZE(zoom_vmmc1_supply),
137 .consumer_supplies = &zoom_vmmc1_supply, 136 .consumer_supplies = zoom_vmmc1_supply,
138}; 137};
139 138
140/* VMMC2 for MMC2 card */ 139/* VMMC2 for MMC2 card */
@@ -148,8 +147,8 @@ static struct regulator_init_data zoom_vmmc2 = {
148 .valid_ops_mask = REGULATOR_CHANGE_MODE 147 .valid_ops_mask = REGULATOR_CHANGE_MODE
149 | REGULATOR_CHANGE_STATUS, 148 | REGULATOR_CHANGE_STATUS,
150 }, 149 },
151 .num_consumer_supplies = 1, 150 .num_consumer_supplies = ARRAY_SIZE(zoom_vmmc2_supply),
152 .consumer_supplies = &zoom_vmmc2_supply, 151 .consumer_supplies = zoom_vmmc2_supply,
153}; 152};
154 153
155/* VSIM for OMAP VDD_MMC1A (i/o for DAT4..DAT7) */ 154/* VSIM for OMAP VDD_MMC1A (i/o for DAT4..DAT7) */
@@ -163,16 +162,16 @@ static struct regulator_init_data zoom_vsim = {
163 | REGULATOR_CHANGE_MODE 162 | REGULATOR_CHANGE_MODE
164 | REGULATOR_CHANGE_STATUS, 163 | REGULATOR_CHANGE_STATUS,
165 }, 164 },
166 .num_consumer_supplies = 1, 165 .num_consumer_supplies = ARRAY_SIZE(zoom_vsim_supply),
167 .consumer_supplies = &zoom_vsim_supply, 166 .consumer_supplies = zoom_vsim_supply,
168}; 167};
169 168
170static struct regulator_init_data zoom_vmmc3 = { 169static struct regulator_init_data zoom_vmmc3 = {
171 .constraints = { 170 .constraints = {
172 .valid_ops_mask = REGULATOR_CHANGE_STATUS, 171 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
173 }, 172 },
174 .num_consumer_supplies = 1, 173 .num_consumer_supplies = ARRAY_SIZE(zoom_vmmc3_supply),
175 .consumer_supplies = &zoom_vmmc3_supply, 174 .consumer_supplies = zoom_vmmc3_supply,
176}; 175};
177 176
178static struct fixed_voltage_config zoom_vwlan = { 177static struct fixed_voltage_config zoom_vwlan = {
@@ -227,40 +226,6 @@ static struct omap2_hsmmc_info mmc[] = {
227 {} /* Terminator */ 226 {} /* Terminator */
228}; 227};
229 228
230static struct regulator_consumer_supply zoom_vpll2_supplies[] = {
231 REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
232 REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"),
233};
234
235static struct regulator_consumer_supply zoom_vdda_dac_supply =
236 REGULATOR_SUPPLY("vdda_dac", "omapdss_venc");
237
238static struct regulator_init_data zoom_vpll2 = {
239 .constraints = {
240 .min_uV = 1800000,
241 .max_uV = 1800000,
242 .valid_modes_mask = REGULATOR_MODE_NORMAL
243 | REGULATOR_MODE_STANDBY,
244 .valid_ops_mask = REGULATOR_CHANGE_MODE
245 | REGULATOR_CHANGE_STATUS,
246 },
247 .num_consumer_supplies = ARRAY_SIZE(zoom_vpll2_supplies),
248 .consumer_supplies = zoom_vpll2_supplies,
249};
250
251static struct regulator_init_data zoom_vdac = {
252 .constraints = {
253 .min_uV = 1800000,
254 .max_uV = 1800000,
255 .valid_modes_mask = REGULATOR_MODE_NORMAL
256 | REGULATOR_MODE_STANDBY,
257 .valid_ops_mask = REGULATOR_CHANGE_MODE
258 | REGULATOR_CHANGE_STATUS,
259 },
260 .num_consumer_supplies = 1,
261 .consumer_supplies = &zoom_vdda_dac_supply,
262};
263
264static int zoom_twl_gpio_setup(struct device *dev, 229static int zoom_twl_gpio_setup(struct device *dev,
265 unsigned gpio, unsigned ngpio) 230 unsigned gpio, unsigned ngpio)
266{ 231{
@@ -270,13 +235,6 @@ static int zoom_twl_gpio_setup(struct device *dev,
270 mmc[0].gpio_cd = gpio + 0; 235 mmc[0].gpio_cd = gpio + 0;
271 omap2_hsmmc_init(mmc); 236 omap2_hsmmc_init(mmc);
272 237
273 /* link regulators to MMC adapters ... we "know" the
274 * regulators will be set up only *after* we return.
275 */
276 zoom_vmmc1_supply.dev = mmc[0].dev;
277 zoom_vsim_supply.dev = mmc[0].dev;
278 zoom_vmmc2_supply.dev = mmc[1].dev;
279
280 ret = gpio_request_one(LCD_PANEL_ENABLE_GPIO, GPIOF_OUT_INIT_LOW, 238 ret = gpio_request_one(LCD_PANEL_ENABLE_GPIO, GPIOF_OUT_INIT_LOW,
281 "lcd enable"); 239 "lcd enable");
282 if (ret) 240 if (ret)
@@ -292,26 +250,6 @@ static void zoom2_set_hs_extmute(int mute)
292 gpio_set_value(ZOOM2_HEADSET_EXTMUTE_GPIO, mute); 250 gpio_set_value(ZOOM2_HEADSET_EXTMUTE_GPIO, mute);
293} 251}
294 252
295static int zoom_batt_table[] = {
296/* 0 C*/
29730800, 29500, 28300, 27100,
29826000, 24900, 23900, 22900, 22000, 21100, 20300, 19400, 18700, 17900,
29917200, 16500, 15900, 15300, 14700, 14100, 13600, 13100, 12600, 12100,
30011600, 11200, 10800, 10400, 10000, 9630, 9280, 8950, 8620, 8310,
3018020, 7730, 7460, 7200, 6950, 6710, 6470, 6250, 6040, 5830,
3025640, 5450, 5260, 5090, 4920, 4760, 4600, 4450, 4310, 4170,
3034040, 3910, 3790, 3670, 3550
304};
305
306static struct twl4030_bci_platform_data zoom_bci_data = {
307 .battery_tmp_tbl = zoom_batt_table,
308 .tblsize = ARRAY_SIZE(zoom_batt_table),
309};
310
311static struct twl4030_usb_data zoom_usb_data = {
312 .usb_mode = T2_USB_MODE_ULPI,
313};
314
315static struct twl4030_gpio_platform_data zoom_gpio_data = { 253static struct twl4030_gpio_platform_data zoom_gpio_data = {
316 .gpio_base = OMAP_MAX_GPIO_LINES, 254 .gpio_base = OMAP_MAX_GPIO_LINES,
317 .irq_base = TWL4030_GPIO_IRQ_BASE, 255 .irq_base = TWL4030_GPIO_IRQ_BASE,
@@ -319,41 +257,29 @@ static struct twl4030_gpio_platform_data zoom_gpio_data = {
319 .setup = zoom_twl_gpio_setup, 257 .setup = zoom_twl_gpio_setup,
320}; 258};
321 259
322static struct twl4030_madc_platform_data zoom_madc_data = {
323 .irq_line = 1,
324};
325
326static struct twl4030_codec_audio_data zoom_audio_data;
327
328static struct twl4030_codec_data zoom_codec_data = {
329 .audio_mclk = 26000000,
330 .audio = &zoom_audio_data,
331};
332
333static struct twl4030_platform_data zoom_twldata = { 260static struct twl4030_platform_data zoom_twldata = {
334 .irq_base = TWL4030_IRQ_BASE,
335 .irq_end = TWL4030_IRQ_END,
336
337 /* platform_data for children goes here */ 261 /* platform_data for children goes here */
338 .bci = &zoom_bci_data,
339 .madc = &zoom_madc_data,
340 .usb = &zoom_usb_data,
341 .gpio = &zoom_gpio_data, 262 .gpio = &zoom_gpio_data,
342 .keypad = &zoom_kp_twl4030_data, 263 .keypad = &zoom_kp_twl4030_data,
343 .codec = &zoom_codec_data,
344 .vmmc1 = &zoom_vmmc1, 264 .vmmc1 = &zoom_vmmc1,
345 .vmmc2 = &zoom_vmmc2, 265 .vmmc2 = &zoom_vmmc2,
346 .vsim = &zoom_vsim, 266 .vsim = &zoom_vsim,
347 .vpll2 = &zoom_vpll2,
348 .vdac = &zoom_vdac,
349}; 267};
350 268
351static int __init omap_i2c_init(void) 269static int __init omap_i2c_init(void)
352{ 270{
271 omap3_pmic_get_config(&zoom_twldata,
272 TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_BCI |
273 TWL_COMMON_PDATA_MADC | TWL_COMMON_PDATA_AUDIO,
274 TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2);
275
353 if (machine_is_omap_zoom2()) { 276 if (machine_is_omap_zoom2()) {
354 zoom_audio_data.ramp_delay_value = 3; /* 161 ms */ 277 struct twl4030_codec_data *codec_data;
355 zoom_audio_data.hs_extmute = 1; 278 codec_data = zoom_twldata.audio->codec;
356 zoom_audio_data.set_hs_extmute = zoom2_set_hs_extmute; 279
280 codec_data->ramp_delay_value = 3; /* 161 ms */
281 codec_data->hs_extmute = 1;
282 codec_data->set_hs_extmute = zoom2_set_hs_extmute;
357 } 283 }
358 omap_pmic_init(1, 2400, "twl5030", INT_34XX_SYS_NIRQ, &zoom_twldata); 284 omap_pmic_init(1, 2400, "twl5030", INT_34XX_SYS_NIRQ, &zoom_twldata);
359 omap_register_i2c_bus(2, 400, NULL, 0); 285 omap_register_i2c_bus(2, 400, NULL, 0);
diff --git a/arch/arm/mach-omap2/board-zoom.c b/arch/arm/mach-omap2/board-zoom.c
index 4b133d75c93..8a98c3c303f 100644
--- a/arch/arm/mach-omap2/board-zoom.c
+++ b/arch/arm/mach-omap2/board-zoom.c
@@ -137,9 +137,9 @@ MACHINE_START(OMAP_ZOOM2, "OMAP Zoom2 board")
137 .reserve = omap_reserve, 137 .reserve = omap_reserve,
138 .map_io = omap3_map_io, 138 .map_io = omap3_map_io,
139 .init_early = omap_zoom_init_early, 139 .init_early = omap_zoom_init_early,
140 .init_irq = omap_init_irq, 140 .init_irq = omap3_init_irq,
141 .init_machine = omap_zoom_init, 141 .init_machine = omap_zoom_init,
142 .timer = &omap_timer, 142 .timer = &omap3_timer,
143MACHINE_END 143MACHINE_END
144 144
145MACHINE_START(OMAP_ZOOM3, "OMAP Zoom3 board") 145MACHINE_START(OMAP_ZOOM3, "OMAP Zoom3 board")
@@ -147,7 +147,7 @@ MACHINE_START(OMAP_ZOOM3, "OMAP Zoom3 board")
147 .reserve = omap_reserve, 147 .reserve = omap_reserve,
148 .map_io = omap3_map_io, 148 .map_io = omap3_map_io,
149 .init_early = omap_zoom_init_early, 149 .init_early = omap_zoom_init_early,
150 .init_irq = omap_init_irq, 150 .init_irq = omap3_init_irq,
151 .init_machine = omap_zoom_init, 151 .init_machine = omap_zoom_init,
152 .timer = &omap_timer, 152 .timer = &omap3_timer,
153MACHINE_END 153MACHINE_END
diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c
index 180299e4a83..1f3481f8d69 100644
--- a/arch/arm/mach-omap2/clock.c
+++ b/arch/arm/mach-omap2/clock.c
@@ -38,6 +38,14 @@
38u8 cpu_mask; 38u8 cpu_mask;
39 39
40/* 40/*
41 * clkdm_control: if true, then when a clock is enabled in the
42 * hardware, its clockdomain will first be enabled; and when a clock
43 * is disabled in the hardware, its clockdomain will be disabled
44 * afterwards.
45 */
46static bool clkdm_control = true;
47
48/*
41 * OMAP2+ specific clock functions 49 * OMAP2+ specific clock functions
42 */ 50 */
43 51
@@ -100,6 +108,19 @@ void omap2_init_clk_clkdm(struct clk *clk)
100} 108}
101 109
102/** 110/**
111 * omap2_clk_disable_clkdm_control - disable clkdm control on clk enable/disable
112 *
113 * Prevent the OMAP clock code from calling into the clockdomain code
114 * when a hardware clock in that clockdomain is enabled or disabled.
115 * Intended to be called at init time from omap*_clk_init(). No
116 * return value.
117 */
118void __init omap2_clk_disable_clkdm_control(void)
119{
120 clkdm_control = false;
121}
122
123/**
103 * omap2_clk_dflt_find_companion - find companion clock to @clk 124 * omap2_clk_dflt_find_companion - find companion clock to @clk
104 * @clk: struct clk * to find the companion clock of 125 * @clk: struct clk * to find the companion clock of
105 * @other_reg: void __iomem ** to return the companion clock CM_*CLKEN va in 126 * @other_reg: void __iomem ** to return the companion clock CM_*CLKEN va in
@@ -268,7 +289,7 @@ void omap2_clk_disable(struct clk *clk)
268 clk->ops->disable(clk); 289 clk->ops->disable(clk);
269 } 290 }
270 291
271 if (clk->clkdm) 292 if (clkdm_control && clk->clkdm)
272 clkdm_clk_disable(clk->clkdm, clk); 293 clkdm_clk_disable(clk->clkdm, clk);
273 294
274 if (clk->parent) 295 if (clk->parent)
@@ -308,7 +329,7 @@ int omap2_clk_enable(struct clk *clk)
308 } 329 }
309 } 330 }
310 331
311 if (clk->clkdm) { 332 if (clkdm_control && clk->clkdm) {
312 ret = clkdm_clk_enable(clk->clkdm, clk); 333 ret = clkdm_clk_enable(clk->clkdm, clk);
313 if (ret) { 334 if (ret) {
314 WARN(1, "clock: %s: could not enable clockdomain %s: " 335 WARN(1, "clock: %s: could not enable clockdomain %s: "
@@ -330,7 +351,7 @@ int omap2_clk_enable(struct clk *clk)
330 return 0; 351 return 0;
331 352
332oce_err3: 353oce_err3:
333 if (clk->clkdm) 354 if (clkdm_control && clk->clkdm)
334 clkdm_clk_disable(clk->clkdm, clk); 355 clkdm_clk_disable(clk->clkdm, clk);
335oce_err2: 356oce_err2:
336 if (clk->parent) 357 if (clk->parent)
@@ -453,6 +474,7 @@ int __init omap2_clk_switch_mpurate_at_boot(const char *mpurate_ck_name)
453 if (IS_ERR_VALUE(r)) { 474 if (IS_ERR_VALUE(r)) {
454 WARN(1, "clock: %s: unable to set MPU rate to %d: %d\n", 475 WARN(1, "clock: %s: unable to set MPU rate to %d: %d\n",
455 mpurate_ck->name, mpurate, r); 476 mpurate_ck->name, mpurate, r);
477 clk_put(mpurate_ck);
456 return -EINVAL; 478 return -EINVAL;
457 } 479 }
458 480
diff --git a/arch/arm/mach-omap2/clock.h b/arch/arm/mach-omap2/clock.h
index e10ff2b5484..48ac568881b 100644
--- a/arch/arm/mach-omap2/clock.h
+++ b/arch/arm/mach-omap2/clock.h
@@ -16,6 +16,8 @@
16#ifndef __ARCH_ARM_MACH_OMAP2_CLOCK_H 16#ifndef __ARCH_ARM_MACH_OMAP2_CLOCK_H
17#define __ARCH_ARM_MACH_OMAP2_CLOCK_H 17#define __ARCH_ARM_MACH_OMAP2_CLOCK_H
18 18
19#include <linux/kernel.h>
20
19#include <plat/clock.h> 21#include <plat/clock.h>
20 22
21/* CM_CLKSEL2_PLL.CORE_CLK_SRC bits (2XXX) */ 23/* CM_CLKSEL2_PLL.CORE_CLK_SRC bits (2XXX) */
@@ -72,6 +74,7 @@ void omap2_clk_disable_unused(struct clk *clk);
72#endif 74#endif
73 75
74void omap2_init_clk_clkdm(struct clk *clk); 76void omap2_init_clk_clkdm(struct clk *clk);
77void __init omap2_clk_disable_clkdm_control(void);
75 78
76/* clkt_clksel.c public functions */ 79/* clkt_clksel.c public functions */
77u32 omap2_clksel_round_rate_div(struct clk *clk, unsigned long target_rate, 80u32 omap2_clksel_round_rate_div(struct clk *clk, unsigned long target_rate,
diff --git a/arch/arm/mach-omap2/clock2420_data.c b/arch/arm/mach-omap2/clock2420_data.c
index 2926d028b6e..debc040872f 100644
--- a/arch/arm/mach-omap2/clock2420_data.c
+++ b/arch/arm/mach-omap2/clock2420_data.c
@@ -1805,9 +1805,9 @@ static struct omap_clk omap2420_clks[] = {
1805 CLK(NULL, "gfx_ick", &gfx_ick, CK_242X), 1805 CLK(NULL, "gfx_ick", &gfx_ick, CK_242X),
1806 /* DSS domain clocks */ 1806 /* DSS domain clocks */
1807 CLK("omapdss_dss", "ick", &dss_ick, CK_242X), 1807 CLK("omapdss_dss", "ick", &dss_ick, CK_242X),
1808 CLK("omapdss_dss", "fck", &dss1_fck, CK_242X), 1808 CLK(NULL, "dss1_fck", &dss1_fck, CK_242X),
1809 CLK("omapdss_dss", "sys_clk", &dss2_fck, CK_242X), 1809 CLK(NULL, "dss2_fck", &dss2_fck, CK_242X),
1810 CLK("omapdss_dss", "tv_clk", &dss_54m_fck, CK_242X), 1810 CLK(NULL, "dss_54m_fck", &dss_54m_fck, CK_242X),
1811 /* L3 domain clocks */ 1811 /* L3 domain clocks */
1812 CLK(NULL, "core_l3_ck", &core_l3_ck, CK_242X), 1812 CLK(NULL, "core_l3_ck", &core_l3_ck, CK_242X),
1813 CLK(NULL, "ssi_fck", &ssi_ssr_sst_fck, CK_242X), 1813 CLK(NULL, "ssi_fck", &ssi_ssr_sst_fck, CK_242X),
@@ -1844,13 +1844,13 @@ static struct omap_clk omap2420_clks[] = {
1844 CLK(NULL, "gpt12_ick", &gpt12_ick, CK_242X), 1844 CLK(NULL, "gpt12_ick", &gpt12_ick, CK_242X),
1845 CLK(NULL, "gpt12_fck", &gpt12_fck, CK_242X), 1845 CLK(NULL, "gpt12_fck", &gpt12_fck, CK_242X),
1846 CLK("omap-mcbsp.1", "ick", &mcbsp1_ick, CK_242X), 1846 CLK("omap-mcbsp.1", "ick", &mcbsp1_ick, CK_242X),
1847 CLK("omap-mcbsp.1", "fck", &mcbsp1_fck, CK_242X), 1847 CLK(NULL, "mcbsp1_fck", &mcbsp1_fck, CK_242X),
1848 CLK("omap-mcbsp.2", "ick", &mcbsp2_ick, CK_242X), 1848 CLK("omap-mcbsp.2", "ick", &mcbsp2_ick, CK_242X),
1849 CLK("omap-mcbsp.2", "fck", &mcbsp2_fck, CK_242X), 1849 CLK(NULL, "mcbsp2_fck", &mcbsp2_fck, CK_242X),
1850 CLK("omap2_mcspi.1", "ick", &mcspi1_ick, CK_242X), 1850 CLK("omap2_mcspi.1", "ick", &mcspi1_ick, CK_242X),
1851 CLK("omap2_mcspi.1", "fck", &mcspi1_fck, CK_242X), 1851 CLK(NULL, "mcspi1_fck", &mcspi1_fck, CK_242X),
1852 CLK("omap2_mcspi.2", "ick", &mcspi2_ick, CK_242X), 1852 CLK("omap2_mcspi.2", "ick", &mcspi2_ick, CK_242X),
1853 CLK("omap2_mcspi.2", "fck", &mcspi2_fck, CK_242X), 1853 CLK(NULL, "mcspi2_fck", &mcspi2_fck, CK_242X),
1854 CLK(NULL, "uart1_ick", &uart1_ick, CK_242X), 1854 CLK(NULL, "uart1_ick", &uart1_ick, CK_242X),
1855 CLK(NULL, "uart1_fck", &uart1_fck, CK_242X), 1855 CLK(NULL, "uart1_fck", &uart1_fck, CK_242X),
1856 CLK(NULL, "uart2_ick", &uart2_ick, CK_242X), 1856 CLK(NULL, "uart2_ick", &uart2_ick, CK_242X),
@@ -1860,7 +1860,7 @@ static struct omap_clk omap2420_clks[] = {
1860 CLK(NULL, "gpios_ick", &gpios_ick, CK_242X), 1860 CLK(NULL, "gpios_ick", &gpios_ick, CK_242X),
1861 CLK(NULL, "gpios_fck", &gpios_fck, CK_242X), 1861 CLK(NULL, "gpios_fck", &gpios_fck, CK_242X),
1862 CLK("omap_wdt", "ick", &mpu_wdt_ick, CK_242X), 1862 CLK("omap_wdt", "ick", &mpu_wdt_ick, CK_242X),
1863 CLK("omap_wdt", "fck", &mpu_wdt_fck, CK_242X), 1863 CLK(NULL, "mpu_wdt_fck", &mpu_wdt_fck, CK_242X),
1864 CLK(NULL, "sync_32k_ick", &sync_32k_ick, CK_242X), 1864 CLK(NULL, "sync_32k_ick", &sync_32k_ick, CK_242X),
1865 CLK(NULL, "wdt1_ick", &wdt1_ick, CK_242X), 1865 CLK(NULL, "wdt1_ick", &wdt1_ick, CK_242X),
1866 CLK(NULL, "omapctrl_ick", &omapctrl_ick, CK_242X), 1866 CLK(NULL, "omapctrl_ick", &omapctrl_ick, CK_242X),
@@ -1880,11 +1880,11 @@ static struct omap_clk omap2420_clks[] = {
1880 CLK(NULL, "eac_ick", &eac_ick, CK_242X), 1880 CLK(NULL, "eac_ick", &eac_ick, CK_242X),
1881 CLK(NULL, "eac_fck", &eac_fck, CK_242X), 1881 CLK(NULL, "eac_fck", &eac_fck, CK_242X),
1882 CLK("omap_hdq.0", "ick", &hdq_ick, CK_242X), 1882 CLK("omap_hdq.0", "ick", &hdq_ick, CK_242X),
1883 CLK("omap_hdq.1", "fck", &hdq_fck, CK_242X), 1883 CLK("omap_hdq.0", "fck", &hdq_fck, CK_242X),
1884 CLK("omap_i2c.1", "ick", &i2c1_ick, CK_242X), 1884 CLK("omap_i2c.1", "ick", &i2c1_ick, CK_242X),
1885 CLK("omap_i2c.1", "fck", &i2c1_fck, CK_242X), 1885 CLK(NULL, "i2c1_fck", &i2c1_fck, CK_242X),
1886 CLK("omap_i2c.2", "ick", &i2c2_ick, CK_242X), 1886 CLK("omap_i2c.2", "ick", &i2c2_ick, CK_242X),
1887 CLK("omap_i2c.2", "fck", &i2c2_fck, CK_242X), 1887 CLK(NULL, "i2c2_fck", &i2c2_fck, CK_242X),
1888 CLK(NULL, "gpmc_fck", &gpmc_fck, CK_242X), 1888 CLK(NULL, "gpmc_fck", &gpmc_fck, CK_242X),
1889 CLK(NULL, "sdma_fck", &sdma_fck, CK_242X), 1889 CLK(NULL, "sdma_fck", &sdma_fck, CK_242X),
1890 CLK(NULL, "sdma_ick", &sdma_ick, CK_242X), 1890 CLK(NULL, "sdma_ick", &sdma_ick, CK_242X),
diff --git a/arch/arm/mach-omap2/clock2430_data.c b/arch/arm/mach-omap2/clock2430_data.c
index 0c79d39e302..96a942e42db 100644
--- a/arch/arm/mach-omap2/clock2430_data.c
+++ b/arch/arm/mach-omap2/clock2430_data.c
@@ -1895,9 +1895,9 @@ static struct omap_clk omap2430_clks[] = {
1895 CLK(NULL, "mdm_osc_ck", &mdm_osc_ck, CK_243X), 1895 CLK(NULL, "mdm_osc_ck", &mdm_osc_ck, CK_243X),
1896 /* DSS domain clocks */ 1896 /* DSS domain clocks */
1897 CLK("omapdss_dss", "ick", &dss_ick, CK_243X), 1897 CLK("omapdss_dss", "ick", &dss_ick, CK_243X),
1898 CLK("omapdss_dss", "fck", &dss1_fck, CK_243X), 1898 CLK(NULL, "dss1_fck", &dss1_fck, CK_243X),
1899 CLK("omapdss_dss", "sys_clk", &dss2_fck, CK_243X), 1899 CLK(NULL, "dss2_fck", &dss2_fck, CK_243X),
1900 CLK("omapdss_dss", "tv_clk", &dss_54m_fck, CK_243X), 1900 CLK(NULL, "dss_54m_fck", &dss_54m_fck, CK_243X),
1901 /* L3 domain clocks */ 1901 /* L3 domain clocks */
1902 CLK(NULL, "core_l3_ck", &core_l3_ck, CK_243X), 1902 CLK(NULL, "core_l3_ck", &core_l3_ck, CK_243X),
1903 CLK(NULL, "ssi_fck", &ssi_ssr_sst_fck, CK_243X), 1903 CLK(NULL, "ssi_fck", &ssi_ssr_sst_fck, CK_243X),
@@ -1934,21 +1934,21 @@ static struct omap_clk omap2430_clks[] = {
1934 CLK(NULL, "gpt12_ick", &gpt12_ick, CK_243X), 1934 CLK(NULL, "gpt12_ick", &gpt12_ick, CK_243X),
1935 CLK(NULL, "gpt12_fck", &gpt12_fck, CK_243X), 1935 CLK(NULL, "gpt12_fck", &gpt12_fck, CK_243X),
1936 CLK("omap-mcbsp.1", "ick", &mcbsp1_ick, CK_243X), 1936 CLK("omap-mcbsp.1", "ick", &mcbsp1_ick, CK_243X),
1937 CLK("omap-mcbsp.1", "fck", &mcbsp1_fck, CK_243X), 1937 CLK(NULL, "mcbsp1_fck", &mcbsp1_fck, CK_243X),
1938 CLK("omap-mcbsp.2", "ick", &mcbsp2_ick, CK_243X), 1938 CLK("omap-mcbsp.2", "ick", &mcbsp2_ick, CK_243X),
1939 CLK("omap-mcbsp.2", "fck", &mcbsp2_fck, CK_243X), 1939 CLK(NULL, "mcbsp2_fck", &mcbsp2_fck, CK_243X),
1940 CLK("omap-mcbsp.3", "ick", &mcbsp3_ick, CK_243X), 1940 CLK("omap-mcbsp.3", "ick", &mcbsp3_ick, CK_243X),
1941 CLK("omap-mcbsp.3", "fck", &mcbsp3_fck, CK_243X), 1941 CLK(NULL, "mcbsp3_fck", &mcbsp3_fck, CK_243X),
1942 CLK("omap-mcbsp.4", "ick", &mcbsp4_ick, CK_243X), 1942 CLK("omap-mcbsp.4", "ick", &mcbsp4_ick, CK_243X),
1943 CLK("omap-mcbsp.4", "fck", &mcbsp4_fck, CK_243X), 1943 CLK(NULL, "mcbsp4_fck", &mcbsp4_fck, CK_243X),
1944 CLK("omap-mcbsp.5", "ick", &mcbsp5_ick, CK_243X), 1944 CLK("omap-mcbsp.5", "ick", &mcbsp5_ick, CK_243X),
1945 CLK("omap-mcbsp.5", "fck", &mcbsp5_fck, CK_243X), 1945 CLK(NULL, "mcbsp5_fck", &mcbsp5_fck, CK_243X),
1946 CLK("omap2_mcspi.1", "ick", &mcspi1_ick, CK_243X), 1946 CLK("omap2_mcspi.1", "ick", &mcspi1_ick, CK_243X),
1947 CLK("omap2_mcspi.1", "fck", &mcspi1_fck, CK_243X), 1947 CLK(NULL, "mcspi1_fck", &mcspi1_fck, CK_243X),
1948 CLK("omap2_mcspi.2", "ick", &mcspi2_ick, CK_243X), 1948 CLK("omap2_mcspi.2", "ick", &mcspi2_ick, CK_243X),
1949 CLK("omap2_mcspi.2", "fck", &mcspi2_fck, CK_243X), 1949 CLK(NULL, "mcspi2_fck", &mcspi2_fck, CK_243X),
1950 CLK("omap2_mcspi.3", "ick", &mcspi3_ick, CK_243X), 1950 CLK("omap2_mcspi.3", "ick", &mcspi3_ick, CK_243X),
1951 CLK("omap2_mcspi.3", "fck", &mcspi3_fck, CK_243X), 1951 CLK(NULL, "mcspi3_fck", &mcspi3_fck, CK_243X),
1952 CLK(NULL, "uart1_ick", &uart1_ick, CK_243X), 1952 CLK(NULL, "uart1_ick", &uart1_ick, CK_243X),
1953 CLK(NULL, "uart1_fck", &uart1_fck, CK_243X), 1953 CLK(NULL, "uart1_fck", &uart1_fck, CK_243X),
1954 CLK(NULL, "uart2_ick", &uart2_ick, CK_243X), 1954 CLK(NULL, "uart2_ick", &uart2_ick, CK_243X),
@@ -1958,7 +1958,7 @@ static struct omap_clk omap2430_clks[] = {
1958 CLK(NULL, "gpios_ick", &gpios_ick, CK_243X), 1958 CLK(NULL, "gpios_ick", &gpios_ick, CK_243X),
1959 CLK(NULL, "gpios_fck", &gpios_fck, CK_243X), 1959 CLK(NULL, "gpios_fck", &gpios_fck, CK_243X),
1960 CLK("omap_wdt", "ick", &mpu_wdt_ick, CK_243X), 1960 CLK("omap_wdt", "ick", &mpu_wdt_ick, CK_243X),
1961 CLK("omap_wdt", "fck", &mpu_wdt_fck, CK_243X), 1961 CLK(NULL, "mpu_wdt_fck", &mpu_wdt_fck, CK_243X),
1962 CLK(NULL, "sync_32k_ick", &sync_32k_ick, CK_243X), 1962 CLK(NULL, "sync_32k_ick", &sync_32k_ick, CK_243X),
1963 CLK(NULL, "wdt1_ick", &wdt1_ick, CK_243X), 1963 CLK(NULL, "wdt1_ick", &wdt1_ick, CK_243X),
1964 CLK(NULL, "omapctrl_ick", &omapctrl_ick, CK_243X), 1964 CLK(NULL, "omapctrl_ick", &omapctrl_ick, CK_243X),
@@ -1975,9 +1975,9 @@ static struct omap_clk omap2430_clks[] = {
1975 CLK("omap_hdq.0", "ick", &hdq_ick, CK_243X), 1975 CLK("omap_hdq.0", "ick", &hdq_ick, CK_243X),
1976 CLK("omap_hdq.1", "fck", &hdq_fck, CK_243X), 1976 CLK("omap_hdq.1", "fck", &hdq_fck, CK_243X),
1977 CLK("omap_i2c.1", "ick", &i2c1_ick, CK_243X), 1977 CLK("omap_i2c.1", "ick", &i2c1_ick, CK_243X),
1978 CLK("omap_i2c.1", "fck", &i2chs1_fck, CK_243X), 1978 CLK(NULL, "i2chs1_fck", &i2chs1_fck, CK_243X),
1979 CLK("omap_i2c.2", "ick", &i2c2_ick, CK_243X), 1979 CLK("omap_i2c.2", "ick", &i2c2_ick, CK_243X),
1980 CLK("omap_i2c.2", "fck", &i2chs2_fck, CK_243X), 1980 CLK(NULL, "i2chs2_fck", &i2chs2_fck, CK_243X),
1981 CLK(NULL, "gpmc_fck", &gpmc_fck, CK_243X), 1981 CLK(NULL, "gpmc_fck", &gpmc_fck, CK_243X),
1982 CLK(NULL, "sdma_fck", &sdma_fck, CK_243X), 1982 CLK(NULL, "sdma_fck", &sdma_fck, CK_243X),
1983 CLK(NULL, "sdma_ick", &sdma_ick, CK_243X), 1983 CLK(NULL, "sdma_ick", &sdma_ick, CK_243X),
@@ -1990,9 +1990,9 @@ static struct omap_clk omap2430_clks[] = {
1990 CLK(NULL, "usb_fck", &usb_fck, CK_243X), 1990 CLK(NULL, "usb_fck", &usb_fck, CK_243X),
1991 CLK("musb-omap2430", "ick", &usbhs_ick, CK_243X), 1991 CLK("musb-omap2430", "ick", &usbhs_ick, CK_243X),
1992 CLK("omap_hsmmc.0", "ick", &mmchs1_ick, CK_243X), 1992 CLK("omap_hsmmc.0", "ick", &mmchs1_ick, CK_243X),
1993 CLK("omap_hsmmc.0", "fck", &mmchs1_fck, CK_243X), 1993 CLK(NULL, "mmchs1_fck", &mmchs1_fck, CK_243X),
1994 CLK("omap_hsmmc.1", "ick", &mmchs2_ick, CK_243X), 1994 CLK("omap_hsmmc.1", "ick", &mmchs2_ick, CK_243X),
1995 CLK("omap_hsmmc.1", "fck", &mmchs2_fck, CK_243X), 1995 CLK(NULL, "mmchs2_fck", &mmchs2_fck, CK_243X),
1996 CLK(NULL, "gpio5_ick", &gpio5_ick, CK_243X), 1996 CLK(NULL, "gpio5_ick", &gpio5_ick, CK_243X),
1997 CLK(NULL, "gpio5_fck", &gpio5_fck, CK_243X), 1997 CLK(NULL, "gpio5_fck", &gpio5_fck, CK_243X),
1998 CLK(NULL, "mdm_intc_ick", &mdm_intc_ick, CK_243X), 1998 CLK(NULL, "mdm_intc_ick", &mdm_intc_ick, CK_243X),
diff --git a/arch/arm/mach-omap2/clock3xxx_data.c b/arch/arm/mach-omap2/clock3xxx_data.c
index 75b119bd9cd..ffd55b1c439 100644
--- a/arch/arm/mach-omap2/clock3xxx_data.c
+++ b/arch/arm/mach-omap2/clock3xxx_data.c
@@ -3289,25 +3289,25 @@ static struct omap_clk omap3xxx_clks[] = {
3289 CLK("omap-mcbsp.1", "prcm_fck", &core_96m_fck, CK_3XXX), 3289 CLK("omap-mcbsp.1", "prcm_fck", &core_96m_fck, CK_3XXX),
3290 CLK("omap-mcbsp.5", "prcm_fck", &core_96m_fck, CK_3XXX), 3290 CLK("omap-mcbsp.5", "prcm_fck", &core_96m_fck, CK_3XXX),
3291 CLK(NULL, "core_96m_fck", &core_96m_fck, CK_3XXX), 3291 CLK(NULL, "core_96m_fck", &core_96m_fck, CK_3XXX),
3292 CLK("omap_hsmmc.2", "fck", &mmchs3_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), 3292 CLK(NULL, "mmchs3_fck", &mmchs3_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
3293 CLK("omap_hsmmc.1", "fck", &mmchs2_fck, CK_3XXX), 3293 CLK(NULL, "mmchs2_fck", &mmchs2_fck, CK_3XXX),
3294 CLK(NULL, "mspro_fck", &mspro_fck, CK_34XX | CK_36XX), 3294 CLK(NULL, "mspro_fck", &mspro_fck, CK_34XX | CK_36XX),
3295 CLK("omap_hsmmc.0", "fck", &mmchs1_fck, CK_3XXX), 3295 CLK(NULL, "mmchs1_fck", &mmchs1_fck, CK_3XXX),
3296 CLK("omap_i2c.3", "fck", &i2c3_fck, CK_3XXX), 3296 CLK(NULL, "i2c3_fck", &i2c3_fck, CK_3XXX),
3297 CLK("omap_i2c.2", "fck", &i2c2_fck, CK_3XXX), 3297 CLK(NULL, "i2c2_fck", &i2c2_fck, CK_3XXX),
3298 CLK("omap_i2c.1", "fck", &i2c1_fck, CK_3XXX), 3298 CLK(NULL, "i2c1_fck", &i2c1_fck, CK_3XXX),
3299 CLK("omap-mcbsp.5", "fck", &mcbsp5_fck, CK_3XXX), 3299 CLK(NULL, "mcbsp5_fck", &mcbsp5_fck, CK_3XXX),
3300 CLK("omap-mcbsp.1", "fck", &mcbsp1_fck, CK_3XXX), 3300 CLK(NULL, "mcbsp1_fck", &mcbsp1_fck, CK_3XXX),
3301 CLK(NULL, "core_48m_fck", &core_48m_fck, CK_3XXX), 3301 CLK(NULL, "core_48m_fck", &core_48m_fck, CK_3XXX),
3302 CLK("omap2_mcspi.4", "fck", &mcspi4_fck, CK_3XXX), 3302 CLK(NULL, "mcspi4_fck", &mcspi4_fck, CK_3XXX),
3303 CLK("omap2_mcspi.3", "fck", &mcspi3_fck, CK_3XXX), 3303 CLK(NULL, "mcspi3_fck", &mcspi3_fck, CK_3XXX),
3304 CLK("omap2_mcspi.2", "fck", &mcspi2_fck, CK_3XXX), 3304 CLK(NULL, "mcspi2_fck", &mcspi2_fck, CK_3XXX),
3305 CLK("omap2_mcspi.1", "fck", &mcspi1_fck, CK_3XXX), 3305 CLK(NULL, "mcspi1_fck", &mcspi1_fck, CK_3XXX),
3306 CLK(NULL, "uart2_fck", &uart2_fck, CK_3XXX), 3306 CLK(NULL, "uart2_fck", &uart2_fck, CK_3XXX),
3307 CLK(NULL, "uart1_fck", &uart1_fck, CK_3XXX), 3307 CLK(NULL, "uart1_fck", &uart1_fck, CK_3XXX),
3308 CLK(NULL, "fshostusb_fck", &fshostusb_fck, CK_3430ES1), 3308 CLK(NULL, "fshostusb_fck", &fshostusb_fck, CK_3430ES1),
3309 CLK(NULL, "core_12m_fck", &core_12m_fck, CK_3XXX), 3309 CLK(NULL, "core_12m_fck", &core_12m_fck, CK_3XXX),
3310 CLK("omap_hdq.0", "fck", &hdq_fck, CK_3XXX), 3310 CLK("omap_hdq.0", "fck", &hdq_fck, CK_3XXX),
3311 CLK(NULL, "ssi_ssr_fck", &ssi_ssr_fck_3430es1, CK_3430ES1), 3311 CLK(NULL, "ssi_ssr_fck", &ssi_ssr_fck_3430es1, CK_3430ES1),
3312 CLK(NULL, "ssi_ssr_fck", &ssi_ssr_fck_3430es2, CK_3430ES2PLUS | CK_36XX), 3312 CLK(NULL, "ssi_ssr_fck", &ssi_ssr_fck_3430es2, CK_3430ES2PLUS | CK_36XX),
3313 CLK(NULL, "ssi_sst_fck", &ssi_sst_fck_3430es1, CK_3430ES1), 3313 CLK(NULL, "ssi_sst_fck", &ssi_sst_fck_3430es1, CK_3430ES1),
@@ -3356,11 +3356,11 @@ static struct omap_clk omap3xxx_clks[] = {
3356 CLK("omap_rng", "ick", &rng_ick, CK_34XX | CK_36XX), 3356 CLK("omap_rng", "ick", &rng_ick, CK_34XX | CK_36XX),
3357 CLK(NULL, "sha11_ick", &sha11_ick, CK_34XX | CK_36XX), 3357 CLK(NULL, "sha11_ick", &sha11_ick, CK_34XX | CK_36XX),
3358 CLK(NULL, "des1_ick", &des1_ick, CK_34XX | CK_36XX), 3358 CLK(NULL, "des1_ick", &des1_ick, CK_34XX | CK_36XX),
3359 CLK("omapdss_dss", "fck", &dss1_alwon_fck_3430es1, CK_3430ES1), 3359 CLK(NULL, "dss1_alwon_fck", &dss1_alwon_fck_3430es1, CK_3430ES1),
3360 CLK("omapdss_dss", "fck", &dss1_alwon_fck_3430es2, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), 3360 CLK(NULL, "dss1_alwon_fck", &dss1_alwon_fck_3430es2, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
3361 CLK("omapdss_dss", "tv_clk", &dss_tv_fck, CK_3XXX), 3361 CLK(NULL, "dss_tv_fck", &dss_tv_fck, CK_3XXX),
3362 CLK("omapdss_dss", "video_clk", &dss_96m_fck, CK_3XXX), 3362 CLK(NULL, "dss_96m_fck", &dss_96m_fck, CK_3XXX),
3363 CLK("omapdss_dss", "sys_clk", &dss2_alwon_fck, CK_3XXX), 3363 CLK(NULL, "dss2_alwon_fck", &dss2_alwon_fck, CK_3XXX),
3364 CLK("omapdss_dss", "ick", &dss_ick_3430es1, CK_3430ES1), 3364 CLK("omapdss_dss", "ick", &dss_ick_3430es1, CK_3430ES1),
3365 CLK("omapdss_dss", "ick", &dss_ick_3430es2, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), 3365 CLK("omapdss_dss", "ick", &dss_ick_3430es2, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
3366 CLK(NULL, "cam_mclk", &cam_mclk, CK_34XX | CK_36XX), 3366 CLK(NULL, "cam_mclk", &cam_mclk, CK_34XX | CK_36XX),
@@ -3385,7 +3385,7 @@ static struct omap_clk omap3xxx_clks[] = {
3385 CLK(NULL, "gpt1_fck", &gpt1_fck, CK_3XXX), 3385 CLK(NULL, "gpt1_fck", &gpt1_fck, CK_3XXX),
3386 CLK(NULL, "wkup_32k_fck", &wkup_32k_fck, CK_3XXX), 3386 CLK(NULL, "wkup_32k_fck", &wkup_32k_fck, CK_3XXX),
3387 CLK(NULL, "gpio1_dbck", &gpio1_dbck, CK_3XXX), 3387 CLK(NULL, "gpio1_dbck", &gpio1_dbck, CK_3XXX),
3388 CLK("omap_wdt", "fck", &wdt2_fck, CK_3XXX), 3388 CLK(NULL, "wdt2_fck", &wdt2_fck, CK_3XXX),
3389 CLK(NULL, "wkup_l4_ick", &wkup_l4_ick, CK_34XX | CK_36XX), 3389 CLK(NULL, "wkup_l4_ick", &wkup_l4_ick, CK_34XX | CK_36XX),
3390 CLK(NULL, "usim_ick", &usim_ick, CK_3430ES2PLUS | CK_36XX), 3390 CLK(NULL, "usim_ick", &usim_ick, CK_3430ES2PLUS | CK_36XX),
3391 CLK("omap_wdt", "ick", &wdt2_ick, CK_3XXX), 3391 CLK("omap_wdt", "ick", &wdt2_ick, CK_3XXX),
@@ -3436,9 +3436,9 @@ static struct omap_clk omap3xxx_clks[] = {
3436 CLK("omap-mcbsp.2", "ick", &mcbsp2_ick, CK_3XXX), 3436 CLK("omap-mcbsp.2", "ick", &mcbsp2_ick, CK_3XXX),
3437 CLK("omap-mcbsp.3", "ick", &mcbsp3_ick, CK_3XXX), 3437 CLK("omap-mcbsp.3", "ick", &mcbsp3_ick, CK_3XXX),
3438 CLK("omap-mcbsp.4", "ick", &mcbsp4_ick, CK_3XXX), 3438 CLK("omap-mcbsp.4", "ick", &mcbsp4_ick, CK_3XXX),
3439 CLK("omap-mcbsp.2", "fck", &mcbsp2_fck, CK_3XXX), 3439 CLK(NULL, "mcbsp2_fck", &mcbsp2_fck, CK_3XXX),
3440 CLK("omap-mcbsp.3", "fck", &mcbsp3_fck, CK_3XXX), 3440 CLK(NULL, "mcbsp3_fck", &mcbsp3_fck, CK_3XXX),
3441 CLK("omap-mcbsp.4", "fck", &mcbsp4_fck, CK_3XXX), 3441 CLK(NULL, "mcbsp4_fck", &mcbsp4_fck, CK_3XXX),
3442 CLK("etb", "emu_src_ck", &emu_src_ck, CK_3XXX), 3442 CLK("etb", "emu_src_ck", &emu_src_ck, CK_3XXX),
3443 CLK(NULL, "pclk_fck", &pclk_fck, CK_3XXX), 3443 CLK(NULL, "pclk_fck", &pclk_fck, CK_3XXX),
3444 CLK(NULL, "pclkx2_fck", &pclkx2_fck, CK_3XXX), 3444 CLK(NULL, "pclkx2_fck", &pclkx2_fck, CK_3XXX),
diff --git a/arch/arm/mach-omap2/clock44xx.h b/arch/arm/mach-omap2/clock44xx.h
index 6be1095936d..7ceb870e7ab 100644
--- a/arch/arm/mach-omap2/clock44xx.h
+++ b/arch/arm/mach-omap2/clock44xx.h
@@ -8,13 +8,6 @@
8#ifndef __ARCH_ARM_MACH_OMAP2_CLOCK44XX_H 8#ifndef __ARCH_ARM_MACH_OMAP2_CLOCK44XX_H
9#define __ARCH_ARM_MACH_OMAP2_CLOCK44XX_H 9#define __ARCH_ARM_MACH_OMAP2_CLOCK44XX_H
10 10
11/*
12 * XXX Missing values for the OMAP4 DPLL_USB
13 * XXX Missing min_multiplier values for all OMAP4 DPLLs
14 */
15#define OMAP4430_MAX_DPLL_MULT 2047
16#define OMAP4430_MAX_DPLL_DIV 128
17
18int omap4xxx_clk_init(void); 11int omap4xxx_clk_init(void);
19 12
20#endif 13#endif
diff --git a/arch/arm/mach-omap2/clock44xx_data.c b/arch/arm/mach-omap2/clock44xx_data.c
index 8c965671b4d..2af0e3f00ce 100644
--- a/arch/arm/mach-omap2/clock44xx_data.c
+++ b/arch/arm/mach-omap2/clock44xx_data.c
@@ -53,9 +53,9 @@ static struct clk extalt_clkin_ck = {
53static struct clk pad_clks_ck = { 53static struct clk pad_clks_ck = {
54 .name = "pad_clks_ck", 54 .name = "pad_clks_ck",
55 .rate = 12000000, 55 .rate = 12000000,
56 .ops = &clkops_omap2_dflt, 56 .ops = &clkops_omap2_dflt,
57 .enable_reg = OMAP4430_CM_CLKSEL_ABE, 57 .enable_reg = OMAP4430_CM_CLKSEL_ABE,
58 .enable_bit = OMAP4430_PAD_CLKS_GATE_SHIFT, 58 .enable_bit = OMAP4430_PAD_CLKS_GATE_SHIFT,
59}; 59};
60 60
61static struct clk pad_slimbus_core_clks_ck = { 61static struct clk pad_slimbus_core_clks_ck = {
@@ -73,9 +73,9 @@ static struct clk secure_32k_clk_src_ck = {
73static struct clk slimbus_clk = { 73static struct clk slimbus_clk = {
74 .name = "slimbus_clk", 74 .name = "slimbus_clk",
75 .rate = 12000000, 75 .rate = 12000000,
76 .ops = &clkops_omap2_dflt, 76 .ops = &clkops_omap2_dflt,
77 .enable_reg = OMAP4430_CM_CLKSEL_ABE, 77 .enable_reg = OMAP4430_CM_CLKSEL_ABE,
78 .enable_bit = OMAP4430_SLIMBUS_CLK_GATE_SHIFT, 78 .enable_bit = OMAP4430_SLIMBUS_CLK_GATE_SHIFT,
79}; 79};
80 80
81static struct clk sys_32k_ck = { 81static struct clk sys_32k_ck = {
@@ -258,8 +258,8 @@ static struct dpll_data dpll_abe_dd = {
258 .enable_mask = OMAP4430_DPLL_EN_MASK, 258 .enable_mask = OMAP4430_DPLL_EN_MASK,
259 .autoidle_mask = OMAP4430_AUTO_DPLL_MODE_MASK, 259 .autoidle_mask = OMAP4430_AUTO_DPLL_MODE_MASK,
260 .idlest_mask = OMAP4430_ST_DPLL_CLK_MASK, 260 .idlest_mask = OMAP4430_ST_DPLL_CLK_MASK,
261 .max_multiplier = OMAP4430_MAX_DPLL_MULT, 261 .max_multiplier = 2047,
262 .max_divider = OMAP4430_MAX_DPLL_DIV, 262 .max_divider = 128,
263 .min_divider = 1, 263 .min_divider = 1,
264}; 264};
265 265
@@ -278,10 +278,10 @@ static struct clk dpll_abe_ck = {
278static struct clk dpll_abe_x2_ck = { 278static struct clk dpll_abe_x2_ck = {
279 .name = "dpll_abe_x2_ck", 279 .name = "dpll_abe_x2_ck",
280 .parent = &dpll_abe_ck, 280 .parent = &dpll_abe_ck,
281 .clksel_reg = OMAP4430_CM_DIV_M2_DPLL_ABE,
281 .flags = CLOCK_CLKOUTX2, 282 .flags = CLOCK_CLKOUTX2,
282 .ops = &clkops_omap4_dpllmx_ops, 283 .ops = &clkops_omap4_dpllmx_ops,
283 .recalc = &omap3_clkoutx2_recalc, 284 .recalc = &omap3_clkoutx2_recalc,
284 .clksel_reg = OMAP4430_CM_DIV_M2_DPLL_ABE,
285}; 285};
286 286
287static const struct clksel_rate div31_1to31_rates[] = { 287static const struct clksel_rate div31_1to31_rates[] = {
@@ -434,8 +434,8 @@ static struct dpll_data dpll_core_dd = {
434 .enable_mask = OMAP4430_DPLL_EN_MASK, 434 .enable_mask = OMAP4430_DPLL_EN_MASK,
435 .autoidle_mask = OMAP4430_AUTO_DPLL_MODE_MASK, 435 .autoidle_mask = OMAP4430_AUTO_DPLL_MODE_MASK,
436 .idlest_mask = OMAP4430_ST_DPLL_CLK_MASK, 436 .idlest_mask = OMAP4430_ST_DPLL_CLK_MASK,
437 .max_multiplier = OMAP4430_MAX_DPLL_MULT, 437 .max_multiplier = 2047,
438 .max_divider = OMAP4430_MAX_DPLL_DIV, 438 .max_divider = 128,
439 .min_divider = 1, 439 .min_divider = 1,
440}; 440};
441 441
@@ -622,11 +622,11 @@ static struct clk dpll_core_m3x2_ck = {
622 .clksel_reg = OMAP4430_CM_DIV_M3_DPLL_CORE, 622 .clksel_reg = OMAP4430_CM_DIV_M3_DPLL_CORE,
623 .clksel_mask = OMAP4430_DPLL_CLKOUTHIF_DIV_MASK, 623 .clksel_mask = OMAP4430_DPLL_CLKOUTHIF_DIV_MASK,
624 .ops = &clkops_omap2_dflt, 624 .ops = &clkops_omap2_dflt,
625 .enable_reg = OMAP4430_CM_DIV_M3_DPLL_CORE,
626 .enable_bit = OMAP4430_DPLL_CLKOUTHIF_GATE_CTRL_SHIFT,
627 .recalc = &omap2_clksel_recalc, 625 .recalc = &omap2_clksel_recalc,
628 .round_rate = &omap2_clksel_round_rate, 626 .round_rate = &omap2_clksel_round_rate,
629 .set_rate = &omap2_clksel_set_rate, 627 .set_rate = &omap2_clksel_set_rate,
628 .enable_reg = OMAP4430_CM_DIV_M3_DPLL_CORE,
629 .enable_bit = OMAP4430_DPLL_CLKOUTHIF_GATE_CTRL_SHIFT,
630}; 630};
631 631
632static struct clk dpll_core_m7x2_ck = { 632static struct clk dpll_core_m7x2_ck = {
@@ -672,8 +672,8 @@ static struct dpll_data dpll_iva_dd = {
672 .enable_mask = OMAP4430_DPLL_EN_MASK, 672 .enable_mask = OMAP4430_DPLL_EN_MASK,
673 .autoidle_mask = OMAP4430_AUTO_DPLL_MODE_MASK, 673 .autoidle_mask = OMAP4430_AUTO_DPLL_MODE_MASK,
674 .idlest_mask = OMAP4430_ST_DPLL_CLK_MASK, 674 .idlest_mask = OMAP4430_ST_DPLL_CLK_MASK,
675 .max_multiplier = OMAP4430_MAX_DPLL_MULT, 675 .max_multiplier = 2047,
676 .max_divider = OMAP4430_MAX_DPLL_DIV, 676 .max_divider = 128,
677 .min_divider = 1, 677 .min_divider = 1,
678}; 678};
679 679
@@ -740,8 +740,8 @@ static struct dpll_data dpll_mpu_dd = {
740 .enable_mask = OMAP4430_DPLL_EN_MASK, 740 .enable_mask = OMAP4430_DPLL_EN_MASK,
741 .autoidle_mask = OMAP4430_AUTO_DPLL_MODE_MASK, 741 .autoidle_mask = OMAP4430_AUTO_DPLL_MODE_MASK,
742 .idlest_mask = OMAP4430_ST_DPLL_CLK_MASK, 742 .idlest_mask = OMAP4430_ST_DPLL_CLK_MASK,
743 .max_multiplier = OMAP4430_MAX_DPLL_MULT, 743 .max_multiplier = 2047,
744 .max_divider = OMAP4430_MAX_DPLL_DIV, 744 .max_divider = 128,
745 .min_divider = 1, 745 .min_divider = 1,
746}; 746};
747 747
@@ -813,8 +813,8 @@ static struct dpll_data dpll_per_dd = {
813 .enable_mask = OMAP4430_DPLL_EN_MASK, 813 .enable_mask = OMAP4430_DPLL_EN_MASK,
814 .autoidle_mask = OMAP4430_AUTO_DPLL_MODE_MASK, 814 .autoidle_mask = OMAP4430_AUTO_DPLL_MODE_MASK,
815 .idlest_mask = OMAP4430_ST_DPLL_CLK_MASK, 815 .idlest_mask = OMAP4430_ST_DPLL_CLK_MASK,
816 .max_multiplier = OMAP4430_MAX_DPLL_MULT, 816 .max_multiplier = 2047,
817 .max_divider = OMAP4430_MAX_DPLL_DIV, 817 .max_divider = 128,
818 .min_divider = 1, 818 .min_divider = 1,
819}; 819};
820 820
@@ -850,10 +850,10 @@ static struct clk dpll_per_m2_ck = {
850static struct clk dpll_per_x2_ck = { 850static struct clk dpll_per_x2_ck = {
851 .name = "dpll_per_x2_ck", 851 .name = "dpll_per_x2_ck",
852 .parent = &dpll_per_ck, 852 .parent = &dpll_per_ck,
853 .clksel_reg = OMAP4430_CM_DIV_M2_DPLL_PER,
853 .flags = CLOCK_CLKOUTX2, 854 .flags = CLOCK_CLKOUTX2,
854 .ops = &clkops_omap4_dpllmx_ops, 855 .ops = &clkops_omap4_dpllmx_ops,
855 .recalc = &omap3_clkoutx2_recalc, 856 .recalc = &omap3_clkoutx2_recalc,
856 .clksel_reg = OMAP4430_CM_DIV_M2_DPLL_PER,
857}; 857};
858 858
859static const struct clksel dpll_per_m2x2_div[] = { 859static const struct clksel dpll_per_m2x2_div[] = {
@@ -880,11 +880,11 @@ static struct clk dpll_per_m3x2_ck = {
880 .clksel_reg = OMAP4430_CM_DIV_M3_DPLL_PER, 880 .clksel_reg = OMAP4430_CM_DIV_M3_DPLL_PER,
881 .clksel_mask = OMAP4430_DPLL_CLKOUTHIF_DIV_MASK, 881 .clksel_mask = OMAP4430_DPLL_CLKOUTHIF_DIV_MASK,
882 .ops = &clkops_omap2_dflt, 882 .ops = &clkops_omap2_dflt,
883 .enable_reg = OMAP4430_CM_DIV_M3_DPLL_PER,
884 .enable_bit = OMAP4430_DPLL_CLKOUTHIF_GATE_CTRL_SHIFT,
885 .recalc = &omap2_clksel_recalc, 883 .recalc = &omap2_clksel_recalc,
886 .round_rate = &omap2_clksel_round_rate, 884 .round_rate = &omap2_clksel_round_rate,
887 .set_rate = &omap2_clksel_set_rate, 885 .set_rate = &omap2_clksel_set_rate,
886 .enable_reg = OMAP4430_CM_DIV_M3_DPLL_PER,
887 .enable_bit = OMAP4430_DPLL_CLKOUTHIF_GATE_CTRL_SHIFT,
888}; 888};
889 889
890static struct clk dpll_per_m4x2_ck = { 890static struct clk dpll_per_m4x2_ck = {
@@ -935,63 +935,6 @@ static struct clk dpll_per_m7x2_ck = {
935 .set_rate = &omap2_clksel_set_rate, 935 .set_rate = &omap2_clksel_set_rate,
936}; 936};
937 937
938/* DPLL_UNIPRO */
939static struct dpll_data dpll_unipro_dd = {
940 .mult_div1_reg = OMAP4430_CM_CLKSEL_DPLL_UNIPRO,
941 .clk_bypass = &sys_clkin_ck,
942 .clk_ref = &sys_clkin_ck,
943 .control_reg = OMAP4430_CM_CLKMODE_DPLL_UNIPRO,
944 .modes = (1 << DPLL_LOW_POWER_BYPASS) | (1 << DPLL_LOCKED),
945 .autoidle_reg = OMAP4430_CM_AUTOIDLE_DPLL_UNIPRO,
946 .idlest_reg = OMAP4430_CM_IDLEST_DPLL_UNIPRO,
947 .mult_mask = OMAP4430_DPLL_MULT_MASK,
948 .div1_mask = OMAP4430_DPLL_DIV_MASK,
949 .enable_mask = OMAP4430_DPLL_EN_MASK,
950 .autoidle_mask = OMAP4430_AUTO_DPLL_MODE_MASK,
951 .idlest_mask = OMAP4430_ST_DPLL_CLK_MASK,
952 .sddiv_mask = OMAP4430_DPLL_SD_DIV_MASK,
953 .max_multiplier = OMAP4430_MAX_DPLL_MULT,
954 .max_divider = OMAP4430_MAX_DPLL_DIV,
955 .min_divider = 1,
956};
957
958
959static struct clk dpll_unipro_ck = {
960 .name = "dpll_unipro_ck",
961 .parent = &sys_clkin_ck,
962 .dpll_data = &dpll_unipro_dd,
963 .init = &omap2_init_dpll_parent,
964 .ops = &clkops_omap3_noncore_dpll_ops,
965 .recalc = &omap3_dpll_recalc,
966 .round_rate = &omap2_dpll_round_rate,
967 .set_rate = &omap3_noncore_dpll_set_rate,
968};
969
970static struct clk dpll_unipro_x2_ck = {
971 .name = "dpll_unipro_x2_ck",
972 .parent = &dpll_unipro_ck,
973 .flags = CLOCK_CLKOUTX2,
974 .ops = &clkops_null,
975 .recalc = &omap3_clkoutx2_recalc,
976};
977
978static const struct clksel dpll_unipro_m2x2_div[] = {
979 { .parent = &dpll_unipro_x2_ck, .rates = div31_1to31_rates },
980 { .parent = NULL },
981};
982
983static struct clk dpll_unipro_m2x2_ck = {
984 .name = "dpll_unipro_m2x2_ck",
985 .parent = &dpll_unipro_x2_ck,
986 .clksel = dpll_unipro_m2x2_div,
987 .clksel_reg = OMAP4430_CM_DIV_M2_DPLL_UNIPRO,
988 .clksel_mask = OMAP4430_DPLL_CLKOUT_DIV_MASK,
989 .ops = &clkops_omap4_dpllmx_ops,
990 .recalc = &omap2_clksel_recalc,
991 .round_rate = &omap2_clksel_round_rate,
992 .set_rate = &omap2_clksel_set_rate,
993};
994
995static struct clk usb_hs_clk_div_ck = { 938static struct clk usb_hs_clk_div_ck = {
996 .name = "usb_hs_clk_div_ck", 939 .name = "usb_hs_clk_div_ck",
997 .parent = &dpll_abe_m3x2_ck, 940 .parent = &dpll_abe_m3x2_ck,
@@ -1015,8 +958,9 @@ static struct dpll_data dpll_usb_dd = {
1015 .enable_mask = OMAP4430_DPLL_EN_MASK, 958 .enable_mask = OMAP4430_DPLL_EN_MASK,
1016 .autoidle_mask = OMAP4430_AUTO_DPLL_MODE_MASK, 959 .autoidle_mask = OMAP4430_AUTO_DPLL_MODE_MASK,
1017 .idlest_mask = OMAP4430_ST_DPLL_CLK_MASK, 960 .idlest_mask = OMAP4430_ST_DPLL_CLK_MASK,
1018 .max_multiplier = OMAP4430_MAX_DPLL_MULT, 961 .sddiv_mask = OMAP4430_DPLL_SD_DIV_MASK,
1019 .max_divider = OMAP4430_MAX_DPLL_DIV, 962 .max_multiplier = 4095,
963 .max_divider = 256,
1020 .min_divider = 1, 964 .min_divider = 1,
1021}; 965};
1022 966
@@ -1035,8 +979,8 @@ static struct clk dpll_usb_ck = {
1035static struct clk dpll_usb_clkdcoldo_ck = { 979static struct clk dpll_usb_clkdcoldo_ck = {
1036 .name = "dpll_usb_clkdcoldo_ck", 980 .name = "dpll_usb_clkdcoldo_ck",
1037 .parent = &dpll_usb_ck, 981 .parent = &dpll_usb_ck,
1038 .ops = &clkops_omap4_dpllmx_ops,
1039 .clksel_reg = OMAP4430_CM_CLKDCOLDO_DPLL_USB, 982 .clksel_reg = OMAP4430_CM_CLKDCOLDO_DPLL_USB,
983 .ops = &clkops_omap4_dpllmx_ops,
1040 .recalc = &followparent_recalc, 984 .recalc = &followparent_recalc,
1041}; 985};
1042 986
@@ -1169,19 +1113,6 @@ static struct clk func_96m_fclk = {
1169 .set_rate = &omap2_clksel_set_rate, 1113 .set_rate = &omap2_clksel_set_rate,
1170}; 1114};
1171 1115
1172static const struct clksel hsmmc6_fclk_sel[] = {
1173 { .parent = &func_64m_fclk, .rates = div_1_0_rates },
1174 { .parent = &func_96m_fclk, .rates = div_1_1_rates },
1175 { .parent = NULL },
1176};
1177
1178static struct clk hsmmc6_fclk = {
1179 .name = "hsmmc6_fclk",
1180 .parent = &func_64m_fclk,
1181 .ops = &clkops_null,
1182 .recalc = &followparent_recalc,
1183};
1184
1185static const struct clksel_rate div2_1to8_rates[] = { 1116static const struct clksel_rate div2_1to8_rates[] = {
1186 { .div = 1, .val = 0, .flags = RATE_IN_4430 }, 1117 { .div = 1, .val = 0, .flags = RATE_IN_4430 },
1187 { .div = 8, .val = 1, .flags = RATE_IN_4430 }, 1118 { .div = 8, .val = 1, .flags = RATE_IN_4430 },
@@ -1264,6 +1195,21 @@ static struct clk l4_wkup_clk_mux_ck = {
1264 .recalc = &omap2_clksel_recalc, 1195 .recalc = &omap2_clksel_recalc,
1265}; 1196};
1266 1197
1198static struct clk ocp_abe_iclk = {
1199 .name = "ocp_abe_iclk",
1200 .parent = &aess_fclk,
1201 .ops = &clkops_null,
1202 .recalc = &followparent_recalc,
1203};
1204
1205static struct clk per_abe_24m_fclk = {
1206 .name = "per_abe_24m_fclk",
1207 .parent = &dpll_abe_m2_ck,
1208 .ops = &clkops_null,
1209 .fixed_div = 4,
1210 .recalc = &omap_fixed_divisor_recalc,
1211};
1212
1267static const struct clksel per_abe_nc_fclk_div[] = { 1213static const struct clksel per_abe_nc_fclk_div[] = {
1268 { .parent = &dpll_abe_m2_ck, .rates = div2_1to2_rates }, 1214 { .parent = &dpll_abe_m2_ck, .rates = div2_1to2_rates },
1269 { .parent = NULL }, 1215 { .parent = NULL },
@@ -1281,41 +1227,6 @@ static struct clk per_abe_nc_fclk = {
1281 .set_rate = &omap2_clksel_set_rate, 1227 .set_rate = &omap2_clksel_set_rate,
1282}; 1228};
1283 1229
1284static const struct clksel mcasp2_fclk_sel[] = {
1285 { .parent = &func_96m_fclk, .rates = div_1_0_rates },
1286 { .parent = &per_abe_nc_fclk, .rates = div_1_1_rates },
1287 { .parent = NULL },
1288};
1289
1290static struct clk mcasp2_fclk = {
1291 .name = "mcasp2_fclk",
1292 .parent = &func_96m_fclk,
1293 .ops = &clkops_null,
1294 .recalc = &followparent_recalc,
1295};
1296
1297static struct clk mcasp3_fclk = {
1298 .name = "mcasp3_fclk",
1299 .parent = &func_96m_fclk,
1300 .ops = &clkops_null,
1301 .recalc = &followparent_recalc,
1302};
1303
1304static struct clk ocp_abe_iclk = {
1305 .name = "ocp_abe_iclk",
1306 .parent = &aess_fclk,
1307 .ops = &clkops_null,
1308 .recalc = &followparent_recalc,
1309};
1310
1311static struct clk per_abe_24m_fclk = {
1312 .name = "per_abe_24m_fclk",
1313 .parent = &dpll_abe_m2_ck,
1314 .ops = &clkops_null,
1315 .fixed_div = 4,
1316 .recalc = &omap_fixed_divisor_recalc,
1317};
1318
1319static const struct clksel pmd_stm_clock_mux_sel[] = { 1230static const struct clksel pmd_stm_clock_mux_sel[] = {
1320 { .parent = &sys_clkin_ck, .rates = div_1_0_rates }, 1231 { .parent = &sys_clkin_ck, .rates = div_1_0_rates },
1321 { .parent = &dpll_core_m6x2_ck, .rates = div_1_1_rates }, 1232 { .parent = &dpll_core_m6x2_ck, .rates = div_1_1_rates },
@@ -1486,6 +1397,40 @@ static struct clk dss_dss_clk = {
1486 .recalc = &followparent_recalc, 1397 .recalc = &followparent_recalc,
1487}; 1398};
1488 1399
1400static const struct clksel_rate div3_8to32_rates[] = {
1401 { .div = 8, .val = 0, .flags = RATE_IN_44XX },
1402 { .div = 16, .val = 1, .flags = RATE_IN_44XX },
1403 { .div = 32, .val = 2, .flags = RATE_IN_44XX },
1404 { .div = 0 },
1405};
1406
1407static const struct clksel div_ts_div[] = {
1408 { .parent = &l4_wkup_clk_mux_ck, .rates = div3_8to32_rates },
1409 { .parent = NULL },
1410};
1411
1412static struct clk div_ts_ck = {
1413 .name = "div_ts_ck",
1414 .parent = &l4_wkup_clk_mux_ck,
1415 .clksel = div_ts_div,
1416 .clksel_reg = OMAP4430_CM_WKUP_BANDGAP_CLKCTRL,
1417 .clksel_mask = OMAP4430_CLKSEL_24_25_MASK,
1418 .ops = &clkops_null,
1419 .recalc = &omap2_clksel_recalc,
1420 .round_rate = &omap2_clksel_round_rate,
1421 .set_rate = &omap2_clksel_set_rate,
1422};
1423
1424static struct clk bandgap_ts_fclk = {
1425 .name = "bandgap_ts_fclk",
1426 .ops = &clkops_omap2_dflt,
1427 .enable_reg = OMAP4430_CM_WKUP_BANDGAP_CLKCTRL,
1428 .enable_bit = OMAP4460_OPTFCLKEN_TS_FCLK_SHIFT,
1429 .clkdm_name = "l4_wkup_clkdm",
1430 .parent = &div_ts_ck,
1431 .recalc = &followparent_recalc,
1432};
1433
1489static struct clk dss_48mhz_clk = { 1434static struct clk dss_48mhz_clk = {
1490 .name = "dss_48mhz_clk", 1435 .name = "dss_48mhz_clk",
1491 .ops = &clkops_omap2_dflt, 1436 .ops = &clkops_omap2_dflt,
@@ -1694,6 +1639,7 @@ static struct clk gpmc_ick = {
1694 .ops = &clkops_omap2_dflt, 1639 .ops = &clkops_omap2_dflt,
1695 .enable_reg = OMAP4430_CM_L3_2_GPMC_CLKCTRL, 1640 .enable_reg = OMAP4430_CM_L3_2_GPMC_CLKCTRL,
1696 .enable_bit = OMAP4430_MODULEMODE_HWCTRL, 1641 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
1642 .flags = ENABLE_ON_INIT,
1697 .clkdm_name = "l3_2_clkdm", 1643 .clkdm_name = "l3_2_clkdm",
1698 .parent = &l3_div_ck, 1644 .parent = &l3_div_ck,
1699 .recalc = &followparent_recalc, 1645 .recalc = &followparent_recalc,
@@ -1846,8 +1792,8 @@ static struct clk l3_instr_ick = {
1846 .ops = &clkops_omap2_dflt, 1792 .ops = &clkops_omap2_dflt,
1847 .enable_reg = OMAP4430_CM_L3INSTR_L3_INSTR_CLKCTRL, 1793 .enable_reg = OMAP4430_CM_L3INSTR_L3_INSTR_CLKCTRL,
1848 .enable_bit = OMAP4430_MODULEMODE_HWCTRL, 1794 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
1849 .clkdm_name = "l3_instr_clkdm",
1850 .flags = ENABLE_ON_INIT, 1795 .flags = ENABLE_ON_INIT,
1796 .clkdm_name = "l3_instr_clkdm",
1851 .parent = &l3_div_ck, 1797 .parent = &l3_div_ck,
1852 .recalc = &followparent_recalc, 1798 .recalc = &followparent_recalc,
1853}; 1799};
@@ -1857,8 +1803,8 @@ static struct clk l3_main_3_ick = {
1857 .ops = &clkops_omap2_dflt, 1803 .ops = &clkops_omap2_dflt,
1858 .enable_reg = OMAP4430_CM_L3INSTR_L3_3_CLKCTRL, 1804 .enable_reg = OMAP4430_CM_L3INSTR_L3_3_CLKCTRL,
1859 .enable_bit = OMAP4430_MODULEMODE_HWCTRL, 1805 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
1860 .clkdm_name = "l3_instr_clkdm",
1861 .flags = ENABLE_ON_INIT, 1806 .flags = ENABLE_ON_INIT,
1807 .clkdm_name = "l3_instr_clkdm",
1862 .parent = &l3_div_ck, 1808 .parent = &l3_div_ck,
1863 .recalc = &followparent_recalc, 1809 .recalc = &followparent_recalc,
1864}; 1810};
@@ -1995,10 +1941,16 @@ static struct clk mcbsp3_fck = {
1995 .clkdm_name = "abe_clkdm", 1941 .clkdm_name = "abe_clkdm",
1996}; 1942};
1997 1943
1944static const struct clksel mcbsp4_sync_mux_sel[] = {
1945 { .parent = &func_96m_fclk, .rates = div_1_0_rates },
1946 { .parent = &per_abe_nc_fclk, .rates = div_1_1_rates },
1947 { .parent = NULL },
1948};
1949
1998static struct clk mcbsp4_sync_mux_ck = { 1950static struct clk mcbsp4_sync_mux_ck = {
1999 .name = "mcbsp4_sync_mux_ck", 1951 .name = "mcbsp4_sync_mux_ck",
2000 .parent = &func_96m_fclk, 1952 .parent = &func_96m_fclk,
2001 .clksel = mcasp2_fclk_sel, 1953 .clksel = mcbsp4_sync_mux_sel,
2002 .init = &omap2_init_clksel_parent, 1954 .init = &omap2_init_clksel_parent,
2003 .clksel_reg = OMAP4430_CM_L4PER_MCBSP4_CLKCTRL, 1955 .clksel_reg = OMAP4430_CM_L4PER_MCBSP4_CLKCTRL,
2004 .clksel_mask = OMAP4430_CLKSEL_INTERNAL_SOURCE_MASK, 1956 .clksel_mask = OMAP4430_CLKSEL_INTERNAL_SOURCE_MASK,
@@ -2077,11 +2029,17 @@ static struct clk mcspi4_fck = {
2077 .recalc = &followparent_recalc, 2029 .recalc = &followparent_recalc,
2078}; 2030};
2079 2031
2032static const struct clksel hsmmc1_fclk_sel[] = {
2033 { .parent = &func_64m_fclk, .rates = div_1_0_rates },
2034 { .parent = &func_96m_fclk, .rates = div_1_1_rates },
2035 { .parent = NULL },
2036};
2037
2080/* Merged hsmmc1_fclk into mmc1 */ 2038/* Merged hsmmc1_fclk into mmc1 */
2081static struct clk mmc1_fck = { 2039static struct clk mmc1_fck = {
2082 .name = "mmc1_fck", 2040 .name = "mmc1_fck",
2083 .parent = &func_64m_fclk, 2041 .parent = &func_64m_fclk,
2084 .clksel = hsmmc6_fclk_sel, 2042 .clksel = hsmmc1_fclk_sel,
2085 .init = &omap2_init_clksel_parent, 2043 .init = &omap2_init_clksel_parent,
2086 .clksel_reg = OMAP4430_CM_L3INIT_MMC1_CLKCTRL, 2044 .clksel_reg = OMAP4430_CM_L3INIT_MMC1_CLKCTRL,
2087 .clksel_mask = OMAP4430_CLKSEL_MASK, 2045 .clksel_mask = OMAP4430_CLKSEL_MASK,
@@ -2096,7 +2054,7 @@ static struct clk mmc1_fck = {
2096static struct clk mmc2_fck = { 2054static struct clk mmc2_fck = {
2097 .name = "mmc2_fck", 2055 .name = "mmc2_fck",
2098 .parent = &func_64m_fclk, 2056 .parent = &func_64m_fclk,
2099 .clksel = hsmmc6_fclk_sel, 2057 .clksel = hsmmc1_fclk_sel,
2100 .init = &omap2_init_clksel_parent, 2058 .init = &omap2_init_clksel_parent,
2101 .clksel_reg = OMAP4430_CM_L3INIT_MMC2_CLKCTRL, 2059 .clksel_reg = OMAP4430_CM_L3INIT_MMC2_CLKCTRL,
2102 .clksel_mask = OMAP4430_CLKSEL_MASK, 2060 .clksel_mask = OMAP4430_CLKSEL_MASK,
@@ -2162,8 +2120,8 @@ static struct clk ocp_wp_noc_ick = {
2162 .ops = &clkops_omap2_dflt, 2120 .ops = &clkops_omap2_dflt,
2163 .enable_reg = OMAP4430_CM_L3INSTR_OCP_WP1_CLKCTRL, 2121 .enable_reg = OMAP4430_CM_L3INSTR_OCP_WP1_CLKCTRL,
2164 .enable_bit = OMAP4430_MODULEMODE_HWCTRL, 2122 .enable_bit = OMAP4430_MODULEMODE_HWCTRL,
2165 .clkdm_name = "l3_instr_clkdm",
2166 .flags = ENABLE_ON_INIT, 2123 .flags = ENABLE_ON_INIT,
2124 .clkdm_name = "l3_instr_clkdm",
2167 .parent = &l3_div_ck, 2125 .parent = &l3_div_ck,
2168 .recalc = &followparent_recalc, 2126 .recalc = &followparent_recalc,
2169}; 2127};
@@ -2850,19 +2808,39 @@ static struct clk trace_clk_div_ck = {
2850 2808
2851/* SCRM aux clk nodes */ 2809/* SCRM aux clk nodes */
2852 2810
2853static const struct clksel auxclk_sel[] = { 2811static const struct clksel auxclk_src_sel[] = {
2854 { .parent = &sys_clkin_ck, .rates = div_1_0_rates }, 2812 { .parent = &sys_clkin_ck, .rates = div_1_0_rates },
2855 { .parent = &dpll_core_m3x2_ck, .rates = div_1_1_rates }, 2813 { .parent = &dpll_core_m3x2_ck, .rates = div_1_1_rates },
2856 { .parent = &dpll_per_m3x2_ck, .rates = div_1_2_rates }, 2814 { .parent = &dpll_per_m3x2_ck, .rates = div_1_2_rates },
2857 { .parent = NULL }, 2815 { .parent = NULL },
2858}; 2816};
2859 2817
2860static struct clk auxclk0_ck = { 2818static const struct clksel_rate div16_1to16_rates[] = {
2861 .name = "auxclk0_ck", 2819 { .div = 1, .val = 0, .flags = RATE_IN_4430 },
2820 { .div = 2, .val = 1, .flags = RATE_IN_4430 },
2821 { .div = 3, .val = 2, .flags = RATE_IN_4430 },
2822 { .div = 4, .val = 3, .flags = RATE_IN_4430 },
2823 { .div = 5, .val = 4, .flags = RATE_IN_4430 },
2824 { .div = 6, .val = 5, .flags = RATE_IN_4430 },
2825 { .div = 7, .val = 6, .flags = RATE_IN_4430 },
2826 { .div = 8, .val = 7, .flags = RATE_IN_4430 },
2827 { .div = 9, .val = 8, .flags = RATE_IN_4430 },
2828 { .div = 10, .val = 9, .flags = RATE_IN_4430 },
2829 { .div = 11, .val = 10, .flags = RATE_IN_4430 },
2830 { .div = 12, .val = 11, .flags = RATE_IN_4430 },
2831 { .div = 13, .val = 12, .flags = RATE_IN_4430 },
2832 { .div = 14, .val = 13, .flags = RATE_IN_4430 },
2833 { .div = 15, .val = 14, .flags = RATE_IN_4430 },
2834 { .div = 16, .val = 15, .flags = RATE_IN_4430 },
2835 { .div = 0 },
2836};
2837
2838static struct clk auxclk0_src_ck = {
2839 .name = "auxclk0_src_ck",
2862 .parent = &sys_clkin_ck, 2840 .parent = &sys_clkin_ck,
2863 .init = &omap2_init_clksel_parent, 2841 .init = &omap2_init_clksel_parent,
2864 .ops = &clkops_omap2_dflt, 2842 .ops = &clkops_omap2_dflt,
2865 .clksel = auxclk_sel, 2843 .clksel = auxclk_src_sel,
2866 .clksel_reg = OMAP4_SCRM_AUXCLK0, 2844 .clksel_reg = OMAP4_SCRM_AUXCLK0,
2867 .clksel_mask = OMAP4_SRCSELECT_MASK, 2845 .clksel_mask = OMAP4_SRCSELECT_MASK,
2868 .recalc = &omap2_clksel_recalc, 2846 .recalc = &omap2_clksel_recalc,
@@ -2870,12 +2848,29 @@ static struct clk auxclk0_ck = {
2870 .enable_bit = OMAP4_ENABLE_SHIFT, 2848 .enable_bit = OMAP4_ENABLE_SHIFT,
2871}; 2849};
2872 2850
2873static struct clk auxclk1_ck = { 2851static const struct clksel auxclk0_sel[] = {
2874 .name = "auxclk1_ck", 2852 { .parent = &auxclk0_src_ck, .rates = div16_1to16_rates },
2853 { .parent = NULL },
2854};
2855
2856static struct clk auxclk0_ck = {
2857 .name = "auxclk0_ck",
2858 .parent = &auxclk0_src_ck,
2859 .clksel = auxclk0_sel,
2860 .clksel_reg = OMAP4_SCRM_AUXCLK0,
2861 .clksel_mask = OMAP4_CLKDIV_MASK,
2862 .ops = &clkops_null,
2863 .recalc = &omap2_clksel_recalc,
2864 .round_rate = &omap2_clksel_round_rate,
2865 .set_rate = &omap2_clksel_set_rate,
2866};
2867
2868static struct clk auxclk1_src_ck = {
2869 .name = "auxclk1_src_ck",
2875 .parent = &sys_clkin_ck, 2870 .parent = &sys_clkin_ck,
2876 .init = &omap2_init_clksel_parent, 2871 .init = &omap2_init_clksel_parent,
2877 .ops = &clkops_omap2_dflt, 2872 .ops = &clkops_omap2_dflt,
2878 .clksel = auxclk_sel, 2873 .clksel = auxclk_src_sel,
2879 .clksel_reg = OMAP4_SCRM_AUXCLK1, 2874 .clksel_reg = OMAP4_SCRM_AUXCLK1,
2880 .clksel_mask = OMAP4_SRCSELECT_MASK, 2875 .clksel_mask = OMAP4_SRCSELECT_MASK,
2881 .recalc = &omap2_clksel_recalc, 2876 .recalc = &omap2_clksel_recalc,
@@ -2883,24 +2878,59 @@ static struct clk auxclk1_ck = {
2883 .enable_bit = OMAP4_ENABLE_SHIFT, 2878 .enable_bit = OMAP4_ENABLE_SHIFT,
2884}; 2879};
2885 2880
2886static struct clk auxclk2_ck = { 2881static const struct clksel auxclk1_sel[] = {
2887 .name = "auxclk2_ck", 2882 { .parent = &auxclk1_src_ck, .rates = div16_1to16_rates },
2883 { .parent = NULL },
2884};
2885
2886static struct clk auxclk1_ck = {
2887 .name = "auxclk1_ck",
2888 .parent = &auxclk1_src_ck,
2889 .clksel = auxclk1_sel,
2890 .clksel_reg = OMAP4_SCRM_AUXCLK1,
2891 .clksel_mask = OMAP4_CLKDIV_MASK,
2892 .ops = &clkops_null,
2893 .recalc = &omap2_clksel_recalc,
2894 .round_rate = &omap2_clksel_round_rate,
2895 .set_rate = &omap2_clksel_set_rate,
2896};
2897
2898static struct clk auxclk2_src_ck = {
2899 .name = "auxclk2_src_ck",
2888 .parent = &sys_clkin_ck, 2900 .parent = &sys_clkin_ck,
2889 .init = &omap2_init_clksel_parent, 2901 .init = &omap2_init_clksel_parent,
2890 .ops = &clkops_omap2_dflt, 2902 .ops = &clkops_omap2_dflt,
2891 .clksel = auxclk_sel, 2903 .clksel = auxclk_src_sel,
2892 .clksel_reg = OMAP4_SCRM_AUXCLK2, 2904 .clksel_reg = OMAP4_SCRM_AUXCLK2,
2893 .clksel_mask = OMAP4_SRCSELECT_MASK, 2905 .clksel_mask = OMAP4_SRCSELECT_MASK,
2894 .recalc = &omap2_clksel_recalc, 2906 .recalc = &omap2_clksel_recalc,
2895 .enable_reg = OMAP4_SCRM_AUXCLK2, 2907 .enable_reg = OMAP4_SCRM_AUXCLK2,
2896 .enable_bit = OMAP4_ENABLE_SHIFT, 2908 .enable_bit = OMAP4_ENABLE_SHIFT,
2897}; 2909};
2898static struct clk auxclk3_ck = { 2910
2899 .name = "auxclk3_ck", 2911static const struct clksel auxclk2_sel[] = {
2912 { .parent = &auxclk2_src_ck, .rates = div16_1to16_rates },
2913 { .parent = NULL },
2914};
2915
2916static struct clk auxclk2_ck = {
2917 .name = "auxclk2_ck",
2918 .parent = &auxclk2_src_ck,
2919 .clksel = auxclk2_sel,
2920 .clksel_reg = OMAP4_SCRM_AUXCLK2,
2921 .clksel_mask = OMAP4_CLKDIV_MASK,
2922 .ops = &clkops_null,
2923 .recalc = &omap2_clksel_recalc,
2924 .round_rate = &omap2_clksel_round_rate,
2925 .set_rate = &omap2_clksel_set_rate,
2926};
2927
2928static struct clk auxclk3_src_ck = {
2929 .name = "auxclk3_src_ck",
2900 .parent = &sys_clkin_ck, 2930 .parent = &sys_clkin_ck,
2901 .init = &omap2_init_clksel_parent, 2931 .init = &omap2_init_clksel_parent,
2902 .ops = &clkops_omap2_dflt, 2932 .ops = &clkops_omap2_dflt,
2903 .clksel = auxclk_sel, 2933 .clksel = auxclk_src_sel,
2904 .clksel_reg = OMAP4_SCRM_AUXCLK3, 2934 .clksel_reg = OMAP4_SCRM_AUXCLK3,
2905 .clksel_mask = OMAP4_SRCSELECT_MASK, 2935 .clksel_mask = OMAP4_SRCSELECT_MASK,
2906 .recalc = &omap2_clksel_recalc, 2936 .recalc = &omap2_clksel_recalc,
@@ -2908,12 +2938,29 @@ static struct clk auxclk3_ck = {
2908 .enable_bit = OMAP4_ENABLE_SHIFT, 2938 .enable_bit = OMAP4_ENABLE_SHIFT,
2909}; 2939};
2910 2940
2911static struct clk auxclk4_ck = { 2941static const struct clksel auxclk3_sel[] = {
2912 .name = "auxclk4_ck", 2942 { .parent = &auxclk3_src_ck, .rates = div16_1to16_rates },
2943 { .parent = NULL },
2944};
2945
2946static struct clk auxclk3_ck = {
2947 .name = "auxclk3_ck",
2948 .parent = &auxclk3_src_ck,
2949 .clksel = auxclk3_sel,
2950 .clksel_reg = OMAP4_SCRM_AUXCLK3,
2951 .clksel_mask = OMAP4_CLKDIV_MASK,
2952 .ops = &clkops_null,
2953 .recalc = &omap2_clksel_recalc,
2954 .round_rate = &omap2_clksel_round_rate,
2955 .set_rate = &omap2_clksel_set_rate,
2956};
2957
2958static struct clk auxclk4_src_ck = {
2959 .name = "auxclk4_src_ck",
2913 .parent = &sys_clkin_ck, 2960 .parent = &sys_clkin_ck,
2914 .init = &omap2_init_clksel_parent, 2961 .init = &omap2_init_clksel_parent,
2915 .ops = &clkops_omap2_dflt, 2962 .ops = &clkops_omap2_dflt,
2916 .clksel = auxclk_sel, 2963 .clksel = auxclk_src_sel,
2917 .clksel_reg = OMAP4_SCRM_AUXCLK4, 2964 .clksel_reg = OMAP4_SCRM_AUXCLK4,
2918 .clksel_mask = OMAP4_SRCSELECT_MASK, 2965 .clksel_mask = OMAP4_SRCSELECT_MASK,
2919 .recalc = &omap2_clksel_recalc, 2966 .recalc = &omap2_clksel_recalc,
@@ -2921,12 +2968,29 @@ static struct clk auxclk4_ck = {
2921 .enable_bit = OMAP4_ENABLE_SHIFT, 2968 .enable_bit = OMAP4_ENABLE_SHIFT,
2922}; 2969};
2923 2970
2924static struct clk auxclk5_ck = { 2971static const struct clksel auxclk4_sel[] = {
2925 .name = "auxclk5_ck", 2972 { .parent = &auxclk4_src_ck, .rates = div16_1to16_rates },
2973 { .parent = NULL },
2974};
2975
2976static struct clk auxclk4_ck = {
2977 .name = "auxclk4_ck",
2978 .parent = &auxclk4_src_ck,
2979 .clksel = auxclk4_sel,
2980 .clksel_reg = OMAP4_SCRM_AUXCLK4,
2981 .clksel_mask = OMAP4_CLKDIV_MASK,
2982 .ops = &clkops_null,
2983 .recalc = &omap2_clksel_recalc,
2984 .round_rate = &omap2_clksel_round_rate,
2985 .set_rate = &omap2_clksel_set_rate,
2986};
2987
2988static struct clk auxclk5_src_ck = {
2989 .name = "auxclk5_src_ck",
2926 .parent = &sys_clkin_ck, 2990 .parent = &sys_clkin_ck,
2927 .init = &omap2_init_clksel_parent, 2991 .init = &omap2_init_clksel_parent,
2928 .ops = &clkops_omap2_dflt, 2992 .ops = &clkops_omap2_dflt,
2929 .clksel = auxclk_sel, 2993 .clksel = auxclk_src_sel,
2930 .clksel_reg = OMAP4_SCRM_AUXCLK5, 2994 .clksel_reg = OMAP4_SCRM_AUXCLK5,
2931 .clksel_mask = OMAP4_SRCSELECT_MASK, 2995 .clksel_mask = OMAP4_SRCSELECT_MASK,
2932 .recalc = &omap2_clksel_recalc, 2996 .recalc = &omap2_clksel_recalc,
@@ -2934,6 +2998,23 @@ static struct clk auxclk5_ck = {
2934 .enable_bit = OMAP4_ENABLE_SHIFT, 2998 .enable_bit = OMAP4_ENABLE_SHIFT,
2935}; 2999};
2936 3000
3001static const struct clksel auxclk5_sel[] = {
3002 { .parent = &auxclk5_src_ck, .rates = div16_1to16_rates },
3003 { .parent = NULL },
3004};
3005
3006static struct clk auxclk5_ck = {
3007 .name = "auxclk5_ck",
3008 .parent = &auxclk5_src_ck,
3009 .clksel = auxclk5_sel,
3010 .clksel_reg = OMAP4_SCRM_AUXCLK5,
3011 .clksel_mask = OMAP4_CLKDIV_MASK,
3012 .ops = &clkops_null,
3013 .recalc = &omap2_clksel_recalc,
3014 .round_rate = &omap2_clksel_round_rate,
3015 .set_rate = &omap2_clksel_set_rate,
3016};
3017
2937static const struct clksel auxclkreq_sel[] = { 3018static const struct clksel auxclkreq_sel[] = {
2938 { .parent = &auxclk0_ck, .rates = div_1_0_rates }, 3019 { .parent = &auxclk0_ck, .rates = div_1_0_rates },
2939 { .parent = &auxclk1_ck, .rates = div_1_1_rates }, 3020 { .parent = &auxclk1_ck, .rates = div_1_1_rates },
@@ -3077,9 +3158,6 @@ static struct omap_clk omap44xx_clks[] = {
3077 CLK(NULL, "dpll_per_m5x2_ck", &dpll_per_m5x2_ck, CK_443X), 3158 CLK(NULL, "dpll_per_m5x2_ck", &dpll_per_m5x2_ck, CK_443X),
3078 CLK(NULL, "dpll_per_m6x2_ck", &dpll_per_m6x2_ck, CK_443X), 3159 CLK(NULL, "dpll_per_m6x2_ck", &dpll_per_m6x2_ck, CK_443X),
3079 CLK(NULL, "dpll_per_m7x2_ck", &dpll_per_m7x2_ck, CK_443X), 3160 CLK(NULL, "dpll_per_m7x2_ck", &dpll_per_m7x2_ck, CK_443X),
3080 CLK(NULL, "dpll_unipro_ck", &dpll_unipro_ck, CK_443X),
3081 CLK(NULL, "dpll_unipro_x2_ck", &dpll_unipro_x2_ck, CK_443X),
3082 CLK(NULL, "dpll_unipro_m2x2_ck", &dpll_unipro_m2x2_ck, CK_443X),
3083 CLK(NULL, "usb_hs_clk_div_ck", &usb_hs_clk_div_ck, CK_443X), 3161 CLK(NULL, "usb_hs_clk_div_ck", &usb_hs_clk_div_ck, CK_443X),
3084 CLK(NULL, "dpll_usb_ck", &dpll_usb_ck, CK_443X), 3162 CLK(NULL, "dpll_usb_ck", &dpll_usb_ck, CK_443X),
3085 CLK(NULL, "dpll_usb_clkdcoldo_ck", &dpll_usb_clkdcoldo_ck, CK_443X), 3163 CLK(NULL, "dpll_usb_clkdcoldo_ck", &dpll_usb_clkdcoldo_ck, CK_443X),
@@ -3092,17 +3170,14 @@ static struct omap_clk omap44xx_clks[] = {
3092 CLK(NULL, "func_48mc_fclk", &func_48mc_fclk, CK_443X), 3170 CLK(NULL, "func_48mc_fclk", &func_48mc_fclk, CK_443X),
3093 CLK(NULL, "func_64m_fclk", &func_64m_fclk, CK_443X), 3171 CLK(NULL, "func_64m_fclk", &func_64m_fclk, CK_443X),
3094 CLK(NULL, "func_96m_fclk", &func_96m_fclk, CK_443X), 3172 CLK(NULL, "func_96m_fclk", &func_96m_fclk, CK_443X),
3095 CLK(NULL, "hsmmc6_fclk", &hsmmc6_fclk, CK_443X),
3096 CLK(NULL, "init_60m_fclk", &init_60m_fclk, CK_443X), 3173 CLK(NULL, "init_60m_fclk", &init_60m_fclk, CK_443X),
3097 CLK(NULL, "l3_div_ck", &l3_div_ck, CK_443X), 3174 CLK(NULL, "l3_div_ck", &l3_div_ck, CK_443X),
3098 CLK(NULL, "l4_div_ck", &l4_div_ck, CK_443X), 3175 CLK(NULL, "l4_div_ck", &l4_div_ck, CK_443X),
3099 CLK(NULL, "lp_clk_div_ck", &lp_clk_div_ck, CK_443X), 3176 CLK(NULL, "lp_clk_div_ck", &lp_clk_div_ck, CK_443X),
3100 CLK(NULL, "l4_wkup_clk_mux_ck", &l4_wkup_clk_mux_ck, CK_443X), 3177 CLK(NULL, "l4_wkup_clk_mux_ck", &l4_wkup_clk_mux_ck, CK_443X),
3101 CLK(NULL, "per_abe_nc_fclk", &per_abe_nc_fclk, CK_443X),
3102 CLK(NULL, "mcasp2_fclk", &mcasp2_fclk, CK_443X),
3103 CLK(NULL, "mcasp3_fclk", &mcasp3_fclk, CK_443X),
3104 CLK(NULL, "ocp_abe_iclk", &ocp_abe_iclk, CK_443X), 3178 CLK(NULL, "ocp_abe_iclk", &ocp_abe_iclk, CK_443X),
3105 CLK(NULL, "per_abe_24m_fclk", &per_abe_24m_fclk, CK_443X), 3179 CLK(NULL, "per_abe_24m_fclk", &per_abe_24m_fclk, CK_443X),
3180 CLK(NULL, "per_abe_nc_fclk", &per_abe_nc_fclk, CK_443X),
3106 CLK(NULL, "pmd_stm_clock_mux_ck", &pmd_stm_clock_mux_ck, CK_443X), 3181 CLK(NULL, "pmd_stm_clock_mux_ck", &pmd_stm_clock_mux_ck, CK_443X),
3107 CLK(NULL, "pmd_trace_clk_mux_ck", &pmd_trace_clk_mux_ck, CK_443X), 3182 CLK(NULL, "pmd_trace_clk_mux_ck", &pmd_trace_clk_mux_ck, CK_443X),
3108 CLK(NULL, "syc_clk_div_ck", &syc_clk_div_ck, CK_443X), 3183 CLK(NULL, "syc_clk_div_ck", &syc_clk_div_ck, CK_443X),
@@ -3110,14 +3185,16 @@ static struct omap_clk omap44xx_clks[] = {
3110 CLK(NULL, "aes2_fck", &aes2_fck, CK_443X), 3185 CLK(NULL, "aes2_fck", &aes2_fck, CK_443X),
3111 CLK(NULL, "aess_fck", &aess_fck, CK_443X), 3186 CLK(NULL, "aess_fck", &aess_fck, CK_443X),
3112 CLK(NULL, "bandgap_fclk", &bandgap_fclk, CK_443X), 3187 CLK(NULL, "bandgap_fclk", &bandgap_fclk, CK_443X),
3188 CLK(NULL, "bandgap_ts_fclk", &bandgap_ts_fclk, CK_446X),
3113 CLK(NULL, "des3des_fck", &des3des_fck, CK_443X), 3189 CLK(NULL, "des3des_fck", &des3des_fck, CK_443X),
3190 CLK(NULL, "div_ts_ck", &div_ts_ck, CK_446X),
3114 CLK(NULL, "dmic_sync_mux_ck", &dmic_sync_mux_ck, CK_443X), 3191 CLK(NULL, "dmic_sync_mux_ck", &dmic_sync_mux_ck, CK_443X),
3115 CLK(NULL, "dmic_fck", &dmic_fck, CK_443X), 3192 CLK(NULL, "dmic_fck", &dmic_fck, CK_443X),
3116 CLK(NULL, "dsp_fck", &dsp_fck, CK_443X), 3193 CLK(NULL, "dsp_fck", &dsp_fck, CK_443X),
3117 CLK("omapdss_dss", "sys_clk", &dss_sys_clk, CK_443X), 3194 CLK(NULL, "dss_sys_clk", &dss_sys_clk, CK_443X),
3118 CLK("omapdss_dss", "tv_clk", &dss_tv_clk, CK_443X), 3195 CLK(NULL, "dss_tv_clk", &dss_tv_clk, CK_443X),
3119 CLK("omapdss_dss", "video_clk", &dss_48mhz_clk, CK_443X), 3196 CLK(NULL, "dss_48mhz_clk", &dss_48mhz_clk, CK_443X),
3120 CLK("omapdss_dss", "fck", &dss_dss_clk, CK_443X), 3197 CLK(NULL, "dss_dss_clk", &dss_dss_clk, CK_443X),
3121 CLK("omapdss_dss", "ick", &dss_fck, CK_443X), 3198 CLK("omapdss_dss", "ick", &dss_fck, CK_443X),
3122 CLK(NULL, "efuse_ctrl_cust_fck", &efuse_ctrl_cust_fck, CK_443X), 3199 CLK(NULL, "efuse_ctrl_cust_fck", &efuse_ctrl_cust_fck, CK_443X),
3123 CLK(NULL, "emif1_fck", &emif1_fck, CK_443X), 3200 CLK(NULL, "emif1_fck", &emif1_fck, CK_443X),
@@ -3138,12 +3215,12 @@ static struct omap_clk omap44xx_clks[] = {
3138 CLK(NULL, "gpio6_ick", &gpio6_ick, CK_443X), 3215 CLK(NULL, "gpio6_ick", &gpio6_ick, CK_443X),
3139 CLK(NULL, "gpmc_ick", &gpmc_ick, CK_443X), 3216 CLK(NULL, "gpmc_ick", &gpmc_ick, CK_443X),
3140 CLK(NULL, "gpu_fck", &gpu_fck, CK_443X), 3217 CLK(NULL, "gpu_fck", &gpu_fck, CK_443X),
3141 CLK("omap2_hdq.0", "fck", &hdq1w_fck, CK_443X), 3218 CLK(NULL, "hdq1w_fck", &hdq1w_fck, CK_443X),
3142 CLK(NULL, "hsi_fck", &hsi_fck, CK_443X), 3219 CLK(NULL, "hsi_fck", &hsi_fck, CK_443X),
3143 CLK("omap_i2c.1", "fck", &i2c1_fck, CK_443X), 3220 CLK(NULL, "i2c1_fck", &i2c1_fck, CK_443X),
3144 CLK("omap_i2c.2", "fck", &i2c2_fck, CK_443X), 3221 CLK(NULL, "i2c2_fck", &i2c2_fck, CK_443X),
3145 CLK("omap_i2c.3", "fck", &i2c3_fck, CK_443X), 3222 CLK(NULL, "i2c3_fck", &i2c3_fck, CK_443X),
3146 CLK("omap_i2c.4", "fck", &i2c4_fck, CK_443X), 3223 CLK(NULL, "i2c4_fck", &i2c4_fck, CK_443X),
3147 CLK(NULL, "ipu_fck", &ipu_fck, CK_443X), 3224 CLK(NULL, "ipu_fck", &ipu_fck, CK_443X),
3148 CLK(NULL, "iss_ctrlclk", &iss_ctrlclk, CK_443X), 3225 CLK(NULL, "iss_ctrlclk", &iss_ctrlclk, CK_443X),
3149 CLK(NULL, "iss_fck", &iss_fck, CK_443X), 3226 CLK(NULL, "iss_fck", &iss_fck, CK_443X),
@@ -3154,23 +3231,23 @@ static struct omap_clk omap44xx_clks[] = {
3154 CLK(NULL, "mcasp_sync_mux_ck", &mcasp_sync_mux_ck, CK_443X), 3231 CLK(NULL, "mcasp_sync_mux_ck", &mcasp_sync_mux_ck, CK_443X),
3155 CLK(NULL, "mcasp_fck", &mcasp_fck, CK_443X), 3232 CLK(NULL, "mcasp_fck", &mcasp_fck, CK_443X),
3156 CLK(NULL, "mcbsp1_sync_mux_ck", &mcbsp1_sync_mux_ck, CK_443X), 3233 CLK(NULL, "mcbsp1_sync_mux_ck", &mcbsp1_sync_mux_ck, CK_443X),
3157 CLK("omap-mcbsp.1", "fck", &mcbsp1_fck, CK_443X), 3234 CLK(NULL, "mcbsp1_fck", &mcbsp1_fck, CK_443X),
3158 CLK(NULL, "mcbsp2_sync_mux_ck", &mcbsp2_sync_mux_ck, CK_443X), 3235 CLK(NULL, "mcbsp2_sync_mux_ck", &mcbsp2_sync_mux_ck, CK_443X),
3159 CLK("omap-mcbsp.2", "fck", &mcbsp2_fck, CK_443X), 3236 CLK(NULL, "mcbsp2_fck", &mcbsp2_fck, CK_443X),
3160 CLK(NULL, "mcbsp3_sync_mux_ck", &mcbsp3_sync_mux_ck, CK_443X), 3237 CLK(NULL, "mcbsp3_sync_mux_ck", &mcbsp3_sync_mux_ck, CK_443X),
3161 CLK("omap-mcbsp.3", "fck", &mcbsp3_fck, CK_443X), 3238 CLK(NULL, "mcbsp3_fck", &mcbsp3_fck, CK_443X),
3162 CLK(NULL, "mcbsp4_sync_mux_ck", &mcbsp4_sync_mux_ck, CK_443X), 3239 CLK(NULL, "mcbsp4_sync_mux_ck", &mcbsp4_sync_mux_ck, CK_443X),
3163 CLK("omap-mcbsp.4", "fck", &mcbsp4_fck, CK_443X), 3240 CLK(NULL, "mcbsp4_fck", &mcbsp4_fck, CK_443X),
3164 CLK(NULL, "mcpdm_fck", &mcpdm_fck, CK_443X), 3241 CLK(NULL, "mcpdm_fck", &mcpdm_fck, CK_443X),
3165 CLK("omap2_mcspi.1", "fck", &mcspi1_fck, CK_443X), 3242 CLK(NULL, "mcspi1_fck", &mcspi1_fck, CK_443X),
3166 CLK("omap2_mcspi.2", "fck", &mcspi2_fck, CK_443X), 3243 CLK(NULL, "mcspi2_fck", &mcspi2_fck, CK_443X),
3167 CLK("omap2_mcspi.3", "fck", &mcspi3_fck, CK_443X), 3244 CLK(NULL, "mcspi3_fck", &mcspi3_fck, CK_443X),
3168 CLK("omap2_mcspi.4", "fck", &mcspi4_fck, CK_443X), 3245 CLK(NULL, "mcspi4_fck", &mcspi4_fck, CK_443X),
3169 CLK("omap_hsmmc.0", "fck", &mmc1_fck, CK_443X), 3246 CLK(NULL, "mmc1_fck", &mmc1_fck, CK_443X),
3170 CLK("omap_hsmmc.1", "fck", &mmc2_fck, CK_443X), 3247 CLK(NULL, "mmc2_fck", &mmc2_fck, CK_443X),
3171 CLK("omap_hsmmc.2", "fck", &mmc3_fck, CK_443X), 3248 CLK(NULL, "mmc3_fck", &mmc3_fck, CK_443X),
3172 CLK("omap_hsmmc.3", "fck", &mmc4_fck, CK_443X), 3249 CLK(NULL, "mmc4_fck", &mmc4_fck, CK_443X),
3173 CLK("omap_hsmmc.4", "fck", &mmc5_fck, CK_443X), 3250 CLK(NULL, "mmc5_fck", &mmc5_fck, CK_443X),
3174 CLK(NULL, "ocp2scp_usb_phy_phy_48m", &ocp2scp_usb_phy_phy_48m, CK_443X), 3251 CLK(NULL, "ocp2scp_usb_phy_phy_48m", &ocp2scp_usb_phy_phy_48m, CK_443X),
3175 CLK(NULL, "ocp2scp_usb_phy_ick", &ocp2scp_usb_phy_ick, CK_443X), 3252 CLK(NULL, "ocp2scp_usb_phy_ick", &ocp2scp_usb_phy_ick, CK_443X),
3176 CLK(NULL, "ocp_wp_noc_ick", &ocp_wp_noc_ick, CK_443X), 3253 CLK(NULL, "ocp_wp_noc_ick", &ocp_wp_noc_ick, CK_443X),
@@ -3204,7 +3281,6 @@ static struct omap_clk omap44xx_clks[] = {
3204 CLK(NULL, "uart2_fck", &uart2_fck, CK_443X), 3281 CLK(NULL, "uart2_fck", &uart2_fck, CK_443X),
3205 CLK(NULL, "uart3_fck", &uart3_fck, CK_443X), 3282 CLK(NULL, "uart3_fck", &uart3_fck, CK_443X),
3206 CLK(NULL, "uart4_fck", &uart4_fck, CK_443X), 3283 CLK(NULL, "uart4_fck", &uart4_fck, CK_443X),
3207 CLK(NULL, "usb_host_fs_fck", &usb_host_fs_fck, CK_443X),
3208 CLK("usbhs-omap.0", "fs_fck", &usb_host_fs_fck, CK_443X), 3284 CLK("usbhs-omap.0", "fs_fck", &usb_host_fs_fck, CK_443X),
3209 CLK(NULL, "utmi_p1_gfclk", &utmi_p1_gfclk, CK_443X), 3285 CLK(NULL, "utmi_p1_gfclk", &utmi_p1_gfclk, CK_443X),
3210 CLK(NULL, "usb_host_hs_utmi_p1_clk", &usb_host_hs_utmi_p1_clk, CK_443X), 3286 CLK(NULL, "usb_host_hs_utmi_p1_clk", &usb_host_hs_utmi_p1_clk, CK_443X),
@@ -3216,9 +3292,7 @@ static struct omap_clk omap44xx_clks[] = {
3216 CLK(NULL, "usb_host_hs_hsic60m_p2_clk", &usb_host_hs_hsic60m_p2_clk, CK_443X), 3292 CLK(NULL, "usb_host_hs_hsic60m_p2_clk", &usb_host_hs_hsic60m_p2_clk, CK_443X),
3217 CLK(NULL, "usb_host_hs_hsic480m_p2_clk", &usb_host_hs_hsic480m_p2_clk, CK_443X), 3293 CLK(NULL, "usb_host_hs_hsic480m_p2_clk", &usb_host_hs_hsic480m_p2_clk, CK_443X),
3218 CLK(NULL, "usb_host_hs_func48mclk", &usb_host_hs_func48mclk, CK_443X), 3294 CLK(NULL, "usb_host_hs_func48mclk", &usb_host_hs_func48mclk, CK_443X),
3219 CLK(NULL, "usb_host_hs_fck", &usb_host_hs_fck, CK_443X),
3220 CLK("usbhs-omap.0", "hs_fck", &usb_host_hs_fck, CK_443X), 3295 CLK("usbhs-omap.0", "hs_fck", &usb_host_hs_fck, CK_443X),
3221 CLK("usbhs-omap.0", "usbhost_ick", &dummy_ck, CK_443X),
3222 CLK(NULL, "otg_60m_gfclk", &otg_60m_gfclk, CK_443X), 3296 CLK(NULL, "otg_60m_gfclk", &otg_60m_gfclk, CK_443X),
3223 CLK(NULL, "usb_otg_hs_xclk", &usb_otg_hs_xclk, CK_443X), 3297 CLK(NULL, "usb_otg_hs_xclk", &usb_otg_hs_xclk, CK_443X),
3224 CLK("musb-omap2430", "ick", &usb_otg_hs_ick, CK_443X), 3298 CLK("musb-omap2430", "ick", &usb_otg_hs_ick, CK_443X),
@@ -3226,17 +3300,32 @@ static struct omap_clk omap44xx_clks[] = {
3226 CLK(NULL, "usb_tll_hs_usb_ch2_clk", &usb_tll_hs_usb_ch2_clk, CK_443X), 3300 CLK(NULL, "usb_tll_hs_usb_ch2_clk", &usb_tll_hs_usb_ch2_clk, CK_443X),
3227 CLK(NULL, "usb_tll_hs_usb_ch0_clk", &usb_tll_hs_usb_ch0_clk, CK_443X), 3301 CLK(NULL, "usb_tll_hs_usb_ch0_clk", &usb_tll_hs_usb_ch0_clk, CK_443X),
3228 CLK(NULL, "usb_tll_hs_usb_ch1_clk", &usb_tll_hs_usb_ch1_clk, CK_443X), 3302 CLK(NULL, "usb_tll_hs_usb_ch1_clk", &usb_tll_hs_usb_ch1_clk, CK_443X),
3229 CLK(NULL, "usb_tll_hs_ick", &usb_tll_hs_ick, CK_443X),
3230 CLK("usbhs-omap.0", "usbtll_ick", &usb_tll_hs_ick, CK_443X), 3303 CLK("usbhs-omap.0", "usbtll_ick", &usb_tll_hs_ick, CK_443X),
3231 CLK("usbhs-omap.0", "usbtll_fck", &dummy_ck, CK_443X),
3232 CLK(NULL, "usim_ck", &usim_ck, CK_443X), 3304 CLK(NULL, "usim_ck", &usim_ck, CK_443X),
3233 CLK(NULL, "usim_fclk", &usim_fclk, CK_443X), 3305 CLK(NULL, "usim_fclk", &usim_fclk, CK_443X),
3234 CLK(NULL, "usim_fck", &usim_fck, CK_443X), 3306 CLK(NULL, "usim_fck", &usim_fck, CK_443X),
3235 CLK("omap_wdt", "fck", &wd_timer2_fck, CK_443X), 3307 CLK(NULL, "wd_timer2_fck", &wd_timer2_fck, CK_443X),
3236 CLK(NULL, "mailboxes_ick", &dummy_ck, CK_443X),
3237 CLK(NULL, "wd_timer3_fck", &wd_timer3_fck, CK_443X), 3308 CLK(NULL, "wd_timer3_fck", &wd_timer3_fck, CK_443X),
3238 CLK(NULL, "stm_clk_div_ck", &stm_clk_div_ck, CK_443X), 3309 CLK(NULL, "stm_clk_div_ck", &stm_clk_div_ck, CK_443X),
3239 CLK(NULL, "trace_clk_div_ck", &trace_clk_div_ck, CK_443X), 3310 CLK(NULL, "trace_clk_div_ck", &trace_clk_div_ck, CK_443X),
3311 CLK(NULL, "auxclk0_src_ck", &auxclk0_src_ck, CK_443X),
3312 CLK(NULL, "auxclk0_ck", &auxclk0_ck, CK_443X),
3313 CLK(NULL, "auxclkreq0_ck", &auxclkreq0_ck, CK_443X),
3314 CLK(NULL, "auxclk1_src_ck", &auxclk1_src_ck, CK_443X),
3315 CLK(NULL, "auxclk1_ck", &auxclk1_ck, CK_443X),
3316 CLK(NULL, "auxclkreq1_ck", &auxclkreq1_ck, CK_443X),
3317 CLK(NULL, "auxclk2_src_ck", &auxclk2_src_ck, CK_443X),
3318 CLK(NULL, "auxclk2_ck", &auxclk2_ck, CK_443X),
3319 CLK(NULL, "auxclkreq2_ck", &auxclkreq2_ck, CK_443X),
3320 CLK(NULL, "auxclk3_src_ck", &auxclk3_src_ck, CK_443X),
3321 CLK(NULL, "auxclk3_ck", &auxclk3_ck, CK_443X),
3322 CLK(NULL, "auxclkreq3_ck", &auxclkreq3_ck, CK_443X),
3323 CLK(NULL, "auxclk4_src_ck", &auxclk4_src_ck, CK_443X),
3324 CLK(NULL, "auxclk4_ck", &auxclk4_ck, CK_443X),
3325 CLK(NULL, "auxclkreq4_ck", &auxclkreq4_ck, CK_443X),
3326 CLK(NULL, "auxclk5_src_ck", &auxclk5_src_ck, CK_443X),
3327 CLK(NULL, "auxclk5_ck", &auxclk5_ck, CK_443X),
3328 CLK(NULL, "auxclkreq5_ck", &auxclkreq5_ck, CK_443X),
3240 CLK(NULL, "gpmc_ck", &dummy_ck, CK_443X), 3329 CLK(NULL, "gpmc_ck", &dummy_ck, CK_443X),
3241 CLK(NULL, "gpt1_ick", &dummy_ck, CK_443X), 3330 CLK(NULL, "gpt1_ick", &dummy_ck, CK_443X),
3242 CLK(NULL, "gpt2_ick", &dummy_ck, CK_443X), 3331 CLK(NULL, "gpt2_ick", &dummy_ck, CK_443X),
@@ -3253,6 +3342,7 @@ static struct omap_clk omap44xx_clks[] = {
3253 CLK("omap_i2c.2", "ick", &dummy_ck, CK_443X), 3342 CLK("omap_i2c.2", "ick", &dummy_ck, CK_443X),
3254 CLK("omap_i2c.3", "ick", &dummy_ck, CK_443X), 3343 CLK("omap_i2c.3", "ick", &dummy_ck, CK_443X),
3255 CLK("omap_i2c.4", "ick", &dummy_ck, CK_443X), 3344 CLK("omap_i2c.4", "ick", &dummy_ck, CK_443X),
3345 CLK(NULL, "mailboxes_ick", &dummy_ck, CK_443X),
3256 CLK("omap_hsmmc.0", "ick", &dummy_ck, CK_443X), 3346 CLK("omap_hsmmc.0", "ick", &dummy_ck, CK_443X),
3257 CLK("omap_hsmmc.1", "ick", &dummy_ck, CK_443X), 3347 CLK("omap_hsmmc.1", "ick", &dummy_ck, CK_443X),
3258 CLK("omap_hsmmc.2", "ick", &dummy_ck, CK_443X), 3348 CLK("omap_hsmmc.2", "ick", &dummy_ck, CK_443X),
@@ -3270,19 +3360,9 @@ static struct omap_clk omap44xx_clks[] = {
3270 CLK(NULL, "uart2_ick", &dummy_ck, CK_443X), 3360 CLK(NULL, "uart2_ick", &dummy_ck, CK_443X),
3271 CLK(NULL, "uart3_ick", &dummy_ck, CK_443X), 3361 CLK(NULL, "uart3_ick", &dummy_ck, CK_443X),
3272 CLK(NULL, "uart4_ick", &dummy_ck, CK_443X), 3362 CLK(NULL, "uart4_ick", &dummy_ck, CK_443X),
3363 CLK("usbhs-omap.0", "usbhost_ick", &dummy_ck, CK_443X),
3364 CLK("usbhs-omap.0", "usbtll_fck", &dummy_ck, CK_443X),
3273 CLK("omap_wdt", "ick", &dummy_ck, CK_443X), 3365 CLK("omap_wdt", "ick", &dummy_ck, CK_443X),
3274 CLK(NULL, "auxclk0_ck", &auxclk0_ck, CK_443X),
3275 CLK(NULL, "auxclk1_ck", &auxclk1_ck, CK_443X),
3276 CLK(NULL, "auxclk2_ck", &auxclk2_ck, CK_443X),
3277 CLK(NULL, "auxclk3_ck", &auxclk3_ck, CK_443X),
3278 CLK(NULL, "auxclk4_ck", &auxclk4_ck, CK_443X),
3279 CLK(NULL, "auxclk5_ck", &auxclk5_ck, CK_443X),
3280 CLK(NULL, "auxclkreq0_ck", &auxclkreq0_ck, CK_443X),
3281 CLK(NULL, "auxclkreq1_ck", &auxclkreq1_ck, CK_443X),
3282 CLK(NULL, "auxclkreq2_ck", &auxclkreq2_ck, CK_443X),
3283 CLK(NULL, "auxclkreq3_ck", &auxclkreq3_ck, CK_443X),
3284 CLK(NULL, "auxclkreq4_ck", &auxclkreq4_ck, CK_443X),
3285 CLK(NULL, "auxclkreq5_ck", &auxclkreq5_ck, CK_443X),
3286}; 3366};
3287 3367
3288int __init omap4xxx_clk_init(void) 3368int __init omap4xxx_clk_init(void)
@@ -3293,9 +3373,13 @@ int __init omap4xxx_clk_init(void)
3293 if (cpu_is_omap44xx()) { 3373 if (cpu_is_omap44xx()) {
3294 cpu_mask = RATE_IN_4430; 3374 cpu_mask = RATE_IN_4430;
3295 cpu_clkflg = CK_443X; 3375 cpu_clkflg = CK_443X;
3376 } else if (cpu_is_omap446x()) {
3377 cpu_mask = RATE_IN_4460;
3378 cpu_clkflg = CK_446X;
3296 } 3379 }
3297 3380
3298 clk_init(&omap2_clk_functions); 3381 clk_init(&omap2_clk_functions);
3382 omap2_clk_disable_clkdm_control();
3299 3383
3300 for (c = omap44xx_clks; c < omap44xx_clks + ARRAY_SIZE(omap44xx_clks); 3384 for (c = omap44xx_clks; c < omap44xx_clks + ARRAY_SIZE(omap44xx_clks);
3301 c++) 3385 c++)
diff --git a/arch/arm/mach-omap2/clockdomain.c b/arch/arm/mach-omap2/clockdomain.c
index 6cb6c03293d..ab7db083f97 100644
--- a/arch/arm/mach-omap2/clockdomain.c
+++ b/arch/arm/mach-omap2/clockdomain.c
@@ -1,8 +1,8 @@
1/* 1/*
2 * OMAP2/3/4 clockdomain framework functions 2 * OMAP2/3/4 clockdomain framework functions
3 * 3 *
4 * Copyright (C) 2008-2010 Texas Instruments, Inc. 4 * Copyright (C) 2008-2011 Texas Instruments, Inc.
5 * Copyright (C) 2008-2010 Nokia Corporation 5 * Copyright (C) 2008-2011 Nokia Corporation
6 * 6 *
7 * Written by Paul Walmsley and Jouni Högander 7 * Written by Paul Walmsley and Jouni Högander
8 * Added OMAP4 specific support by Abhijit Pagare <abhijitpagare@ti.com> 8 * Added OMAP4 specific support by Abhijit Pagare <abhijitpagare@ti.com>
@@ -92,6 +92,8 @@ static int _clkdm_register(struct clockdomain *clkdm)
92 92
93 pwrdm_add_clkdm(pwrdm, clkdm); 93 pwrdm_add_clkdm(pwrdm, clkdm);
94 94
95 spin_lock_init(&clkdm->lock);
96
95 pr_debug("clockdomain: registered %s\n", clkdm->name); 97 pr_debug("clockdomain: registered %s\n", clkdm->name);
96 98
97 return 0; 99 return 0;
@@ -690,6 +692,9 @@ int clkdm_clear_all_sleepdeps(struct clockdomain *clkdm)
690 */ 692 */
691int clkdm_sleep(struct clockdomain *clkdm) 693int clkdm_sleep(struct clockdomain *clkdm)
692{ 694{
695 int ret;
696 unsigned long flags;
697
693 if (!clkdm) 698 if (!clkdm)
694 return -EINVAL; 699 return -EINVAL;
695 700
@@ -704,7 +709,11 @@ int clkdm_sleep(struct clockdomain *clkdm)
704 709
705 pr_debug("clockdomain: forcing sleep on %s\n", clkdm->name); 710 pr_debug("clockdomain: forcing sleep on %s\n", clkdm->name);
706 711
707 return arch_clkdm->clkdm_sleep(clkdm); 712 spin_lock_irqsave(&clkdm->lock, flags);
713 clkdm->_flags &= ~_CLKDM_FLAG_HWSUP_ENABLED;
714 ret = arch_clkdm->clkdm_sleep(clkdm);
715 spin_unlock_irqrestore(&clkdm->lock, flags);
716 return ret;
708} 717}
709 718
710/** 719/**
@@ -718,6 +727,9 @@ int clkdm_sleep(struct clockdomain *clkdm)
718 */ 727 */
719int clkdm_wakeup(struct clockdomain *clkdm) 728int clkdm_wakeup(struct clockdomain *clkdm)
720{ 729{
730 int ret;
731 unsigned long flags;
732
721 if (!clkdm) 733 if (!clkdm)
722 return -EINVAL; 734 return -EINVAL;
723 735
@@ -732,7 +744,11 @@ int clkdm_wakeup(struct clockdomain *clkdm)
732 744
733 pr_debug("clockdomain: forcing wakeup on %s\n", clkdm->name); 745 pr_debug("clockdomain: forcing wakeup on %s\n", clkdm->name);
734 746
735 return arch_clkdm->clkdm_wakeup(clkdm); 747 spin_lock_irqsave(&clkdm->lock, flags);
748 clkdm->_flags &= ~_CLKDM_FLAG_HWSUP_ENABLED;
749 ret = arch_clkdm->clkdm_wakeup(clkdm);
750 spin_unlock_irqrestore(&clkdm->lock, flags);
751 return ret;
736} 752}
737 753
738/** 754/**
@@ -747,6 +763,8 @@ int clkdm_wakeup(struct clockdomain *clkdm)
747 */ 763 */
748void clkdm_allow_idle(struct clockdomain *clkdm) 764void clkdm_allow_idle(struct clockdomain *clkdm)
749{ 765{
766 unsigned long flags;
767
750 if (!clkdm) 768 if (!clkdm)
751 return; 769 return;
752 770
@@ -762,8 +780,11 @@ void clkdm_allow_idle(struct clockdomain *clkdm)
762 pr_debug("clockdomain: enabling automatic idle transitions for %s\n", 780 pr_debug("clockdomain: enabling automatic idle transitions for %s\n",
763 clkdm->name); 781 clkdm->name);
764 782
783 spin_lock_irqsave(&clkdm->lock, flags);
784 clkdm->_flags |= _CLKDM_FLAG_HWSUP_ENABLED;
765 arch_clkdm->clkdm_allow_idle(clkdm); 785 arch_clkdm->clkdm_allow_idle(clkdm);
766 pwrdm_clkdm_state_switch(clkdm); 786 pwrdm_clkdm_state_switch(clkdm);
787 spin_unlock_irqrestore(&clkdm->lock, flags);
767} 788}
768 789
769/** 790/**
@@ -777,6 +798,8 @@ void clkdm_allow_idle(struct clockdomain *clkdm)
777 */ 798 */
778void clkdm_deny_idle(struct clockdomain *clkdm) 799void clkdm_deny_idle(struct clockdomain *clkdm)
779{ 800{
801 unsigned long flags;
802
780 if (!clkdm) 803 if (!clkdm)
781 return; 804 return;
782 805
@@ -792,11 +815,90 @@ void clkdm_deny_idle(struct clockdomain *clkdm)
792 pr_debug("clockdomain: disabling automatic idle transitions for %s\n", 815 pr_debug("clockdomain: disabling automatic idle transitions for %s\n",
793 clkdm->name); 816 clkdm->name);
794 817
818 spin_lock_irqsave(&clkdm->lock, flags);
819 clkdm->_flags &= ~_CLKDM_FLAG_HWSUP_ENABLED;
795 arch_clkdm->clkdm_deny_idle(clkdm); 820 arch_clkdm->clkdm_deny_idle(clkdm);
821 spin_unlock_irqrestore(&clkdm->lock, flags);
822}
823
824/**
825 * clkdm_in_hwsup - is clockdomain @clkdm have hardware-supervised idle enabled?
826 * @clkdm: struct clockdomain *
827 *
828 * Returns true if clockdomain @clkdm currently has
829 * hardware-supervised idle enabled, or false if it does not or if
830 * @clkdm is NULL. It is only valid to call this function after
831 * clkdm_init() has been called. This function does not actually read
832 * bits from the hardware; it instead tests an in-memory flag that is
833 * changed whenever the clockdomain code changes the auto-idle mode.
834 */
835bool clkdm_in_hwsup(struct clockdomain *clkdm)
836{
837 bool ret;
838 unsigned long flags;
839
840 if (!clkdm)
841 return false;
842
843 spin_lock_irqsave(&clkdm->lock, flags);
844 ret = (clkdm->_flags & _CLKDM_FLAG_HWSUP_ENABLED) ? true : false;
845 spin_unlock_irqrestore(&clkdm->lock, flags);
846
847 return ret;
848}
849
850/* Clockdomain-to-clock/hwmod framework interface code */
851
852static int _clkdm_clk_hwmod_enable(struct clockdomain *clkdm)
853{
854 unsigned long flags;
855
856 if (!clkdm || !arch_clkdm || !arch_clkdm->clkdm_clk_enable)
857 return -EINVAL;
858
859 /*
860 * For arch's with no autodeps, clkcm_clk_enable
861 * should be called for every clock instance or hwmod that is
862 * enabled, so the clkdm can be force woken up.
863 */
864 if ((atomic_inc_return(&clkdm->usecount) > 1) && autodeps)
865 return 0;
866
867 spin_lock_irqsave(&clkdm->lock, flags);
868 arch_clkdm->clkdm_clk_enable(clkdm);
869 pwrdm_wait_transition(clkdm->pwrdm.ptr);
870 pwrdm_clkdm_state_switch(clkdm);
871 spin_unlock_irqrestore(&clkdm->lock, flags);
872
873 pr_debug("clockdomain: clkdm %s: enabled\n", clkdm->name);
874
875 return 0;
796} 876}
797 877
878static int _clkdm_clk_hwmod_disable(struct clockdomain *clkdm)
879{
880 unsigned long flags;
881
882 if (!clkdm || !arch_clkdm || !arch_clkdm->clkdm_clk_disable)
883 return -EINVAL;
884
885 if (atomic_read(&clkdm->usecount) == 0) {
886 WARN_ON(1); /* underflow */
887 return -ERANGE;
888 }
889
890 if (atomic_dec_return(&clkdm->usecount) > 0)
891 return 0;
892
893 spin_lock_irqsave(&clkdm->lock, flags);
894 arch_clkdm->clkdm_clk_disable(clkdm);
895 pwrdm_clkdm_state_switch(clkdm);
896 spin_unlock_irqrestore(&clkdm->lock, flags);
798 897
799/* Clockdomain-to-clock framework interface code */ 898 pr_debug("clockdomain: clkdm %s: disabled\n", clkdm->name);
899
900 return 0;
901}
800 902
801/** 903/**
802 * clkdm_clk_enable - add an enabled downstream clock to this clkdm 904 * clkdm_clk_enable - add an enabled downstream clock to this clkdm
@@ -819,25 +921,10 @@ int clkdm_clk_enable(struct clockdomain *clkdm, struct clk *clk)
819 * downstream clocks for debugging purposes? 921 * downstream clocks for debugging purposes?
820 */ 922 */
821 923
822 if (!clkdm || !clk) 924 if (!clk)
823 return -EINVAL; 925 return -EINVAL;
824 926
825 if (!arch_clkdm || !arch_clkdm->clkdm_clk_enable) 927 return _clkdm_clk_hwmod_enable(clkdm);
826 return -EINVAL;
827
828 if (atomic_inc_return(&clkdm->usecount) > 1)
829 return 0;
830
831 /* Clockdomain now has one enabled downstream clock */
832
833 pr_debug("clockdomain: clkdm %s: clk %s now enabled\n", clkdm->name,
834 clk->name);
835
836 arch_clkdm->clkdm_clk_enable(clkdm);
837 pwrdm_wait_transition(clkdm->pwrdm.ptr);
838 pwrdm_clkdm_state_switch(clkdm);
839
840 return 0;
841} 928}
842 929
843/** 930/**
@@ -850,9 +937,8 @@ int clkdm_clk_enable(struct clockdomain *clkdm, struct clk *clk)
850 * clockdomain usecount goes to 0, put the clockdomain to sleep 937 * clockdomain usecount goes to 0, put the clockdomain to sleep
851 * (software-supervised mode) or remove the clkdm autodependencies 938 * (software-supervised mode) or remove the clkdm autodependencies
852 * (hardware-supervised mode). Returns -EINVAL if passed null 939 * (hardware-supervised mode). Returns -EINVAL if passed null
853 * pointers; -ERANGE if the @clkdm usecount underflows and debugging 940 * pointers; -ERANGE if the @clkdm usecount underflows; or returns 0
854 * is enabled; or returns 0 upon success or if the clockdomain is in 941 * upon success or if the clockdomain is in hwsup idle mode.
855 * hwsup idle mode.
856 */ 942 */
857int clkdm_clk_disable(struct clockdomain *clkdm, struct clk *clk) 943int clkdm_clk_disable(struct clockdomain *clkdm, struct clk *clk)
858{ 944{
@@ -861,30 +947,72 @@ int clkdm_clk_disable(struct clockdomain *clkdm, struct clk *clk)
861 * downstream clocks for debugging purposes? 947 * downstream clocks for debugging purposes?
862 */ 948 */
863 949
864 if (!clkdm || !clk) 950 if (!clk)
865 return -EINVAL; 951 return -EINVAL;
866 952
867 if (!arch_clkdm || !arch_clkdm->clkdm_clk_disable) 953 return _clkdm_clk_hwmod_disable(clkdm);
954}
955
956/**
957 * clkdm_hwmod_enable - add an enabled downstream hwmod to this clkdm
958 * @clkdm: struct clockdomain *
959 * @oh: struct omap_hwmod * of the enabled downstream hwmod
960 *
961 * Increment the usecount of the clockdomain @clkdm and ensure that it
962 * is awake before @oh is enabled. Intended to be called by
963 * module_enable() code.
964 * If the clockdomain is in software-supervised idle mode, force the
965 * clockdomain to wake. If the clockdomain is in hardware-supervised idle
966 * mode, add clkdm-pwrdm autodependencies, to ensure that devices in the
967 * clockdomain can be read from/written to by on-chip processors.
968 * Returns -EINVAL if passed null pointers;
969 * returns 0 upon success or if the clockdomain is in hwsup idle mode.
970 */
971int clkdm_hwmod_enable(struct clockdomain *clkdm, struct omap_hwmod *oh)
972{
973 /* The clkdm attribute does not exist yet prior OMAP4 */
974 if (cpu_is_omap24xx() || cpu_is_omap34xx())
975 return 0;
976
977 /*
978 * XXX Rewrite this code to maintain a list of enabled
979 * downstream hwmods for debugging purposes?
980 */
981
982 if (!oh)
868 return -EINVAL; 983 return -EINVAL;
869 984
870#ifdef DEBUG 985 return _clkdm_clk_hwmod_enable(clkdm);
871 if (atomic_read(&clkdm->usecount) == 0) { 986}
872 WARN_ON(1); /* underflow */
873 return -ERANGE;
874 }
875#endif
876 987
877 if (atomic_dec_return(&clkdm->usecount) > 0) 988/**
989 * clkdm_hwmod_disable - remove an enabled downstream hwmod from this clkdm
990 * @clkdm: struct clockdomain *
991 * @oh: struct omap_hwmod * of the disabled downstream hwmod
992 *
993 * Decrement the usecount of this clockdomain @clkdm when @oh is
994 * disabled. Intended to be called by module_disable() code.
995 * If the clockdomain usecount goes to 0, put the clockdomain to sleep
996 * (software-supervised mode) or remove the clkdm autodependencies
997 * (hardware-supervised mode).
998 * Returns -EINVAL if passed null pointers; -ERANGE if the @clkdm usecount
999 * underflows; or returns 0 upon success or if the clockdomain is in hwsup
1000 * idle mode.
1001 */
1002int clkdm_hwmod_disable(struct clockdomain *clkdm, struct omap_hwmod *oh)
1003{
1004 /* The clkdm attribute does not exist yet prior OMAP4 */
1005 if (cpu_is_omap24xx() || cpu_is_omap34xx())
878 return 0; 1006 return 0;
879 1007
880 /* All downstream clocks of this clockdomain are now disabled */ 1008 /*
881 1009 * XXX Rewrite this code to maintain a list of enabled
882 pr_debug("clockdomain: clkdm %s: clk %s now disabled\n", clkdm->name, 1010 * downstream hwmods for debugging purposes?
883 clk->name); 1011 */
884 1012
885 arch_clkdm->clkdm_clk_disable(clkdm); 1013 if (!oh)
886 pwrdm_clkdm_state_switch(clkdm); 1014 return -EINVAL;
887 1015
888 return 0; 1016 return _clkdm_clk_hwmod_disable(clkdm);
889} 1017}
890 1018
diff --git a/arch/arm/mach-omap2/clockdomain.h b/arch/arm/mach-omap2/clockdomain.h
index 5823584d9cd..1e50c88b8a0 100644
--- a/arch/arm/mach-omap2/clockdomain.h
+++ b/arch/arm/mach-omap2/clockdomain.h
@@ -17,9 +17,11 @@
17#define __ARCH_ARM_MACH_OMAP2_CLOCKDOMAIN_H 17#define __ARCH_ARM_MACH_OMAP2_CLOCKDOMAIN_H
18 18
19#include <linux/init.h> 19#include <linux/init.h>
20#include <linux/spinlock.h>
20 21
21#include "powerdomain.h" 22#include "powerdomain.h"
22#include <plat/clock.h> 23#include <plat/clock.h>
24#include <plat/omap_hwmod.h>
23#include <plat/cpu.h> 25#include <plat/cpu.h>
24 26
25/* 27/*
@@ -82,6 +84,9 @@ struct clkdm_dep {
82 const struct omap_chip_id omap_chip; 84 const struct omap_chip_id omap_chip;
83}; 85};
84 86
87/* Possible flags for struct clockdomain._flags */
88#define _CLKDM_FLAG_HWSUP_ENABLED BIT(0)
89
85/** 90/**
86 * struct clockdomain - OMAP clockdomain 91 * struct clockdomain - OMAP clockdomain
87 * @name: clockdomain name 92 * @name: clockdomain name
@@ -89,6 +94,7 @@ struct clkdm_dep {
89 * @clktrctrl_reg: CLKSTCTRL reg for the given clock domain 94 * @clktrctrl_reg: CLKSTCTRL reg for the given clock domain
90 * @clktrctrl_mask: CLKTRCTRL/AUTOSTATE field mask in CM_CLKSTCTRL reg 95 * @clktrctrl_mask: CLKTRCTRL/AUTOSTATE field mask in CM_CLKSTCTRL reg
91 * @flags: Clockdomain capability flags 96 * @flags: Clockdomain capability flags
97 * @_flags: Flags for use only by internal clockdomain code
92 * @dep_bit: Bit shift of this clockdomain's PM_WKDEP/CM_SLEEPDEP bit 98 * @dep_bit: Bit shift of this clockdomain's PM_WKDEP/CM_SLEEPDEP bit
93 * @prcm_partition: (OMAP4 only) PRCM partition ID for this clkdm's registers 99 * @prcm_partition: (OMAP4 only) PRCM partition ID for this clkdm's registers
94 * @cm_inst: (OMAP4 only) CM instance register offset 100 * @cm_inst: (OMAP4 only) CM instance register offset
@@ -113,6 +119,7 @@ struct clockdomain {
113 } pwrdm; 119 } pwrdm;
114 const u16 clktrctrl_mask; 120 const u16 clktrctrl_mask;
115 const u8 flags; 121 const u8 flags;
122 u8 _flags;
116 const u8 dep_bit; 123 const u8 dep_bit;
117 const u8 prcm_partition; 124 const u8 prcm_partition;
118 const s16 cm_inst; 125 const s16 cm_inst;
@@ -122,6 +129,7 @@ struct clockdomain {
122 const struct omap_chip_id omap_chip; 129 const struct omap_chip_id omap_chip;
123 atomic_t usecount; 130 atomic_t usecount;
124 struct list_head node; 131 struct list_head node;
132 spinlock_t lock;
125}; 133};
126 134
127/** 135/**
@@ -177,12 +185,15 @@ int clkdm_clear_all_sleepdeps(struct clockdomain *clkdm);
177 185
178void clkdm_allow_idle(struct clockdomain *clkdm); 186void clkdm_allow_idle(struct clockdomain *clkdm);
179void clkdm_deny_idle(struct clockdomain *clkdm); 187void clkdm_deny_idle(struct clockdomain *clkdm);
188bool clkdm_in_hwsup(struct clockdomain *clkdm);
180 189
181int clkdm_wakeup(struct clockdomain *clkdm); 190int clkdm_wakeup(struct clockdomain *clkdm);
182int clkdm_sleep(struct clockdomain *clkdm); 191int clkdm_sleep(struct clockdomain *clkdm);
183 192
184int clkdm_clk_enable(struct clockdomain *clkdm, struct clk *clk); 193int clkdm_clk_enable(struct clockdomain *clkdm, struct clk *clk);
185int clkdm_clk_disable(struct clockdomain *clkdm, struct clk *clk); 194int clkdm_clk_disable(struct clockdomain *clkdm, struct clk *clk);
195int clkdm_hwmod_enable(struct clockdomain *clkdm, struct omap_hwmod *oh);
196int clkdm_hwmod_disable(struct clockdomain *clkdm, struct omap_hwmod *oh);
186 197
187extern void __init omap2xxx_clockdomains_init(void); 198extern void __init omap2xxx_clockdomains_init(void);
188extern void __init omap3xxx_clockdomains_init(void); 199extern void __init omap3xxx_clockdomains_init(void);
diff --git a/arch/arm/mach-omap2/clockdomain2xxx_3xxx.c b/arch/arm/mach-omap2/clockdomain2xxx_3xxx.c
index 48d0db7e606..f740edb111f 100644
--- a/arch/arm/mach-omap2/clockdomain2xxx_3xxx.c
+++ b/arch/arm/mach-omap2/clockdomain2xxx_3xxx.c
@@ -183,7 +183,8 @@ static int omap2_clkdm_clk_enable(struct clockdomain *clkdm)
183 _clkdm_add_autodeps(clkdm); 183 _clkdm_add_autodeps(clkdm);
184 _enable_hwsup(clkdm); 184 _enable_hwsup(clkdm);
185 } else { 185 } else {
186 clkdm_wakeup(clkdm); 186 if (clkdm->flags & CLKDM_CAN_FORCE_WAKEUP)
187 omap2_clkdm_wakeup(clkdm);
187 } 188 }
188 189
189 return 0; 190 return 0;
@@ -205,7 +206,8 @@ static int omap2_clkdm_clk_disable(struct clockdomain *clkdm)
205 _clkdm_del_autodeps(clkdm); 206 _clkdm_del_autodeps(clkdm);
206 _enable_hwsup(clkdm); 207 _enable_hwsup(clkdm);
207 } else { 208 } else {
208 clkdm_sleep(clkdm); 209 if (clkdm->flags & CLKDM_CAN_FORCE_SLEEP)
210 omap2_clkdm_sleep(clkdm);
209 } 211 }
210 212
211 return 0; 213 return 0;
diff --git a/arch/arm/mach-omap2/clockdomain44xx.c b/arch/arm/mach-omap2/clockdomain44xx.c
index a1a4ecd2654..b43706aa08b 100644
--- a/arch/arm/mach-omap2/clockdomain44xx.c
+++ b/arch/arm/mach-omap2/clockdomain44xx.c
@@ -95,13 +95,8 @@ static void omap4_clkdm_deny_idle(struct clockdomain *clkdm)
95 95
96static int omap4_clkdm_clk_enable(struct clockdomain *clkdm) 96static int omap4_clkdm_clk_enable(struct clockdomain *clkdm)
97{ 97{
98 bool hwsup = false; 98 if (clkdm->flags & CLKDM_CAN_FORCE_WAKEUP)
99 99 return omap4_clkdm_wakeup(clkdm);
100 hwsup = omap4_cminst_is_clkdm_in_hwsup(clkdm->prcm_partition,
101 clkdm->cm_inst, clkdm->clkdm_offs);
102
103 if (!hwsup)
104 clkdm_wakeup(clkdm);
105 100
106 return 0; 101 return 0;
107} 102}
@@ -113,8 +108,8 @@ static int omap4_clkdm_clk_disable(struct clockdomain *clkdm)
113 hwsup = omap4_cminst_is_clkdm_in_hwsup(clkdm->prcm_partition, 108 hwsup = omap4_cminst_is_clkdm_in_hwsup(clkdm->prcm_partition,
114 clkdm->cm_inst, clkdm->clkdm_offs); 109 clkdm->cm_inst, clkdm->clkdm_offs);
115 110
116 if (!hwsup) 111 if (!hwsup && (clkdm->flags & CLKDM_CAN_FORCE_SLEEP))
117 clkdm_sleep(clkdm); 112 omap4_clkdm_sleep(clkdm);
118 113
119 return 0; 114 return 0;
120} 115}
diff --git a/arch/arm/mach-omap2/clockdomains44xx_data.c b/arch/arm/mach-omap2/clockdomains44xx_data.c
index a607ec196e8..dccc651fa0d 100644
--- a/arch/arm/mach-omap2/clockdomains44xx_data.c
+++ b/arch/arm/mach-omap2/clockdomains44xx_data.c
@@ -1,11 +1,12 @@
1/* 1/*
2 * OMAP4 Clock domains framework 2 * OMAP4 Clock domains framework
3 * 3 *
4 * Copyright (C) 2009 Texas Instruments, Inc. 4 * Copyright (C) 2009-2011 Texas Instruments, Inc.
5 * Copyright (C) 2009 Nokia Corporation 5 * Copyright (C) 2009-2011 Nokia Corporation
6 * 6 *
7 * Abhijit Pagare (abhijitpagare@ti.com) 7 * Abhijit Pagare (abhijitpagare@ti.com)
8 * Benoit Cousson (b-cousson@ti.com) 8 * Benoit Cousson (b-cousson@ti.com)
9 * Paul Walmsley (paul@pwsan.com)
9 * 10 *
10 * This file is automatically generated from the OMAP hardware databases. 11 * This file is automatically generated from the OMAP hardware databases.
11 * We respectfully ask that any modifications to this file be coordinated 12 * We respectfully ask that any modifications to this file be coordinated
@@ -32,7 +33,7 @@
32 33
33/* Static Dependencies for OMAP4 Clock Domains */ 34/* Static Dependencies for OMAP4 Clock Domains */
34 35
35static struct clkdm_dep ducati_wkup_sleep_deps[] = { 36static struct clkdm_dep d2d_wkup_sleep_deps[] = {
36 { 37 {
37 .clkdm_name = "abe_clkdm", 38 .clkdm_name = "abe_clkdm",
38 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) 39 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
@@ -50,103 +51,103 @@ static struct clkdm_dep ducati_wkup_sleep_deps[] = {
50 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) 51 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
51 }, 52 },
52 { 53 {
53 .clkdm_name = "l3_dss_clkdm", 54 .clkdm_name = "l3_emif_clkdm",
54 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) 55 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
55 }, 56 },
56 { 57 {
57 .clkdm_name = "l3_emif_clkdm", 58 .clkdm_name = "l3_init_clkdm",
58 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) 59 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
59 }, 60 },
60 { 61 {
61 .clkdm_name = "l3_gfx_clkdm", 62 .clkdm_name = "l4_cfg_clkdm",
62 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) 63 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
63 }, 64 },
64 { 65 {
65 .clkdm_name = "l3_init_clkdm", 66 .clkdm_name = "l4_per_clkdm",
66 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) 67 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
67 }, 68 },
69 { NULL },
70};
71
72static struct clkdm_dep ducati_wkup_sleep_deps[] = {
68 { 73 {
69 .clkdm_name = "l4_cfg_clkdm", 74 .clkdm_name = "abe_clkdm",
70 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) 75 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
71 }, 76 },
72 { 77 {
73 .clkdm_name = "l4_per_clkdm", 78 .clkdm_name = "ivahd_clkdm",
74 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) 79 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
75 }, 80 },
76 { 81 {
77 .clkdm_name = "l4_secure_clkdm", 82 .clkdm_name = "l3_1_clkdm",
78 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) 83 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
79 }, 84 },
80 { 85 {
81 .clkdm_name = "l4_wkup_clkdm", 86 .clkdm_name = "l3_2_clkdm",
82 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) 87 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
83 }, 88 },
84 { 89 {
85 .clkdm_name = "tesla_clkdm", 90 .clkdm_name = "l3_dss_clkdm",
86 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) 91 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
87 }, 92 },
88 { NULL },
89};
90
91static struct clkdm_dep iss_wkup_sleep_deps[] = {
92 { 93 {
93 .clkdm_name = "ivahd_clkdm", 94 .clkdm_name = "l3_emif_clkdm",
94 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) 95 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
95 }, 96 },
96 { 97 {
97 .clkdm_name = "l3_1_clkdm", 98 .clkdm_name = "l3_gfx_clkdm",
98 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) 99 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
99 }, 100 },
100 { 101 {
101 .clkdm_name = "l3_emif_clkdm", 102 .clkdm_name = "l3_init_clkdm",
102 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) 103 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
103 }, 104 },
104 { NULL },
105};
106
107static struct clkdm_dep ivahd_wkup_sleep_deps[] = {
108 { 105 {
109 .clkdm_name = "l3_1_clkdm", 106 .clkdm_name = "l4_cfg_clkdm",
110 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) 107 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
111 }, 108 },
112 { 109 {
113 .clkdm_name = "l3_emif_clkdm", 110 .clkdm_name = "l4_per_clkdm",
114 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) 111 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
115 }, 112 },
116 { NULL },
117};
118
119static struct clkdm_dep l3_d2d_wkup_sleep_deps[] = {
120 { 113 {
121 .clkdm_name = "abe_clkdm", 114 .clkdm_name = "l4_secure_clkdm",
122 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) 115 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
123 }, 116 },
124 { 117 {
125 .clkdm_name = "ivahd_clkdm", 118 .clkdm_name = "l4_wkup_clkdm",
126 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) 119 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
127 }, 120 },
128 { 121 {
129 .clkdm_name = "l3_1_clkdm", 122 .clkdm_name = "tesla_clkdm",
130 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) 123 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
131 }, 124 },
125 { NULL },
126};
127
128static struct clkdm_dep iss_wkup_sleep_deps[] = {
132 { 129 {
133 .clkdm_name = "l3_2_clkdm", 130 .clkdm_name = "ivahd_clkdm",
134 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) 131 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
135 }, 132 },
136 { 133 {
137 .clkdm_name = "l3_emif_clkdm", 134 .clkdm_name = "l3_1_clkdm",
138 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) 135 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
139 }, 136 },
140 { 137 {
141 .clkdm_name = "l3_init_clkdm", 138 .clkdm_name = "l3_emif_clkdm",
142 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) 139 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
143 }, 140 },
141 { NULL },
142};
143
144static struct clkdm_dep ivahd_wkup_sleep_deps[] = {
144 { 145 {
145 .clkdm_name = "l4_cfg_clkdm", 146 .clkdm_name = "l3_1_clkdm",
146 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) 147 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
147 }, 148 },
148 { 149 {
149 .clkdm_name = "l4_per_clkdm", 150 .clkdm_name = "l3_emif_clkdm",
150 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) 151 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
151 }, 152 },
152 { NULL }, 153 { NULL },
@@ -280,7 +281,7 @@ static struct clkdm_dep l4_secure_wkup_sleep_deps[] = {
280 { NULL }, 281 { NULL },
281}; 282};
282 283
283static struct clkdm_dep mpuss_wkup_sleep_deps[] = { 284static struct clkdm_dep mpu_wkup_sleep_deps[] = {
284 { 285 {
285 .clkdm_name = "abe_clkdm", 286 .clkdm_name = "abe_clkdm",
286 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) 287 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
@@ -497,14 +498,14 @@ static struct clockdomain l3_init_44xx_clkdm = {
497 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), 498 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
498}; 499};
499 500
500static struct clockdomain mpuss_44xx_clkdm = { 501static struct clockdomain d2d_44xx_clkdm = {
501 .name = "mpuss_clkdm", 502 .name = "d2d_clkdm",
502 .pwrdm = { .name = "mpu_pwrdm" }, 503 .pwrdm = { .name = "core_pwrdm" },
503 .prcm_partition = OMAP4430_CM1_PARTITION, 504 .prcm_partition = OMAP4430_CM2_PARTITION,
504 .cm_inst = OMAP4430_CM1_MPU_INST, 505 .cm_inst = OMAP4430_CM2_CORE_INST,
505 .clkdm_offs = OMAP4430_CM1_MPU_MPU_CDOFFS, 506 .clkdm_offs = OMAP4430_CM2_CORE_D2D_CDOFFS,
506 .wkdep_srcs = mpuss_wkup_sleep_deps, 507 .wkdep_srcs = d2d_wkup_sleep_deps,
507 .sleepdep_srcs = mpuss_wkup_sleep_deps, 508 .sleepdep_srcs = d2d_wkup_sleep_deps,
508 .flags = CLKDM_CAN_FORCE_WAKEUP | CLKDM_CAN_HWSUP, 509 .flags = CLKDM_CAN_FORCE_WAKEUP | CLKDM_CAN_HWSUP,
509 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), 510 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
510}; 511};
@@ -563,6 +564,18 @@ static struct clockdomain ducati_44xx_clkdm = {
563 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), 564 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
564}; 565};
565 566
567static struct clockdomain mpu_44xx_clkdm = {
568 .name = "mpuss_clkdm",
569 .pwrdm = { .name = "mpu_pwrdm" },
570 .prcm_partition = OMAP4430_CM1_PARTITION,
571 .cm_inst = OMAP4430_CM1_MPU_INST,
572 .clkdm_offs = OMAP4430_CM1_MPU_MPU_CDOFFS,
573 .wkdep_srcs = mpu_wkup_sleep_deps,
574 .sleepdep_srcs = mpu_wkup_sleep_deps,
575 .flags = CLKDM_CAN_FORCE_WAKEUP | CLKDM_CAN_HWSUP,
576 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
577};
578
566static struct clockdomain l3_2_44xx_clkdm = { 579static struct clockdomain l3_2_44xx_clkdm = {
567 .name = "l3_2_clkdm", 580 .name = "l3_2_clkdm",
568 .pwrdm = { .name = "core_pwrdm" }, 581 .pwrdm = { .name = "core_pwrdm" },
@@ -585,18 +598,6 @@ static struct clockdomain l3_1_44xx_clkdm = {
585 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), 598 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
586}; 599};
587 600
588static struct clockdomain l3_d2d_44xx_clkdm = {
589 .name = "l3_d2d_clkdm",
590 .pwrdm = { .name = "core_pwrdm" },
591 .prcm_partition = OMAP4430_CM2_PARTITION,
592 .cm_inst = OMAP4430_CM2_CORE_INST,
593 .clkdm_offs = OMAP4430_CM2_CORE_D2D_CDOFFS,
594 .wkdep_srcs = l3_d2d_wkup_sleep_deps,
595 .sleepdep_srcs = l3_d2d_wkup_sleep_deps,
596 .flags = CLKDM_CAN_FORCE_WAKEUP | CLKDM_CAN_HWSUP,
597 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
598};
599
600static struct clockdomain iss_44xx_clkdm = { 601static struct clockdomain iss_44xx_clkdm = {
601 .name = "iss_clkdm", 602 .name = "iss_clkdm",
602 .pwrdm = { .name = "cam_pwrdm" }, 603 .pwrdm = { .name = "cam_pwrdm" },
@@ -655,6 +656,7 @@ static struct clockdomain l3_dma_44xx_clkdm = {
655 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), 656 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
656}; 657};
657 658
659/* As clockdomains are added or removed above, this list must also be changed */
658static struct clockdomain *clockdomains_omap44xx[] __initdata = { 660static struct clockdomain *clockdomains_omap44xx[] __initdata = {
659 &l4_cefuse_44xx_clkdm, 661 &l4_cefuse_44xx_clkdm,
660 &l4_cfg_44xx_clkdm, 662 &l4_cfg_44xx_clkdm,
@@ -666,21 +668,21 @@ static struct clockdomain *clockdomains_omap44xx[] __initdata = {
666 &abe_44xx_clkdm, 668 &abe_44xx_clkdm,
667 &l3_instr_44xx_clkdm, 669 &l3_instr_44xx_clkdm,
668 &l3_init_44xx_clkdm, 670 &l3_init_44xx_clkdm,
669 &mpuss_44xx_clkdm, 671 &d2d_44xx_clkdm,
670 &mpu0_44xx_clkdm, 672 &mpu0_44xx_clkdm,
671 &mpu1_44xx_clkdm, 673 &mpu1_44xx_clkdm,
672 &l3_emif_44xx_clkdm, 674 &l3_emif_44xx_clkdm,
673 &l4_ao_44xx_clkdm, 675 &l4_ao_44xx_clkdm,
674 &ducati_44xx_clkdm, 676 &ducati_44xx_clkdm,
677 &mpu_44xx_clkdm,
675 &l3_2_44xx_clkdm, 678 &l3_2_44xx_clkdm,
676 &l3_1_44xx_clkdm, 679 &l3_1_44xx_clkdm,
677 &l3_d2d_44xx_clkdm,
678 &iss_44xx_clkdm, 680 &iss_44xx_clkdm,
679 &l3_dss_44xx_clkdm, 681 &l3_dss_44xx_clkdm,
680 &l4_wkup_44xx_clkdm, 682 &l4_wkup_44xx_clkdm,
681 &emu_sys_44xx_clkdm, 683 &emu_sys_44xx_clkdm,
682 &l3_dma_44xx_clkdm, 684 &l3_dma_44xx_clkdm,
683 NULL, 685 NULL
684}; 686};
685 687
686void __init omap44xx_clockdomains_init(void) 688void __init omap44xx_clockdomains_init(void)
diff --git a/arch/arm/mach-omap2/cm-regbits-44xx.h b/arch/arm/mach-omap2/cm-regbits-44xx.h
index 9d47a05b17b..65597a74563 100644
--- a/arch/arm/mach-omap2/cm-regbits-44xx.h
+++ b/arch/arm/mach-omap2/cm-regbits-44xx.h
@@ -22,22 +22,18 @@
22#ifndef __ARCH_ARM_MACH_OMAP2_CM_REGBITS_44XX_H 22#ifndef __ARCH_ARM_MACH_OMAP2_CM_REGBITS_44XX_H
23#define __ARCH_ARM_MACH_OMAP2_CM_REGBITS_44XX_H 23#define __ARCH_ARM_MACH_OMAP2_CM_REGBITS_44XX_H
24 24
25/* 25/* Used by CM_L3_1_DYNAMICDEP, CM_MPU_DYNAMICDEP, CM_TESLA_DYNAMICDEP */
26 * Used by CM_L3_1_DYNAMICDEP, CM_L3_1_DYNAMICDEP_RESTORE, CM_MPU_DYNAMICDEP,
27 * CM_TESLA_DYNAMICDEP
28 */
29#define OMAP4430_ABE_DYNDEP_SHIFT 3 26#define OMAP4430_ABE_DYNDEP_SHIFT 3
30#define OMAP4430_ABE_DYNDEP_MASK (1 << 3) 27#define OMAP4430_ABE_DYNDEP_MASK (1 << 3)
31 28
32/* 29/*
33 * Used by CM_D2D_STATICDEP, CM_D2D_STATICDEP_RESTORE, CM_DUCATI_STATICDEP, 30 * Used by CM_D2D_STATICDEP, CM_DUCATI_STATICDEP, CM_L3INIT_STATICDEP,
34 * CM_L3INIT_STATICDEP, CM_MPU_STATICDEP, CM_SDMA_STATICDEP, 31 * CM_MPU_STATICDEP, CM_SDMA_STATICDEP, CM_TESLA_STATICDEP
35 * CM_SDMA_STATICDEP_RESTORE, CM_TESLA_STATICDEP
36 */ 32 */
37#define OMAP4430_ABE_STATDEP_SHIFT 3 33#define OMAP4430_ABE_STATDEP_SHIFT 3
38#define OMAP4430_ABE_STATDEP_MASK (1 << 3) 34#define OMAP4430_ABE_STATDEP_MASK (1 << 3)
39 35
40/* Used by CM_L4CFG_DYNAMICDEP, CM_L4CFG_DYNAMICDEP_RESTORE */ 36/* Used by CM_L4CFG_DYNAMICDEP */
41#define OMAP4430_ALWONCORE_DYNDEP_SHIFT 16 37#define OMAP4430_ALWONCORE_DYNDEP_SHIFT 16
42#define OMAP4430_ALWONCORE_DYNDEP_MASK (1 << 16) 38#define OMAP4430_ALWONCORE_DYNDEP_MASK (1 << 16)
43 39
@@ -47,14 +43,13 @@
47 43
48/* 44/*
49 * Used by CM_AUTOIDLE_DPLL_ABE, CM_AUTOIDLE_DPLL_CORE, 45 * Used by CM_AUTOIDLE_DPLL_ABE, CM_AUTOIDLE_DPLL_CORE,
50 * CM_AUTOIDLE_DPLL_CORE_RESTORE, CM_AUTOIDLE_DPLL_DDRPHY, 46 * CM_AUTOIDLE_DPLL_DDRPHY, CM_AUTOIDLE_DPLL_IVA, CM_AUTOIDLE_DPLL_MPU,
51 * CM_AUTOIDLE_DPLL_IVA, CM_AUTOIDLE_DPLL_MPU, CM_AUTOIDLE_DPLL_PER, 47 * CM_AUTOIDLE_DPLL_PER, CM_AUTOIDLE_DPLL_UNIPRO, CM_AUTOIDLE_DPLL_USB
52 * CM_AUTOIDLE_DPLL_UNIPRO, CM_AUTOIDLE_DPLL_USB
53 */ 48 */
54#define OMAP4430_AUTO_DPLL_MODE_SHIFT 0 49#define OMAP4430_AUTO_DPLL_MODE_SHIFT 0
55#define OMAP4430_AUTO_DPLL_MODE_MASK (0x7 << 0) 50#define OMAP4430_AUTO_DPLL_MODE_MASK (0x7 << 0)
56 51
57/* Used by CM_L4CFG_DYNAMICDEP, CM_L4CFG_DYNAMICDEP_RESTORE */ 52/* Used by CM_L4CFG_DYNAMICDEP */
58#define OMAP4430_CEFUSE_DYNDEP_SHIFT 17 53#define OMAP4430_CEFUSE_DYNDEP_SHIFT 17
59#define OMAP4430_CEFUSE_DYNDEP_MASK (1 << 17) 54#define OMAP4430_CEFUSE_DYNDEP_MASK (1 << 17)
60 55
@@ -82,15 +77,15 @@
82#define OMAP4430_CLKACTIVITY_ABE_X2_CLK_SHIFT 8 77#define OMAP4430_CLKACTIVITY_ABE_X2_CLK_SHIFT 8
83#define OMAP4430_CLKACTIVITY_ABE_X2_CLK_MASK (1 << 8) 78#define OMAP4430_CLKACTIVITY_ABE_X2_CLK_MASK (1 << 8)
84 79
85/* Used by CM_MEMIF_CLKSTCTRL, CM_MEMIF_CLKSTCTRL_RESTORE */ 80/* Used by CM_MEMIF_CLKSTCTRL */
86#define OMAP4430_CLKACTIVITY_ASYNC_DLL_CLK_SHIFT 11 81#define OMAP4430_CLKACTIVITY_ASYNC_DLL_CLK_SHIFT 11
87#define OMAP4430_CLKACTIVITY_ASYNC_DLL_CLK_MASK (1 << 11) 82#define OMAP4430_CLKACTIVITY_ASYNC_DLL_CLK_MASK (1 << 11)
88 83
89/* Used by CM_MEMIF_CLKSTCTRL, CM_MEMIF_CLKSTCTRL_RESTORE */ 84/* Used by CM_MEMIF_CLKSTCTRL */
90#define OMAP4430_CLKACTIVITY_ASYNC_PHY1_CLK_SHIFT 12 85#define OMAP4430_CLKACTIVITY_ASYNC_PHY1_CLK_SHIFT 12
91#define OMAP4430_CLKACTIVITY_ASYNC_PHY1_CLK_MASK (1 << 12) 86#define OMAP4430_CLKACTIVITY_ASYNC_PHY1_CLK_MASK (1 << 12)
92 87
93/* Used by CM_MEMIF_CLKSTCTRL, CM_MEMIF_CLKSTCTRL_RESTORE */ 88/* Used by CM_MEMIF_CLKSTCTRL */
94#define OMAP4430_CLKACTIVITY_ASYNC_PHY2_CLK_SHIFT 13 89#define OMAP4430_CLKACTIVITY_ASYNC_PHY2_CLK_SHIFT 13
95#define OMAP4430_CLKACTIVITY_ASYNC_PHY2_CLK_MASK (1 << 13) 90#define OMAP4430_CLKACTIVITY_ASYNC_PHY2_CLK_MASK (1 << 13)
96 91
@@ -106,35 +101,39 @@
106#define OMAP4430_CLKACTIVITY_CORE_DPLL_EMU_CLK_SHIFT 9 101#define OMAP4430_CLKACTIVITY_CORE_DPLL_EMU_CLK_SHIFT 9
107#define OMAP4430_CLKACTIVITY_CORE_DPLL_EMU_CLK_MASK (1 << 9) 102#define OMAP4430_CLKACTIVITY_CORE_DPLL_EMU_CLK_MASK (1 << 9)
108 103
104/* Used by CM_L4CFG_CLKSTCTRL */
105#define OMAP4460_CLKACTIVITY_CORE_TS_GFCLK_SHIFT 9
106#define OMAP4460_CLKACTIVITY_CORE_TS_GFCLK_MASK (1 << 9)
107
109/* Used by CM_CEFUSE_CLKSTCTRL */ 108/* Used by CM_CEFUSE_CLKSTCTRL */
110#define OMAP4430_CLKACTIVITY_CUST_EFUSE_SYS_CLK_SHIFT 9 109#define OMAP4430_CLKACTIVITY_CUST_EFUSE_SYS_CLK_SHIFT 9
111#define OMAP4430_CLKACTIVITY_CUST_EFUSE_SYS_CLK_MASK (1 << 9) 110#define OMAP4430_CLKACTIVITY_CUST_EFUSE_SYS_CLK_MASK (1 << 9)
112 111
113/* Used by CM_MEMIF_CLKSTCTRL, CM_MEMIF_CLKSTCTRL_RESTORE */ 112/* Used by CM_MEMIF_CLKSTCTRL */
114#define OMAP4430_CLKACTIVITY_DLL_CLK_SHIFT 9 113#define OMAP4430_CLKACTIVITY_DLL_CLK_SHIFT 9
115#define OMAP4430_CLKACTIVITY_DLL_CLK_MASK (1 << 9) 114#define OMAP4430_CLKACTIVITY_DLL_CLK_MASK (1 << 9)
116 115
117/* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */ 116/* Used by CM_L4PER_CLKSTCTRL */
118#define OMAP4430_CLKACTIVITY_DMT10_GFCLK_SHIFT 9 117#define OMAP4430_CLKACTIVITY_DMT10_GFCLK_SHIFT 9
119#define OMAP4430_CLKACTIVITY_DMT10_GFCLK_MASK (1 << 9) 118#define OMAP4430_CLKACTIVITY_DMT10_GFCLK_MASK (1 << 9)
120 119
121/* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */ 120/* Used by CM_L4PER_CLKSTCTRL */
122#define OMAP4430_CLKACTIVITY_DMT11_GFCLK_SHIFT 10 121#define OMAP4430_CLKACTIVITY_DMT11_GFCLK_SHIFT 10
123#define OMAP4430_CLKACTIVITY_DMT11_GFCLK_MASK (1 << 10) 122#define OMAP4430_CLKACTIVITY_DMT11_GFCLK_MASK (1 << 10)
124 123
125/* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */ 124/* Used by CM_L4PER_CLKSTCTRL */
126#define OMAP4430_CLKACTIVITY_DMT2_GFCLK_SHIFT 11 125#define OMAP4430_CLKACTIVITY_DMT2_GFCLK_SHIFT 11
127#define OMAP4430_CLKACTIVITY_DMT2_GFCLK_MASK (1 << 11) 126#define OMAP4430_CLKACTIVITY_DMT2_GFCLK_MASK (1 << 11)
128 127
129/* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */ 128/* Used by CM_L4PER_CLKSTCTRL */
130#define OMAP4430_CLKACTIVITY_DMT3_GFCLK_SHIFT 12 129#define OMAP4430_CLKACTIVITY_DMT3_GFCLK_SHIFT 12
131#define OMAP4430_CLKACTIVITY_DMT3_GFCLK_MASK (1 << 12) 130#define OMAP4430_CLKACTIVITY_DMT3_GFCLK_MASK (1 << 12)
132 131
133/* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */ 132/* Used by CM_L4PER_CLKSTCTRL */
134#define OMAP4430_CLKACTIVITY_DMT4_GFCLK_SHIFT 13 133#define OMAP4430_CLKACTIVITY_DMT4_GFCLK_SHIFT 13
135#define OMAP4430_CLKACTIVITY_DMT4_GFCLK_MASK (1 << 13) 134#define OMAP4430_CLKACTIVITY_DMT4_GFCLK_MASK (1 << 13)
136 135
137/* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */ 136/* Used by CM_L4PER_CLKSTCTRL */
138#define OMAP4430_CLKACTIVITY_DMT9_GFCLK_SHIFT 14 137#define OMAP4430_CLKACTIVITY_DMT9_GFCLK_SHIFT 14
139#define OMAP4430_CLKACTIVITY_DMT9_GFCLK_MASK (1 << 14) 138#define OMAP4430_CLKACTIVITY_DMT9_GFCLK_MASK (1 << 14)
140 139
@@ -158,7 +157,7 @@
158#define OMAP4430_CLKACTIVITY_FDIF_GFCLK_SHIFT 10 157#define OMAP4430_CLKACTIVITY_FDIF_GFCLK_SHIFT 10
159#define OMAP4430_CLKACTIVITY_FDIF_GFCLK_MASK (1 << 10) 158#define OMAP4430_CLKACTIVITY_FDIF_GFCLK_MASK (1 << 10)
160 159
161/* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */ 160/* Used by CM_L4PER_CLKSTCTRL */
162#define OMAP4430_CLKACTIVITY_FUNC_12M_GFCLK_SHIFT 15 161#define OMAP4430_CLKACTIVITY_FUNC_12M_GFCLK_SHIFT 15
163#define OMAP4430_CLKACTIVITY_FUNC_12M_GFCLK_MASK (1 << 15) 162#define OMAP4430_CLKACTIVITY_FUNC_12M_GFCLK_MASK (1 << 15)
164 163
@@ -170,55 +169,55 @@
170#define OMAP4430_CLKACTIVITY_HDMI_PHY_48MHZ_GFCLK_SHIFT 11 169#define OMAP4430_CLKACTIVITY_HDMI_PHY_48MHZ_GFCLK_SHIFT 11
171#define OMAP4430_CLKACTIVITY_HDMI_PHY_48MHZ_GFCLK_MASK (1 << 11) 170#define OMAP4430_CLKACTIVITY_HDMI_PHY_48MHZ_GFCLK_MASK (1 << 11)
172 171
173/* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ 172/* Used by CM_L3INIT_CLKSTCTRL */
174#define OMAP4430_CLKACTIVITY_HSIC_P1_480M_GFCLK_SHIFT 20 173#define OMAP4430_CLKACTIVITY_HSIC_P1_480M_GFCLK_SHIFT 20
175#define OMAP4430_CLKACTIVITY_HSIC_P1_480M_GFCLK_MASK (1 << 20) 174#define OMAP4430_CLKACTIVITY_HSIC_P1_480M_GFCLK_MASK (1 << 20)
176 175
177/* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ 176/* Used by CM_L3INIT_CLKSTCTRL */
178#define OMAP4430_CLKACTIVITY_HSIC_P1_GFCLK_SHIFT 26 177#define OMAP4430_CLKACTIVITY_HSIC_P1_GFCLK_SHIFT 26
179#define OMAP4430_CLKACTIVITY_HSIC_P1_GFCLK_MASK (1 << 26) 178#define OMAP4430_CLKACTIVITY_HSIC_P1_GFCLK_MASK (1 << 26)
180 179
181/* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ 180/* Used by CM_L3INIT_CLKSTCTRL */
182#define OMAP4430_CLKACTIVITY_HSIC_P2_480M_GFCLK_SHIFT 21 181#define OMAP4430_CLKACTIVITY_HSIC_P2_480M_GFCLK_SHIFT 21
183#define OMAP4430_CLKACTIVITY_HSIC_P2_480M_GFCLK_MASK (1 << 21) 182#define OMAP4430_CLKACTIVITY_HSIC_P2_480M_GFCLK_MASK (1 << 21)
184 183
185/* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ 184/* Used by CM_L3INIT_CLKSTCTRL */
186#define OMAP4430_CLKACTIVITY_HSIC_P2_GFCLK_SHIFT 27 185#define OMAP4430_CLKACTIVITY_HSIC_P2_GFCLK_SHIFT 27
187#define OMAP4430_CLKACTIVITY_HSIC_P2_GFCLK_MASK (1 << 27) 186#define OMAP4430_CLKACTIVITY_HSIC_P2_GFCLK_MASK (1 << 27)
188 187
189/* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ 188/* Used by CM_L3INIT_CLKSTCTRL */
190#define OMAP4430_CLKACTIVITY_INIT_48MC_GFCLK_SHIFT 13 189#define OMAP4430_CLKACTIVITY_INIT_48MC_GFCLK_SHIFT 13
191#define OMAP4430_CLKACTIVITY_INIT_48MC_GFCLK_MASK (1 << 13) 190#define OMAP4430_CLKACTIVITY_INIT_48MC_GFCLK_MASK (1 << 13)
192 191
193/* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ 192/* Used by CM_L3INIT_CLKSTCTRL */
194#define OMAP4430_CLKACTIVITY_INIT_48M_GFCLK_SHIFT 12 193#define OMAP4430_CLKACTIVITY_INIT_48M_GFCLK_SHIFT 12
195#define OMAP4430_CLKACTIVITY_INIT_48M_GFCLK_MASK (1 << 12) 194#define OMAP4430_CLKACTIVITY_INIT_48M_GFCLK_MASK (1 << 12)
196 195
197/* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ 196/* Used by CM_L3INIT_CLKSTCTRL */
198#define OMAP4430_CLKACTIVITY_INIT_60M_P1_GFCLK_SHIFT 28 197#define OMAP4430_CLKACTIVITY_INIT_60M_P1_GFCLK_SHIFT 28
199#define OMAP4430_CLKACTIVITY_INIT_60M_P1_GFCLK_MASK (1 << 28) 198#define OMAP4430_CLKACTIVITY_INIT_60M_P1_GFCLK_MASK (1 << 28)
200 199
201/* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ 200/* Used by CM_L3INIT_CLKSTCTRL */
202#define OMAP4430_CLKACTIVITY_INIT_60M_P2_GFCLK_SHIFT 29 201#define OMAP4430_CLKACTIVITY_INIT_60M_P2_GFCLK_SHIFT 29
203#define OMAP4430_CLKACTIVITY_INIT_60M_P2_GFCLK_MASK (1 << 29) 202#define OMAP4430_CLKACTIVITY_INIT_60M_P2_GFCLK_MASK (1 << 29)
204 203
205/* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ 204/* Used by CM_L3INIT_CLKSTCTRL */
206#define OMAP4430_CLKACTIVITY_INIT_96M_GFCLK_SHIFT 11 205#define OMAP4430_CLKACTIVITY_INIT_96M_GFCLK_SHIFT 11
207#define OMAP4430_CLKACTIVITY_INIT_96M_GFCLK_MASK (1 << 11) 206#define OMAP4430_CLKACTIVITY_INIT_96M_GFCLK_MASK (1 << 11)
208 207
209/* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ 208/* Used by CM_L3INIT_CLKSTCTRL */
210#define OMAP4430_CLKACTIVITY_INIT_HSI_GFCLK_SHIFT 16 209#define OMAP4430_CLKACTIVITY_INIT_HSI_GFCLK_SHIFT 16
211#define OMAP4430_CLKACTIVITY_INIT_HSI_GFCLK_MASK (1 << 16) 210#define OMAP4430_CLKACTIVITY_INIT_HSI_GFCLK_MASK (1 << 16)
212 211
213/* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ 212/* Used by CM_L3INIT_CLKSTCTRL */
214#define OMAP4430_CLKACTIVITY_INIT_HSMMC1_GFCLK_SHIFT 17 213#define OMAP4430_CLKACTIVITY_INIT_HSMMC1_GFCLK_SHIFT 17
215#define OMAP4430_CLKACTIVITY_INIT_HSMMC1_GFCLK_MASK (1 << 17) 214#define OMAP4430_CLKACTIVITY_INIT_HSMMC1_GFCLK_MASK (1 << 17)
216 215
217/* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ 216/* Used by CM_L3INIT_CLKSTCTRL */
218#define OMAP4430_CLKACTIVITY_INIT_HSMMC2_GFCLK_SHIFT 18 217#define OMAP4430_CLKACTIVITY_INIT_HSMMC2_GFCLK_SHIFT 18
219#define OMAP4430_CLKACTIVITY_INIT_HSMMC2_GFCLK_MASK (1 << 18) 218#define OMAP4430_CLKACTIVITY_INIT_HSMMC2_GFCLK_MASK (1 << 18)
220 219
221/* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ 220/* Used by CM_L3INIT_CLKSTCTRL */
222#define OMAP4430_CLKACTIVITY_INIT_HSMMC6_GFCLK_SHIFT 19 221#define OMAP4430_CLKACTIVITY_INIT_HSMMC6_GFCLK_SHIFT 19
223#define OMAP4430_CLKACTIVITY_INIT_HSMMC6_GFCLK_MASK (1 << 19) 222#define OMAP4430_CLKACTIVITY_INIT_HSMMC6_GFCLK_MASK (1 << 19)
224 223
@@ -234,11 +233,11 @@
234#define OMAP4430_CLKACTIVITY_L3X2_D2D_GICLK_SHIFT 10 233#define OMAP4430_CLKACTIVITY_L3X2_D2D_GICLK_SHIFT 10
235#define OMAP4430_CLKACTIVITY_L3X2_D2D_GICLK_MASK (1 << 10) 234#define OMAP4430_CLKACTIVITY_L3X2_D2D_GICLK_MASK (1 << 10)
236 235
237/* Used by CM_L3_1_CLKSTCTRL, CM_L3_1_CLKSTCTRL_RESTORE */ 236/* Used by CM_L3_1_CLKSTCTRL */
238#define OMAP4430_CLKACTIVITY_L3_1_GICLK_SHIFT 8 237#define OMAP4430_CLKACTIVITY_L3_1_GICLK_SHIFT 8
239#define OMAP4430_CLKACTIVITY_L3_1_GICLK_MASK (1 << 8) 238#define OMAP4430_CLKACTIVITY_L3_1_GICLK_MASK (1 << 8)
240 239
241/* Used by CM_L3_2_CLKSTCTRL, CM_L3_2_CLKSTCTRL_RESTORE */ 240/* Used by CM_L3_2_CLKSTCTRL */
242#define OMAP4430_CLKACTIVITY_L3_2_GICLK_SHIFT 8 241#define OMAP4430_CLKACTIVITY_L3_2_GICLK_SHIFT 8
243#define OMAP4430_CLKACTIVITY_L3_2_GICLK_MASK (1 << 8) 242#define OMAP4430_CLKACTIVITY_L3_2_GICLK_MASK (1 << 8)
244 243
@@ -254,7 +253,7 @@
254#define OMAP4430_CLKACTIVITY_L3_DSS_GICLK_SHIFT 8 253#define OMAP4430_CLKACTIVITY_L3_DSS_GICLK_SHIFT 8
255#define OMAP4430_CLKACTIVITY_L3_DSS_GICLK_MASK (1 << 8) 254#define OMAP4430_CLKACTIVITY_L3_DSS_GICLK_MASK (1 << 8)
256 255
257/* Used by CM_MEMIF_CLKSTCTRL, CM_MEMIF_CLKSTCTRL_RESTORE */ 256/* Used by CM_MEMIF_CLKSTCTRL */
258#define OMAP4430_CLKACTIVITY_L3_EMIF_GICLK_SHIFT 8 257#define OMAP4430_CLKACTIVITY_L3_EMIF_GICLK_SHIFT 8
259#define OMAP4430_CLKACTIVITY_L3_EMIF_GICLK_MASK (1 << 8) 258#define OMAP4430_CLKACTIVITY_L3_EMIF_GICLK_MASK (1 << 8)
260 259
@@ -262,7 +261,7 @@
262#define OMAP4430_CLKACTIVITY_L3_GFX_GICLK_SHIFT 8 261#define OMAP4430_CLKACTIVITY_L3_GFX_GICLK_SHIFT 8
263#define OMAP4430_CLKACTIVITY_L3_GFX_GICLK_MASK (1 << 8) 262#define OMAP4430_CLKACTIVITY_L3_GFX_GICLK_MASK (1 << 8)
264 263
265/* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ 264/* Used by CM_L3INIT_CLKSTCTRL */
266#define OMAP4430_CLKACTIVITY_L3_INIT_GICLK_SHIFT 8 265#define OMAP4430_CLKACTIVITY_L3_INIT_GICLK_SHIFT 8
267#define OMAP4430_CLKACTIVITY_L3_INIT_GICLK_MASK (1 << 8) 266#define OMAP4430_CLKACTIVITY_L3_INIT_GICLK_MASK (1 << 8)
268 267
@@ -282,7 +281,7 @@
282#define OMAP4430_CLKACTIVITY_L4_CEFUSE_GICLK_SHIFT 8 281#define OMAP4430_CLKACTIVITY_L4_CEFUSE_GICLK_SHIFT 8
283#define OMAP4430_CLKACTIVITY_L4_CEFUSE_GICLK_MASK (1 << 8) 282#define OMAP4430_CLKACTIVITY_L4_CEFUSE_GICLK_MASK (1 << 8)
284 283
285/* Used by CM_L4CFG_CLKSTCTRL, CM_L4CFG_CLKSTCTRL_RESTORE */ 284/* Used by CM_L4CFG_CLKSTCTRL */
286#define OMAP4430_CLKACTIVITY_L4_CFG_GICLK_SHIFT 8 285#define OMAP4430_CLKACTIVITY_L4_CFG_GICLK_SHIFT 8
287#define OMAP4430_CLKACTIVITY_L4_CFG_GICLK_MASK (1 << 8) 286#define OMAP4430_CLKACTIVITY_L4_CFG_GICLK_MASK (1 << 8)
288 287
@@ -290,11 +289,11 @@
290#define OMAP4430_CLKACTIVITY_L4_D2D_GICLK_SHIFT 9 289#define OMAP4430_CLKACTIVITY_L4_D2D_GICLK_SHIFT 9
291#define OMAP4430_CLKACTIVITY_L4_D2D_GICLK_MASK (1 << 9) 290#define OMAP4430_CLKACTIVITY_L4_D2D_GICLK_MASK (1 << 9)
292 291
293/* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ 292/* Used by CM_L3INIT_CLKSTCTRL */
294#define OMAP4430_CLKACTIVITY_L4_INIT_GICLK_SHIFT 9 293#define OMAP4430_CLKACTIVITY_L4_INIT_GICLK_SHIFT 9
295#define OMAP4430_CLKACTIVITY_L4_INIT_GICLK_MASK (1 << 9) 294#define OMAP4430_CLKACTIVITY_L4_INIT_GICLK_MASK (1 << 9)
296 295
297/* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */ 296/* Used by CM_L4PER_CLKSTCTRL */
298#define OMAP4430_CLKACTIVITY_L4_PER_GICLK_SHIFT 8 297#define OMAP4430_CLKACTIVITY_L4_PER_GICLK_SHIFT 8
299#define OMAP4430_CLKACTIVITY_L4_PER_GICLK_MASK (1 << 8) 298#define OMAP4430_CLKACTIVITY_L4_PER_GICLK_MASK (1 << 8)
300 299
@@ -306,7 +305,7 @@
306#define OMAP4430_CLKACTIVITY_L4_WKUP_GICLK_SHIFT 12 305#define OMAP4430_CLKACTIVITY_L4_WKUP_GICLK_SHIFT 12
307#define OMAP4430_CLKACTIVITY_L4_WKUP_GICLK_MASK (1 << 12) 306#define OMAP4430_CLKACTIVITY_L4_WKUP_GICLK_MASK (1 << 12)
308 307
309/* Used by CM_MPU_CLKSTCTRL, CM_MPU_CLKSTCTRL_RESTORE */ 308/* Used by CM_MPU_CLKSTCTRL */
310#define OMAP4430_CLKACTIVITY_MPU_DPLL_CLK_SHIFT 8 309#define OMAP4430_CLKACTIVITY_MPU_DPLL_CLK_SHIFT 8
311#define OMAP4430_CLKACTIVITY_MPU_DPLL_CLK_MASK (1 << 8) 310#define OMAP4430_CLKACTIVITY_MPU_DPLL_CLK_MASK (1 << 8)
312 311
@@ -314,43 +313,43 @@
314#define OMAP4430_CLKACTIVITY_OCP_ABE_GICLK_SHIFT 9 313#define OMAP4430_CLKACTIVITY_OCP_ABE_GICLK_SHIFT 9
315#define OMAP4430_CLKACTIVITY_OCP_ABE_GICLK_MASK (1 << 9) 314#define OMAP4430_CLKACTIVITY_OCP_ABE_GICLK_MASK (1 << 9)
316 315
317/* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */ 316/* Used by CM_L4PER_CLKSTCTRL */
318#define OMAP4430_CLKACTIVITY_PER_24MC_GFCLK_SHIFT 16 317#define OMAP4430_CLKACTIVITY_PER_24MC_GFCLK_SHIFT 16
319#define OMAP4430_CLKACTIVITY_PER_24MC_GFCLK_MASK (1 << 16) 318#define OMAP4430_CLKACTIVITY_PER_24MC_GFCLK_MASK (1 << 16)
320 319
321/* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */ 320/* Used by CM_L4PER_CLKSTCTRL */
322#define OMAP4430_CLKACTIVITY_PER_32K_GFCLK_SHIFT 17 321#define OMAP4430_CLKACTIVITY_PER_32K_GFCLK_SHIFT 17
323#define OMAP4430_CLKACTIVITY_PER_32K_GFCLK_MASK (1 << 17) 322#define OMAP4430_CLKACTIVITY_PER_32K_GFCLK_MASK (1 << 17)
324 323
325/* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */ 324/* Used by CM_L4PER_CLKSTCTRL */
326#define OMAP4430_CLKACTIVITY_PER_48M_GFCLK_SHIFT 18 325#define OMAP4430_CLKACTIVITY_PER_48M_GFCLK_SHIFT 18
327#define OMAP4430_CLKACTIVITY_PER_48M_GFCLK_MASK (1 << 18) 326#define OMAP4430_CLKACTIVITY_PER_48M_GFCLK_MASK (1 << 18)
328 327
329/* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */ 328/* Used by CM_L4PER_CLKSTCTRL */
330#define OMAP4430_CLKACTIVITY_PER_96M_GFCLK_SHIFT 19 329#define OMAP4430_CLKACTIVITY_PER_96M_GFCLK_SHIFT 19
331#define OMAP4430_CLKACTIVITY_PER_96M_GFCLK_MASK (1 << 19) 330#define OMAP4430_CLKACTIVITY_PER_96M_GFCLK_MASK (1 << 19)
332 331
333/* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */ 332/* Used by CM_L4PER_CLKSTCTRL */
334#define OMAP4430_CLKACTIVITY_PER_ABE_24M_GFCLK_SHIFT 25 333#define OMAP4430_CLKACTIVITY_PER_ABE_24M_GFCLK_SHIFT 25
335#define OMAP4430_CLKACTIVITY_PER_ABE_24M_GFCLK_MASK (1 << 25) 334#define OMAP4430_CLKACTIVITY_PER_ABE_24M_GFCLK_MASK (1 << 25)
336 335
337/* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */ 336/* Used by CM_L4PER_CLKSTCTRL */
338#define OMAP4430_CLKACTIVITY_PER_MCASP2_GFCLK_SHIFT 20 337#define OMAP4430_CLKACTIVITY_PER_MCASP2_GFCLK_SHIFT 20
339#define OMAP4430_CLKACTIVITY_PER_MCASP2_GFCLK_MASK (1 << 20) 338#define OMAP4430_CLKACTIVITY_PER_MCASP2_GFCLK_MASK (1 << 20)
340 339
341/* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */ 340/* Used by CM_L4PER_CLKSTCTRL */
342#define OMAP4430_CLKACTIVITY_PER_MCASP3_GFCLK_SHIFT 21 341#define OMAP4430_CLKACTIVITY_PER_MCASP3_GFCLK_SHIFT 21
343#define OMAP4430_CLKACTIVITY_PER_MCASP3_GFCLK_MASK (1 << 21) 342#define OMAP4430_CLKACTIVITY_PER_MCASP3_GFCLK_MASK (1 << 21)
344 343
345/* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */ 344/* Used by CM_L4PER_CLKSTCTRL */
346#define OMAP4430_CLKACTIVITY_PER_MCBSP4_GFCLK_SHIFT 22 345#define OMAP4430_CLKACTIVITY_PER_MCBSP4_GFCLK_SHIFT 22
347#define OMAP4430_CLKACTIVITY_PER_MCBSP4_GFCLK_MASK (1 << 22) 346#define OMAP4430_CLKACTIVITY_PER_MCBSP4_GFCLK_MASK (1 << 22)
348 347
349/* Used by CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE */ 348/* Used by CM_L4PER_CLKSTCTRL */
350#define OMAP4430_CLKACTIVITY_PER_SYS_GFCLK_SHIFT 24 349#define OMAP4430_CLKACTIVITY_PER_SYS_GFCLK_SHIFT 24
351#define OMAP4430_CLKACTIVITY_PER_SYS_GFCLK_MASK (1 << 24) 350#define OMAP4430_CLKACTIVITY_PER_SYS_GFCLK_MASK (1 << 24)
352 351
353/* Used by CM_MEMIF_CLKSTCTRL, CM_MEMIF_CLKSTCTRL_RESTORE */ 352/* Used by CM_MEMIF_CLKSTCTRL */
354#define OMAP4430_CLKACTIVITY_PHY_ROOT_CLK_SHIFT 10 353#define OMAP4430_CLKACTIVITY_PHY_ROOT_CLK_SHIFT 10
355#define OMAP4430_CLKACTIVITY_PHY_ROOT_CLK_MASK (1 << 10) 354#define OMAP4430_CLKACTIVITY_PHY_ROOT_CLK_MASK (1 << 10)
356 355
@@ -378,27 +377,27 @@
378#define OMAP4430_CLKACTIVITY_TESLA_ROOT_CLK_SHIFT 8 377#define OMAP4430_CLKACTIVITY_TESLA_ROOT_CLK_SHIFT 8
379#define OMAP4430_CLKACTIVITY_TESLA_ROOT_CLK_MASK (1 << 8) 378#define OMAP4430_CLKACTIVITY_TESLA_ROOT_CLK_MASK (1 << 8)
380 379
381/* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ 380/* Used by CM_L3INIT_CLKSTCTRL */
382#define OMAP4430_CLKACTIVITY_TLL_CH0_GFCLK_SHIFT 22 381#define OMAP4430_CLKACTIVITY_TLL_CH0_GFCLK_SHIFT 22
383#define OMAP4430_CLKACTIVITY_TLL_CH0_GFCLK_MASK (1 << 22) 382#define OMAP4430_CLKACTIVITY_TLL_CH0_GFCLK_MASK (1 << 22)
384 383
385/* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ 384/* Used by CM_L3INIT_CLKSTCTRL */
386#define OMAP4430_CLKACTIVITY_TLL_CH1_GFCLK_SHIFT 23 385#define OMAP4430_CLKACTIVITY_TLL_CH1_GFCLK_SHIFT 23
387#define OMAP4430_CLKACTIVITY_TLL_CH1_GFCLK_MASK (1 << 23) 386#define OMAP4430_CLKACTIVITY_TLL_CH1_GFCLK_MASK (1 << 23)
388 387
389/* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ 388/* Used by CM_L3INIT_CLKSTCTRL */
390#define OMAP4430_CLKACTIVITY_TLL_CH2_GFCLK_SHIFT 24 389#define OMAP4430_CLKACTIVITY_TLL_CH2_GFCLK_SHIFT 24
391#define OMAP4430_CLKACTIVITY_TLL_CH2_GFCLK_MASK (1 << 24) 390#define OMAP4430_CLKACTIVITY_TLL_CH2_GFCLK_MASK (1 << 24)
392 391
393/* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ 392/* Used by CM_L3INIT_CLKSTCTRL */
394#define OMAP4430_CLKACTIVITY_UNIPRO_DPLL_CLK_SHIFT 10 393#define OMAP4430_CLKACTIVITY_UNIPRO_DPLL_CLK_SHIFT 10
395#define OMAP4430_CLKACTIVITY_UNIPRO_DPLL_CLK_MASK (1 << 10) 394#define OMAP4430_CLKACTIVITY_UNIPRO_DPLL_CLK_MASK (1 << 10)
396 395
397/* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ 396/* Used by CM_L3INIT_CLKSTCTRL */
398#define OMAP4430_CLKACTIVITY_USB_DPLL_CLK_SHIFT 14 397#define OMAP4430_CLKACTIVITY_USB_DPLL_CLK_SHIFT 14
399#define OMAP4430_CLKACTIVITY_USB_DPLL_CLK_MASK (1 << 14) 398#define OMAP4430_CLKACTIVITY_USB_DPLL_CLK_MASK (1 << 14)
400 399
401/* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ 400/* Used by CM_L3INIT_CLKSTCTRL */
402#define OMAP4430_CLKACTIVITY_USB_DPLL_HS_CLK_SHIFT 15 401#define OMAP4430_CLKACTIVITY_USB_DPLL_HS_CLK_SHIFT 15
403#define OMAP4430_CLKACTIVITY_USB_DPLL_HS_CLK_MASK (1 << 15) 402#define OMAP4430_CLKACTIVITY_USB_DPLL_HS_CLK_MASK (1 << 15)
404 403
@@ -406,11 +405,11 @@
406#define OMAP4430_CLKACTIVITY_USIM_GFCLK_SHIFT 10 405#define OMAP4430_CLKACTIVITY_USIM_GFCLK_SHIFT 10
407#define OMAP4430_CLKACTIVITY_USIM_GFCLK_MASK (1 << 10) 406#define OMAP4430_CLKACTIVITY_USIM_GFCLK_MASK (1 << 10)
408 407
409/* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ 408/* Used by CM_L3INIT_CLKSTCTRL */
410#define OMAP4430_CLKACTIVITY_UTMI_P3_GFCLK_SHIFT 30 409#define OMAP4430_CLKACTIVITY_UTMI_P3_GFCLK_SHIFT 30
411#define OMAP4430_CLKACTIVITY_UTMI_P3_GFCLK_MASK (1 << 30) 410#define OMAP4430_CLKACTIVITY_UTMI_P3_GFCLK_MASK (1 << 30)
412 411
413/* Used by CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE */ 412/* Used by CM_L3INIT_CLKSTCTRL */
414#define OMAP4430_CLKACTIVITY_UTMI_ROOT_GFCLK_SHIFT 25 413#define OMAP4430_CLKACTIVITY_UTMI_ROOT_GFCLK_SHIFT 25
415#define OMAP4430_CLKACTIVITY_UTMI_ROOT_GFCLK_MASK (1 << 25) 414#define OMAP4430_CLKACTIVITY_UTMI_ROOT_GFCLK_MASK (1 << 25)
416 415
@@ -418,6 +417,10 @@
418#define OMAP4430_CLKACTIVITY_WKUP_32K_GFCLK_SHIFT 11 417#define OMAP4430_CLKACTIVITY_WKUP_32K_GFCLK_SHIFT 11
419#define OMAP4430_CLKACTIVITY_WKUP_32K_GFCLK_MASK (1 << 11) 418#define OMAP4430_CLKACTIVITY_WKUP_32K_GFCLK_MASK (1 << 11)
420 419
420/* Used by CM_WKUP_CLKSTCTRL */
421#define OMAP4460_CLKACTIVITY_WKUP_TS_GFCLK_SHIFT 13
422#define OMAP4460_CLKACTIVITY_WKUP_TS_GFCLK_MASK (1 << 13)
423
421/* 424/*
422 * Used by CM1_ABE_TIMER5_CLKCTRL, CM1_ABE_TIMER6_CLKCTRL, 425 * Used by CM1_ABE_TIMER5_CLKCTRL, CM1_ABE_TIMER6_CLKCTRL,
423 * CM1_ABE_TIMER7_CLKCTRL, CM1_ABE_TIMER8_CLKCTRL, CM_L3INIT_MMC1_CLKCTRL, 426 * CM1_ABE_TIMER7_CLKCTRL, CM1_ABE_TIMER8_CLKCTRL, CM_L3INIT_MMC1_CLKCTRL,
@@ -432,7 +435,7 @@
432 435
433/* 436/*
434 * Renamed from CLKSEL Used by CM_ABE_DSS_SYS_CLKSEL, CM_ABE_PLL_REF_CLKSEL, 437 * Renamed from CLKSEL Used by CM_ABE_DSS_SYS_CLKSEL, CM_ABE_PLL_REF_CLKSEL,
435 * CM_L4_WKUP_CLKSEL, CM_CLKSEL_DUCATI_ISS_ROOT, CM_CLKSEL_USB_60MHZ 438 * CM_CLKSEL_DUCATI_ISS_ROOT, CM_CLKSEL_USB_60MHZ, CM_L4_WKUP_CLKSEL
436 */ 439 */
437#define OMAP4430_CLKSEL_0_0_SHIFT 0 440#define OMAP4430_CLKSEL_0_0_SHIFT 0
438#define OMAP4430_CLKSEL_0_0_MASK (1 << 0) 441#define OMAP4430_CLKSEL_0_0_MASK (1 << 0)
@@ -449,18 +452,19 @@
449#define OMAP4430_CLKSEL_60M_SHIFT 24 452#define OMAP4430_CLKSEL_60M_SHIFT 24
450#define OMAP4430_CLKSEL_60M_MASK (1 << 24) 453#define OMAP4430_CLKSEL_60M_MASK (1 << 24)
451 454
455/* Used by CM_MPU_MPU_CLKCTRL */
456#define OMAP4460_CLKSEL_ABE_DIV_MODE_SHIFT 25
457#define OMAP4460_CLKSEL_ABE_DIV_MODE_MASK (1 << 25)
458
452/* Used by CM1_ABE_AESS_CLKCTRL */ 459/* Used by CM1_ABE_AESS_CLKCTRL */
453#define OMAP4430_CLKSEL_AESS_FCLK_SHIFT 24 460#define OMAP4430_CLKSEL_AESS_FCLK_SHIFT 24
454#define OMAP4430_CLKSEL_AESS_FCLK_MASK (1 << 24) 461#define OMAP4430_CLKSEL_AESS_FCLK_MASK (1 << 24)
455 462
456/* Used by CM_CLKSEL_CORE, CM_CLKSEL_CORE_RESTORE */ 463/* Used by CM_CLKSEL_CORE */
457#define OMAP4430_CLKSEL_CORE_SHIFT 0 464#define OMAP4430_CLKSEL_CORE_SHIFT 0
458#define OMAP4430_CLKSEL_CORE_MASK (1 << 0) 465#define OMAP4430_CLKSEL_CORE_MASK (1 << 0)
459 466
460/* 467/* Renamed from CLKSEL_CORE Used by CM_SHADOW_FREQ_CONFIG2 */
461 * Renamed from CLKSEL_CORE Used by CM_SHADOW_FREQ_CONFIG2_RESTORE,
462 * CM_SHADOW_FREQ_CONFIG2
463 */
464#define OMAP4430_CLKSEL_CORE_1_1_SHIFT 1 468#define OMAP4430_CLKSEL_CORE_1_1_SHIFT 1
465#define OMAP4430_CLKSEL_CORE_1_1_MASK (1 << 1) 469#define OMAP4430_CLKSEL_CORE_1_1_MASK (1 << 1)
466 470
@@ -468,6 +472,10 @@
468#define OMAP4430_CLKSEL_DIV_SHIFT 24 472#define OMAP4430_CLKSEL_DIV_SHIFT 24
469#define OMAP4430_CLKSEL_DIV_MASK (1 << 24) 473#define OMAP4430_CLKSEL_DIV_MASK (1 << 24)
470 474
475/* Used by CM_MPU_MPU_CLKCTRL */
476#define OMAP4460_CLKSEL_EMIF_DIV_MODE_SHIFT 24
477#define OMAP4460_CLKSEL_EMIF_DIV_MODE_MASK (1 << 24)
478
471/* Used by CM_CAM_FDIF_CLKCTRL */ 479/* Used by CM_CAM_FDIF_CLKCTRL */
472#define OMAP4430_CLKSEL_FCLK_SHIFT 24 480#define OMAP4430_CLKSEL_FCLK_SHIFT 24
473#define OMAP4430_CLKSEL_FCLK_MASK (0x3 << 24) 481#define OMAP4430_CLKSEL_FCLK_MASK (0x3 << 24)
@@ -484,18 +492,15 @@
484#define OMAP4430_CLKSEL_INTERNAL_SOURCE_CM1_ABE_DMIC_SHIFT 26 492#define OMAP4430_CLKSEL_INTERNAL_SOURCE_CM1_ABE_DMIC_SHIFT 26
485#define OMAP4430_CLKSEL_INTERNAL_SOURCE_CM1_ABE_DMIC_MASK (0x3 << 26) 493#define OMAP4430_CLKSEL_INTERNAL_SOURCE_CM1_ABE_DMIC_MASK (0x3 << 26)
486 494
487/* Used by CM_CLKSEL_CORE, CM_CLKSEL_CORE_RESTORE */ 495/* Used by CM_CLKSEL_CORE */
488#define OMAP4430_CLKSEL_L3_SHIFT 4 496#define OMAP4430_CLKSEL_L3_SHIFT 4
489#define OMAP4430_CLKSEL_L3_MASK (1 << 4) 497#define OMAP4430_CLKSEL_L3_MASK (1 << 4)
490 498
491/* 499/* Renamed from CLKSEL_L3 Used by CM_SHADOW_FREQ_CONFIG2 */
492 * Renamed from CLKSEL_L3 Used by CM_SHADOW_FREQ_CONFIG2_RESTORE,
493 * CM_SHADOW_FREQ_CONFIG2
494 */
495#define OMAP4430_CLKSEL_L3_SHADOW_SHIFT 2 500#define OMAP4430_CLKSEL_L3_SHADOW_SHIFT 2
496#define OMAP4430_CLKSEL_L3_SHADOW_MASK (1 << 2) 501#define OMAP4430_CLKSEL_L3_SHADOW_MASK (1 << 2)
497 502
498/* Used by CM_CLKSEL_CORE, CM_CLKSEL_CORE_RESTORE */ 503/* Used by CM_CLKSEL_CORE */
499#define OMAP4430_CLKSEL_L4_SHIFT 8 504#define OMAP4430_CLKSEL_L4_SHIFT 8
500#define OMAP4430_CLKSEL_L4_MASK (1 << 8) 505#define OMAP4430_CLKSEL_L4_MASK (1 << 8)
501 506
@@ -526,11 +531,11 @@
526#define OMAP4430_CLKSEL_SOURCE_24_24_SHIFT 24 531#define OMAP4430_CLKSEL_SOURCE_24_24_SHIFT 24
527#define OMAP4430_CLKSEL_SOURCE_24_24_MASK (1 << 24) 532#define OMAP4430_CLKSEL_SOURCE_24_24_MASK (1 << 24)
528 533
529/* Used by CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL_RESTORE */ 534/* Used by CM_L3INIT_USB_HOST_CLKCTRL */
530#define OMAP4430_CLKSEL_UTMI_P1_SHIFT 24 535#define OMAP4430_CLKSEL_UTMI_P1_SHIFT 24
531#define OMAP4430_CLKSEL_UTMI_P1_MASK (1 << 24) 536#define OMAP4430_CLKSEL_UTMI_P1_MASK (1 << 24)
532 537
533/* Used by CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL_RESTORE */ 538/* Used by CM_L3INIT_USB_HOST_CLKCTRL */
534#define OMAP4430_CLKSEL_UTMI_P2_SHIFT 25 539#define OMAP4430_CLKSEL_UTMI_P2_SHIFT 25
535#define OMAP4430_CLKSEL_UTMI_P2_MASK (1 << 25) 540#define OMAP4430_CLKSEL_UTMI_P2_MASK (1 << 25)
536 541
@@ -538,13 +543,10 @@
538 * Used by CM1_ABE_CLKSTCTRL, CM_ALWON_CLKSTCTRL, CM_CAM_CLKSTCTRL, 543 * Used by CM1_ABE_CLKSTCTRL, CM_ALWON_CLKSTCTRL, CM_CAM_CLKSTCTRL,
539 * CM_CEFUSE_CLKSTCTRL, CM_D2D_CLKSTCTRL, CM_DSS_CLKSTCTRL, 544 * CM_CEFUSE_CLKSTCTRL, CM_D2D_CLKSTCTRL, CM_DSS_CLKSTCTRL,
540 * CM_DUCATI_CLKSTCTRL, CM_EMU_CLKSTCTRL, CM_GFX_CLKSTCTRL, CM_IVAHD_CLKSTCTRL, 545 * CM_DUCATI_CLKSTCTRL, CM_EMU_CLKSTCTRL, CM_GFX_CLKSTCTRL, CM_IVAHD_CLKSTCTRL,
541 * CM_L3INIT_CLKSTCTRL, CM_L3INIT_CLKSTCTRL_RESTORE, CM_L3INSTR_CLKSTCTRL, 546 * CM_L3INIT_CLKSTCTRL, CM_L3INSTR_CLKSTCTRL, CM_L3_1_CLKSTCTRL,
542 * CM_L3_1_CLKSTCTRL, CM_L3_1_CLKSTCTRL_RESTORE, CM_L3_2_CLKSTCTRL, 547 * CM_L3_2_CLKSTCTRL, CM_L4CFG_CLKSTCTRL, CM_L4PER_CLKSTCTRL,
543 * CM_L3_2_CLKSTCTRL_RESTORE, CM_L4CFG_CLKSTCTRL, CM_L4CFG_CLKSTCTRL_RESTORE, 548 * CM_L4SEC_CLKSTCTRL, CM_MEMIF_CLKSTCTRL, CM_MPU_CLKSTCTRL, CM_SDMA_CLKSTCTRL,
544 * CM_L4PER_CLKSTCTRL, CM_L4PER_CLKSTCTRL_RESTORE, CM_L4SEC_CLKSTCTRL, 549 * CM_TESLA_CLKSTCTRL, CM_WKUP_CLKSTCTRL
545 * CM_MEMIF_CLKSTCTRL, CM_MEMIF_CLKSTCTRL_RESTORE, CM_MPU_CLKSTCTRL,
546 * CM_MPU_CLKSTCTRL_RESTORE, CM_SDMA_CLKSTCTRL, CM_TESLA_CLKSTCTRL,
547 * CM_WKUP_CLKSTCTRL
548 */ 550 */
549#define OMAP4430_CLKTRCTRL_SHIFT 0 551#define OMAP4430_CLKTRCTRL_SHIFT 0
550#define OMAP4430_CLKTRCTRL_MASK (0x3 << 0) 552#define OMAP4430_CLKTRCTRL_MASK (0x3 << 0)
@@ -561,10 +563,7 @@
561#define OMAP4430_CUSTOM_SHIFT 6 563#define OMAP4430_CUSTOM_SHIFT 6
562#define OMAP4430_CUSTOM_MASK (0x3 << 6) 564#define OMAP4430_CUSTOM_MASK (0x3 << 6)
563 565
564/* 566/* Used by CM_L3_2_DYNAMICDEP, CM_L4CFG_DYNAMICDEP */
565 * Used by CM_L3_2_DYNAMICDEP, CM_L3_2_DYNAMICDEP_RESTORE, CM_L4CFG_DYNAMICDEP,
566 * CM_L4CFG_DYNAMICDEP_RESTORE
567 */
568#define OMAP4430_D2D_DYNDEP_SHIFT 18 567#define OMAP4430_D2D_DYNDEP_SHIFT 18
569#define OMAP4430_D2D_DYNDEP_MASK (1 << 18) 568#define OMAP4430_D2D_DYNDEP_MASK (1 << 18)
570 569
@@ -572,33 +571,43 @@
572#define OMAP4430_D2D_STATDEP_SHIFT 18 571#define OMAP4430_D2D_STATDEP_SHIFT 18
573#define OMAP4430_D2D_STATDEP_MASK (1 << 18) 572#define OMAP4430_D2D_STATDEP_MASK (1 << 18)
574 573
574/* Used by CM_CLKSEL_DPLL_MPU */
575#define OMAP4460_DCC_COUNT_MAX_SHIFT 24
576#define OMAP4460_DCC_COUNT_MAX_MASK (0xff << 24)
577
578/* Used by CM_CLKSEL_DPLL_MPU */
579#define OMAP4460_DCC_EN_SHIFT 22
580#define OMAP4460_DCC_EN_MASK (1 << 22)
581
575/* 582/*
576 * Used by CM_SSC_DELTAMSTEP_DPLL_ABE, CM_SSC_DELTAMSTEP_DPLL_CORE, 583 * Used by CM_SSC_DELTAMSTEP_DPLL_ABE, CM_SSC_DELTAMSTEP_DPLL_CORE,
577 * CM_SSC_DELTAMSTEP_DPLL_CORE_RESTORE, CM_SSC_DELTAMSTEP_DPLL_DDRPHY, 584 * CM_SSC_DELTAMSTEP_DPLL_DDRPHY, CM_SSC_DELTAMSTEP_DPLL_IVA,
578 * CM_SSC_DELTAMSTEP_DPLL_IVA, CM_SSC_DELTAMSTEP_DPLL_MPU, 585 * CM_SSC_DELTAMSTEP_DPLL_MPU, CM_SSC_DELTAMSTEP_DPLL_PER,
579 * CM_SSC_DELTAMSTEP_DPLL_PER, CM_SSC_DELTAMSTEP_DPLL_UNIPRO, 586 * CM_SSC_DELTAMSTEP_DPLL_UNIPRO, CM_SSC_DELTAMSTEP_DPLL_USB
580 * CM_SSC_DELTAMSTEP_DPLL_USB
581 */ 587 */
582#define OMAP4430_DELTAMSTEP_SHIFT 0 588#define OMAP4430_DELTAMSTEP_SHIFT 0
583#define OMAP4430_DELTAMSTEP_MASK (0xfffff << 0) 589#define OMAP4430_DELTAMSTEP_MASK (0xfffff << 0)
584 590
585/* Used by CM_SHADOW_FREQ_CONFIG1, CM_SHADOW_FREQ_CONFIG1_RESTORE */ 591/* Renamed from DELTAMSTEP Used by CM_SSC_DELTAMSTEP_DPLL_USB */
586#define OMAP4430_DLL_OVERRIDE_SHIFT 2 592#define OMAP4460_DELTAMSTEP_0_20_SHIFT 0
587#define OMAP4430_DLL_OVERRIDE_MASK (1 << 2) 593#define OMAP4460_DELTAMSTEP_0_20_MASK (0x1fffff << 0)
588 594
589/* Renamed from DLL_OVERRIDE Used by CM_DLL_CTRL */ 595/* Used by CM_DLL_CTRL */
590#define OMAP4430_DLL_OVERRIDE_0_0_SHIFT 0 596#define OMAP4430_DLL_OVERRIDE_SHIFT 0
591#define OMAP4430_DLL_OVERRIDE_0_0_MASK (1 << 0) 597#define OMAP4430_DLL_OVERRIDE_MASK (1 << 0)
592 598
593/* Used by CM_SHADOW_FREQ_CONFIG1, CM_SHADOW_FREQ_CONFIG1_RESTORE */ 599/* Renamed from DLL_OVERRIDE Used by CM_SHADOW_FREQ_CONFIG1 */
600#define OMAP4430_DLL_OVERRIDE_2_2_SHIFT 2
601#define OMAP4430_DLL_OVERRIDE_2_2_MASK (1 << 2)
602
603/* Used by CM_SHADOW_FREQ_CONFIG1 */
594#define OMAP4430_DLL_RESET_SHIFT 3 604#define OMAP4430_DLL_RESET_SHIFT 3
595#define OMAP4430_DLL_RESET_MASK (1 << 3) 605#define OMAP4430_DLL_RESET_MASK (1 << 3)
596 606
597/* 607/*
598 * Used by CM_CLKSEL_DPLL_ABE, CM_CLKSEL_DPLL_CORE, 608 * Used by CM_CLKSEL_DPLL_ABE, CM_CLKSEL_DPLL_CORE, CM_CLKSEL_DPLL_DDRPHY,
599 * CM_CLKSEL_DPLL_CORE_RESTORE, CM_CLKSEL_DPLL_DDRPHY, CM_CLKSEL_DPLL_IVA, 609 * CM_CLKSEL_DPLL_IVA, CM_CLKSEL_DPLL_MPU, CM_CLKSEL_DPLL_PER,
600 * CM_CLKSEL_DPLL_MPU, CM_CLKSEL_DPLL_PER, CM_CLKSEL_DPLL_UNIPRO, 610 * CM_CLKSEL_DPLL_UNIPRO, CM_CLKSEL_DPLL_USB
601 * CM_CLKSEL_DPLL_USB
602 */ 611 */
603#define OMAP4430_DPLL_BYP_CLKSEL_SHIFT 23 612#define OMAP4430_DPLL_BYP_CLKSEL_SHIFT 23
604#define OMAP4430_DPLL_BYP_CLKSEL_MASK (1 << 23) 613#define OMAP4430_DPLL_BYP_CLKSEL_MASK (1 << 23)
@@ -607,28 +616,19 @@
607#define OMAP4430_DPLL_CLKDCOLDO_GATE_CTRL_SHIFT 8 616#define OMAP4430_DPLL_CLKDCOLDO_GATE_CTRL_SHIFT 8
608#define OMAP4430_DPLL_CLKDCOLDO_GATE_CTRL_MASK (1 << 8) 617#define OMAP4430_DPLL_CLKDCOLDO_GATE_CTRL_MASK (1 << 8)
609 618
610/* Used by CM_CLKSEL_DPLL_CORE, CM_CLKSEL_DPLL_CORE_RESTORE */ 619/* Used by CM_CLKSEL_DPLL_CORE */
611#define OMAP4430_DPLL_CLKOUTHIF_CLKSEL_SHIFT 20 620#define OMAP4430_DPLL_CLKOUTHIF_CLKSEL_SHIFT 20
612#define OMAP4430_DPLL_CLKOUTHIF_CLKSEL_MASK (1 << 20) 621#define OMAP4430_DPLL_CLKOUTHIF_CLKSEL_MASK (1 << 20)
613 622
614/* 623/* Used by CM_DIV_M3_DPLL_ABE, CM_DIV_M3_DPLL_CORE, CM_DIV_M3_DPLL_PER */
615 * Used by CM_DIV_M3_DPLL_ABE, CM_DIV_M3_DPLL_CORE,
616 * CM_DIV_M3_DPLL_CORE_RESTORE, CM_DIV_M3_DPLL_PER
617 */
618#define OMAP4430_DPLL_CLKOUTHIF_DIV_SHIFT 0 624#define OMAP4430_DPLL_CLKOUTHIF_DIV_SHIFT 0
619#define OMAP4430_DPLL_CLKOUTHIF_DIV_MASK (0x1f << 0) 625#define OMAP4430_DPLL_CLKOUTHIF_DIV_MASK (0x1f << 0)
620 626
621/* 627/* Used by CM_DIV_M3_DPLL_ABE, CM_DIV_M3_DPLL_CORE, CM_DIV_M3_DPLL_PER */
622 * Used by CM_DIV_M3_DPLL_ABE, CM_DIV_M3_DPLL_CORE,
623 * CM_DIV_M3_DPLL_CORE_RESTORE, CM_DIV_M3_DPLL_PER
624 */
625#define OMAP4430_DPLL_CLKOUTHIF_DIVCHACK_SHIFT 5 628#define OMAP4430_DPLL_CLKOUTHIF_DIVCHACK_SHIFT 5
626#define OMAP4430_DPLL_CLKOUTHIF_DIVCHACK_MASK (1 << 5) 629#define OMAP4430_DPLL_CLKOUTHIF_DIVCHACK_MASK (1 << 5)
627 630
628/* 631/* Used by CM_DIV_M3_DPLL_ABE, CM_DIV_M3_DPLL_CORE, CM_DIV_M3_DPLL_PER */
629 * Used by CM_DIV_M3_DPLL_ABE, CM_DIV_M3_DPLL_CORE,
630 * CM_DIV_M3_DPLL_CORE_RESTORE, CM_DIV_M3_DPLL_PER
631 */
632#define OMAP4430_DPLL_CLKOUTHIF_GATE_CTRL_SHIFT 8 632#define OMAP4430_DPLL_CLKOUTHIF_GATE_CTRL_SHIFT 8
633#define OMAP4430_DPLL_CLKOUTHIF_GATE_CTRL_MASK (1 << 8) 633#define OMAP4430_DPLL_CLKOUTHIF_GATE_CTRL_MASK (1 << 8)
634 634
@@ -637,9 +637,8 @@
637#define OMAP4430_DPLL_CLKOUTX2_GATE_CTRL_MASK (1 << 10) 637#define OMAP4430_DPLL_CLKOUTX2_GATE_CTRL_MASK (1 << 10)
638 638
639/* 639/*
640 * Used by CM_DIV_M2_DPLL_ABE, CM_DIV_M2_DPLL_CORE, 640 * Used by CM_DIV_M2_DPLL_ABE, CM_DIV_M2_DPLL_CORE, CM_DIV_M2_DPLL_DDRPHY,
641 * CM_DIV_M2_DPLL_CORE_RESTORE, CM_DIV_M2_DPLL_DDRPHY, CM_DIV_M2_DPLL_MPU, 641 * CM_DIV_M2_DPLL_MPU, CM_DIV_M2_DPLL_PER, CM_DIV_M2_DPLL_UNIPRO
642 * CM_DIV_M2_DPLL_PER, CM_DIV_M2_DPLL_UNIPRO
643 */ 642 */
644#define OMAP4430_DPLL_CLKOUT_DIV_SHIFT 0 643#define OMAP4430_DPLL_CLKOUT_DIV_SHIFT 0
645#define OMAP4430_DPLL_CLKOUT_DIV_MASK (0x1f << 0) 644#define OMAP4430_DPLL_CLKOUT_DIV_MASK (0x1f << 0)
@@ -649,9 +648,8 @@
649#define OMAP4430_DPLL_CLKOUT_DIV_0_6_MASK (0x7f << 0) 648#define OMAP4430_DPLL_CLKOUT_DIV_0_6_MASK (0x7f << 0)
650 649
651/* 650/*
652 * Used by CM_DIV_M2_DPLL_ABE, CM_DIV_M2_DPLL_CORE, 651 * Used by CM_DIV_M2_DPLL_ABE, CM_DIV_M2_DPLL_CORE, CM_DIV_M2_DPLL_DDRPHY,
653 * CM_DIV_M2_DPLL_CORE_RESTORE, CM_DIV_M2_DPLL_DDRPHY, CM_DIV_M2_DPLL_MPU, 652 * CM_DIV_M2_DPLL_MPU, CM_DIV_M2_DPLL_PER, CM_DIV_M2_DPLL_UNIPRO
654 * CM_DIV_M2_DPLL_PER, CM_DIV_M2_DPLL_UNIPRO
655 */ 653 */
656#define OMAP4430_DPLL_CLKOUT_DIVCHACK_SHIFT 5 654#define OMAP4430_DPLL_CLKOUT_DIVCHACK_SHIFT 5
657#define OMAP4430_DPLL_CLKOUT_DIVCHACK_MASK (1 << 5) 655#define OMAP4430_DPLL_CLKOUT_DIVCHACK_MASK (1 << 5)
@@ -661,29 +659,28 @@
661#define OMAP4430_DPLL_CLKOUT_DIVCHACK_M2_USB_MASK (1 << 7) 659#define OMAP4430_DPLL_CLKOUT_DIVCHACK_M2_USB_MASK (1 << 7)
662 660
663/* 661/*
664 * Used by CM_DIV_M2_DPLL_ABE, CM_DIV_M2_DPLL_CORE, 662 * Used by CM_DIV_M2_DPLL_ABE, CM_DIV_M2_DPLL_CORE, CM_DIV_M2_DPLL_DDRPHY,
665 * CM_DIV_M2_DPLL_CORE_RESTORE, CM_DIV_M2_DPLL_DDRPHY, CM_DIV_M2_DPLL_MPU, 663 * CM_DIV_M2_DPLL_MPU, CM_DIV_M2_DPLL_PER, CM_DIV_M2_DPLL_USB
666 * CM_DIV_M2_DPLL_PER, CM_DIV_M2_DPLL_USB
667 */ 664 */
668#define OMAP4430_DPLL_CLKOUT_GATE_CTRL_SHIFT 8 665#define OMAP4430_DPLL_CLKOUT_GATE_CTRL_SHIFT 8
669#define OMAP4430_DPLL_CLKOUT_GATE_CTRL_MASK (1 << 8) 666#define OMAP4430_DPLL_CLKOUT_GATE_CTRL_MASK (1 << 8)
670 667
671/* Used by CM_SHADOW_FREQ_CONFIG1, CM_SHADOW_FREQ_CONFIG1_RESTORE */ 668/* Used by CM_SHADOW_FREQ_CONFIG1 */
672#define OMAP4430_DPLL_CORE_DPLL_EN_SHIFT 8 669#define OMAP4430_DPLL_CORE_DPLL_EN_SHIFT 8
673#define OMAP4430_DPLL_CORE_DPLL_EN_MASK (0x7 << 8) 670#define OMAP4430_DPLL_CORE_DPLL_EN_MASK (0x7 << 8)
674 671
675/* Used by CM_SHADOW_FREQ_CONFIG1, CM_SHADOW_FREQ_CONFIG1_RESTORE */ 672/* Used by CM_SHADOW_FREQ_CONFIG1 */
676#define OMAP4430_DPLL_CORE_M2_DIV_SHIFT 11 673#define OMAP4430_DPLL_CORE_M2_DIV_SHIFT 11
677#define OMAP4430_DPLL_CORE_M2_DIV_MASK (0x1f << 11) 674#define OMAP4430_DPLL_CORE_M2_DIV_MASK (0x1f << 11)
678 675
679/* Used by CM_SHADOW_FREQ_CONFIG2, CM_SHADOW_FREQ_CONFIG2_RESTORE */ 676/* Used by CM_SHADOW_FREQ_CONFIG2 */
680#define OMAP4430_DPLL_CORE_M5_DIV_SHIFT 3 677#define OMAP4430_DPLL_CORE_M5_DIV_SHIFT 3
681#define OMAP4430_DPLL_CORE_M5_DIV_MASK (0x1f << 3) 678#define OMAP4430_DPLL_CORE_M5_DIV_MASK (0x1f << 3)
682 679
683/* 680/*
684 * Used by CM_CLKSEL_DPLL_ABE, CM_CLKSEL_DPLL_CORE, 681 * Used by CM_CLKSEL_DPLL_ABE, CM_CLKSEL_DPLL_CORE, CM_CLKSEL_DPLL_DDRPHY,
685 * CM_CLKSEL_DPLL_CORE_RESTORE, CM_CLKSEL_DPLL_DDRPHY, CM_CLKSEL_DPLL_IVA, 682 * CM_CLKSEL_DPLL_IVA, CM_CLKSEL_DPLL_MPU, CM_CLKSEL_DPLL_PER,
686 * CM_CLKSEL_DPLL_MPU, CM_CLKSEL_DPLL_PER, CM_CLKSEL_DPLL_UNIPRO 683 * CM_CLKSEL_DPLL_UNIPRO
687 */ 684 */
688#define OMAP4430_DPLL_DIV_SHIFT 0 685#define OMAP4430_DPLL_DIV_SHIFT 0
689#define OMAP4430_DPLL_DIV_MASK (0x7f << 0) 686#define OMAP4430_DPLL_DIV_MASK (0x7f << 0)
@@ -693,9 +690,8 @@
693#define OMAP4430_DPLL_DIV_0_7_MASK (0xff << 0) 690#define OMAP4430_DPLL_DIV_0_7_MASK (0xff << 0)
694 691
695/* 692/*
696 * Used by CM_CLKMODE_DPLL_ABE, CM_CLKMODE_DPLL_CORE, 693 * Used by CM_CLKMODE_DPLL_ABE, CM_CLKMODE_DPLL_CORE, CM_CLKMODE_DPLL_DDRPHY,
697 * CM_CLKMODE_DPLL_CORE_RESTORE, CM_CLKMODE_DPLL_DDRPHY, CM_CLKMODE_DPLL_IVA, 694 * CM_CLKMODE_DPLL_IVA, CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER
698 * CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER
699 */ 695 */
700#define OMAP4430_DPLL_DRIFTGUARD_EN_SHIFT 8 696#define OMAP4430_DPLL_DRIFTGUARD_EN_SHIFT 8
701#define OMAP4430_DPLL_DRIFTGUARD_EN_MASK (1 << 8) 697#define OMAP4430_DPLL_DRIFTGUARD_EN_MASK (1 << 8)
@@ -705,26 +701,25 @@
705#define OMAP4430_DPLL_DRIFTGUARD_EN_3_3_MASK (1 << 3) 701#define OMAP4430_DPLL_DRIFTGUARD_EN_3_3_MASK (1 << 3)
706 702
707/* 703/*
708 * Used by CM_CLKMODE_DPLL_ABE, CM_CLKMODE_DPLL_CORE, 704 * Used by CM_CLKMODE_DPLL_ABE, CM_CLKMODE_DPLL_CORE, CM_CLKMODE_DPLL_DDRPHY,
709 * CM_CLKMODE_DPLL_CORE_RESTORE, CM_CLKMODE_DPLL_DDRPHY, CM_CLKMODE_DPLL_IVA, 705 * CM_CLKMODE_DPLL_IVA, CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER,
710 * CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER, CM_CLKMODE_DPLL_UNIPRO, 706 * CM_CLKMODE_DPLL_UNIPRO, CM_CLKMODE_DPLL_USB
711 * CM_CLKMODE_DPLL_USB
712 */ 707 */
713#define OMAP4430_DPLL_EN_SHIFT 0 708#define OMAP4430_DPLL_EN_SHIFT 0
714#define OMAP4430_DPLL_EN_MASK (0x7 << 0) 709#define OMAP4430_DPLL_EN_MASK (0x7 << 0)
715 710
716/* 711/*
717 * Used by CM_CLKMODE_DPLL_ABE, CM_CLKMODE_DPLL_CORE, 712 * Used by CM_CLKMODE_DPLL_ABE, CM_CLKMODE_DPLL_CORE, CM_CLKMODE_DPLL_DDRPHY,
718 * CM_CLKMODE_DPLL_CORE_RESTORE, CM_CLKMODE_DPLL_DDRPHY, CM_CLKMODE_DPLL_IVA, 713 * CM_CLKMODE_DPLL_IVA, CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER,
719 * CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER, CM_CLKMODE_DPLL_UNIPRO 714 * CM_CLKMODE_DPLL_UNIPRO
720 */ 715 */
721#define OMAP4430_DPLL_LPMODE_EN_SHIFT 10 716#define OMAP4430_DPLL_LPMODE_EN_SHIFT 10
722#define OMAP4430_DPLL_LPMODE_EN_MASK (1 << 10) 717#define OMAP4430_DPLL_LPMODE_EN_MASK (1 << 10)
723 718
724/* 719/*
725 * Used by CM_CLKSEL_DPLL_ABE, CM_CLKSEL_DPLL_CORE, 720 * Used by CM_CLKSEL_DPLL_ABE, CM_CLKSEL_DPLL_CORE, CM_CLKSEL_DPLL_DDRPHY,
726 * CM_CLKSEL_DPLL_CORE_RESTORE, CM_CLKSEL_DPLL_DDRPHY, CM_CLKSEL_DPLL_IVA, 721 * CM_CLKSEL_DPLL_IVA, CM_CLKSEL_DPLL_MPU, CM_CLKSEL_DPLL_PER,
727 * CM_CLKSEL_DPLL_MPU, CM_CLKSEL_DPLL_PER, CM_CLKSEL_DPLL_UNIPRO 722 * CM_CLKSEL_DPLL_UNIPRO
728 */ 723 */
729#define OMAP4430_DPLL_MULT_SHIFT 8 724#define OMAP4430_DPLL_MULT_SHIFT 8
730#define OMAP4430_DPLL_MULT_MASK (0x7ff << 8) 725#define OMAP4430_DPLL_MULT_MASK (0x7ff << 8)
@@ -734,9 +729,9 @@
734#define OMAP4430_DPLL_MULT_USB_MASK (0xfff << 8) 729#define OMAP4430_DPLL_MULT_USB_MASK (0xfff << 8)
735 730
736/* 731/*
737 * Used by CM_CLKMODE_DPLL_ABE, CM_CLKMODE_DPLL_CORE, 732 * Used by CM_CLKMODE_DPLL_ABE, CM_CLKMODE_DPLL_CORE, CM_CLKMODE_DPLL_DDRPHY,
738 * CM_CLKMODE_DPLL_CORE_RESTORE, CM_CLKMODE_DPLL_DDRPHY, CM_CLKMODE_DPLL_IVA, 733 * CM_CLKMODE_DPLL_IVA, CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER,
739 * CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER, CM_CLKMODE_DPLL_UNIPRO 734 * CM_CLKMODE_DPLL_UNIPRO
740 */ 735 */
741#define OMAP4430_DPLL_REGM4XEN_SHIFT 11 736#define OMAP4430_DPLL_REGM4XEN_SHIFT 11
742#define OMAP4430_DPLL_REGM4XEN_MASK (1 << 11) 737#define OMAP4430_DPLL_REGM4XEN_MASK (1 << 11)
@@ -746,55 +741,46 @@
746#define OMAP4430_DPLL_SD_DIV_MASK (0xff << 24) 741#define OMAP4430_DPLL_SD_DIV_MASK (0xff << 24)
747 742
748/* 743/*
749 * Used by CM_CLKMODE_DPLL_ABE, CM_CLKMODE_DPLL_CORE, 744 * Used by CM_CLKMODE_DPLL_ABE, CM_CLKMODE_DPLL_CORE, CM_CLKMODE_DPLL_DDRPHY,
750 * CM_CLKMODE_DPLL_CORE_RESTORE, CM_CLKMODE_DPLL_DDRPHY, CM_CLKMODE_DPLL_IVA, 745 * CM_CLKMODE_DPLL_IVA, CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER,
751 * CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER, CM_CLKMODE_DPLL_UNIPRO, 746 * CM_CLKMODE_DPLL_UNIPRO, CM_CLKMODE_DPLL_USB
752 * CM_CLKMODE_DPLL_USB
753 */ 747 */
754#define OMAP4430_DPLL_SSC_ACK_SHIFT 13 748#define OMAP4430_DPLL_SSC_ACK_SHIFT 13
755#define OMAP4430_DPLL_SSC_ACK_MASK (1 << 13) 749#define OMAP4430_DPLL_SSC_ACK_MASK (1 << 13)
756 750
757/* 751/*
758 * Used by CM_CLKMODE_DPLL_ABE, CM_CLKMODE_DPLL_CORE, 752 * Used by CM_CLKMODE_DPLL_ABE, CM_CLKMODE_DPLL_CORE, CM_CLKMODE_DPLL_DDRPHY,
759 * CM_CLKMODE_DPLL_CORE_RESTORE, CM_CLKMODE_DPLL_DDRPHY, CM_CLKMODE_DPLL_IVA, 753 * CM_CLKMODE_DPLL_IVA, CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER,
760 * CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER, CM_CLKMODE_DPLL_UNIPRO, 754 * CM_CLKMODE_DPLL_UNIPRO, CM_CLKMODE_DPLL_USB
761 * CM_CLKMODE_DPLL_USB
762 */ 755 */
763#define OMAP4430_DPLL_SSC_DOWNSPREAD_SHIFT 14 756#define OMAP4430_DPLL_SSC_DOWNSPREAD_SHIFT 14
764#define OMAP4430_DPLL_SSC_DOWNSPREAD_MASK (1 << 14) 757#define OMAP4430_DPLL_SSC_DOWNSPREAD_MASK (1 << 14)
765 758
766/* 759/*
767 * Used by CM_CLKMODE_DPLL_ABE, CM_CLKMODE_DPLL_CORE, 760 * Used by CM_CLKMODE_DPLL_ABE, CM_CLKMODE_DPLL_CORE, CM_CLKMODE_DPLL_DDRPHY,
768 * CM_CLKMODE_DPLL_CORE_RESTORE, CM_CLKMODE_DPLL_DDRPHY, CM_CLKMODE_DPLL_IVA, 761 * CM_CLKMODE_DPLL_IVA, CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER,
769 * CM_CLKMODE_DPLL_MPU, CM_CLKMODE_DPLL_PER, CM_CLKMODE_DPLL_UNIPRO, 762 * CM_CLKMODE_DPLL_UNIPRO, CM_CLKMODE_DPLL_USB
770 * CM_CLKMODE_DPLL_USB
771 */ 763 */
772#define OMAP4430_DPLL_SSC_EN_SHIFT 12 764#define OMAP4430_DPLL_SSC_EN_SHIFT 12
773#define OMAP4430_DPLL_SSC_EN_MASK (1 << 12) 765#define OMAP4430_DPLL_SSC_EN_MASK (1 << 12)
774 766
775/* 767/* Used by CM_L3_2_DYNAMICDEP, CM_L4CFG_DYNAMICDEP, CM_L4PER_DYNAMICDEP */
776 * Used by CM_L3_2_DYNAMICDEP, CM_L3_2_DYNAMICDEP_RESTORE, CM_L4CFG_DYNAMICDEP,
777 * CM_L4CFG_DYNAMICDEP_RESTORE, CM_L4PER_DYNAMICDEP, CM_L4PER_DYNAMICDEP_RESTORE
778 */
779#define OMAP4430_DSS_DYNDEP_SHIFT 8 768#define OMAP4430_DSS_DYNDEP_SHIFT 8
780#define OMAP4430_DSS_DYNDEP_MASK (1 << 8) 769#define OMAP4430_DSS_DYNDEP_MASK (1 << 8)
781 770
782/* 771/* Used by CM_DUCATI_STATICDEP, CM_MPU_STATICDEP, CM_SDMA_STATICDEP */
783 * Used by CM_DUCATI_STATICDEP, CM_MPU_STATICDEP, CM_SDMA_STATICDEP,
784 * CM_SDMA_STATICDEP_RESTORE
785 */
786#define OMAP4430_DSS_STATDEP_SHIFT 8 772#define OMAP4430_DSS_STATDEP_SHIFT 8
787#define OMAP4430_DSS_STATDEP_MASK (1 << 8) 773#define OMAP4430_DSS_STATDEP_MASK (1 << 8)
788 774
789/* Used by CM_L3_2_DYNAMICDEP, CM_L3_2_DYNAMICDEP_RESTORE */ 775/* Used by CM_L3_2_DYNAMICDEP */
790#define OMAP4430_DUCATI_DYNDEP_SHIFT 0 776#define OMAP4430_DUCATI_DYNDEP_SHIFT 0
791#define OMAP4430_DUCATI_DYNDEP_MASK (1 << 0) 777#define OMAP4430_DUCATI_DYNDEP_MASK (1 << 0)
792 778
793/* Used by CM_MPU_STATICDEP, CM_SDMA_STATICDEP, CM_SDMA_STATICDEP_RESTORE */ 779/* Used by CM_MPU_STATICDEP, CM_SDMA_STATICDEP */
794#define OMAP4430_DUCATI_STATDEP_SHIFT 0 780#define OMAP4430_DUCATI_STATDEP_SHIFT 0
795#define OMAP4430_DUCATI_STATDEP_MASK (1 << 0) 781#define OMAP4430_DUCATI_STATDEP_MASK (1 << 0)
796 782
797/* Used by CM_SHADOW_FREQ_CONFIG1, CM_SHADOW_FREQ_CONFIG1_RESTORE */ 783/* Used by CM_SHADOW_FREQ_CONFIG1 */
798#define OMAP4430_FREQ_UPDATE_SHIFT 0 784#define OMAP4430_FREQ_UPDATE_SHIFT 0
799#define OMAP4430_FREQ_UPDATE_MASK (1 << 0) 785#define OMAP4430_FREQ_UPDATE_MASK (1 << 0)
800 786
@@ -802,7 +788,7 @@
802#define OMAP4430_FUNC_SHIFT 16 788#define OMAP4430_FUNC_SHIFT 16
803#define OMAP4430_FUNC_MASK (0xfff << 16) 789#define OMAP4430_FUNC_MASK (0xfff << 16)
804 790
805/* Used by CM_L3_2_DYNAMICDEP, CM_L3_2_DYNAMICDEP_RESTORE */ 791/* Used by CM_L3_2_DYNAMICDEP */
806#define OMAP4430_GFX_DYNDEP_SHIFT 10 792#define OMAP4430_GFX_DYNDEP_SHIFT 10
807#define OMAP4430_GFX_DYNDEP_MASK (1 << 10) 793#define OMAP4430_GFX_DYNDEP_MASK (1 << 10)
808 794
@@ -810,119 +796,95 @@
810#define OMAP4430_GFX_STATDEP_SHIFT 10 796#define OMAP4430_GFX_STATDEP_SHIFT 10
811#define OMAP4430_GFX_STATDEP_MASK (1 << 10) 797#define OMAP4430_GFX_STATDEP_MASK (1 << 10)
812 798
813/* Used by CM_SHADOW_FREQ_CONFIG2, CM_SHADOW_FREQ_CONFIG2_RESTORE */ 799/* Used by CM_SHADOW_FREQ_CONFIG2 */
814#define OMAP4430_GPMC_FREQ_UPDATE_SHIFT 0 800#define OMAP4430_GPMC_FREQ_UPDATE_SHIFT 0
815#define OMAP4430_GPMC_FREQ_UPDATE_MASK (1 << 0) 801#define OMAP4430_GPMC_FREQ_UPDATE_MASK (1 << 0)
816 802
817/* 803/*
818 * Used by CM_DIV_M4_DPLL_CORE, CM_DIV_M4_DPLL_CORE_RESTORE, 804 * Used by CM_DIV_M4_DPLL_CORE, CM_DIV_M4_DPLL_DDRPHY, CM_DIV_M4_DPLL_IVA,
819 * CM_DIV_M4_DPLL_DDRPHY, CM_DIV_M4_DPLL_IVA, CM_DIV_M4_DPLL_PER 805 * CM_DIV_M4_DPLL_PER
820 */ 806 */
821#define OMAP4430_HSDIVIDER_CLKOUT1_DIV_SHIFT 0 807#define OMAP4430_HSDIVIDER_CLKOUT1_DIV_SHIFT 0
822#define OMAP4430_HSDIVIDER_CLKOUT1_DIV_MASK (0x1f << 0) 808#define OMAP4430_HSDIVIDER_CLKOUT1_DIV_MASK (0x1f << 0)
823 809
824/* 810/*
825 * Used by CM_DIV_M4_DPLL_CORE, CM_DIV_M4_DPLL_CORE_RESTORE, 811 * Used by CM_DIV_M4_DPLL_CORE, CM_DIV_M4_DPLL_DDRPHY, CM_DIV_M4_DPLL_IVA,
826 * CM_DIV_M4_DPLL_DDRPHY, CM_DIV_M4_DPLL_IVA, CM_DIV_M4_DPLL_PER 812 * CM_DIV_M4_DPLL_PER
827 */ 813 */
828#define OMAP4430_HSDIVIDER_CLKOUT1_DIVCHACK_SHIFT 5 814#define OMAP4430_HSDIVIDER_CLKOUT1_DIVCHACK_SHIFT 5
829#define OMAP4430_HSDIVIDER_CLKOUT1_DIVCHACK_MASK (1 << 5) 815#define OMAP4430_HSDIVIDER_CLKOUT1_DIVCHACK_MASK (1 << 5)
830 816
831/* 817/*
832 * Used by CM_DIV_M4_DPLL_CORE, CM_DIV_M4_DPLL_CORE_RESTORE, 818 * Used by CM_DIV_M4_DPLL_CORE, CM_DIV_M4_DPLL_DDRPHY, CM_DIV_M4_DPLL_IVA,
833 * CM_DIV_M4_DPLL_DDRPHY, CM_DIV_M4_DPLL_IVA, CM_DIV_M4_DPLL_PER 819 * CM_DIV_M4_DPLL_PER
834 */ 820 */
835#define OMAP4430_HSDIVIDER_CLKOUT1_GATE_CTRL_SHIFT 8 821#define OMAP4430_HSDIVIDER_CLKOUT1_GATE_CTRL_SHIFT 8
836#define OMAP4430_HSDIVIDER_CLKOUT1_GATE_CTRL_MASK (1 << 8) 822#define OMAP4430_HSDIVIDER_CLKOUT1_GATE_CTRL_MASK (1 << 8)
837 823
838/* 824/*
839 * Used by CM_DIV_M4_DPLL_CORE, CM_DIV_M4_DPLL_CORE_RESTORE, 825 * Used by CM_DIV_M4_DPLL_CORE, CM_DIV_M4_DPLL_DDRPHY, CM_DIV_M4_DPLL_IVA,
840 * CM_DIV_M4_DPLL_DDRPHY, CM_DIV_M4_DPLL_IVA, CM_DIV_M4_DPLL_PER 826 * CM_DIV_M4_DPLL_PER
841 */ 827 */
842#define OMAP4430_HSDIVIDER_CLKOUT1_PWDN_SHIFT 12 828#define OMAP4430_HSDIVIDER_CLKOUT1_PWDN_SHIFT 12
843#define OMAP4430_HSDIVIDER_CLKOUT1_PWDN_MASK (1 << 12) 829#define OMAP4430_HSDIVIDER_CLKOUT1_PWDN_MASK (1 << 12)
844 830
845/* 831/*
846 * Used by CM_DIV_M5_DPLL_CORE, CM_DIV_M5_DPLL_CORE_RESTORE, 832 * Used by CM_DIV_M5_DPLL_CORE, CM_DIV_M5_DPLL_DDRPHY, CM_DIV_M5_DPLL_IVA,
847 * CM_DIV_M5_DPLL_DDRPHY, CM_DIV_M5_DPLL_IVA, CM_DIV_M5_DPLL_PER 833 * CM_DIV_M5_DPLL_PER
848 */ 834 */
849#define OMAP4430_HSDIVIDER_CLKOUT2_DIV_SHIFT 0 835#define OMAP4430_HSDIVIDER_CLKOUT2_DIV_SHIFT 0
850#define OMAP4430_HSDIVIDER_CLKOUT2_DIV_MASK (0x1f << 0) 836#define OMAP4430_HSDIVIDER_CLKOUT2_DIV_MASK (0x1f << 0)
851 837
852/* 838/*
853 * Used by CM_DIV_M5_DPLL_CORE, CM_DIV_M5_DPLL_CORE_RESTORE, 839 * Used by CM_DIV_M5_DPLL_CORE, CM_DIV_M5_DPLL_DDRPHY, CM_DIV_M5_DPLL_IVA,
854 * CM_DIV_M5_DPLL_DDRPHY, CM_DIV_M5_DPLL_IVA, CM_DIV_M5_DPLL_PER 840 * CM_DIV_M5_DPLL_PER
855 */ 841 */
856#define OMAP4430_HSDIVIDER_CLKOUT2_DIVCHACK_SHIFT 5 842#define OMAP4430_HSDIVIDER_CLKOUT2_DIVCHACK_SHIFT 5
857#define OMAP4430_HSDIVIDER_CLKOUT2_DIVCHACK_MASK (1 << 5) 843#define OMAP4430_HSDIVIDER_CLKOUT2_DIVCHACK_MASK (1 << 5)
858 844
859/* 845/*
860 * Used by CM_DIV_M5_DPLL_CORE, CM_DIV_M5_DPLL_CORE_RESTORE, 846 * Used by CM_DIV_M5_DPLL_CORE, CM_DIV_M5_DPLL_DDRPHY, CM_DIV_M5_DPLL_IVA,
861 * CM_DIV_M5_DPLL_DDRPHY, CM_DIV_M5_DPLL_IVA, CM_DIV_M5_DPLL_PER 847 * CM_DIV_M5_DPLL_PER
862 */ 848 */
863#define OMAP4430_HSDIVIDER_CLKOUT2_GATE_CTRL_SHIFT 8 849#define OMAP4430_HSDIVIDER_CLKOUT2_GATE_CTRL_SHIFT 8
864#define OMAP4430_HSDIVIDER_CLKOUT2_GATE_CTRL_MASK (1 << 8) 850#define OMAP4430_HSDIVIDER_CLKOUT2_GATE_CTRL_MASK (1 << 8)
865 851
866/* 852/*
867 * Used by CM_DIV_M5_DPLL_CORE, CM_DIV_M5_DPLL_CORE_RESTORE, 853 * Used by CM_DIV_M5_DPLL_CORE, CM_DIV_M5_DPLL_DDRPHY, CM_DIV_M5_DPLL_IVA,
868 * CM_DIV_M5_DPLL_DDRPHY, CM_DIV_M5_DPLL_IVA, CM_DIV_M5_DPLL_PER 854 * CM_DIV_M5_DPLL_PER
869 */ 855 */
870#define OMAP4430_HSDIVIDER_CLKOUT2_PWDN_SHIFT 12 856#define OMAP4430_HSDIVIDER_CLKOUT2_PWDN_SHIFT 12
871#define OMAP4430_HSDIVIDER_CLKOUT2_PWDN_MASK (1 << 12) 857#define OMAP4430_HSDIVIDER_CLKOUT2_PWDN_MASK (1 << 12)
872 858
873/* 859/* Used by CM_DIV_M6_DPLL_CORE, CM_DIV_M6_DPLL_DDRPHY, CM_DIV_M6_DPLL_PER */
874 * Used by CM_DIV_M6_DPLL_CORE, CM_DIV_M6_DPLL_CORE_RESTORE,
875 * CM_DIV_M6_DPLL_DDRPHY, CM_DIV_M6_DPLL_PER
876 */
877#define OMAP4430_HSDIVIDER_CLKOUT3_DIV_SHIFT 0 860#define OMAP4430_HSDIVIDER_CLKOUT3_DIV_SHIFT 0
878#define OMAP4430_HSDIVIDER_CLKOUT3_DIV_MASK (0x1f << 0) 861#define OMAP4430_HSDIVIDER_CLKOUT3_DIV_MASK (0x1f << 0)
879 862
880/* 863/* Used by CM_DIV_M6_DPLL_CORE, CM_DIV_M6_DPLL_DDRPHY, CM_DIV_M6_DPLL_PER */
881 * Used by CM_DIV_M6_DPLL_CORE, CM_DIV_M6_DPLL_CORE_RESTORE,
882 * CM_DIV_M6_DPLL_DDRPHY, CM_DIV_M6_DPLL_PER
883 */
884#define OMAP4430_HSDIVIDER_CLKOUT3_DIVCHACK_SHIFT 5 864#define OMAP4430_HSDIVIDER_CLKOUT3_DIVCHACK_SHIFT 5
885#define OMAP4430_HSDIVIDER_CLKOUT3_DIVCHACK_MASK (1 << 5) 865#define OMAP4430_HSDIVIDER_CLKOUT3_DIVCHACK_MASK (1 << 5)
886 866
887/* 867/* Used by CM_DIV_M6_DPLL_CORE, CM_DIV_M6_DPLL_DDRPHY, CM_DIV_M6_DPLL_PER */
888 * Used by CM_DIV_M6_DPLL_CORE, CM_DIV_M6_DPLL_CORE_RESTORE,
889 * CM_DIV_M6_DPLL_DDRPHY, CM_DIV_M6_DPLL_PER
890 */
891#define OMAP4430_HSDIVIDER_CLKOUT3_GATE_CTRL_SHIFT 8 868#define OMAP4430_HSDIVIDER_CLKOUT3_GATE_CTRL_SHIFT 8
892#define OMAP4430_HSDIVIDER_CLKOUT3_GATE_CTRL_MASK (1 << 8) 869#define OMAP4430_HSDIVIDER_CLKOUT3_GATE_CTRL_MASK (1 << 8)
893 870
894/* 871/* Used by CM_DIV_M6_DPLL_CORE, CM_DIV_M6_DPLL_DDRPHY, CM_DIV_M6_DPLL_PER */
895 * Used by CM_DIV_M6_DPLL_CORE, CM_DIV_M6_DPLL_CORE_RESTORE,
896 * CM_DIV_M6_DPLL_DDRPHY, CM_DIV_M6_DPLL_PER
897 */
898#define OMAP4430_HSDIVIDER_CLKOUT3_PWDN_SHIFT 12 872#define OMAP4430_HSDIVIDER_CLKOUT3_PWDN_SHIFT 12
899#define OMAP4430_HSDIVIDER_CLKOUT3_PWDN_MASK (1 << 12) 873#define OMAP4430_HSDIVIDER_CLKOUT3_PWDN_MASK (1 << 12)
900 874
901/* 875/* Used by CM_DIV_M7_DPLL_CORE, CM_DIV_M7_DPLL_PER */
902 * Used by CM_DIV_M7_DPLL_CORE, CM_DIV_M7_DPLL_CORE_RESTORE,
903 * CM_DIV_M7_DPLL_PER
904 */
905#define OMAP4430_HSDIVIDER_CLKOUT4_DIV_SHIFT 0 876#define OMAP4430_HSDIVIDER_CLKOUT4_DIV_SHIFT 0
906#define OMAP4430_HSDIVIDER_CLKOUT4_DIV_MASK (0x1f << 0) 877#define OMAP4430_HSDIVIDER_CLKOUT4_DIV_MASK (0x1f << 0)
907 878
908/* 879/* Used by CM_DIV_M7_DPLL_CORE, CM_DIV_M7_DPLL_PER */
909 * Used by CM_DIV_M7_DPLL_CORE, CM_DIV_M7_DPLL_CORE_RESTORE,
910 * CM_DIV_M7_DPLL_PER
911 */
912#define OMAP4430_HSDIVIDER_CLKOUT4_DIVCHACK_SHIFT 5 880#define OMAP4430_HSDIVIDER_CLKOUT4_DIVCHACK_SHIFT 5
913#define OMAP4430_HSDIVIDER_CLKOUT4_DIVCHACK_MASK (1 << 5) 881#define OMAP4430_HSDIVIDER_CLKOUT4_DIVCHACK_MASK (1 << 5)
914 882
915/* 883/* Used by CM_DIV_M7_DPLL_CORE, CM_DIV_M7_DPLL_PER */
916 * Used by CM_DIV_M7_DPLL_CORE, CM_DIV_M7_DPLL_CORE_RESTORE,
917 * CM_DIV_M7_DPLL_PER
918 */
919#define OMAP4430_HSDIVIDER_CLKOUT4_GATE_CTRL_SHIFT 8 884#define OMAP4430_HSDIVIDER_CLKOUT4_GATE_CTRL_SHIFT 8
920#define OMAP4430_HSDIVIDER_CLKOUT4_GATE_CTRL_MASK (1 << 8) 885#define OMAP4430_HSDIVIDER_CLKOUT4_GATE_CTRL_MASK (1 << 8)
921 886
922/* 887/* Used by CM_DIV_M7_DPLL_CORE, CM_DIV_M7_DPLL_PER */
923 * Used by CM_DIV_M7_DPLL_CORE, CM_DIV_M7_DPLL_CORE_RESTORE,
924 * CM_DIV_M7_DPLL_PER
925 */
926#define OMAP4430_HSDIVIDER_CLKOUT4_PWDN_SHIFT 12 888#define OMAP4430_HSDIVIDER_CLKOUT4_PWDN_SHIFT 12
927#define OMAP4430_HSDIVIDER_CLKOUT4_PWDN_MASK (1 << 12) 889#define OMAP4430_HSDIVIDER_CLKOUT4_PWDN_MASK (1 << 12)
928 890
@@ -934,8 +896,7 @@
934 * CM1_ABE_TIMER8_CLKCTRL, CM1_ABE_WDT3_CLKCTRL, CM_ALWON_MDMINTC_CLKCTRL, 896 * CM1_ABE_TIMER8_CLKCTRL, CM1_ABE_WDT3_CLKCTRL, CM_ALWON_MDMINTC_CLKCTRL,
935 * CM_ALWON_SR_CORE_CLKCTRL, CM_ALWON_SR_IVA_CLKCTRL, CM_ALWON_SR_MPU_CLKCTRL, 897 * CM_ALWON_SR_CORE_CLKCTRL, CM_ALWON_SR_IVA_CLKCTRL, CM_ALWON_SR_MPU_CLKCTRL,
936 * CM_CAM_FDIF_CLKCTRL, CM_CAM_ISS_CLKCTRL, CM_CEFUSE_CEFUSE_CLKCTRL, 898 * CM_CAM_FDIF_CLKCTRL, CM_CAM_ISS_CLKCTRL, CM_CEFUSE_CEFUSE_CLKCTRL,
937 * CM_CM1_PROFILING_CLKCTRL, CM_CM1_PROFILING_CLKCTRL_RESTORE, 899 * CM_CM1_PROFILING_CLKCTRL, CM_CM2_PROFILING_CLKCTRL,
938 * CM_CM2_PROFILING_CLKCTRL, CM_CM2_PROFILING_CLKCTRL_RESTORE,
939 * CM_D2D_MODEM_ICR_CLKCTRL, CM_D2D_SAD2D_CLKCTRL, CM_D2D_SAD2D_FW_CLKCTRL, 900 * CM_D2D_MODEM_ICR_CLKCTRL, CM_D2D_SAD2D_CLKCTRL, CM_D2D_SAD2D_FW_CLKCTRL,
940 * CM_DSS_DEISS_CLKCTRL, CM_DSS_DSS_CLKCTRL, CM_DUCATI_DUCATI_CLKCTRL, 901 * CM_DSS_DEISS_CLKCTRL, CM_DSS_DSS_CLKCTRL, CM_DUCATI_DUCATI_CLKCTRL,
941 * CM_EMU_DEBUGSS_CLKCTRL, CM_GFX_GFX_CLKCTRL, CM_IVAHD_IVAHD_CLKCTRL, 902 * CM_EMU_DEBUGSS_CLKCTRL, CM_GFX_GFX_CLKCTRL, CM_IVAHD_IVAHD_CLKCTRL,
@@ -944,30 +905,24 @@
944 * CM_L3INIT_MMC6_CLKCTRL, CM_L3INIT_P1500_CLKCTRL, CM_L3INIT_PCIESS_CLKCTRL, 905 * CM_L3INIT_MMC6_CLKCTRL, CM_L3INIT_P1500_CLKCTRL, CM_L3INIT_PCIESS_CLKCTRL,
945 * CM_L3INIT_SATA_CLKCTRL, CM_L3INIT_TPPSS_CLKCTRL, CM_L3INIT_UNIPRO1_CLKCTRL, 906 * CM_L3INIT_SATA_CLKCTRL, CM_L3INIT_TPPSS_CLKCTRL, CM_L3INIT_UNIPRO1_CLKCTRL,
946 * CM_L3INIT_USBPHYOCP2SCP_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL, 907 * CM_L3INIT_USBPHYOCP2SCP_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL,
947 * CM_L3INIT_USB_HOST_CLKCTRL_RESTORE, CM_L3INIT_USB_HOST_FS_CLKCTRL, 908 * CM_L3INIT_USB_HOST_FS_CLKCTRL, CM_L3INIT_USB_OTG_CLKCTRL,
948 * CM_L3INIT_USB_OTG_CLKCTRL, CM_L3INIT_USB_TLL_CLKCTRL, 909 * CM_L3INIT_USB_TLL_CLKCTRL, CM_L3INIT_XHPI_CLKCTRL, CM_L3INSTR_L3_3_CLKCTRL,
949 * CM_L3INIT_USB_TLL_CLKCTRL_RESTORE, CM_L3INIT_XHPI_CLKCTRL, 910 * CM_L3INSTR_L3_INSTR_CLKCTRL, CM_L3INSTR_OCP_WP1_CLKCTRL,
950 * CM_L3INSTR_L3_3_CLKCTRL, CM_L3INSTR_L3_3_CLKCTRL_RESTORE,
951 * CM_L3INSTR_L3_INSTR_CLKCTRL, CM_L3INSTR_L3_INSTR_CLKCTRL_RESTORE,
952 * CM_L3INSTR_OCP_WP1_CLKCTRL, CM_L3INSTR_OCP_WP1_CLKCTRL_RESTORE,
953 * CM_L3_1_L3_1_CLKCTRL, CM_L3_2_GPMC_CLKCTRL, CM_L3_2_L3_2_CLKCTRL, 911 * CM_L3_1_L3_1_CLKCTRL, CM_L3_2_GPMC_CLKCTRL, CM_L3_2_L3_2_CLKCTRL,
954 * CM_L3_2_OCMC_RAM_CLKCTRL, CM_L4CFG_HW_SEM_CLKCTRL, CM_L4CFG_L4_CFG_CLKCTRL, 912 * CM_L3_2_OCMC_RAM_CLKCTRL, CM_L4CFG_HW_SEM_CLKCTRL, CM_L4CFG_L4_CFG_CLKCTRL,
955 * CM_L4CFG_MAILBOX_CLKCTRL, CM_L4CFG_SAR_ROM_CLKCTRL, CM_L4PER_ADC_CLKCTRL, 913 * CM_L4CFG_MAILBOX_CLKCTRL, CM_L4CFG_SAR_ROM_CLKCTRL, CM_L4PER_ADC_CLKCTRL,
956 * CM_L4PER_DMTIMER10_CLKCTRL, CM_L4PER_DMTIMER11_CLKCTRL, 914 * CM_L4PER_DMTIMER10_CLKCTRL, CM_L4PER_DMTIMER11_CLKCTRL,
957 * CM_L4PER_DMTIMER2_CLKCTRL, CM_L4PER_DMTIMER3_CLKCTRL, 915 * CM_L4PER_DMTIMER2_CLKCTRL, CM_L4PER_DMTIMER3_CLKCTRL,
958 * CM_L4PER_DMTIMER4_CLKCTRL, CM_L4PER_DMTIMER9_CLKCTRL, CM_L4PER_ELM_CLKCTRL, 916 * CM_L4PER_DMTIMER4_CLKCTRL, CM_L4PER_DMTIMER9_CLKCTRL, CM_L4PER_ELM_CLKCTRL,
959 * CM_L4PER_GPIO2_CLKCTRL, CM_L4PER_GPIO2_CLKCTRL_RESTORE, 917 * CM_L4PER_GPIO2_CLKCTRL, CM_L4PER_GPIO3_CLKCTRL, CM_L4PER_GPIO4_CLKCTRL,
960 * CM_L4PER_GPIO3_CLKCTRL, CM_L4PER_GPIO3_CLKCTRL_RESTORE, 918 * CM_L4PER_GPIO5_CLKCTRL, CM_L4PER_GPIO6_CLKCTRL, CM_L4PER_HDQ1W_CLKCTRL,
961 * CM_L4PER_GPIO4_CLKCTRL, CM_L4PER_GPIO4_CLKCTRL_RESTORE, 919 * CM_L4PER_HECC1_CLKCTRL, CM_L4PER_HECC2_CLKCTRL, CM_L4PER_I2C1_CLKCTRL,
962 * CM_L4PER_GPIO5_CLKCTRL, CM_L4PER_GPIO5_CLKCTRL_RESTORE, 920 * CM_L4PER_I2C2_CLKCTRL, CM_L4PER_I2C3_CLKCTRL, CM_L4PER_I2C4_CLKCTRL,
963 * CM_L4PER_GPIO6_CLKCTRL, CM_L4PER_GPIO6_CLKCTRL_RESTORE, 921 * CM_L4PER_I2C5_CLKCTRL, CM_L4PER_L4PER_CLKCTRL, CM_L4PER_MCASP2_CLKCTRL,
964 * CM_L4PER_HDQ1W_CLKCTRL, CM_L4PER_HECC1_CLKCTRL, CM_L4PER_HECC2_CLKCTRL, 922 * CM_L4PER_MCASP3_CLKCTRL, CM_L4PER_MCBSP4_CLKCTRL, CM_L4PER_MCSPI1_CLKCTRL,
965 * CM_L4PER_I2C1_CLKCTRL, CM_L4PER_I2C2_CLKCTRL, CM_L4PER_I2C3_CLKCTRL, 923 * CM_L4PER_MCSPI2_CLKCTRL, CM_L4PER_MCSPI3_CLKCTRL, CM_L4PER_MCSPI4_CLKCTRL,
966 * CM_L4PER_I2C4_CLKCTRL, CM_L4PER_I2C5_CLKCTRL, CM_L4PER_L4PER_CLKCTRL, 924 * CM_L4PER_MGATE_CLKCTRL, CM_L4PER_MMCSD3_CLKCTRL, CM_L4PER_MMCSD4_CLKCTRL,
967 * CM_L4PER_MCASP2_CLKCTRL, CM_L4PER_MCASP3_CLKCTRL, CM_L4PER_MCBSP4_CLKCTRL, 925 * CM_L4PER_MMCSD5_CLKCTRL, CM_L4PER_MSPROHG_CLKCTRL,
968 * CM_L4PER_MCSPI1_CLKCTRL, CM_L4PER_MCSPI2_CLKCTRL, CM_L4PER_MCSPI3_CLKCTRL,
969 * CM_L4PER_MCSPI4_CLKCTRL, CM_L4PER_MGATE_CLKCTRL, CM_L4PER_MMCSD3_CLKCTRL,
970 * CM_L4PER_MMCSD4_CLKCTRL, CM_L4PER_MMCSD5_CLKCTRL, CM_L4PER_MSPROHG_CLKCTRL,
971 * CM_L4PER_SLIMBUS2_CLKCTRL, CM_L4PER_UART1_CLKCTRL, CM_L4PER_UART2_CLKCTRL, 926 * CM_L4PER_SLIMBUS2_CLKCTRL, CM_L4PER_UART1_CLKCTRL, CM_L4PER_UART2_CLKCTRL,
972 * CM_L4PER_UART3_CLKCTRL, CM_L4PER_UART4_CLKCTRL, CM_L4SEC_AES1_CLKCTRL, 927 * CM_L4PER_UART3_CLKCTRL, CM_L4PER_UART4_CLKCTRL, CM_L4SEC_AES1_CLKCTRL,
973 * CM_L4SEC_AES2_CLKCTRL, CM_L4SEC_CRYPTODMA_CLKCTRL, CM_L4SEC_DES3DES_CLKCTRL, 928 * CM_L4SEC_AES2_CLKCTRL, CM_L4SEC_CRYPTODMA_CLKCTRL, CM_L4SEC_DES3DES_CLKCTRL,
@@ -983,166 +938,148 @@
983#define OMAP4430_IDLEST_SHIFT 16 938#define OMAP4430_IDLEST_SHIFT 16
984#define OMAP4430_IDLEST_MASK (0x3 << 16) 939#define OMAP4430_IDLEST_MASK (0x3 << 16)
985 940
986/* 941/* Used by CM_DUCATI_DYNAMICDEP, CM_L3_2_DYNAMICDEP, CM_L4CFG_DYNAMICDEP */
987 * Used by CM_DUCATI_DYNAMICDEP, CM_L3_2_DYNAMICDEP,
988 * CM_L3_2_DYNAMICDEP_RESTORE, CM_L4CFG_DYNAMICDEP, CM_L4CFG_DYNAMICDEP_RESTORE
989 */
990#define OMAP4430_ISS_DYNDEP_SHIFT 9 942#define OMAP4430_ISS_DYNDEP_SHIFT 9
991#define OMAP4430_ISS_DYNDEP_MASK (1 << 9) 943#define OMAP4430_ISS_DYNDEP_MASK (1 << 9)
992 944
993/* 945/*
994 * Used by CM_DUCATI_STATICDEP, CM_MPU_STATICDEP, CM_SDMA_STATICDEP, 946 * Used by CM_DUCATI_STATICDEP, CM_MPU_STATICDEP, CM_SDMA_STATICDEP,
995 * CM_SDMA_STATICDEP_RESTORE, CM_TESLA_STATICDEP 947 * CM_TESLA_STATICDEP
996 */ 948 */
997#define OMAP4430_ISS_STATDEP_SHIFT 9 949#define OMAP4430_ISS_STATDEP_SHIFT 9
998#define OMAP4430_ISS_STATDEP_MASK (1 << 9) 950#define OMAP4430_ISS_STATDEP_MASK (1 << 9)
999 951
1000/* Used by CM_L3_2_DYNAMICDEP, CM_L3_2_DYNAMICDEP_RESTORE, CM_TESLA_DYNAMICDEP */ 952/* Used by CM_L3_2_DYNAMICDEP, CM_TESLA_DYNAMICDEP */
1001#define OMAP4430_IVAHD_DYNDEP_SHIFT 2 953#define OMAP4430_IVAHD_DYNDEP_SHIFT 2
1002#define OMAP4430_IVAHD_DYNDEP_MASK (1 << 2) 954#define OMAP4430_IVAHD_DYNDEP_MASK (1 << 2)
1003 955
1004/* 956/*
1005 * Used by CM_CAM_STATICDEP, CM_D2D_STATICDEP, CM_D2D_STATICDEP_RESTORE, 957 * Used by CM_CAM_STATICDEP, CM_D2D_STATICDEP, CM_DSS_STATICDEP,
1006 * CM_DSS_STATICDEP, CM_DUCATI_STATICDEP, CM_GFX_STATICDEP, 958 * CM_DUCATI_STATICDEP, CM_GFX_STATICDEP, CM_L3INIT_STATICDEP,
1007 * CM_L3INIT_STATICDEP, CM_MPU_STATICDEP, CM_SDMA_STATICDEP, 959 * CM_MPU_STATICDEP, CM_SDMA_STATICDEP, CM_TESLA_STATICDEP
1008 * CM_SDMA_STATICDEP_RESTORE, CM_TESLA_STATICDEP
1009 */ 960 */
1010#define OMAP4430_IVAHD_STATDEP_SHIFT 2 961#define OMAP4430_IVAHD_STATDEP_SHIFT 2
1011#define OMAP4430_IVAHD_STATDEP_MASK (1 << 2) 962#define OMAP4430_IVAHD_STATDEP_MASK (1 << 2)
1012 963
1013/* 964/* Used by CM_L3_2_DYNAMICDEP, CM_L4CFG_DYNAMICDEP, CM_L4PER_DYNAMICDEP */
1014 * Used by CM_L3_2_DYNAMICDEP, CM_L3_2_DYNAMICDEP_RESTORE, CM_L4CFG_DYNAMICDEP,
1015 * CM_L4CFG_DYNAMICDEP_RESTORE, CM_L4PER_DYNAMICDEP, CM_L4PER_DYNAMICDEP_RESTORE
1016 */
1017#define OMAP4430_L3INIT_DYNDEP_SHIFT 7 965#define OMAP4430_L3INIT_DYNDEP_SHIFT 7
1018#define OMAP4430_L3INIT_DYNDEP_MASK (1 << 7) 966#define OMAP4430_L3INIT_DYNDEP_MASK (1 << 7)
1019 967
1020/* 968/*
1021 * Used by CM_D2D_STATICDEP, CM_D2D_STATICDEP_RESTORE, CM_DUCATI_STATICDEP, 969 * Used by CM_D2D_STATICDEP, CM_DUCATI_STATICDEP, CM_MPU_STATICDEP,
1022 * CM_MPU_STATICDEP, CM_SDMA_STATICDEP, CM_SDMA_STATICDEP_RESTORE, 970 * CM_SDMA_STATICDEP, CM_TESLA_STATICDEP
1023 * CM_TESLA_STATICDEP
1024 */ 971 */
1025#define OMAP4430_L3INIT_STATDEP_SHIFT 7 972#define OMAP4430_L3INIT_STATDEP_SHIFT 7
1026#define OMAP4430_L3INIT_STATDEP_MASK (1 << 7) 973#define OMAP4430_L3INIT_STATDEP_MASK (1 << 7)
1027 974
1028/* 975/*
1029 * Used by CM_DSS_DYNAMICDEP, CM_L3INIT_DYNAMICDEP, CM_L3_2_DYNAMICDEP, 976 * Used by CM_DSS_DYNAMICDEP, CM_L3INIT_DYNAMICDEP, CM_L3_2_DYNAMICDEP,
1030 * CM_L3_2_DYNAMICDEP_RESTORE, CM_L4CFG_DYNAMICDEP, 977 * CM_L4CFG_DYNAMICDEP, CM_MPU_DYNAMICDEP, CM_TESLA_DYNAMICDEP
1031 * CM_L4CFG_DYNAMICDEP_RESTORE, CM_MPU_DYNAMICDEP, CM_TESLA_DYNAMICDEP
1032 */ 978 */
1033#define OMAP4430_L3_1_DYNDEP_SHIFT 5 979#define OMAP4430_L3_1_DYNDEP_SHIFT 5
1034#define OMAP4430_L3_1_DYNDEP_MASK (1 << 5) 980#define OMAP4430_L3_1_DYNDEP_MASK (1 << 5)
1035 981
1036/* 982/*
1037 * Used by CM_CAM_STATICDEP, CM_D2D_STATICDEP, CM_D2D_STATICDEP_RESTORE, 983 * Used by CM_CAM_STATICDEP, CM_D2D_STATICDEP, CM_DSS_STATICDEP,
1038 * CM_DSS_STATICDEP, CM_DUCATI_STATICDEP, CM_GFX_STATICDEP, CM_IVAHD_STATICDEP, 984 * CM_DUCATI_STATICDEP, CM_GFX_STATICDEP, CM_IVAHD_STATICDEP,
1039 * CM_L3INIT_STATICDEP, CM_L4SEC_STATICDEP, CM_MPU_STATICDEP, 985 * CM_L3INIT_STATICDEP, CM_L4SEC_STATICDEP, CM_MPU_STATICDEP,
1040 * CM_SDMA_STATICDEP, CM_SDMA_STATICDEP_RESTORE, CM_TESLA_STATICDEP 986 * CM_SDMA_STATICDEP, CM_TESLA_STATICDEP
1041 */ 987 */
1042#define OMAP4430_L3_1_STATDEP_SHIFT 5 988#define OMAP4430_L3_1_STATDEP_SHIFT 5
1043#define OMAP4430_L3_1_STATDEP_MASK (1 << 5) 989#define OMAP4430_L3_1_STATDEP_MASK (1 << 5)
1044 990
1045/* 991/*
1046 * Used by CM_CAM_DYNAMICDEP, CM_D2D_DYNAMICDEP, CM_D2D_DYNAMICDEP_RESTORE, 992 * Used by CM_CAM_DYNAMICDEP, CM_D2D_DYNAMICDEP, CM_DUCATI_DYNAMICDEP,
1047 * CM_DUCATI_DYNAMICDEP, CM_EMU_DYNAMICDEP, CM_GFX_DYNAMICDEP, 993 * CM_EMU_DYNAMICDEP, CM_GFX_DYNAMICDEP, CM_IVAHD_DYNAMICDEP,
1048 * CM_IVAHD_DYNAMICDEP, CM_L3INIT_DYNAMICDEP, CM_L3_1_DYNAMICDEP, 994 * CM_L3INIT_DYNAMICDEP, CM_L3_1_DYNAMICDEP, CM_L4CFG_DYNAMICDEP,
1049 * CM_L3_1_DYNAMICDEP_RESTORE, CM_L4CFG_DYNAMICDEP, 995 * CM_L4SEC_DYNAMICDEP, CM_SDMA_DYNAMICDEP
1050 * CM_L4CFG_DYNAMICDEP_RESTORE, CM_L4SEC_DYNAMICDEP, CM_SDMA_DYNAMICDEP
1051 */ 996 */
1052#define OMAP4430_L3_2_DYNDEP_SHIFT 6 997#define OMAP4430_L3_2_DYNDEP_SHIFT 6
1053#define OMAP4430_L3_2_DYNDEP_MASK (1 << 6) 998#define OMAP4430_L3_2_DYNDEP_MASK (1 << 6)
1054 999
1055/* 1000/*
1056 * Used by CM_CAM_STATICDEP, CM_D2D_STATICDEP, CM_D2D_STATICDEP_RESTORE, 1001 * Used by CM_CAM_STATICDEP, CM_D2D_STATICDEP, CM_DSS_STATICDEP,
1057 * CM_DSS_STATICDEP, CM_DUCATI_STATICDEP, CM_GFX_STATICDEP, CM_IVAHD_STATICDEP, 1002 * CM_DUCATI_STATICDEP, CM_GFX_STATICDEP, CM_IVAHD_STATICDEP,
1058 * CM_L3INIT_STATICDEP, CM_L4SEC_STATICDEP, CM_MPU_STATICDEP, 1003 * CM_L3INIT_STATICDEP, CM_L4SEC_STATICDEP, CM_MPU_STATICDEP,
1059 * CM_SDMA_STATICDEP, CM_SDMA_STATICDEP_RESTORE, CM_TESLA_STATICDEP 1004 * CM_SDMA_STATICDEP, CM_TESLA_STATICDEP
1060 */ 1005 */
1061#define OMAP4430_L3_2_STATDEP_SHIFT 6 1006#define OMAP4430_L3_2_STATDEP_SHIFT 6
1062#define OMAP4430_L3_2_STATDEP_MASK (1 << 6) 1007#define OMAP4430_L3_2_STATDEP_MASK (1 << 6)
1063 1008
1064/* Used by CM_L3_1_DYNAMICDEP, CM_L3_1_DYNAMICDEP_RESTORE */ 1009/* Used by CM_L3_1_DYNAMICDEP */
1065#define OMAP4430_L4CFG_DYNDEP_SHIFT 12 1010#define OMAP4430_L4CFG_DYNDEP_SHIFT 12
1066#define OMAP4430_L4CFG_DYNDEP_MASK (1 << 12) 1011#define OMAP4430_L4CFG_DYNDEP_MASK (1 << 12)
1067 1012
1068/* 1013/*
1069 * Used by CM_D2D_STATICDEP, CM_D2D_STATICDEP_RESTORE, CM_DUCATI_STATICDEP, 1014 * Used by CM_D2D_STATICDEP, CM_DUCATI_STATICDEP, CM_L3INIT_STATICDEP,
1070 * CM_L3INIT_STATICDEP, CM_MPU_STATICDEP, CM_SDMA_STATICDEP, 1015 * CM_MPU_STATICDEP, CM_SDMA_STATICDEP, CM_TESLA_STATICDEP
1071 * CM_SDMA_STATICDEP_RESTORE, CM_TESLA_STATICDEP
1072 */ 1016 */
1073#define OMAP4430_L4CFG_STATDEP_SHIFT 12 1017#define OMAP4430_L4CFG_STATDEP_SHIFT 12
1074#define OMAP4430_L4CFG_STATDEP_MASK (1 << 12) 1018#define OMAP4430_L4CFG_STATDEP_MASK (1 << 12)
1075 1019
1076/* Used by CM_L3_2_DYNAMICDEP, CM_L3_2_DYNAMICDEP_RESTORE */ 1020/* Used by CM_L3_2_DYNAMICDEP */
1077#define OMAP4430_L4PER_DYNDEP_SHIFT 13 1021#define OMAP4430_L4PER_DYNDEP_SHIFT 13
1078#define OMAP4430_L4PER_DYNDEP_MASK (1 << 13) 1022#define OMAP4430_L4PER_DYNDEP_MASK (1 << 13)
1079 1023
1080/* 1024/*
1081 * Used by CM_D2D_STATICDEP, CM_D2D_STATICDEP_RESTORE, CM_DUCATI_STATICDEP, 1025 * Used by CM_D2D_STATICDEP, CM_DUCATI_STATICDEP, CM_L3INIT_STATICDEP,
1082 * CM_L3INIT_STATICDEP, CM_L4SEC_STATICDEP, CM_MPU_STATICDEP, 1026 * CM_L4SEC_STATICDEP, CM_MPU_STATICDEP, CM_SDMA_STATICDEP, CM_TESLA_STATICDEP
1083 * CM_SDMA_STATICDEP, CM_SDMA_STATICDEP_RESTORE, CM_TESLA_STATICDEP
1084 */ 1027 */
1085#define OMAP4430_L4PER_STATDEP_SHIFT 13 1028#define OMAP4430_L4PER_STATDEP_SHIFT 13
1086#define OMAP4430_L4PER_STATDEP_MASK (1 << 13) 1029#define OMAP4430_L4PER_STATDEP_MASK (1 << 13)
1087 1030
1088/* 1031/* Used by CM_L3_2_DYNAMICDEP, CM_L4PER_DYNAMICDEP */
1089 * Used by CM_L3_2_DYNAMICDEP, CM_L3_2_DYNAMICDEP_RESTORE, CM_L4PER_DYNAMICDEP,
1090 * CM_L4PER_DYNAMICDEP_RESTORE
1091 */
1092#define OMAP4430_L4SEC_DYNDEP_SHIFT 14 1032#define OMAP4430_L4SEC_DYNDEP_SHIFT 14
1093#define OMAP4430_L4SEC_DYNDEP_MASK (1 << 14) 1033#define OMAP4430_L4SEC_DYNDEP_MASK (1 << 14)
1094 1034
1095/* 1035/*
1096 * Used by CM_DUCATI_STATICDEP, CM_L3INIT_STATICDEP, CM_MPU_STATICDEP, 1036 * Used by CM_DUCATI_STATICDEP, CM_L3INIT_STATICDEP, CM_MPU_STATICDEP,
1097 * CM_SDMA_STATICDEP, CM_SDMA_STATICDEP_RESTORE 1037 * CM_SDMA_STATICDEP
1098 */ 1038 */
1099#define OMAP4430_L4SEC_STATDEP_SHIFT 14 1039#define OMAP4430_L4SEC_STATDEP_SHIFT 14
1100#define OMAP4430_L4SEC_STATDEP_MASK (1 << 14) 1040#define OMAP4430_L4SEC_STATDEP_MASK (1 << 14)
1101 1041
1102/* Used by CM_L4CFG_DYNAMICDEP, CM_L4CFG_DYNAMICDEP_RESTORE */ 1042/* Used by CM_L4CFG_DYNAMICDEP */
1103#define OMAP4430_L4WKUP_DYNDEP_SHIFT 15 1043#define OMAP4430_L4WKUP_DYNDEP_SHIFT 15
1104#define OMAP4430_L4WKUP_DYNDEP_MASK (1 << 15) 1044#define OMAP4430_L4WKUP_DYNDEP_MASK (1 << 15)
1105 1045
1106/* 1046/*
1107 * Used by CM_DUCATI_STATICDEP, CM_L3INIT_STATICDEP, CM_MPU_STATICDEP, 1047 * Used by CM_DUCATI_STATICDEP, CM_L3INIT_STATICDEP, CM_MPU_STATICDEP,
1108 * CM_SDMA_STATICDEP, CM_SDMA_STATICDEP_RESTORE, CM_TESLA_STATICDEP 1048 * CM_SDMA_STATICDEP, CM_TESLA_STATICDEP
1109 */ 1049 */
1110#define OMAP4430_L4WKUP_STATDEP_SHIFT 15 1050#define OMAP4430_L4WKUP_STATDEP_SHIFT 15
1111#define OMAP4430_L4WKUP_STATDEP_MASK (1 << 15) 1051#define OMAP4430_L4WKUP_STATDEP_MASK (1 << 15)
1112 1052
1113/* 1053/*
1114 * Used by CM_D2D_DYNAMICDEP, CM_D2D_DYNAMICDEP_RESTORE, CM_L3_1_DYNAMICDEP, 1054 * Used by CM_D2D_DYNAMICDEP, CM_L3_1_DYNAMICDEP, CM_L4CFG_DYNAMICDEP,
1115 * CM_L3_1_DYNAMICDEP_RESTORE, CM_L4CFG_DYNAMICDEP, 1055 * CM_MPU_DYNAMICDEP
1116 * CM_L4CFG_DYNAMICDEP_RESTORE, CM_MPU_DYNAMICDEP
1117 */ 1056 */
1118#define OMAP4430_MEMIF_DYNDEP_SHIFT 4 1057#define OMAP4430_MEMIF_DYNDEP_SHIFT 4
1119#define OMAP4430_MEMIF_DYNDEP_MASK (1 << 4) 1058#define OMAP4430_MEMIF_DYNDEP_MASK (1 << 4)
1120 1059
1121/* 1060/*
1122 * Used by CM_CAM_STATICDEP, CM_D2D_STATICDEP, CM_D2D_STATICDEP_RESTORE, 1061 * Used by CM_CAM_STATICDEP, CM_D2D_STATICDEP, CM_DSS_STATICDEP,
1123 * CM_DSS_STATICDEP, CM_DUCATI_STATICDEP, CM_GFX_STATICDEP, CM_IVAHD_STATICDEP, 1062 * CM_DUCATI_STATICDEP, CM_GFX_STATICDEP, CM_IVAHD_STATICDEP,
1124 * CM_L3INIT_STATICDEP, CM_L4SEC_STATICDEP, CM_MPU_STATICDEP, 1063 * CM_L3INIT_STATICDEP, CM_L4SEC_STATICDEP, CM_MPU_STATICDEP,
1125 * CM_SDMA_STATICDEP, CM_SDMA_STATICDEP_RESTORE, CM_TESLA_STATICDEP 1064 * CM_SDMA_STATICDEP, CM_TESLA_STATICDEP
1126 */ 1065 */
1127#define OMAP4430_MEMIF_STATDEP_SHIFT 4 1066#define OMAP4430_MEMIF_STATDEP_SHIFT 4
1128#define OMAP4430_MEMIF_STATDEP_MASK (1 << 4) 1067#define OMAP4430_MEMIF_STATDEP_MASK (1 << 4)
1129 1068
1130/* 1069/*
1131 * Used by CM_SSC_MODFREQDIV_DPLL_ABE, CM_SSC_MODFREQDIV_DPLL_CORE, 1070 * Used by CM_SSC_MODFREQDIV_DPLL_ABE, CM_SSC_MODFREQDIV_DPLL_CORE,
1132 * CM_SSC_MODFREQDIV_DPLL_CORE_RESTORE, CM_SSC_MODFREQDIV_DPLL_DDRPHY, 1071 * CM_SSC_MODFREQDIV_DPLL_DDRPHY, CM_SSC_MODFREQDIV_DPLL_IVA,
1133 * CM_SSC_MODFREQDIV_DPLL_IVA, CM_SSC_MODFREQDIV_DPLL_MPU, 1072 * CM_SSC_MODFREQDIV_DPLL_MPU, CM_SSC_MODFREQDIV_DPLL_PER,
1134 * CM_SSC_MODFREQDIV_DPLL_PER, CM_SSC_MODFREQDIV_DPLL_UNIPRO, 1073 * CM_SSC_MODFREQDIV_DPLL_UNIPRO, CM_SSC_MODFREQDIV_DPLL_USB
1135 * CM_SSC_MODFREQDIV_DPLL_USB
1136 */ 1074 */
1137#define OMAP4430_MODFREQDIV_EXPONENT_SHIFT 8 1075#define OMAP4430_MODFREQDIV_EXPONENT_SHIFT 8
1138#define OMAP4430_MODFREQDIV_EXPONENT_MASK (0x7 << 8) 1076#define OMAP4430_MODFREQDIV_EXPONENT_MASK (0x7 << 8)
1139 1077
1140/* 1078/*
1141 * Used by CM_SSC_MODFREQDIV_DPLL_ABE, CM_SSC_MODFREQDIV_DPLL_CORE, 1079 * Used by CM_SSC_MODFREQDIV_DPLL_ABE, CM_SSC_MODFREQDIV_DPLL_CORE,
1142 * CM_SSC_MODFREQDIV_DPLL_CORE_RESTORE, CM_SSC_MODFREQDIV_DPLL_DDRPHY, 1080 * CM_SSC_MODFREQDIV_DPLL_DDRPHY, CM_SSC_MODFREQDIV_DPLL_IVA,
1143 * CM_SSC_MODFREQDIV_DPLL_IVA, CM_SSC_MODFREQDIV_DPLL_MPU, 1081 * CM_SSC_MODFREQDIV_DPLL_MPU, CM_SSC_MODFREQDIV_DPLL_PER,
1144 * CM_SSC_MODFREQDIV_DPLL_PER, CM_SSC_MODFREQDIV_DPLL_UNIPRO, 1082 * CM_SSC_MODFREQDIV_DPLL_UNIPRO, CM_SSC_MODFREQDIV_DPLL_USB
1145 * CM_SSC_MODFREQDIV_DPLL_USB
1146 */ 1083 */
1147#define OMAP4430_MODFREQDIV_MANTISSA_SHIFT 0 1084#define OMAP4430_MODFREQDIV_MANTISSA_SHIFT 0
1148#define OMAP4430_MODFREQDIV_MANTISSA_MASK (0x7f << 0) 1085#define OMAP4430_MODFREQDIV_MANTISSA_MASK (0x7f << 0)
@@ -1155,8 +1092,7 @@
1155 * CM1_ABE_TIMER8_CLKCTRL, CM1_ABE_WDT3_CLKCTRL, CM_ALWON_MDMINTC_CLKCTRL, 1092 * CM1_ABE_TIMER8_CLKCTRL, CM1_ABE_WDT3_CLKCTRL, CM_ALWON_MDMINTC_CLKCTRL,
1156 * CM_ALWON_SR_CORE_CLKCTRL, CM_ALWON_SR_IVA_CLKCTRL, CM_ALWON_SR_MPU_CLKCTRL, 1093 * CM_ALWON_SR_CORE_CLKCTRL, CM_ALWON_SR_IVA_CLKCTRL, CM_ALWON_SR_MPU_CLKCTRL,
1157 * CM_CAM_FDIF_CLKCTRL, CM_CAM_ISS_CLKCTRL, CM_CEFUSE_CEFUSE_CLKCTRL, 1094 * CM_CAM_FDIF_CLKCTRL, CM_CAM_ISS_CLKCTRL, CM_CEFUSE_CEFUSE_CLKCTRL,
1158 * CM_CM1_PROFILING_CLKCTRL, CM_CM1_PROFILING_CLKCTRL_RESTORE, 1095 * CM_CM1_PROFILING_CLKCTRL, CM_CM2_PROFILING_CLKCTRL,
1159 * CM_CM2_PROFILING_CLKCTRL, CM_CM2_PROFILING_CLKCTRL_RESTORE,
1160 * CM_D2D_MODEM_ICR_CLKCTRL, CM_D2D_SAD2D_CLKCTRL, CM_D2D_SAD2D_FW_CLKCTRL, 1096 * CM_D2D_MODEM_ICR_CLKCTRL, CM_D2D_SAD2D_CLKCTRL, CM_D2D_SAD2D_FW_CLKCTRL,
1161 * CM_DSS_DEISS_CLKCTRL, CM_DSS_DSS_CLKCTRL, CM_DUCATI_DUCATI_CLKCTRL, 1097 * CM_DSS_DEISS_CLKCTRL, CM_DSS_DSS_CLKCTRL, CM_DUCATI_DUCATI_CLKCTRL,
1162 * CM_EMU_DEBUGSS_CLKCTRL, CM_GFX_GFX_CLKCTRL, CM_IVAHD_IVAHD_CLKCTRL, 1098 * CM_EMU_DEBUGSS_CLKCTRL, CM_GFX_GFX_CLKCTRL, CM_IVAHD_IVAHD_CLKCTRL,
@@ -1165,30 +1101,24 @@
1165 * CM_L3INIT_MMC6_CLKCTRL, CM_L3INIT_P1500_CLKCTRL, CM_L3INIT_PCIESS_CLKCTRL, 1101 * CM_L3INIT_MMC6_CLKCTRL, CM_L3INIT_P1500_CLKCTRL, CM_L3INIT_PCIESS_CLKCTRL,
1166 * CM_L3INIT_SATA_CLKCTRL, CM_L3INIT_TPPSS_CLKCTRL, CM_L3INIT_UNIPRO1_CLKCTRL, 1102 * CM_L3INIT_SATA_CLKCTRL, CM_L3INIT_TPPSS_CLKCTRL, CM_L3INIT_UNIPRO1_CLKCTRL,
1167 * CM_L3INIT_USBPHYOCP2SCP_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL, 1103 * CM_L3INIT_USBPHYOCP2SCP_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL,
1168 * CM_L3INIT_USB_HOST_CLKCTRL_RESTORE, CM_L3INIT_USB_HOST_FS_CLKCTRL, 1104 * CM_L3INIT_USB_HOST_FS_CLKCTRL, CM_L3INIT_USB_OTG_CLKCTRL,
1169 * CM_L3INIT_USB_OTG_CLKCTRL, CM_L3INIT_USB_TLL_CLKCTRL, 1105 * CM_L3INIT_USB_TLL_CLKCTRL, CM_L3INIT_XHPI_CLKCTRL, CM_L3INSTR_L3_3_CLKCTRL,
1170 * CM_L3INIT_USB_TLL_CLKCTRL_RESTORE, CM_L3INIT_XHPI_CLKCTRL, 1106 * CM_L3INSTR_L3_INSTR_CLKCTRL, CM_L3INSTR_OCP_WP1_CLKCTRL,
1171 * CM_L3INSTR_L3_3_CLKCTRL, CM_L3INSTR_L3_3_CLKCTRL_RESTORE,
1172 * CM_L3INSTR_L3_INSTR_CLKCTRL, CM_L3INSTR_L3_INSTR_CLKCTRL_RESTORE,
1173 * CM_L3INSTR_OCP_WP1_CLKCTRL, CM_L3INSTR_OCP_WP1_CLKCTRL_RESTORE,
1174 * CM_L3_1_L3_1_CLKCTRL, CM_L3_2_GPMC_CLKCTRL, CM_L3_2_L3_2_CLKCTRL, 1107 * CM_L3_1_L3_1_CLKCTRL, CM_L3_2_GPMC_CLKCTRL, CM_L3_2_L3_2_CLKCTRL,
1175 * CM_L3_2_OCMC_RAM_CLKCTRL, CM_L4CFG_HW_SEM_CLKCTRL, CM_L4CFG_L4_CFG_CLKCTRL, 1108 * CM_L3_2_OCMC_RAM_CLKCTRL, CM_L4CFG_HW_SEM_CLKCTRL, CM_L4CFG_L4_CFG_CLKCTRL,
1176 * CM_L4CFG_MAILBOX_CLKCTRL, CM_L4CFG_SAR_ROM_CLKCTRL, CM_L4PER_ADC_CLKCTRL, 1109 * CM_L4CFG_MAILBOX_CLKCTRL, CM_L4CFG_SAR_ROM_CLKCTRL, CM_L4PER_ADC_CLKCTRL,
1177 * CM_L4PER_DMTIMER10_CLKCTRL, CM_L4PER_DMTIMER11_CLKCTRL, 1110 * CM_L4PER_DMTIMER10_CLKCTRL, CM_L4PER_DMTIMER11_CLKCTRL,
1178 * CM_L4PER_DMTIMER2_CLKCTRL, CM_L4PER_DMTIMER3_CLKCTRL, 1111 * CM_L4PER_DMTIMER2_CLKCTRL, CM_L4PER_DMTIMER3_CLKCTRL,
1179 * CM_L4PER_DMTIMER4_CLKCTRL, CM_L4PER_DMTIMER9_CLKCTRL, CM_L4PER_ELM_CLKCTRL, 1112 * CM_L4PER_DMTIMER4_CLKCTRL, CM_L4PER_DMTIMER9_CLKCTRL, CM_L4PER_ELM_CLKCTRL,
1180 * CM_L4PER_GPIO2_CLKCTRL, CM_L4PER_GPIO2_CLKCTRL_RESTORE, 1113 * CM_L4PER_GPIO2_CLKCTRL, CM_L4PER_GPIO3_CLKCTRL, CM_L4PER_GPIO4_CLKCTRL,
1181 * CM_L4PER_GPIO3_CLKCTRL, CM_L4PER_GPIO3_CLKCTRL_RESTORE, 1114 * CM_L4PER_GPIO5_CLKCTRL, CM_L4PER_GPIO6_CLKCTRL, CM_L4PER_HDQ1W_CLKCTRL,
1182 * CM_L4PER_GPIO4_CLKCTRL, CM_L4PER_GPIO4_CLKCTRL_RESTORE, 1115 * CM_L4PER_HECC1_CLKCTRL, CM_L4PER_HECC2_CLKCTRL, CM_L4PER_I2C1_CLKCTRL,
1183 * CM_L4PER_GPIO5_CLKCTRL, CM_L4PER_GPIO5_CLKCTRL_RESTORE, 1116 * CM_L4PER_I2C2_CLKCTRL, CM_L4PER_I2C3_CLKCTRL, CM_L4PER_I2C4_CLKCTRL,
1184 * CM_L4PER_GPIO6_CLKCTRL, CM_L4PER_GPIO6_CLKCTRL_RESTORE, 1117 * CM_L4PER_I2C5_CLKCTRL, CM_L4PER_L4PER_CLKCTRL, CM_L4PER_MCASP2_CLKCTRL,
1185 * CM_L4PER_HDQ1W_CLKCTRL, CM_L4PER_HECC1_CLKCTRL, CM_L4PER_HECC2_CLKCTRL, 1118 * CM_L4PER_MCASP3_CLKCTRL, CM_L4PER_MCBSP4_CLKCTRL, CM_L4PER_MCSPI1_CLKCTRL,
1186 * CM_L4PER_I2C1_CLKCTRL, CM_L4PER_I2C2_CLKCTRL, CM_L4PER_I2C3_CLKCTRL, 1119 * CM_L4PER_MCSPI2_CLKCTRL, CM_L4PER_MCSPI3_CLKCTRL, CM_L4PER_MCSPI4_CLKCTRL,
1187 * CM_L4PER_I2C4_CLKCTRL, CM_L4PER_I2C5_CLKCTRL, CM_L4PER_L4PER_CLKCTRL, 1120 * CM_L4PER_MGATE_CLKCTRL, CM_L4PER_MMCSD3_CLKCTRL, CM_L4PER_MMCSD4_CLKCTRL,
1188 * CM_L4PER_MCASP2_CLKCTRL, CM_L4PER_MCASP3_CLKCTRL, CM_L4PER_MCBSP4_CLKCTRL, 1121 * CM_L4PER_MMCSD5_CLKCTRL, CM_L4PER_MSPROHG_CLKCTRL,
1189 * CM_L4PER_MCSPI1_CLKCTRL, CM_L4PER_MCSPI2_CLKCTRL, CM_L4PER_MCSPI3_CLKCTRL,
1190 * CM_L4PER_MCSPI4_CLKCTRL, CM_L4PER_MGATE_CLKCTRL, CM_L4PER_MMCSD3_CLKCTRL,
1191 * CM_L4PER_MMCSD4_CLKCTRL, CM_L4PER_MMCSD5_CLKCTRL, CM_L4PER_MSPROHG_CLKCTRL,
1192 * CM_L4PER_SLIMBUS2_CLKCTRL, CM_L4PER_UART1_CLKCTRL, CM_L4PER_UART2_CLKCTRL, 1122 * CM_L4PER_SLIMBUS2_CLKCTRL, CM_L4PER_UART1_CLKCTRL, CM_L4PER_UART2_CLKCTRL,
1193 * CM_L4PER_UART3_CLKCTRL, CM_L4PER_UART4_CLKCTRL, CM_L4SEC_AES1_CLKCTRL, 1123 * CM_L4PER_UART3_CLKCTRL, CM_L4PER_UART4_CLKCTRL, CM_L4SEC_AES1_CLKCTRL,
1194 * CM_L4SEC_AES2_CLKCTRL, CM_L4SEC_CRYPTODMA_CLKCTRL, CM_L4SEC_DES3DES_CLKCTRL, 1124 * CM_L4SEC_AES2_CLKCTRL, CM_L4SEC_CRYPTODMA_CLKCTRL, CM_L4SEC_DES3DES_CLKCTRL,
@@ -1204,6 +1134,10 @@
1204#define OMAP4430_MODULEMODE_SHIFT 0 1134#define OMAP4430_MODULEMODE_SHIFT 0
1205#define OMAP4430_MODULEMODE_MASK (0x3 << 0) 1135#define OMAP4430_MODULEMODE_MASK (0x3 << 0)
1206 1136
1137/* Used by CM_L4CFG_DYNAMICDEP */
1138#define OMAP4460_MPU_DYNDEP_SHIFT 19
1139#define OMAP4460_MPU_DYNDEP_MASK (1 << 19)
1140
1207/* Used by CM_DSS_DSS_CLKCTRL */ 1141/* Used by CM_DSS_DSS_CLKCTRL */
1208#define OMAP4430_OPTFCLKEN_48MHZ_CLK_SHIFT 9 1142#define OMAP4430_OPTFCLKEN_48MHZ_CLK_SHIFT 9
1209#define OMAP4430_OPTFCLKEN_48MHZ_CLK_MASK (1 << 9) 1143#define OMAP4430_OPTFCLKEN_48MHZ_CLK_MASK (1 << 9)
@@ -1221,11 +1155,9 @@
1221#define OMAP4430_OPTFCLKEN_CTRLCLK_MASK (1 << 8) 1155#define OMAP4430_OPTFCLKEN_CTRLCLK_MASK (1 << 8)
1222 1156
1223/* 1157/*
1224 * Used by CM_L4PER_GPIO2_CLKCTRL, CM_L4PER_GPIO2_CLKCTRL_RESTORE, 1158 * Used by CM_L4PER_GPIO2_CLKCTRL, CM_L4PER_GPIO3_CLKCTRL,
1225 * CM_L4PER_GPIO3_CLKCTRL, CM_L4PER_GPIO3_CLKCTRL_RESTORE, 1159 * CM_L4PER_GPIO4_CLKCTRL, CM_L4PER_GPIO5_CLKCTRL, CM_L4PER_GPIO6_CLKCTRL,
1226 * CM_L4PER_GPIO4_CLKCTRL, CM_L4PER_GPIO4_CLKCTRL_RESTORE, 1160 * CM_WKUP_GPIO1_CLKCTRL
1227 * CM_L4PER_GPIO5_CLKCTRL, CM_L4PER_GPIO5_CLKCTRL_RESTORE,
1228 * CM_L4PER_GPIO6_CLKCTRL, CM_L4PER_GPIO6_CLKCTRL_RESTORE, CM_WKUP_GPIO1_CLKCTRL
1229 */ 1161 */
1230#define OMAP4430_OPTFCLKEN_DBCLK_SHIFT 8 1162#define OMAP4430_OPTFCLKEN_DBCLK_SHIFT 8
1231#define OMAP4430_OPTFCLKEN_DBCLK_MASK (1 << 8) 1163#define OMAP4430_OPTFCLKEN_DBCLK_MASK (1 << 8)
@@ -1254,23 +1186,23 @@
1254#define OMAP4430_OPTFCLKEN_FCLK2_SHIFT 10 1186#define OMAP4430_OPTFCLKEN_FCLK2_SHIFT 10
1255#define OMAP4430_OPTFCLKEN_FCLK2_MASK (1 << 10) 1187#define OMAP4430_OPTFCLKEN_FCLK2_MASK (1 << 10)
1256 1188
1257/* Used by CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL_RESTORE */ 1189/* Used by CM_L3INIT_USB_HOST_CLKCTRL */
1258#define OMAP4430_OPTFCLKEN_FUNC48MCLK_SHIFT 15 1190#define OMAP4430_OPTFCLKEN_FUNC48MCLK_SHIFT 15
1259#define OMAP4430_OPTFCLKEN_FUNC48MCLK_MASK (1 << 15) 1191#define OMAP4430_OPTFCLKEN_FUNC48MCLK_MASK (1 << 15)
1260 1192
1261/* Used by CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL_RESTORE */ 1193/* Used by CM_L3INIT_USB_HOST_CLKCTRL */
1262#define OMAP4430_OPTFCLKEN_HSIC480M_P1_CLK_SHIFT 13 1194#define OMAP4430_OPTFCLKEN_HSIC480M_P1_CLK_SHIFT 13
1263#define OMAP4430_OPTFCLKEN_HSIC480M_P1_CLK_MASK (1 << 13) 1195#define OMAP4430_OPTFCLKEN_HSIC480M_P1_CLK_MASK (1 << 13)
1264 1196
1265/* Used by CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL_RESTORE */ 1197/* Used by CM_L3INIT_USB_HOST_CLKCTRL */
1266#define OMAP4430_OPTFCLKEN_HSIC480M_P2_CLK_SHIFT 14 1198#define OMAP4430_OPTFCLKEN_HSIC480M_P2_CLK_SHIFT 14
1267#define OMAP4430_OPTFCLKEN_HSIC480M_P2_CLK_MASK (1 << 14) 1199#define OMAP4430_OPTFCLKEN_HSIC480M_P2_CLK_MASK (1 << 14)
1268 1200
1269/* Used by CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL_RESTORE */ 1201/* Used by CM_L3INIT_USB_HOST_CLKCTRL */
1270#define OMAP4430_OPTFCLKEN_HSIC60M_P1_CLK_SHIFT 11 1202#define OMAP4430_OPTFCLKEN_HSIC60M_P1_CLK_SHIFT 11
1271#define OMAP4430_OPTFCLKEN_HSIC60M_P1_CLK_MASK (1 << 11) 1203#define OMAP4430_OPTFCLKEN_HSIC60M_P1_CLK_MASK (1 << 11)
1272 1204
1273/* Used by CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL_RESTORE */ 1205/* Used by CM_L3INIT_USB_HOST_CLKCTRL */
1274#define OMAP4430_OPTFCLKEN_HSIC60M_P2_CLK_SHIFT 12 1206#define OMAP4430_OPTFCLKEN_HSIC60M_P2_CLK_SHIFT 12
1275#define OMAP4430_OPTFCLKEN_HSIC60M_P2_CLK_MASK (1 << 12) 1207#define OMAP4430_OPTFCLKEN_HSIC60M_P2_CLK_MASK (1 << 12)
1276 1208
@@ -1298,6 +1230,10 @@
1298#define OMAP4430_OPTFCLKEN_SYS_CLK_SHIFT 10 1230#define OMAP4430_OPTFCLKEN_SYS_CLK_SHIFT 10
1299#define OMAP4430_OPTFCLKEN_SYS_CLK_MASK (1 << 10) 1231#define OMAP4430_OPTFCLKEN_SYS_CLK_MASK (1 << 10)
1300 1232
1233/* Used by CM_WKUP_BANDGAP_CLKCTRL */
1234#define OMAP4460_OPTFCLKEN_TS_FCLK_SHIFT 8
1235#define OMAP4460_OPTFCLKEN_TS_FCLK_MASK (1 << 8)
1236
1301/* Used by CM_DSS_DSS_CLKCTRL */ 1237/* Used by CM_DSS_DSS_CLKCTRL */
1302#define OMAP4430_OPTFCLKEN_TV_CLK_SHIFT 11 1238#define OMAP4430_OPTFCLKEN_TV_CLK_SHIFT 11
1303#define OMAP4430_OPTFCLKEN_TV_CLK_MASK (1 << 11) 1239#define OMAP4430_OPTFCLKEN_TV_CLK_MASK (1 << 11)
@@ -1306,27 +1242,27 @@
1306#define OMAP4430_OPTFCLKEN_TXPHYCLK_SHIFT 8 1242#define OMAP4430_OPTFCLKEN_TXPHYCLK_SHIFT 8
1307#define OMAP4430_OPTFCLKEN_TXPHYCLK_MASK (1 << 8) 1243#define OMAP4430_OPTFCLKEN_TXPHYCLK_MASK (1 << 8)
1308 1244
1309/* Used by CM_L3INIT_USB_TLL_CLKCTRL, CM_L3INIT_USB_TLL_CLKCTRL_RESTORE */ 1245/* Used by CM_L3INIT_USB_TLL_CLKCTRL */
1310#define OMAP4430_OPTFCLKEN_USB_CH0_CLK_SHIFT 8 1246#define OMAP4430_OPTFCLKEN_USB_CH0_CLK_SHIFT 8
1311#define OMAP4430_OPTFCLKEN_USB_CH0_CLK_MASK (1 << 8) 1247#define OMAP4430_OPTFCLKEN_USB_CH0_CLK_MASK (1 << 8)
1312 1248
1313/* Used by CM_L3INIT_USB_TLL_CLKCTRL, CM_L3INIT_USB_TLL_CLKCTRL_RESTORE */ 1249/* Used by CM_L3INIT_USB_TLL_CLKCTRL */
1314#define OMAP4430_OPTFCLKEN_USB_CH1_CLK_SHIFT 9 1250#define OMAP4430_OPTFCLKEN_USB_CH1_CLK_SHIFT 9
1315#define OMAP4430_OPTFCLKEN_USB_CH1_CLK_MASK (1 << 9) 1251#define OMAP4430_OPTFCLKEN_USB_CH1_CLK_MASK (1 << 9)
1316 1252
1317/* Used by CM_L3INIT_USB_TLL_CLKCTRL, CM_L3INIT_USB_TLL_CLKCTRL_RESTORE */ 1253/* Used by CM_L3INIT_USB_TLL_CLKCTRL */
1318#define OMAP4430_OPTFCLKEN_USB_CH2_CLK_SHIFT 10 1254#define OMAP4430_OPTFCLKEN_USB_CH2_CLK_SHIFT 10
1319#define OMAP4430_OPTFCLKEN_USB_CH2_CLK_MASK (1 << 10) 1255#define OMAP4430_OPTFCLKEN_USB_CH2_CLK_MASK (1 << 10)
1320 1256
1321/* Used by CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL_RESTORE */ 1257/* Used by CM_L3INIT_USB_HOST_CLKCTRL */
1322#define OMAP4430_OPTFCLKEN_UTMI_P1_CLK_SHIFT 8 1258#define OMAP4430_OPTFCLKEN_UTMI_P1_CLK_SHIFT 8
1323#define OMAP4430_OPTFCLKEN_UTMI_P1_CLK_MASK (1 << 8) 1259#define OMAP4430_OPTFCLKEN_UTMI_P1_CLK_MASK (1 << 8)
1324 1260
1325/* Used by CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL_RESTORE */ 1261/* Used by CM_L3INIT_USB_HOST_CLKCTRL */
1326#define OMAP4430_OPTFCLKEN_UTMI_P2_CLK_SHIFT 9 1262#define OMAP4430_OPTFCLKEN_UTMI_P2_CLK_SHIFT 9
1327#define OMAP4430_OPTFCLKEN_UTMI_P2_CLK_MASK (1 << 9) 1263#define OMAP4430_OPTFCLKEN_UTMI_P2_CLK_MASK (1 << 9)
1328 1264
1329/* Used by CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL_RESTORE */ 1265/* Used by CM_L3INIT_USB_HOST_CLKCTRL */
1330#define OMAP4430_OPTFCLKEN_UTMI_P3_CLK_SHIFT 10 1266#define OMAP4430_OPTFCLKEN_UTMI_P3_CLK_SHIFT 10
1331#define OMAP4430_OPTFCLKEN_UTMI_P3_CLK_MASK (1 << 10) 1267#define OMAP4430_OPTFCLKEN_UTMI_P3_CLK_MASK (1 << 10)
1332 1268
@@ -1374,7 +1310,7 @@
1374#define OMAP4430_PMD_TRACE_MUX_CTRL_SHIFT 22 1310#define OMAP4430_PMD_TRACE_MUX_CTRL_SHIFT 22
1375#define OMAP4430_PMD_TRACE_MUX_CTRL_MASK (0x3 << 22) 1311#define OMAP4430_PMD_TRACE_MUX_CTRL_MASK (0x3 << 22)
1376 1312
1377/* Used by CM_DYN_DEP_PRESCAL, CM_DYN_DEP_PRESCAL_RESTORE */ 1313/* Used by CM_DYN_DEP_PRESCAL */
1378#define OMAP4430_PRESCAL_SHIFT 0 1314#define OMAP4430_PRESCAL_SHIFT 0
1379#define OMAP4430_PRESCAL_MASK (0x3f << 0) 1315#define OMAP4430_PRESCAL_MASK (0x3f << 0)
1380 1316
@@ -1382,10 +1318,7 @@
1382#define OMAP4430_R_RTL_SHIFT 11 1318#define OMAP4430_R_RTL_SHIFT 11
1383#define OMAP4430_R_RTL_MASK (0x1f << 11) 1319#define OMAP4430_R_RTL_MASK (0x1f << 11)
1384 1320
1385/* 1321/* Used by CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_TLL_CLKCTRL */
1386 * Used by CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL_RESTORE,
1387 * CM_L3INIT_USB_TLL_CLKCTRL, CM_L3INIT_USB_TLL_CLKCTRL_RESTORE
1388 */
1389#define OMAP4430_SAR_MODE_SHIFT 4 1322#define OMAP4430_SAR_MODE_SHIFT 4
1390#define OMAP4430_SAR_MODE_MASK (1 << 4) 1323#define OMAP4430_SAR_MODE_MASK (1 << 4)
1391 1324
@@ -1397,7 +1330,7 @@
1397#define OMAP4430_SCHEME_SHIFT 30 1330#define OMAP4430_SCHEME_SHIFT 30
1398#define OMAP4430_SCHEME_MASK (0x3 << 30) 1331#define OMAP4430_SCHEME_MASK (0x3 << 30)
1399 1332
1400/* Used by CM_L4CFG_DYNAMICDEP, CM_L4CFG_DYNAMICDEP_RESTORE */ 1333/* Used by CM_L4CFG_DYNAMICDEP */
1401#define OMAP4430_SDMA_DYNDEP_SHIFT 11 1334#define OMAP4430_SDMA_DYNDEP_SHIFT 11
1402#define OMAP4430_SDMA_DYNDEP_MASK (1 << 11) 1335#define OMAP4430_SDMA_DYNDEP_MASK (1 << 11)
1403 1336
@@ -1417,10 +1350,10 @@
1417 * CM_L3INIT_HSI_CLKCTRL, CM_L3INIT_MMC1_CLKCTRL, CM_L3INIT_MMC2_CLKCTRL, 1350 * CM_L3INIT_HSI_CLKCTRL, CM_L3INIT_MMC1_CLKCTRL, CM_L3INIT_MMC2_CLKCTRL,
1418 * CM_L3INIT_MMC6_CLKCTRL, CM_L3INIT_P1500_CLKCTRL, CM_L3INIT_PCIESS_CLKCTRL, 1351 * CM_L3INIT_MMC6_CLKCTRL, CM_L3INIT_P1500_CLKCTRL, CM_L3INIT_PCIESS_CLKCTRL,
1419 * CM_L3INIT_SATA_CLKCTRL, CM_L3INIT_TPPSS_CLKCTRL, CM_L3INIT_UNIPRO1_CLKCTRL, 1352 * CM_L3INIT_SATA_CLKCTRL, CM_L3INIT_TPPSS_CLKCTRL, CM_L3INIT_UNIPRO1_CLKCTRL,
1420 * CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_HOST_CLKCTRL_RESTORE, 1353 * CM_L3INIT_USB_HOST_CLKCTRL, CM_L3INIT_USB_HOST_FS_CLKCTRL,
1421 * CM_L3INIT_USB_HOST_FS_CLKCTRL, CM_L3INIT_USB_OTG_CLKCTRL, 1354 * CM_L3INIT_USB_OTG_CLKCTRL, CM_L3INIT_XHPI_CLKCTRL,
1422 * CM_L3INIT_XHPI_CLKCTRL, CM_L4SEC_CRYPTODMA_CLKCTRL, CM_MPU_MPU_CLKCTRL, 1355 * CM_L4SEC_CRYPTODMA_CLKCTRL, CM_MPU_MPU_CLKCTRL, CM_SDMA_SDMA_CLKCTRL,
1423 * CM_SDMA_SDMA_CLKCTRL, CM_TESLA_TESLA_CLKCTRL 1356 * CM_TESLA_TESLA_CLKCTRL
1424 */ 1357 */
1425#define OMAP4430_STBYST_SHIFT 18 1358#define OMAP4430_STBYST_SHIFT 18
1426#define OMAP4430_STBYST_MASK (1 << 18) 1359#define OMAP4430_STBYST_MASK (1 << 18)
@@ -1438,17 +1371,13 @@
1438#define OMAP4430_ST_DPLL_CLKDCOLDO_MASK (1 << 9) 1371#define OMAP4430_ST_DPLL_CLKDCOLDO_MASK (1 << 9)
1439 1372
1440/* 1373/*
1441 * Used by CM_DIV_M2_DPLL_ABE, CM_DIV_M2_DPLL_CORE, 1374 * Used by CM_DIV_M2_DPLL_ABE, CM_DIV_M2_DPLL_CORE, CM_DIV_M2_DPLL_DDRPHY,
1442 * CM_DIV_M2_DPLL_CORE_RESTORE, CM_DIV_M2_DPLL_DDRPHY, CM_DIV_M2_DPLL_MPU, 1375 * CM_DIV_M2_DPLL_MPU, CM_DIV_M2_DPLL_PER, CM_DIV_M2_DPLL_USB
1443 * CM_DIV_M2_DPLL_PER, CM_DIV_M2_DPLL_USB
1444 */ 1376 */
1445#define OMAP4430_ST_DPLL_CLKOUT_SHIFT 9 1377#define OMAP4430_ST_DPLL_CLKOUT_SHIFT 9
1446#define OMAP4430_ST_DPLL_CLKOUT_MASK (1 << 9) 1378#define OMAP4430_ST_DPLL_CLKOUT_MASK (1 << 9)
1447 1379
1448/* 1380/* Used by CM_DIV_M3_DPLL_ABE, CM_DIV_M3_DPLL_CORE, CM_DIV_M3_DPLL_PER */
1449 * Used by CM_DIV_M3_DPLL_ABE, CM_DIV_M3_DPLL_CORE,
1450 * CM_DIV_M3_DPLL_CORE_RESTORE, CM_DIV_M3_DPLL_PER
1451 */
1452#define OMAP4430_ST_DPLL_CLKOUTHIF_SHIFT 9 1381#define OMAP4430_ST_DPLL_CLKOUTHIF_SHIFT 9
1453#define OMAP4430_ST_DPLL_CLKOUTHIF_MASK (1 << 9) 1382#define OMAP4430_ST_DPLL_CLKOUTHIF_MASK (1 << 9)
1454 1383
@@ -1457,30 +1386,24 @@
1457#define OMAP4430_ST_DPLL_CLKOUTX2_MASK (1 << 11) 1386#define OMAP4430_ST_DPLL_CLKOUTX2_MASK (1 << 11)
1458 1387
1459/* 1388/*
1460 * Used by CM_DIV_M4_DPLL_CORE, CM_DIV_M4_DPLL_CORE_RESTORE, 1389 * Used by CM_DIV_M4_DPLL_CORE, CM_DIV_M4_DPLL_DDRPHY, CM_DIV_M4_DPLL_IVA,
1461 * CM_DIV_M4_DPLL_DDRPHY, CM_DIV_M4_DPLL_IVA, CM_DIV_M4_DPLL_PER 1390 * CM_DIV_M4_DPLL_PER
1462 */ 1391 */
1463#define OMAP4430_ST_HSDIVIDER_CLKOUT1_SHIFT 9 1392#define OMAP4430_ST_HSDIVIDER_CLKOUT1_SHIFT 9
1464#define OMAP4430_ST_HSDIVIDER_CLKOUT1_MASK (1 << 9) 1393#define OMAP4430_ST_HSDIVIDER_CLKOUT1_MASK (1 << 9)
1465 1394
1466/* 1395/*
1467 * Used by CM_DIV_M5_DPLL_CORE, CM_DIV_M5_DPLL_CORE_RESTORE, 1396 * Used by CM_DIV_M5_DPLL_CORE, CM_DIV_M5_DPLL_DDRPHY, CM_DIV_M5_DPLL_IVA,
1468 * CM_DIV_M5_DPLL_DDRPHY, CM_DIV_M5_DPLL_IVA, CM_DIV_M5_DPLL_PER 1397 * CM_DIV_M5_DPLL_PER
1469 */ 1398 */
1470#define OMAP4430_ST_HSDIVIDER_CLKOUT2_SHIFT 9 1399#define OMAP4430_ST_HSDIVIDER_CLKOUT2_SHIFT 9
1471#define OMAP4430_ST_HSDIVIDER_CLKOUT2_MASK (1 << 9) 1400#define OMAP4430_ST_HSDIVIDER_CLKOUT2_MASK (1 << 9)
1472 1401
1473/* 1402/* Used by CM_DIV_M6_DPLL_CORE, CM_DIV_M6_DPLL_DDRPHY, CM_DIV_M6_DPLL_PER */
1474 * Used by CM_DIV_M6_DPLL_CORE, CM_DIV_M6_DPLL_CORE_RESTORE,
1475 * CM_DIV_M6_DPLL_DDRPHY, CM_DIV_M6_DPLL_PER
1476 */
1477#define OMAP4430_ST_HSDIVIDER_CLKOUT3_SHIFT 9 1403#define OMAP4430_ST_HSDIVIDER_CLKOUT3_SHIFT 9
1478#define OMAP4430_ST_HSDIVIDER_CLKOUT3_MASK (1 << 9) 1404#define OMAP4430_ST_HSDIVIDER_CLKOUT3_MASK (1 << 9)
1479 1405
1480/* 1406/* Used by CM_DIV_M7_DPLL_CORE, CM_DIV_M7_DPLL_PER */
1481 * Used by CM_DIV_M7_DPLL_CORE, CM_DIV_M7_DPLL_CORE_RESTORE,
1482 * CM_DIV_M7_DPLL_PER
1483 */
1484#define OMAP4430_ST_HSDIVIDER_CLKOUT4_SHIFT 9 1407#define OMAP4430_ST_HSDIVIDER_CLKOUT4_SHIFT 9
1485#define OMAP4430_ST_HSDIVIDER_CLKOUT4_MASK (1 << 9) 1408#define OMAP4430_ST_HSDIVIDER_CLKOUT4_MASK (1 << 9)
1486 1409
@@ -1496,7 +1419,7 @@
1496#define OMAP4430_SYS_CLKSEL_SHIFT 0 1419#define OMAP4430_SYS_CLKSEL_SHIFT 0
1497#define OMAP4430_SYS_CLKSEL_MASK (0x7 << 0) 1420#define OMAP4430_SYS_CLKSEL_MASK (0x7 << 0)
1498 1421
1499/* Used by CM_L4CFG_DYNAMICDEP, CM_L4CFG_DYNAMICDEP_RESTORE */ 1422/* Used by CM_L4CFG_DYNAMICDEP */
1500#define OMAP4430_TESLA_DYNDEP_SHIFT 1 1423#define OMAP4430_TESLA_DYNDEP_SHIFT 1
1501#define OMAP4430_TESLA_DYNDEP_MASK (1 << 1) 1424#define OMAP4430_TESLA_DYNDEP_MASK (1 << 1)
1502 1425
@@ -1505,11 +1428,9 @@
1505#define OMAP4430_TESLA_STATDEP_MASK (1 << 1) 1428#define OMAP4430_TESLA_STATDEP_MASK (1 << 1)
1506 1429
1507/* 1430/*
1508 * Used by CM_D2D_DYNAMICDEP, CM_D2D_DYNAMICDEP_RESTORE, CM_DUCATI_DYNAMICDEP, 1431 * Used by CM_D2D_DYNAMICDEP, CM_DUCATI_DYNAMICDEP, CM_EMU_DYNAMICDEP,
1509 * CM_EMU_DYNAMICDEP, CM_L3_1_DYNAMICDEP, CM_L3_1_DYNAMICDEP_RESTORE, 1432 * CM_L3_1_DYNAMICDEP, CM_L3_2_DYNAMICDEP, CM_L4CFG_DYNAMICDEP,
1510 * CM_L3_2_DYNAMICDEP, CM_L3_2_DYNAMICDEP_RESTORE, CM_L4CFG_DYNAMICDEP, 1433 * CM_L4PER_DYNAMICDEP, CM_MPU_DYNAMICDEP, CM_TESLA_DYNAMICDEP
1511 * CM_L4CFG_DYNAMICDEP_RESTORE, CM_L4PER_DYNAMICDEP,
1512 * CM_L4PER_DYNAMICDEP_RESTORE, CM_MPU_DYNAMICDEP, CM_TESLA_DYNAMICDEP
1513 */ 1434 */
1514#define OMAP4430_WINDOWSIZE_SHIFT 24 1435#define OMAP4430_WINDOWSIZE_SHIFT 24
1515#define OMAP4430_WINDOWSIZE_MASK (0xf << 24) 1436#define OMAP4430_WINDOWSIZE_MASK (0xf << 24)
diff --git a/arch/arm/mach-omap2/cm1_44xx.h b/arch/arm/mach-omap2/cm1_44xx.h
index e2d7a56b2ad..1bc00dc4876 100644
--- a/arch/arm/mach-omap2/cm1_44xx.h
+++ b/arch/arm/mach-omap2/cm1_44xx.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * OMAP44xx CM1 instance offset macros 2 * OMAP44xx CM1 instance offset macros
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 (paul@pwsan.com) 7 * Paul Walmsley (paul@pwsan.com)
@@ -41,9 +41,9 @@
41#define OMAP4430_CM1_INSTR_INST 0x0f00 41#define OMAP4430_CM1_INSTR_INST 0x0f00
42 42
43/* CM1 clockdomain register offsets (from instance start) */ 43/* CM1 clockdomain register offsets (from instance start) */
44#define OMAP4430_CM1_ABE_ABE_CDOFFS 0x0000 44#define OMAP4430_CM1_MPU_MPU_CDOFFS 0x0000
45#define OMAP4430_CM1_MPU_MPU_CDOFFS 0x0000 45#define OMAP4430_CM1_TESLA_TESLA_CDOFFS 0x0000
46#define OMAP4430_CM1_TESLA_TESLA_CDOFFS 0x0000 46#define OMAP4430_CM1_ABE_ABE_CDOFFS 0x0000
47 47
48/* CM1 */ 48/* CM1 */
49 49
@@ -82,8 +82,8 @@
82#define OMAP4430_CM_DIV_M7_DPLL_CORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x0044) 82#define OMAP4430_CM_DIV_M7_DPLL_CORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x0044)
83#define OMAP4_CM_SSC_DELTAMSTEP_DPLL_CORE_OFFSET 0x0048 83#define OMAP4_CM_SSC_DELTAMSTEP_DPLL_CORE_OFFSET 0x0048
84#define OMAP4430_CM_SSC_DELTAMSTEP_DPLL_CORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x0048) 84#define OMAP4430_CM_SSC_DELTAMSTEP_DPLL_CORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x0048)
85#define OMAP4_CM_SSC_INSTFREQDIV_DPLL_CORE_OFFSET 0x004c 85#define OMAP4_CM_SSC_MODFREQDIV_DPLL_CORE_OFFSET 0x004c
86#define OMAP4430_CM_SSC_INSTFREQDIV_DPLL_CORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x004c) 86#define OMAP4430_CM_SSC_MODFREQDIV_DPLL_CORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x004c)
87#define OMAP4_CM_EMU_OVERRIDE_DPLL_CORE_OFFSET 0x0050 87#define OMAP4_CM_EMU_OVERRIDE_DPLL_CORE_OFFSET 0x0050
88#define OMAP4430_CM_EMU_OVERRIDE_DPLL_CORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x0050) 88#define OMAP4430_CM_EMU_OVERRIDE_DPLL_CORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x0050)
89#define OMAP4_CM_CLKMODE_DPLL_MPU_OFFSET 0x0060 89#define OMAP4_CM_CLKMODE_DPLL_MPU_OFFSET 0x0060
@@ -98,8 +98,8 @@
98#define OMAP4430_CM_DIV_M2_DPLL_MPU OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x0070) 98#define OMAP4430_CM_DIV_M2_DPLL_MPU OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x0070)
99#define OMAP4_CM_SSC_DELTAMSTEP_DPLL_MPU_OFFSET 0x0088 99#define OMAP4_CM_SSC_DELTAMSTEP_DPLL_MPU_OFFSET 0x0088
100#define OMAP4430_CM_SSC_DELTAMSTEP_DPLL_MPU OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x0088) 100#define OMAP4430_CM_SSC_DELTAMSTEP_DPLL_MPU OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x0088)
101#define OMAP4_CM_SSC_INSTFREQDIV_DPLL_MPU_OFFSET 0x008c 101#define OMAP4_CM_SSC_MODFREQDIV_DPLL_MPU_OFFSET 0x008c
102#define OMAP4430_CM_SSC_INSTFREQDIV_DPLL_MPU OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x008c) 102#define OMAP4430_CM_SSC_MODFREQDIV_DPLL_MPU OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x008c)
103#define OMAP4_CM_BYPCLK_DPLL_MPU_OFFSET 0x009c 103#define OMAP4_CM_BYPCLK_DPLL_MPU_OFFSET 0x009c
104#define OMAP4430_CM_BYPCLK_DPLL_MPU OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x009c) 104#define OMAP4430_CM_BYPCLK_DPLL_MPU OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x009c)
105#define OMAP4_CM_CLKMODE_DPLL_IVA_OFFSET 0x00a0 105#define OMAP4_CM_CLKMODE_DPLL_IVA_OFFSET 0x00a0
@@ -116,8 +116,8 @@
116#define OMAP4430_CM_DIV_M5_DPLL_IVA OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x00bc) 116#define OMAP4430_CM_DIV_M5_DPLL_IVA OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x00bc)
117#define OMAP4_CM_SSC_DELTAMSTEP_DPLL_IVA_OFFSET 0x00c8 117#define OMAP4_CM_SSC_DELTAMSTEP_DPLL_IVA_OFFSET 0x00c8
118#define OMAP4430_CM_SSC_DELTAMSTEP_DPLL_IVA OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x00c8) 118#define OMAP4430_CM_SSC_DELTAMSTEP_DPLL_IVA OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x00c8)
119#define OMAP4_CM_SSC_INSTFREQDIV_DPLL_IVA_OFFSET 0x00cc 119#define OMAP4_CM_SSC_MODFREQDIV_DPLL_IVA_OFFSET 0x00cc
120#define OMAP4430_CM_SSC_INSTFREQDIV_DPLL_IVA OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x00cc) 120#define OMAP4430_CM_SSC_MODFREQDIV_DPLL_IVA OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x00cc)
121#define OMAP4_CM_BYPCLK_DPLL_IVA_OFFSET 0x00dc 121#define OMAP4_CM_BYPCLK_DPLL_IVA_OFFSET 0x00dc
122#define OMAP4430_CM_BYPCLK_DPLL_IVA OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x00dc) 122#define OMAP4430_CM_BYPCLK_DPLL_IVA OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x00dc)
123#define OMAP4_CM_CLKMODE_DPLL_ABE_OFFSET 0x00e0 123#define OMAP4_CM_CLKMODE_DPLL_ABE_OFFSET 0x00e0
@@ -134,8 +134,8 @@
134#define OMAP4430_CM_DIV_M3_DPLL_ABE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x00f4) 134#define OMAP4430_CM_DIV_M3_DPLL_ABE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x00f4)
135#define OMAP4_CM_SSC_DELTAMSTEP_DPLL_ABE_OFFSET 0x0108 135#define OMAP4_CM_SSC_DELTAMSTEP_DPLL_ABE_OFFSET 0x0108
136#define OMAP4430_CM_SSC_DELTAMSTEP_DPLL_ABE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x0108) 136#define OMAP4430_CM_SSC_DELTAMSTEP_DPLL_ABE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x0108)
137#define OMAP4_CM_SSC_INSTFREQDIV_DPLL_ABE_OFFSET 0x010c 137#define OMAP4_CM_SSC_MODFREQDIV_DPLL_ABE_OFFSET 0x010c
138#define OMAP4430_CM_SSC_INSTFREQDIV_DPLL_ABE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x010c) 138#define OMAP4430_CM_SSC_MODFREQDIV_DPLL_ABE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x010c)
139#define OMAP4_CM_CLKMODE_DPLL_DDRPHY_OFFSET 0x0120 139#define OMAP4_CM_CLKMODE_DPLL_DDRPHY_OFFSET 0x0120
140#define OMAP4430_CM_CLKMODE_DPLL_DDRPHY OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x0120) 140#define OMAP4430_CM_CLKMODE_DPLL_DDRPHY OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x0120)
141#define OMAP4_CM_IDLEST_DPLL_DDRPHY_OFFSET 0x0124 141#define OMAP4_CM_IDLEST_DPLL_DDRPHY_OFFSET 0x0124
@@ -154,8 +154,8 @@
154#define OMAP4430_CM_DIV_M6_DPLL_DDRPHY OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x0140) 154#define OMAP4430_CM_DIV_M6_DPLL_DDRPHY OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x0140)
155#define OMAP4_CM_SSC_DELTAMSTEP_DPLL_DDRPHY_OFFSET 0x0148 155#define OMAP4_CM_SSC_DELTAMSTEP_DPLL_DDRPHY_OFFSET 0x0148
156#define OMAP4430_CM_SSC_DELTAMSTEP_DPLL_DDRPHY OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x0148) 156#define OMAP4430_CM_SSC_DELTAMSTEP_DPLL_DDRPHY OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x0148)
157#define OMAP4_CM_SSC_INSTFREQDIV_DPLL_DDRPHY_OFFSET 0x014c 157#define OMAP4_CM_SSC_MODFREQDIV_DPLL_DDRPHY_OFFSET 0x014c
158#define OMAP4430_CM_SSC_INSTFREQDIV_DPLL_DDRPHY OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x014c) 158#define OMAP4430_CM_SSC_MODFREQDIV_DPLL_DDRPHY OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x014c)
159#define OMAP4_CM_SHADOW_FREQ_CONFIG1_OFFSET 0x0160 159#define OMAP4_CM_SHADOW_FREQ_CONFIG1_OFFSET 0x0160
160#define OMAP4430_CM_SHADOW_FREQ_CONFIG1 OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x0160) 160#define OMAP4430_CM_SHADOW_FREQ_CONFIG1 OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x0160)
161#define OMAP4_CM_SHADOW_FREQ_CONFIG2_OFFSET 0x0164 161#define OMAP4_CM_SHADOW_FREQ_CONFIG2_OFFSET 0x0164
@@ -217,42 +217,6 @@
217#define OMAP4_CM1_ABE_WDT3_CLKCTRL_OFFSET 0x0088 217#define OMAP4_CM1_ABE_WDT3_CLKCTRL_OFFSET 0x0088
218#define OMAP4430_CM1_ABE_WDT3_CLKCTRL OMAP44XX_CM1_REGADDR(OMAP4430_CM1_ABE_INST, 0x0088) 218#define OMAP4430_CM1_ABE_WDT3_CLKCTRL OMAP44XX_CM1_REGADDR(OMAP4430_CM1_ABE_INST, 0x0088)
219 219
220/* CM1.RESTORE_CM1 register offsets */
221#define OMAP4_CM_CLKSEL_CORE_RESTORE_OFFSET 0x0000
222#define OMAP4430_CM_CLKSEL_CORE_RESTORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_INST, 0x0000)
223#define OMAP4_CM_DIV_M2_DPLL_CORE_RESTORE_OFFSET 0x0004
224#define OMAP4430_CM_DIV_M2_DPLL_CORE_RESTORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_INST, 0x0004)
225#define OMAP4_CM_DIV_M3_DPLL_CORE_RESTORE_OFFSET 0x0008
226#define OMAP4430_CM_DIV_M3_DPLL_CORE_RESTORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_INST, 0x0008)
227#define OMAP4_CM_DIV_M4_DPLL_CORE_RESTORE_OFFSET 0x000c
228#define OMAP4430_CM_DIV_M4_DPLL_CORE_RESTORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_INST, 0x000c)
229#define OMAP4_CM_DIV_M5_DPLL_CORE_RESTORE_OFFSET 0x0010
230#define OMAP4430_CM_DIV_M5_DPLL_CORE_RESTORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_INST, 0x0010)
231#define OMAP4_CM_DIV_M6_DPLL_CORE_RESTORE_OFFSET 0x0014
232#define OMAP4430_CM_DIV_M6_DPLL_CORE_RESTORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_INST, 0x0014)
233#define OMAP4_CM_DIV_M7_DPLL_CORE_RESTORE_OFFSET 0x0018
234#define OMAP4430_CM_DIV_M7_DPLL_CORE_RESTORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_INST, 0x0018)
235#define OMAP4_CM_CLKSEL_DPLL_CORE_RESTORE_OFFSET 0x001c
236#define OMAP4430_CM_CLKSEL_DPLL_CORE_RESTORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_INST, 0x001c)
237#define OMAP4_CM_SSC_DELTAMSTEP_DPLL_CORE_RESTORE_OFFSET 0x0020
238#define OMAP4430_CM_SSC_DELTAMSTEP_DPLL_CORE_RESTORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_INST, 0x0020)
239#define OMAP4_CM_SSC_INSTFREQDIV_DPLL_CORE_RESTORE_OFFSET 0x0024
240#define OMAP4430_CM_SSC_INSTFREQDIV_DPLL_CORE_RESTORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_INST, 0x0024)
241#define OMAP4_CM_CLKMODE_DPLL_CORE_RESTORE_OFFSET 0x0028
242#define OMAP4430_CM_CLKMODE_DPLL_CORE_RESTORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_INST, 0x0028)
243#define OMAP4_CM_SHADOW_FREQ_CONFIG2_RESTORE_OFFSET 0x002c
244#define OMAP4430_CM_SHADOW_FREQ_CONFIG2_RESTORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_INST, 0x002c)
245#define OMAP4_CM_SHADOW_FREQ_CONFIG1_RESTORE_OFFSET 0x0030
246#define OMAP4430_CM_SHADOW_FREQ_CONFIG1_RESTORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_INST, 0x0030)
247#define OMAP4_CM_AUTOIDLE_DPLL_CORE_RESTORE_OFFSET 0x0034
248#define OMAP4430_CM_AUTOIDLE_DPLL_CORE_RESTORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_INST, 0x0034)
249#define OMAP4_CM_MPU_CLKSTCTRL_RESTORE_OFFSET 0x0038
250#define OMAP4430_CM_MPU_CLKSTCTRL_RESTORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_INST, 0x0038)
251#define OMAP4_CM_CM1_PROFILING_CLKCTRL_RESTORE_OFFSET 0x003c
252#define OMAP4430_CM_CM1_PROFILING_CLKCTRL_RESTORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_INST, 0x003c)
253#define OMAP4_CM_DYN_DEP_PRESCAL_RESTORE_OFFSET 0x0040
254#define OMAP4430_CM_DYN_DEP_PRESCAL_RESTORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_INST, 0x0040)
255
256/* Function prototypes */ 220/* Function prototypes */
257extern u32 omap4_cm1_read_inst_reg(s16 inst, u16 idx); 221extern u32 omap4_cm1_read_inst_reg(s16 inst, u16 idx);
258extern void omap4_cm1_write_inst_reg(u32 val, s16 inst, u16 idx); 222extern void omap4_cm1_write_inst_reg(u32 val, s16 inst, u16 idx);
diff --git a/arch/arm/mach-omap2/cm2_44xx.h b/arch/arm/mach-omap2/cm2_44xx.h
index aa474504406..b9de72da1a8 100644
--- a/arch/arm/mach-omap2/cm2_44xx.h
+++ b/arch/arm/mach-omap2/cm2_44xx.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * OMAP44xx CM2 instance offset macros 2 * OMAP44xx CM2 instance offset macros
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 (paul@pwsan.com) 7 * Paul Walmsley (paul@pwsan.com)
@@ -40,9 +40,9 @@
40#define OMAP4430_CM2_CAM_INST 0x1000 40#define OMAP4430_CM2_CAM_INST 0x1000
41#define OMAP4430_CM2_DSS_INST 0x1100 41#define OMAP4430_CM2_DSS_INST 0x1100
42#define OMAP4430_CM2_GFX_INST 0x1200 42#define OMAP4430_CM2_GFX_INST 0x1200
43#define OMAP4430_CM2_L3INIT_INST 0x1300 43#define OMAP4430_CM2_L3INIT_INST 0x1300
44#define OMAP4430_CM2_L4PER_INST 0x1400 44#define OMAP4430_CM2_L4PER_INST 0x1400
45#define OMAP4430_CM2_CEFUSE_INST 0x1600 45#define OMAP4430_CM2_CEFUSE_INST 0x1600
46#define OMAP4430_CM2_RESTORE_INST 0x1e00 46#define OMAP4430_CM2_RESTORE_INST 0x1e00
47#define OMAP4430_CM2_INSTR_INST 0x1f00 47#define OMAP4430_CM2_INSTR_INST 0x1f00
48 48
@@ -65,7 +65,6 @@
65#define OMAP4430_CM2_L4PER_L4SEC_CDOFFS 0x0180 65#define OMAP4430_CM2_L4PER_L4SEC_CDOFFS 0x0180
66#define OMAP4430_CM2_CEFUSE_CEFUSE_CDOFFS 0x0000 66#define OMAP4430_CM2_CEFUSE_CEFUSE_CDOFFS 0x0000
67 67
68
69/* CM2 */ 68/* CM2 */
70 69
71/* CM2.OCP_SOCKET_CM2 register offsets */ 70/* CM2.OCP_SOCKET_CM2 register offsets */
@@ -121,8 +120,8 @@
121#define OMAP4430_CM_DIV_M7_DPLL_PER OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_INST, 0x0064) 120#define OMAP4430_CM_DIV_M7_DPLL_PER OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_INST, 0x0064)
122#define OMAP4_CM_SSC_DELTAMSTEP_DPLL_PER_OFFSET 0x0068 121#define OMAP4_CM_SSC_DELTAMSTEP_DPLL_PER_OFFSET 0x0068
123#define OMAP4430_CM_SSC_DELTAMSTEP_DPLL_PER OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_INST, 0x0068) 122#define OMAP4430_CM_SSC_DELTAMSTEP_DPLL_PER OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_INST, 0x0068)
124#define OMAP4_CM_SSC_INSTFREQDIV_DPLL_PER_OFFSET 0x006c 123#define OMAP4_CM_SSC_MODFREQDIV_DPLL_PER_OFFSET 0x006c
125#define OMAP4430_CM_SSC_INSTFREQDIV_DPLL_PER OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_INST, 0x006c) 124#define OMAP4430_CM_SSC_MODFREQDIV_DPLL_PER OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_INST, 0x006c)
126#define OMAP4_CM_CLKMODE_DPLL_USB_OFFSET 0x0080 125#define OMAP4_CM_CLKMODE_DPLL_USB_OFFSET 0x0080
127#define OMAP4430_CM_CLKMODE_DPLL_USB OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_INST, 0x0080) 126#define OMAP4430_CM_CLKMODE_DPLL_USB OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_INST, 0x0080)
128#define OMAP4_CM_IDLEST_DPLL_USB_OFFSET 0x0084 127#define OMAP4_CM_IDLEST_DPLL_USB_OFFSET 0x0084
@@ -135,8 +134,8 @@
135#define OMAP4430_CM_DIV_M2_DPLL_USB OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_INST, 0x0090) 134#define OMAP4430_CM_DIV_M2_DPLL_USB OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_INST, 0x0090)
136#define OMAP4_CM_SSC_DELTAMSTEP_DPLL_USB_OFFSET 0x00a8 135#define OMAP4_CM_SSC_DELTAMSTEP_DPLL_USB_OFFSET 0x00a8
137#define OMAP4430_CM_SSC_DELTAMSTEP_DPLL_USB OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_INST, 0x00a8) 136#define OMAP4430_CM_SSC_DELTAMSTEP_DPLL_USB OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_INST, 0x00a8)
138#define OMAP4_CM_SSC_INSTFREQDIV_DPLL_USB_OFFSET 0x00ac 137#define OMAP4_CM_SSC_MODFREQDIV_DPLL_USB_OFFSET 0x00ac
139#define OMAP4430_CM_SSC_INSTFREQDIV_DPLL_USB OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_INST, 0x00ac) 138#define OMAP4430_CM_SSC_MODFREQDIV_DPLL_USB OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_INST, 0x00ac)
140#define OMAP4_CM_CLKDCOLDO_DPLL_USB_OFFSET 0x00b4 139#define OMAP4_CM_CLKDCOLDO_DPLL_USB_OFFSET 0x00b4
141#define OMAP4430_CM_CLKDCOLDO_DPLL_USB OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_INST, 0x00b4) 140#define OMAP4430_CM_CLKDCOLDO_DPLL_USB OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_INST, 0x00b4)
142#define OMAP4_CM_CLKMODE_DPLL_UNIPRO_OFFSET 0x00c0 141#define OMAP4_CM_CLKMODE_DPLL_UNIPRO_OFFSET 0x00c0
@@ -151,8 +150,8 @@
151#define OMAP4430_CM_DIV_M2_DPLL_UNIPRO OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_INST, 0x00d0) 150#define OMAP4430_CM_DIV_M2_DPLL_UNIPRO OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_INST, 0x00d0)
152#define OMAP4_CM_SSC_DELTAMSTEP_DPLL_UNIPRO_OFFSET 0x00e8 151#define OMAP4_CM_SSC_DELTAMSTEP_DPLL_UNIPRO_OFFSET 0x00e8
153#define OMAP4430_CM_SSC_DELTAMSTEP_DPLL_UNIPRO OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_INST, 0x00e8) 152#define OMAP4430_CM_SSC_DELTAMSTEP_DPLL_UNIPRO OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_INST, 0x00e8)
154#define OMAP4_CM_SSC_INSTFREQDIV_DPLL_UNIPRO_OFFSET 0x00ec 153#define OMAP4_CM_SSC_MODFREQDIV_DPLL_UNIPRO_OFFSET 0x00ec
155#define OMAP4430_CM_SSC_INSTFREQDIV_DPLL_UNIPRO OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_INST, 0x00ec) 154#define OMAP4430_CM_SSC_MODFREQDIV_DPLL_UNIPRO OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_INST, 0x00ec)
156 155
157/* CM2.ALWAYS_ON_CM2 register offsets */ 156/* CM2.ALWAYS_ON_CM2 register offsets */
158#define OMAP4_CM_ALWON_CLKSTCTRL_OFFSET 0x0000 157#define OMAP4_CM_ALWON_CLKSTCTRL_OFFSET 0x0000
@@ -227,8 +226,8 @@
227#define OMAP4430_CM_D2D_DYNAMICDEP OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CORE_INST, 0x0508) 226#define OMAP4430_CM_D2D_DYNAMICDEP OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CORE_INST, 0x0508)
228#define OMAP4_CM_D2D_SAD2D_CLKCTRL_OFFSET 0x0520 227#define OMAP4_CM_D2D_SAD2D_CLKCTRL_OFFSET 0x0520
229#define OMAP4430_CM_D2D_SAD2D_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CORE_INST, 0x0520) 228#define OMAP4430_CM_D2D_SAD2D_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CORE_INST, 0x0520)
230#define OMAP4_CM_D2D_INSTEM_ICR_CLKCTRL_OFFSET 0x0528 229#define OMAP4_CM_D2D_MODEM_ICR_CLKCTRL_OFFSET 0x0528
231#define OMAP4430_CM_D2D_INSTEM_ICR_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CORE_INST, 0x0528) 230#define OMAP4430_CM_D2D_MODEM_ICR_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CORE_INST, 0x0528)
232#define OMAP4_CM_D2D_SAD2D_FW_CLKCTRL_OFFSET 0x0530 231#define OMAP4_CM_D2D_SAD2D_FW_CLKCTRL_OFFSET 0x0530
233#define OMAP4430_CM_D2D_SAD2D_FW_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CORE_INST, 0x0530) 232#define OMAP4430_CM_D2D_SAD2D_FW_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CORE_INST, 0x0530)
234#define OMAP4_CM_L4CFG_CLKSTCTRL_OFFSET 0x0600 233#define OMAP4_CM_L4CFG_CLKSTCTRL_OFFSET 0x0600
@@ -450,56 +449,6 @@
450#define OMAP4_CM_CEFUSE_CEFUSE_CLKCTRL_OFFSET 0x0020 449#define OMAP4_CM_CEFUSE_CEFUSE_CLKCTRL_OFFSET 0x0020
451#define OMAP4430_CM_CEFUSE_CEFUSE_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CEFUSE_INST, 0x0020) 450#define OMAP4430_CM_CEFUSE_CEFUSE_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CEFUSE_INST, 0x0020)
452 451
453/* CM2.RESTORE_CM2 register offsets */
454#define OMAP4_CM_L3_1_CLKSTCTRL_RESTORE_OFFSET 0x0000
455#define OMAP4430_CM_L3_1_CLKSTCTRL_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x0000)
456#define OMAP4_CM_L3_2_CLKSTCTRL_RESTORE_OFFSET 0x0004
457#define OMAP4430_CM_L3_2_CLKSTCTRL_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x0004)
458#define OMAP4_CM_L4CFG_CLKSTCTRL_RESTORE_OFFSET 0x0008
459#define OMAP4430_CM_L4CFG_CLKSTCTRL_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x0008)
460#define OMAP4_CM_MEMIF_CLKSTCTRL_RESTORE_OFFSET 0x000c
461#define OMAP4430_CM_MEMIF_CLKSTCTRL_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x000c)
462#define OMAP4_CM_L4PER_CLKSTCTRL_RESTORE_OFFSET 0x0010
463#define OMAP4430_CM_L4PER_CLKSTCTRL_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x0010)
464#define OMAP4_CM_L3INIT_CLKSTCTRL_RESTORE_OFFSET 0x0014
465#define OMAP4430_CM_L3INIT_CLKSTCTRL_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x0014)
466#define OMAP4_CM_L3INSTR_L3_3_CLKCTRL_RESTORE_OFFSET 0x0018
467#define OMAP4430_CM_L3INSTR_L3_3_CLKCTRL_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x0018)
468#define OMAP4_CM_L3INSTR_L3_INSTR_CLKCTRL_RESTORE_OFFSET 0x001c
469#define OMAP4430_CM_L3INSTR_L3_INSTR_CLKCTRL_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x001c)
470#define OMAP4_CM_L3INSTR_OCP_WP1_CLKCTRL_RESTORE_OFFSET 0x0020
471#define OMAP4430_CM_L3INSTR_OCP_WP1_CLKCTRL_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x0020)
472#define OMAP4_CM_CM2_PROFILING_CLKCTRL_RESTORE_OFFSET 0x0024
473#define OMAP4430_CM_CM2_PROFILING_CLKCTRL_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x0024)
474#define OMAP4_CM_D2D_STATICDEP_RESTORE_OFFSET 0x0028
475#define OMAP4430_CM_D2D_STATICDEP_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x0028)
476#define OMAP4_CM_L3_1_DYNAMICDEP_RESTORE_OFFSET 0x002c
477#define OMAP4430_CM_L3_1_DYNAMICDEP_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x002c)
478#define OMAP4_CM_L3_2_DYNAMICDEP_RESTORE_OFFSET 0x0030
479#define OMAP4430_CM_L3_2_DYNAMICDEP_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x0030)
480#define OMAP4_CM_D2D_DYNAMICDEP_RESTORE_OFFSET 0x0034
481#define OMAP4430_CM_D2D_DYNAMICDEP_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x0034)
482#define OMAP4_CM_L4CFG_DYNAMICDEP_RESTORE_OFFSET 0x0038
483#define OMAP4430_CM_L4CFG_DYNAMICDEP_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x0038)
484#define OMAP4_CM_L4PER_DYNAMICDEP_RESTORE_OFFSET 0x003c
485#define OMAP4430_CM_L4PER_DYNAMICDEP_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x003c)
486#define OMAP4_CM_L4PER_GPIO2_CLKCTRL_RESTORE_OFFSET 0x0040
487#define OMAP4430_CM_L4PER_GPIO2_CLKCTRL_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x0040)
488#define OMAP4_CM_L4PER_GPIO3_CLKCTRL_RESTORE_OFFSET 0x0044
489#define OMAP4430_CM_L4PER_GPIO3_CLKCTRL_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x0044)
490#define OMAP4_CM_L4PER_GPIO4_CLKCTRL_RESTORE_OFFSET 0x0048
491#define OMAP4430_CM_L4PER_GPIO4_CLKCTRL_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x0048)
492#define OMAP4_CM_L4PER_GPIO5_CLKCTRL_RESTORE_OFFSET 0x004c
493#define OMAP4430_CM_L4PER_GPIO5_CLKCTRL_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x004c)
494#define OMAP4_CM_L4PER_GPIO6_CLKCTRL_RESTORE_OFFSET 0x0050
495#define OMAP4430_CM_L4PER_GPIO6_CLKCTRL_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x0050)
496#define OMAP4_CM_L3INIT_USB_HOST_CLKCTRL_RESTORE_OFFSET 0x0054
497#define OMAP4430_CM_L3INIT_USB_HOST_CLKCTRL_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x0054)
498#define OMAP4_CM_L3INIT_USB_TLL_CLKCTRL_RESTORE_OFFSET 0x0058
499#define OMAP4430_CM_L3INIT_USB_TLL_CLKCTRL_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x0058)
500#define OMAP4_CM_SDMA_STATICDEP_RESTORE_OFFSET 0x005c
501#define OMAP4430_CM_SDMA_STATICDEP_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x005c)
502
503/* Function prototypes */ 452/* Function prototypes */
504extern u32 omap4_cm2_read_inst_reg(s16 inst, u16 idx); 453extern u32 omap4_cm2_read_inst_reg(s16 inst, u16 idx);
505extern void omap4_cm2_write_inst_reg(u32 val, s16 inst, u16 idx); 454extern void omap4_cm2_write_inst_reg(u32 val, s16 inst, u16 idx);
diff --git a/arch/arm/mach-omap2/cm44xx.h b/arch/arm/mach-omap2/cm44xx.h
index 0b87ec82b41..3380beeace6 100644
--- a/arch/arm/mach-omap2/cm44xx.h
+++ b/arch/arm/mach-omap2/cm44xx.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * OMAP4 Clock Management (CM) definitions 2 * OMAP4 Clock Management (CM) definitions
3 * 3 *
4 * Copyright (C) 2007-2009 Texas Instruments, Inc. 4 * Copyright (C) 2007-2011 Texas Instruments, Inc.
5 * Copyright (C) 2007-2009 Nokia Corporation 5 * Copyright (C) 2007-2009 Nokia Corporation
6 * 6 *
7 * Written by Paul Walmsley 7 * Written by Paul Walmsley
@@ -23,10 +23,4 @@
23#define OMAP4_CM_CLKSTCTRL 0x0000 23#define OMAP4_CM_CLKSTCTRL 0x0000
24#define OMAP4_CM_STATICDEP 0x0004 24#define OMAP4_CM_STATICDEP 0x0004
25 25
26/* Function prototypes */
27# ifndef __ASSEMBLER__
28
29extern int omap4_cm_wait_module_ready(void __iomem *clkctrl_reg);
30
31# endif
32#endif 26#endif
diff --git a/arch/arm/mach-omap2/cminst44xx.c b/arch/arm/mach-omap2/cminst44xx.c
index a482bfa0a95..eb2a472bbf4 100644
--- a/arch/arm/mach-omap2/cminst44xx.c
+++ b/arch/arm/mach-omap2/cminst44xx.c
@@ -2,6 +2,7 @@
2 * OMAP4 CM instance functions 2 * OMAP4 CM instance functions
3 * 3 *
4 * Copyright (C) 2009 Nokia Corporation 4 * Copyright (C) 2009 Nokia Corporation
5 * Copyright (C) 2011 Texas Instruments, Inc.
5 * Paul Walmsley 6 * Paul Walmsley
6 * 7 *
7 * This program is free software; you can redistribute it and/or modify 8 * This program is free software; you can redistribute it and/or modify
@@ -32,6 +33,22 @@
32#include "prm44xx.h" 33#include "prm44xx.h"
33#include "prcm_mpu44xx.h" 34#include "prcm_mpu44xx.h"
34 35
36/*
37 * CLKCTRL_IDLEST_*: possible values for the CM_*_CLKCTRL.IDLEST bitfield:
38 *
39 * 0x0 func: Module is fully functional, including OCP
40 * 0x1 trans: Module is performing transition: wakeup, or sleep, or sleep
41 * abortion
42 * 0x2 idle: Module is in Idle mode (only OCP part). It is functional if
43 * using separate functional clock
44 * 0x3 disabled: Module is disabled and cannot be accessed
45 *
46 */
47#define CLKCTRL_IDLEST_FUNCTIONAL 0x0
48#define CLKCTRL_IDLEST_INTRANSITION 0x1
49#define CLKCTRL_IDLEST_INTERFACE_IDLE 0x2
50#define CLKCTRL_IDLEST_DISABLED 0x3
51
35static u32 _cm_bases[OMAP4_MAX_PRCM_PARTITIONS] = { 52static u32 _cm_bases[OMAP4_MAX_PRCM_PARTITIONS] = {
36 [OMAP4430_INVALID_PRCM_PARTITION] = 0, 53 [OMAP4430_INVALID_PRCM_PARTITION] = 0,
37 [OMAP4430_PRM_PARTITION] = OMAP4430_PRM_BASE, 54 [OMAP4430_PRM_PARTITION] = OMAP4430_PRM_BASE,
@@ -41,6 +58,48 @@ static u32 _cm_bases[OMAP4_MAX_PRCM_PARTITIONS] = {
41 [OMAP4430_PRCM_MPU_PARTITION] = OMAP4430_PRCM_MPU_BASE, 58 [OMAP4430_PRCM_MPU_PARTITION] = OMAP4430_PRCM_MPU_BASE,
42}; 59};
43 60
61/* Private functions */
62
63/**
64 * _clkctrl_idlest - read a CM_*_CLKCTRL register; mask & shift IDLEST bitfield
65 * @part: PRCM partition ID that the CM_CLKCTRL register exists in
66 * @inst: CM instance register offset (*_INST macro)
67 * @cdoffs: Clockdomain register offset (*_CDOFFS macro)
68 * @clkctrl_offs: Module clock control register offset (*_CLKCTRL macro)
69 *
70 * Return the IDLEST bitfield of a CM_*_CLKCTRL register, shifted down to
71 * bit 0.
72 */
73static u32 _clkctrl_idlest(u8 part, u16 inst, s16 cdoffs, u16 clkctrl_offs)
74{
75 u32 v = omap4_cminst_read_inst_reg(part, inst, clkctrl_offs);
76 v &= OMAP4430_IDLEST_MASK;
77 v >>= OMAP4430_IDLEST_SHIFT;
78 return v;
79}
80
81/**
82 * _is_module_ready - can module registers be accessed without causing an abort?
83 * @part: PRCM partition ID that the CM_CLKCTRL register exists in
84 * @inst: CM instance register offset (*_INST macro)
85 * @cdoffs: Clockdomain register offset (*_CDOFFS macro)
86 * @clkctrl_offs: Module clock control register offset (*_CLKCTRL macro)
87 *
88 * Returns true if the module's CM_*_CLKCTRL.IDLEST bitfield is either
89 * *FUNCTIONAL or *INTERFACE_IDLE; false otherwise.
90 */
91static bool _is_module_ready(u8 part, u16 inst, s16 cdoffs, u16 clkctrl_offs)
92{
93 u32 v;
94
95 v = _clkctrl_idlest(part, inst, cdoffs, clkctrl_offs);
96
97 return (v == CLKCTRL_IDLEST_FUNCTIONAL ||
98 v == CLKCTRL_IDLEST_INTERFACE_IDLE) ? true : false;
99}
100
101/* Public functions */
102
44/* Read a register in a CM instance */ 103/* Read a register in a CM instance */
45u32 omap4_cminst_read_inst_reg(u8 part, s16 inst, u16 idx) 104u32 omap4_cminst_read_inst_reg(u8 part, s16 inst, u16 idx)
46{ 105{
@@ -200,36 +259,93 @@ void omap4_cminst_clkdm_force_wakeup(u8 part, s16 inst, u16 cdoffs)
200 */ 259 */
201 260
202/** 261/**
203 * omap4_cm_wait_module_ready - wait for a module to be in 'func' state 262 * omap4_cminst_wait_module_ready - wait for a module to be in 'func' state
204 * @clkctrl_reg: CLKCTRL module address 263 * @part: PRCM partition ID that the CM_CLKCTRL register exists in
264 * @inst: CM instance register offset (*_INST macro)
265 * @cdoffs: Clockdomain register offset (*_CDOFFS macro)
266 * @clkctrl_offs: Module clock control register offset (*_CLKCTRL macro)
205 * 267 *
206 * Wait for the module IDLEST to be functional. If the idle state is in any 268 * Wait for the module IDLEST to be functional. If the idle state is in any
207 * the non functional state (trans, idle or disabled), module and thus the 269 * the non functional state (trans, idle or disabled), module and thus the
208 * sysconfig cannot be accessed and will probably lead to an "imprecise 270 * sysconfig cannot be accessed and will probably lead to an "imprecise
209 * external abort" 271 * external abort"
272 */
273int omap4_cminst_wait_module_ready(u8 part, u16 inst, s16 cdoffs,
274 u16 clkctrl_offs)
275{
276 int i = 0;
277
278 if (!clkctrl_offs)
279 return 0;
280
281 omap_test_timeout(_is_module_ready(part, inst, cdoffs, clkctrl_offs),
282 MAX_MODULE_READY_TIME, i);
283
284 return (i < MAX_MODULE_READY_TIME) ? 0 : -EBUSY;
285}
286
287/**
288 * omap4_cminst_wait_module_idle - wait for a module to be in 'disabled'
289 * state
290 * @part: PRCM partition ID that the CM_CLKCTRL register exists in
291 * @inst: CM instance register offset (*_INST macro)
292 * @cdoffs: Clockdomain register offset (*_CDOFFS macro)
293 * @clkctrl_offs: Module clock control register offset (*_CLKCTRL macro)
210 * 294 *
211 * Module idle state: 295 * Wait for the module IDLEST to be disabled. Some PRCM transition,
212 * 0x0 func: Module is fully functional, including OCP 296 * like reset assertion or parent clock de-activation must wait the
213 * 0x1 trans: Module is performing transition: wakeup, or sleep, or sleep 297 * module to be fully disabled.
214 * abortion
215 * 0x2 idle: Module is in Idle mode (only OCP part). It is functional if
216 * using separate functional clock
217 * 0x3 disabled: Module is disabled and cannot be accessed
218 *
219 */ 298 */
220int omap4_cm_wait_module_ready(void __iomem *clkctrl_reg) 299int omap4_cminst_wait_module_idle(u8 part, u16 inst, s16 cdoffs, u16 clkctrl_offs)
221{ 300{
222 int i = 0; 301 int i = 0;
223 302
224 if (!clkctrl_reg) 303 if (!clkctrl_offs)
225 return 0; 304 return 0;
226 305
227 omap_test_timeout(( 306 omap_test_timeout((_clkctrl_idlest(part, inst, cdoffs, clkctrl_offs) ==
228 ((__raw_readl(clkctrl_reg) & OMAP4430_IDLEST_MASK) == 0) || 307 CLKCTRL_IDLEST_DISABLED),
229 (((__raw_readl(clkctrl_reg) & OMAP4430_IDLEST_MASK) >> 308 MAX_MODULE_READY_TIME, i);
230 OMAP4430_IDLEST_SHIFT) == 0x2)),
231 MAX_MODULE_READY_TIME, i);
232 309
233 return (i < MAX_MODULE_READY_TIME) ? 0 : -EBUSY; 310 return (i < MAX_MODULE_READY_TIME) ? 0 : -EBUSY;
234} 311}
235 312
313/**
314 * omap4_cminst_module_enable - Enable the modulemode inside CLKCTRL
315 * @mode: Module mode (SW or HW)
316 * @part: PRCM partition ID that the CM_CLKCTRL register exists in
317 * @inst: CM instance register offset (*_INST macro)
318 * @cdoffs: Clockdomain register offset (*_CDOFFS macro)
319 * @clkctrl_offs: Module clock control register offset (*_CLKCTRL macro)
320 *
321 * No return value.
322 */
323void omap4_cminst_module_enable(u8 mode, u8 part, u16 inst, s16 cdoffs,
324 u16 clkctrl_offs)
325{
326 u32 v;
327
328 v = omap4_cminst_read_inst_reg(part, inst, clkctrl_offs);
329 v &= ~OMAP4430_MODULEMODE_MASK;
330 v |= mode << OMAP4430_MODULEMODE_SHIFT;
331 omap4_cminst_write_inst_reg(v, part, inst, clkctrl_offs);
332}
333
334/**
335 * omap4_cminst_module_disable - Disable the module inside CLKCTRL
336 * @part: PRCM partition ID that the CM_CLKCTRL register exists in
337 * @inst: CM instance register offset (*_INST macro)
338 * @cdoffs: Clockdomain register offset (*_CDOFFS macro)
339 * @clkctrl_offs: Module clock control register offset (*_CLKCTRL macro)
340 *
341 * No return value.
342 */
343void omap4_cminst_module_disable(u8 part, u16 inst, s16 cdoffs,
344 u16 clkctrl_offs)
345{
346 u32 v;
347
348 v = omap4_cminst_read_inst_reg(part, inst, clkctrl_offs);
349 v &= ~OMAP4430_MODULEMODE_MASK;
350 omap4_cminst_write_inst_reg(v, part, inst, clkctrl_offs);
351}
diff --git a/arch/arm/mach-omap2/cminst44xx.h b/arch/arm/mach-omap2/cminst44xx.h
index 2b32c181a2e..f2ea6453ade 100644
--- a/arch/arm/mach-omap2/cminst44xx.h
+++ b/arch/arm/mach-omap2/cminst44xx.h
@@ -17,6 +17,14 @@ extern void omap4_cminst_clkdm_disable_hwsup(u8 part, s16 inst, u16 cdoffs);
17extern void omap4_cminst_clkdm_force_sleep(u8 part, s16 inst, u16 cdoffs); 17extern void omap4_cminst_clkdm_force_sleep(u8 part, s16 inst, u16 cdoffs);
18extern void omap4_cminst_clkdm_force_wakeup(u8 part, s16 inst, u16 cdoffs); 18extern void omap4_cminst_clkdm_force_wakeup(u8 part, s16 inst, u16 cdoffs);
19 19
20extern int omap4_cminst_wait_module_ready(u8 part, u16 inst, s16 cdoffs, u16 clkctrl_offs);
21extern int omap4_cminst_wait_module_idle(u8 part, u16 inst, s16 cdoffs, u16 clkctrl_offs);
22
23extern void omap4_cminst_module_enable(u8 mode, u8 part, u16 inst, s16 cdoffs,
24 u16 clkctrl_offs);
25extern void omap4_cminst_module_disable(u8 part, u16 inst, s16 cdoffs,
26 u16 clkctrl_offs);
27
20/* 28/*
21 * In an ideal world, we would not export these low-level functions, 29 * In an ideal world, we would not export these low-level functions,
22 * but this will probably take some time to fix properly 30 * but this will probably take some time to fix properly
@@ -32,6 +40,4 @@ extern u32 omap4_cminst_clear_inst_reg_bits(u32 bits, u8 part, s16 inst,
32extern u32 omap4_cminst_read_inst_reg_bits(u8 part, u16 inst, s16 idx, 40extern u32 omap4_cminst_read_inst_reg_bits(u8 part, u16 inst, s16 idx,
33 u32 mask); 41 u32 mask);
34 42
35extern int omap4_cm_wait_module_ready(void __iomem *clkctrl_reg);
36
37#endif 43#endif
diff --git a/arch/arm/mach-omap2/common-board-devices.c b/arch/arm/mach-omap2/common-board-devices.c
index 94ccf464677..bcb0c581716 100644
--- a/arch/arm/mach-omap2/common-board-devices.c
+++ b/arch/arm/mach-omap2/common-board-devices.c
@@ -20,36 +20,15 @@
20 * 20 *
21 */ 21 */
22 22
23#include <linux/i2c.h>
24#include <linux/i2c/twl.h>
25
26#include <linux/gpio.h> 23#include <linux/gpio.h>
27#include <linux/spi/spi.h> 24#include <linux/spi/spi.h>
28#include <linux/spi/ads7846.h> 25#include <linux/spi/ads7846.h>
29 26
30#include <plat/i2c.h>
31#include <plat/mcspi.h> 27#include <plat/mcspi.h>
32#include <plat/nand.h> 28#include <plat/nand.h>
33 29
34#include "common-board-devices.h" 30#include "common-board-devices.h"
35 31
36static struct i2c_board_info __initdata pmic_i2c_board_info = {
37 .addr = 0x48,
38 .flags = I2C_CLIENT_WAKE,
39};
40
41void __init omap_pmic_init(int bus, u32 clkrate,
42 const char *pmic_type, int pmic_irq,
43 struct twl4030_platform_data *pmic_data)
44{
45 strncpy(pmic_i2c_board_info.type, pmic_type,
46 sizeof(pmic_i2c_board_info.type));
47 pmic_i2c_board_info.irq = pmic_irq;
48 pmic_i2c_board_info.platform_data = pmic_data;
49
50 omap_register_i2c_bus(bus, clkrate, &pmic_i2c_board_info, 1);
51}
52
53#if defined(CONFIG_TOUCHSCREEN_ADS7846) || \ 32#if defined(CONFIG_TOUCHSCREEN_ADS7846) || \
54 defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE) 33 defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE)
55static struct omap2_mcspi_device_config ads7846_mcspi_config = { 34static struct omap2_mcspi_device_config ads7846_mcspi_config = {
@@ -115,9 +94,7 @@ void __init omap_ads7846_init(int bus_num, int gpio_pendown, int gpio_debounce,
115#endif 94#endif
116 95
117#if defined(CONFIG_MTD_NAND_OMAP2) || defined(CONFIG_MTD_NAND_OMAP2_MODULE) 96#if defined(CONFIG_MTD_NAND_OMAP2) || defined(CONFIG_MTD_NAND_OMAP2_MODULE)
118static struct omap_nand_platform_data nand_data = { 97static struct omap_nand_platform_data nand_data;
119 .dma_channel = -1, /* disable DMA in OMAP NAND driver */
120};
121 98
122void __init omap_nand_flash_init(int options, struct mtd_partition *parts, 99void __init omap_nand_flash_init(int options, struct mtd_partition *parts,
123 int nr_parts) 100 int nr_parts)
@@ -148,7 +125,7 @@ void __init omap_nand_flash_init(int options, struct mtd_partition *parts,
148 nand_data.cs = nandcs; 125 nand_data.cs = nandcs;
149 nand_data.parts = parts; 126 nand_data.parts = parts;
150 nand_data.nr_parts = nr_parts; 127 nand_data.nr_parts = nr_parts;
151 nand_data.options = options; 128 nand_data.devsize = options;
152 129
153 printk(KERN_INFO "Registering NAND on CS%d\n", nandcs); 130 printk(KERN_INFO "Registering NAND on CS%d\n", nandcs);
154 if (gpmc_nand_init(&nand_data) < 0) 131 if (gpmc_nand_init(&nand_data) < 0)
diff --git a/arch/arm/mach-omap2/common-board-devices.h b/arch/arm/mach-omap2/common-board-devices.h
index 679719051df..a0b4a42836a 100644
--- a/arch/arm/mach-omap2/common-board-devices.h
+++ b/arch/arm/mach-omap2/common-board-devices.h
@@ -1,33 +1,11 @@
1#ifndef __OMAP_COMMON_BOARD_DEVICES__ 1#ifndef __OMAP_COMMON_BOARD_DEVICES__
2#define __OMAP_COMMON_BOARD_DEVICES__ 2#define __OMAP_COMMON_BOARD_DEVICES__
3 3
4#include "twl-common.h"
5
4#define NAND_BLOCK_SIZE SZ_128K 6#define NAND_BLOCK_SIZE SZ_128K
5 7
6struct twl4030_platform_data;
7struct mtd_partition; 8struct mtd_partition;
8
9void omap_pmic_init(int bus, u32 clkrate, const char *pmic_type, int pmic_irq,
10 struct twl4030_platform_data *pmic_data);
11
12static inline void omap2_pmic_init(const char *pmic_type,
13 struct twl4030_platform_data *pmic_data)
14{
15 omap_pmic_init(2, 2600, pmic_type, INT_24XX_SYS_NIRQ, pmic_data);
16}
17
18static inline void omap3_pmic_init(const char *pmic_type,
19 struct twl4030_platform_data *pmic_data)
20{
21 omap_pmic_init(1, 2600, pmic_type, INT_34XX_SYS_NIRQ, pmic_data);
22}
23
24static inline void omap4_pmic_init(const char *pmic_type,
25 struct twl4030_platform_data *pmic_data)
26{
27 /* Phoenix Audio IC needs I2C1 to start with 400 KHz or less */
28 omap_pmic_init(1, 400, pmic_type, OMAP44XX_IRQ_SYS_1N, pmic_data);
29}
30
31struct ads7846_platform_data; 9struct ads7846_platform_data;
32 10
33void omap_ads7846_init(int bus_num, int gpio_pendown, int gpio_debounce, 11void omap_ads7846_init(int bus_num, int gpio_pendown, int gpio_debounce,
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index 5b8ca680ed9..1077ad663f9 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -230,7 +230,7 @@ struct omap_device_pm_latency omap_keyboard_latency[] = {
230}; 230};
231 231
232int __init omap4_keyboard_init(struct omap4_keypad_platform_data 232int __init omap4_keyboard_init(struct omap4_keypad_platform_data
233 *sdp4430_keypad_data) 233 *sdp4430_keypad_data, struct omap_board_data *bdata)
234{ 234{
235 struct omap_device *od; 235 struct omap_device *od;
236 struct omap_hwmod *oh; 236 struct omap_hwmod *oh;
@@ -257,6 +257,7 @@ int __init omap4_keyboard_init(struct omap4_keypad_platform_data
257 name, oh->name); 257 name, oh->name);
258 return PTR_ERR(od); 258 return PTR_ERR(od);
259 } 259 }
260 oh->mux = omap_hwmod_mux_init(bdata->pads, bdata->pads_cnt);
260 261
261 return 0; 262 return 0;
262} 263}
diff --git a/arch/arm/mach-omap2/gpmc-nand.c b/arch/arm/mach-omap2/gpmc-nand.c
index c1791d08ae5..8ad210bda9a 100644
--- a/arch/arm/mach-omap2/gpmc-nand.c
+++ b/arch/arm/mach-omap2/gpmc-nand.c
@@ -20,8 +20,6 @@
20#include <plat/board.h> 20#include <plat/board.h>
21#include <plat/gpmc.h> 21#include <plat/gpmc.h>
22 22
23static struct omap_nand_platform_data *gpmc_nand_data;
24
25static struct resource gpmc_nand_resource = { 23static struct resource gpmc_nand_resource = {
26 .flags = IORESOURCE_MEM, 24 .flags = IORESOURCE_MEM,
27}; 25};
@@ -33,7 +31,7 @@ static struct platform_device gpmc_nand_device = {
33 .resource = &gpmc_nand_resource, 31 .resource = &gpmc_nand_resource,
34}; 32};
35 33
36static int omap2_nand_gpmc_retime(void) 34static int omap2_nand_gpmc_retime(struct omap_nand_platform_data *gpmc_nand_data)
37{ 35{
38 struct gpmc_timings t; 36 struct gpmc_timings t;
39 int err; 37 int err;
@@ -83,13 +81,11 @@ static int omap2_nand_gpmc_retime(void)
83 return 0; 81 return 0;
84} 82}
85 83
86int __init gpmc_nand_init(struct omap_nand_platform_data *_nand_data) 84int __init gpmc_nand_init(struct omap_nand_platform_data *gpmc_nand_data)
87{ 85{
88 int err = 0; 86 int err = 0;
89 struct device *dev = &gpmc_nand_device.dev; 87 struct device *dev = &gpmc_nand_device.dev;
90 88
91 gpmc_nand_data = _nand_data;
92 gpmc_nand_data->nand_setup = omap2_nand_gpmc_retime;
93 gpmc_nand_device.dev.platform_data = gpmc_nand_data; 89 gpmc_nand_device.dev.platform_data = gpmc_nand_data;
94 90
95 err = gpmc_cs_request(gpmc_nand_data->cs, NAND_IO_SIZE, 91 err = gpmc_cs_request(gpmc_nand_data->cs, NAND_IO_SIZE,
@@ -100,7 +96,7 @@ int __init gpmc_nand_init(struct omap_nand_platform_data *_nand_data)
100 } 96 }
101 97
102 /* Set timings in GPMC */ 98 /* Set timings in GPMC */
103 err = omap2_nand_gpmc_retime(); 99 err = omap2_nand_gpmc_retime(gpmc_nand_data);
104 if (err < 0) { 100 if (err < 0) {
105 dev_err(dev, "Unable to set gpmc timings: %d\n", err); 101 dev_err(dev, "Unable to set gpmc timings: %d\n", err);
106 return err; 102 return err;
diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c
index 66868c5d5a2..a9b45c76e1d 100644
--- a/arch/arm/mach-omap2/hsmmc.c
+++ b/arch/arm/mach-omap2/hsmmc.c
@@ -13,6 +13,7 @@
13#include <linux/slab.h> 13#include <linux/slab.h>
14#include <linux/string.h> 14#include <linux/string.h>
15#include <linux/delay.h> 15#include <linux/delay.h>
16#include <linux/gpio.h>
16#include <mach/hardware.h> 17#include <mach/hardware.h>
17#include <plat/mmc.h> 18#include <plat/mmc.h>
18#include <plat/omap-pm.h> 19#include <plat/omap-pm.h>
@@ -213,12 +214,10 @@ static int nop_mmc_set_power(struct device *dev, int slot, int power_on,
213static inline void omap_hsmmc_mux(struct omap_mmc_platform_data *mmc_controller, 214static inline void omap_hsmmc_mux(struct omap_mmc_platform_data *mmc_controller,
214 int controller_nr) 215 int controller_nr)
215{ 216{
216 if ((mmc_controller->slots[0].switch_pin > 0) && \ 217 if (gpio_is_valid(mmc_controller->slots[0].switch_pin))
217 (mmc_controller->slots[0].switch_pin < OMAP_MAX_GPIO_LINES))
218 omap_mux_init_gpio(mmc_controller->slots[0].switch_pin, 218 omap_mux_init_gpio(mmc_controller->slots[0].switch_pin,
219 OMAP_PIN_INPUT_PULLUP); 219 OMAP_PIN_INPUT_PULLUP);
220 if ((mmc_controller->slots[0].gpio_wp > 0) && \ 220 if (gpio_is_valid(mmc_controller->slots[0].gpio_wp))
221 (mmc_controller->slots[0].gpio_wp < OMAP_MAX_GPIO_LINES))
222 omap_mux_init_gpio(mmc_controller->slots[0].gpio_wp, 221 omap_mux_init_gpio(mmc_controller->slots[0].gpio_wp,
223 OMAP_PIN_INPUT_PULLUP); 222 OMAP_PIN_INPUT_PULLUP);
224 if (cpu_is_omap34xx()) { 223 if (cpu_is_omap34xx()) {
diff --git a/arch/arm/mach-omap2/i2c.c b/arch/arm/mach-omap2/i2c.c
index 79c478c4cb1..ace99944e96 100644
--- a/arch/arm/mach-omap2/i2c.c
+++ b/arch/arm/mach-omap2/i2c.c
@@ -21,9 +21,19 @@
21 21
22#include <plat/cpu.h> 22#include <plat/cpu.h>
23#include <plat/i2c.h> 23#include <plat/i2c.h>
24#include <plat/common.h>
25#include <plat/omap_hwmod.h>
24 26
25#include "mux.h" 27#include "mux.h"
26 28
29/* In register I2C_CON, Bit 15 is the I2C enable bit */
30#define I2C_EN BIT(15)
31#define OMAP2_I2C_CON_OFFSET 0x24
32#define OMAP4_I2C_CON_OFFSET 0xA4
33
34/* Maximum microseconds to wait for OMAP module to softreset */
35#define MAX_MODULE_SOFTRESET_WAIT 10000
36
27void __init omap2_i2c_mux_pins(int bus_id) 37void __init omap2_i2c_mux_pins(int bus_id)
28{ 38{
29 char mux_name[sizeof("i2c2_scl.i2c2_scl")]; 39 char mux_name[sizeof("i2c2_scl.i2c2_scl")];
@@ -37,3 +47,61 @@ void __init omap2_i2c_mux_pins(int bus_id)
37 sprintf(mux_name, "i2c%i_sda.i2c%i_sda", bus_id, bus_id); 47 sprintf(mux_name, "i2c%i_sda.i2c%i_sda", bus_id, bus_id);
38 omap_mux_init_signal(mux_name, OMAP_PIN_INPUT); 48 omap_mux_init_signal(mux_name, OMAP_PIN_INPUT);
39} 49}
50
51/**
52 * omap_i2c_reset - reset the omap i2c module.
53 * @oh: struct omap_hwmod *
54 *
55 * The i2c moudle in omap2, omap3 had a special sequence to reset. The
56 * sequence is:
57 * - Disable the I2C.
58 * - Write to SOFTRESET bit.
59 * - Enable the I2C.
60 * - Poll on the RESETDONE bit.
61 * The sequence is implemented in below function. This is called for 2420,
62 * 2430 and omap3.
63 */
64int omap_i2c_reset(struct omap_hwmod *oh)
65{
66 u32 v;
67 u16 i2c_con;
68 int c = 0;
69
70 if (oh->class->rev == OMAP_I2C_IP_VERSION_2) {
71 i2c_con = OMAP4_I2C_CON_OFFSET;
72 } else if (oh->class->rev == OMAP_I2C_IP_VERSION_1) {
73 i2c_con = OMAP2_I2C_CON_OFFSET;
74 } else {
75 WARN(1, "Cannot reset I2C block %s: unsupported revision\n",
76 oh->name);
77 return -EINVAL;
78 }
79
80 /* Disable I2C */
81 v = omap_hwmod_read(oh, i2c_con);
82 v &= ~I2C_EN;
83 omap_hwmod_write(v, oh, i2c_con);
84
85 /* Write to the SOFTRESET bit */
86 omap_hwmod_softreset(oh);
87
88 /* Enable I2C */
89 v = omap_hwmod_read(oh, i2c_con);
90 v |= I2C_EN;
91 omap_hwmod_write(v, oh, i2c_con);
92
93 /* Poll on RESETDONE bit */
94 omap_test_timeout((omap_hwmod_read(oh,
95 oh->class->sysc->syss_offs)
96 & SYSS_RESETDONE_MASK),
97 MAX_MODULE_SOFTRESET_WAIT, c);
98
99 if (c == MAX_MODULE_SOFTRESET_WAIT)
100 pr_warning("%s: %s: softreset failed (waited %d usec)\n",
101 __func__, oh->name, MAX_MODULE_SOFTRESET_WAIT);
102 else
103 pr_debug("%s: %s: softreset in %d usec\n", __func__,
104 oh->name, c);
105
106 return 0;
107}
diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
index 2537090aa33..37efb869692 100644
--- a/arch/arm/mach-omap2/id.c
+++ b/arch/arm/mach-omap2/id.c
@@ -31,7 +31,7 @@
31static struct omap_chip_id omap_chip; 31static struct omap_chip_id omap_chip;
32static unsigned int omap_revision; 32static unsigned int omap_revision;
33 33
34u32 omap3_features; 34u32 omap_features;
35 35
36unsigned int omap_rev(void) 36unsigned int omap_rev(void)
37{ 37{
@@ -183,14 +183,14 @@ static void __init omap24xx_check_revision(void)
183#define OMAP3_CHECK_FEATURE(status,feat) \ 183#define OMAP3_CHECK_FEATURE(status,feat) \
184 if (((status & OMAP3_ ##feat## _MASK) \ 184 if (((status & OMAP3_ ##feat## _MASK) \
185 >> OMAP3_ ##feat## _SHIFT) != FEAT_ ##feat## _NONE) { \ 185 >> OMAP3_ ##feat## _SHIFT) != FEAT_ ##feat## _NONE) { \
186 omap3_features |= OMAP3_HAS_ ##feat; \ 186 omap_features |= OMAP3_HAS_ ##feat; \
187 } 187 }
188 188
189static void __init omap3_check_features(void) 189static void __init omap3_check_features(void)
190{ 190{
191 u32 status; 191 u32 status;
192 192
193 omap3_features = 0; 193 omap_features = 0;
194 194
195 status = omap_ctrl_readl(OMAP3_CONTROL_OMAP_STATUS); 195 status = omap_ctrl_readl(OMAP3_CONTROL_OMAP_STATUS);
196 196
@@ -200,11 +200,11 @@ static void __init omap3_check_features(void)
200 OMAP3_CHECK_FEATURE(status, NEON); 200 OMAP3_CHECK_FEATURE(status, NEON);
201 OMAP3_CHECK_FEATURE(status, ISP); 201 OMAP3_CHECK_FEATURE(status, ISP);
202 if (cpu_is_omap3630()) 202 if (cpu_is_omap3630())
203 omap3_features |= OMAP3_HAS_192MHZ_CLK; 203 omap_features |= OMAP3_HAS_192MHZ_CLK;
204 if (!cpu_is_omap3505() && !cpu_is_omap3517()) 204 if (!cpu_is_omap3505() && !cpu_is_omap3517())
205 omap3_features |= OMAP3_HAS_IO_WAKEUP; 205 omap_features |= OMAP3_HAS_IO_WAKEUP;
206 206
207 omap3_features |= OMAP3_HAS_SDRC; 207 omap_features |= OMAP3_HAS_SDRC;
208 208
209 /* 209 /*
210 * TODO: Get additional info (where applicable) 210 * TODO: Get additional info (where applicable)
@@ -212,9 +212,34 @@ static void __init omap3_check_features(void)
212 */ 212 */
213} 213}
214 214
215static void __init omap4_check_features(void)
216{
217 u32 si_type;
218
219 if (cpu_is_omap443x())
220 omap_features |= OMAP4_HAS_MPU_1GHZ;
221
222
223 if (cpu_is_omap446x()) {
224 si_type =
225 read_tap_reg(OMAP4_CTRL_MODULE_CORE_STD_FUSE_PROD_ID_1);
226 switch ((si_type & (3 << 16)) >> 16) {
227 case 2:
228 /* High performance device */
229 omap_features |= OMAP4_HAS_MPU_1_5GHZ;
230 break;
231 case 1:
232 default:
233 /* Standard device */
234 omap_features |= OMAP4_HAS_MPU_1_2GHZ;
235 break;
236 }
237 }
238}
239
215static void __init ti816x_check_features(void) 240static void __init ti816x_check_features(void)
216{ 241{
217 omap3_features = OMAP3_HAS_NEON; 242 omap_features = OMAP3_HAS_NEON;
218} 243}
219 244
220static void __init omap3_check_revision(void) 245static void __init omap3_check_revision(void)
@@ -344,10 +369,10 @@ static void __init omap4_check_revision(void)
344 rev = (idcode >> 28) & 0xf; 369 rev = (idcode >> 28) & 0xf;
345 370
346 /* 371 /*
347 * Few initial ES2.0 samples IDCODE is same as ES1.0 372 * Few initial 4430 ES2.0 samples IDCODE is same as ES1.0
348 * Use ARM register to detect the correct ES version 373 * Use ARM register to detect the correct ES version
349 */ 374 */
350 if (!rev) { 375 if (!rev && (hawkeye != 0xb94e)) {
351 idcode = read_cpuid(CPUID_ID); 376 idcode = read_cpuid(CPUID_ID);
352 rev = (idcode & 0xf) - 1; 377 rev = (idcode & 0xf) - 1;
353 } 378 }
@@ -377,6 +402,15 @@ static void __init omap4_check_revision(void)
377 omap_chip.oc |= CHIP_IS_OMAP4430ES2_2; 402 omap_chip.oc |= CHIP_IS_OMAP4430ES2_2;
378 } 403 }
379 break; 404 break;
405 case 0xb94e:
406 switch (rev) {
407 case 0:
408 default:
409 omap_revision = OMAP4460_REV_ES1_0;
410 omap_chip.oc |= CHIP_IS_OMAP4460ES1_0;
411 break;
412 }
413 break;
380 default: 414 default:
381 /* Unknown default to latest silicon rev as default */ 415 /* Unknown default to latest silicon rev as default */
382 omap_revision = OMAP4430_REV_ES2_2; 416 omap_revision = OMAP4430_REV_ES2_2;
@@ -518,6 +552,7 @@ void __init omap2_check_revision(void)
518 return; 552 return;
519 } else if (cpu_is_omap44xx()) { 553 } else if (cpu_is_omap44xx()) {
520 omap4_check_revision(); 554 omap4_check_revision();
555 omap4_check_features();
521 return; 556 return;
522 } else { 557 } else {
523 pr_err("OMAP revision unknown, please fix!\n"); 558 pr_err("OMAP revision unknown, please fix!\n");
diff --git a/arch/arm/mach-omap2/include/mach/clkdev.h b/arch/arm/mach-omap2/include/mach/clkdev.h
deleted file mode 100644
index 53b027441c5..00000000000
--- a/arch/arm/mach-omap2/include/mach/clkdev.h
+++ /dev/null
@@ -1,5 +0,0 @@
1/*
2 * arch/arm/mach-omap2/include/mach/clkdev.h
3 */
4
5#include <plat/clkdev.h>
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
index 441e79d043a..2ce1ce6fb4d 100644
--- a/arch/arm/mach-omap2/io.c
+++ b/arch/arm/mach-omap2/io.c
@@ -333,23 +333,9 @@ static int _set_hwmod_postsetup_state(struct omap_hwmod *oh, void *data)
333 return omap_hwmod_set_postsetup_state(oh, *(u8 *)data); 333 return omap_hwmod_set_postsetup_state(oh, *(u8 *)data);
334} 334}
335 335
336/* See irq.c, omap4-common.c and entry-macro.S */
336void __iomem *omap_irq_base; 337void __iomem *omap_irq_base;
337 338
338/*
339 * Initialize asm_irq_base for entry-macro.S
340 */
341static inline void omap_irq_base_init(void)
342{
343 if (cpu_is_omap24xx())
344 omap_irq_base = OMAP2_L4_IO_ADDRESS(OMAP24XX_IC_BASE);
345 else if (cpu_is_omap34xx())
346 omap_irq_base = OMAP2_L4_IO_ADDRESS(OMAP34XX_IC_BASE);
347 else if (cpu_is_omap44xx())
348 omap_irq_base = OMAP2_L4_IO_ADDRESS(OMAP44XX_GIC_CPU_BASE);
349 else
350 pr_err("Could not initialize omap_irq_base\n");
351}
352
353void __init omap2_init_common_infrastructure(void) 339void __init omap2_init_common_infrastructure(void)
354{ 340{
355 u8 postsetup_state; 341 u8 postsetup_state;
@@ -422,7 +408,6 @@ void __init omap2_init_common_devices(struct omap_sdrc_params *sdrc_cs0,
422 _omap2_init_reprogram_sdrc(); 408 _omap2_init_reprogram_sdrc();
423 } 409 }
424 410
425 omap_irq_base_init();
426} 411}
427 412
428/* 413/*
diff --git a/arch/arm/mach-omap2/iommu2.c b/arch/arm/mach-omap2/iommu2.c
index adb083e41ac..f286012783c 100644
--- a/arch/arm/mach-omap2/iommu2.c
+++ b/arch/arm/mach-omap2/iommu2.c
@@ -225,8 +225,8 @@ static u32 omap2_get_pte_attr(struct iotlb_entry *e)
225 attr = e->mixed << 5; 225 attr = e->mixed << 5;
226 attr |= e->endian; 226 attr |= e->endian;
227 attr |= e->elsz >> 3; 227 attr |= e->elsz >> 3;
228 attr <<= ((e->pgsz & MMU_CAM_PGSZ_4K) ? 0 : 6); 228 attr <<= (((e->pgsz == MMU_CAM_PGSZ_4K) ||
229 229 (e->pgsz == MMU_CAM_PGSZ_64K)) ? 0 : 6);
230 return attr; 230 return attr;
231} 231}
232 232
diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
index 3af2b7a1045..3a12f7586a4 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -141,25 +141,20 @@ omap_alloc_gc(void __iomem *base, unsigned int irq_start, unsigned int num)
141 IRQ_NOREQUEST | IRQ_NOPROBE, 0); 141 IRQ_NOREQUEST | IRQ_NOPROBE, 0);
142} 142}
143 143
144void __init omap_init_irq(void) 144static void __init omap_init_irq(u32 base, int nr_irqs)
145{ 145{
146 unsigned long nr_of_irqs = 0; 146 unsigned long nr_of_irqs = 0;
147 unsigned int nr_banks = 0; 147 unsigned int nr_banks = 0;
148 int i, j; 148 int i, j;
149 149
150 omap_irq_base = ioremap(base, SZ_4K);
151 if (WARN_ON(!omap_irq_base))
152 return;
153
150 for (i = 0; i < ARRAY_SIZE(irq_banks); i++) { 154 for (i = 0; i < ARRAY_SIZE(irq_banks); i++) {
151 unsigned long base = 0;
152 struct omap_irq_bank *bank = irq_banks + i; 155 struct omap_irq_bank *bank = irq_banks + i;
153 156
154 if (cpu_is_omap24xx()) 157 bank->nr_irqs = nr_irqs;
155 base = OMAP24XX_IC_BASE;
156 else if (cpu_is_omap34xx())
157 base = OMAP34XX_IC_BASE;
158
159 BUG_ON(!base);
160
161 if (cpu_is_ti816x())
162 bank->nr_irqs = 128;
163 158
164 /* Static mapping, never released */ 159 /* Static mapping, never released */
165 bank->base_reg = ioremap(base, SZ_4K); 160 bank->base_reg = ioremap(base, SZ_4K);
@@ -181,6 +176,21 @@ void __init omap_init_irq(void)
181 nr_of_irqs, nr_banks, nr_banks > 1 ? "s" : ""); 176 nr_of_irqs, nr_banks, nr_banks > 1 ? "s" : "");
182} 177}
183 178
179void __init omap2_init_irq(void)
180{
181 omap_init_irq(OMAP24XX_IC_BASE, 96);
182}
183
184void __init omap3_init_irq(void)
185{
186 omap_init_irq(OMAP34XX_IC_BASE, 96);
187}
188
189void __init ti816x_init_irq(void)
190{
191 omap_init_irq(OMAP34XX_IC_BASE, 128);
192}
193
184#ifdef CONFIG_ARCH_OMAP3 194#ifdef CONFIG_ARCH_OMAP3
185static struct omap3_intc_regs intc_context[ARRAY_SIZE(irq_banks)]; 195static struct omap3_intc_regs intc_context[ARRAY_SIZE(irq_banks)];
186 196
diff --git a/arch/arm/mach-omap2/omap-iommu.c b/arch/arm/mach-omap2/omap-iommu.c
index 3fc5dc7233d..e61feadcda4 100644
--- a/arch/arm/mach-omap2/omap-iommu.c
+++ b/arch/arm/mach-omap2/omap-iommu.c
@@ -67,7 +67,7 @@ static struct iommu_device omap4_devices[] = {
67 .pdata = { 67 .pdata = {
68 .name = "ducati", 68 .name = "ducati",
69 .nr_tlb_entries = 32, 69 .nr_tlb_entries = 32,
70 .clk_name = "ducati_ick", 70 .clk_name = "ipu_fck",
71 .da_start = 0x0, 71 .da_start = 0x0,
72 .da_end = 0xFFFFF000, 72 .da_end = 0xFFFFF000,
73 }, 73 },
diff --git a/arch/arm/mach-omap2/omap4-common.c b/arch/arm/mach-omap2/omap4-common.c
index 9ef8c29dd81..35ac3e5f6e9 100644
--- a/arch/arm/mach-omap2/omap4-common.c
+++ b/arch/arm/mach-omap2/omap4-common.c
@@ -19,6 +19,8 @@
19#include <asm/hardware/gic.h> 19#include <asm/hardware/gic.h>
20#include <asm/hardware/cache-l2x0.h> 20#include <asm/hardware/cache-l2x0.h>
21 21
22#include <plat/irqs.h>
23
22#include <mach/hardware.h> 24#include <mach/hardware.h>
23#include <mach/omap4-common.h> 25#include <mach/omap4-common.h>
24 26
@@ -31,17 +33,15 @@ void __iomem *gic_dist_base_addr;
31 33
32void __init gic_init_irq(void) 34void __init gic_init_irq(void)
33{ 35{
34 void __iomem *gic_cpu_base;
35
36 /* Static mapping, never released */ 36 /* Static mapping, never released */
37 gic_dist_base_addr = ioremap(OMAP44XX_GIC_DIST_BASE, SZ_4K); 37 gic_dist_base_addr = ioremap(OMAP44XX_GIC_DIST_BASE, SZ_4K);
38 BUG_ON(!gic_dist_base_addr); 38 BUG_ON(!gic_dist_base_addr);
39 39
40 /* Static mapping, never released */ 40 /* Static mapping, never released */
41 gic_cpu_base = ioremap(OMAP44XX_GIC_CPU_BASE, SZ_512); 41 omap_irq_base = ioremap(OMAP44XX_GIC_CPU_BASE, SZ_512);
42 BUG_ON(!gic_cpu_base); 42 BUG_ON(!omap_irq_base);
43 43
44 gic_init(0, 29, gic_dist_base_addr, gic_cpu_base); 44 gic_init(0, 29, gic_dist_base_addr, omap_irq_base);
45} 45}
46 46
47#ifdef CONFIG_CACHE_L2X0 47#ifdef CONFIG_CACHE_L2X0
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index 293fa6cd50e..84cc0bdda3a 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -2,6 +2,7 @@
2 * omap_hwmod implementation for OMAP2/3/4 2 * omap_hwmod implementation for OMAP2/3/4
3 * 3 *
4 * Copyright (C) 2009-2011 Nokia Corporation 4 * Copyright (C) 2009-2011 Nokia Corporation
5 * Copyright (C) 2011 Texas Instruments, Inc.
5 * 6 *
6 * Paul Walmsley, Benoît Cousson, Kevin Hilman 7 * Paul Walmsley, Benoît Cousson, Kevin Hilman
7 * 8 *
@@ -145,9 +146,10 @@
145#include <plat/prcm.h> 146#include <plat/prcm.h>
146 147
147#include "cm2xxx_3xxx.h" 148#include "cm2xxx_3xxx.h"
148#include "cm44xx.h" 149#include "cminst44xx.h"
149#include "prm2xxx_3xxx.h" 150#include "prm2xxx_3xxx.h"
150#include "prm44xx.h" 151#include "prm44xx.h"
152#include "prminst44xx.h"
151#include "mux.h" 153#include "mux.h"
152 154
153/* Maximum microseconds to wait for OMAP module to softreset */ 155/* Maximum microseconds to wait for OMAP module to softreset */
@@ -387,11 +389,10 @@ static int _set_module_autoidle(struct omap_hwmod *oh, u8 autoidle,
387 */ 389 */
388static int _enable_wakeup(struct omap_hwmod *oh, u32 *v) 390static int _enable_wakeup(struct omap_hwmod *oh, u32 *v)
389{ 391{
390 u32 wakeup_mask;
391
392 if (!oh->class->sysc || 392 if (!oh->class->sysc ||
393 !((oh->class->sysc->sysc_flags & SYSC_HAS_ENAWAKEUP) || 393 !((oh->class->sysc->sysc_flags & SYSC_HAS_ENAWAKEUP) ||
394 (oh->class->sysc->idlemodes & SIDLE_SMART_WKUP))) 394 (oh->class->sysc->idlemodes & SIDLE_SMART_WKUP) ||
395 (oh->class->sysc->idlemodes & MSTANDBY_SMART_WKUP)))
395 return -EINVAL; 396 return -EINVAL;
396 397
397 if (!oh->class->sysc->sysc_fields) { 398 if (!oh->class->sysc->sysc_fields) {
@@ -399,12 +400,13 @@ static int _enable_wakeup(struct omap_hwmod *oh, u32 *v)
399 return -EINVAL; 400 return -EINVAL;
400 } 401 }
401 402
402 wakeup_mask = (0x1 << oh->class->sysc->sysc_fields->enwkup_shift); 403 if (oh->class->sysc->sysc_flags & SYSC_HAS_ENAWAKEUP)
403 404 *v |= 0x1 << oh->class->sysc->sysc_fields->enwkup_shift;
404 *v |= wakeup_mask;
405 405
406 if (oh->class->sysc->idlemodes & SIDLE_SMART_WKUP) 406 if (oh->class->sysc->idlemodes & SIDLE_SMART_WKUP)
407 _set_slave_idlemode(oh, HWMOD_IDLEMODE_SMART_WKUP, v); 407 _set_slave_idlemode(oh, HWMOD_IDLEMODE_SMART_WKUP, v);
408 if (oh->class->sysc->idlemodes & MSTANDBY_SMART_WKUP)
409 _set_master_standbymode(oh, HWMOD_IDLEMODE_SMART_WKUP, v);
408 410
409 /* XXX test pwrdm_get_wken for this hwmod's subsystem */ 411 /* XXX test pwrdm_get_wken for this hwmod's subsystem */
410 412
@@ -422,11 +424,10 @@ static int _enable_wakeup(struct omap_hwmod *oh, u32 *v)
422 */ 424 */
423static int _disable_wakeup(struct omap_hwmod *oh, u32 *v) 425static int _disable_wakeup(struct omap_hwmod *oh, u32 *v)
424{ 426{
425 u32 wakeup_mask;
426
427 if (!oh->class->sysc || 427 if (!oh->class->sysc ||
428 !((oh->class->sysc->sysc_flags & SYSC_HAS_ENAWAKEUP) || 428 !((oh->class->sysc->sysc_flags & SYSC_HAS_ENAWAKEUP) ||
429 (oh->class->sysc->idlemodes & SIDLE_SMART_WKUP))) 429 (oh->class->sysc->idlemodes & SIDLE_SMART_WKUP) ||
430 (oh->class->sysc->idlemodes & MSTANDBY_SMART_WKUP)))
430 return -EINVAL; 431 return -EINVAL;
431 432
432 if (!oh->class->sysc->sysc_fields) { 433 if (!oh->class->sysc->sysc_fields) {
@@ -434,12 +435,13 @@ static int _disable_wakeup(struct omap_hwmod *oh, u32 *v)
434 return -EINVAL; 435 return -EINVAL;
435 } 436 }
436 437
437 wakeup_mask = (0x1 << oh->class->sysc->sysc_fields->enwkup_shift); 438 if (oh->class->sysc->sysc_flags & SYSC_HAS_ENAWAKEUP)
438 439 *v &= ~(0x1 << oh->class->sysc->sysc_fields->enwkup_shift);
439 *v &= ~wakeup_mask;
440 440
441 if (oh->class->sysc->idlemodes & SIDLE_SMART_WKUP) 441 if (oh->class->sysc->idlemodes & SIDLE_SMART_WKUP)
442 _set_slave_idlemode(oh, HWMOD_IDLEMODE_SMART, v); 442 _set_slave_idlemode(oh, HWMOD_IDLEMODE_SMART, v);
443 if (oh->class->sysc->idlemodes & MSTANDBY_SMART_WKUP)
444 _set_master_standbymode(oh, HWMOD_IDLEMODE_SMART_WKUP, v);
443 445
444 /* XXX test pwrdm_get_wken for this hwmod's subsystem */ 446 /* XXX test pwrdm_get_wken for this hwmod's subsystem */
445 447
@@ -678,6 +680,125 @@ static void _disable_optional_clocks(struct omap_hwmod *oh)
678} 680}
679 681
680/** 682/**
683 * _enable_module - enable CLKCTRL modulemode on OMAP4
684 * @oh: struct omap_hwmod *
685 *
686 * Enables the PRCM module mode related to the hwmod @oh.
687 * No return value.
688 */
689static void _enable_module(struct omap_hwmod *oh)
690{
691 /* The module mode does not exist prior OMAP4 */
692 if (cpu_is_omap24xx() || cpu_is_omap34xx())
693 return;
694
695 if (!oh->clkdm || !oh->prcm.omap4.modulemode)
696 return;
697
698 pr_debug("omap_hwmod: %s: _enable_module: %d\n",
699 oh->name, oh->prcm.omap4.modulemode);
700
701 omap4_cminst_module_enable(oh->prcm.omap4.modulemode,
702 oh->clkdm->prcm_partition,
703 oh->clkdm->cm_inst,
704 oh->clkdm->clkdm_offs,
705 oh->prcm.omap4.clkctrl_offs);
706}
707
708/**
709 * _disable_module - enable CLKCTRL modulemode on OMAP4
710 * @oh: struct omap_hwmod *
711 *
712 * Disable the PRCM module mode related to the hwmod @oh.
713 * No return value.
714 */
715static void _disable_module(struct omap_hwmod *oh)
716{
717 /* The module mode does not exist prior OMAP4 */
718 if (cpu_is_omap24xx() || cpu_is_omap34xx())
719 return;
720
721 if (!oh->clkdm || !oh->prcm.omap4.modulemode)
722 return;
723
724 pr_debug("omap_hwmod: %s: _disable_module\n", oh->name);
725
726 omap4_cminst_module_disable(oh->clkdm->prcm_partition,
727 oh->clkdm->cm_inst,
728 oh->clkdm->clkdm_offs,
729 oh->prcm.omap4.clkctrl_offs);
730}
731
732/**
733 * _count_mpu_irqs - count the number of MPU IRQ lines associated with @oh
734 * @oh: struct omap_hwmod *oh
735 *
736 * Count and return the number of MPU IRQs associated with the hwmod
737 * @oh. Used to allocate struct resource data. Returns 0 if @oh is
738 * NULL.
739 */
740static int _count_mpu_irqs(struct omap_hwmod *oh)
741{
742 struct omap_hwmod_irq_info *ohii;
743 int i = 0;
744
745 if (!oh || !oh->mpu_irqs)
746 return 0;
747
748 do {
749 ohii = &oh->mpu_irqs[i++];
750 } while (ohii->irq != -1);
751
752 return i;
753}
754
755/**
756 * _count_sdma_reqs - count the number of SDMA request lines associated with @oh
757 * @oh: struct omap_hwmod *oh
758 *
759 * Count and return the number of SDMA request lines associated with
760 * the hwmod @oh. Used to allocate struct resource data. Returns 0
761 * if @oh is NULL.
762 */
763static int _count_sdma_reqs(struct omap_hwmod *oh)
764{
765 struct omap_hwmod_dma_info *ohdi;
766 int i = 0;
767
768 if (!oh || !oh->sdma_reqs)
769 return 0;
770
771 do {
772 ohdi = &oh->sdma_reqs[i++];
773 } while (ohdi->dma_req != -1);
774
775 return i;
776}
777
778/**
779 * _count_ocp_if_addr_spaces - count the number of address space entries for @oh
780 * @oh: struct omap_hwmod *oh
781 *
782 * Count and return the number of address space ranges associated with
783 * the hwmod @oh. Used to allocate struct resource data. Returns 0
784 * if @oh is NULL.
785 */
786static int _count_ocp_if_addr_spaces(struct omap_hwmod_ocp_if *os)
787{
788 struct omap_hwmod_addr_space *mem;
789 int i = 0;
790
791 if (!os || !os->addr)
792 return 0;
793
794 do {
795 mem = &os->addr[i++];
796 } while (mem->pa_start != mem->pa_end);
797
798 return i;
799}
800
801/**
681 * _find_mpu_port_index - find hwmod OCP slave port ID intended for MPU use 802 * _find_mpu_port_index - find hwmod OCP slave port ID intended for MPU use
682 * @oh: struct omap_hwmod * 803 * @oh: struct omap_hwmod *
683 * 804 *
@@ -722,8 +843,7 @@ static void __iomem * __init _find_mpu_rt_base(struct omap_hwmod *oh, u8 index)
722{ 843{
723 struct omap_hwmod_ocp_if *os; 844 struct omap_hwmod_ocp_if *os;
724 struct omap_hwmod_addr_space *mem; 845 struct omap_hwmod_addr_space *mem;
725 int i; 846 int i = 0, found = 0;
726 int found = 0;
727 void __iomem *va_start; 847 void __iomem *va_start;
728 848
729 if (!oh || oh->slaves_cnt == 0) 849 if (!oh || oh->slaves_cnt == 0)
@@ -731,12 +851,14 @@ static void __iomem * __init _find_mpu_rt_base(struct omap_hwmod *oh, u8 index)
731 851
732 os = oh->slaves[index]; 852 os = oh->slaves[index];
733 853
734 for (i = 0, mem = os->addr; i < os->addr_cnt; i++, mem++) { 854 if (!os->addr)
735 if (mem->flags & ADDR_TYPE_RT) { 855 return NULL;
856
857 do {
858 mem = &os->addr[i++];
859 if (mem->flags & ADDR_TYPE_RT)
736 found = 1; 860 found = 1;
737 break; 861 } while (!found && mem->pa_start != mem->pa_end);
738 }
739 }
740 862
741 if (found) { 863 if (found) {
742 va_start = ioremap(mem->pa_start, mem->pa_end - mem->pa_start); 864 va_start = ioremap(mem->pa_start, mem->pa_end - mem->pa_start);
@@ -781,8 +903,16 @@ static void _enable_sysc(struct omap_hwmod *oh)
781 } 903 }
782 904
783 if (sf & SYSC_HAS_MIDLEMODE) { 905 if (sf & SYSC_HAS_MIDLEMODE) {
784 idlemode = (oh->flags & HWMOD_SWSUP_MSTANDBY) ? 906 if (oh->flags & HWMOD_SWSUP_MSTANDBY) {
785 HWMOD_IDLEMODE_NO : HWMOD_IDLEMODE_SMART; 907 idlemode = HWMOD_IDLEMODE_NO;
908 } else {
909 if (sf & SYSC_HAS_ENAWAKEUP)
910 _enable_wakeup(oh, &v);
911 if (oh->class->sysc->idlemodes & MSTANDBY_SMART_WKUP)
912 idlemode = HWMOD_IDLEMODE_SMART_WKUP;
913 else
914 idlemode = HWMOD_IDLEMODE_SMART;
915 }
786 _set_master_standbymode(oh, idlemode, &v); 916 _set_master_standbymode(oh, idlemode, &v);
787 } 917 }
788 918
@@ -840,8 +970,16 @@ static void _idle_sysc(struct omap_hwmod *oh)
840 } 970 }
841 971
842 if (sf & SYSC_HAS_MIDLEMODE) { 972 if (sf & SYSC_HAS_MIDLEMODE) {
843 idlemode = (oh->flags & HWMOD_SWSUP_MSTANDBY) ? 973 if (oh->flags & HWMOD_SWSUP_MSTANDBY) {
844 HWMOD_IDLEMODE_FORCE : HWMOD_IDLEMODE_SMART; 974 idlemode = HWMOD_IDLEMODE_FORCE;
975 } else {
976 if (sf & SYSC_HAS_ENAWAKEUP)
977 _enable_wakeup(oh, &v);
978 if (oh->class->sysc->idlemodes & MSTANDBY_SMART_WKUP)
979 idlemode = HWMOD_IDLEMODE_SMART_WKUP;
980 else
981 idlemode = HWMOD_IDLEMODE_SMART;
982 }
845 _set_master_standbymode(oh, idlemode, &v); 983 _set_master_standbymode(oh, idlemode, &v);
846 } 984 }
847 985
@@ -903,9 +1041,40 @@ static struct omap_hwmod *_lookup(const char *name)
903 1041
904 return oh; 1042 return oh;
905} 1043}
1044/**
1045 * _init_clkdm - look up a clockdomain name, store pointer in omap_hwmod
1046 * @oh: struct omap_hwmod *
1047 *
1048 * Convert a clockdomain name stored in a struct omap_hwmod into a
1049 * clockdomain pointer, and save it into the struct omap_hwmod.
1050 * return -EINVAL if clkdm_name does not exist or if the lookup failed.
1051 */
1052static int _init_clkdm(struct omap_hwmod *oh)
1053{
1054 if (cpu_is_omap24xx() || cpu_is_omap34xx())
1055 return 0;
1056
1057 if (!oh->clkdm_name) {
1058 pr_warning("omap_hwmod: %s: no clkdm_name\n", oh->name);
1059 return -EINVAL;
1060 }
1061
1062 oh->clkdm = clkdm_lookup(oh->clkdm_name);
1063 if (!oh->clkdm) {
1064 pr_warning("omap_hwmod: %s: could not associate to clkdm %s\n",
1065 oh->name, oh->clkdm_name);
1066 return -EINVAL;
1067 }
1068
1069 pr_debug("omap_hwmod: %s: associated to clkdm %s\n",
1070 oh->name, oh->clkdm_name);
1071
1072 return 0;
1073}
906 1074
907/** 1075/**
908 * _init_clocks - clk_get() all clocks associated with this hwmod 1076 * _init_clocks - clk_get() all clocks associated with this hwmod. Retrieve as
1077 * well the clockdomain.
909 * @oh: struct omap_hwmod * 1078 * @oh: struct omap_hwmod *
910 * @data: not used; pass NULL 1079 * @data: not used; pass NULL
911 * 1080 *
@@ -925,9 +1094,12 @@ static int _init_clocks(struct omap_hwmod *oh, void *data)
925 ret |= _init_main_clk(oh); 1094 ret |= _init_main_clk(oh);
926 ret |= _init_interface_clks(oh); 1095 ret |= _init_interface_clks(oh);
927 ret |= _init_opt_clks(oh); 1096 ret |= _init_opt_clks(oh);
1097 ret |= _init_clkdm(oh);
928 1098
929 if (!ret) 1099 if (!ret)
930 oh->_state = _HWMOD_STATE_CLKS_INITED; 1100 oh->_state = _HWMOD_STATE_CLKS_INITED;
1101 else
1102 pr_warning("omap_hwmod: %s: cannot _init_clocks\n", oh->name);
931 1103
932 return ret; 1104 return ret;
933} 1105}
@@ -939,7 +1111,7 @@ static int _init_clocks(struct omap_hwmod *oh, void *data)
939 * Wait for a module @oh to leave slave idle. Returns 0 if the module 1111 * Wait for a module @oh to leave slave idle. Returns 0 if the module
940 * does not have an IDLEST bit or if the module successfully leaves 1112 * does not have an IDLEST bit or if the module successfully leaves
941 * slave idle; otherwise, pass along the return value of the 1113 * slave idle; otherwise, pass along the return value of the
942 * appropriate *_cm_wait_module_ready() function. 1114 * appropriate *_cm*_wait_module_ready() function.
943 */ 1115 */
944static int _wait_target_ready(struct omap_hwmod *oh) 1116static int _wait_target_ready(struct omap_hwmod *oh)
945{ 1117{
@@ -966,7 +1138,13 @@ static int _wait_target_ready(struct omap_hwmod *oh)
966 oh->prcm.omap2.idlest_reg_id, 1138 oh->prcm.omap2.idlest_reg_id,
967 oh->prcm.omap2.idlest_idle_bit); 1139 oh->prcm.omap2.idlest_idle_bit);
968 } else if (cpu_is_omap44xx()) { 1140 } else if (cpu_is_omap44xx()) {
969 ret = omap4_cm_wait_module_ready(oh->prcm.omap4.clkctrl_reg); 1141 if (!oh->clkdm)
1142 return -EINVAL;
1143
1144 ret = omap4_cminst_wait_module_ready(oh->clkdm->prcm_partition,
1145 oh->clkdm->cm_inst,
1146 oh->clkdm->clkdm_offs,
1147 oh->prcm.omap4.clkctrl_offs);
970 } else { 1148 } else {
971 BUG(); 1149 BUG();
972 }; 1150 };
@@ -975,6 +1153,36 @@ static int _wait_target_ready(struct omap_hwmod *oh)
975} 1153}
976 1154
977/** 1155/**
1156 * _wait_target_disable - wait for a module to be disabled
1157 * @oh: struct omap_hwmod *
1158 *
1159 * Wait for a module @oh to enter slave idle. Returns 0 if the module
1160 * does not have an IDLEST bit or if the module successfully enters
1161 * slave idle; otherwise, pass along the return value of the
1162 * appropriate *_cm*_wait_module_idle() function.
1163 */
1164static int _wait_target_disable(struct omap_hwmod *oh)
1165{
1166 /* TODO: For now just handle OMAP4+ */
1167 if (cpu_is_omap24xx() || cpu_is_omap34xx())
1168 return 0;
1169
1170 if (!oh)
1171 return -EINVAL;
1172
1173 if (oh->_int_flags & _HWMOD_NO_MPU_PORT)
1174 return 0;
1175
1176 if (oh->flags & HWMOD_NO_IDLEST)
1177 return 0;
1178
1179 return omap4_cminst_wait_module_idle(oh->clkdm->prcm_partition,
1180 oh->clkdm->cm_inst,
1181 oh->clkdm->clkdm_offs,
1182 oh->prcm.omap4.clkctrl_offs);
1183}
1184
1185/**
978 * _lookup_hardreset - fill register bit info for this hwmod/reset line 1186 * _lookup_hardreset - fill register bit info for this hwmod/reset line
979 * @oh: struct omap_hwmod * 1187 * @oh: struct omap_hwmod *
980 * @name: name of the reset line in the context of this hwmod 1188 * @name: name of the reset line in the context of this hwmod
@@ -1030,8 +1238,10 @@ static int _assert_hardreset(struct omap_hwmod *oh, const char *name)
1030 return omap2_prm_assert_hardreset(oh->prcm.omap2.module_offs, 1238 return omap2_prm_assert_hardreset(oh->prcm.omap2.module_offs,
1031 ohri.rst_shift); 1239 ohri.rst_shift);
1032 else if (cpu_is_omap44xx()) 1240 else if (cpu_is_omap44xx())
1033 return omap4_prm_assert_hardreset(oh->prcm.omap4.rstctrl_reg, 1241 return omap4_prminst_assert_hardreset(ohri.rst_shift,
1034 ohri.rst_shift); 1242 oh->clkdm->pwrdm.ptr->prcm_partition,
1243 oh->clkdm->pwrdm.ptr->prcm_offs,
1244 oh->prcm.omap4.rstctrl_offs);
1035 else 1245 else
1036 return -EINVAL; 1246 return -EINVAL;
1037} 1247}
@@ -1066,8 +1276,10 @@ static int _deassert_hardreset(struct omap_hwmod *oh, const char *name)
1066 if (ohri.st_shift) 1276 if (ohri.st_shift)
1067 pr_err("omap_hwmod: %s: %s: hwmod data error: OMAP4 does not support st_shift\n", 1277 pr_err("omap_hwmod: %s: %s: hwmod data error: OMAP4 does not support st_shift\n",
1068 oh->name, name); 1278 oh->name, name);
1069 ret = omap4_prm_deassert_hardreset(oh->prcm.omap4.rstctrl_reg, 1279 ret = omap4_prminst_deassert_hardreset(ohri.rst_shift,
1070 ohri.rst_shift); 1280 oh->clkdm->pwrdm.ptr->prcm_partition,
1281 oh->clkdm->pwrdm.ptr->prcm_offs,
1282 oh->prcm.omap4.rstctrl_offs);
1071 } else { 1283 } else {
1072 return -EINVAL; 1284 return -EINVAL;
1073 } 1285 }
@@ -1102,8 +1314,10 @@ static int _read_hardreset(struct omap_hwmod *oh, const char *name)
1102 return omap2_prm_is_hardreset_asserted(oh->prcm.omap2.module_offs, 1314 return omap2_prm_is_hardreset_asserted(oh->prcm.omap2.module_offs,
1103 ohri.st_shift); 1315 ohri.st_shift);
1104 } else if (cpu_is_omap44xx()) { 1316 } else if (cpu_is_omap44xx()) {
1105 return omap4_prm_is_hardreset_asserted(oh->prcm.omap4.rstctrl_reg, 1317 return omap4_prminst_is_hardreset_asserted(ohri.rst_shift,
1106 ohri.rst_shift); 1318 oh->clkdm->pwrdm.ptr->prcm_partition,
1319 oh->clkdm->pwrdm.ptr->prcm_offs,
1320 oh->prcm.omap4.rstctrl_offs);
1107 } else { 1321 } else {
1108 return -EINVAL; 1322 return -EINVAL;
1109 } 1323 }
@@ -1223,6 +1437,9 @@ static int _reset(struct omap_hwmod *oh)
1223static int _enable(struct omap_hwmod *oh) 1437static int _enable(struct omap_hwmod *oh)
1224{ 1438{
1225 int r; 1439 int r;
1440 int hwsup = 0;
1441
1442 pr_debug("omap_hwmod: %s: enabling\n", oh->name);
1226 1443
1227 if (oh->_state != _HWMOD_STATE_INITIALIZED && 1444 if (oh->_state != _HWMOD_STATE_INITIALIZED &&
1228 oh->_state != _HWMOD_STATE_IDLE && 1445 oh->_state != _HWMOD_STATE_IDLE &&
@@ -1232,11 +1449,10 @@ static int _enable(struct omap_hwmod *oh)
1232 return -EINVAL; 1449 return -EINVAL;
1233 } 1450 }
1234 1451
1235 pr_debug("omap_hwmod: %s: enabling\n", oh->name);
1236 1452
1237 /* 1453 /*
1238 * If an IP contains only one HW reset line, then de-assert it in order 1454 * If an IP contains only one HW reset line, then de-assert it in order
1239 * to allow to enable the clocks. Otherwise the PRCM will return 1455 * to allow the module state transition. Otherwise the PRCM will return
1240 * Intransition status, and the init will failed. 1456 * Intransition status, and the init will failed.
1241 */ 1457 */
1242 if ((oh->_state == _HWMOD_STATE_INITIALIZED || 1458 if ((oh->_state == _HWMOD_STATE_INITIALIZED ||
@@ -1250,10 +1466,34 @@ static int _enable(struct omap_hwmod *oh)
1250 omap_hwmod_mux(oh->mux, _HWMOD_STATE_ENABLED); 1466 omap_hwmod_mux(oh->mux, _HWMOD_STATE_ENABLED);
1251 1467
1252 _add_initiator_dep(oh, mpu_oh); 1468 _add_initiator_dep(oh, mpu_oh);
1469
1470 if (oh->clkdm) {
1471 /*
1472 * A clockdomain must be in SW_SUP before enabling
1473 * completely the module. The clockdomain can be set
1474 * in HW_AUTO only when the module become ready.
1475 */
1476 hwsup = clkdm_in_hwsup(oh->clkdm);
1477 r = clkdm_hwmod_enable(oh->clkdm, oh);
1478 if (r) {
1479 WARN(1, "omap_hwmod: %s: could not enable clockdomain %s: %d\n",
1480 oh->name, oh->clkdm->name, r);
1481 return r;
1482 }
1483 }
1484
1253 _enable_clocks(oh); 1485 _enable_clocks(oh);
1486 _enable_module(oh);
1254 1487
1255 r = _wait_target_ready(oh); 1488 r = _wait_target_ready(oh);
1256 if (!r) { 1489 if (!r) {
1490 /*
1491 * Set the clockdomain to HW_AUTO only if the target is ready,
1492 * assuming that the previous state was HW_AUTO
1493 */
1494 if (oh->clkdm && hwsup)
1495 clkdm_allow_idle(oh->clkdm);
1496
1257 oh->_state = _HWMOD_STATE_ENABLED; 1497 oh->_state = _HWMOD_STATE_ENABLED;
1258 1498
1259 /* Access the sysconfig only if the target is ready */ 1499 /* Access the sysconfig only if the target is ready */
@@ -1266,6 +1506,9 @@ static int _enable(struct omap_hwmod *oh)
1266 _disable_clocks(oh); 1506 _disable_clocks(oh);
1267 pr_debug("omap_hwmod: %s: _wait_target_ready: %d\n", 1507 pr_debug("omap_hwmod: %s: _wait_target_ready: %d\n",
1268 oh->name, r); 1508 oh->name, r);
1509
1510 if (oh->clkdm)
1511 clkdm_hwmod_disable(oh->clkdm, oh);
1269 } 1512 }
1270 1513
1271 return r; 1514 return r;
@@ -1281,18 +1524,33 @@ static int _enable(struct omap_hwmod *oh)
1281 */ 1524 */
1282static int _idle(struct omap_hwmod *oh) 1525static int _idle(struct omap_hwmod *oh)
1283{ 1526{
1527 int ret;
1528
1529 pr_debug("omap_hwmod: %s: idling\n", oh->name);
1530
1284 if (oh->_state != _HWMOD_STATE_ENABLED) { 1531 if (oh->_state != _HWMOD_STATE_ENABLED) {
1285 WARN(1, "omap_hwmod: %s: idle state can only be entered from " 1532 WARN(1, "omap_hwmod: %s: idle state can only be entered from "
1286 "enabled state\n", oh->name); 1533 "enabled state\n", oh->name);
1287 return -EINVAL; 1534 return -EINVAL;
1288 } 1535 }
1289 1536
1290 pr_debug("omap_hwmod: %s: idling\n", oh->name);
1291
1292 if (oh->class->sysc) 1537 if (oh->class->sysc)
1293 _idle_sysc(oh); 1538 _idle_sysc(oh);
1294 _del_initiator_dep(oh, mpu_oh); 1539 _del_initiator_dep(oh, mpu_oh);
1540 _disable_module(oh);
1541 ret = _wait_target_disable(oh);
1542 if (ret)
1543 pr_warn("omap_hwmod: %s: _wait_target_disable failed\n",
1544 oh->name);
1545 /*
1546 * The module must be in idle mode before disabling any parents
1547 * clocks. Otherwise, the parent clock might be disabled before
1548 * the module transition is done, and thus will prevent the
1549 * transition to complete properly.
1550 */
1295 _disable_clocks(oh); 1551 _disable_clocks(oh);
1552 if (oh->clkdm)
1553 clkdm_hwmod_disable(oh->clkdm, oh);
1296 1554
1297 /* Mux pins for device idle if populated */ 1555 /* Mux pins for device idle if populated */
1298 if (oh->mux && oh->mux->pads_dynamic) 1556 if (oh->mux && oh->mux->pads_dynamic)
@@ -1374,24 +1632,34 @@ static int _shutdown(struct omap_hwmod *oh)
1374 } 1632 }
1375 } 1633 }
1376 1634
1377 if (oh->class->sysc) 1635 if (oh->class->sysc) {
1636 if (oh->_state == _HWMOD_STATE_IDLE)
1637 _enable(oh);
1378 _shutdown_sysc(oh); 1638 _shutdown_sysc(oh);
1379 1639 }
1380 /*
1381 * If an IP contains only one HW reset line, then assert it
1382 * before disabling the clocks and shutting down the IP.
1383 */
1384 if (oh->rst_lines_cnt == 1)
1385 _assert_hardreset(oh, oh->rst_lines[0].name);
1386 1640
1387 /* clocks and deps are already disabled in idle */ 1641 /* clocks and deps are already disabled in idle */
1388 if (oh->_state == _HWMOD_STATE_ENABLED) { 1642 if (oh->_state == _HWMOD_STATE_ENABLED) {
1389 _del_initiator_dep(oh, mpu_oh); 1643 _del_initiator_dep(oh, mpu_oh);
1390 /* XXX what about the other system initiators here? dma, dsp */ 1644 /* XXX what about the other system initiators here? dma, dsp */
1645 _disable_module(oh);
1646 ret = _wait_target_disable(oh);
1647 if (ret)
1648 pr_warn("omap_hwmod: %s: _wait_target_disable failed\n",
1649 oh->name);
1391 _disable_clocks(oh); 1650 _disable_clocks(oh);
1651 if (oh->clkdm)
1652 clkdm_hwmod_disable(oh->clkdm, oh);
1392 } 1653 }
1393 /* XXX Should this code also force-disable the optional clocks? */ 1654 /* XXX Should this code also force-disable the optional clocks? */
1394 1655
1656 /*
1657 * If an IP contains only one HW reset line, then assert it
1658 * after disabling the clocks and before shutting down the IP.
1659 */
1660 if (oh->rst_lines_cnt == 1)
1661 _assert_hardreset(oh, oh->rst_lines[0].name);
1662
1395 /* Mux pins to safe mode or use populated off mode values */ 1663 /* Mux pins to safe mode or use populated off mode values */
1396 if (oh->mux) 1664 if (oh->mux)
1397 omap_hwmod_mux(oh->mux, _HWMOD_STATE_DISABLED); 1665 omap_hwmod_mux(oh->mux, _HWMOD_STATE_DISABLED);
@@ -1562,6 +1830,33 @@ void omap_hwmod_write(u32 v, struct omap_hwmod *oh, u16 reg_offs)
1562} 1830}
1563 1831
1564/** 1832/**
1833 * omap_hwmod_softreset - reset a module via SYSCONFIG.SOFTRESET bit
1834 * @oh: struct omap_hwmod *
1835 *
1836 * This is a public function exposed to drivers. Some drivers may need to do
1837 * some settings before and after resetting the device. Those drivers after
1838 * doing the necessary settings could use this function to start a reset by
1839 * setting the SYSCONFIG.SOFTRESET bit.
1840 */
1841int omap_hwmod_softreset(struct omap_hwmod *oh)
1842{
1843 u32 v;
1844 int ret;
1845
1846 if (!oh || !(oh->_sysc_cache))
1847 return -EINVAL;
1848
1849 v = oh->_sysc_cache;
1850 ret = _set_softreset(oh, &v);
1851 if (ret)
1852 goto error;
1853 _write_sysconfig(v, oh);
1854
1855error:
1856 return ret;
1857}
1858
1859/**
1565 * omap_hwmod_set_slave_idlemode - set the hwmod's OCP slave idlemode 1860 * omap_hwmod_set_slave_idlemode - set the hwmod's OCP slave idlemode
1566 * @oh: struct omap_hwmod * 1861 * @oh: struct omap_hwmod *
1567 * @idlemode: SIDLEMODE field bits (shifted to bit 0) 1862 * @idlemode: SIDLEMODE field bits (shifted to bit 0)
@@ -1685,9 +1980,6 @@ static int __init _populate_mpu_rt_base(struct omap_hwmod *oh, void *data)
1685 return 0; 1980 return 0;
1686 1981
1687 oh->_mpu_rt_va = _find_mpu_rt_base(oh, oh->_mpu_port_index); 1982 oh->_mpu_rt_va = _find_mpu_rt_base(oh, oh->_mpu_port_index);
1688 if (!oh->_mpu_rt_va)
1689 pr_warning("omap_hwmod: %s found no _mpu_rt_va for %s\n",
1690 __func__, oh->name);
1691 1983
1692 return 0; 1984 return 0;
1693} 1985}
@@ -1939,10 +2231,10 @@ int omap_hwmod_count_resources(struct omap_hwmod *oh)
1939{ 2231{
1940 int ret, i; 2232 int ret, i;
1941 2233
1942 ret = oh->mpu_irqs_cnt + oh->sdma_reqs_cnt; 2234 ret = _count_mpu_irqs(oh) + _count_sdma_reqs(oh);
1943 2235
1944 for (i = 0; i < oh->slaves_cnt; i++) 2236 for (i = 0; i < oh->slaves_cnt; i++)
1945 ret += oh->slaves[i]->addr_cnt; 2237 ret += _count_ocp_if_addr_spaces(oh->slaves[i]);
1946 2238
1947 return ret; 2239 return ret;
1948} 2240}
@@ -1959,12 +2251,13 @@ int omap_hwmod_count_resources(struct omap_hwmod *oh)
1959 */ 2251 */
1960int omap_hwmod_fill_resources(struct omap_hwmod *oh, struct resource *res) 2252int omap_hwmod_fill_resources(struct omap_hwmod *oh, struct resource *res)
1961{ 2253{
1962 int i, j; 2254 int i, j, mpu_irqs_cnt, sdma_reqs_cnt;
1963 int r = 0; 2255 int r = 0;
1964 2256
1965 /* For each IRQ, DMA, memory area, fill in array.*/ 2257 /* For each IRQ, DMA, memory area, fill in array.*/
1966 2258
1967 for (i = 0; i < oh->mpu_irqs_cnt; i++) { 2259 mpu_irqs_cnt = _count_mpu_irqs(oh);
2260 for (i = 0; i < mpu_irqs_cnt; i++) {
1968 (res + r)->name = (oh->mpu_irqs + i)->name; 2261 (res + r)->name = (oh->mpu_irqs + i)->name;
1969 (res + r)->start = (oh->mpu_irqs + i)->irq; 2262 (res + r)->start = (oh->mpu_irqs + i)->irq;
1970 (res + r)->end = (oh->mpu_irqs + i)->irq; 2263 (res + r)->end = (oh->mpu_irqs + i)->irq;
@@ -1972,7 +2265,8 @@ int omap_hwmod_fill_resources(struct omap_hwmod *oh, struct resource *res)
1972 r++; 2265 r++;
1973 } 2266 }
1974 2267
1975 for (i = 0; i < oh->sdma_reqs_cnt; i++) { 2268 sdma_reqs_cnt = _count_sdma_reqs(oh);
2269 for (i = 0; i < sdma_reqs_cnt; i++) {
1976 (res + r)->name = (oh->sdma_reqs + i)->name; 2270 (res + r)->name = (oh->sdma_reqs + i)->name;
1977 (res + r)->start = (oh->sdma_reqs + i)->dma_req; 2271 (res + r)->start = (oh->sdma_reqs + i)->dma_req;
1978 (res + r)->end = (oh->sdma_reqs + i)->dma_req; 2272 (res + r)->end = (oh->sdma_reqs + i)->dma_req;
@@ -1982,10 +2276,12 @@ int omap_hwmod_fill_resources(struct omap_hwmod *oh, struct resource *res)
1982 2276
1983 for (i = 0; i < oh->slaves_cnt; i++) { 2277 for (i = 0; i < oh->slaves_cnt; i++) {
1984 struct omap_hwmod_ocp_if *os; 2278 struct omap_hwmod_ocp_if *os;
2279 int addr_cnt;
1985 2280
1986 os = oh->slaves[i]; 2281 os = oh->slaves[i];
2282 addr_cnt = _count_ocp_if_addr_spaces(os);
1987 2283
1988 for (j = 0; j < os->addr_cnt; j++) { 2284 for (j = 0; j < addr_cnt; j++) {
1989 (res + r)->name = (os->addr + j)->name; 2285 (res + r)->name = (os->addr + j)->name;
1990 (res + r)->start = (os->addr + j)->pa_start; 2286 (res + r)->start = (os->addr + j)->pa_start;
1991 (res + r)->end = (os->addr + j)->pa_end; 2287 (res + r)->end = (os->addr + j)->pa_end;
diff --git a/arch/arm/mach-omap2/omap_hwmod_2420_data.c b/arch/arm/mach-omap2/omap_hwmod_2420_data.c
index c4d0ae87d62..a015c69068f 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2420_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2420_data.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * omap_hwmod_2420_data.c - hardware modules present on the OMAP2420 chips 2 * omap_hwmod_2420_data.c - hardware modules present on the OMAP2420 chips
3 * 3 *
4 * Copyright (C) 2009-2010 Nokia Corporation 4 * Copyright (C) 2009-2011 Nokia Corporation
5 * Paul Walmsley 5 * Paul Walmsley
6 * 6 *
7 * This program is free software; you can redistribute it and/or modify 7 * This program is free software; you can redistribute it and/or modify
@@ -114,38 +114,20 @@ static struct omap_hwmod omap2420_mcbsp1_hwmod;
114static struct omap_hwmod omap2420_mcbsp2_hwmod; 114static struct omap_hwmod omap2420_mcbsp2_hwmod;
115 115
116/* l4 core -> mcspi1 interface */ 116/* l4 core -> mcspi1 interface */
117static struct omap_hwmod_addr_space omap2420_mcspi1_addr_space[] = {
118 {
119 .pa_start = 0x48098000,
120 .pa_end = 0x480980ff,
121 .flags = ADDR_TYPE_RT,
122 },
123};
124
125static struct omap_hwmod_ocp_if omap2420_l4_core__mcspi1 = { 117static struct omap_hwmod_ocp_if omap2420_l4_core__mcspi1 = {
126 .master = &omap2420_l4_core_hwmod, 118 .master = &omap2420_l4_core_hwmod,
127 .slave = &omap2420_mcspi1_hwmod, 119 .slave = &omap2420_mcspi1_hwmod,
128 .clk = "mcspi1_ick", 120 .clk = "mcspi1_ick",
129 .addr = omap2420_mcspi1_addr_space, 121 .addr = omap2_mcspi1_addr_space,
130 .addr_cnt = ARRAY_SIZE(omap2420_mcspi1_addr_space),
131 .user = OCP_USER_MPU | OCP_USER_SDMA, 122 .user = OCP_USER_MPU | OCP_USER_SDMA,
132}; 123};
133 124
134/* l4 core -> mcspi2 interface */ 125/* l4 core -> mcspi2 interface */
135static struct omap_hwmod_addr_space omap2420_mcspi2_addr_space[] = {
136 {
137 .pa_start = 0x4809a000,
138 .pa_end = 0x4809a0ff,
139 .flags = ADDR_TYPE_RT,
140 },
141};
142
143static struct omap_hwmod_ocp_if omap2420_l4_core__mcspi2 = { 126static struct omap_hwmod_ocp_if omap2420_l4_core__mcspi2 = {
144 .master = &omap2420_l4_core_hwmod, 127 .master = &omap2420_l4_core_hwmod,
145 .slave = &omap2420_mcspi2_hwmod, 128 .slave = &omap2420_mcspi2_hwmod,
146 .clk = "mcspi2_ick", 129 .clk = "mcspi2_ick",
147 .addr = omap2420_mcspi2_addr_space, 130 .addr = omap2_mcspi2_addr_space,
148 .addr_cnt = ARRAY_SIZE(omap2420_mcspi2_addr_space),
149 .user = OCP_USER_MPU | OCP_USER_SDMA, 131 .user = OCP_USER_MPU | OCP_USER_SDMA,
150}; 132};
151 133
@@ -157,95 +139,47 @@ static struct omap_hwmod_ocp_if omap2420_l4_core__l4_wkup = {
157}; 139};
158 140
159/* L4 CORE -> UART1 interface */ 141/* L4 CORE -> UART1 interface */
160static struct omap_hwmod_addr_space omap2420_uart1_addr_space[] = {
161 {
162 .pa_start = OMAP2_UART1_BASE,
163 .pa_end = OMAP2_UART1_BASE + SZ_8K - 1,
164 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
165 },
166};
167
168static struct omap_hwmod_ocp_if omap2_l4_core__uart1 = { 142static struct omap_hwmod_ocp_if omap2_l4_core__uart1 = {
169 .master = &omap2420_l4_core_hwmod, 143 .master = &omap2420_l4_core_hwmod,
170 .slave = &omap2420_uart1_hwmod, 144 .slave = &omap2420_uart1_hwmod,
171 .clk = "uart1_ick", 145 .clk = "uart1_ick",
172 .addr = omap2420_uart1_addr_space, 146 .addr = omap2xxx_uart1_addr_space,
173 .addr_cnt = ARRAY_SIZE(omap2420_uart1_addr_space),
174 .user = OCP_USER_MPU | OCP_USER_SDMA, 147 .user = OCP_USER_MPU | OCP_USER_SDMA,
175}; 148};
176 149
177/* L4 CORE -> UART2 interface */ 150/* L4 CORE -> UART2 interface */
178static struct omap_hwmod_addr_space omap2420_uart2_addr_space[] = {
179 {
180 .pa_start = OMAP2_UART2_BASE,
181 .pa_end = OMAP2_UART2_BASE + SZ_1K - 1,
182 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
183 },
184};
185
186static struct omap_hwmod_ocp_if omap2_l4_core__uart2 = { 151static struct omap_hwmod_ocp_if omap2_l4_core__uart2 = {
187 .master = &omap2420_l4_core_hwmod, 152 .master = &omap2420_l4_core_hwmod,
188 .slave = &omap2420_uart2_hwmod, 153 .slave = &omap2420_uart2_hwmod,
189 .clk = "uart2_ick", 154 .clk = "uart2_ick",
190 .addr = omap2420_uart2_addr_space, 155 .addr = omap2xxx_uart2_addr_space,
191 .addr_cnt = ARRAY_SIZE(omap2420_uart2_addr_space),
192 .user = OCP_USER_MPU | OCP_USER_SDMA, 156 .user = OCP_USER_MPU | OCP_USER_SDMA,
193}; 157};
194 158
195/* L4 PER -> UART3 interface */ 159/* L4 PER -> UART3 interface */
196static struct omap_hwmod_addr_space omap2420_uart3_addr_space[] = {
197 {
198 .pa_start = OMAP2_UART3_BASE,
199 .pa_end = OMAP2_UART3_BASE + SZ_1K - 1,
200 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
201 },
202};
203
204static struct omap_hwmod_ocp_if omap2_l4_core__uart3 = { 160static struct omap_hwmod_ocp_if omap2_l4_core__uart3 = {
205 .master = &omap2420_l4_core_hwmod, 161 .master = &omap2420_l4_core_hwmod,
206 .slave = &omap2420_uart3_hwmod, 162 .slave = &omap2420_uart3_hwmod,
207 .clk = "uart3_ick", 163 .clk = "uart3_ick",
208 .addr = omap2420_uart3_addr_space, 164 .addr = omap2xxx_uart3_addr_space,
209 .addr_cnt = ARRAY_SIZE(omap2420_uart3_addr_space),
210 .user = OCP_USER_MPU | OCP_USER_SDMA, 165 .user = OCP_USER_MPU | OCP_USER_SDMA,
211}; 166};
212 167
213/* I2C IP block address space length (in bytes) */
214#define OMAP2_I2C_AS_LEN 128
215
216/* L4 CORE -> I2C1 interface */ 168/* L4 CORE -> I2C1 interface */
217static struct omap_hwmod_addr_space omap2420_i2c1_addr_space[] = {
218 {
219 .pa_start = 0x48070000,
220 .pa_end = 0x48070000 + OMAP2_I2C_AS_LEN - 1,
221 .flags = ADDR_TYPE_RT,
222 },
223};
224
225static struct omap_hwmod_ocp_if omap2420_l4_core__i2c1 = { 169static struct omap_hwmod_ocp_if omap2420_l4_core__i2c1 = {
226 .master = &omap2420_l4_core_hwmod, 170 .master = &omap2420_l4_core_hwmod,
227 .slave = &omap2420_i2c1_hwmod, 171 .slave = &omap2420_i2c1_hwmod,
228 .clk = "i2c1_ick", 172 .clk = "i2c1_ick",
229 .addr = omap2420_i2c1_addr_space, 173 .addr = omap2_i2c1_addr_space,
230 .addr_cnt = ARRAY_SIZE(omap2420_i2c1_addr_space),
231 .user = OCP_USER_MPU | OCP_USER_SDMA, 174 .user = OCP_USER_MPU | OCP_USER_SDMA,
232}; 175};
233 176
234/* L4 CORE -> I2C2 interface */ 177/* L4 CORE -> I2C2 interface */
235static struct omap_hwmod_addr_space omap2420_i2c2_addr_space[] = {
236 {
237 .pa_start = 0x48072000,
238 .pa_end = 0x48072000 + OMAP2_I2C_AS_LEN - 1,
239 .flags = ADDR_TYPE_RT,
240 },
241};
242
243static struct omap_hwmod_ocp_if omap2420_l4_core__i2c2 = { 178static struct omap_hwmod_ocp_if omap2420_l4_core__i2c2 = {
244 .master = &omap2420_l4_core_hwmod, 179 .master = &omap2420_l4_core_hwmod,
245 .slave = &omap2420_i2c2_hwmod, 180 .slave = &omap2420_i2c2_hwmod,
246 .clk = "i2c2_ick", 181 .clk = "i2c2_ick",
247 .addr = omap2420_i2c2_addr_space, 182 .addr = omap2_i2c2_addr_space,
248 .addr_cnt = ARRAY_SIZE(omap2420_i2c2_addr_space),
249 .user = OCP_USER_MPU | OCP_USER_SDMA, 183 .user = OCP_USER_MPU | OCP_USER_SDMA,
250}; 184};
251 185
@@ -340,29 +274,8 @@ static struct omap_hwmod omap2420_iva_hwmod = {
340 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420) 274 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
341}; 275};
342 276
343/* Timer Common */
344static struct omap_hwmod_class_sysconfig omap2420_timer_sysc = {
345 .rev_offs = 0x0000,
346 .sysc_offs = 0x0010,
347 .syss_offs = 0x0014,
348 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
349 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
350 SYSC_HAS_AUTOIDLE),
351 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
352 .sysc_fields = &omap_hwmod_sysc_type1,
353};
354
355static struct omap_hwmod_class omap2420_timer_hwmod_class = {
356 .name = "timer",
357 .sysc = &omap2420_timer_sysc,
358 .rev = OMAP_TIMER_IP_VERSION_1,
359};
360
361/* timer1 */ 277/* timer1 */
362static struct omap_hwmod omap2420_timer1_hwmod; 278static struct omap_hwmod omap2420_timer1_hwmod;
363static struct omap_hwmod_irq_info omap2420_timer1_mpu_irqs[] = {
364 { .irq = 37, },
365};
366 279
367static struct omap_hwmod_addr_space omap2420_timer1_addrs[] = { 280static struct omap_hwmod_addr_space omap2420_timer1_addrs[] = {
368 { 281 {
@@ -370,6 +283,7 @@ static struct omap_hwmod_addr_space omap2420_timer1_addrs[] = {
370 .pa_end = 0x48028000 + SZ_1K - 1, 283 .pa_end = 0x48028000 + SZ_1K - 1,
371 .flags = ADDR_TYPE_RT 284 .flags = ADDR_TYPE_RT
372 }, 285 },
286 { }
373}; 287};
374 288
375/* l4_wkup -> timer1 */ 289/* l4_wkup -> timer1 */
@@ -378,7 +292,6 @@ static struct omap_hwmod_ocp_if omap2420_l4_wkup__timer1 = {
378 .slave = &omap2420_timer1_hwmod, 292 .slave = &omap2420_timer1_hwmod,
379 .clk = "gpt1_ick", 293 .clk = "gpt1_ick",
380 .addr = omap2420_timer1_addrs, 294 .addr = omap2420_timer1_addrs,
381 .addr_cnt = ARRAY_SIZE(omap2420_timer1_addrs),
382 .user = OCP_USER_MPU | OCP_USER_SDMA, 295 .user = OCP_USER_MPU | OCP_USER_SDMA,
383}; 296};
384 297
@@ -390,8 +303,7 @@ static struct omap_hwmod_ocp_if *omap2420_timer1_slaves[] = {
390/* timer1 hwmod */ 303/* timer1 hwmod */
391static struct omap_hwmod omap2420_timer1_hwmod = { 304static struct omap_hwmod omap2420_timer1_hwmod = {
392 .name = "timer1", 305 .name = "timer1",
393 .mpu_irqs = omap2420_timer1_mpu_irqs, 306 .mpu_irqs = omap2_timer1_mpu_irqs,
394 .mpu_irqs_cnt = ARRAY_SIZE(omap2420_timer1_mpu_irqs),
395 .main_clk = "gpt1_fck", 307 .main_clk = "gpt1_fck",
396 .prcm = { 308 .prcm = {
397 .omap2 = { 309 .omap2 = {
@@ -404,31 +316,19 @@ static struct omap_hwmod omap2420_timer1_hwmod = {
404 }, 316 },
405 .slaves = omap2420_timer1_slaves, 317 .slaves = omap2420_timer1_slaves,
406 .slaves_cnt = ARRAY_SIZE(omap2420_timer1_slaves), 318 .slaves_cnt = ARRAY_SIZE(omap2420_timer1_slaves),
407 .class = &omap2420_timer_hwmod_class, 319 .class = &omap2xxx_timer_hwmod_class,
408 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420) 320 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
409}; 321};
410 322
411/* timer2 */ 323/* timer2 */
412static struct omap_hwmod omap2420_timer2_hwmod; 324static struct omap_hwmod omap2420_timer2_hwmod;
413static struct omap_hwmod_irq_info omap2420_timer2_mpu_irqs[] = {
414 { .irq = 38, },
415};
416
417static struct omap_hwmod_addr_space omap2420_timer2_addrs[] = {
418 {
419 .pa_start = 0x4802a000,
420 .pa_end = 0x4802a000 + SZ_1K - 1,
421 .flags = ADDR_TYPE_RT
422 },
423};
424 325
425/* l4_core -> timer2 */ 326/* l4_core -> timer2 */
426static struct omap_hwmod_ocp_if omap2420_l4_core__timer2 = { 327static struct omap_hwmod_ocp_if omap2420_l4_core__timer2 = {
427 .master = &omap2420_l4_core_hwmod, 328 .master = &omap2420_l4_core_hwmod,
428 .slave = &omap2420_timer2_hwmod, 329 .slave = &omap2420_timer2_hwmod,
429 .clk = "gpt2_ick", 330 .clk = "gpt2_ick",
430 .addr = omap2420_timer2_addrs, 331 .addr = omap2xxx_timer2_addrs,
431 .addr_cnt = ARRAY_SIZE(omap2420_timer2_addrs),
432 .user = OCP_USER_MPU | OCP_USER_SDMA, 332 .user = OCP_USER_MPU | OCP_USER_SDMA,
433}; 333};
434 334
@@ -440,8 +340,7 @@ static struct omap_hwmod_ocp_if *omap2420_timer2_slaves[] = {
440/* timer2 hwmod */ 340/* timer2 hwmod */
441static struct omap_hwmod omap2420_timer2_hwmod = { 341static struct omap_hwmod omap2420_timer2_hwmod = {
442 .name = "timer2", 342 .name = "timer2",
443 .mpu_irqs = omap2420_timer2_mpu_irqs, 343 .mpu_irqs = omap2_timer2_mpu_irqs,
444 .mpu_irqs_cnt = ARRAY_SIZE(omap2420_timer2_mpu_irqs),
445 .main_clk = "gpt2_fck", 344 .main_clk = "gpt2_fck",
446 .prcm = { 345 .prcm = {
447 .omap2 = { 346 .omap2 = {
@@ -454,31 +353,19 @@ static struct omap_hwmod omap2420_timer2_hwmod = {
454 }, 353 },
455 .slaves = omap2420_timer2_slaves, 354 .slaves = omap2420_timer2_slaves,
456 .slaves_cnt = ARRAY_SIZE(omap2420_timer2_slaves), 355 .slaves_cnt = ARRAY_SIZE(omap2420_timer2_slaves),
457 .class = &omap2420_timer_hwmod_class, 356 .class = &omap2xxx_timer_hwmod_class,
458 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420) 357 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
459}; 358};
460 359
461/* timer3 */ 360/* timer3 */
462static struct omap_hwmod omap2420_timer3_hwmod; 361static struct omap_hwmod omap2420_timer3_hwmod;
463static struct omap_hwmod_irq_info omap2420_timer3_mpu_irqs[] = {
464 { .irq = 39, },
465};
466
467static struct omap_hwmod_addr_space omap2420_timer3_addrs[] = {
468 {
469 .pa_start = 0x48078000,
470 .pa_end = 0x48078000 + SZ_1K - 1,
471 .flags = ADDR_TYPE_RT
472 },
473};
474 362
475/* l4_core -> timer3 */ 363/* l4_core -> timer3 */
476static struct omap_hwmod_ocp_if omap2420_l4_core__timer3 = { 364static struct omap_hwmod_ocp_if omap2420_l4_core__timer3 = {
477 .master = &omap2420_l4_core_hwmod, 365 .master = &omap2420_l4_core_hwmod,
478 .slave = &omap2420_timer3_hwmod, 366 .slave = &omap2420_timer3_hwmod,
479 .clk = "gpt3_ick", 367 .clk = "gpt3_ick",
480 .addr = omap2420_timer3_addrs, 368 .addr = omap2xxx_timer3_addrs,
481 .addr_cnt = ARRAY_SIZE(omap2420_timer3_addrs),
482 .user = OCP_USER_MPU | OCP_USER_SDMA, 369 .user = OCP_USER_MPU | OCP_USER_SDMA,
483}; 370};
484 371
@@ -490,8 +377,7 @@ static struct omap_hwmod_ocp_if *omap2420_timer3_slaves[] = {
490/* timer3 hwmod */ 377/* timer3 hwmod */
491static struct omap_hwmod omap2420_timer3_hwmod = { 378static struct omap_hwmod omap2420_timer3_hwmod = {
492 .name = "timer3", 379 .name = "timer3",
493 .mpu_irqs = omap2420_timer3_mpu_irqs, 380 .mpu_irqs = omap2_timer3_mpu_irqs,
494 .mpu_irqs_cnt = ARRAY_SIZE(omap2420_timer3_mpu_irqs),
495 .main_clk = "gpt3_fck", 381 .main_clk = "gpt3_fck",
496 .prcm = { 382 .prcm = {
497 .omap2 = { 383 .omap2 = {
@@ -504,31 +390,19 @@ static struct omap_hwmod omap2420_timer3_hwmod = {
504 }, 390 },
505 .slaves = omap2420_timer3_slaves, 391 .slaves = omap2420_timer3_slaves,
506 .slaves_cnt = ARRAY_SIZE(omap2420_timer3_slaves), 392 .slaves_cnt = ARRAY_SIZE(omap2420_timer3_slaves),
507 .class = &omap2420_timer_hwmod_class, 393 .class = &omap2xxx_timer_hwmod_class,
508 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420) 394 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
509}; 395};
510 396
511/* timer4 */ 397/* timer4 */
512static struct omap_hwmod omap2420_timer4_hwmod; 398static struct omap_hwmod omap2420_timer4_hwmod;
513static struct omap_hwmod_irq_info omap2420_timer4_mpu_irqs[] = {
514 { .irq = 40, },
515};
516
517static struct omap_hwmod_addr_space omap2420_timer4_addrs[] = {
518 {
519 .pa_start = 0x4807a000,
520 .pa_end = 0x4807a000 + SZ_1K - 1,
521 .flags = ADDR_TYPE_RT
522 },
523};
524 399
525/* l4_core -> timer4 */ 400/* l4_core -> timer4 */
526static struct omap_hwmod_ocp_if omap2420_l4_core__timer4 = { 401static struct omap_hwmod_ocp_if omap2420_l4_core__timer4 = {
527 .master = &omap2420_l4_core_hwmod, 402 .master = &omap2420_l4_core_hwmod,
528 .slave = &omap2420_timer4_hwmod, 403 .slave = &omap2420_timer4_hwmod,
529 .clk = "gpt4_ick", 404 .clk = "gpt4_ick",
530 .addr = omap2420_timer4_addrs, 405 .addr = omap2xxx_timer4_addrs,
531 .addr_cnt = ARRAY_SIZE(omap2420_timer4_addrs),
532 .user = OCP_USER_MPU | OCP_USER_SDMA, 406 .user = OCP_USER_MPU | OCP_USER_SDMA,
533}; 407};
534 408
@@ -540,8 +414,7 @@ static struct omap_hwmod_ocp_if *omap2420_timer4_slaves[] = {
540/* timer4 hwmod */ 414/* timer4 hwmod */
541static struct omap_hwmod omap2420_timer4_hwmod = { 415static struct omap_hwmod omap2420_timer4_hwmod = {
542 .name = "timer4", 416 .name = "timer4",
543 .mpu_irqs = omap2420_timer4_mpu_irqs, 417 .mpu_irqs = omap2_timer4_mpu_irqs,
544 .mpu_irqs_cnt = ARRAY_SIZE(omap2420_timer4_mpu_irqs),
545 .main_clk = "gpt4_fck", 418 .main_clk = "gpt4_fck",
546 .prcm = { 419 .prcm = {
547 .omap2 = { 420 .omap2 = {
@@ -554,31 +427,19 @@ static struct omap_hwmod omap2420_timer4_hwmod = {
554 }, 427 },
555 .slaves = omap2420_timer4_slaves, 428 .slaves = omap2420_timer4_slaves,
556 .slaves_cnt = ARRAY_SIZE(omap2420_timer4_slaves), 429 .slaves_cnt = ARRAY_SIZE(omap2420_timer4_slaves),
557 .class = &omap2420_timer_hwmod_class, 430 .class = &omap2xxx_timer_hwmod_class,
558 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420) 431 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
559}; 432};
560 433
561/* timer5 */ 434/* timer5 */
562static struct omap_hwmod omap2420_timer5_hwmod; 435static struct omap_hwmod omap2420_timer5_hwmod;
563static struct omap_hwmod_irq_info omap2420_timer5_mpu_irqs[] = {
564 { .irq = 41, },
565};
566
567static struct omap_hwmod_addr_space omap2420_timer5_addrs[] = {
568 {
569 .pa_start = 0x4807c000,
570 .pa_end = 0x4807c000 + SZ_1K - 1,
571 .flags = ADDR_TYPE_RT
572 },
573};
574 436
575/* l4_core -> timer5 */ 437/* l4_core -> timer5 */
576static struct omap_hwmod_ocp_if omap2420_l4_core__timer5 = { 438static struct omap_hwmod_ocp_if omap2420_l4_core__timer5 = {
577 .master = &omap2420_l4_core_hwmod, 439 .master = &omap2420_l4_core_hwmod,
578 .slave = &omap2420_timer5_hwmod, 440 .slave = &omap2420_timer5_hwmod,
579 .clk = "gpt5_ick", 441 .clk = "gpt5_ick",
580 .addr = omap2420_timer5_addrs, 442 .addr = omap2xxx_timer5_addrs,
581 .addr_cnt = ARRAY_SIZE(omap2420_timer5_addrs),
582 .user = OCP_USER_MPU | OCP_USER_SDMA, 443 .user = OCP_USER_MPU | OCP_USER_SDMA,
583}; 444};
584 445
@@ -590,8 +451,7 @@ static struct omap_hwmod_ocp_if *omap2420_timer5_slaves[] = {
590/* timer5 hwmod */ 451/* timer5 hwmod */
591static struct omap_hwmod omap2420_timer5_hwmod = { 452static struct omap_hwmod omap2420_timer5_hwmod = {
592 .name = "timer5", 453 .name = "timer5",
593 .mpu_irqs = omap2420_timer5_mpu_irqs, 454 .mpu_irqs = omap2_timer5_mpu_irqs,
594 .mpu_irqs_cnt = ARRAY_SIZE(omap2420_timer5_mpu_irqs),
595 .main_clk = "gpt5_fck", 455 .main_clk = "gpt5_fck",
596 .prcm = { 456 .prcm = {
597 .omap2 = { 457 .omap2 = {
@@ -604,32 +464,20 @@ static struct omap_hwmod omap2420_timer5_hwmod = {
604 }, 464 },
605 .slaves = omap2420_timer5_slaves, 465 .slaves = omap2420_timer5_slaves,
606 .slaves_cnt = ARRAY_SIZE(omap2420_timer5_slaves), 466 .slaves_cnt = ARRAY_SIZE(omap2420_timer5_slaves),
607 .class = &omap2420_timer_hwmod_class, 467 .class = &omap2xxx_timer_hwmod_class,
608 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420) 468 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
609}; 469};
610 470
611 471
612/* timer6 */ 472/* timer6 */
613static struct omap_hwmod omap2420_timer6_hwmod; 473static struct omap_hwmod omap2420_timer6_hwmod;
614static struct omap_hwmod_irq_info omap2420_timer6_mpu_irqs[] = {
615 { .irq = 42, },
616};
617
618static struct omap_hwmod_addr_space omap2420_timer6_addrs[] = {
619 {
620 .pa_start = 0x4807e000,
621 .pa_end = 0x4807e000 + SZ_1K - 1,
622 .flags = ADDR_TYPE_RT
623 },
624};
625 474
626/* l4_core -> timer6 */ 475/* l4_core -> timer6 */
627static struct omap_hwmod_ocp_if omap2420_l4_core__timer6 = { 476static struct omap_hwmod_ocp_if omap2420_l4_core__timer6 = {
628 .master = &omap2420_l4_core_hwmod, 477 .master = &omap2420_l4_core_hwmod,
629 .slave = &omap2420_timer6_hwmod, 478 .slave = &omap2420_timer6_hwmod,
630 .clk = "gpt6_ick", 479 .clk = "gpt6_ick",
631 .addr = omap2420_timer6_addrs, 480 .addr = omap2xxx_timer6_addrs,
632 .addr_cnt = ARRAY_SIZE(omap2420_timer6_addrs),
633 .user = OCP_USER_MPU | OCP_USER_SDMA, 481 .user = OCP_USER_MPU | OCP_USER_SDMA,
634}; 482};
635 483
@@ -641,8 +489,7 @@ static struct omap_hwmod_ocp_if *omap2420_timer6_slaves[] = {
641/* timer6 hwmod */ 489/* timer6 hwmod */
642static struct omap_hwmod omap2420_timer6_hwmod = { 490static struct omap_hwmod omap2420_timer6_hwmod = {
643 .name = "timer6", 491 .name = "timer6",
644 .mpu_irqs = omap2420_timer6_mpu_irqs, 492 .mpu_irqs = omap2_timer6_mpu_irqs,
645 .mpu_irqs_cnt = ARRAY_SIZE(omap2420_timer6_mpu_irqs),
646 .main_clk = "gpt6_fck", 493 .main_clk = "gpt6_fck",
647 .prcm = { 494 .prcm = {
648 .omap2 = { 495 .omap2 = {
@@ -655,31 +502,19 @@ static struct omap_hwmod omap2420_timer6_hwmod = {
655 }, 502 },
656 .slaves = omap2420_timer6_slaves, 503 .slaves = omap2420_timer6_slaves,
657 .slaves_cnt = ARRAY_SIZE(omap2420_timer6_slaves), 504 .slaves_cnt = ARRAY_SIZE(omap2420_timer6_slaves),
658 .class = &omap2420_timer_hwmod_class, 505 .class = &omap2xxx_timer_hwmod_class,
659 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420) 506 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
660}; 507};
661 508
662/* timer7 */ 509/* timer7 */
663static struct omap_hwmod omap2420_timer7_hwmod; 510static struct omap_hwmod omap2420_timer7_hwmod;
664static struct omap_hwmod_irq_info omap2420_timer7_mpu_irqs[] = {
665 { .irq = 43, },
666};
667
668static struct omap_hwmod_addr_space omap2420_timer7_addrs[] = {
669 {
670 .pa_start = 0x48080000,
671 .pa_end = 0x48080000 + SZ_1K - 1,
672 .flags = ADDR_TYPE_RT
673 },
674};
675 511
676/* l4_core -> timer7 */ 512/* l4_core -> timer7 */
677static struct omap_hwmod_ocp_if omap2420_l4_core__timer7 = { 513static struct omap_hwmod_ocp_if omap2420_l4_core__timer7 = {
678 .master = &omap2420_l4_core_hwmod, 514 .master = &omap2420_l4_core_hwmod,
679 .slave = &omap2420_timer7_hwmod, 515 .slave = &omap2420_timer7_hwmod,
680 .clk = "gpt7_ick", 516 .clk = "gpt7_ick",
681 .addr = omap2420_timer7_addrs, 517 .addr = omap2xxx_timer7_addrs,
682 .addr_cnt = ARRAY_SIZE(omap2420_timer7_addrs),
683 .user = OCP_USER_MPU | OCP_USER_SDMA, 518 .user = OCP_USER_MPU | OCP_USER_SDMA,
684}; 519};
685 520
@@ -691,8 +526,7 @@ static struct omap_hwmod_ocp_if *omap2420_timer7_slaves[] = {
691/* timer7 hwmod */ 526/* timer7 hwmod */
692static struct omap_hwmod omap2420_timer7_hwmod = { 527static struct omap_hwmod omap2420_timer7_hwmod = {
693 .name = "timer7", 528 .name = "timer7",
694 .mpu_irqs = omap2420_timer7_mpu_irqs, 529 .mpu_irqs = omap2_timer7_mpu_irqs,
695 .mpu_irqs_cnt = ARRAY_SIZE(omap2420_timer7_mpu_irqs),
696 .main_clk = "gpt7_fck", 530 .main_clk = "gpt7_fck",
697 .prcm = { 531 .prcm = {
698 .omap2 = { 532 .omap2 = {
@@ -705,31 +539,19 @@ static struct omap_hwmod omap2420_timer7_hwmod = {
705 }, 539 },
706 .slaves = omap2420_timer7_slaves, 540 .slaves = omap2420_timer7_slaves,
707 .slaves_cnt = ARRAY_SIZE(omap2420_timer7_slaves), 541 .slaves_cnt = ARRAY_SIZE(omap2420_timer7_slaves),
708 .class = &omap2420_timer_hwmod_class, 542 .class = &omap2xxx_timer_hwmod_class,
709 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420) 543 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
710}; 544};
711 545
712/* timer8 */ 546/* timer8 */
713static struct omap_hwmod omap2420_timer8_hwmod; 547static struct omap_hwmod omap2420_timer8_hwmod;
714static struct omap_hwmod_irq_info omap2420_timer8_mpu_irqs[] = {
715 { .irq = 44, },
716};
717
718static struct omap_hwmod_addr_space omap2420_timer8_addrs[] = {
719 {
720 .pa_start = 0x48082000,
721 .pa_end = 0x48082000 + SZ_1K - 1,
722 .flags = ADDR_TYPE_RT
723 },
724};
725 548
726/* l4_core -> timer8 */ 549/* l4_core -> timer8 */
727static struct omap_hwmod_ocp_if omap2420_l4_core__timer8 = { 550static struct omap_hwmod_ocp_if omap2420_l4_core__timer8 = {
728 .master = &omap2420_l4_core_hwmod, 551 .master = &omap2420_l4_core_hwmod,
729 .slave = &omap2420_timer8_hwmod, 552 .slave = &omap2420_timer8_hwmod,
730 .clk = "gpt8_ick", 553 .clk = "gpt8_ick",
731 .addr = omap2420_timer8_addrs, 554 .addr = omap2xxx_timer8_addrs,
732 .addr_cnt = ARRAY_SIZE(omap2420_timer8_addrs),
733 .user = OCP_USER_MPU | OCP_USER_SDMA, 555 .user = OCP_USER_MPU | OCP_USER_SDMA,
734}; 556};
735 557
@@ -741,8 +563,7 @@ static struct omap_hwmod_ocp_if *omap2420_timer8_slaves[] = {
741/* timer8 hwmod */ 563/* timer8 hwmod */
742static struct omap_hwmod omap2420_timer8_hwmod = { 564static struct omap_hwmod omap2420_timer8_hwmod = {
743 .name = "timer8", 565 .name = "timer8",
744 .mpu_irqs = omap2420_timer8_mpu_irqs, 566 .mpu_irqs = omap2_timer8_mpu_irqs,
745 .mpu_irqs_cnt = ARRAY_SIZE(omap2420_timer8_mpu_irqs),
746 .main_clk = "gpt8_fck", 567 .main_clk = "gpt8_fck",
747 .prcm = { 568 .prcm = {
748 .omap2 = { 569 .omap2 = {
@@ -755,31 +576,19 @@ static struct omap_hwmod omap2420_timer8_hwmod = {
755 }, 576 },
756 .slaves = omap2420_timer8_slaves, 577 .slaves = omap2420_timer8_slaves,
757 .slaves_cnt = ARRAY_SIZE(omap2420_timer8_slaves), 578 .slaves_cnt = ARRAY_SIZE(omap2420_timer8_slaves),
758 .class = &omap2420_timer_hwmod_class, 579 .class = &omap2xxx_timer_hwmod_class,
759 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420) 580 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
760}; 581};
761 582
762/* timer9 */ 583/* timer9 */
763static struct omap_hwmod omap2420_timer9_hwmod; 584static struct omap_hwmod omap2420_timer9_hwmod;
764static struct omap_hwmod_irq_info omap2420_timer9_mpu_irqs[] = {
765 { .irq = 45, },
766};
767
768static struct omap_hwmod_addr_space omap2420_timer9_addrs[] = {
769 {
770 .pa_start = 0x48084000,
771 .pa_end = 0x48084000 + SZ_1K - 1,
772 .flags = ADDR_TYPE_RT
773 },
774};
775 585
776/* l4_core -> timer9 */ 586/* l4_core -> timer9 */
777static struct omap_hwmod_ocp_if omap2420_l4_core__timer9 = { 587static struct omap_hwmod_ocp_if omap2420_l4_core__timer9 = {
778 .master = &omap2420_l4_core_hwmod, 588 .master = &omap2420_l4_core_hwmod,
779 .slave = &omap2420_timer9_hwmod, 589 .slave = &omap2420_timer9_hwmod,
780 .clk = "gpt9_ick", 590 .clk = "gpt9_ick",
781 .addr = omap2420_timer9_addrs, 591 .addr = omap2xxx_timer9_addrs,
782 .addr_cnt = ARRAY_SIZE(omap2420_timer9_addrs),
783 .user = OCP_USER_MPU | OCP_USER_SDMA, 592 .user = OCP_USER_MPU | OCP_USER_SDMA,
784}; 593};
785 594
@@ -791,8 +600,7 @@ static struct omap_hwmod_ocp_if *omap2420_timer9_slaves[] = {
791/* timer9 hwmod */ 600/* timer9 hwmod */
792static struct omap_hwmod omap2420_timer9_hwmod = { 601static struct omap_hwmod omap2420_timer9_hwmod = {
793 .name = "timer9", 602 .name = "timer9",
794 .mpu_irqs = omap2420_timer9_mpu_irqs, 603 .mpu_irqs = omap2_timer9_mpu_irqs,
795 .mpu_irqs_cnt = ARRAY_SIZE(omap2420_timer9_mpu_irqs),
796 .main_clk = "gpt9_fck", 604 .main_clk = "gpt9_fck",
797 .prcm = { 605 .prcm = {
798 .omap2 = { 606 .omap2 = {
@@ -805,31 +613,19 @@ static struct omap_hwmod omap2420_timer9_hwmod = {
805 }, 613 },
806 .slaves = omap2420_timer9_slaves, 614 .slaves = omap2420_timer9_slaves,
807 .slaves_cnt = ARRAY_SIZE(omap2420_timer9_slaves), 615 .slaves_cnt = ARRAY_SIZE(omap2420_timer9_slaves),
808 .class = &omap2420_timer_hwmod_class, 616 .class = &omap2xxx_timer_hwmod_class,
809 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420) 617 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
810}; 618};
811 619
812/* timer10 */ 620/* timer10 */
813static struct omap_hwmod omap2420_timer10_hwmod; 621static struct omap_hwmod omap2420_timer10_hwmod;
814static struct omap_hwmod_irq_info omap2420_timer10_mpu_irqs[] = {
815 { .irq = 46, },
816};
817
818static struct omap_hwmod_addr_space omap2420_timer10_addrs[] = {
819 {
820 .pa_start = 0x48086000,
821 .pa_end = 0x48086000 + SZ_1K - 1,
822 .flags = ADDR_TYPE_RT
823 },
824};
825 622
826/* l4_core -> timer10 */ 623/* l4_core -> timer10 */
827static struct omap_hwmod_ocp_if omap2420_l4_core__timer10 = { 624static struct omap_hwmod_ocp_if omap2420_l4_core__timer10 = {
828 .master = &omap2420_l4_core_hwmod, 625 .master = &omap2420_l4_core_hwmod,
829 .slave = &omap2420_timer10_hwmod, 626 .slave = &omap2420_timer10_hwmod,
830 .clk = "gpt10_ick", 627 .clk = "gpt10_ick",
831 .addr = omap2420_timer10_addrs, 628 .addr = omap2_timer10_addrs,
832 .addr_cnt = ARRAY_SIZE(omap2420_timer10_addrs),
833 .user = OCP_USER_MPU | OCP_USER_SDMA, 629 .user = OCP_USER_MPU | OCP_USER_SDMA,
834}; 630};
835 631
@@ -841,8 +637,7 @@ static struct omap_hwmod_ocp_if *omap2420_timer10_slaves[] = {
841/* timer10 hwmod */ 637/* timer10 hwmod */
842static struct omap_hwmod omap2420_timer10_hwmod = { 638static struct omap_hwmod omap2420_timer10_hwmod = {
843 .name = "timer10", 639 .name = "timer10",
844 .mpu_irqs = omap2420_timer10_mpu_irqs, 640 .mpu_irqs = omap2_timer10_mpu_irqs,
845 .mpu_irqs_cnt = ARRAY_SIZE(omap2420_timer10_mpu_irqs),
846 .main_clk = "gpt10_fck", 641 .main_clk = "gpt10_fck",
847 .prcm = { 642 .prcm = {
848 .omap2 = { 643 .omap2 = {
@@ -855,31 +650,19 @@ static struct omap_hwmod omap2420_timer10_hwmod = {
855 }, 650 },
856 .slaves = omap2420_timer10_slaves, 651 .slaves = omap2420_timer10_slaves,
857 .slaves_cnt = ARRAY_SIZE(omap2420_timer10_slaves), 652 .slaves_cnt = ARRAY_SIZE(omap2420_timer10_slaves),
858 .class = &omap2420_timer_hwmod_class, 653 .class = &omap2xxx_timer_hwmod_class,
859 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420) 654 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
860}; 655};
861 656
862/* timer11 */ 657/* timer11 */
863static struct omap_hwmod omap2420_timer11_hwmod; 658static struct omap_hwmod omap2420_timer11_hwmod;
864static struct omap_hwmod_irq_info omap2420_timer11_mpu_irqs[] = {
865 { .irq = 47, },
866};
867
868static struct omap_hwmod_addr_space omap2420_timer11_addrs[] = {
869 {
870 .pa_start = 0x48088000,
871 .pa_end = 0x48088000 + SZ_1K - 1,
872 .flags = ADDR_TYPE_RT
873 },
874};
875 659
876/* l4_core -> timer11 */ 660/* l4_core -> timer11 */
877static struct omap_hwmod_ocp_if omap2420_l4_core__timer11 = { 661static struct omap_hwmod_ocp_if omap2420_l4_core__timer11 = {
878 .master = &omap2420_l4_core_hwmod, 662 .master = &omap2420_l4_core_hwmod,
879 .slave = &omap2420_timer11_hwmod, 663 .slave = &omap2420_timer11_hwmod,
880 .clk = "gpt11_ick", 664 .clk = "gpt11_ick",
881 .addr = omap2420_timer11_addrs, 665 .addr = omap2_timer11_addrs,
882 .addr_cnt = ARRAY_SIZE(omap2420_timer11_addrs),
883 .user = OCP_USER_MPU | OCP_USER_SDMA, 666 .user = OCP_USER_MPU | OCP_USER_SDMA,
884}; 667};
885 668
@@ -891,8 +674,7 @@ static struct omap_hwmod_ocp_if *omap2420_timer11_slaves[] = {
891/* timer11 hwmod */ 674/* timer11 hwmod */
892static struct omap_hwmod omap2420_timer11_hwmod = { 675static struct omap_hwmod omap2420_timer11_hwmod = {
893 .name = "timer11", 676 .name = "timer11",
894 .mpu_irqs = omap2420_timer11_mpu_irqs, 677 .mpu_irqs = omap2_timer11_mpu_irqs,
895 .mpu_irqs_cnt = ARRAY_SIZE(omap2420_timer11_mpu_irqs),
896 .main_clk = "gpt11_fck", 678 .main_clk = "gpt11_fck",
897 .prcm = { 679 .prcm = {
898 .omap2 = { 680 .omap2 = {
@@ -905,31 +687,19 @@ static struct omap_hwmod omap2420_timer11_hwmod = {
905 }, 687 },
906 .slaves = omap2420_timer11_slaves, 688 .slaves = omap2420_timer11_slaves,
907 .slaves_cnt = ARRAY_SIZE(omap2420_timer11_slaves), 689 .slaves_cnt = ARRAY_SIZE(omap2420_timer11_slaves),
908 .class = &omap2420_timer_hwmod_class, 690 .class = &omap2xxx_timer_hwmod_class,
909 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420) 691 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
910}; 692};
911 693
912/* timer12 */ 694/* timer12 */
913static struct omap_hwmod omap2420_timer12_hwmod; 695static struct omap_hwmod omap2420_timer12_hwmod;
914static struct omap_hwmod_irq_info omap2420_timer12_mpu_irqs[] = {
915 { .irq = 48, },
916};
917
918static struct omap_hwmod_addr_space omap2420_timer12_addrs[] = {
919 {
920 .pa_start = 0x4808a000,
921 .pa_end = 0x4808a000 + SZ_1K - 1,
922 .flags = ADDR_TYPE_RT
923 },
924};
925 696
926/* l4_core -> timer12 */ 697/* l4_core -> timer12 */
927static struct omap_hwmod_ocp_if omap2420_l4_core__timer12 = { 698static struct omap_hwmod_ocp_if omap2420_l4_core__timer12 = {
928 .master = &omap2420_l4_core_hwmod, 699 .master = &omap2420_l4_core_hwmod,
929 .slave = &omap2420_timer12_hwmod, 700 .slave = &omap2420_timer12_hwmod,
930 .clk = "gpt12_ick", 701 .clk = "gpt12_ick",
931 .addr = omap2420_timer12_addrs, 702 .addr = omap2xxx_timer12_addrs,
932 .addr_cnt = ARRAY_SIZE(omap2420_timer12_addrs),
933 .user = OCP_USER_MPU | OCP_USER_SDMA, 703 .user = OCP_USER_MPU | OCP_USER_SDMA,
934}; 704};
935 705
@@ -941,8 +711,7 @@ static struct omap_hwmod_ocp_if *omap2420_timer12_slaves[] = {
941/* timer12 hwmod */ 711/* timer12 hwmod */
942static struct omap_hwmod omap2420_timer12_hwmod = { 712static struct omap_hwmod omap2420_timer12_hwmod = {
943 .name = "timer12", 713 .name = "timer12",
944 .mpu_irqs = omap2420_timer12_mpu_irqs, 714 .mpu_irqs = omap2xxx_timer12_mpu_irqs,
945 .mpu_irqs_cnt = ARRAY_SIZE(omap2420_timer12_mpu_irqs),
946 .main_clk = "gpt12_fck", 715 .main_clk = "gpt12_fck",
947 .prcm = { 716 .prcm = {
948 .omap2 = { 717 .omap2 = {
@@ -955,7 +724,7 @@ static struct omap_hwmod omap2420_timer12_hwmod = {
955 }, 724 },
956 .slaves = omap2420_timer12_slaves, 725 .slaves = omap2420_timer12_slaves,
957 .slaves_cnt = ARRAY_SIZE(omap2420_timer12_slaves), 726 .slaves_cnt = ARRAY_SIZE(omap2420_timer12_slaves),
958 .class = &omap2420_timer_hwmod_class, 727 .class = &omap2xxx_timer_hwmod_class,
959 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420) 728 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
960}; 729};
961 730
@@ -966,6 +735,7 @@ static struct omap_hwmod_addr_space omap2420_wd_timer2_addrs[] = {
966 .pa_end = 0x4802207f, 735 .pa_end = 0x4802207f,
967 .flags = ADDR_TYPE_RT 736 .flags = ADDR_TYPE_RT
968 }, 737 },
738 { }
969}; 739};
970 740
971static struct omap_hwmod_ocp_if omap2420_l4_wkup__wd_timer2 = { 741static struct omap_hwmod_ocp_if omap2420_l4_wkup__wd_timer2 = {
@@ -973,31 +743,9 @@ static struct omap_hwmod_ocp_if omap2420_l4_wkup__wd_timer2 = {
973 .slave = &omap2420_wd_timer2_hwmod, 743 .slave = &omap2420_wd_timer2_hwmod,
974 .clk = "mpu_wdt_ick", 744 .clk = "mpu_wdt_ick",
975 .addr = omap2420_wd_timer2_addrs, 745 .addr = omap2420_wd_timer2_addrs,
976 .addr_cnt = ARRAY_SIZE(omap2420_wd_timer2_addrs),
977 .user = OCP_USER_MPU | OCP_USER_SDMA, 746 .user = OCP_USER_MPU | OCP_USER_SDMA,
978}; 747};
979 748
980/*
981 * 'wd_timer' class
982 * 32-bit watchdog upward counter that generates a pulse on the reset pin on
983 * overflow condition
984 */
985
986static struct omap_hwmod_class_sysconfig omap2420_wd_timer_sysc = {
987 .rev_offs = 0x0000,
988 .sysc_offs = 0x0010,
989 .syss_offs = 0x0014,
990 .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_SOFTRESET |
991 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
992 .sysc_fields = &omap_hwmod_sysc_type1,
993};
994
995static struct omap_hwmod_class omap2420_wd_timer_hwmod_class = {
996 .name = "wd_timer",
997 .sysc = &omap2420_wd_timer_sysc,
998 .pre_shutdown = &omap2_wd_timer_disable
999};
1000
1001/* wd_timer2 */ 749/* wd_timer2 */
1002static struct omap_hwmod_ocp_if *omap2420_wd_timer2_slaves[] = { 750static struct omap_hwmod_ocp_if *omap2420_wd_timer2_slaves[] = {
1003 &omap2420_l4_wkup__wd_timer2, 751 &omap2420_l4_wkup__wd_timer2,
@@ -1005,7 +753,7 @@ static struct omap_hwmod_ocp_if *omap2420_wd_timer2_slaves[] = {
1005 753
1006static struct omap_hwmod omap2420_wd_timer2_hwmod = { 754static struct omap_hwmod omap2420_wd_timer2_hwmod = {
1007 .name = "wd_timer2", 755 .name = "wd_timer2",
1008 .class = &omap2420_wd_timer_hwmod_class, 756 .class = &omap2xxx_wd_timer_hwmod_class,
1009 .main_clk = "mpu_wdt_fck", 757 .main_clk = "mpu_wdt_fck",
1010 .prcm = { 758 .prcm = {
1011 .omap2 = { 759 .omap2 = {
@@ -1021,45 +769,16 @@ static struct omap_hwmod omap2420_wd_timer2_hwmod = {
1021 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420), 769 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
1022}; 770};
1023 771
1024/* UART */
1025
1026static struct omap_hwmod_class_sysconfig uart_sysc = {
1027 .rev_offs = 0x50,
1028 .sysc_offs = 0x54,
1029 .syss_offs = 0x58,
1030 .sysc_flags = (SYSC_HAS_SIDLEMODE |
1031 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
1032 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
1033 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1034 .sysc_fields = &omap_hwmod_sysc_type1,
1035};
1036
1037static struct omap_hwmod_class uart_class = {
1038 .name = "uart",
1039 .sysc = &uart_sysc,
1040};
1041
1042/* UART1 */ 772/* UART1 */
1043 773
1044static struct omap_hwmod_irq_info uart1_mpu_irqs[] = {
1045 { .irq = INT_24XX_UART1_IRQ, },
1046};
1047
1048static struct omap_hwmod_dma_info uart1_sdma_reqs[] = {
1049 { .name = "rx", .dma_req = OMAP24XX_DMA_UART1_RX, },
1050 { .name = "tx", .dma_req = OMAP24XX_DMA_UART1_TX, },
1051};
1052
1053static struct omap_hwmod_ocp_if *omap2420_uart1_slaves[] = { 774static struct omap_hwmod_ocp_if *omap2420_uart1_slaves[] = {
1054 &omap2_l4_core__uart1, 775 &omap2_l4_core__uart1,
1055}; 776};
1056 777
1057static struct omap_hwmod omap2420_uart1_hwmod = { 778static struct omap_hwmod omap2420_uart1_hwmod = {
1058 .name = "uart1", 779 .name = "uart1",
1059 .mpu_irqs = uart1_mpu_irqs, 780 .mpu_irqs = omap2_uart1_mpu_irqs,
1060 .mpu_irqs_cnt = ARRAY_SIZE(uart1_mpu_irqs), 781 .sdma_reqs = omap2_uart1_sdma_reqs,
1061 .sdma_reqs = uart1_sdma_reqs,
1062 .sdma_reqs_cnt = ARRAY_SIZE(uart1_sdma_reqs),
1063 .main_clk = "uart1_fck", 782 .main_clk = "uart1_fck",
1064 .prcm = { 783 .prcm = {
1065 .omap2 = { 784 .omap2 = {
@@ -1072,31 +791,20 @@ static struct omap_hwmod omap2420_uart1_hwmod = {
1072 }, 791 },
1073 .slaves = omap2420_uart1_slaves, 792 .slaves = omap2420_uart1_slaves,
1074 .slaves_cnt = ARRAY_SIZE(omap2420_uart1_slaves), 793 .slaves_cnt = ARRAY_SIZE(omap2420_uart1_slaves),
1075 .class = &uart_class, 794 .class = &omap2_uart_class,
1076 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420), 795 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
1077}; 796};
1078 797
1079/* UART2 */ 798/* UART2 */
1080 799
1081static struct omap_hwmod_irq_info uart2_mpu_irqs[] = {
1082 { .irq = INT_24XX_UART2_IRQ, },
1083};
1084
1085static struct omap_hwmod_dma_info uart2_sdma_reqs[] = {
1086 { .name = "rx", .dma_req = OMAP24XX_DMA_UART2_RX, },
1087 { .name = "tx", .dma_req = OMAP24XX_DMA_UART2_TX, },
1088};
1089
1090static struct omap_hwmod_ocp_if *omap2420_uart2_slaves[] = { 800static struct omap_hwmod_ocp_if *omap2420_uart2_slaves[] = {
1091 &omap2_l4_core__uart2, 801 &omap2_l4_core__uart2,
1092}; 802};
1093 803
1094static struct omap_hwmod omap2420_uart2_hwmod = { 804static struct omap_hwmod omap2420_uart2_hwmod = {
1095 .name = "uart2", 805 .name = "uart2",
1096 .mpu_irqs = uart2_mpu_irqs, 806 .mpu_irqs = omap2_uart2_mpu_irqs,
1097 .mpu_irqs_cnt = ARRAY_SIZE(uart2_mpu_irqs), 807 .sdma_reqs = omap2_uart2_sdma_reqs,
1098 .sdma_reqs = uart2_sdma_reqs,
1099 .sdma_reqs_cnt = ARRAY_SIZE(uart2_sdma_reqs),
1100 .main_clk = "uart2_fck", 808 .main_clk = "uart2_fck",
1101 .prcm = { 809 .prcm = {
1102 .omap2 = { 810 .omap2 = {
@@ -1109,31 +817,20 @@ static struct omap_hwmod omap2420_uart2_hwmod = {
1109 }, 817 },
1110 .slaves = omap2420_uart2_slaves, 818 .slaves = omap2420_uart2_slaves,
1111 .slaves_cnt = ARRAY_SIZE(omap2420_uart2_slaves), 819 .slaves_cnt = ARRAY_SIZE(omap2420_uart2_slaves),
1112 .class = &uart_class, 820 .class = &omap2_uart_class,
1113 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420), 821 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
1114}; 822};
1115 823
1116/* UART3 */ 824/* UART3 */
1117 825
1118static struct omap_hwmod_irq_info uart3_mpu_irqs[] = {
1119 { .irq = INT_24XX_UART3_IRQ, },
1120};
1121
1122static struct omap_hwmod_dma_info uart3_sdma_reqs[] = {
1123 { .name = "rx", .dma_req = OMAP24XX_DMA_UART3_RX, },
1124 { .name = "tx", .dma_req = OMAP24XX_DMA_UART3_TX, },
1125};
1126
1127static struct omap_hwmod_ocp_if *omap2420_uart3_slaves[] = { 826static struct omap_hwmod_ocp_if *omap2420_uart3_slaves[] = {
1128 &omap2_l4_core__uart3, 827 &omap2_l4_core__uart3,
1129}; 828};
1130 829
1131static struct omap_hwmod omap2420_uart3_hwmod = { 830static struct omap_hwmod omap2420_uart3_hwmod = {
1132 .name = "uart3", 831 .name = "uart3",
1133 .mpu_irqs = uart3_mpu_irqs, 832 .mpu_irqs = omap2_uart3_mpu_irqs,
1134 .mpu_irqs_cnt = ARRAY_SIZE(uart3_mpu_irqs), 833 .sdma_reqs = omap2_uart3_sdma_reqs,
1135 .sdma_reqs = uart3_sdma_reqs,
1136 .sdma_reqs_cnt = ARRAY_SIZE(uart3_sdma_reqs),
1137 .main_clk = "uart3_fck", 834 .main_clk = "uart3_fck",
1138 .prcm = { 835 .prcm = {
1139 .omap2 = { 836 .omap2 = {
@@ -1146,53 +843,22 @@ static struct omap_hwmod omap2420_uart3_hwmod = {
1146 }, 843 },
1147 .slaves = omap2420_uart3_slaves, 844 .slaves = omap2420_uart3_slaves,
1148 .slaves_cnt = ARRAY_SIZE(omap2420_uart3_slaves), 845 .slaves_cnt = ARRAY_SIZE(omap2420_uart3_slaves),
1149 .class = &uart_class, 846 .class = &omap2_uart_class,
1150 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420), 847 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
1151}; 848};
1152 849
1153/*
1154 * 'dss' class
1155 * display sub-system
1156 */
1157
1158static struct omap_hwmod_class_sysconfig omap2420_dss_sysc = {
1159 .rev_offs = 0x0000,
1160 .sysc_offs = 0x0010,
1161 .syss_offs = 0x0014,
1162 .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
1163 .sysc_fields = &omap_hwmod_sysc_type1,
1164};
1165
1166static struct omap_hwmod_class omap2420_dss_hwmod_class = {
1167 .name = "dss",
1168 .sysc = &omap2420_dss_sysc,
1169};
1170
1171static struct omap_hwmod_dma_info omap2420_dss_sdma_chs[] = {
1172 { .name = "dispc", .dma_req = 5 },
1173};
1174
1175/* dss */ 850/* dss */
1176/* dss master ports */ 851/* dss master ports */
1177static struct omap_hwmod_ocp_if *omap2420_dss_masters[] = { 852static struct omap_hwmod_ocp_if *omap2420_dss_masters[] = {
1178 &omap2420_dss__l3, 853 &omap2420_dss__l3,
1179}; 854};
1180 855
1181static struct omap_hwmod_addr_space omap2420_dss_addrs[] = {
1182 {
1183 .pa_start = 0x48050000,
1184 .pa_end = 0x480503FF,
1185 .flags = ADDR_TYPE_RT
1186 },
1187};
1188
1189/* l4_core -> dss */ 856/* l4_core -> dss */
1190static struct omap_hwmod_ocp_if omap2420_l4_core__dss = { 857static struct omap_hwmod_ocp_if omap2420_l4_core__dss = {
1191 .master = &omap2420_l4_core_hwmod, 858 .master = &omap2420_l4_core_hwmod,
1192 .slave = &omap2420_dss_core_hwmod, 859 .slave = &omap2420_dss_core_hwmod,
1193 .clk = "dss_ick", 860 .clk = "dss_ick",
1194 .addr = omap2420_dss_addrs, 861 .addr = omap2_dss_addrs,
1195 .addr_cnt = ARRAY_SIZE(omap2420_dss_addrs),
1196 .fw = { 862 .fw = {
1197 .omap2 = { 863 .omap2 = {
1198 .l4_fw_region = OMAP2420_L4_CORE_FW_DSS_CORE_REGION, 864 .l4_fw_region = OMAP2420_L4_CORE_FW_DSS_CORE_REGION,
@@ -1214,10 +880,9 @@ static struct omap_hwmod_opt_clk dss_opt_clks[] = {
1214 880
1215static struct omap_hwmod omap2420_dss_core_hwmod = { 881static struct omap_hwmod omap2420_dss_core_hwmod = {
1216 .name = "dss_core", 882 .name = "dss_core",
1217 .class = &omap2420_dss_hwmod_class, 883 .class = &omap2_dss_hwmod_class,
1218 .main_clk = "dss1_fck", /* instead of dss_fck */ 884 .main_clk = "dss1_fck", /* instead of dss_fck */
1219 .sdma_reqs = omap2420_dss_sdma_chs, 885 .sdma_reqs = omap2xxx_dss_sdma_chs,
1220 .sdma_reqs_cnt = ARRAY_SIZE(omap2420_dss_sdma_chs),
1221 .prcm = { 886 .prcm = {
1222 .omap2 = { 887 .omap2 = {
1223 .prcm_reg_id = 1, 888 .prcm_reg_id = 1,
@@ -1237,46 +902,12 @@ static struct omap_hwmod omap2420_dss_core_hwmod = {
1237 .flags = HWMOD_NO_IDLEST, 902 .flags = HWMOD_NO_IDLEST,
1238}; 903};
1239 904
1240/*
1241 * 'dispc' class
1242 * display controller
1243 */
1244
1245static struct omap_hwmod_class_sysconfig omap2420_dispc_sysc = {
1246 .rev_offs = 0x0000,
1247 .sysc_offs = 0x0010,
1248 .syss_offs = 0x0014,
1249 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE |
1250 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
1251 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1252 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
1253 .sysc_fields = &omap_hwmod_sysc_type1,
1254};
1255
1256static struct omap_hwmod_class omap2420_dispc_hwmod_class = {
1257 .name = "dispc",
1258 .sysc = &omap2420_dispc_sysc,
1259};
1260
1261static struct omap_hwmod_irq_info omap2420_dispc_irqs[] = {
1262 { .irq = 25 },
1263};
1264
1265static struct omap_hwmod_addr_space omap2420_dss_dispc_addrs[] = {
1266 {
1267 .pa_start = 0x48050400,
1268 .pa_end = 0x480507FF,
1269 .flags = ADDR_TYPE_RT
1270 },
1271};
1272
1273/* l4_core -> dss_dispc */ 905/* l4_core -> dss_dispc */
1274static struct omap_hwmod_ocp_if omap2420_l4_core__dss_dispc = { 906static struct omap_hwmod_ocp_if omap2420_l4_core__dss_dispc = {
1275 .master = &omap2420_l4_core_hwmod, 907 .master = &omap2420_l4_core_hwmod,
1276 .slave = &omap2420_dss_dispc_hwmod, 908 .slave = &omap2420_dss_dispc_hwmod,
1277 .clk = "dss_ick", 909 .clk = "dss_ick",
1278 .addr = omap2420_dss_dispc_addrs, 910 .addr = omap2_dss_dispc_addrs,
1279 .addr_cnt = ARRAY_SIZE(omap2420_dss_dispc_addrs),
1280 .fw = { 911 .fw = {
1281 .omap2 = { 912 .omap2 = {
1282 .l4_fw_region = OMAP2420_L4_CORE_FW_DSS_DISPC_REGION, 913 .l4_fw_region = OMAP2420_L4_CORE_FW_DSS_DISPC_REGION,
@@ -1293,9 +924,8 @@ static struct omap_hwmod_ocp_if *omap2420_dss_dispc_slaves[] = {
1293 924
1294static struct omap_hwmod omap2420_dss_dispc_hwmod = { 925static struct omap_hwmod omap2420_dss_dispc_hwmod = {
1295 .name = "dss_dispc", 926 .name = "dss_dispc",
1296 .class = &omap2420_dispc_hwmod_class, 927 .class = &omap2_dispc_hwmod_class,
1297 .mpu_irqs = omap2420_dispc_irqs, 928 .mpu_irqs = omap2_dispc_irqs,
1298 .mpu_irqs_cnt = ARRAY_SIZE(omap2420_dispc_irqs),
1299 .main_clk = "dss1_fck", 929 .main_clk = "dss1_fck",
1300 .prcm = { 930 .prcm = {
1301 .omap2 = { 931 .omap2 = {
@@ -1312,41 +942,12 @@ static struct omap_hwmod omap2420_dss_dispc_hwmod = {
1312 .flags = HWMOD_NO_IDLEST, 942 .flags = HWMOD_NO_IDLEST,
1313}; 943};
1314 944
1315/*
1316 * 'rfbi' class
1317 * remote frame buffer interface
1318 */
1319
1320static struct omap_hwmod_class_sysconfig omap2420_rfbi_sysc = {
1321 .rev_offs = 0x0000,
1322 .sysc_offs = 0x0010,
1323 .syss_offs = 0x0014,
1324 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
1325 SYSC_HAS_AUTOIDLE),
1326 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1327 .sysc_fields = &omap_hwmod_sysc_type1,
1328};
1329
1330static struct omap_hwmod_class omap2420_rfbi_hwmod_class = {
1331 .name = "rfbi",
1332 .sysc = &omap2420_rfbi_sysc,
1333};
1334
1335static struct omap_hwmod_addr_space omap2420_dss_rfbi_addrs[] = {
1336 {
1337 .pa_start = 0x48050800,
1338 .pa_end = 0x48050BFF,
1339 .flags = ADDR_TYPE_RT
1340 },
1341};
1342
1343/* l4_core -> dss_rfbi */ 945/* l4_core -> dss_rfbi */
1344static struct omap_hwmod_ocp_if omap2420_l4_core__dss_rfbi = { 946static struct omap_hwmod_ocp_if omap2420_l4_core__dss_rfbi = {
1345 .master = &omap2420_l4_core_hwmod, 947 .master = &omap2420_l4_core_hwmod,
1346 .slave = &omap2420_dss_rfbi_hwmod, 948 .slave = &omap2420_dss_rfbi_hwmod,
1347 .clk = "dss_ick", 949 .clk = "dss_ick",
1348 .addr = omap2420_dss_rfbi_addrs, 950 .addr = omap2_dss_rfbi_addrs,
1349 .addr_cnt = ARRAY_SIZE(omap2420_dss_rfbi_addrs),
1350 .fw = { 951 .fw = {
1351 .omap2 = { 952 .omap2 = {
1352 .l4_fw_region = OMAP2420_L4_CORE_FW_DSS_CORE_REGION, 953 .l4_fw_region = OMAP2420_L4_CORE_FW_DSS_CORE_REGION,
@@ -1363,7 +964,7 @@ static struct omap_hwmod_ocp_if *omap2420_dss_rfbi_slaves[] = {
1363 964
1364static struct omap_hwmod omap2420_dss_rfbi_hwmod = { 965static struct omap_hwmod omap2420_dss_rfbi_hwmod = {
1365 .name = "dss_rfbi", 966 .name = "dss_rfbi",
1366 .class = &omap2420_rfbi_hwmod_class, 967 .class = &omap2_rfbi_hwmod_class,
1367 .main_clk = "dss1_fck", 968 .main_clk = "dss1_fck",
1368 .prcm = { 969 .prcm = {
1369 .omap2 = { 970 .omap2 = {
@@ -1378,31 +979,12 @@ static struct omap_hwmod omap2420_dss_rfbi_hwmod = {
1378 .flags = HWMOD_NO_IDLEST, 979 .flags = HWMOD_NO_IDLEST,
1379}; 980};
1380 981
1381/*
1382 * 'venc' class
1383 * video encoder
1384 */
1385
1386static struct omap_hwmod_class omap2420_venc_hwmod_class = {
1387 .name = "venc",
1388};
1389
1390/* dss_venc */
1391static struct omap_hwmod_addr_space omap2420_dss_venc_addrs[] = {
1392 {
1393 .pa_start = 0x48050C00,
1394 .pa_end = 0x48050FFF,
1395 .flags = ADDR_TYPE_RT
1396 },
1397};
1398
1399/* l4_core -> dss_venc */ 982/* l4_core -> dss_venc */
1400static struct omap_hwmod_ocp_if omap2420_l4_core__dss_venc = { 983static struct omap_hwmod_ocp_if omap2420_l4_core__dss_venc = {
1401 .master = &omap2420_l4_core_hwmod, 984 .master = &omap2420_l4_core_hwmod,
1402 .slave = &omap2420_dss_venc_hwmod, 985 .slave = &omap2420_dss_venc_hwmod,
1403 .clk = "dss_54m_fck", 986 .clk = "dss_54m_fck",
1404 .addr = omap2420_dss_venc_addrs, 987 .addr = omap2_dss_venc_addrs,
1405 .addr_cnt = ARRAY_SIZE(omap2420_dss_venc_addrs),
1406 .fw = { 988 .fw = {
1407 .omap2 = { 989 .omap2 = {
1408 .l4_fw_region = OMAP2420_L4_CORE_FW_DSS_VENC_REGION, 990 .l4_fw_region = OMAP2420_L4_CORE_FW_DSS_VENC_REGION,
@@ -1420,7 +1002,7 @@ static struct omap_hwmod_ocp_if *omap2420_dss_venc_slaves[] = {
1420 1002
1421static struct omap_hwmod omap2420_dss_venc_hwmod = { 1003static struct omap_hwmod omap2420_dss_venc_hwmod = {
1422 .name = "dss_venc", 1004 .name = "dss_venc",
1423 .class = &omap2420_venc_hwmod_class, 1005 .class = &omap2_venc_hwmod_class,
1424 .main_clk = "dss1_fck", 1006 .main_clk = "dss1_fck",
1425 .prcm = { 1007 .prcm = {
1426 .omap2 = { 1008 .omap2 = {
@@ -1447,20 +1029,18 @@ static struct omap_hwmod_class_sysconfig i2c_sysc = {
1447static struct omap_hwmod_class i2c_class = { 1029static struct omap_hwmod_class i2c_class = {
1448 .name = "i2c", 1030 .name = "i2c",
1449 .sysc = &i2c_sysc, 1031 .sysc = &i2c_sysc,
1032 .rev = OMAP_I2C_IP_VERSION_1,
1033 .reset = &omap_i2c_reset,
1450}; 1034};
1451 1035
1452static struct omap_i2c_dev_attr i2c_dev_attr; 1036static struct omap_i2c_dev_attr i2c_dev_attr = {
1453 1037 .flags = OMAP_I2C_FLAG_NO_FIFO |
1454/* I2C1 */ 1038 OMAP_I2C_FLAG_SIMPLE_CLOCK |
1455 1039 OMAP_I2C_FLAG_16BIT_DATA_REG |
1456static struct omap_hwmod_irq_info i2c1_mpu_irqs[] = { 1040 OMAP_I2C_FLAG_BUS_SHIFT_2,
1457 { .irq = INT_24XX_I2C1_IRQ, },
1458}; 1041};
1459 1042
1460static struct omap_hwmod_dma_info i2c1_sdma_reqs[] = { 1043/* I2C1 */
1461 { .name = "tx", .dma_req = OMAP24XX_DMA_I2C1_TX },
1462 { .name = "rx", .dma_req = OMAP24XX_DMA_I2C1_RX },
1463};
1464 1044
1465static struct omap_hwmod_ocp_if *omap2420_i2c1_slaves[] = { 1045static struct omap_hwmod_ocp_if *omap2420_i2c1_slaves[] = {
1466 &omap2420_l4_core__i2c1, 1046 &omap2420_l4_core__i2c1,
@@ -1468,10 +1048,8 @@ static struct omap_hwmod_ocp_if *omap2420_i2c1_slaves[] = {
1468 1048
1469static struct omap_hwmod omap2420_i2c1_hwmod = { 1049static struct omap_hwmod omap2420_i2c1_hwmod = {
1470 .name = "i2c1", 1050 .name = "i2c1",
1471 .mpu_irqs = i2c1_mpu_irqs, 1051 .mpu_irqs = omap2_i2c1_mpu_irqs,
1472 .mpu_irqs_cnt = ARRAY_SIZE(i2c1_mpu_irqs), 1052 .sdma_reqs = omap2_i2c1_sdma_reqs,
1473 .sdma_reqs = i2c1_sdma_reqs,
1474 .sdma_reqs_cnt = ARRAY_SIZE(i2c1_sdma_reqs),
1475 .main_clk = "i2c1_fck", 1053 .main_clk = "i2c1_fck",
1476 .prcm = { 1054 .prcm = {
1477 .omap2 = { 1055 .omap2 = {
@@ -1492,25 +1070,14 @@ static struct omap_hwmod omap2420_i2c1_hwmod = {
1492 1070
1493/* I2C2 */ 1071/* I2C2 */
1494 1072
1495static struct omap_hwmod_irq_info i2c2_mpu_irqs[] = {
1496 { .irq = INT_24XX_I2C2_IRQ, },
1497};
1498
1499static struct omap_hwmod_dma_info i2c2_sdma_reqs[] = {
1500 { .name = "tx", .dma_req = OMAP24XX_DMA_I2C2_TX },
1501 { .name = "rx", .dma_req = OMAP24XX_DMA_I2C2_RX },
1502};
1503
1504static struct omap_hwmod_ocp_if *omap2420_i2c2_slaves[] = { 1073static struct omap_hwmod_ocp_if *omap2420_i2c2_slaves[] = {
1505 &omap2420_l4_core__i2c2, 1074 &omap2420_l4_core__i2c2,
1506}; 1075};
1507 1076
1508static struct omap_hwmod omap2420_i2c2_hwmod = { 1077static struct omap_hwmod omap2420_i2c2_hwmod = {
1509 .name = "i2c2", 1078 .name = "i2c2",
1510 .mpu_irqs = i2c2_mpu_irqs, 1079 .mpu_irqs = omap2_i2c2_mpu_irqs,
1511 .mpu_irqs_cnt = ARRAY_SIZE(i2c2_mpu_irqs), 1080 .sdma_reqs = omap2_i2c2_sdma_reqs,
1512 .sdma_reqs = i2c2_sdma_reqs,
1513 .sdma_reqs_cnt = ARRAY_SIZE(i2c2_sdma_reqs),
1514 .main_clk = "i2c2_fck", 1081 .main_clk = "i2c2_fck",
1515 .prcm = { 1082 .prcm = {
1516 .omap2 = { 1083 .omap2 = {
@@ -1536,6 +1103,7 @@ static struct omap_hwmod_addr_space omap2420_gpio1_addr_space[] = {
1536 .pa_end = 0x480181ff, 1103 .pa_end = 0x480181ff,
1537 .flags = ADDR_TYPE_RT 1104 .flags = ADDR_TYPE_RT
1538 }, 1105 },
1106 { }
1539}; 1107};
1540 1108
1541static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio1 = { 1109static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio1 = {
@@ -1543,7 +1111,6 @@ static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio1 = {
1543 .slave = &omap2420_gpio1_hwmod, 1111 .slave = &omap2420_gpio1_hwmod,
1544 .clk = "gpios_ick", 1112 .clk = "gpios_ick",
1545 .addr = omap2420_gpio1_addr_space, 1113 .addr = omap2420_gpio1_addr_space,
1546 .addr_cnt = ARRAY_SIZE(omap2420_gpio1_addr_space),
1547 .user = OCP_USER_MPU | OCP_USER_SDMA, 1114 .user = OCP_USER_MPU | OCP_USER_SDMA,
1548}; 1115};
1549 1116
@@ -1554,6 +1121,7 @@ static struct omap_hwmod_addr_space omap2420_gpio2_addr_space[] = {
1554 .pa_end = 0x4801a1ff, 1121 .pa_end = 0x4801a1ff,
1555 .flags = ADDR_TYPE_RT 1122 .flags = ADDR_TYPE_RT
1556 }, 1123 },
1124 { }
1557}; 1125};
1558 1126
1559static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio2 = { 1127static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio2 = {
@@ -1561,7 +1129,6 @@ static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio2 = {
1561 .slave = &omap2420_gpio2_hwmod, 1129 .slave = &omap2420_gpio2_hwmod,
1562 .clk = "gpios_ick", 1130 .clk = "gpios_ick",
1563 .addr = omap2420_gpio2_addr_space, 1131 .addr = omap2420_gpio2_addr_space,
1564 .addr_cnt = ARRAY_SIZE(omap2420_gpio2_addr_space),
1565 .user = OCP_USER_MPU | OCP_USER_SDMA, 1132 .user = OCP_USER_MPU | OCP_USER_SDMA,
1566}; 1133};
1567 1134
@@ -1572,6 +1139,7 @@ static struct omap_hwmod_addr_space omap2420_gpio3_addr_space[] = {
1572 .pa_end = 0x4801c1ff, 1139 .pa_end = 0x4801c1ff,
1573 .flags = ADDR_TYPE_RT 1140 .flags = ADDR_TYPE_RT
1574 }, 1141 },
1142 { }
1575}; 1143};
1576 1144
1577static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio3 = { 1145static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio3 = {
@@ -1579,7 +1147,6 @@ static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio3 = {
1579 .slave = &omap2420_gpio3_hwmod, 1147 .slave = &omap2420_gpio3_hwmod,
1580 .clk = "gpios_ick", 1148 .clk = "gpios_ick",
1581 .addr = omap2420_gpio3_addr_space, 1149 .addr = omap2420_gpio3_addr_space,
1582 .addr_cnt = ARRAY_SIZE(omap2420_gpio3_addr_space),
1583 .user = OCP_USER_MPU | OCP_USER_SDMA, 1150 .user = OCP_USER_MPU | OCP_USER_SDMA,
1584}; 1151};
1585 1152
@@ -1590,6 +1157,7 @@ static struct omap_hwmod_addr_space omap2420_gpio4_addr_space[] = {
1590 .pa_end = 0x4801e1ff, 1157 .pa_end = 0x4801e1ff,
1591 .flags = ADDR_TYPE_RT 1158 .flags = ADDR_TYPE_RT
1592 }, 1159 },
1160 { }
1593}; 1161};
1594 1162
1595static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio4 = { 1163static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio4 = {
@@ -1597,7 +1165,6 @@ static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio4 = {
1597 .slave = &omap2420_gpio4_hwmod, 1165 .slave = &omap2420_gpio4_hwmod,
1598 .clk = "gpios_ick", 1166 .clk = "gpios_ick",
1599 .addr = omap2420_gpio4_addr_space, 1167 .addr = omap2420_gpio4_addr_space,
1600 .addr_cnt = ARRAY_SIZE(omap2420_gpio4_addr_space),
1601 .user = OCP_USER_MPU | OCP_USER_SDMA, 1168 .user = OCP_USER_MPU | OCP_USER_SDMA,
1602}; 1169};
1603 1170
@@ -1607,32 +1174,7 @@ static struct omap_gpio_dev_attr gpio_dev_attr = {
1607 .dbck_flag = false, 1174 .dbck_flag = false,
1608}; 1175};
1609 1176
1610static struct omap_hwmod_class_sysconfig omap242x_gpio_sysc = {
1611 .rev_offs = 0x0000,
1612 .sysc_offs = 0x0010,
1613 .syss_offs = 0x0014,
1614 .sysc_flags = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
1615 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
1616 SYSS_HAS_RESET_STATUS),
1617 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1618 .sysc_fields = &omap_hwmod_sysc_type1,
1619};
1620
1621/*
1622 * 'gpio' class
1623 * general purpose io module
1624 */
1625static struct omap_hwmod_class omap242x_gpio_hwmod_class = {
1626 .name = "gpio",
1627 .sysc = &omap242x_gpio_sysc,
1628 .rev = 0,
1629};
1630
1631/* gpio1 */ 1177/* gpio1 */
1632static struct omap_hwmod_irq_info omap242x_gpio1_irqs[] = {
1633 { .irq = 29 }, /* INT_24XX_GPIO_BANK1 */
1634};
1635
1636static struct omap_hwmod_ocp_if *omap2420_gpio1_slaves[] = { 1178static struct omap_hwmod_ocp_if *omap2420_gpio1_slaves[] = {
1637 &omap2420_l4_wkup__gpio1, 1179 &omap2420_l4_wkup__gpio1,
1638}; 1180};
@@ -1640,8 +1182,7 @@ static struct omap_hwmod_ocp_if *omap2420_gpio1_slaves[] = {
1640static struct omap_hwmod omap2420_gpio1_hwmod = { 1182static struct omap_hwmod omap2420_gpio1_hwmod = {
1641 .name = "gpio1", 1183 .name = "gpio1",
1642 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, 1184 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
1643 .mpu_irqs = omap242x_gpio1_irqs, 1185 .mpu_irqs = omap2_gpio1_irqs,
1644 .mpu_irqs_cnt = ARRAY_SIZE(omap242x_gpio1_irqs),
1645 .main_clk = "gpios_fck", 1186 .main_clk = "gpios_fck",
1646 .prcm = { 1187 .prcm = {
1647 .omap2 = { 1188 .omap2 = {
@@ -1654,16 +1195,12 @@ static struct omap_hwmod omap2420_gpio1_hwmod = {
1654 }, 1195 },
1655 .slaves = omap2420_gpio1_slaves, 1196 .slaves = omap2420_gpio1_slaves,
1656 .slaves_cnt = ARRAY_SIZE(omap2420_gpio1_slaves), 1197 .slaves_cnt = ARRAY_SIZE(omap2420_gpio1_slaves),
1657 .class = &omap242x_gpio_hwmod_class, 1198 .class = &omap2xxx_gpio_hwmod_class,
1658 .dev_attr = &gpio_dev_attr, 1199 .dev_attr = &gpio_dev_attr,
1659 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420), 1200 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
1660}; 1201};
1661 1202
1662/* gpio2 */ 1203/* gpio2 */
1663static struct omap_hwmod_irq_info omap242x_gpio2_irqs[] = {
1664 { .irq = 30 }, /* INT_24XX_GPIO_BANK2 */
1665};
1666
1667static struct omap_hwmod_ocp_if *omap2420_gpio2_slaves[] = { 1204static struct omap_hwmod_ocp_if *omap2420_gpio2_slaves[] = {
1668 &omap2420_l4_wkup__gpio2, 1205 &omap2420_l4_wkup__gpio2,
1669}; 1206};
@@ -1671,8 +1208,7 @@ static struct omap_hwmod_ocp_if *omap2420_gpio2_slaves[] = {
1671static struct omap_hwmod omap2420_gpio2_hwmod = { 1208static struct omap_hwmod omap2420_gpio2_hwmod = {
1672 .name = "gpio2", 1209 .name = "gpio2",
1673 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, 1210 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
1674 .mpu_irqs = omap242x_gpio2_irqs, 1211 .mpu_irqs = omap2_gpio2_irqs,
1675 .mpu_irqs_cnt = ARRAY_SIZE(omap242x_gpio2_irqs),
1676 .main_clk = "gpios_fck", 1212 .main_clk = "gpios_fck",
1677 .prcm = { 1213 .prcm = {
1678 .omap2 = { 1214 .omap2 = {
@@ -1685,16 +1221,12 @@ static struct omap_hwmod omap2420_gpio2_hwmod = {
1685 }, 1221 },
1686 .slaves = omap2420_gpio2_slaves, 1222 .slaves = omap2420_gpio2_slaves,
1687 .slaves_cnt = ARRAY_SIZE(omap2420_gpio2_slaves), 1223 .slaves_cnt = ARRAY_SIZE(omap2420_gpio2_slaves),
1688 .class = &omap242x_gpio_hwmod_class, 1224 .class = &omap2xxx_gpio_hwmod_class,
1689 .dev_attr = &gpio_dev_attr, 1225 .dev_attr = &gpio_dev_attr,
1690 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420), 1226 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
1691}; 1227};
1692 1228
1693/* gpio3 */ 1229/* gpio3 */
1694static struct omap_hwmod_irq_info omap242x_gpio3_irqs[] = {
1695 { .irq = 31 }, /* INT_24XX_GPIO_BANK3 */
1696};
1697
1698static struct omap_hwmod_ocp_if *omap2420_gpio3_slaves[] = { 1230static struct omap_hwmod_ocp_if *omap2420_gpio3_slaves[] = {
1699 &omap2420_l4_wkup__gpio3, 1231 &omap2420_l4_wkup__gpio3,
1700}; 1232};
@@ -1702,8 +1234,7 @@ static struct omap_hwmod_ocp_if *omap2420_gpio3_slaves[] = {
1702static struct omap_hwmod omap2420_gpio3_hwmod = { 1234static struct omap_hwmod omap2420_gpio3_hwmod = {
1703 .name = "gpio3", 1235 .name = "gpio3",
1704 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, 1236 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
1705 .mpu_irqs = omap242x_gpio3_irqs, 1237 .mpu_irqs = omap2_gpio3_irqs,
1706 .mpu_irqs_cnt = ARRAY_SIZE(omap242x_gpio3_irqs),
1707 .main_clk = "gpios_fck", 1238 .main_clk = "gpios_fck",
1708 .prcm = { 1239 .prcm = {
1709 .omap2 = { 1240 .omap2 = {
@@ -1716,16 +1247,12 @@ static struct omap_hwmod omap2420_gpio3_hwmod = {
1716 }, 1247 },
1717 .slaves = omap2420_gpio3_slaves, 1248 .slaves = omap2420_gpio3_slaves,
1718 .slaves_cnt = ARRAY_SIZE(omap2420_gpio3_slaves), 1249 .slaves_cnt = ARRAY_SIZE(omap2420_gpio3_slaves),
1719 .class = &omap242x_gpio_hwmod_class, 1250 .class = &omap2xxx_gpio_hwmod_class,
1720 .dev_attr = &gpio_dev_attr, 1251 .dev_attr = &gpio_dev_attr,
1721 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420), 1252 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
1722}; 1253};
1723 1254
1724/* gpio4 */ 1255/* gpio4 */
1725static struct omap_hwmod_irq_info omap242x_gpio4_irqs[] = {
1726 { .irq = 32 }, /* INT_24XX_GPIO_BANK4 */
1727};
1728
1729static struct omap_hwmod_ocp_if *omap2420_gpio4_slaves[] = { 1256static struct omap_hwmod_ocp_if *omap2420_gpio4_slaves[] = {
1730 &omap2420_l4_wkup__gpio4, 1257 &omap2420_l4_wkup__gpio4,
1731}; 1258};
@@ -1733,8 +1260,7 @@ static struct omap_hwmod_ocp_if *omap2420_gpio4_slaves[] = {
1733static struct omap_hwmod omap2420_gpio4_hwmod = { 1260static struct omap_hwmod omap2420_gpio4_hwmod = {
1734 .name = "gpio4", 1261 .name = "gpio4",
1735 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, 1262 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
1736 .mpu_irqs = omap242x_gpio4_irqs, 1263 .mpu_irqs = omap2_gpio4_irqs,
1737 .mpu_irqs_cnt = ARRAY_SIZE(omap242x_gpio4_irqs),
1738 .main_clk = "gpios_fck", 1264 .main_clk = "gpios_fck",
1739 .prcm = { 1265 .prcm = {
1740 .omap2 = { 1266 .omap2 = {
@@ -1747,28 +1273,11 @@ static struct omap_hwmod omap2420_gpio4_hwmod = {
1747 }, 1273 },
1748 .slaves = omap2420_gpio4_slaves, 1274 .slaves = omap2420_gpio4_slaves,
1749 .slaves_cnt = ARRAY_SIZE(omap2420_gpio4_slaves), 1275 .slaves_cnt = ARRAY_SIZE(omap2420_gpio4_slaves),
1750 .class = &omap242x_gpio_hwmod_class, 1276 .class = &omap2xxx_gpio_hwmod_class,
1751 .dev_attr = &gpio_dev_attr, 1277 .dev_attr = &gpio_dev_attr,
1752 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420), 1278 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
1753}; 1279};
1754 1280
1755/* system dma */
1756static struct omap_hwmod_class_sysconfig omap2420_dma_sysc = {
1757 .rev_offs = 0x0000,
1758 .sysc_offs = 0x002c,
1759 .syss_offs = 0x0028,
1760 .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_MIDLEMODE |
1761 SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_EMUFREE |
1762 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
1763 .idlemodes = (MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
1764 .sysc_fields = &omap_hwmod_sysc_type1,
1765};
1766
1767static struct omap_hwmod_class omap2420_dma_hwmod_class = {
1768 .name = "dma",
1769 .sysc = &omap2420_dma_sysc,
1770};
1771
1772/* dma attributes */ 1281/* dma attributes */
1773static struct omap_dma_dev_attr dma_dev_attr = { 1282static struct omap_dma_dev_attr dma_dev_attr = {
1774 .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY | 1283 .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
@@ -1776,21 +1285,6 @@ static struct omap_dma_dev_attr dma_dev_attr = {
1776 .lch_count = 32, 1285 .lch_count = 32,
1777}; 1286};
1778 1287
1779static struct omap_hwmod_irq_info omap2420_dma_system_irqs[] = {
1780 { .name = "0", .irq = 12 }, /* INT_24XX_SDMA_IRQ0 */
1781 { .name = "1", .irq = 13 }, /* INT_24XX_SDMA_IRQ1 */
1782 { .name = "2", .irq = 14 }, /* INT_24XX_SDMA_IRQ2 */
1783 { .name = "3", .irq = 15 }, /* INT_24XX_SDMA_IRQ3 */
1784};
1785
1786static struct omap_hwmod_addr_space omap2420_dma_system_addrs[] = {
1787 {
1788 .pa_start = 0x48056000,
1789 .pa_end = 0x48056fff,
1790 .flags = ADDR_TYPE_RT
1791 },
1792};
1793
1794/* dma_system -> L3 */ 1288/* dma_system -> L3 */
1795static struct omap_hwmod_ocp_if omap2420_dma_system__l3 = { 1289static struct omap_hwmod_ocp_if omap2420_dma_system__l3 = {
1796 .master = &omap2420_dma_system_hwmod, 1290 .master = &omap2420_dma_system_hwmod,
@@ -1809,8 +1303,7 @@ static struct omap_hwmod_ocp_if omap2420_l4_core__dma_system = {
1809 .master = &omap2420_l4_core_hwmod, 1303 .master = &omap2420_l4_core_hwmod,
1810 .slave = &omap2420_dma_system_hwmod, 1304 .slave = &omap2420_dma_system_hwmod,
1811 .clk = "sdma_ick", 1305 .clk = "sdma_ick",
1812 .addr = omap2420_dma_system_addrs, 1306 .addr = omap2_dma_system_addrs,
1813 .addr_cnt = ARRAY_SIZE(omap2420_dma_system_addrs),
1814 .user = OCP_USER_MPU | OCP_USER_SDMA, 1307 .user = OCP_USER_MPU | OCP_USER_SDMA,
1815}; 1308};
1816 1309
@@ -1821,9 +1314,8 @@ static struct omap_hwmod_ocp_if *omap2420_dma_system_slaves[] = {
1821 1314
1822static struct omap_hwmod omap2420_dma_system_hwmod = { 1315static struct omap_hwmod omap2420_dma_system_hwmod = {
1823 .name = "dma", 1316 .name = "dma",
1824 .class = &omap2420_dma_hwmod_class, 1317 .class = &omap2xxx_dma_hwmod_class,
1825 .mpu_irqs = omap2420_dma_system_irqs, 1318 .mpu_irqs = omap2_dma_system_irqs,
1826 .mpu_irqs_cnt = ARRAY_SIZE(omap2420_dma_system_irqs),
1827 .main_clk = "core_l3_ck", 1319 .main_clk = "core_l3_ck",
1828 .slaves = omap2420_dma_system_slaves, 1320 .slaves = omap2420_dma_system_slaves,
1829 .slaves_cnt = ARRAY_SIZE(omap2420_dma_system_slaves), 1321 .slaves_cnt = ARRAY_SIZE(omap2420_dma_system_slaves),
@@ -1834,48 +1326,19 @@ static struct omap_hwmod omap2420_dma_system_hwmod = {
1834 .flags = HWMOD_NO_IDLEST, 1326 .flags = HWMOD_NO_IDLEST,
1835}; 1327};
1836 1328
1837/*
1838 * 'mailbox' class
1839 * mailbox module allowing communication between the on-chip processors
1840 * using a queued mailbox-interrupt mechanism.
1841 */
1842
1843static struct omap_hwmod_class_sysconfig omap2420_mailbox_sysc = {
1844 .rev_offs = 0x000,
1845 .sysc_offs = 0x010,
1846 .syss_offs = 0x014,
1847 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
1848 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
1849 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1850 .sysc_fields = &omap_hwmod_sysc_type1,
1851};
1852
1853static struct omap_hwmod_class omap2420_mailbox_hwmod_class = {
1854 .name = "mailbox",
1855 .sysc = &omap2420_mailbox_sysc,
1856};
1857
1858/* mailbox */ 1329/* mailbox */
1859static struct omap_hwmod omap2420_mailbox_hwmod; 1330static struct omap_hwmod omap2420_mailbox_hwmod;
1860static struct omap_hwmod_irq_info omap2420_mailbox_irqs[] = { 1331static struct omap_hwmod_irq_info omap2420_mailbox_irqs[] = {
1861 { .name = "dsp", .irq = 26 }, 1332 { .name = "dsp", .irq = 26 },
1862 { .name = "iva", .irq = 34 }, 1333 { .name = "iva", .irq = 34 },
1863}; 1334 { .irq = -1 }
1864
1865static struct omap_hwmod_addr_space omap2420_mailbox_addrs[] = {
1866 {
1867 .pa_start = 0x48094000,
1868 .pa_end = 0x480941ff,
1869 .flags = ADDR_TYPE_RT,
1870 },
1871}; 1335};
1872 1336
1873/* l4_core -> mailbox */ 1337/* l4_core -> mailbox */
1874static struct omap_hwmod_ocp_if omap2420_l4_core__mailbox = { 1338static struct omap_hwmod_ocp_if omap2420_l4_core__mailbox = {
1875 .master = &omap2420_l4_core_hwmod, 1339 .master = &omap2420_l4_core_hwmod,
1876 .slave = &omap2420_mailbox_hwmod, 1340 .slave = &omap2420_mailbox_hwmod,
1877 .addr = omap2420_mailbox_addrs, 1341 .addr = omap2_mailbox_addrs,
1878 .addr_cnt = ARRAY_SIZE(omap2420_mailbox_addrs),
1879 .user = OCP_USER_MPU | OCP_USER_SDMA, 1342 .user = OCP_USER_MPU | OCP_USER_SDMA,
1880}; 1343};
1881 1344
@@ -1886,9 +1349,8 @@ static struct omap_hwmod_ocp_if *omap2420_mailbox_slaves[] = {
1886 1349
1887static struct omap_hwmod omap2420_mailbox_hwmod = { 1350static struct omap_hwmod omap2420_mailbox_hwmod = {
1888 .name = "mailbox", 1351 .name = "mailbox",
1889 .class = &omap2420_mailbox_hwmod_class, 1352 .class = &omap2xxx_mailbox_hwmod_class,
1890 .mpu_irqs = omap2420_mailbox_irqs, 1353 .mpu_irqs = omap2420_mailbox_irqs,
1891 .mpu_irqs_cnt = ARRAY_SIZE(omap2420_mailbox_irqs),
1892 .main_clk = "mailboxes_ick", 1354 .main_clk = "mailboxes_ick",
1893 .prcm = { 1355 .prcm = {
1894 .omap2 = { 1356 .omap2 = {
@@ -1904,45 +1366,7 @@ static struct omap_hwmod omap2420_mailbox_hwmod = {
1904 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420), 1366 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
1905}; 1367};
1906 1368
1907/*
1908 * 'mcspi' class
1909 * multichannel serial port interface (mcspi) / master/slave synchronous serial
1910 * bus
1911 */
1912
1913static struct omap_hwmod_class_sysconfig omap2420_mcspi_sysc = {
1914 .rev_offs = 0x0000,
1915 .sysc_offs = 0x0010,
1916 .syss_offs = 0x0014,
1917 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
1918 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
1919 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
1920 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1921 .sysc_fields = &omap_hwmod_sysc_type1,
1922};
1923
1924static struct omap_hwmod_class omap2420_mcspi_class = {
1925 .name = "mcspi",
1926 .sysc = &omap2420_mcspi_sysc,
1927 .rev = OMAP2_MCSPI_REV,
1928};
1929
1930/* mcspi1 */ 1369/* mcspi1 */
1931static struct omap_hwmod_irq_info omap2420_mcspi1_mpu_irqs[] = {
1932 { .irq = 65 },
1933};
1934
1935static struct omap_hwmod_dma_info omap2420_mcspi1_sdma_reqs[] = {
1936 { .name = "tx0", .dma_req = 35 }, /* DMA_SPI1_TX0 */
1937 { .name = "rx0", .dma_req = 36 }, /* DMA_SPI1_RX0 */
1938 { .name = "tx1", .dma_req = 37 }, /* DMA_SPI1_TX1 */
1939 { .name = "rx1", .dma_req = 38 }, /* DMA_SPI1_RX1 */
1940 { .name = "tx2", .dma_req = 39 }, /* DMA_SPI1_TX2 */
1941 { .name = "rx2", .dma_req = 40 }, /* DMA_SPI1_RX2 */
1942 { .name = "tx3", .dma_req = 41 }, /* DMA_SPI1_TX3 */
1943 { .name = "rx3", .dma_req = 42 }, /* DMA_SPI1_RX3 */
1944};
1945
1946static struct omap_hwmod_ocp_if *omap2420_mcspi1_slaves[] = { 1370static struct omap_hwmod_ocp_if *omap2420_mcspi1_slaves[] = {
1947 &omap2420_l4_core__mcspi1, 1371 &omap2420_l4_core__mcspi1,
1948}; 1372};
@@ -1953,10 +1377,8 @@ static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = {
1953 1377
1954static struct omap_hwmod omap2420_mcspi1_hwmod = { 1378static struct omap_hwmod omap2420_mcspi1_hwmod = {
1955 .name = "mcspi1_hwmod", 1379 .name = "mcspi1_hwmod",
1956 .mpu_irqs = omap2420_mcspi1_mpu_irqs, 1380 .mpu_irqs = omap2_mcspi1_mpu_irqs,
1957 .mpu_irqs_cnt = ARRAY_SIZE(omap2420_mcspi1_mpu_irqs), 1381 .sdma_reqs = omap2_mcspi1_sdma_reqs,
1958 .sdma_reqs = omap2420_mcspi1_sdma_reqs,
1959 .sdma_reqs_cnt = ARRAY_SIZE(omap2420_mcspi1_sdma_reqs),
1960 .main_clk = "mcspi1_fck", 1382 .main_clk = "mcspi1_fck",
1961 .prcm = { 1383 .prcm = {
1962 .omap2 = { 1384 .omap2 = {
@@ -1969,23 +1391,12 @@ static struct omap_hwmod omap2420_mcspi1_hwmod = {
1969 }, 1391 },
1970 .slaves = omap2420_mcspi1_slaves, 1392 .slaves = omap2420_mcspi1_slaves,
1971 .slaves_cnt = ARRAY_SIZE(omap2420_mcspi1_slaves), 1393 .slaves_cnt = ARRAY_SIZE(omap2420_mcspi1_slaves),
1972 .class = &omap2420_mcspi_class, 1394 .class = &omap2xxx_mcspi_class,
1973 .dev_attr = &omap_mcspi1_dev_attr, 1395 .dev_attr = &omap_mcspi1_dev_attr,
1974 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420), 1396 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
1975}; 1397};
1976 1398
1977/* mcspi2 */ 1399/* mcspi2 */
1978static struct omap_hwmod_irq_info omap2420_mcspi2_mpu_irqs[] = {
1979 { .irq = 66 },
1980};
1981
1982static struct omap_hwmod_dma_info omap2420_mcspi2_sdma_reqs[] = {
1983 { .name = "tx0", .dma_req = 43 }, /* DMA_SPI2_TX0 */
1984 { .name = "rx0", .dma_req = 44 }, /* DMA_SPI2_RX0 */
1985 { .name = "tx1", .dma_req = 45 }, /* DMA_SPI2_TX1 */
1986 { .name = "rx1", .dma_req = 46 }, /* DMA_SPI2_RX1 */
1987};
1988
1989static struct omap_hwmod_ocp_if *omap2420_mcspi2_slaves[] = { 1400static struct omap_hwmod_ocp_if *omap2420_mcspi2_slaves[] = {
1990 &omap2420_l4_core__mcspi2, 1401 &omap2420_l4_core__mcspi2,
1991}; 1402};
@@ -1996,10 +1407,8 @@ static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = {
1996 1407
1997static struct omap_hwmod omap2420_mcspi2_hwmod = { 1408static struct omap_hwmod omap2420_mcspi2_hwmod = {
1998 .name = "mcspi2_hwmod", 1409 .name = "mcspi2_hwmod",
1999 .mpu_irqs = omap2420_mcspi2_mpu_irqs, 1410 .mpu_irqs = omap2_mcspi2_mpu_irqs,
2000 .mpu_irqs_cnt = ARRAY_SIZE(omap2420_mcspi2_mpu_irqs), 1411 .sdma_reqs = omap2_mcspi2_sdma_reqs,
2001 .sdma_reqs = omap2420_mcspi2_sdma_reqs,
2002 .sdma_reqs_cnt = ARRAY_SIZE(omap2420_mcspi2_sdma_reqs),
2003 .main_clk = "mcspi2_fck", 1412 .main_clk = "mcspi2_fck",
2004 .prcm = { 1413 .prcm = {
2005 .omap2 = { 1414 .omap2 = {
@@ -2012,8 +1421,8 @@ static struct omap_hwmod omap2420_mcspi2_hwmod = {
2012 }, 1421 },
2013 .slaves = omap2420_mcspi2_slaves, 1422 .slaves = omap2420_mcspi2_slaves,
2014 .slaves_cnt = ARRAY_SIZE(omap2420_mcspi2_slaves), 1423 .slaves_cnt = ARRAY_SIZE(omap2420_mcspi2_slaves),
2015 .class = &omap2420_mcspi_class, 1424 .class = &omap2xxx_mcspi_class,
2016 .dev_attr = &omap_mcspi2_dev_attr, 1425 .dev_attr = &omap_mcspi2_dev_attr,
2017 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420), 1426 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
2018}; 1427};
2019 1428
@@ -2030,20 +1439,7 @@ static struct omap_hwmod_class omap2420_mcbsp_hwmod_class = {
2030static struct omap_hwmod_irq_info omap2420_mcbsp1_irqs[] = { 1439static struct omap_hwmod_irq_info omap2420_mcbsp1_irqs[] = {
2031 { .name = "tx", .irq = 59 }, 1440 { .name = "tx", .irq = 59 },
2032 { .name = "rx", .irq = 60 }, 1441 { .name = "rx", .irq = 60 },
2033}; 1442 { .irq = -1 }
2034
2035static struct omap_hwmod_dma_info omap2420_mcbsp1_sdma_chs[] = {
2036 { .name = "rx", .dma_req = 32 },
2037 { .name = "tx", .dma_req = 31 },
2038};
2039
2040static struct omap_hwmod_addr_space omap2420_mcbsp1_addrs[] = {
2041 {
2042 .name = "mpu",
2043 .pa_start = 0x48074000,
2044 .pa_end = 0x480740ff,
2045 .flags = ADDR_TYPE_RT
2046 },
2047}; 1443};
2048 1444
2049/* l4_core -> mcbsp1 */ 1445/* l4_core -> mcbsp1 */
@@ -2051,8 +1447,7 @@ static struct omap_hwmod_ocp_if omap2420_l4_core__mcbsp1 = {
2051 .master = &omap2420_l4_core_hwmod, 1447 .master = &omap2420_l4_core_hwmod,
2052 .slave = &omap2420_mcbsp1_hwmod, 1448 .slave = &omap2420_mcbsp1_hwmod,
2053 .clk = "mcbsp1_ick", 1449 .clk = "mcbsp1_ick",
2054 .addr = omap2420_mcbsp1_addrs, 1450 .addr = omap2_mcbsp1_addrs,
2055 .addr_cnt = ARRAY_SIZE(omap2420_mcbsp1_addrs),
2056 .user = OCP_USER_MPU | OCP_USER_SDMA, 1451 .user = OCP_USER_MPU | OCP_USER_SDMA,
2057}; 1452};
2058 1453
@@ -2065,9 +1460,7 @@ static struct omap_hwmod omap2420_mcbsp1_hwmod = {
2065 .name = "mcbsp1", 1460 .name = "mcbsp1",
2066 .class = &omap2420_mcbsp_hwmod_class, 1461 .class = &omap2420_mcbsp_hwmod_class,
2067 .mpu_irqs = omap2420_mcbsp1_irqs, 1462 .mpu_irqs = omap2420_mcbsp1_irqs,
2068 .mpu_irqs_cnt = ARRAY_SIZE(omap2420_mcbsp1_irqs), 1463 .sdma_reqs = omap2_mcbsp1_sdma_reqs,
2069 .sdma_reqs = omap2420_mcbsp1_sdma_chs,
2070 .sdma_reqs_cnt = ARRAY_SIZE(omap2420_mcbsp1_sdma_chs),
2071 .main_clk = "mcbsp1_fck", 1464 .main_clk = "mcbsp1_fck",
2072 .prcm = { 1465 .prcm = {
2073 .omap2 = { 1466 .omap2 = {
@@ -2087,20 +1480,7 @@ static struct omap_hwmod omap2420_mcbsp1_hwmod = {
2087static struct omap_hwmod_irq_info omap2420_mcbsp2_irqs[] = { 1480static struct omap_hwmod_irq_info omap2420_mcbsp2_irqs[] = {
2088 { .name = "tx", .irq = 62 }, 1481 { .name = "tx", .irq = 62 },
2089 { .name = "rx", .irq = 63 }, 1482 { .name = "rx", .irq = 63 },
2090}; 1483 { .irq = -1 }
2091
2092static struct omap_hwmod_dma_info omap2420_mcbsp2_sdma_chs[] = {
2093 { .name = "rx", .dma_req = 34 },
2094 { .name = "tx", .dma_req = 33 },
2095};
2096
2097static struct omap_hwmod_addr_space omap2420_mcbsp2_addrs[] = {
2098 {
2099 .name = "mpu",
2100 .pa_start = 0x48076000,
2101 .pa_end = 0x480760ff,
2102 .flags = ADDR_TYPE_RT
2103 },
2104}; 1484};
2105 1485
2106/* l4_core -> mcbsp2 */ 1486/* l4_core -> mcbsp2 */
@@ -2108,8 +1488,7 @@ static struct omap_hwmod_ocp_if omap2420_l4_core__mcbsp2 = {
2108 .master = &omap2420_l4_core_hwmod, 1488 .master = &omap2420_l4_core_hwmod,
2109 .slave = &omap2420_mcbsp2_hwmod, 1489 .slave = &omap2420_mcbsp2_hwmod,
2110 .clk = "mcbsp2_ick", 1490 .clk = "mcbsp2_ick",
2111 .addr = omap2420_mcbsp2_addrs, 1491 .addr = omap2xxx_mcbsp2_addrs,
2112 .addr_cnt = ARRAY_SIZE(omap2420_mcbsp2_addrs),
2113 .user = OCP_USER_MPU | OCP_USER_SDMA, 1492 .user = OCP_USER_MPU | OCP_USER_SDMA,
2114}; 1493};
2115 1494
@@ -2122,9 +1501,7 @@ static struct omap_hwmod omap2420_mcbsp2_hwmod = {
2122 .name = "mcbsp2", 1501 .name = "mcbsp2",
2123 .class = &omap2420_mcbsp_hwmod_class, 1502 .class = &omap2420_mcbsp_hwmod_class,
2124 .mpu_irqs = omap2420_mcbsp2_irqs, 1503 .mpu_irqs = omap2420_mcbsp2_irqs,
2125 .mpu_irqs_cnt = ARRAY_SIZE(omap2420_mcbsp2_irqs), 1504 .sdma_reqs = omap2_mcbsp2_sdma_reqs,
2126 .sdma_reqs = omap2420_mcbsp2_sdma_chs,
2127 .sdma_reqs_cnt = ARRAY_SIZE(omap2420_mcbsp2_sdma_chs),
2128 .main_clk = "mcbsp2_fck", 1505 .main_clk = "mcbsp2_fck",
2129 .prcm = { 1506 .prcm = {
2130 .omap2 = { 1507 .omap2 = {
diff --git a/arch/arm/mach-omap2/omap_hwmod_2430_data.c b/arch/arm/mach-omap2/omap_hwmod_2430_data.c
index 9682dd519f8..16743c7d6e8 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2430_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2430_data.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * omap_hwmod_2430_data.c - hardware modules present on the OMAP2430 chips 2 * omap_hwmod_2430_data.c - hardware modules present on the OMAP2430 chips
3 * 3 *
4 * Copyright (C) 2009-2010 Nokia Corporation 4 * Copyright (C) 2009-2011 Nokia Corporation
5 * Paul Walmsley 5 * Paul Walmsley
6 * 6 *
7 * This program is free software; you can redistribute it and/or modify 7 * This program is free software; you can redistribute it and/or modify
@@ -131,42 +131,21 @@ static struct omap_hwmod_ocp_if omap2430_usbhsotg__l3 = {
131 .user = OCP_USER_MPU, 131 .user = OCP_USER_MPU,
132}; 132};
133 133
134/* I2C IP block address space length (in bytes) */
135#define OMAP2_I2C_AS_LEN 128
136
137/* L4 CORE -> I2C1 interface */ 134/* L4 CORE -> I2C1 interface */
138static struct omap_hwmod_addr_space omap2430_i2c1_addr_space[] = {
139 {
140 .pa_start = 0x48070000,
141 .pa_end = 0x48070000 + OMAP2_I2C_AS_LEN - 1,
142 .flags = ADDR_TYPE_RT,
143 },
144};
145
146static struct omap_hwmod_ocp_if omap2430_l4_core__i2c1 = { 135static struct omap_hwmod_ocp_if omap2430_l4_core__i2c1 = {
147 .master = &omap2430_l4_core_hwmod, 136 .master = &omap2430_l4_core_hwmod,
148 .slave = &omap2430_i2c1_hwmod, 137 .slave = &omap2430_i2c1_hwmod,
149 .clk = "i2c1_ick", 138 .clk = "i2c1_ick",
150 .addr = omap2430_i2c1_addr_space, 139 .addr = omap2_i2c1_addr_space,
151 .addr_cnt = ARRAY_SIZE(omap2430_i2c1_addr_space),
152 .user = OCP_USER_MPU | OCP_USER_SDMA, 140 .user = OCP_USER_MPU | OCP_USER_SDMA,
153}; 141};
154 142
155/* L4 CORE -> I2C2 interface */ 143/* L4 CORE -> I2C2 interface */
156static struct omap_hwmod_addr_space omap2430_i2c2_addr_space[] = {
157 {
158 .pa_start = 0x48072000,
159 .pa_end = 0x48072000 + OMAP2_I2C_AS_LEN - 1,
160 .flags = ADDR_TYPE_RT,
161 },
162};
163
164static struct omap_hwmod_ocp_if omap2430_l4_core__i2c2 = { 144static struct omap_hwmod_ocp_if omap2430_l4_core__i2c2 = {
165 .master = &omap2430_l4_core_hwmod, 145 .master = &omap2430_l4_core_hwmod,
166 .slave = &omap2430_i2c2_hwmod, 146 .slave = &omap2430_i2c2_hwmod,
167 .clk = "i2c2_ick", 147 .clk = "i2c2_ick",
168 .addr = omap2430_i2c2_addr_space, 148 .addr = omap2_i2c2_addr_space,
169 .addr_cnt = ARRAY_SIZE(omap2430_i2c2_addr_space),
170 .user = OCP_USER_MPU | OCP_USER_SDMA, 149 .user = OCP_USER_MPU | OCP_USER_SDMA,
171}; 150};
172 151
@@ -178,56 +157,29 @@ static struct omap_hwmod_ocp_if omap2430_l4_core__l4_wkup = {
178}; 157};
179 158
180/* L4 CORE -> UART1 interface */ 159/* L4 CORE -> UART1 interface */
181static struct omap_hwmod_addr_space omap2430_uart1_addr_space[] = {
182 {
183 .pa_start = OMAP2_UART1_BASE,
184 .pa_end = OMAP2_UART1_BASE + SZ_8K - 1,
185 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
186 },
187};
188
189static struct omap_hwmod_ocp_if omap2_l4_core__uart1 = { 160static struct omap_hwmod_ocp_if omap2_l4_core__uart1 = {
190 .master = &omap2430_l4_core_hwmod, 161 .master = &omap2430_l4_core_hwmod,
191 .slave = &omap2430_uart1_hwmod, 162 .slave = &omap2430_uart1_hwmod,
192 .clk = "uart1_ick", 163 .clk = "uart1_ick",
193 .addr = omap2430_uart1_addr_space, 164 .addr = omap2xxx_uart1_addr_space,
194 .addr_cnt = ARRAY_SIZE(omap2430_uart1_addr_space),
195 .user = OCP_USER_MPU | OCP_USER_SDMA, 165 .user = OCP_USER_MPU | OCP_USER_SDMA,
196}; 166};
197 167
198/* L4 CORE -> UART2 interface */ 168/* L4 CORE -> UART2 interface */
199static struct omap_hwmod_addr_space omap2430_uart2_addr_space[] = {
200 {
201 .pa_start = OMAP2_UART2_BASE,
202 .pa_end = OMAP2_UART2_BASE + SZ_1K - 1,
203 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
204 },
205};
206
207static struct omap_hwmod_ocp_if omap2_l4_core__uart2 = { 169static struct omap_hwmod_ocp_if omap2_l4_core__uart2 = {
208 .master = &omap2430_l4_core_hwmod, 170 .master = &omap2430_l4_core_hwmod,
209 .slave = &omap2430_uart2_hwmod, 171 .slave = &omap2430_uart2_hwmod,
210 .clk = "uart2_ick", 172 .clk = "uart2_ick",
211 .addr = omap2430_uart2_addr_space, 173 .addr = omap2xxx_uart2_addr_space,
212 .addr_cnt = ARRAY_SIZE(omap2430_uart2_addr_space),
213 .user = OCP_USER_MPU | OCP_USER_SDMA, 174 .user = OCP_USER_MPU | OCP_USER_SDMA,
214}; 175};
215 176
216/* L4 PER -> UART3 interface */ 177/* L4 PER -> UART3 interface */
217static struct omap_hwmod_addr_space omap2430_uart3_addr_space[] = {
218 {
219 .pa_start = OMAP2_UART3_BASE,
220 .pa_end = OMAP2_UART3_BASE + SZ_1K - 1,
221 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
222 },
223};
224
225static struct omap_hwmod_ocp_if omap2_l4_core__uart3 = { 178static struct omap_hwmod_ocp_if omap2_l4_core__uart3 = {
226 .master = &omap2430_l4_core_hwmod, 179 .master = &omap2430_l4_core_hwmod,
227 .slave = &omap2430_uart3_hwmod, 180 .slave = &omap2430_uart3_hwmod,
228 .clk = "uart3_ick", 181 .clk = "uart3_ick",
229 .addr = omap2430_uart3_addr_space, 182 .addr = omap2xxx_uart3_addr_space,
230 .addr_cnt = ARRAY_SIZE(omap2430_uart3_addr_space),
231 .user = OCP_USER_MPU | OCP_USER_SDMA, 183 .user = OCP_USER_MPU | OCP_USER_SDMA,
232}; 184};
233 185
@@ -248,7 +200,6 @@ static struct omap_hwmod_ocp_if omap2430_l4_core__usbhsotg = {
248 .slave = &omap2430_usbhsotg_hwmod, 200 .slave = &omap2430_usbhsotg_hwmod,
249 .clk = "usb_l4_ick", 201 .clk = "usb_l4_ick",
250 .addr = omap2430_usbhsotg_addrs, 202 .addr = omap2430_usbhsotg_addrs,
251 .addr_cnt = ARRAY_SIZE(omap2430_usbhsotg_addrs),
252 .user = OCP_USER_MPU, 203 .user = OCP_USER_MPU,
253}; 204};
254 205
@@ -261,38 +212,20 @@ static struct omap_hwmod_ocp_if *omap2430_usbhsotg_slaves[] = {
261}; 212};
262 213
263/* L4 CORE -> MMC1 interface */ 214/* L4 CORE -> MMC1 interface */
264static struct omap_hwmod_addr_space omap2430_mmc1_addr_space[] = {
265 {
266 .pa_start = 0x4809c000,
267 .pa_end = 0x4809c1ff,
268 .flags = ADDR_TYPE_RT,
269 },
270};
271
272static struct omap_hwmod_ocp_if omap2430_l4_core__mmc1 = { 215static struct omap_hwmod_ocp_if omap2430_l4_core__mmc1 = {
273 .master = &omap2430_l4_core_hwmod, 216 .master = &omap2430_l4_core_hwmod,
274 .slave = &omap2430_mmc1_hwmod, 217 .slave = &omap2430_mmc1_hwmod,
275 .clk = "mmchs1_ick", 218 .clk = "mmchs1_ick",
276 .addr = omap2430_mmc1_addr_space, 219 .addr = omap2430_mmc1_addr_space,
277 .addr_cnt = ARRAY_SIZE(omap2430_mmc1_addr_space),
278 .user = OCP_USER_MPU | OCP_USER_SDMA, 220 .user = OCP_USER_MPU | OCP_USER_SDMA,
279}; 221};
280 222
281/* L4 CORE -> MMC2 interface */ 223/* L4 CORE -> MMC2 interface */
282static struct omap_hwmod_addr_space omap2430_mmc2_addr_space[] = {
283 {
284 .pa_start = 0x480b4000,
285 .pa_end = 0x480b41ff,
286 .flags = ADDR_TYPE_RT,
287 },
288};
289
290static struct omap_hwmod_ocp_if omap2430_l4_core__mmc2 = { 224static struct omap_hwmod_ocp_if omap2430_l4_core__mmc2 = {
291 .master = &omap2430_l4_core_hwmod, 225 .master = &omap2430_l4_core_hwmod,
292 .slave = &omap2430_mmc2_hwmod, 226 .slave = &omap2430_mmc2_hwmod,
293 .addr = omap2430_mmc2_addr_space,
294 .clk = "mmchs2_ick", 227 .clk = "mmchs2_ick",
295 .addr_cnt = ARRAY_SIZE(omap2430_mmc2_addr_space), 228 .addr = omap2430_mmc2_addr_space,
296 .user = OCP_USER_MPU | OCP_USER_SDMA, 229 .user = OCP_USER_MPU | OCP_USER_SDMA,
297}; 230};
298 231
@@ -333,56 +266,29 @@ static struct omap_hwmod_ocp_if *omap2430_l4_wkup_masters[] = {
333}; 266};
334 267
335/* l4 core -> mcspi1 interface */ 268/* l4 core -> mcspi1 interface */
336static struct omap_hwmod_addr_space omap2430_mcspi1_addr_space[] = {
337 {
338 .pa_start = 0x48098000,
339 .pa_end = 0x480980ff,
340 .flags = ADDR_TYPE_RT,
341 },
342};
343
344static struct omap_hwmod_ocp_if omap2430_l4_core__mcspi1 = { 269static struct omap_hwmod_ocp_if omap2430_l4_core__mcspi1 = {
345 .master = &omap2430_l4_core_hwmod, 270 .master = &omap2430_l4_core_hwmod,
346 .slave = &omap2430_mcspi1_hwmod, 271 .slave = &omap2430_mcspi1_hwmod,
347 .clk = "mcspi1_ick", 272 .clk = "mcspi1_ick",
348 .addr = omap2430_mcspi1_addr_space, 273 .addr = omap2_mcspi1_addr_space,
349 .addr_cnt = ARRAY_SIZE(omap2430_mcspi1_addr_space),
350 .user = OCP_USER_MPU | OCP_USER_SDMA, 274 .user = OCP_USER_MPU | OCP_USER_SDMA,
351}; 275};
352 276
353/* l4 core -> mcspi2 interface */ 277/* l4 core -> mcspi2 interface */
354static struct omap_hwmod_addr_space omap2430_mcspi2_addr_space[] = {
355 {
356 .pa_start = 0x4809a000,
357 .pa_end = 0x4809a0ff,
358 .flags = ADDR_TYPE_RT,
359 },
360};
361
362static struct omap_hwmod_ocp_if omap2430_l4_core__mcspi2 = { 278static struct omap_hwmod_ocp_if omap2430_l4_core__mcspi2 = {
363 .master = &omap2430_l4_core_hwmod, 279 .master = &omap2430_l4_core_hwmod,
364 .slave = &omap2430_mcspi2_hwmod, 280 .slave = &omap2430_mcspi2_hwmod,
365 .clk = "mcspi2_ick", 281 .clk = "mcspi2_ick",
366 .addr = omap2430_mcspi2_addr_space, 282 .addr = omap2_mcspi2_addr_space,
367 .addr_cnt = ARRAY_SIZE(omap2430_mcspi2_addr_space),
368 .user = OCP_USER_MPU | OCP_USER_SDMA, 283 .user = OCP_USER_MPU | OCP_USER_SDMA,
369}; 284};
370 285
371/* l4 core -> mcspi3 interface */ 286/* l4 core -> mcspi3 interface */
372static struct omap_hwmod_addr_space omap2430_mcspi3_addr_space[] = {
373 {
374 .pa_start = 0x480b8000,
375 .pa_end = 0x480b80ff,
376 .flags = ADDR_TYPE_RT,
377 },
378};
379
380static struct omap_hwmod_ocp_if omap2430_l4_core__mcspi3 = { 287static struct omap_hwmod_ocp_if omap2430_l4_core__mcspi3 = {
381 .master = &omap2430_l4_core_hwmod, 288 .master = &omap2430_l4_core_hwmod,
382 .slave = &omap2430_mcspi3_hwmod, 289 .slave = &omap2430_mcspi3_hwmod,
383 .clk = "mcspi3_ick", 290 .clk = "mcspi3_ick",
384 .addr = omap2430_mcspi3_addr_space, 291 .addr = omap2430_mcspi3_addr_space,
385 .addr_cnt = ARRAY_SIZE(omap2430_mcspi3_addr_space),
386 .user = OCP_USER_MPU | OCP_USER_SDMA, 292 .user = OCP_USER_MPU | OCP_USER_SDMA,
387}; 293};
388 294
@@ -441,29 +347,8 @@ static struct omap_hwmod omap2430_iva_hwmod = {
441 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430) 347 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
442}; 348};
443 349
444/* Timer Common */
445static struct omap_hwmod_class_sysconfig omap2430_timer_sysc = {
446 .rev_offs = 0x0000,
447 .sysc_offs = 0x0010,
448 .syss_offs = 0x0014,
449 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
450 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
451 SYSC_HAS_AUTOIDLE),
452 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
453 .sysc_fields = &omap_hwmod_sysc_type1,
454};
455
456static struct omap_hwmod_class omap2430_timer_hwmod_class = {
457 .name = "timer",
458 .sysc = &omap2430_timer_sysc,
459 .rev = OMAP_TIMER_IP_VERSION_1,
460};
461
462/* timer1 */ 350/* timer1 */
463static struct omap_hwmod omap2430_timer1_hwmod; 351static struct omap_hwmod omap2430_timer1_hwmod;
464static struct omap_hwmod_irq_info omap2430_timer1_mpu_irqs[] = {
465 { .irq = 37, },
466};
467 352
468static struct omap_hwmod_addr_space omap2430_timer1_addrs[] = { 353static struct omap_hwmod_addr_space omap2430_timer1_addrs[] = {
469 { 354 {
@@ -471,6 +356,7 @@ static struct omap_hwmod_addr_space omap2430_timer1_addrs[] = {
471 .pa_end = 0x49018000 + SZ_1K - 1, 356 .pa_end = 0x49018000 + SZ_1K - 1,
472 .flags = ADDR_TYPE_RT 357 .flags = ADDR_TYPE_RT
473 }, 358 },
359 { }
474}; 360};
475 361
476/* l4_wkup -> timer1 */ 362/* l4_wkup -> timer1 */
@@ -479,7 +365,6 @@ static struct omap_hwmod_ocp_if omap2430_l4_wkup__timer1 = {
479 .slave = &omap2430_timer1_hwmod, 365 .slave = &omap2430_timer1_hwmod,
480 .clk = "gpt1_ick", 366 .clk = "gpt1_ick",
481 .addr = omap2430_timer1_addrs, 367 .addr = omap2430_timer1_addrs,
482 .addr_cnt = ARRAY_SIZE(omap2430_timer1_addrs),
483 .user = OCP_USER_MPU | OCP_USER_SDMA, 368 .user = OCP_USER_MPU | OCP_USER_SDMA,
484}; 369};
485 370
@@ -491,8 +376,7 @@ static struct omap_hwmod_ocp_if *omap2430_timer1_slaves[] = {
491/* timer1 hwmod */ 376/* timer1 hwmod */
492static struct omap_hwmod omap2430_timer1_hwmod = { 377static struct omap_hwmod omap2430_timer1_hwmod = {
493 .name = "timer1", 378 .name = "timer1",
494 .mpu_irqs = omap2430_timer1_mpu_irqs, 379 .mpu_irqs = omap2_timer1_mpu_irqs,
495 .mpu_irqs_cnt = ARRAY_SIZE(omap2430_timer1_mpu_irqs),
496 .main_clk = "gpt1_fck", 380 .main_clk = "gpt1_fck",
497 .prcm = { 381 .prcm = {
498 .omap2 = { 382 .omap2 = {
@@ -505,31 +389,19 @@ static struct omap_hwmod omap2430_timer1_hwmod = {
505 }, 389 },
506 .slaves = omap2430_timer1_slaves, 390 .slaves = omap2430_timer1_slaves,
507 .slaves_cnt = ARRAY_SIZE(omap2430_timer1_slaves), 391 .slaves_cnt = ARRAY_SIZE(omap2430_timer1_slaves),
508 .class = &omap2430_timer_hwmod_class, 392 .class = &omap2xxx_timer_hwmod_class,
509 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430) 393 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
510}; 394};
511 395
512/* timer2 */ 396/* timer2 */
513static struct omap_hwmod omap2430_timer2_hwmod; 397static struct omap_hwmod omap2430_timer2_hwmod;
514static struct omap_hwmod_irq_info omap2430_timer2_mpu_irqs[] = {
515 { .irq = 38, },
516};
517
518static struct omap_hwmod_addr_space omap2430_timer2_addrs[] = {
519 {
520 .pa_start = 0x4802a000,
521 .pa_end = 0x4802a000 + SZ_1K - 1,
522 .flags = ADDR_TYPE_RT
523 },
524};
525 398
526/* l4_core -> timer2 */ 399/* l4_core -> timer2 */
527static struct omap_hwmod_ocp_if omap2430_l4_core__timer2 = { 400static struct omap_hwmod_ocp_if omap2430_l4_core__timer2 = {
528 .master = &omap2430_l4_core_hwmod, 401 .master = &omap2430_l4_core_hwmod,
529 .slave = &omap2430_timer2_hwmod, 402 .slave = &omap2430_timer2_hwmod,
530 .clk = "gpt2_ick", 403 .clk = "gpt2_ick",
531 .addr = omap2430_timer2_addrs, 404 .addr = omap2xxx_timer2_addrs,
532 .addr_cnt = ARRAY_SIZE(omap2430_timer2_addrs),
533 .user = OCP_USER_MPU | OCP_USER_SDMA, 405 .user = OCP_USER_MPU | OCP_USER_SDMA,
534}; 406};
535 407
@@ -541,8 +413,7 @@ static struct omap_hwmod_ocp_if *omap2430_timer2_slaves[] = {
541/* timer2 hwmod */ 413/* timer2 hwmod */
542static struct omap_hwmod omap2430_timer2_hwmod = { 414static struct omap_hwmod omap2430_timer2_hwmod = {
543 .name = "timer2", 415 .name = "timer2",
544 .mpu_irqs = omap2430_timer2_mpu_irqs, 416 .mpu_irqs = omap2_timer2_mpu_irqs,
545 .mpu_irqs_cnt = ARRAY_SIZE(omap2430_timer2_mpu_irqs),
546 .main_clk = "gpt2_fck", 417 .main_clk = "gpt2_fck",
547 .prcm = { 418 .prcm = {
548 .omap2 = { 419 .omap2 = {
@@ -555,31 +426,19 @@ static struct omap_hwmod omap2430_timer2_hwmod = {
555 }, 426 },
556 .slaves = omap2430_timer2_slaves, 427 .slaves = omap2430_timer2_slaves,
557 .slaves_cnt = ARRAY_SIZE(omap2430_timer2_slaves), 428 .slaves_cnt = ARRAY_SIZE(omap2430_timer2_slaves),
558 .class = &omap2430_timer_hwmod_class, 429 .class = &omap2xxx_timer_hwmod_class,
559 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430) 430 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
560}; 431};
561 432
562/* timer3 */ 433/* timer3 */
563static struct omap_hwmod omap2430_timer3_hwmod; 434static struct omap_hwmod omap2430_timer3_hwmod;
564static struct omap_hwmod_irq_info omap2430_timer3_mpu_irqs[] = {
565 { .irq = 39, },
566};
567
568static struct omap_hwmod_addr_space omap2430_timer3_addrs[] = {
569 {
570 .pa_start = 0x48078000,
571 .pa_end = 0x48078000 + SZ_1K - 1,
572 .flags = ADDR_TYPE_RT
573 },
574};
575 435
576/* l4_core -> timer3 */ 436/* l4_core -> timer3 */
577static struct omap_hwmod_ocp_if omap2430_l4_core__timer3 = { 437static struct omap_hwmod_ocp_if omap2430_l4_core__timer3 = {
578 .master = &omap2430_l4_core_hwmod, 438 .master = &omap2430_l4_core_hwmod,
579 .slave = &omap2430_timer3_hwmod, 439 .slave = &omap2430_timer3_hwmod,
580 .clk = "gpt3_ick", 440 .clk = "gpt3_ick",
581 .addr = omap2430_timer3_addrs, 441 .addr = omap2xxx_timer3_addrs,
582 .addr_cnt = ARRAY_SIZE(omap2430_timer3_addrs),
583 .user = OCP_USER_MPU | OCP_USER_SDMA, 442 .user = OCP_USER_MPU | OCP_USER_SDMA,
584}; 443};
585 444
@@ -591,8 +450,7 @@ static struct omap_hwmod_ocp_if *omap2430_timer3_slaves[] = {
591/* timer3 hwmod */ 450/* timer3 hwmod */
592static struct omap_hwmod omap2430_timer3_hwmod = { 451static struct omap_hwmod omap2430_timer3_hwmod = {
593 .name = "timer3", 452 .name = "timer3",
594 .mpu_irqs = omap2430_timer3_mpu_irqs, 453 .mpu_irqs = omap2_timer3_mpu_irqs,
595 .mpu_irqs_cnt = ARRAY_SIZE(omap2430_timer3_mpu_irqs),
596 .main_clk = "gpt3_fck", 454 .main_clk = "gpt3_fck",
597 .prcm = { 455 .prcm = {
598 .omap2 = { 456 .omap2 = {
@@ -605,31 +463,19 @@ static struct omap_hwmod omap2430_timer3_hwmod = {
605 }, 463 },
606 .slaves = omap2430_timer3_slaves, 464 .slaves = omap2430_timer3_slaves,
607 .slaves_cnt = ARRAY_SIZE(omap2430_timer3_slaves), 465 .slaves_cnt = ARRAY_SIZE(omap2430_timer3_slaves),
608 .class = &omap2430_timer_hwmod_class, 466 .class = &omap2xxx_timer_hwmod_class,
609 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430) 467 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
610}; 468};
611 469
612/* timer4 */ 470/* timer4 */
613static struct omap_hwmod omap2430_timer4_hwmod; 471static struct omap_hwmod omap2430_timer4_hwmod;
614static struct omap_hwmod_irq_info omap2430_timer4_mpu_irqs[] = {
615 { .irq = 40, },
616};
617
618static struct omap_hwmod_addr_space omap2430_timer4_addrs[] = {
619 {
620 .pa_start = 0x4807a000,
621 .pa_end = 0x4807a000 + SZ_1K - 1,
622 .flags = ADDR_TYPE_RT
623 },
624};
625 472
626/* l4_core -> timer4 */ 473/* l4_core -> timer4 */
627static struct omap_hwmod_ocp_if omap2430_l4_core__timer4 = { 474static struct omap_hwmod_ocp_if omap2430_l4_core__timer4 = {
628 .master = &omap2430_l4_core_hwmod, 475 .master = &omap2430_l4_core_hwmod,
629 .slave = &omap2430_timer4_hwmod, 476 .slave = &omap2430_timer4_hwmod,
630 .clk = "gpt4_ick", 477 .clk = "gpt4_ick",
631 .addr = omap2430_timer4_addrs, 478 .addr = omap2xxx_timer4_addrs,
632 .addr_cnt = ARRAY_SIZE(omap2430_timer4_addrs),
633 .user = OCP_USER_MPU | OCP_USER_SDMA, 479 .user = OCP_USER_MPU | OCP_USER_SDMA,
634}; 480};
635 481
@@ -641,8 +487,7 @@ static struct omap_hwmod_ocp_if *omap2430_timer4_slaves[] = {
641/* timer4 hwmod */ 487/* timer4 hwmod */
642static struct omap_hwmod omap2430_timer4_hwmod = { 488static struct omap_hwmod omap2430_timer4_hwmod = {
643 .name = "timer4", 489 .name = "timer4",
644 .mpu_irqs = omap2430_timer4_mpu_irqs, 490 .mpu_irqs = omap2_timer4_mpu_irqs,
645 .mpu_irqs_cnt = ARRAY_SIZE(omap2430_timer4_mpu_irqs),
646 .main_clk = "gpt4_fck", 491 .main_clk = "gpt4_fck",
647 .prcm = { 492 .prcm = {
648 .omap2 = { 493 .omap2 = {
@@ -655,31 +500,19 @@ static struct omap_hwmod omap2430_timer4_hwmod = {
655 }, 500 },
656 .slaves = omap2430_timer4_slaves, 501 .slaves = omap2430_timer4_slaves,
657 .slaves_cnt = ARRAY_SIZE(omap2430_timer4_slaves), 502 .slaves_cnt = ARRAY_SIZE(omap2430_timer4_slaves),
658 .class = &omap2430_timer_hwmod_class, 503 .class = &omap2xxx_timer_hwmod_class,
659 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430) 504 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
660}; 505};
661 506
662/* timer5 */ 507/* timer5 */
663static struct omap_hwmod omap2430_timer5_hwmod; 508static struct omap_hwmod omap2430_timer5_hwmod;
664static struct omap_hwmod_irq_info omap2430_timer5_mpu_irqs[] = {
665 { .irq = 41, },
666};
667
668static struct omap_hwmod_addr_space omap2430_timer5_addrs[] = {
669 {
670 .pa_start = 0x4807c000,
671 .pa_end = 0x4807c000 + SZ_1K - 1,
672 .flags = ADDR_TYPE_RT
673 },
674};
675 509
676/* l4_core -> timer5 */ 510/* l4_core -> timer5 */
677static struct omap_hwmod_ocp_if omap2430_l4_core__timer5 = { 511static struct omap_hwmod_ocp_if omap2430_l4_core__timer5 = {
678 .master = &omap2430_l4_core_hwmod, 512 .master = &omap2430_l4_core_hwmod,
679 .slave = &omap2430_timer5_hwmod, 513 .slave = &omap2430_timer5_hwmod,
680 .clk = "gpt5_ick", 514 .clk = "gpt5_ick",
681 .addr = omap2430_timer5_addrs, 515 .addr = omap2xxx_timer5_addrs,
682 .addr_cnt = ARRAY_SIZE(omap2430_timer5_addrs),
683 .user = OCP_USER_MPU | OCP_USER_SDMA, 516 .user = OCP_USER_MPU | OCP_USER_SDMA,
684}; 517};
685 518
@@ -691,8 +524,7 @@ static struct omap_hwmod_ocp_if *omap2430_timer5_slaves[] = {
691/* timer5 hwmod */ 524/* timer5 hwmod */
692static struct omap_hwmod omap2430_timer5_hwmod = { 525static struct omap_hwmod omap2430_timer5_hwmod = {
693 .name = "timer5", 526 .name = "timer5",
694 .mpu_irqs = omap2430_timer5_mpu_irqs, 527 .mpu_irqs = omap2_timer5_mpu_irqs,
695 .mpu_irqs_cnt = ARRAY_SIZE(omap2430_timer5_mpu_irqs),
696 .main_clk = "gpt5_fck", 528 .main_clk = "gpt5_fck",
697 .prcm = { 529 .prcm = {
698 .omap2 = { 530 .omap2 = {
@@ -705,31 +537,19 @@ static struct omap_hwmod omap2430_timer5_hwmod = {
705 }, 537 },
706 .slaves = omap2430_timer5_slaves, 538 .slaves = omap2430_timer5_slaves,
707 .slaves_cnt = ARRAY_SIZE(omap2430_timer5_slaves), 539 .slaves_cnt = ARRAY_SIZE(omap2430_timer5_slaves),
708 .class = &omap2430_timer_hwmod_class, 540 .class = &omap2xxx_timer_hwmod_class,
709 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430) 541 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
710}; 542};
711 543
712/* timer6 */ 544/* timer6 */
713static struct omap_hwmod omap2430_timer6_hwmod; 545static struct omap_hwmod omap2430_timer6_hwmod;
714static struct omap_hwmod_irq_info omap2430_timer6_mpu_irqs[] = {
715 { .irq = 42, },
716};
717
718static struct omap_hwmod_addr_space omap2430_timer6_addrs[] = {
719 {
720 .pa_start = 0x4807e000,
721 .pa_end = 0x4807e000 + SZ_1K - 1,
722 .flags = ADDR_TYPE_RT
723 },
724};
725 546
726/* l4_core -> timer6 */ 547/* l4_core -> timer6 */
727static struct omap_hwmod_ocp_if omap2430_l4_core__timer6 = { 548static struct omap_hwmod_ocp_if omap2430_l4_core__timer6 = {
728 .master = &omap2430_l4_core_hwmod, 549 .master = &omap2430_l4_core_hwmod,
729 .slave = &omap2430_timer6_hwmod, 550 .slave = &omap2430_timer6_hwmod,
730 .clk = "gpt6_ick", 551 .clk = "gpt6_ick",
731 .addr = omap2430_timer6_addrs, 552 .addr = omap2xxx_timer6_addrs,
732 .addr_cnt = ARRAY_SIZE(omap2430_timer6_addrs),
733 .user = OCP_USER_MPU | OCP_USER_SDMA, 553 .user = OCP_USER_MPU | OCP_USER_SDMA,
734}; 554};
735 555
@@ -741,8 +561,7 @@ static struct omap_hwmod_ocp_if *omap2430_timer6_slaves[] = {
741/* timer6 hwmod */ 561/* timer6 hwmod */
742static struct omap_hwmod omap2430_timer6_hwmod = { 562static struct omap_hwmod omap2430_timer6_hwmod = {
743 .name = "timer6", 563 .name = "timer6",
744 .mpu_irqs = omap2430_timer6_mpu_irqs, 564 .mpu_irqs = omap2_timer6_mpu_irqs,
745 .mpu_irqs_cnt = ARRAY_SIZE(omap2430_timer6_mpu_irqs),
746 .main_clk = "gpt6_fck", 565 .main_clk = "gpt6_fck",
747 .prcm = { 566 .prcm = {
748 .omap2 = { 567 .omap2 = {
@@ -755,31 +574,19 @@ static struct omap_hwmod omap2430_timer6_hwmod = {
755 }, 574 },
756 .slaves = omap2430_timer6_slaves, 575 .slaves = omap2430_timer6_slaves,
757 .slaves_cnt = ARRAY_SIZE(omap2430_timer6_slaves), 576 .slaves_cnt = ARRAY_SIZE(omap2430_timer6_slaves),
758 .class = &omap2430_timer_hwmod_class, 577 .class = &omap2xxx_timer_hwmod_class,
759 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430) 578 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
760}; 579};
761 580
762/* timer7 */ 581/* timer7 */
763static struct omap_hwmod omap2430_timer7_hwmod; 582static struct omap_hwmod omap2430_timer7_hwmod;
764static struct omap_hwmod_irq_info omap2430_timer7_mpu_irqs[] = {
765 { .irq = 43, },
766};
767
768static struct omap_hwmod_addr_space omap2430_timer7_addrs[] = {
769 {
770 .pa_start = 0x48080000,
771 .pa_end = 0x48080000 + SZ_1K - 1,
772 .flags = ADDR_TYPE_RT
773 },
774};
775 583
776/* l4_core -> timer7 */ 584/* l4_core -> timer7 */
777static struct omap_hwmod_ocp_if omap2430_l4_core__timer7 = { 585static struct omap_hwmod_ocp_if omap2430_l4_core__timer7 = {
778 .master = &omap2430_l4_core_hwmod, 586 .master = &omap2430_l4_core_hwmod,
779 .slave = &omap2430_timer7_hwmod, 587 .slave = &omap2430_timer7_hwmod,
780 .clk = "gpt7_ick", 588 .clk = "gpt7_ick",
781 .addr = omap2430_timer7_addrs, 589 .addr = omap2xxx_timer7_addrs,
782 .addr_cnt = ARRAY_SIZE(omap2430_timer7_addrs),
783 .user = OCP_USER_MPU | OCP_USER_SDMA, 590 .user = OCP_USER_MPU | OCP_USER_SDMA,
784}; 591};
785 592
@@ -791,8 +598,7 @@ static struct omap_hwmod_ocp_if *omap2430_timer7_slaves[] = {
791/* timer7 hwmod */ 598/* timer7 hwmod */
792static struct omap_hwmod omap2430_timer7_hwmod = { 599static struct omap_hwmod omap2430_timer7_hwmod = {
793 .name = "timer7", 600 .name = "timer7",
794 .mpu_irqs = omap2430_timer7_mpu_irqs, 601 .mpu_irqs = omap2_timer7_mpu_irqs,
795 .mpu_irqs_cnt = ARRAY_SIZE(omap2430_timer7_mpu_irqs),
796 .main_clk = "gpt7_fck", 602 .main_clk = "gpt7_fck",
797 .prcm = { 603 .prcm = {
798 .omap2 = { 604 .omap2 = {
@@ -805,31 +611,19 @@ static struct omap_hwmod omap2430_timer7_hwmod = {
805 }, 611 },
806 .slaves = omap2430_timer7_slaves, 612 .slaves = omap2430_timer7_slaves,
807 .slaves_cnt = ARRAY_SIZE(omap2430_timer7_slaves), 613 .slaves_cnt = ARRAY_SIZE(omap2430_timer7_slaves),
808 .class = &omap2430_timer_hwmod_class, 614 .class = &omap2xxx_timer_hwmod_class,
809 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430) 615 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
810}; 616};
811 617
812/* timer8 */ 618/* timer8 */
813static struct omap_hwmod omap2430_timer8_hwmod; 619static struct omap_hwmod omap2430_timer8_hwmod;
814static struct omap_hwmod_irq_info omap2430_timer8_mpu_irqs[] = {
815 { .irq = 44, },
816};
817
818static struct omap_hwmod_addr_space omap2430_timer8_addrs[] = {
819 {
820 .pa_start = 0x48082000,
821 .pa_end = 0x48082000 + SZ_1K - 1,
822 .flags = ADDR_TYPE_RT
823 },
824};
825 620
826/* l4_core -> timer8 */ 621/* l4_core -> timer8 */
827static struct omap_hwmod_ocp_if omap2430_l4_core__timer8 = { 622static struct omap_hwmod_ocp_if omap2430_l4_core__timer8 = {
828 .master = &omap2430_l4_core_hwmod, 623 .master = &omap2430_l4_core_hwmod,
829 .slave = &omap2430_timer8_hwmod, 624 .slave = &omap2430_timer8_hwmod,
830 .clk = "gpt8_ick", 625 .clk = "gpt8_ick",
831 .addr = omap2430_timer8_addrs, 626 .addr = omap2xxx_timer8_addrs,
832 .addr_cnt = ARRAY_SIZE(omap2430_timer8_addrs),
833 .user = OCP_USER_MPU | OCP_USER_SDMA, 627 .user = OCP_USER_MPU | OCP_USER_SDMA,
834}; 628};
835 629
@@ -841,8 +635,7 @@ static struct omap_hwmod_ocp_if *omap2430_timer8_slaves[] = {
841/* timer8 hwmod */ 635/* timer8 hwmod */
842static struct omap_hwmod omap2430_timer8_hwmod = { 636static struct omap_hwmod omap2430_timer8_hwmod = {
843 .name = "timer8", 637 .name = "timer8",
844 .mpu_irqs = omap2430_timer8_mpu_irqs, 638 .mpu_irqs = omap2_timer8_mpu_irqs,
845 .mpu_irqs_cnt = ARRAY_SIZE(omap2430_timer8_mpu_irqs),
846 .main_clk = "gpt8_fck", 639 .main_clk = "gpt8_fck",
847 .prcm = { 640 .prcm = {
848 .omap2 = { 641 .omap2 = {
@@ -855,31 +648,19 @@ static struct omap_hwmod omap2430_timer8_hwmod = {
855 }, 648 },
856 .slaves = omap2430_timer8_slaves, 649 .slaves = omap2430_timer8_slaves,
857 .slaves_cnt = ARRAY_SIZE(omap2430_timer8_slaves), 650 .slaves_cnt = ARRAY_SIZE(omap2430_timer8_slaves),
858 .class = &omap2430_timer_hwmod_class, 651 .class = &omap2xxx_timer_hwmod_class,
859 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430) 652 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
860}; 653};
861 654
862/* timer9 */ 655/* timer9 */
863static struct omap_hwmod omap2430_timer9_hwmod; 656static struct omap_hwmod omap2430_timer9_hwmod;
864static struct omap_hwmod_irq_info omap2430_timer9_mpu_irqs[] = {
865 { .irq = 45, },
866};
867
868static struct omap_hwmod_addr_space omap2430_timer9_addrs[] = {
869 {
870 .pa_start = 0x48084000,
871 .pa_end = 0x48084000 + SZ_1K - 1,
872 .flags = ADDR_TYPE_RT
873 },
874};
875 657
876/* l4_core -> timer9 */ 658/* l4_core -> timer9 */
877static struct omap_hwmod_ocp_if omap2430_l4_core__timer9 = { 659static struct omap_hwmod_ocp_if omap2430_l4_core__timer9 = {
878 .master = &omap2430_l4_core_hwmod, 660 .master = &omap2430_l4_core_hwmod,
879 .slave = &omap2430_timer9_hwmod, 661 .slave = &omap2430_timer9_hwmod,
880 .clk = "gpt9_ick", 662 .clk = "gpt9_ick",
881 .addr = omap2430_timer9_addrs, 663 .addr = omap2xxx_timer9_addrs,
882 .addr_cnt = ARRAY_SIZE(omap2430_timer9_addrs),
883 .user = OCP_USER_MPU | OCP_USER_SDMA, 664 .user = OCP_USER_MPU | OCP_USER_SDMA,
884}; 665};
885 666
@@ -891,8 +672,7 @@ static struct omap_hwmod_ocp_if *omap2430_timer9_slaves[] = {
891/* timer9 hwmod */ 672/* timer9 hwmod */
892static struct omap_hwmod omap2430_timer9_hwmod = { 673static struct omap_hwmod omap2430_timer9_hwmod = {
893 .name = "timer9", 674 .name = "timer9",
894 .mpu_irqs = omap2430_timer9_mpu_irqs, 675 .mpu_irqs = omap2_timer9_mpu_irqs,
895 .mpu_irqs_cnt = ARRAY_SIZE(omap2430_timer9_mpu_irqs),
896 .main_clk = "gpt9_fck", 676 .main_clk = "gpt9_fck",
897 .prcm = { 677 .prcm = {
898 .omap2 = { 678 .omap2 = {
@@ -905,31 +685,19 @@ static struct omap_hwmod omap2430_timer9_hwmod = {
905 }, 685 },
906 .slaves = omap2430_timer9_slaves, 686 .slaves = omap2430_timer9_slaves,
907 .slaves_cnt = ARRAY_SIZE(omap2430_timer9_slaves), 687 .slaves_cnt = ARRAY_SIZE(omap2430_timer9_slaves),
908 .class = &omap2430_timer_hwmod_class, 688 .class = &omap2xxx_timer_hwmod_class,
909 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430) 689 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
910}; 690};
911 691
912/* timer10 */ 692/* timer10 */
913static struct omap_hwmod omap2430_timer10_hwmod; 693static struct omap_hwmod omap2430_timer10_hwmod;
914static struct omap_hwmod_irq_info omap2430_timer10_mpu_irqs[] = {
915 { .irq = 46, },
916};
917
918static struct omap_hwmod_addr_space omap2430_timer10_addrs[] = {
919 {
920 .pa_start = 0x48086000,
921 .pa_end = 0x48086000 + SZ_1K - 1,
922 .flags = ADDR_TYPE_RT
923 },
924};
925 694
926/* l4_core -> timer10 */ 695/* l4_core -> timer10 */
927static struct omap_hwmod_ocp_if omap2430_l4_core__timer10 = { 696static struct omap_hwmod_ocp_if omap2430_l4_core__timer10 = {
928 .master = &omap2430_l4_core_hwmod, 697 .master = &omap2430_l4_core_hwmod,
929 .slave = &omap2430_timer10_hwmod, 698 .slave = &omap2430_timer10_hwmod,
930 .clk = "gpt10_ick", 699 .clk = "gpt10_ick",
931 .addr = omap2430_timer10_addrs, 700 .addr = omap2_timer10_addrs,
932 .addr_cnt = ARRAY_SIZE(omap2430_timer10_addrs),
933 .user = OCP_USER_MPU | OCP_USER_SDMA, 701 .user = OCP_USER_MPU | OCP_USER_SDMA,
934}; 702};
935 703
@@ -941,8 +709,7 @@ static struct omap_hwmod_ocp_if *omap2430_timer10_slaves[] = {
941/* timer10 hwmod */ 709/* timer10 hwmod */
942static struct omap_hwmod omap2430_timer10_hwmod = { 710static struct omap_hwmod omap2430_timer10_hwmod = {
943 .name = "timer10", 711 .name = "timer10",
944 .mpu_irqs = omap2430_timer10_mpu_irqs, 712 .mpu_irqs = omap2_timer10_mpu_irqs,
945 .mpu_irqs_cnt = ARRAY_SIZE(omap2430_timer10_mpu_irqs),
946 .main_clk = "gpt10_fck", 713 .main_clk = "gpt10_fck",
947 .prcm = { 714 .prcm = {
948 .omap2 = { 715 .omap2 = {
@@ -955,31 +722,19 @@ static struct omap_hwmod omap2430_timer10_hwmod = {
955 }, 722 },
956 .slaves = omap2430_timer10_slaves, 723 .slaves = omap2430_timer10_slaves,
957 .slaves_cnt = ARRAY_SIZE(omap2430_timer10_slaves), 724 .slaves_cnt = ARRAY_SIZE(omap2430_timer10_slaves),
958 .class = &omap2430_timer_hwmod_class, 725 .class = &omap2xxx_timer_hwmod_class,
959 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430) 726 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
960}; 727};
961 728
962/* timer11 */ 729/* timer11 */
963static struct omap_hwmod omap2430_timer11_hwmod; 730static struct omap_hwmod omap2430_timer11_hwmod;
964static struct omap_hwmod_irq_info omap2430_timer11_mpu_irqs[] = {
965 { .irq = 47, },
966};
967
968static struct omap_hwmod_addr_space omap2430_timer11_addrs[] = {
969 {
970 .pa_start = 0x48088000,
971 .pa_end = 0x48088000 + SZ_1K - 1,
972 .flags = ADDR_TYPE_RT
973 },
974};
975 731
976/* l4_core -> timer11 */ 732/* l4_core -> timer11 */
977static struct omap_hwmod_ocp_if omap2430_l4_core__timer11 = { 733static struct omap_hwmod_ocp_if omap2430_l4_core__timer11 = {
978 .master = &omap2430_l4_core_hwmod, 734 .master = &omap2430_l4_core_hwmod,
979 .slave = &omap2430_timer11_hwmod, 735 .slave = &omap2430_timer11_hwmod,
980 .clk = "gpt11_ick", 736 .clk = "gpt11_ick",
981 .addr = omap2430_timer11_addrs, 737 .addr = omap2_timer11_addrs,
982 .addr_cnt = ARRAY_SIZE(omap2430_timer11_addrs),
983 .user = OCP_USER_MPU | OCP_USER_SDMA, 738 .user = OCP_USER_MPU | OCP_USER_SDMA,
984}; 739};
985 740
@@ -991,8 +746,7 @@ static struct omap_hwmod_ocp_if *omap2430_timer11_slaves[] = {
991/* timer11 hwmod */ 746/* timer11 hwmod */
992static struct omap_hwmod omap2430_timer11_hwmod = { 747static struct omap_hwmod omap2430_timer11_hwmod = {
993 .name = "timer11", 748 .name = "timer11",
994 .mpu_irqs = omap2430_timer11_mpu_irqs, 749 .mpu_irqs = omap2_timer11_mpu_irqs,
995 .mpu_irqs_cnt = ARRAY_SIZE(omap2430_timer11_mpu_irqs),
996 .main_clk = "gpt11_fck", 750 .main_clk = "gpt11_fck",
997 .prcm = { 751 .prcm = {
998 .omap2 = { 752 .omap2 = {
@@ -1005,31 +759,19 @@ static struct omap_hwmod omap2430_timer11_hwmod = {
1005 }, 759 },
1006 .slaves = omap2430_timer11_slaves, 760 .slaves = omap2430_timer11_slaves,
1007 .slaves_cnt = ARRAY_SIZE(omap2430_timer11_slaves), 761 .slaves_cnt = ARRAY_SIZE(omap2430_timer11_slaves),
1008 .class = &omap2430_timer_hwmod_class, 762 .class = &omap2xxx_timer_hwmod_class,
1009 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430) 763 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
1010}; 764};
1011 765
1012/* timer12 */ 766/* timer12 */
1013static struct omap_hwmod omap2430_timer12_hwmod; 767static struct omap_hwmod omap2430_timer12_hwmod;
1014static struct omap_hwmod_irq_info omap2430_timer12_mpu_irqs[] = {
1015 { .irq = 48, },
1016};
1017
1018static struct omap_hwmod_addr_space omap2430_timer12_addrs[] = {
1019 {
1020 .pa_start = 0x4808a000,
1021 .pa_end = 0x4808a000 + SZ_1K - 1,
1022 .flags = ADDR_TYPE_RT
1023 },
1024};
1025 768
1026/* l4_core -> timer12 */ 769/* l4_core -> timer12 */
1027static struct omap_hwmod_ocp_if omap2430_l4_core__timer12 = { 770static struct omap_hwmod_ocp_if omap2430_l4_core__timer12 = {
1028 .master = &omap2430_l4_core_hwmod, 771 .master = &omap2430_l4_core_hwmod,
1029 .slave = &omap2430_timer12_hwmod, 772 .slave = &omap2430_timer12_hwmod,
1030 .clk = "gpt12_ick", 773 .clk = "gpt12_ick",
1031 .addr = omap2430_timer12_addrs, 774 .addr = omap2xxx_timer12_addrs,
1032 .addr_cnt = ARRAY_SIZE(omap2430_timer12_addrs),
1033 .user = OCP_USER_MPU | OCP_USER_SDMA, 775 .user = OCP_USER_MPU | OCP_USER_SDMA,
1034}; 776};
1035 777
@@ -1041,8 +783,7 @@ static struct omap_hwmod_ocp_if *omap2430_timer12_slaves[] = {
1041/* timer12 hwmod */ 783/* timer12 hwmod */
1042static struct omap_hwmod omap2430_timer12_hwmod = { 784static struct omap_hwmod omap2430_timer12_hwmod = {
1043 .name = "timer12", 785 .name = "timer12",
1044 .mpu_irqs = omap2430_timer12_mpu_irqs, 786 .mpu_irqs = omap2xxx_timer12_mpu_irqs,
1045 .mpu_irqs_cnt = ARRAY_SIZE(omap2430_timer12_mpu_irqs),
1046 .main_clk = "gpt12_fck", 787 .main_clk = "gpt12_fck",
1047 .prcm = { 788 .prcm = {
1048 .omap2 = { 789 .omap2 = {
@@ -1055,7 +796,7 @@ static struct omap_hwmod omap2430_timer12_hwmod = {
1055 }, 796 },
1056 .slaves = omap2430_timer12_slaves, 797 .slaves = omap2430_timer12_slaves,
1057 .slaves_cnt = ARRAY_SIZE(omap2430_timer12_slaves), 798 .slaves_cnt = ARRAY_SIZE(omap2430_timer12_slaves),
1058 .class = &omap2430_timer_hwmod_class, 799 .class = &omap2xxx_timer_hwmod_class,
1059 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430) 800 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
1060}; 801};
1061 802
@@ -1066,6 +807,7 @@ static struct omap_hwmod_addr_space omap2430_wd_timer2_addrs[] = {
1066 .pa_end = 0x4901607f, 807 .pa_end = 0x4901607f,
1067 .flags = ADDR_TYPE_RT 808 .flags = ADDR_TYPE_RT
1068 }, 809 },
810 { }
1069}; 811};
1070 812
1071static struct omap_hwmod_ocp_if omap2430_l4_wkup__wd_timer2 = { 813static struct omap_hwmod_ocp_if omap2430_l4_wkup__wd_timer2 = {
@@ -1073,31 +815,9 @@ static struct omap_hwmod_ocp_if omap2430_l4_wkup__wd_timer2 = {
1073 .slave = &omap2430_wd_timer2_hwmod, 815 .slave = &omap2430_wd_timer2_hwmod,
1074 .clk = "mpu_wdt_ick", 816 .clk = "mpu_wdt_ick",
1075 .addr = omap2430_wd_timer2_addrs, 817 .addr = omap2430_wd_timer2_addrs,
1076 .addr_cnt = ARRAY_SIZE(omap2430_wd_timer2_addrs),
1077 .user = OCP_USER_MPU | OCP_USER_SDMA, 818 .user = OCP_USER_MPU | OCP_USER_SDMA,
1078}; 819};
1079 820
1080/*
1081 * 'wd_timer' class
1082 * 32-bit watchdog upward counter that generates a pulse on the reset pin on
1083 * overflow condition
1084 */
1085
1086static struct omap_hwmod_class_sysconfig omap2430_wd_timer_sysc = {
1087 .rev_offs = 0x0,
1088 .sysc_offs = 0x0010,
1089 .syss_offs = 0x0014,
1090 .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_SOFTRESET |
1091 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
1092 .sysc_fields = &omap_hwmod_sysc_type1,
1093};
1094
1095static struct omap_hwmod_class omap2430_wd_timer_hwmod_class = {
1096 .name = "wd_timer",
1097 .sysc = &omap2430_wd_timer_sysc,
1098 .pre_shutdown = &omap2_wd_timer_disable
1099};
1100
1101/* wd_timer2 */ 821/* wd_timer2 */
1102static struct omap_hwmod_ocp_if *omap2430_wd_timer2_slaves[] = { 822static struct omap_hwmod_ocp_if *omap2430_wd_timer2_slaves[] = {
1103 &omap2430_l4_wkup__wd_timer2, 823 &omap2430_l4_wkup__wd_timer2,
@@ -1105,7 +825,7 @@ static struct omap_hwmod_ocp_if *omap2430_wd_timer2_slaves[] = {
1105 825
1106static struct omap_hwmod omap2430_wd_timer2_hwmod = { 826static struct omap_hwmod omap2430_wd_timer2_hwmod = {
1107 .name = "wd_timer2", 827 .name = "wd_timer2",
1108 .class = &omap2430_wd_timer_hwmod_class, 828 .class = &omap2xxx_wd_timer_hwmod_class,
1109 .main_clk = "mpu_wdt_fck", 829 .main_clk = "mpu_wdt_fck",
1110 .prcm = { 830 .prcm = {
1111 .omap2 = { 831 .omap2 = {
@@ -1121,45 +841,16 @@ static struct omap_hwmod omap2430_wd_timer2_hwmod = {
1121 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430), 841 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
1122}; 842};
1123 843
1124/* UART */
1125
1126static struct omap_hwmod_class_sysconfig uart_sysc = {
1127 .rev_offs = 0x50,
1128 .sysc_offs = 0x54,
1129 .syss_offs = 0x58,
1130 .sysc_flags = (SYSC_HAS_SIDLEMODE |
1131 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
1132 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
1133 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1134 .sysc_fields = &omap_hwmod_sysc_type1,
1135};
1136
1137static struct omap_hwmod_class uart_class = {
1138 .name = "uart",
1139 .sysc = &uart_sysc,
1140};
1141
1142/* UART1 */ 844/* UART1 */
1143 845
1144static struct omap_hwmod_irq_info uart1_mpu_irqs[] = {
1145 { .irq = INT_24XX_UART1_IRQ, },
1146};
1147
1148static struct omap_hwmod_dma_info uart1_sdma_reqs[] = {
1149 { .name = "rx", .dma_req = OMAP24XX_DMA_UART1_RX, },
1150 { .name = "tx", .dma_req = OMAP24XX_DMA_UART1_TX, },
1151};
1152
1153static struct omap_hwmod_ocp_if *omap2430_uart1_slaves[] = { 846static struct omap_hwmod_ocp_if *omap2430_uart1_slaves[] = {
1154 &omap2_l4_core__uart1, 847 &omap2_l4_core__uart1,
1155}; 848};
1156 849
1157static struct omap_hwmod omap2430_uart1_hwmod = { 850static struct omap_hwmod omap2430_uart1_hwmod = {
1158 .name = "uart1", 851 .name = "uart1",
1159 .mpu_irqs = uart1_mpu_irqs, 852 .mpu_irqs = omap2_uart1_mpu_irqs,
1160 .mpu_irqs_cnt = ARRAY_SIZE(uart1_mpu_irqs), 853 .sdma_reqs = omap2_uart1_sdma_reqs,
1161 .sdma_reqs = uart1_sdma_reqs,
1162 .sdma_reqs_cnt = ARRAY_SIZE(uart1_sdma_reqs),
1163 .main_clk = "uart1_fck", 854 .main_clk = "uart1_fck",
1164 .prcm = { 855 .prcm = {
1165 .omap2 = { 856 .omap2 = {
@@ -1172,31 +863,20 @@ static struct omap_hwmod omap2430_uart1_hwmod = {
1172 }, 863 },
1173 .slaves = omap2430_uart1_slaves, 864 .slaves = omap2430_uart1_slaves,
1174 .slaves_cnt = ARRAY_SIZE(omap2430_uart1_slaves), 865 .slaves_cnt = ARRAY_SIZE(omap2430_uart1_slaves),
1175 .class = &uart_class, 866 .class = &omap2_uart_class,
1176 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430), 867 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
1177}; 868};
1178 869
1179/* UART2 */ 870/* UART2 */
1180 871
1181static struct omap_hwmod_irq_info uart2_mpu_irqs[] = {
1182 { .irq = INT_24XX_UART2_IRQ, },
1183};
1184
1185static struct omap_hwmod_dma_info uart2_sdma_reqs[] = {
1186 { .name = "rx", .dma_req = OMAP24XX_DMA_UART2_RX, },
1187 { .name = "tx", .dma_req = OMAP24XX_DMA_UART2_TX, },
1188};
1189
1190static struct omap_hwmod_ocp_if *omap2430_uart2_slaves[] = { 872static struct omap_hwmod_ocp_if *omap2430_uart2_slaves[] = {
1191 &omap2_l4_core__uart2, 873 &omap2_l4_core__uart2,
1192}; 874};
1193 875
1194static struct omap_hwmod omap2430_uart2_hwmod = { 876static struct omap_hwmod omap2430_uart2_hwmod = {
1195 .name = "uart2", 877 .name = "uart2",
1196 .mpu_irqs = uart2_mpu_irqs, 878 .mpu_irqs = omap2_uart2_mpu_irqs,
1197 .mpu_irqs_cnt = ARRAY_SIZE(uart2_mpu_irqs), 879 .sdma_reqs = omap2_uart2_sdma_reqs,
1198 .sdma_reqs = uart2_sdma_reqs,
1199 .sdma_reqs_cnt = ARRAY_SIZE(uart2_sdma_reqs),
1200 .main_clk = "uart2_fck", 880 .main_clk = "uart2_fck",
1201 .prcm = { 881 .prcm = {
1202 .omap2 = { 882 .omap2 = {
@@ -1209,31 +889,20 @@ static struct omap_hwmod omap2430_uart2_hwmod = {
1209 }, 889 },
1210 .slaves = omap2430_uart2_slaves, 890 .slaves = omap2430_uart2_slaves,
1211 .slaves_cnt = ARRAY_SIZE(omap2430_uart2_slaves), 891 .slaves_cnt = ARRAY_SIZE(omap2430_uart2_slaves),
1212 .class = &uart_class, 892 .class = &omap2_uart_class,
1213 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430), 893 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
1214}; 894};
1215 895
1216/* UART3 */ 896/* UART3 */
1217 897
1218static struct omap_hwmod_irq_info uart3_mpu_irqs[] = {
1219 { .irq = INT_24XX_UART3_IRQ, },
1220};
1221
1222static struct omap_hwmod_dma_info uart3_sdma_reqs[] = {
1223 { .name = "rx", .dma_req = OMAP24XX_DMA_UART3_RX, },
1224 { .name = "tx", .dma_req = OMAP24XX_DMA_UART3_TX, },
1225};
1226
1227static struct omap_hwmod_ocp_if *omap2430_uart3_slaves[] = { 898static struct omap_hwmod_ocp_if *omap2430_uart3_slaves[] = {
1228 &omap2_l4_core__uart3, 899 &omap2_l4_core__uart3,
1229}; 900};
1230 901
1231static struct omap_hwmod omap2430_uart3_hwmod = { 902static struct omap_hwmod omap2430_uart3_hwmod = {
1232 .name = "uart3", 903 .name = "uart3",
1233 .mpu_irqs = uart3_mpu_irqs, 904 .mpu_irqs = omap2_uart3_mpu_irqs,
1234 .mpu_irqs_cnt = ARRAY_SIZE(uart3_mpu_irqs), 905 .sdma_reqs = omap2_uart3_sdma_reqs,
1235 .sdma_reqs = uart3_sdma_reqs,
1236 .sdma_reqs_cnt = ARRAY_SIZE(uart3_sdma_reqs),
1237 .main_clk = "uart3_fck", 906 .main_clk = "uart3_fck",
1238 .prcm = { 907 .prcm = {
1239 .omap2 = { 908 .omap2 = {
@@ -1246,53 +915,22 @@ static struct omap_hwmod omap2430_uart3_hwmod = {
1246 }, 915 },
1247 .slaves = omap2430_uart3_slaves, 916 .slaves = omap2430_uart3_slaves,
1248 .slaves_cnt = ARRAY_SIZE(omap2430_uart3_slaves), 917 .slaves_cnt = ARRAY_SIZE(omap2430_uart3_slaves),
1249 .class = &uart_class, 918 .class = &omap2_uart_class,
1250 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430), 919 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
1251}; 920};
1252 921
1253/*
1254 * 'dss' class
1255 * display sub-system
1256 */
1257
1258static struct omap_hwmod_class_sysconfig omap2430_dss_sysc = {
1259 .rev_offs = 0x0000,
1260 .sysc_offs = 0x0010,
1261 .syss_offs = 0x0014,
1262 .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
1263 .sysc_fields = &omap_hwmod_sysc_type1,
1264};
1265
1266static struct omap_hwmod_class omap2430_dss_hwmod_class = {
1267 .name = "dss",
1268 .sysc = &omap2430_dss_sysc,
1269};
1270
1271static struct omap_hwmod_dma_info omap2430_dss_sdma_chs[] = {
1272 { .name = "dispc", .dma_req = 5 },
1273};
1274
1275/* dss */ 922/* dss */
1276/* dss master ports */ 923/* dss master ports */
1277static struct omap_hwmod_ocp_if *omap2430_dss_masters[] = { 924static struct omap_hwmod_ocp_if *omap2430_dss_masters[] = {
1278 &omap2430_dss__l3, 925 &omap2430_dss__l3,
1279}; 926};
1280 927
1281static struct omap_hwmod_addr_space omap2430_dss_addrs[] = {
1282 {
1283 .pa_start = 0x48050000,
1284 .pa_end = 0x480503FF,
1285 .flags = ADDR_TYPE_RT
1286 },
1287};
1288
1289/* l4_core -> dss */ 928/* l4_core -> dss */
1290static struct omap_hwmod_ocp_if omap2430_l4_core__dss = { 929static struct omap_hwmod_ocp_if omap2430_l4_core__dss = {
1291 .master = &omap2430_l4_core_hwmod, 930 .master = &omap2430_l4_core_hwmod,
1292 .slave = &omap2430_dss_core_hwmod, 931 .slave = &omap2430_dss_core_hwmod,
1293 .clk = "dss_ick", 932 .clk = "dss_ick",
1294 .addr = omap2430_dss_addrs, 933 .addr = omap2_dss_addrs,
1295 .addr_cnt = ARRAY_SIZE(omap2430_dss_addrs),
1296 .user = OCP_USER_MPU | OCP_USER_SDMA, 934 .user = OCP_USER_MPU | OCP_USER_SDMA,
1297}; 935};
1298 936
@@ -1308,10 +946,9 @@ static struct omap_hwmod_opt_clk dss_opt_clks[] = {
1308 946
1309static struct omap_hwmod omap2430_dss_core_hwmod = { 947static struct omap_hwmod omap2430_dss_core_hwmod = {
1310 .name = "dss_core", 948 .name = "dss_core",
1311 .class = &omap2430_dss_hwmod_class, 949 .class = &omap2_dss_hwmod_class,
1312 .main_clk = "dss1_fck", /* instead of dss_fck */ 950 .main_clk = "dss1_fck", /* instead of dss_fck */
1313 .sdma_reqs = omap2430_dss_sdma_chs, 951 .sdma_reqs = omap2xxx_dss_sdma_chs,
1314 .sdma_reqs_cnt = ARRAY_SIZE(omap2430_dss_sdma_chs),
1315 .prcm = { 952 .prcm = {
1316 .omap2 = { 953 .omap2 = {
1317 .prcm_reg_id = 1, 954 .prcm_reg_id = 1,
@@ -1331,46 +968,12 @@ static struct omap_hwmod omap2430_dss_core_hwmod = {
1331 .flags = HWMOD_NO_IDLEST, 968 .flags = HWMOD_NO_IDLEST,
1332}; 969};
1333 970
1334/*
1335 * 'dispc' class
1336 * display controller
1337 */
1338
1339static struct omap_hwmod_class_sysconfig omap2430_dispc_sysc = {
1340 .rev_offs = 0x0000,
1341 .sysc_offs = 0x0010,
1342 .syss_offs = 0x0014,
1343 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE |
1344 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
1345 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1346 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
1347 .sysc_fields = &omap_hwmod_sysc_type1,
1348};
1349
1350static struct omap_hwmod_class omap2430_dispc_hwmod_class = {
1351 .name = "dispc",
1352 .sysc = &omap2430_dispc_sysc,
1353};
1354
1355static struct omap_hwmod_irq_info omap2430_dispc_irqs[] = {
1356 { .irq = 25 },
1357};
1358
1359static struct omap_hwmod_addr_space omap2430_dss_dispc_addrs[] = {
1360 {
1361 .pa_start = 0x48050400,
1362 .pa_end = 0x480507FF,
1363 .flags = ADDR_TYPE_RT
1364 },
1365};
1366
1367/* l4_core -> dss_dispc */ 971/* l4_core -> dss_dispc */
1368static struct omap_hwmod_ocp_if omap2430_l4_core__dss_dispc = { 972static struct omap_hwmod_ocp_if omap2430_l4_core__dss_dispc = {
1369 .master = &omap2430_l4_core_hwmod, 973 .master = &omap2430_l4_core_hwmod,
1370 .slave = &omap2430_dss_dispc_hwmod, 974 .slave = &omap2430_dss_dispc_hwmod,
1371 .clk = "dss_ick", 975 .clk = "dss_ick",
1372 .addr = omap2430_dss_dispc_addrs, 976 .addr = omap2_dss_dispc_addrs,
1373 .addr_cnt = ARRAY_SIZE(omap2430_dss_dispc_addrs),
1374 .user = OCP_USER_MPU | OCP_USER_SDMA, 977 .user = OCP_USER_MPU | OCP_USER_SDMA,
1375}; 978};
1376 979
@@ -1381,9 +984,8 @@ static struct omap_hwmod_ocp_if *omap2430_dss_dispc_slaves[] = {
1381 984
1382static struct omap_hwmod omap2430_dss_dispc_hwmod = { 985static struct omap_hwmod omap2430_dss_dispc_hwmod = {
1383 .name = "dss_dispc", 986 .name = "dss_dispc",
1384 .class = &omap2430_dispc_hwmod_class, 987 .class = &omap2_dispc_hwmod_class,
1385 .mpu_irqs = omap2430_dispc_irqs, 988 .mpu_irqs = omap2_dispc_irqs,
1386 .mpu_irqs_cnt = ARRAY_SIZE(omap2430_dispc_irqs),
1387 .main_clk = "dss1_fck", 989 .main_clk = "dss1_fck",
1388 .prcm = { 990 .prcm = {
1389 .omap2 = { 991 .omap2 = {
@@ -1400,41 +1002,12 @@ static struct omap_hwmod omap2430_dss_dispc_hwmod = {
1400 .flags = HWMOD_NO_IDLEST, 1002 .flags = HWMOD_NO_IDLEST,
1401}; 1003};
1402 1004
1403/*
1404 * 'rfbi' class
1405 * remote frame buffer interface
1406 */
1407
1408static struct omap_hwmod_class_sysconfig omap2430_rfbi_sysc = {
1409 .rev_offs = 0x0000,
1410 .sysc_offs = 0x0010,
1411 .syss_offs = 0x0014,
1412 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
1413 SYSC_HAS_AUTOIDLE),
1414 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1415 .sysc_fields = &omap_hwmod_sysc_type1,
1416};
1417
1418static struct omap_hwmod_class omap2430_rfbi_hwmod_class = {
1419 .name = "rfbi",
1420 .sysc = &omap2430_rfbi_sysc,
1421};
1422
1423static struct omap_hwmod_addr_space omap2430_dss_rfbi_addrs[] = {
1424 {
1425 .pa_start = 0x48050800,
1426 .pa_end = 0x48050BFF,
1427 .flags = ADDR_TYPE_RT
1428 },
1429};
1430
1431/* l4_core -> dss_rfbi */ 1005/* l4_core -> dss_rfbi */
1432static struct omap_hwmod_ocp_if omap2430_l4_core__dss_rfbi = { 1006static struct omap_hwmod_ocp_if omap2430_l4_core__dss_rfbi = {
1433 .master = &omap2430_l4_core_hwmod, 1007 .master = &omap2430_l4_core_hwmod,
1434 .slave = &omap2430_dss_rfbi_hwmod, 1008 .slave = &omap2430_dss_rfbi_hwmod,
1435 .clk = "dss_ick", 1009 .clk = "dss_ick",
1436 .addr = omap2430_dss_rfbi_addrs, 1010 .addr = omap2_dss_rfbi_addrs,
1437 .addr_cnt = ARRAY_SIZE(omap2430_dss_rfbi_addrs),
1438 .user = OCP_USER_MPU | OCP_USER_SDMA, 1011 .user = OCP_USER_MPU | OCP_USER_SDMA,
1439}; 1012};
1440 1013
@@ -1445,7 +1018,7 @@ static struct omap_hwmod_ocp_if *omap2430_dss_rfbi_slaves[] = {
1445 1018
1446static struct omap_hwmod omap2430_dss_rfbi_hwmod = { 1019static struct omap_hwmod omap2430_dss_rfbi_hwmod = {
1447 .name = "dss_rfbi", 1020 .name = "dss_rfbi",
1448 .class = &omap2430_rfbi_hwmod_class, 1021 .class = &omap2_rfbi_hwmod_class,
1449 .main_clk = "dss1_fck", 1022 .main_clk = "dss1_fck",
1450 .prcm = { 1023 .prcm = {
1451 .omap2 = { 1024 .omap2 = {
@@ -1460,31 +1033,12 @@ static struct omap_hwmod omap2430_dss_rfbi_hwmod = {
1460 .flags = HWMOD_NO_IDLEST, 1033 .flags = HWMOD_NO_IDLEST,
1461}; 1034};
1462 1035
1463/*
1464 * 'venc' class
1465 * video encoder
1466 */
1467
1468static struct omap_hwmod_class omap2430_venc_hwmod_class = {
1469 .name = "venc",
1470};
1471
1472/* dss_venc */
1473static struct omap_hwmod_addr_space omap2430_dss_venc_addrs[] = {
1474 {
1475 .pa_start = 0x48050C00,
1476 .pa_end = 0x48050FFF,
1477 .flags = ADDR_TYPE_RT
1478 },
1479};
1480
1481/* l4_core -> dss_venc */ 1036/* l4_core -> dss_venc */
1482static struct omap_hwmod_ocp_if omap2430_l4_core__dss_venc = { 1037static struct omap_hwmod_ocp_if omap2430_l4_core__dss_venc = {
1483 .master = &omap2430_l4_core_hwmod, 1038 .master = &omap2430_l4_core_hwmod,
1484 .slave = &omap2430_dss_venc_hwmod, 1039 .slave = &omap2430_dss_venc_hwmod,
1485 .clk = "dss_54m_fck", 1040 .clk = "dss_54m_fck",
1486 .addr = omap2430_dss_venc_addrs, 1041 .addr = omap2_dss_venc_addrs,
1487 .addr_cnt = ARRAY_SIZE(omap2430_dss_venc_addrs),
1488 .flags = OCPIF_SWSUP_IDLE, 1042 .flags = OCPIF_SWSUP_IDLE,
1489 .user = OCP_USER_MPU | OCP_USER_SDMA, 1043 .user = OCP_USER_MPU | OCP_USER_SDMA,
1490}; 1044};
@@ -1496,7 +1050,7 @@ static struct omap_hwmod_ocp_if *omap2430_dss_venc_slaves[] = {
1496 1050
1497static struct omap_hwmod omap2430_dss_venc_hwmod = { 1051static struct omap_hwmod omap2430_dss_venc_hwmod = {
1498 .name = "dss_venc", 1052 .name = "dss_venc",
1499 .class = &omap2430_venc_hwmod_class, 1053 .class = &omap2_venc_hwmod_class,
1500 .main_clk = "dss1_fck", 1054 .main_clk = "dss1_fck",
1501 .prcm = { 1055 .prcm = {
1502 .omap2 = { 1056 .omap2 = {
@@ -1524,33 +1078,28 @@ static struct omap_hwmod_class_sysconfig i2c_sysc = {
1524static struct omap_hwmod_class i2c_class = { 1078static struct omap_hwmod_class i2c_class = {
1525 .name = "i2c", 1079 .name = "i2c",
1526 .sysc = &i2c_sysc, 1080 .sysc = &i2c_sysc,
1081 .rev = OMAP_I2C_IP_VERSION_1,
1082 .reset = &omap_i2c_reset,
1527}; 1083};
1528 1084
1529static struct omap_i2c_dev_attr i2c_dev_attr = { 1085static struct omap_i2c_dev_attr i2c_dev_attr = {
1530 .fifo_depth = 8, /* bytes */ 1086 .fifo_depth = 8, /* bytes */
1087 .flags = OMAP_I2C_FLAG_APPLY_ERRATA_I207 |
1088 OMAP_I2C_FLAG_BUS_SHIFT_2 |
1089 OMAP_I2C_FLAG_FORCE_19200_INT_CLK,
1531}; 1090};
1532 1091
1533/* I2C1 */ 1092/* I2C1 */
1534 1093
1535static struct omap_hwmod_irq_info i2c1_mpu_irqs[] = {
1536 { .irq = INT_24XX_I2C1_IRQ, },
1537};
1538
1539static struct omap_hwmod_dma_info i2c1_sdma_reqs[] = {
1540 { .name = "tx", .dma_req = OMAP24XX_DMA_I2C1_TX },
1541 { .name = "rx", .dma_req = OMAP24XX_DMA_I2C1_RX },
1542};
1543
1544static struct omap_hwmod_ocp_if *omap2430_i2c1_slaves[] = { 1094static struct omap_hwmod_ocp_if *omap2430_i2c1_slaves[] = {
1545 &omap2430_l4_core__i2c1, 1095 &omap2430_l4_core__i2c1,
1546}; 1096};
1547 1097
1548static struct omap_hwmod omap2430_i2c1_hwmod = { 1098static struct omap_hwmod omap2430_i2c1_hwmod = {
1549 .name = "i2c1", 1099 .name = "i2c1",
1550 .mpu_irqs = i2c1_mpu_irqs, 1100 .flags = HWMOD_16BIT_REG,
1551 .mpu_irqs_cnt = ARRAY_SIZE(i2c1_mpu_irqs), 1101 .mpu_irqs = omap2_i2c1_mpu_irqs,
1552 .sdma_reqs = i2c1_sdma_reqs, 1102 .sdma_reqs = omap2_i2c1_sdma_reqs,
1553 .sdma_reqs_cnt = ARRAY_SIZE(i2c1_sdma_reqs),
1554 .main_clk = "i2chs1_fck", 1103 .main_clk = "i2chs1_fck",
1555 .prcm = { 1104 .prcm = {
1556 .omap2 = { 1105 .omap2 = {
@@ -1578,25 +1127,15 @@ static struct omap_hwmod omap2430_i2c1_hwmod = {
1578 1127
1579/* I2C2 */ 1128/* I2C2 */
1580 1129
1581static struct omap_hwmod_irq_info i2c2_mpu_irqs[] = {
1582 { .irq = INT_24XX_I2C2_IRQ, },
1583};
1584
1585static struct omap_hwmod_dma_info i2c2_sdma_reqs[] = {
1586 { .name = "tx", .dma_req = OMAP24XX_DMA_I2C2_TX },
1587 { .name = "rx", .dma_req = OMAP24XX_DMA_I2C2_RX },
1588};
1589
1590static struct omap_hwmod_ocp_if *omap2430_i2c2_slaves[] = { 1130static struct omap_hwmod_ocp_if *omap2430_i2c2_slaves[] = {
1591 &omap2430_l4_core__i2c2, 1131 &omap2430_l4_core__i2c2,
1592}; 1132};
1593 1133
1594static struct omap_hwmod omap2430_i2c2_hwmod = { 1134static struct omap_hwmod omap2430_i2c2_hwmod = {
1595 .name = "i2c2", 1135 .name = "i2c2",
1596 .mpu_irqs = i2c2_mpu_irqs, 1136 .flags = HWMOD_16BIT_REG,
1597 .mpu_irqs_cnt = ARRAY_SIZE(i2c2_mpu_irqs), 1137 .mpu_irqs = omap2_i2c2_mpu_irqs,
1598 .sdma_reqs = i2c2_sdma_reqs, 1138 .sdma_reqs = omap2_i2c2_sdma_reqs,
1599 .sdma_reqs_cnt = ARRAY_SIZE(i2c2_sdma_reqs),
1600 .main_clk = "i2chs2_fck", 1139 .main_clk = "i2chs2_fck",
1601 .prcm = { 1140 .prcm = {
1602 .omap2 = { 1141 .omap2 = {
@@ -1621,6 +1160,7 @@ static struct omap_hwmod_addr_space omap2430_gpio1_addr_space[] = {
1621 .pa_end = 0x4900C1ff, 1160 .pa_end = 0x4900C1ff,
1622 .flags = ADDR_TYPE_RT 1161 .flags = ADDR_TYPE_RT
1623 }, 1162 },
1163 { }
1624}; 1164};
1625 1165
1626static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio1 = { 1166static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio1 = {
@@ -1628,7 +1168,6 @@ static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio1 = {
1628 .slave = &omap2430_gpio1_hwmod, 1168 .slave = &omap2430_gpio1_hwmod,
1629 .clk = "gpios_ick", 1169 .clk = "gpios_ick",
1630 .addr = omap2430_gpio1_addr_space, 1170 .addr = omap2430_gpio1_addr_space,
1631 .addr_cnt = ARRAY_SIZE(omap2430_gpio1_addr_space),
1632 .user = OCP_USER_MPU | OCP_USER_SDMA, 1171 .user = OCP_USER_MPU | OCP_USER_SDMA,
1633}; 1172};
1634 1173
@@ -1639,6 +1178,7 @@ static struct omap_hwmod_addr_space omap2430_gpio2_addr_space[] = {
1639 .pa_end = 0x4900E1ff, 1178 .pa_end = 0x4900E1ff,
1640 .flags = ADDR_TYPE_RT 1179 .flags = ADDR_TYPE_RT
1641 }, 1180 },
1181 { }
1642}; 1182};
1643 1183
1644static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio2 = { 1184static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio2 = {
@@ -1646,7 +1186,6 @@ static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio2 = {
1646 .slave = &omap2430_gpio2_hwmod, 1186 .slave = &omap2430_gpio2_hwmod,
1647 .clk = "gpios_ick", 1187 .clk = "gpios_ick",
1648 .addr = omap2430_gpio2_addr_space, 1188 .addr = omap2430_gpio2_addr_space,
1649 .addr_cnt = ARRAY_SIZE(omap2430_gpio2_addr_space),
1650 .user = OCP_USER_MPU | OCP_USER_SDMA, 1189 .user = OCP_USER_MPU | OCP_USER_SDMA,
1651}; 1190};
1652 1191
@@ -1657,6 +1196,7 @@ static struct omap_hwmod_addr_space omap2430_gpio3_addr_space[] = {
1657 .pa_end = 0x490101ff, 1196 .pa_end = 0x490101ff,
1658 .flags = ADDR_TYPE_RT 1197 .flags = ADDR_TYPE_RT
1659 }, 1198 },
1199 { }
1660}; 1200};
1661 1201
1662static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio3 = { 1202static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio3 = {
@@ -1664,7 +1204,6 @@ static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio3 = {
1664 .slave = &omap2430_gpio3_hwmod, 1204 .slave = &omap2430_gpio3_hwmod,
1665 .clk = "gpios_ick", 1205 .clk = "gpios_ick",
1666 .addr = omap2430_gpio3_addr_space, 1206 .addr = omap2430_gpio3_addr_space,
1667 .addr_cnt = ARRAY_SIZE(omap2430_gpio3_addr_space),
1668 .user = OCP_USER_MPU | OCP_USER_SDMA, 1207 .user = OCP_USER_MPU | OCP_USER_SDMA,
1669}; 1208};
1670 1209
@@ -1675,6 +1214,7 @@ static struct omap_hwmod_addr_space omap2430_gpio4_addr_space[] = {
1675 .pa_end = 0x490121ff, 1214 .pa_end = 0x490121ff,
1676 .flags = ADDR_TYPE_RT 1215 .flags = ADDR_TYPE_RT
1677 }, 1216 },
1217 { }
1678}; 1218};
1679 1219
1680static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio4 = { 1220static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio4 = {
@@ -1682,7 +1222,6 @@ static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio4 = {
1682 .slave = &omap2430_gpio4_hwmod, 1222 .slave = &omap2430_gpio4_hwmod,
1683 .clk = "gpios_ick", 1223 .clk = "gpios_ick",
1684 .addr = omap2430_gpio4_addr_space, 1224 .addr = omap2430_gpio4_addr_space,
1685 .addr_cnt = ARRAY_SIZE(omap2430_gpio4_addr_space),
1686 .user = OCP_USER_MPU | OCP_USER_SDMA, 1225 .user = OCP_USER_MPU | OCP_USER_SDMA,
1687}; 1226};
1688 1227
@@ -1693,6 +1232,7 @@ static struct omap_hwmod_addr_space omap2430_gpio5_addr_space[] = {
1693 .pa_end = 0x480B61ff, 1232 .pa_end = 0x480B61ff,
1694 .flags = ADDR_TYPE_RT 1233 .flags = ADDR_TYPE_RT
1695 }, 1234 },
1235 { }
1696}; 1236};
1697 1237
1698static struct omap_hwmod_ocp_if omap2430_l4_core__gpio5 = { 1238static struct omap_hwmod_ocp_if omap2430_l4_core__gpio5 = {
@@ -1700,7 +1240,6 @@ static struct omap_hwmod_ocp_if omap2430_l4_core__gpio5 = {
1700 .slave = &omap2430_gpio5_hwmod, 1240 .slave = &omap2430_gpio5_hwmod,
1701 .clk = "gpio5_ick", 1241 .clk = "gpio5_ick",
1702 .addr = omap2430_gpio5_addr_space, 1242 .addr = omap2430_gpio5_addr_space,
1703 .addr_cnt = ARRAY_SIZE(omap2430_gpio5_addr_space),
1704 .user = OCP_USER_MPU | OCP_USER_SDMA, 1243 .user = OCP_USER_MPU | OCP_USER_SDMA,
1705}; 1244};
1706 1245
@@ -1710,32 +1249,7 @@ static struct omap_gpio_dev_attr gpio_dev_attr = {
1710 .dbck_flag = false, 1249 .dbck_flag = false,
1711}; 1250};
1712 1251
1713static struct omap_hwmod_class_sysconfig omap243x_gpio_sysc = {
1714 .rev_offs = 0x0000,
1715 .sysc_offs = 0x0010,
1716 .syss_offs = 0x0014,
1717 .sysc_flags = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
1718 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
1719 SYSS_HAS_RESET_STATUS),
1720 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1721 .sysc_fields = &omap_hwmod_sysc_type1,
1722};
1723
1724/*
1725 * 'gpio' class
1726 * general purpose io module
1727 */
1728static struct omap_hwmod_class omap243x_gpio_hwmod_class = {
1729 .name = "gpio",
1730 .sysc = &omap243x_gpio_sysc,
1731 .rev = 0,
1732};
1733
1734/* gpio1 */ 1252/* gpio1 */
1735static struct omap_hwmod_irq_info omap243x_gpio1_irqs[] = {
1736 { .irq = 29 }, /* INT_24XX_GPIO_BANK1 */
1737};
1738
1739static struct omap_hwmod_ocp_if *omap2430_gpio1_slaves[] = { 1253static struct omap_hwmod_ocp_if *omap2430_gpio1_slaves[] = {
1740 &omap2430_l4_wkup__gpio1, 1254 &omap2430_l4_wkup__gpio1,
1741}; 1255};
@@ -1743,8 +1257,7 @@ static struct omap_hwmod_ocp_if *omap2430_gpio1_slaves[] = {
1743static struct omap_hwmod omap2430_gpio1_hwmod = { 1257static struct omap_hwmod omap2430_gpio1_hwmod = {
1744 .name = "gpio1", 1258 .name = "gpio1",
1745 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, 1259 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
1746 .mpu_irqs = omap243x_gpio1_irqs, 1260 .mpu_irqs = omap2_gpio1_irqs,
1747 .mpu_irqs_cnt = ARRAY_SIZE(omap243x_gpio1_irqs),
1748 .main_clk = "gpios_fck", 1261 .main_clk = "gpios_fck",
1749 .prcm = { 1262 .prcm = {
1750 .omap2 = { 1263 .omap2 = {
@@ -1757,16 +1270,12 @@ static struct omap_hwmod omap2430_gpio1_hwmod = {
1757 }, 1270 },
1758 .slaves = omap2430_gpio1_slaves, 1271 .slaves = omap2430_gpio1_slaves,
1759 .slaves_cnt = ARRAY_SIZE(omap2430_gpio1_slaves), 1272 .slaves_cnt = ARRAY_SIZE(omap2430_gpio1_slaves),
1760 .class = &omap243x_gpio_hwmod_class, 1273 .class = &omap2xxx_gpio_hwmod_class,
1761 .dev_attr = &gpio_dev_attr, 1274 .dev_attr = &gpio_dev_attr,
1762 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430), 1275 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
1763}; 1276};
1764 1277
1765/* gpio2 */ 1278/* gpio2 */
1766static struct omap_hwmod_irq_info omap243x_gpio2_irqs[] = {
1767 { .irq = 30 }, /* INT_24XX_GPIO_BANK2 */
1768};
1769
1770static struct omap_hwmod_ocp_if *omap2430_gpio2_slaves[] = { 1279static struct omap_hwmod_ocp_if *omap2430_gpio2_slaves[] = {
1771 &omap2430_l4_wkup__gpio2, 1280 &omap2430_l4_wkup__gpio2,
1772}; 1281};
@@ -1774,8 +1283,7 @@ static struct omap_hwmod_ocp_if *omap2430_gpio2_slaves[] = {
1774static struct omap_hwmod omap2430_gpio2_hwmod = { 1283static struct omap_hwmod omap2430_gpio2_hwmod = {
1775 .name = "gpio2", 1284 .name = "gpio2",
1776 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, 1285 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
1777 .mpu_irqs = omap243x_gpio2_irqs, 1286 .mpu_irqs = omap2_gpio2_irqs,
1778 .mpu_irqs_cnt = ARRAY_SIZE(omap243x_gpio2_irqs),
1779 .main_clk = "gpios_fck", 1287 .main_clk = "gpios_fck",
1780 .prcm = { 1288 .prcm = {
1781 .omap2 = { 1289 .omap2 = {
@@ -1788,16 +1296,12 @@ static struct omap_hwmod omap2430_gpio2_hwmod = {
1788 }, 1296 },
1789 .slaves = omap2430_gpio2_slaves, 1297 .slaves = omap2430_gpio2_slaves,
1790 .slaves_cnt = ARRAY_SIZE(omap2430_gpio2_slaves), 1298 .slaves_cnt = ARRAY_SIZE(omap2430_gpio2_slaves),
1791 .class = &omap243x_gpio_hwmod_class, 1299 .class = &omap2xxx_gpio_hwmod_class,
1792 .dev_attr = &gpio_dev_attr, 1300 .dev_attr = &gpio_dev_attr,
1793 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430), 1301 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
1794}; 1302};
1795 1303
1796/* gpio3 */ 1304/* gpio3 */
1797static struct omap_hwmod_irq_info omap243x_gpio3_irqs[] = {
1798 { .irq = 31 }, /* INT_24XX_GPIO_BANK3 */
1799};
1800
1801static struct omap_hwmod_ocp_if *omap2430_gpio3_slaves[] = { 1305static struct omap_hwmod_ocp_if *omap2430_gpio3_slaves[] = {
1802 &omap2430_l4_wkup__gpio3, 1306 &omap2430_l4_wkup__gpio3,
1803}; 1307};
@@ -1805,8 +1309,7 @@ static struct omap_hwmod_ocp_if *omap2430_gpio3_slaves[] = {
1805static struct omap_hwmod omap2430_gpio3_hwmod = { 1309static struct omap_hwmod omap2430_gpio3_hwmod = {
1806 .name = "gpio3", 1310 .name = "gpio3",
1807 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, 1311 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
1808 .mpu_irqs = omap243x_gpio3_irqs, 1312 .mpu_irqs = omap2_gpio3_irqs,
1809 .mpu_irqs_cnt = ARRAY_SIZE(omap243x_gpio3_irqs),
1810 .main_clk = "gpios_fck", 1313 .main_clk = "gpios_fck",
1811 .prcm = { 1314 .prcm = {
1812 .omap2 = { 1315 .omap2 = {
@@ -1819,16 +1322,12 @@ static struct omap_hwmod omap2430_gpio3_hwmod = {
1819 }, 1322 },
1820 .slaves = omap2430_gpio3_slaves, 1323 .slaves = omap2430_gpio3_slaves,
1821 .slaves_cnt = ARRAY_SIZE(omap2430_gpio3_slaves), 1324 .slaves_cnt = ARRAY_SIZE(omap2430_gpio3_slaves),
1822 .class = &omap243x_gpio_hwmod_class, 1325 .class = &omap2xxx_gpio_hwmod_class,
1823 .dev_attr = &gpio_dev_attr, 1326 .dev_attr = &gpio_dev_attr,
1824 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430), 1327 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
1825}; 1328};
1826 1329
1827/* gpio4 */ 1330/* gpio4 */
1828static struct omap_hwmod_irq_info omap243x_gpio4_irqs[] = {
1829 { .irq = 32 }, /* INT_24XX_GPIO_BANK4 */
1830};
1831
1832static struct omap_hwmod_ocp_if *omap2430_gpio4_slaves[] = { 1331static struct omap_hwmod_ocp_if *omap2430_gpio4_slaves[] = {
1833 &omap2430_l4_wkup__gpio4, 1332 &omap2430_l4_wkup__gpio4,
1834}; 1333};
@@ -1836,8 +1335,7 @@ static struct omap_hwmod_ocp_if *omap2430_gpio4_slaves[] = {
1836static struct omap_hwmod omap2430_gpio4_hwmod = { 1335static struct omap_hwmod omap2430_gpio4_hwmod = {
1837 .name = "gpio4", 1336 .name = "gpio4",
1838 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, 1337 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
1839 .mpu_irqs = omap243x_gpio4_irqs, 1338 .mpu_irqs = omap2_gpio4_irqs,
1840 .mpu_irqs_cnt = ARRAY_SIZE(omap243x_gpio4_irqs),
1841 .main_clk = "gpios_fck", 1339 .main_clk = "gpios_fck",
1842 .prcm = { 1340 .prcm = {
1843 .omap2 = { 1341 .omap2 = {
@@ -1850,7 +1348,7 @@ static struct omap_hwmod omap2430_gpio4_hwmod = {
1850 }, 1348 },
1851 .slaves = omap2430_gpio4_slaves, 1349 .slaves = omap2430_gpio4_slaves,
1852 .slaves_cnt = ARRAY_SIZE(omap2430_gpio4_slaves), 1350 .slaves_cnt = ARRAY_SIZE(omap2430_gpio4_slaves),
1853 .class = &omap243x_gpio_hwmod_class, 1351 .class = &omap2xxx_gpio_hwmod_class,
1854 .dev_attr = &gpio_dev_attr, 1352 .dev_attr = &gpio_dev_attr,
1855 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430), 1353 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
1856}; 1354};
@@ -1858,6 +1356,7 @@ static struct omap_hwmod omap2430_gpio4_hwmod = {
1858/* gpio5 */ 1356/* gpio5 */
1859static struct omap_hwmod_irq_info omap243x_gpio5_irqs[] = { 1357static struct omap_hwmod_irq_info omap243x_gpio5_irqs[] = {
1860 { .irq = 33 }, /* INT_24XX_GPIO_BANK5 */ 1358 { .irq = 33 }, /* INT_24XX_GPIO_BANK5 */
1359 { .irq = -1 }
1861}; 1360};
1862 1361
1863static struct omap_hwmod_ocp_if *omap2430_gpio5_slaves[] = { 1362static struct omap_hwmod_ocp_if *omap2430_gpio5_slaves[] = {
@@ -1868,7 +1367,6 @@ static struct omap_hwmod omap2430_gpio5_hwmod = {
1868 .name = "gpio5", 1367 .name = "gpio5",
1869 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, 1368 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
1870 .mpu_irqs = omap243x_gpio5_irqs, 1369 .mpu_irqs = omap243x_gpio5_irqs,
1871 .mpu_irqs_cnt = ARRAY_SIZE(omap243x_gpio5_irqs),
1872 .main_clk = "gpio5_fck", 1370 .main_clk = "gpio5_fck",
1873 .prcm = { 1371 .prcm = {
1874 .omap2 = { 1372 .omap2 = {
@@ -1881,28 +1379,11 @@ static struct omap_hwmod omap2430_gpio5_hwmod = {
1881 }, 1379 },
1882 .slaves = omap2430_gpio5_slaves, 1380 .slaves = omap2430_gpio5_slaves,
1883 .slaves_cnt = ARRAY_SIZE(omap2430_gpio5_slaves), 1381 .slaves_cnt = ARRAY_SIZE(omap2430_gpio5_slaves),
1884 .class = &omap243x_gpio_hwmod_class, 1382 .class = &omap2xxx_gpio_hwmod_class,
1885 .dev_attr = &gpio_dev_attr, 1383 .dev_attr = &gpio_dev_attr,
1886 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430), 1384 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
1887}; 1385};
1888 1386
1889/* dma_system */
1890static struct omap_hwmod_class_sysconfig omap2430_dma_sysc = {
1891 .rev_offs = 0x0000,
1892 .sysc_offs = 0x002c,
1893 .syss_offs = 0x0028,
1894 .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_MIDLEMODE |
1895 SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_EMUFREE |
1896 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
1897 .idlemodes = (MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
1898 .sysc_fields = &omap_hwmod_sysc_type1,
1899};
1900
1901static struct omap_hwmod_class omap2430_dma_hwmod_class = {
1902 .name = "dma",
1903 .sysc = &omap2430_dma_sysc,
1904};
1905
1906/* dma attributes */ 1387/* dma attributes */
1907static struct omap_dma_dev_attr dma_dev_attr = { 1388static struct omap_dma_dev_attr dma_dev_attr = {
1908 .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY | 1389 .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
@@ -1910,21 +1391,6 @@ static struct omap_dma_dev_attr dma_dev_attr = {
1910 .lch_count = 32, 1391 .lch_count = 32,
1911}; 1392};
1912 1393
1913static struct omap_hwmod_irq_info omap2430_dma_system_irqs[] = {
1914 { .name = "0", .irq = 12 }, /* INT_24XX_SDMA_IRQ0 */
1915 { .name = "1", .irq = 13 }, /* INT_24XX_SDMA_IRQ1 */
1916 { .name = "2", .irq = 14 }, /* INT_24XX_SDMA_IRQ2 */
1917 { .name = "3", .irq = 15 }, /* INT_24XX_SDMA_IRQ3 */
1918};
1919
1920static struct omap_hwmod_addr_space omap2430_dma_system_addrs[] = {
1921 {
1922 .pa_start = 0x48056000,
1923 .pa_end = 0x48056fff,
1924 .flags = ADDR_TYPE_RT
1925 },
1926};
1927
1928/* dma_system -> L3 */ 1394/* dma_system -> L3 */
1929static struct omap_hwmod_ocp_if omap2430_dma_system__l3 = { 1395static struct omap_hwmod_ocp_if omap2430_dma_system__l3 = {
1930 .master = &omap2430_dma_system_hwmod, 1396 .master = &omap2430_dma_system_hwmod,
@@ -1943,8 +1409,7 @@ static struct omap_hwmod_ocp_if omap2430_l4_core__dma_system = {
1943 .master = &omap2430_l4_core_hwmod, 1409 .master = &omap2430_l4_core_hwmod,
1944 .slave = &omap2430_dma_system_hwmod, 1410 .slave = &omap2430_dma_system_hwmod,
1945 .clk = "sdma_ick", 1411 .clk = "sdma_ick",
1946 .addr = omap2430_dma_system_addrs, 1412 .addr = omap2_dma_system_addrs,
1947 .addr_cnt = ARRAY_SIZE(omap2430_dma_system_addrs),
1948 .user = OCP_USER_MPU | OCP_USER_SDMA, 1413 .user = OCP_USER_MPU | OCP_USER_SDMA,
1949}; 1414};
1950 1415
@@ -1955,9 +1420,8 @@ static struct omap_hwmod_ocp_if *omap2430_dma_system_slaves[] = {
1955 1420
1956static struct omap_hwmod omap2430_dma_system_hwmod = { 1421static struct omap_hwmod omap2430_dma_system_hwmod = {
1957 .name = "dma", 1422 .name = "dma",
1958 .class = &omap2430_dma_hwmod_class, 1423 .class = &omap2xxx_dma_hwmod_class,
1959 .mpu_irqs = omap2430_dma_system_irqs, 1424 .mpu_irqs = omap2_dma_system_irqs,
1960 .mpu_irqs_cnt = ARRAY_SIZE(omap2430_dma_system_irqs),
1961 .main_clk = "core_l3_ck", 1425 .main_clk = "core_l3_ck",
1962 .slaves = omap2430_dma_system_slaves, 1426 .slaves = omap2430_dma_system_slaves,
1963 .slaves_cnt = ARRAY_SIZE(omap2430_dma_system_slaves), 1427 .slaves_cnt = ARRAY_SIZE(omap2430_dma_system_slaves),
@@ -1968,47 +1432,18 @@ static struct omap_hwmod omap2430_dma_system_hwmod = {
1968 .flags = HWMOD_NO_IDLEST, 1432 .flags = HWMOD_NO_IDLEST,
1969}; 1433};
1970 1434
1971/*
1972 * 'mailbox' class
1973 * mailbox module allowing communication between the on-chip processors
1974 * using a queued mailbox-interrupt mechanism.
1975 */
1976
1977static struct omap_hwmod_class_sysconfig omap2430_mailbox_sysc = {
1978 .rev_offs = 0x000,
1979 .sysc_offs = 0x010,
1980 .syss_offs = 0x014,
1981 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
1982 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
1983 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1984 .sysc_fields = &omap_hwmod_sysc_type1,
1985};
1986
1987static struct omap_hwmod_class omap2430_mailbox_hwmod_class = {
1988 .name = "mailbox",
1989 .sysc = &omap2430_mailbox_sysc,
1990};
1991
1992/* mailbox */ 1435/* mailbox */
1993static struct omap_hwmod omap2430_mailbox_hwmod; 1436static struct omap_hwmod omap2430_mailbox_hwmod;
1994static struct omap_hwmod_irq_info omap2430_mailbox_irqs[] = { 1437static struct omap_hwmod_irq_info omap2430_mailbox_irqs[] = {
1995 { .irq = 26 }, 1438 { .irq = 26 },
1996}; 1439 { .irq = -1 }
1997
1998static struct omap_hwmod_addr_space omap2430_mailbox_addrs[] = {
1999 {
2000 .pa_start = 0x48094000,
2001 .pa_end = 0x480941ff,
2002 .flags = ADDR_TYPE_RT,
2003 },
2004}; 1440};
2005 1441
2006/* l4_core -> mailbox */ 1442/* l4_core -> mailbox */
2007static struct omap_hwmod_ocp_if omap2430_l4_core__mailbox = { 1443static struct omap_hwmod_ocp_if omap2430_l4_core__mailbox = {
2008 .master = &omap2430_l4_core_hwmod, 1444 .master = &omap2430_l4_core_hwmod,
2009 .slave = &omap2430_mailbox_hwmod, 1445 .slave = &omap2430_mailbox_hwmod,
2010 .addr = omap2430_mailbox_addrs, 1446 .addr = omap2_mailbox_addrs,
2011 .addr_cnt = ARRAY_SIZE(omap2430_mailbox_addrs),
2012 .user = OCP_USER_MPU | OCP_USER_SDMA, 1447 .user = OCP_USER_MPU | OCP_USER_SDMA,
2013}; 1448};
2014 1449
@@ -2019,9 +1454,8 @@ static struct omap_hwmod_ocp_if *omap2430_mailbox_slaves[] = {
2019 1454
2020static struct omap_hwmod omap2430_mailbox_hwmod = { 1455static struct omap_hwmod omap2430_mailbox_hwmod = {
2021 .name = "mailbox", 1456 .name = "mailbox",
2022 .class = &omap2430_mailbox_hwmod_class, 1457 .class = &omap2xxx_mailbox_hwmod_class,
2023 .mpu_irqs = omap2430_mailbox_irqs, 1458 .mpu_irqs = omap2430_mailbox_irqs,
2024 .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mailbox_irqs),
2025 .main_clk = "mailboxes_ick", 1459 .main_clk = "mailboxes_ick",
2026 .prcm = { 1460 .prcm = {
2027 .omap2 = { 1461 .omap2 = {
@@ -2037,45 +1471,7 @@ static struct omap_hwmod omap2430_mailbox_hwmod = {
2037 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430), 1471 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
2038}; 1472};
2039 1473
2040/*
2041 * 'mcspi' class
2042 * multichannel serial port interface (mcspi) / master/slave synchronous serial
2043 * bus
2044 */
2045
2046static struct omap_hwmod_class_sysconfig omap2430_mcspi_sysc = {
2047 .rev_offs = 0x0000,
2048 .sysc_offs = 0x0010,
2049 .syss_offs = 0x0014,
2050 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
2051 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
2052 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
2053 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
2054 .sysc_fields = &omap_hwmod_sysc_type1,
2055};
2056
2057static struct omap_hwmod_class omap2430_mcspi_class = {
2058 .name = "mcspi",
2059 .sysc = &omap2430_mcspi_sysc,
2060 .rev = OMAP2_MCSPI_REV,
2061};
2062
2063/* mcspi1 */ 1474/* mcspi1 */
2064static struct omap_hwmod_irq_info omap2430_mcspi1_mpu_irqs[] = {
2065 { .irq = 65 },
2066};
2067
2068static struct omap_hwmod_dma_info omap2430_mcspi1_sdma_reqs[] = {
2069 { .name = "tx0", .dma_req = 35 }, /* DMA_SPI1_TX0 */
2070 { .name = "rx0", .dma_req = 36 }, /* DMA_SPI1_RX0 */
2071 { .name = "tx1", .dma_req = 37 }, /* DMA_SPI1_TX1 */
2072 { .name = "rx1", .dma_req = 38 }, /* DMA_SPI1_RX1 */
2073 { .name = "tx2", .dma_req = 39 }, /* DMA_SPI1_TX2 */
2074 { .name = "rx2", .dma_req = 40 }, /* DMA_SPI1_RX2 */
2075 { .name = "tx3", .dma_req = 41 }, /* DMA_SPI1_TX3 */
2076 { .name = "rx3", .dma_req = 42 }, /* DMA_SPI1_RX3 */
2077};
2078
2079static struct omap_hwmod_ocp_if *omap2430_mcspi1_slaves[] = { 1475static struct omap_hwmod_ocp_if *omap2430_mcspi1_slaves[] = {
2080 &omap2430_l4_core__mcspi1, 1476 &omap2430_l4_core__mcspi1,
2081}; 1477};
@@ -2086,10 +1482,8 @@ static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = {
2086 1482
2087static struct omap_hwmod omap2430_mcspi1_hwmod = { 1483static struct omap_hwmod omap2430_mcspi1_hwmod = {
2088 .name = "mcspi1_hwmod", 1484 .name = "mcspi1_hwmod",
2089 .mpu_irqs = omap2430_mcspi1_mpu_irqs, 1485 .mpu_irqs = omap2_mcspi1_mpu_irqs,
2090 .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mcspi1_mpu_irqs), 1486 .sdma_reqs = omap2_mcspi1_sdma_reqs,
2091 .sdma_reqs = omap2430_mcspi1_sdma_reqs,
2092 .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcspi1_sdma_reqs),
2093 .main_clk = "mcspi1_fck", 1487 .main_clk = "mcspi1_fck",
2094 .prcm = { 1488 .prcm = {
2095 .omap2 = { 1489 .omap2 = {
@@ -2102,23 +1496,12 @@ static struct omap_hwmod omap2430_mcspi1_hwmod = {
2102 }, 1496 },
2103 .slaves = omap2430_mcspi1_slaves, 1497 .slaves = omap2430_mcspi1_slaves,
2104 .slaves_cnt = ARRAY_SIZE(omap2430_mcspi1_slaves), 1498 .slaves_cnt = ARRAY_SIZE(omap2430_mcspi1_slaves),
2105 .class = &omap2430_mcspi_class, 1499 .class = &omap2xxx_mcspi_class,
2106 .dev_attr = &omap_mcspi1_dev_attr, 1500 .dev_attr = &omap_mcspi1_dev_attr,
2107 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430), 1501 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
2108}; 1502};
2109 1503
2110/* mcspi2 */ 1504/* mcspi2 */
2111static struct omap_hwmod_irq_info omap2430_mcspi2_mpu_irqs[] = {
2112 { .irq = 66 },
2113};
2114
2115static struct omap_hwmod_dma_info omap2430_mcspi2_sdma_reqs[] = {
2116 { .name = "tx0", .dma_req = 43 }, /* DMA_SPI2_TX0 */
2117 { .name = "rx0", .dma_req = 44 }, /* DMA_SPI2_RX0 */
2118 { .name = "tx1", .dma_req = 45 }, /* DMA_SPI2_TX1 */
2119 { .name = "rx1", .dma_req = 46 }, /* DMA_SPI2_RX1 */
2120};
2121
2122static struct omap_hwmod_ocp_if *omap2430_mcspi2_slaves[] = { 1505static struct omap_hwmod_ocp_if *omap2430_mcspi2_slaves[] = {
2123 &omap2430_l4_core__mcspi2, 1506 &omap2430_l4_core__mcspi2,
2124}; 1507};
@@ -2129,10 +1512,8 @@ static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = {
2129 1512
2130static struct omap_hwmod omap2430_mcspi2_hwmod = { 1513static struct omap_hwmod omap2430_mcspi2_hwmod = {
2131 .name = "mcspi2_hwmod", 1514 .name = "mcspi2_hwmod",
2132 .mpu_irqs = omap2430_mcspi2_mpu_irqs, 1515 .mpu_irqs = omap2_mcspi2_mpu_irqs,
2133 .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mcspi2_mpu_irqs), 1516 .sdma_reqs = omap2_mcspi2_sdma_reqs,
2134 .sdma_reqs = omap2430_mcspi2_sdma_reqs,
2135 .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcspi2_sdma_reqs),
2136 .main_clk = "mcspi2_fck", 1517 .main_clk = "mcspi2_fck",
2137 .prcm = { 1518 .prcm = {
2138 .omap2 = { 1519 .omap2 = {
@@ -2145,14 +1526,15 @@ static struct omap_hwmod omap2430_mcspi2_hwmod = {
2145 }, 1526 },
2146 .slaves = omap2430_mcspi2_slaves, 1527 .slaves = omap2430_mcspi2_slaves,
2147 .slaves_cnt = ARRAY_SIZE(omap2430_mcspi2_slaves), 1528 .slaves_cnt = ARRAY_SIZE(omap2430_mcspi2_slaves),
2148 .class = &omap2430_mcspi_class, 1529 .class = &omap2xxx_mcspi_class,
2149 .dev_attr = &omap_mcspi2_dev_attr, 1530 .dev_attr = &omap_mcspi2_dev_attr,
2150 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430), 1531 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
2151}; 1532};
2152 1533
2153/* mcspi3 */ 1534/* mcspi3 */
2154static struct omap_hwmod_irq_info omap2430_mcspi3_mpu_irqs[] = { 1535static struct omap_hwmod_irq_info omap2430_mcspi3_mpu_irqs[] = {
2155 { .irq = 91 }, 1536 { .irq = 91 },
1537 { .irq = -1 }
2156}; 1538};
2157 1539
2158static struct omap_hwmod_dma_info omap2430_mcspi3_sdma_reqs[] = { 1540static struct omap_hwmod_dma_info omap2430_mcspi3_sdma_reqs[] = {
@@ -2160,6 +1542,7 @@ static struct omap_hwmod_dma_info omap2430_mcspi3_sdma_reqs[] = {
2160 { .name = "rx0", .dma_req = 16 }, /* DMA_SPI3_RX0 */ 1542 { .name = "rx0", .dma_req = 16 }, /* DMA_SPI3_RX0 */
2161 { .name = "tx1", .dma_req = 23 }, /* DMA_SPI3_TX1 */ 1543 { .name = "tx1", .dma_req = 23 }, /* DMA_SPI3_TX1 */
2162 { .name = "rx1", .dma_req = 24 }, /* DMA_SPI3_RX1 */ 1544 { .name = "rx1", .dma_req = 24 }, /* DMA_SPI3_RX1 */
1545 { .dma_req = -1 }
2163}; 1546};
2164 1547
2165static struct omap_hwmod_ocp_if *omap2430_mcspi3_slaves[] = { 1548static struct omap_hwmod_ocp_if *omap2430_mcspi3_slaves[] = {
@@ -2173,9 +1556,7 @@ static struct omap2_mcspi_dev_attr omap_mcspi3_dev_attr = {
2173static struct omap_hwmod omap2430_mcspi3_hwmod = { 1556static struct omap_hwmod omap2430_mcspi3_hwmod = {
2174 .name = "mcspi3_hwmod", 1557 .name = "mcspi3_hwmod",
2175 .mpu_irqs = omap2430_mcspi3_mpu_irqs, 1558 .mpu_irqs = omap2430_mcspi3_mpu_irqs,
2176 .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mcspi3_mpu_irqs),
2177 .sdma_reqs = omap2430_mcspi3_sdma_reqs, 1559 .sdma_reqs = omap2430_mcspi3_sdma_reqs,
2178 .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcspi3_sdma_reqs),
2179 .main_clk = "mcspi3_fck", 1560 .main_clk = "mcspi3_fck",
2180 .prcm = { 1561 .prcm = {
2181 .omap2 = { 1562 .omap2 = {
@@ -2188,8 +1569,8 @@ static struct omap_hwmod omap2430_mcspi3_hwmod = {
2188 }, 1569 },
2189 .slaves = omap2430_mcspi3_slaves, 1570 .slaves = omap2430_mcspi3_slaves,
2190 .slaves_cnt = ARRAY_SIZE(omap2430_mcspi3_slaves), 1571 .slaves_cnt = ARRAY_SIZE(omap2430_mcspi3_slaves),
2191 .class = &omap2430_mcspi_class, 1572 .class = &omap2xxx_mcspi_class,
2192 .dev_attr = &omap_mcspi3_dev_attr, 1573 .dev_attr = &omap_mcspi3_dev_attr,
2193 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430), 1574 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
2194}; 1575};
2195 1576
@@ -2218,12 +1599,12 @@ static struct omap_hwmod_irq_info omap2430_usbhsotg_mpu_irqs[] = {
2218 1599
2219 { .name = "mc", .irq = 92 }, 1600 { .name = "mc", .irq = 92 },
2220 { .name = "dma", .irq = 93 }, 1601 { .name = "dma", .irq = 93 },
1602 { .irq = -1 }
2221}; 1603};
2222 1604
2223static struct omap_hwmod omap2430_usbhsotg_hwmod = { 1605static struct omap_hwmod omap2430_usbhsotg_hwmod = {
2224 .name = "usb_otg_hs", 1606 .name = "usb_otg_hs",
2225 .mpu_irqs = omap2430_usbhsotg_mpu_irqs, 1607 .mpu_irqs = omap2430_usbhsotg_mpu_irqs,
2226 .mpu_irqs_cnt = ARRAY_SIZE(omap2430_usbhsotg_mpu_irqs),
2227 .main_clk = "usbhs_ick", 1608 .main_clk = "usbhs_ick",
2228 .prcm = { 1609 .prcm = {
2229 .omap2 = { 1610 .omap2 = {
@@ -2273,20 +1654,7 @@ static struct omap_hwmod_irq_info omap2430_mcbsp1_irqs[] = {
2273 { .name = "rx", .irq = 60 }, 1654 { .name = "rx", .irq = 60 },
2274 { .name = "ovr", .irq = 61 }, 1655 { .name = "ovr", .irq = 61 },
2275 { .name = "common", .irq = 64 }, 1656 { .name = "common", .irq = 64 },
2276}; 1657 { .irq = -1 }
2277
2278static struct omap_hwmod_dma_info omap2430_mcbsp1_sdma_chs[] = {
2279 { .name = "rx", .dma_req = 32 },
2280 { .name = "tx", .dma_req = 31 },
2281};
2282
2283static struct omap_hwmod_addr_space omap2430_mcbsp1_addrs[] = {
2284 {
2285 .name = "mpu",
2286 .pa_start = 0x48074000,
2287 .pa_end = 0x480740ff,
2288 .flags = ADDR_TYPE_RT
2289 },
2290}; 1658};
2291 1659
2292/* l4_core -> mcbsp1 */ 1660/* l4_core -> mcbsp1 */
@@ -2294,8 +1662,7 @@ static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp1 = {
2294 .master = &omap2430_l4_core_hwmod, 1662 .master = &omap2430_l4_core_hwmod,
2295 .slave = &omap2430_mcbsp1_hwmod, 1663 .slave = &omap2430_mcbsp1_hwmod,
2296 .clk = "mcbsp1_ick", 1664 .clk = "mcbsp1_ick",
2297 .addr = omap2430_mcbsp1_addrs, 1665 .addr = omap2_mcbsp1_addrs,
2298 .addr_cnt = ARRAY_SIZE(omap2430_mcbsp1_addrs),
2299 .user = OCP_USER_MPU | OCP_USER_SDMA, 1666 .user = OCP_USER_MPU | OCP_USER_SDMA,
2300}; 1667};
2301 1668
@@ -2308,9 +1675,7 @@ static struct omap_hwmod omap2430_mcbsp1_hwmod = {
2308 .name = "mcbsp1", 1675 .name = "mcbsp1",
2309 .class = &omap2430_mcbsp_hwmod_class, 1676 .class = &omap2430_mcbsp_hwmod_class,
2310 .mpu_irqs = omap2430_mcbsp1_irqs, 1677 .mpu_irqs = omap2430_mcbsp1_irqs,
2311 .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mcbsp1_irqs), 1678 .sdma_reqs = omap2_mcbsp1_sdma_reqs,
2312 .sdma_reqs = omap2430_mcbsp1_sdma_chs,
2313 .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcbsp1_sdma_chs),
2314 .main_clk = "mcbsp1_fck", 1679 .main_clk = "mcbsp1_fck",
2315 .prcm = { 1680 .prcm = {
2316 .omap2 = { 1681 .omap2 = {
@@ -2331,20 +1696,7 @@ static struct omap_hwmod_irq_info omap2430_mcbsp2_irqs[] = {
2331 { .name = "tx", .irq = 62 }, 1696 { .name = "tx", .irq = 62 },
2332 { .name = "rx", .irq = 63 }, 1697 { .name = "rx", .irq = 63 },
2333 { .name = "common", .irq = 16 }, 1698 { .name = "common", .irq = 16 },
2334}; 1699 { .irq = -1 }
2335
2336static struct omap_hwmod_dma_info omap2430_mcbsp2_sdma_chs[] = {
2337 { .name = "rx", .dma_req = 34 },
2338 { .name = "tx", .dma_req = 33 },
2339};
2340
2341static struct omap_hwmod_addr_space omap2430_mcbsp2_addrs[] = {
2342 {
2343 .name = "mpu",
2344 .pa_start = 0x48076000,
2345 .pa_end = 0x480760ff,
2346 .flags = ADDR_TYPE_RT
2347 },
2348}; 1700};
2349 1701
2350/* l4_core -> mcbsp2 */ 1702/* l4_core -> mcbsp2 */
@@ -2352,8 +1704,7 @@ static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp2 = {
2352 .master = &omap2430_l4_core_hwmod, 1704 .master = &omap2430_l4_core_hwmod,
2353 .slave = &omap2430_mcbsp2_hwmod, 1705 .slave = &omap2430_mcbsp2_hwmod,
2354 .clk = "mcbsp2_ick", 1706 .clk = "mcbsp2_ick",
2355 .addr = omap2430_mcbsp2_addrs, 1707 .addr = omap2xxx_mcbsp2_addrs,
2356 .addr_cnt = ARRAY_SIZE(omap2430_mcbsp2_addrs),
2357 .user = OCP_USER_MPU | OCP_USER_SDMA, 1708 .user = OCP_USER_MPU | OCP_USER_SDMA,
2358}; 1709};
2359 1710
@@ -2366,9 +1717,7 @@ static struct omap_hwmod omap2430_mcbsp2_hwmod = {
2366 .name = "mcbsp2", 1717 .name = "mcbsp2",
2367 .class = &omap2430_mcbsp_hwmod_class, 1718 .class = &omap2430_mcbsp_hwmod_class,
2368 .mpu_irqs = omap2430_mcbsp2_irqs, 1719 .mpu_irqs = omap2430_mcbsp2_irqs,
2369 .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mcbsp2_irqs), 1720 .sdma_reqs = omap2_mcbsp2_sdma_reqs,
2370 .sdma_reqs = omap2430_mcbsp2_sdma_chs,
2371 .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcbsp2_sdma_chs),
2372 .main_clk = "mcbsp2_fck", 1721 .main_clk = "mcbsp2_fck",
2373 .prcm = { 1722 .prcm = {
2374 .omap2 = { 1723 .omap2 = {
@@ -2389,11 +1738,7 @@ static struct omap_hwmod_irq_info omap2430_mcbsp3_irqs[] = {
2389 { .name = "tx", .irq = 89 }, 1738 { .name = "tx", .irq = 89 },
2390 { .name = "rx", .irq = 90 }, 1739 { .name = "rx", .irq = 90 },
2391 { .name = "common", .irq = 17 }, 1740 { .name = "common", .irq = 17 },
2392}; 1741 { .irq = -1 }
2393
2394static struct omap_hwmod_dma_info omap2430_mcbsp3_sdma_chs[] = {
2395 { .name = "rx", .dma_req = 18 },
2396 { .name = "tx", .dma_req = 17 },
2397}; 1742};
2398 1743
2399static struct omap_hwmod_addr_space omap2430_mcbsp3_addrs[] = { 1744static struct omap_hwmod_addr_space omap2430_mcbsp3_addrs[] = {
@@ -2403,6 +1748,7 @@ static struct omap_hwmod_addr_space omap2430_mcbsp3_addrs[] = {
2403 .pa_end = 0x4808C0ff, 1748 .pa_end = 0x4808C0ff,
2404 .flags = ADDR_TYPE_RT 1749 .flags = ADDR_TYPE_RT
2405 }, 1750 },
1751 { }
2406}; 1752};
2407 1753
2408/* l4_core -> mcbsp3 */ 1754/* l4_core -> mcbsp3 */
@@ -2411,7 +1757,6 @@ static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp3 = {
2411 .slave = &omap2430_mcbsp3_hwmod, 1757 .slave = &omap2430_mcbsp3_hwmod,
2412 .clk = "mcbsp3_ick", 1758 .clk = "mcbsp3_ick",
2413 .addr = omap2430_mcbsp3_addrs, 1759 .addr = omap2430_mcbsp3_addrs,
2414 .addr_cnt = ARRAY_SIZE(omap2430_mcbsp3_addrs),
2415 .user = OCP_USER_MPU | OCP_USER_SDMA, 1760 .user = OCP_USER_MPU | OCP_USER_SDMA,
2416}; 1761};
2417 1762
@@ -2424,9 +1769,7 @@ static struct omap_hwmod omap2430_mcbsp3_hwmod = {
2424 .name = "mcbsp3", 1769 .name = "mcbsp3",
2425 .class = &omap2430_mcbsp_hwmod_class, 1770 .class = &omap2430_mcbsp_hwmod_class,
2426 .mpu_irqs = omap2430_mcbsp3_irqs, 1771 .mpu_irqs = omap2430_mcbsp3_irqs,
2427 .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mcbsp3_irqs), 1772 .sdma_reqs = omap2_mcbsp3_sdma_reqs,
2428 .sdma_reqs = omap2430_mcbsp3_sdma_chs,
2429 .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcbsp3_sdma_chs),
2430 .main_clk = "mcbsp3_fck", 1773 .main_clk = "mcbsp3_fck",
2431 .prcm = { 1774 .prcm = {
2432 .omap2 = { 1775 .omap2 = {
@@ -2447,11 +1790,13 @@ static struct omap_hwmod_irq_info omap2430_mcbsp4_irqs[] = {
2447 { .name = "tx", .irq = 54 }, 1790 { .name = "tx", .irq = 54 },
2448 { .name = "rx", .irq = 55 }, 1791 { .name = "rx", .irq = 55 },
2449 { .name = "common", .irq = 18 }, 1792 { .name = "common", .irq = 18 },
1793 { .irq = -1 }
2450}; 1794};
2451 1795
2452static struct omap_hwmod_dma_info omap2430_mcbsp4_sdma_chs[] = { 1796static struct omap_hwmod_dma_info omap2430_mcbsp4_sdma_chs[] = {
2453 { .name = "rx", .dma_req = 20 }, 1797 { .name = "rx", .dma_req = 20 },
2454 { .name = "tx", .dma_req = 19 }, 1798 { .name = "tx", .dma_req = 19 },
1799 { .dma_req = -1 }
2455}; 1800};
2456 1801
2457static struct omap_hwmod_addr_space omap2430_mcbsp4_addrs[] = { 1802static struct omap_hwmod_addr_space omap2430_mcbsp4_addrs[] = {
@@ -2461,6 +1806,7 @@ static struct omap_hwmod_addr_space omap2430_mcbsp4_addrs[] = {
2461 .pa_end = 0x4808E0ff, 1806 .pa_end = 0x4808E0ff,
2462 .flags = ADDR_TYPE_RT 1807 .flags = ADDR_TYPE_RT
2463 }, 1808 },
1809 { }
2464}; 1810};
2465 1811
2466/* l4_core -> mcbsp4 */ 1812/* l4_core -> mcbsp4 */
@@ -2469,7 +1815,6 @@ static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp4 = {
2469 .slave = &omap2430_mcbsp4_hwmod, 1815 .slave = &omap2430_mcbsp4_hwmod,
2470 .clk = "mcbsp4_ick", 1816 .clk = "mcbsp4_ick",
2471 .addr = omap2430_mcbsp4_addrs, 1817 .addr = omap2430_mcbsp4_addrs,
2472 .addr_cnt = ARRAY_SIZE(omap2430_mcbsp4_addrs),
2473 .user = OCP_USER_MPU | OCP_USER_SDMA, 1818 .user = OCP_USER_MPU | OCP_USER_SDMA,
2474}; 1819};
2475 1820
@@ -2482,9 +1827,7 @@ static struct omap_hwmod omap2430_mcbsp4_hwmod = {
2482 .name = "mcbsp4", 1827 .name = "mcbsp4",
2483 .class = &omap2430_mcbsp_hwmod_class, 1828 .class = &omap2430_mcbsp_hwmod_class,
2484 .mpu_irqs = omap2430_mcbsp4_irqs, 1829 .mpu_irqs = omap2430_mcbsp4_irqs,
2485 .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mcbsp4_irqs),
2486 .sdma_reqs = omap2430_mcbsp4_sdma_chs, 1830 .sdma_reqs = omap2430_mcbsp4_sdma_chs,
2487 .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcbsp4_sdma_chs),
2488 .main_clk = "mcbsp4_fck", 1831 .main_clk = "mcbsp4_fck",
2489 .prcm = { 1832 .prcm = {
2490 .omap2 = { 1833 .omap2 = {
@@ -2505,11 +1848,13 @@ static struct omap_hwmod_irq_info omap2430_mcbsp5_irqs[] = {
2505 { .name = "tx", .irq = 81 }, 1848 { .name = "tx", .irq = 81 },
2506 { .name = "rx", .irq = 82 }, 1849 { .name = "rx", .irq = 82 },
2507 { .name = "common", .irq = 19 }, 1850 { .name = "common", .irq = 19 },
1851 { .irq = -1 }
2508}; 1852};
2509 1853
2510static struct omap_hwmod_dma_info omap2430_mcbsp5_sdma_chs[] = { 1854static struct omap_hwmod_dma_info omap2430_mcbsp5_sdma_chs[] = {
2511 { .name = "rx", .dma_req = 22 }, 1855 { .name = "rx", .dma_req = 22 },
2512 { .name = "tx", .dma_req = 21 }, 1856 { .name = "tx", .dma_req = 21 },
1857 { .dma_req = -1 }
2513}; 1858};
2514 1859
2515static struct omap_hwmod_addr_space omap2430_mcbsp5_addrs[] = { 1860static struct omap_hwmod_addr_space omap2430_mcbsp5_addrs[] = {
@@ -2519,6 +1864,7 @@ static struct omap_hwmod_addr_space omap2430_mcbsp5_addrs[] = {
2519 .pa_end = 0x480960ff, 1864 .pa_end = 0x480960ff,
2520 .flags = ADDR_TYPE_RT 1865 .flags = ADDR_TYPE_RT
2521 }, 1866 },
1867 { }
2522}; 1868};
2523 1869
2524/* l4_core -> mcbsp5 */ 1870/* l4_core -> mcbsp5 */
@@ -2527,7 +1873,6 @@ static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp5 = {
2527 .slave = &omap2430_mcbsp5_hwmod, 1873 .slave = &omap2430_mcbsp5_hwmod,
2528 .clk = "mcbsp5_ick", 1874 .clk = "mcbsp5_ick",
2529 .addr = omap2430_mcbsp5_addrs, 1875 .addr = omap2430_mcbsp5_addrs,
2530 .addr_cnt = ARRAY_SIZE(omap2430_mcbsp5_addrs),
2531 .user = OCP_USER_MPU | OCP_USER_SDMA, 1876 .user = OCP_USER_MPU | OCP_USER_SDMA,
2532}; 1877};
2533 1878
@@ -2540,9 +1885,7 @@ static struct omap_hwmod omap2430_mcbsp5_hwmod = {
2540 .name = "mcbsp5", 1885 .name = "mcbsp5",
2541 .class = &omap2430_mcbsp_hwmod_class, 1886 .class = &omap2430_mcbsp_hwmod_class,
2542 .mpu_irqs = omap2430_mcbsp5_irqs, 1887 .mpu_irqs = omap2430_mcbsp5_irqs,
2543 .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mcbsp5_irqs),
2544 .sdma_reqs = omap2430_mcbsp5_sdma_chs, 1888 .sdma_reqs = omap2430_mcbsp5_sdma_chs,
2545 .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcbsp5_sdma_chs),
2546 .main_clk = "mcbsp5_fck", 1889 .main_clk = "mcbsp5_fck",
2547 .prcm = { 1890 .prcm = {
2548 .omap2 = { 1891 .omap2 = {
@@ -2580,11 +1923,13 @@ static struct omap_hwmod_class omap2430_mmc_class = {
2580 1923
2581static struct omap_hwmod_irq_info omap2430_mmc1_mpu_irqs[] = { 1924static struct omap_hwmod_irq_info omap2430_mmc1_mpu_irqs[] = {
2582 { .irq = 83 }, 1925 { .irq = 83 },
1926 { .irq = -1 }
2583}; 1927};
2584 1928
2585static struct omap_hwmod_dma_info omap2430_mmc1_sdma_reqs[] = { 1929static struct omap_hwmod_dma_info omap2430_mmc1_sdma_reqs[] = {
2586 { .name = "tx", .dma_req = 61 }, /* DMA_MMC1_TX */ 1930 { .name = "tx", .dma_req = 61 }, /* DMA_MMC1_TX */
2587 { .name = "rx", .dma_req = 62 }, /* DMA_MMC1_RX */ 1931 { .name = "rx", .dma_req = 62 }, /* DMA_MMC1_RX */
1932 { .dma_req = -1 }
2588}; 1933};
2589 1934
2590static struct omap_hwmod_opt_clk omap2430_mmc1_opt_clks[] = { 1935static struct omap_hwmod_opt_clk omap2430_mmc1_opt_clks[] = {
@@ -2603,9 +1948,7 @@ static struct omap_hwmod omap2430_mmc1_hwmod = {
2603 .name = "mmc1", 1948 .name = "mmc1",
2604 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, 1949 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
2605 .mpu_irqs = omap2430_mmc1_mpu_irqs, 1950 .mpu_irqs = omap2430_mmc1_mpu_irqs,
2606 .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mmc1_mpu_irqs),
2607 .sdma_reqs = omap2430_mmc1_sdma_reqs, 1951 .sdma_reqs = omap2430_mmc1_sdma_reqs,
2608 .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mmc1_sdma_reqs),
2609 .opt_clks = omap2430_mmc1_opt_clks, 1952 .opt_clks = omap2430_mmc1_opt_clks,
2610 .opt_clks_cnt = ARRAY_SIZE(omap2430_mmc1_opt_clks), 1953 .opt_clks_cnt = ARRAY_SIZE(omap2430_mmc1_opt_clks),
2611 .main_clk = "mmchs1_fck", 1954 .main_clk = "mmchs1_fck",
@@ -2629,11 +1972,13 @@ static struct omap_hwmod omap2430_mmc1_hwmod = {
2629 1972
2630static struct omap_hwmod_irq_info omap2430_mmc2_mpu_irqs[] = { 1973static struct omap_hwmod_irq_info omap2430_mmc2_mpu_irqs[] = {
2631 { .irq = 86 }, 1974 { .irq = 86 },
1975 { .irq = -1 }
2632}; 1976};
2633 1977
2634static struct omap_hwmod_dma_info omap2430_mmc2_sdma_reqs[] = { 1978static struct omap_hwmod_dma_info omap2430_mmc2_sdma_reqs[] = {
2635 { .name = "tx", .dma_req = 47 }, /* DMA_MMC2_TX */ 1979 { .name = "tx", .dma_req = 47 }, /* DMA_MMC2_TX */
2636 { .name = "rx", .dma_req = 48 }, /* DMA_MMC2_RX */ 1980 { .name = "rx", .dma_req = 48 }, /* DMA_MMC2_RX */
1981 { .dma_req = -1 }
2637}; 1982};
2638 1983
2639static struct omap_hwmod_opt_clk omap2430_mmc2_opt_clks[] = { 1984static struct omap_hwmod_opt_clk omap2430_mmc2_opt_clks[] = {
@@ -2648,9 +1993,7 @@ static struct omap_hwmod omap2430_mmc2_hwmod = {
2648 .name = "mmc2", 1993 .name = "mmc2",
2649 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, 1994 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
2650 .mpu_irqs = omap2430_mmc2_mpu_irqs, 1995 .mpu_irqs = omap2430_mmc2_mpu_irqs,
2651 .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mmc2_mpu_irqs),
2652 .sdma_reqs = omap2430_mmc2_sdma_reqs, 1996 .sdma_reqs = omap2430_mmc2_sdma_reqs,
2653 .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mmc2_sdma_reqs),
2654 .opt_clks = omap2430_mmc2_opt_clks, 1997 .opt_clks = omap2430_mmc2_opt_clks,
2655 .opt_clks_cnt = ARRAY_SIZE(omap2430_mmc2_opt_clks), 1998 .opt_clks_cnt = ARRAY_SIZE(omap2430_mmc2_opt_clks),
2656 .main_clk = "mmchs2_fck", 1999 .main_clk = "mmchs2_fck",
diff --git a/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_interconnect_data.c b/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_interconnect_data.c
new file mode 100644
index 00000000000..04637fabadd
--- /dev/null
+++ b/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_interconnect_data.c
@@ -0,0 +1,173 @@
1/*
2 * omap_hwmod_2xxx_3xxx_interconnect_data.c - common interconnect data, OMAP2/3
3 *
4 * Copyright (C) 2009-2011 Nokia Corporation
5 * Paul Walmsley
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 *
11 * XXX handle crossbar/shared link difference for L3?
12 * XXX these should be marked initdata for multi-OMAP kernels
13 */
14#include <asm/sizes.h>
15
16#include <plat/omap_hwmod.h>
17#include <plat/serial.h>
18
19#include "omap_hwmod_common_data.h"
20
21struct omap_hwmod_addr_space omap2430_mmc1_addr_space[] = {
22 {
23 .pa_start = 0x4809c000,
24 .pa_end = 0x4809c1ff,
25 .flags = ADDR_TYPE_RT,
26 },
27 { }
28};
29
30struct omap_hwmod_addr_space omap2430_mmc2_addr_space[] = {
31 {
32 .pa_start = 0x480b4000,
33 .pa_end = 0x480b41ff,
34 .flags = ADDR_TYPE_RT,
35 },
36 { }
37};
38
39struct omap_hwmod_addr_space omap2_i2c1_addr_space[] = {
40 {
41 .pa_start = 0x48070000,
42 .pa_end = 0x48070000 + SZ_128 - 1,
43 .flags = ADDR_TYPE_RT,
44 },
45 { }
46};
47
48struct omap_hwmod_addr_space omap2_i2c2_addr_space[] = {
49 {
50 .pa_start = 0x48072000,
51 .pa_end = 0x48072000 + SZ_128 - 1,
52 .flags = ADDR_TYPE_RT,
53 },
54 { }
55};
56
57struct omap_hwmod_addr_space omap2_dss_addrs[] = {
58 {
59 .pa_start = 0x48050000,
60 .pa_end = 0x48050000 + SZ_1K - 1,
61 .flags = ADDR_TYPE_RT
62 },
63 { }
64};
65
66struct omap_hwmod_addr_space omap2_dss_dispc_addrs[] = {
67 {
68 .pa_start = 0x48050400,
69 .pa_end = 0x48050400 + SZ_1K - 1,
70 .flags = ADDR_TYPE_RT
71 },
72 { }
73};
74
75struct omap_hwmod_addr_space omap2_dss_rfbi_addrs[] = {
76 {
77 .pa_start = 0x48050800,
78 .pa_end = 0x48050800 + SZ_1K - 1,
79 .flags = ADDR_TYPE_RT
80 },
81 { }
82};
83
84struct omap_hwmod_addr_space omap2_dss_venc_addrs[] = {
85 {
86 .pa_start = 0x48050C00,
87 .pa_end = 0x48050C00 + SZ_1K - 1,
88 .flags = ADDR_TYPE_RT
89 },
90 { }
91};
92
93struct omap_hwmod_addr_space omap2_timer10_addrs[] = {
94 {
95 .pa_start = 0x48086000,
96 .pa_end = 0x48086000 + SZ_1K - 1,
97 .flags = ADDR_TYPE_RT
98 },
99 { }
100};
101
102struct omap_hwmod_addr_space omap2_timer11_addrs[] = {
103 {
104 .pa_start = 0x48088000,
105 .pa_end = 0x48088000 + SZ_1K - 1,
106 .flags = ADDR_TYPE_RT
107 },
108 { }
109};
110
111struct omap_hwmod_addr_space omap2xxx_timer12_addrs[] = {
112 {
113 .pa_start = 0x4808a000,
114 .pa_end = 0x4808a000 + SZ_1K - 1,
115 .flags = ADDR_TYPE_RT
116 },
117 { }
118};
119
120struct omap_hwmod_addr_space omap2_mcspi1_addr_space[] = {
121 {
122 .pa_start = 0x48098000,
123 .pa_end = 0x48098000 + SZ_256 - 1,
124 .flags = ADDR_TYPE_RT,
125 },
126 { }
127};
128
129struct omap_hwmod_addr_space omap2_mcspi2_addr_space[] = {
130 {
131 .pa_start = 0x4809a000,
132 .pa_end = 0x4809a000 + SZ_256 - 1,
133 .flags = ADDR_TYPE_RT,
134 },
135 { }
136};
137
138struct omap_hwmod_addr_space omap2430_mcspi3_addr_space[] = {
139 {
140 .pa_start = 0x480b8000,
141 .pa_end = 0x480b8000 + SZ_256 - 1,
142 .flags = ADDR_TYPE_RT,
143 },
144 { }
145};
146
147struct omap_hwmod_addr_space omap2_dma_system_addrs[] = {
148 {
149 .pa_start = 0x48056000,
150 .pa_end = 0x48056000 + SZ_4K - 1,
151 .flags = ADDR_TYPE_RT
152 },
153 { }
154};
155
156struct omap_hwmod_addr_space omap2_mailbox_addrs[] = {
157 {
158 .pa_start = 0x48094000,
159 .pa_end = 0x48094000 + SZ_512 - 1,
160 .flags = ADDR_TYPE_RT,
161 },
162 { }
163};
164
165struct omap_hwmod_addr_space omap2_mcbsp1_addrs[] = {
166 {
167 .name = "mpu",
168 .pa_start = 0x48074000,
169 .pa_end = 0x480740ff,
170 .flags = ADDR_TYPE_RT
171 },
172 { }
173};
diff --git a/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c b/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c
new file mode 100644
index 00000000000..c451729d289
--- /dev/null
+++ b/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c
@@ -0,0 +1,322 @@
1/*
2 * omap_hwmod_2xxx_3xxx_ipblock_data.c - common IP block data for OMAP2/3
3 *
4 * Copyright (C) 2011 Nokia Corporation
5 * Paul Walmsley
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 */
11#include <plat/omap_hwmod.h>
12#include <plat/serial.h>
13#include <plat/dma.h>
14
15#include <mach/irqs.h>
16
17#include "omap_hwmod_common_data.h"
18
19/* UART */
20
21static struct omap_hwmod_class_sysconfig omap2_uart_sysc = {
22 .rev_offs = 0x50,
23 .sysc_offs = 0x54,
24 .syss_offs = 0x58,
25 .sysc_flags = (SYSC_HAS_SIDLEMODE |
26 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
27 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
28 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
29 .sysc_fields = &omap_hwmod_sysc_type1,
30};
31
32struct omap_hwmod_class omap2_uart_class = {
33 .name = "uart",
34 .sysc = &omap2_uart_sysc,
35};
36
37/*
38 * 'dss' class
39 * display sub-system
40 */
41
42static struct omap_hwmod_class_sysconfig omap2_dss_sysc = {
43 .rev_offs = 0x0000,
44 .sysc_offs = 0x0010,
45 .syss_offs = 0x0014,
46 .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
47 .sysc_fields = &omap_hwmod_sysc_type1,
48};
49
50struct omap_hwmod_class omap2_dss_hwmod_class = {
51 .name = "dss",
52 .sysc = &omap2_dss_sysc,
53};
54
55/*
56 * 'dispc' class
57 * display controller
58 */
59
60static struct omap_hwmod_class_sysconfig omap2_dispc_sysc = {
61 .rev_offs = 0x0000,
62 .sysc_offs = 0x0010,
63 .syss_offs = 0x0014,
64 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE |
65 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
66 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
67 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
68 .sysc_fields = &omap_hwmod_sysc_type1,
69};
70
71struct omap_hwmod_class omap2_dispc_hwmod_class = {
72 .name = "dispc",
73 .sysc = &omap2_dispc_sysc,
74};
75
76/*
77 * 'rfbi' class
78 * remote frame buffer interface
79 */
80
81static struct omap_hwmod_class_sysconfig omap2_rfbi_sysc = {
82 .rev_offs = 0x0000,
83 .sysc_offs = 0x0010,
84 .syss_offs = 0x0014,
85 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
86 SYSC_HAS_AUTOIDLE),
87 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
88 .sysc_fields = &omap_hwmod_sysc_type1,
89};
90
91struct omap_hwmod_class omap2_rfbi_hwmod_class = {
92 .name = "rfbi",
93 .sysc = &omap2_rfbi_sysc,
94};
95
96/*
97 * 'venc' class
98 * video encoder
99 */
100
101struct omap_hwmod_class omap2_venc_hwmod_class = {
102 .name = "venc",
103};
104
105
106/* Common DMA request line data */
107struct omap_hwmod_dma_info omap2_uart1_sdma_reqs[] = {
108 { .name = "rx", .dma_req = OMAP24XX_DMA_UART1_RX, },
109 { .name = "tx", .dma_req = OMAP24XX_DMA_UART1_TX, },
110 { .dma_req = -1 }
111};
112
113struct omap_hwmod_dma_info omap2_uart2_sdma_reqs[] = {
114 { .name = "rx", .dma_req = OMAP24XX_DMA_UART2_RX, },
115 { .name = "tx", .dma_req = OMAP24XX_DMA_UART2_TX, },
116 { .dma_req = -1 }
117};
118
119struct omap_hwmod_dma_info omap2_uart3_sdma_reqs[] = {
120 { .name = "rx", .dma_req = OMAP24XX_DMA_UART3_RX, },
121 { .name = "tx", .dma_req = OMAP24XX_DMA_UART3_TX, },
122 { .dma_req = -1 }
123};
124
125struct omap_hwmod_dma_info omap2_i2c1_sdma_reqs[] = {
126 { .name = "tx", .dma_req = OMAP24XX_DMA_I2C1_TX },
127 { .name = "rx", .dma_req = OMAP24XX_DMA_I2C1_RX },
128 { .dma_req = -1 }
129};
130
131struct omap_hwmod_dma_info omap2_i2c2_sdma_reqs[] = {
132 { .name = "tx", .dma_req = OMAP24XX_DMA_I2C2_TX },
133 { .name = "rx", .dma_req = OMAP24XX_DMA_I2C2_RX },
134 { .dma_req = -1 }
135};
136
137struct omap_hwmod_dma_info omap2_mcspi1_sdma_reqs[] = {
138 { .name = "tx0", .dma_req = 35 }, /* DMA_SPI1_TX0 */
139 { .name = "rx0", .dma_req = 36 }, /* DMA_SPI1_RX0 */
140 { .name = "tx1", .dma_req = 37 }, /* DMA_SPI1_TX1 */
141 { .name = "rx1", .dma_req = 38 }, /* DMA_SPI1_RX1 */
142 { .name = "tx2", .dma_req = 39 }, /* DMA_SPI1_TX2 */
143 { .name = "rx2", .dma_req = 40 }, /* DMA_SPI1_RX2 */
144 { .name = "tx3", .dma_req = 41 }, /* DMA_SPI1_TX3 */
145 { .name = "rx3", .dma_req = 42 }, /* DMA_SPI1_RX3 */
146 { .dma_req = -1 }
147};
148
149struct omap_hwmod_dma_info omap2_mcspi2_sdma_reqs[] = {
150 { .name = "tx0", .dma_req = 43 }, /* DMA_SPI2_TX0 */
151 { .name = "rx0", .dma_req = 44 }, /* DMA_SPI2_RX0 */
152 { .name = "tx1", .dma_req = 45 }, /* DMA_SPI2_TX1 */
153 { .name = "rx1", .dma_req = 46 }, /* DMA_SPI2_RX1 */
154 { .dma_req = -1 }
155};
156
157struct omap_hwmod_dma_info omap2_mcbsp1_sdma_reqs[] = {
158 { .name = "rx", .dma_req = 32 },
159 { .name = "tx", .dma_req = 31 },
160 { .dma_req = -1 }
161};
162
163struct omap_hwmod_dma_info omap2_mcbsp2_sdma_reqs[] = {
164 { .name = "rx", .dma_req = 34 },
165 { .name = "tx", .dma_req = 33 },
166 { .dma_req = -1 }
167};
168
169struct omap_hwmod_dma_info omap2_mcbsp3_sdma_reqs[] = {
170 { .name = "rx", .dma_req = 18 },
171 { .name = "tx", .dma_req = 17 },
172 { .dma_req = -1 }
173};
174
175/* Other IP block data */
176
177
178/*
179 * omap_hwmod class data
180 */
181
182struct omap_hwmod_class l3_hwmod_class = {
183 .name = "l3"
184};
185
186struct omap_hwmod_class l4_hwmod_class = {
187 .name = "l4"
188};
189
190struct omap_hwmod_class mpu_hwmod_class = {
191 .name = "mpu"
192};
193
194struct omap_hwmod_class iva_hwmod_class = {
195 .name = "iva"
196};
197
198/* Common MPU IRQ line data */
199
200struct omap_hwmod_irq_info omap2_timer1_mpu_irqs[] = {
201 { .irq = 37, },
202 { .irq = -1 }
203};
204
205struct omap_hwmod_irq_info omap2_timer2_mpu_irqs[] = {
206 { .irq = 38, },
207 { .irq = -1 }
208};
209
210struct omap_hwmod_irq_info omap2_timer3_mpu_irqs[] = {
211 { .irq = 39, },
212 { .irq = -1 }
213};
214
215struct omap_hwmod_irq_info omap2_timer4_mpu_irqs[] = {
216 { .irq = 40, },
217 { .irq = -1 }
218};
219
220struct omap_hwmod_irq_info omap2_timer5_mpu_irqs[] = {
221 { .irq = 41, },
222 { .irq = -1 }
223};
224
225struct omap_hwmod_irq_info omap2_timer6_mpu_irqs[] = {
226 { .irq = 42, },
227 { .irq = -1 }
228};
229
230struct omap_hwmod_irq_info omap2_timer7_mpu_irqs[] = {
231 { .irq = 43, },
232 { .irq = -1 }
233};
234
235struct omap_hwmod_irq_info omap2_timer8_mpu_irqs[] = {
236 { .irq = 44, },
237 { .irq = -1 }
238};
239
240struct omap_hwmod_irq_info omap2_timer9_mpu_irqs[] = {
241 { .irq = 45, },
242 { .irq = -1 }
243};
244
245struct omap_hwmod_irq_info omap2_timer10_mpu_irqs[] = {
246 { .irq = 46, },
247 { .irq = -1 }
248};
249
250struct omap_hwmod_irq_info omap2_timer11_mpu_irqs[] = {
251 { .irq = 47, },
252 { .irq = -1 }
253};
254
255struct omap_hwmod_irq_info omap2_uart1_mpu_irqs[] = {
256 { .irq = INT_24XX_UART1_IRQ, },
257 { .irq = -1 }
258};
259
260struct omap_hwmod_irq_info omap2_uart2_mpu_irqs[] = {
261 { .irq = INT_24XX_UART2_IRQ, },
262 { .irq = -1 }
263};
264
265struct omap_hwmod_irq_info omap2_uart3_mpu_irqs[] = {
266 { .irq = INT_24XX_UART3_IRQ, },
267 { .irq = -1 }
268};
269
270struct omap_hwmod_irq_info omap2_dispc_irqs[] = {
271 { .irq = 25 },
272 { .irq = -1 }
273};
274
275struct omap_hwmod_irq_info omap2_i2c1_mpu_irqs[] = {
276 { .irq = INT_24XX_I2C1_IRQ, },
277 { .irq = -1 }
278};
279
280struct omap_hwmod_irq_info omap2_i2c2_mpu_irqs[] = {
281 { .irq = INT_24XX_I2C2_IRQ, },
282 { .irq = -1 }
283};
284
285struct omap_hwmod_irq_info omap2_gpio1_irqs[] = {
286 { .irq = 29 }, /* INT_24XX_GPIO_BANK1 */
287 { .irq = -1 }
288};
289
290struct omap_hwmod_irq_info omap2_gpio2_irqs[] = {
291 { .irq = 30 }, /* INT_24XX_GPIO_BANK2 */
292 { .irq = -1 }
293};
294
295struct omap_hwmod_irq_info omap2_gpio3_irqs[] = {
296 { .irq = 31 }, /* INT_24XX_GPIO_BANK3 */
297 { .irq = -1 }
298};
299
300struct omap_hwmod_irq_info omap2_gpio4_irqs[] = {
301 { .irq = 32 }, /* INT_24XX_GPIO_BANK4 */
302 { .irq = -1 }
303};
304
305struct omap_hwmod_irq_info omap2_dma_system_irqs[] = {
306 { .name = "0", .irq = 12 }, /* INT_24XX_SDMA_IRQ0 */
307 { .name = "1", .irq = 13 }, /* INT_24XX_SDMA_IRQ1 */
308 { .name = "2", .irq = 14 }, /* INT_24XX_SDMA_IRQ2 */
309 { .name = "3", .irq = 15 }, /* INT_24XX_SDMA_IRQ3 */
310 { .irq = -1 }
311};
312
313struct omap_hwmod_irq_info omap2_mcspi1_mpu_irqs[] = {
314 { .irq = 65 },
315 { .irq = -1 }
316};
317
318struct omap_hwmod_irq_info omap2_mcspi2_mpu_irqs[] = {
319 { .irq = 66 },
320 { .irq = -1 }
321};
322
diff --git a/arch/arm/mach-omap2/omap_hwmod_2xxx_interconnect_data.c b/arch/arm/mach-omap2/omap_hwmod_2xxx_interconnect_data.c
new file mode 100644
index 00000000000..4f3547c2a49
--- /dev/null
+++ b/arch/arm/mach-omap2/omap_hwmod_2xxx_interconnect_data.c
@@ -0,0 +1,130 @@
1/*
2 * omap_hwmod_2xxx_interconnect_data.c - common interconnect data for OMAP2xxx
3 *
4 * Copyright (C) 2009-2011 Nokia Corporation
5 * Paul Walmsley
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 *
11 * XXX handle crossbar/shared link difference for L3?
12 * XXX these should be marked initdata for multi-OMAP kernels
13 */
14#include <asm/sizes.h>
15
16#include <plat/omap_hwmod.h>
17#include <plat/serial.h>
18
19#include "omap_hwmod_common_data.h"
20
21struct omap_hwmod_addr_space omap2xxx_uart1_addr_space[] = {
22 {
23 .pa_start = OMAP2_UART1_BASE,
24 .pa_end = OMAP2_UART1_BASE + SZ_8K - 1,
25 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
26 },
27 { }
28};
29
30struct omap_hwmod_addr_space omap2xxx_uart2_addr_space[] = {
31 {
32 .pa_start = OMAP2_UART2_BASE,
33 .pa_end = OMAP2_UART2_BASE + SZ_1K - 1,
34 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
35 },
36 { }
37};
38
39struct omap_hwmod_addr_space omap2xxx_uart3_addr_space[] = {
40 {
41 .pa_start = OMAP2_UART3_BASE,
42 .pa_end = OMAP2_UART3_BASE + SZ_1K - 1,
43 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
44 },
45 { }
46};
47
48struct omap_hwmod_addr_space omap2xxx_timer2_addrs[] = {
49 {
50 .pa_start = 0x4802a000,
51 .pa_end = 0x4802a000 + SZ_1K - 1,
52 .flags = ADDR_TYPE_RT
53 },
54 { }
55};
56
57struct omap_hwmod_addr_space omap2xxx_timer3_addrs[] = {
58 {
59 .pa_start = 0x48078000,
60 .pa_end = 0x48078000 + SZ_1K - 1,
61 .flags = ADDR_TYPE_RT
62 },
63 { }
64};
65
66struct omap_hwmod_addr_space omap2xxx_timer4_addrs[] = {
67 {
68 .pa_start = 0x4807a000,
69 .pa_end = 0x4807a000 + SZ_1K - 1,
70 .flags = ADDR_TYPE_RT
71 },
72 { }
73};
74
75struct omap_hwmod_addr_space omap2xxx_timer5_addrs[] = {
76 {
77 .pa_start = 0x4807c000,
78 .pa_end = 0x4807c000 + SZ_1K - 1,
79 .flags = ADDR_TYPE_RT
80 },
81 { }
82};
83
84struct omap_hwmod_addr_space omap2xxx_timer6_addrs[] = {
85 {
86 .pa_start = 0x4807e000,
87 .pa_end = 0x4807e000 + SZ_1K - 1,
88 .flags = ADDR_TYPE_RT
89 },
90 { }
91};
92
93struct omap_hwmod_addr_space omap2xxx_timer7_addrs[] = {
94 {
95 .pa_start = 0x48080000,
96 .pa_end = 0x48080000 + SZ_1K - 1,
97 .flags = ADDR_TYPE_RT
98 },
99 { }
100};
101
102struct omap_hwmod_addr_space omap2xxx_timer8_addrs[] = {
103 {
104 .pa_start = 0x48082000,
105 .pa_end = 0x48082000 + SZ_1K - 1,
106 .flags = ADDR_TYPE_RT
107 },
108 { }
109};
110
111struct omap_hwmod_addr_space omap2xxx_timer9_addrs[] = {
112 {
113 .pa_start = 0x48084000,
114 .pa_end = 0x48084000 + SZ_1K - 1,
115 .flags = ADDR_TYPE_RT
116 },
117 { }
118};
119
120struct omap_hwmod_addr_space omap2xxx_mcbsp2_addrs[] = {
121 {
122 .name = "mpu",
123 .pa_start = 0x48076000,
124 .pa_end = 0x480760ff,
125 .flags = ADDR_TYPE_RT
126 },
127 { }
128};
129
130
diff --git a/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c b/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c
new file mode 100644
index 00000000000..177dee20fae
--- /dev/null
+++ b/arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c
@@ -0,0 +1,150 @@
1/*
2 * omap_hwmod_2xxx_ipblock_data.c - common IP block data for OMAP2xxx
3 *
4 * Copyright (C) 2011 Nokia Corporation
5 * Paul Walmsley
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 */
11#include <plat/omap_hwmod.h>
12#include <plat/serial.h>
13#include <plat/dma.h>
14#include <plat/dmtimer.h>
15#include <plat/mcspi.h>
16
17#include <mach/irqs.h>
18
19#include "omap_hwmod_common_data.h"
20#include "wd_timer.h"
21
22struct omap_hwmod_irq_info omap2xxx_timer12_mpu_irqs[] = {
23 { .irq = 48, },
24 { .irq = -1 }
25};
26
27struct omap_hwmod_dma_info omap2xxx_dss_sdma_chs[] = {
28 { .name = "dispc", .dma_req = 5 },
29 { .dma_req = -1 }
30};
31/* OMAP2xxx Timer Common */
32static struct omap_hwmod_class_sysconfig omap2xxx_timer_sysc = {
33 .rev_offs = 0x0000,
34 .sysc_offs = 0x0010,
35 .syss_offs = 0x0014,
36 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
37 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
38 SYSC_HAS_AUTOIDLE),
39 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
40 .sysc_fields = &omap_hwmod_sysc_type1,
41};
42
43struct omap_hwmod_class omap2xxx_timer_hwmod_class = {
44 .name = "timer",
45 .sysc = &omap2xxx_timer_sysc,
46 .rev = OMAP_TIMER_IP_VERSION_1,
47};
48
49/*
50 * 'wd_timer' class
51 * 32-bit watchdog upward counter that generates a pulse on the reset pin on
52 * overflow condition
53 */
54
55static struct omap_hwmod_class_sysconfig omap2xxx_wd_timer_sysc = {
56 .rev_offs = 0x0000,
57 .sysc_offs = 0x0010,
58 .syss_offs = 0x0014,
59 .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_SOFTRESET |
60 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
61 .sysc_fields = &omap_hwmod_sysc_type1,
62};
63
64struct omap_hwmod_class omap2xxx_wd_timer_hwmod_class = {
65 .name = "wd_timer",
66 .sysc = &omap2xxx_wd_timer_sysc,
67 .pre_shutdown = &omap2_wd_timer_disable
68};
69
70/*
71 * 'gpio' class
72 * general purpose io module
73 */
74static struct omap_hwmod_class_sysconfig omap2xxx_gpio_sysc = {
75 .rev_offs = 0x0000,
76 .sysc_offs = 0x0010,
77 .syss_offs = 0x0014,
78 .sysc_flags = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
79 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
80 SYSS_HAS_RESET_STATUS),
81 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
82 .sysc_fields = &omap_hwmod_sysc_type1,
83};
84
85struct omap_hwmod_class omap2xxx_gpio_hwmod_class = {
86 .name = "gpio",
87 .sysc = &omap2xxx_gpio_sysc,
88 .rev = 0,
89};
90
91/* system dma */
92static struct omap_hwmod_class_sysconfig omap2xxx_dma_sysc = {
93 .rev_offs = 0x0000,
94 .sysc_offs = 0x002c,
95 .syss_offs = 0x0028,
96 .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_MIDLEMODE |
97 SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_EMUFREE |
98 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
99 .idlemodes = (MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
100 .sysc_fields = &omap_hwmod_sysc_type1,
101};
102
103struct omap_hwmod_class omap2xxx_dma_hwmod_class = {
104 .name = "dma",
105 .sysc = &omap2xxx_dma_sysc,
106};
107
108/*
109 * 'mailbox' class
110 * mailbox module allowing communication between the on-chip processors
111 * using a queued mailbox-interrupt mechanism.
112 */
113
114static struct omap_hwmod_class_sysconfig omap2xxx_mailbox_sysc = {
115 .rev_offs = 0x000,
116 .sysc_offs = 0x010,
117 .syss_offs = 0x014,
118 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
119 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
120 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
121 .sysc_fields = &omap_hwmod_sysc_type1,
122};
123
124struct omap_hwmod_class omap2xxx_mailbox_hwmod_class = {
125 .name = "mailbox",
126 .sysc = &omap2xxx_mailbox_sysc,
127};
128
129/*
130 * 'mcspi' class
131 * multichannel serial port interface (mcspi) / master/slave synchronous serial
132 * bus
133 */
134
135static struct omap_hwmod_class_sysconfig omap2xxx_mcspi_sysc = {
136 .rev_offs = 0x0000,
137 .sysc_offs = 0x0010,
138 .syss_offs = 0x0014,
139 .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
140 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
141 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
142 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
143 .sysc_fields = &omap_hwmod_sysc_type1,
144};
145
146struct omap_hwmod_class omap2xxx_mcspi_class = {
147 .name = "mcspi",
148 .sysc = &omap2xxx_mcspi_sysc,
149 .rev = OMAP2_MCSPI_REV,
150};
diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
index 909a84de668..25bf43b5a4e 100644
--- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * omap_hwmod_3xxx_data.c - hardware modules present on the OMAP3xxx chips 2 * omap_hwmod_3xxx_data.c - hardware modules present on the OMAP3xxx chips
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 * This program is free software; you can redistribute it and/or modify 7 * This program is free software; you can redistribute it and/or modify
@@ -103,6 +103,7 @@ static struct omap_hwmod_ocp_if omap3xxx_l3_main__l4_per = {
103static struct omap_hwmod_irq_info omap3xxx_l3_main_irqs[] = { 103static struct omap_hwmod_irq_info omap3xxx_l3_main_irqs[] = {
104 { .irq = INT_34XX_L3_DBG_IRQ }, 104 { .irq = INT_34XX_L3_DBG_IRQ },
105 { .irq = INT_34XX_L3_APP_IRQ }, 105 { .irq = INT_34XX_L3_APP_IRQ },
106 { .irq = -1 }
106}; 107};
107 108
108static struct omap_hwmod_addr_space omap3xxx_l3_main_addrs[] = { 109static struct omap_hwmod_addr_space omap3xxx_l3_main_addrs[] = {
@@ -111,6 +112,7 @@ static struct omap_hwmod_addr_space omap3xxx_l3_main_addrs[] = {
111 .pa_end = 0x6800ffff, 112 .pa_end = 0x6800ffff,
112 .flags = ADDR_TYPE_RT, 113 .flags = ADDR_TYPE_RT,
113 }, 114 },
115 { }
114}; 116};
115 117
116/* MPU -> L3 interface */ 118/* MPU -> L3 interface */
@@ -118,7 +120,6 @@ static struct omap_hwmod_ocp_if omap3xxx_mpu__l3_main = {
118 .master = &omap3xxx_mpu_hwmod, 120 .master = &omap3xxx_mpu_hwmod,
119 .slave = &omap3xxx_l3_main_hwmod, 121 .slave = &omap3xxx_l3_main_hwmod,
120 .addr = omap3xxx_l3_main_addrs, 122 .addr = omap3xxx_l3_main_addrs,
121 .addr_cnt = ARRAY_SIZE(omap3xxx_l3_main_addrs),
122 .user = OCP_USER_MPU, 123 .user = OCP_USER_MPU,
123}; 124};
124 125
@@ -150,8 +151,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_l3_main_masters[] = {
150static struct omap_hwmod omap3xxx_l3_main_hwmod = { 151static struct omap_hwmod omap3xxx_l3_main_hwmod = {
151 .name = "l3_main", 152 .name = "l3_main",
152 .class = &l3_hwmod_class, 153 .class = &l3_hwmod_class,
153 .mpu_irqs = omap3xxx_l3_main_irqs, 154 .mpu_irqs = omap3xxx_l3_main_irqs,
154 .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_l3_main_irqs),
155 .masters = omap3xxx_l3_main_masters, 155 .masters = omap3xxx_l3_main_masters,
156 .masters_cnt = ARRAY_SIZE(omap3xxx_l3_main_masters), 156 .masters_cnt = ARRAY_SIZE(omap3xxx_l3_main_masters),
157 .slaves = omap3xxx_l3_main_slaves, 157 .slaves = omap3xxx_l3_main_slaves,
@@ -190,39 +190,21 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_core__l4_wkup = {
190}; 190};
191 191
192/* L4 CORE -> MMC1 interface */ 192/* L4 CORE -> MMC1 interface */
193static struct omap_hwmod_addr_space omap3xxx_mmc1_addr_space[] = {
194 {
195 .pa_start = 0x4809c000,
196 .pa_end = 0x4809c1ff,
197 .flags = ADDR_TYPE_RT,
198 },
199};
200
201static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmc1 = { 193static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmc1 = {
202 .master = &omap3xxx_l4_core_hwmod, 194 .master = &omap3xxx_l4_core_hwmod,
203 .slave = &omap3xxx_mmc1_hwmod, 195 .slave = &omap3xxx_mmc1_hwmod,
204 .clk = "mmchs1_ick", 196 .clk = "mmchs1_ick",
205 .addr = omap3xxx_mmc1_addr_space, 197 .addr = omap2430_mmc1_addr_space,
206 .addr_cnt = ARRAY_SIZE(omap3xxx_mmc1_addr_space),
207 .user = OCP_USER_MPU | OCP_USER_SDMA, 198 .user = OCP_USER_MPU | OCP_USER_SDMA,
208 .flags = OMAP_FIREWALL_L4 199 .flags = OMAP_FIREWALL_L4
209}; 200};
210 201
211/* L4 CORE -> MMC2 interface */ 202/* L4 CORE -> MMC2 interface */
212static struct omap_hwmod_addr_space omap3xxx_mmc2_addr_space[] = {
213 {
214 .pa_start = 0x480b4000,
215 .pa_end = 0x480b41ff,
216 .flags = ADDR_TYPE_RT,
217 },
218};
219
220static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmc2 = { 203static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmc2 = {
221 .master = &omap3xxx_l4_core_hwmod, 204 .master = &omap3xxx_l4_core_hwmod,
222 .slave = &omap3xxx_mmc2_hwmod, 205 .slave = &omap3xxx_mmc2_hwmod,
223 .clk = "mmchs2_ick", 206 .clk = "mmchs2_ick",
224 .addr = omap3xxx_mmc2_addr_space, 207 .addr = omap2430_mmc2_addr_space,
225 .addr_cnt = ARRAY_SIZE(omap3xxx_mmc2_addr_space),
226 .user = OCP_USER_MPU | OCP_USER_SDMA, 208 .user = OCP_USER_MPU | OCP_USER_SDMA,
227 .flags = OMAP_FIREWALL_L4 209 .flags = OMAP_FIREWALL_L4
228}; 210};
@@ -234,6 +216,7 @@ static struct omap_hwmod_addr_space omap3xxx_mmc3_addr_space[] = {
234 .pa_end = 0x480ad1ff, 216 .pa_end = 0x480ad1ff,
235 .flags = ADDR_TYPE_RT, 217 .flags = ADDR_TYPE_RT,
236 }, 218 },
219 { }
237}; 220};
238 221
239static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmc3 = { 222static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmc3 = {
@@ -241,7 +224,6 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_core__mmc3 = {
241 .slave = &omap3xxx_mmc3_hwmod, 224 .slave = &omap3xxx_mmc3_hwmod,
242 .clk = "mmchs3_ick", 225 .clk = "mmchs3_ick",
243 .addr = omap3xxx_mmc3_addr_space, 226 .addr = omap3xxx_mmc3_addr_space,
244 .addr_cnt = ARRAY_SIZE(omap3xxx_mmc3_addr_space),
245 .user = OCP_USER_MPU | OCP_USER_SDMA, 227 .user = OCP_USER_MPU | OCP_USER_SDMA,
246 .flags = OMAP_FIREWALL_L4 228 .flags = OMAP_FIREWALL_L4
247}; 229};
@@ -253,6 +235,7 @@ static struct omap_hwmod_addr_space omap3xxx_uart1_addr_space[] = {
253 .pa_end = OMAP3_UART1_BASE + SZ_8K - 1, 235 .pa_end = OMAP3_UART1_BASE + SZ_8K - 1,
254 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT, 236 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
255 }, 237 },
238 { }
256}; 239};
257 240
258static struct omap_hwmod_ocp_if omap3_l4_core__uart1 = { 241static struct omap_hwmod_ocp_if omap3_l4_core__uart1 = {
@@ -260,7 +243,6 @@ static struct omap_hwmod_ocp_if omap3_l4_core__uart1 = {
260 .slave = &omap3xxx_uart1_hwmod, 243 .slave = &omap3xxx_uart1_hwmod,
261 .clk = "uart1_ick", 244 .clk = "uart1_ick",
262 .addr = omap3xxx_uart1_addr_space, 245 .addr = omap3xxx_uart1_addr_space,
263 .addr_cnt = ARRAY_SIZE(omap3xxx_uart1_addr_space),
264 .user = OCP_USER_MPU | OCP_USER_SDMA, 246 .user = OCP_USER_MPU | OCP_USER_SDMA,
265}; 247};
266 248
@@ -271,6 +253,7 @@ static struct omap_hwmod_addr_space omap3xxx_uart2_addr_space[] = {
271 .pa_end = OMAP3_UART2_BASE + SZ_1K - 1, 253 .pa_end = OMAP3_UART2_BASE + SZ_1K - 1,
272 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT, 254 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
273 }, 255 },
256 { }
274}; 257};
275 258
276static struct omap_hwmod_ocp_if omap3_l4_core__uart2 = { 259static struct omap_hwmod_ocp_if omap3_l4_core__uart2 = {
@@ -278,7 +261,6 @@ static struct omap_hwmod_ocp_if omap3_l4_core__uart2 = {
278 .slave = &omap3xxx_uart2_hwmod, 261 .slave = &omap3xxx_uart2_hwmod,
279 .clk = "uart2_ick", 262 .clk = "uart2_ick",
280 .addr = omap3xxx_uart2_addr_space, 263 .addr = omap3xxx_uart2_addr_space,
281 .addr_cnt = ARRAY_SIZE(omap3xxx_uart2_addr_space),
282 .user = OCP_USER_MPU | OCP_USER_SDMA, 264 .user = OCP_USER_MPU | OCP_USER_SDMA,
283}; 265};
284 266
@@ -289,6 +271,7 @@ static struct omap_hwmod_addr_space omap3xxx_uart3_addr_space[] = {
289 .pa_end = OMAP3_UART3_BASE + SZ_1K - 1, 271 .pa_end = OMAP3_UART3_BASE + SZ_1K - 1,
290 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT, 272 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
291 }, 273 },
274 { }
292}; 275};
293 276
294static struct omap_hwmod_ocp_if omap3_l4_per__uart3 = { 277static struct omap_hwmod_ocp_if omap3_l4_per__uart3 = {
@@ -296,7 +279,6 @@ static struct omap_hwmod_ocp_if omap3_l4_per__uart3 = {
296 .slave = &omap3xxx_uart3_hwmod, 279 .slave = &omap3xxx_uart3_hwmod,
297 .clk = "uart3_ick", 280 .clk = "uart3_ick",
298 .addr = omap3xxx_uart3_addr_space, 281 .addr = omap3xxx_uart3_addr_space,
299 .addr_cnt = ARRAY_SIZE(omap3xxx_uart3_addr_space),
300 .user = OCP_USER_MPU | OCP_USER_SDMA, 282 .user = OCP_USER_MPU | OCP_USER_SDMA,
301}; 283};
302 284
@@ -307,6 +289,7 @@ static struct omap_hwmod_addr_space omap3xxx_uart4_addr_space[] = {
307 .pa_end = OMAP3_UART4_BASE + SZ_1K - 1, 289 .pa_end = OMAP3_UART4_BASE + SZ_1K - 1,
308 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT, 290 .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
309 }, 291 },
292 { }
310}; 293};
311 294
312static struct omap_hwmod_ocp_if omap3_l4_per__uart4 = { 295static struct omap_hwmod_ocp_if omap3_l4_per__uart4 = {
@@ -314,28 +297,15 @@ static struct omap_hwmod_ocp_if omap3_l4_per__uart4 = {
314 .slave = &omap3xxx_uart4_hwmod, 297 .slave = &omap3xxx_uart4_hwmod,
315 .clk = "uart4_ick", 298 .clk = "uart4_ick",
316 .addr = omap3xxx_uart4_addr_space, 299 .addr = omap3xxx_uart4_addr_space,
317 .addr_cnt = ARRAY_SIZE(omap3xxx_uart4_addr_space),
318 .user = OCP_USER_MPU | OCP_USER_SDMA, 300 .user = OCP_USER_MPU | OCP_USER_SDMA,
319}; 301};
320 302
321/* I2C IP block address space length (in bytes) */
322#define OMAP2_I2C_AS_LEN 128
323
324/* L4 CORE -> I2C1 interface */ 303/* L4 CORE -> I2C1 interface */
325static struct omap_hwmod_addr_space omap3xxx_i2c1_addr_space[] = {
326 {
327 .pa_start = 0x48070000,
328 .pa_end = 0x48070000 + OMAP2_I2C_AS_LEN - 1,
329 .flags = ADDR_TYPE_RT,
330 },
331};
332
333static struct omap_hwmod_ocp_if omap3_l4_core__i2c1 = { 304static struct omap_hwmod_ocp_if omap3_l4_core__i2c1 = {
334 .master = &omap3xxx_l4_core_hwmod, 305 .master = &omap3xxx_l4_core_hwmod,
335 .slave = &omap3xxx_i2c1_hwmod, 306 .slave = &omap3xxx_i2c1_hwmod,
336 .clk = "i2c1_ick", 307 .clk = "i2c1_ick",
337 .addr = omap3xxx_i2c1_addr_space, 308 .addr = omap2_i2c1_addr_space,
338 .addr_cnt = ARRAY_SIZE(omap3xxx_i2c1_addr_space),
339 .fw = { 309 .fw = {
340 .omap2 = { 310 .omap2 = {
341 .l4_fw_region = OMAP3_L4_CORE_FW_I2C1_REGION, 311 .l4_fw_region = OMAP3_L4_CORE_FW_I2C1_REGION,
@@ -347,20 +317,11 @@ static struct omap_hwmod_ocp_if omap3_l4_core__i2c1 = {
347}; 317};
348 318
349/* L4 CORE -> I2C2 interface */ 319/* L4 CORE -> I2C2 interface */
350static struct omap_hwmod_addr_space omap3xxx_i2c2_addr_space[] = {
351 {
352 .pa_start = 0x48072000,
353 .pa_end = 0x48072000 + OMAP2_I2C_AS_LEN - 1,
354 .flags = ADDR_TYPE_RT,
355 },
356};
357
358static struct omap_hwmod_ocp_if omap3_l4_core__i2c2 = { 320static struct omap_hwmod_ocp_if omap3_l4_core__i2c2 = {
359 .master = &omap3xxx_l4_core_hwmod, 321 .master = &omap3xxx_l4_core_hwmod,
360 .slave = &omap3xxx_i2c2_hwmod, 322 .slave = &omap3xxx_i2c2_hwmod,
361 .clk = "i2c2_ick", 323 .clk = "i2c2_ick",
362 .addr = omap3xxx_i2c2_addr_space, 324 .addr = omap2_i2c2_addr_space,
363 .addr_cnt = ARRAY_SIZE(omap3xxx_i2c2_addr_space),
364 .fw = { 325 .fw = {
365 .omap2 = { 326 .omap2 = {
366 .l4_fw_region = OMAP3_L4_CORE_FW_I2C2_REGION, 327 .l4_fw_region = OMAP3_L4_CORE_FW_I2C2_REGION,
@@ -375,9 +336,10 @@ static struct omap_hwmod_ocp_if omap3_l4_core__i2c2 = {
375static struct omap_hwmod_addr_space omap3xxx_i2c3_addr_space[] = { 336static struct omap_hwmod_addr_space omap3xxx_i2c3_addr_space[] = {
376 { 337 {
377 .pa_start = 0x48060000, 338 .pa_start = 0x48060000,
378 .pa_end = 0x48060000 + OMAP2_I2C_AS_LEN - 1, 339 .pa_end = 0x48060000 + SZ_128 - 1,
379 .flags = ADDR_TYPE_RT, 340 .flags = ADDR_TYPE_RT,
380 }, 341 },
342 { }
381}; 343};
382 344
383static struct omap_hwmod_ocp_if omap3_l4_core__i2c3 = { 345static struct omap_hwmod_ocp_if omap3_l4_core__i2c3 = {
@@ -385,7 +347,6 @@ static struct omap_hwmod_ocp_if omap3_l4_core__i2c3 = {
385 .slave = &omap3xxx_i2c3_hwmod, 347 .slave = &omap3xxx_i2c3_hwmod,
386 .clk = "i2c3_ick", 348 .clk = "i2c3_ick",
387 .addr = omap3xxx_i2c3_addr_space, 349 .addr = omap3xxx_i2c3_addr_space,
388 .addr_cnt = ARRAY_SIZE(omap3xxx_i2c3_addr_space),
389 .fw = { 350 .fw = {
390 .omap2 = { 351 .omap2 = {
391 .l4_fw_region = OMAP3_L4_CORE_FW_I2C3_REGION, 352 .l4_fw_region = OMAP3_L4_CORE_FW_I2C3_REGION,
@@ -403,6 +364,7 @@ static struct omap_hwmod_addr_space omap3_sr1_addr_space[] = {
403 .pa_end = OMAP34XX_SR1_BASE + SZ_1K - 1, 364 .pa_end = OMAP34XX_SR1_BASE + SZ_1K - 1,
404 .flags = ADDR_TYPE_RT, 365 .flags = ADDR_TYPE_RT,
405 }, 366 },
367 { }
406}; 368};
407 369
408static struct omap_hwmod_ocp_if omap3_l4_core__sr1 = { 370static struct omap_hwmod_ocp_if omap3_l4_core__sr1 = {
@@ -410,7 +372,6 @@ static struct omap_hwmod_ocp_if omap3_l4_core__sr1 = {
410 .slave = &omap34xx_sr1_hwmod, 372 .slave = &omap34xx_sr1_hwmod,
411 .clk = "sr_l4_ick", 373 .clk = "sr_l4_ick",
412 .addr = omap3_sr1_addr_space, 374 .addr = omap3_sr1_addr_space,
413 .addr_cnt = ARRAY_SIZE(omap3_sr1_addr_space),
414 .user = OCP_USER_MPU, 375 .user = OCP_USER_MPU,
415}; 376};
416 377
@@ -421,6 +382,7 @@ static struct omap_hwmod_addr_space omap3_sr2_addr_space[] = {
421 .pa_end = OMAP34XX_SR2_BASE + SZ_1K - 1, 382 .pa_end = OMAP34XX_SR2_BASE + SZ_1K - 1,
422 .flags = ADDR_TYPE_RT, 383 .flags = ADDR_TYPE_RT,
423 }, 384 },
385 { }
424}; 386};
425 387
426static struct omap_hwmod_ocp_if omap3_l4_core__sr2 = { 388static struct omap_hwmod_ocp_if omap3_l4_core__sr2 = {
@@ -428,7 +390,6 @@ static struct omap_hwmod_ocp_if omap3_l4_core__sr2 = {
428 .slave = &omap34xx_sr2_hwmod, 390 .slave = &omap34xx_sr2_hwmod,
429 .clk = "sr_l4_ick", 391 .clk = "sr_l4_ick",
430 .addr = omap3_sr2_addr_space, 392 .addr = omap3_sr2_addr_space,
431 .addr_cnt = ARRAY_SIZE(omap3_sr2_addr_space),
432 .user = OCP_USER_MPU, 393 .user = OCP_USER_MPU,
433}; 394};
434 395
@@ -442,6 +403,7 @@ static struct omap_hwmod_addr_space omap3xxx_usbhsotg_addrs[] = {
442 .pa_end = OMAP34XX_HSUSB_OTG_BASE + SZ_4K - 1, 403 .pa_end = OMAP34XX_HSUSB_OTG_BASE + SZ_4K - 1,
443 .flags = ADDR_TYPE_RT 404 .flags = ADDR_TYPE_RT
444 }, 405 },
406 { }
445}; 407};
446 408
447/* l4_core -> usbhsotg */ 409/* l4_core -> usbhsotg */
@@ -450,7 +412,6 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_core__usbhsotg = {
450 .slave = &omap3xxx_usbhsotg_hwmod, 412 .slave = &omap3xxx_usbhsotg_hwmod,
451 .clk = "l4_ick", 413 .clk = "l4_ick",
452 .addr = omap3xxx_usbhsotg_addrs, 414 .addr = omap3xxx_usbhsotg_addrs,
453 .addr_cnt = ARRAY_SIZE(omap3xxx_usbhsotg_addrs),
454 .user = OCP_USER_MPU, 415 .user = OCP_USER_MPU,
455}; 416};
456 417
@@ -468,6 +429,7 @@ static struct omap_hwmod_addr_space am35xx_usbhsotg_addrs[] = {
468 .pa_end = AM35XX_IPSS_USBOTGSS_BASE + SZ_4K - 1, 429 .pa_end = AM35XX_IPSS_USBOTGSS_BASE + SZ_4K - 1,
469 .flags = ADDR_TYPE_RT 430 .flags = ADDR_TYPE_RT
470 }, 431 },
432 { }
471}; 433};
472 434
473/* l4_core -> usbhsotg */ 435/* l4_core -> usbhsotg */
@@ -476,7 +438,6 @@ static struct omap_hwmod_ocp_if am35xx_l4_core__usbhsotg = {
476 .slave = &am35xx_usbhsotg_hwmod, 438 .slave = &am35xx_usbhsotg_hwmod,
477 .clk = "l4_ick", 439 .clk = "l4_ick",
478 .addr = am35xx_usbhsotg_addrs, 440 .addr = am35xx_usbhsotg_addrs,
479 .addr_cnt = ARRAY_SIZE(am35xx_usbhsotg_addrs),
480 .user = OCP_USER_MPU, 441 .user = OCP_USER_MPU,
481}; 442};
482 443
@@ -611,9 +572,6 @@ static struct omap_hwmod_class omap3xxx_timer_hwmod_class = {
611 572
612/* timer1 */ 573/* timer1 */
613static struct omap_hwmod omap3xxx_timer1_hwmod; 574static struct omap_hwmod omap3xxx_timer1_hwmod;
614static struct omap_hwmod_irq_info omap3xxx_timer1_mpu_irqs[] = {
615 { .irq = 37, },
616};
617 575
618static struct omap_hwmod_addr_space omap3xxx_timer1_addrs[] = { 576static struct omap_hwmod_addr_space omap3xxx_timer1_addrs[] = {
619 { 577 {
@@ -621,6 +579,7 @@ static struct omap_hwmod_addr_space omap3xxx_timer1_addrs[] = {
621 .pa_end = 0x48318000 + SZ_1K - 1, 579 .pa_end = 0x48318000 + SZ_1K - 1,
622 .flags = ADDR_TYPE_RT 580 .flags = ADDR_TYPE_RT
623 }, 581 },
582 { }
624}; 583};
625 584
626/* l4_wkup -> timer1 */ 585/* l4_wkup -> timer1 */
@@ -629,7 +588,6 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__timer1 = {
629 .slave = &omap3xxx_timer1_hwmod, 588 .slave = &omap3xxx_timer1_hwmod,
630 .clk = "gpt1_ick", 589 .clk = "gpt1_ick",
631 .addr = omap3xxx_timer1_addrs, 590 .addr = omap3xxx_timer1_addrs,
632 .addr_cnt = ARRAY_SIZE(omap3xxx_timer1_addrs),
633 .user = OCP_USER_MPU | OCP_USER_SDMA, 591 .user = OCP_USER_MPU | OCP_USER_SDMA,
634}; 592};
635 593
@@ -641,8 +599,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_timer1_slaves[] = {
641/* timer1 hwmod */ 599/* timer1 hwmod */
642static struct omap_hwmod omap3xxx_timer1_hwmod = { 600static struct omap_hwmod omap3xxx_timer1_hwmod = {
643 .name = "timer1", 601 .name = "timer1",
644 .mpu_irqs = omap3xxx_timer1_mpu_irqs, 602 .mpu_irqs = omap2_timer1_mpu_irqs,
645 .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_timer1_mpu_irqs),
646 .main_clk = "gpt1_fck", 603 .main_clk = "gpt1_fck",
647 .prcm = { 604 .prcm = {
648 .omap2 = { 605 .omap2 = {
@@ -661,9 +618,6 @@ static struct omap_hwmod omap3xxx_timer1_hwmod = {
661 618
662/* timer2 */ 619/* timer2 */
663static struct omap_hwmod omap3xxx_timer2_hwmod; 620static struct omap_hwmod omap3xxx_timer2_hwmod;
664static struct omap_hwmod_irq_info omap3xxx_timer2_mpu_irqs[] = {
665 { .irq = 38, },
666};
667 621
668static struct omap_hwmod_addr_space omap3xxx_timer2_addrs[] = { 622static struct omap_hwmod_addr_space omap3xxx_timer2_addrs[] = {
669 { 623 {
@@ -671,6 +625,7 @@ static struct omap_hwmod_addr_space omap3xxx_timer2_addrs[] = {
671 .pa_end = 0x49032000 + SZ_1K - 1, 625 .pa_end = 0x49032000 + SZ_1K - 1,
672 .flags = ADDR_TYPE_RT 626 .flags = ADDR_TYPE_RT
673 }, 627 },
628 { }
674}; 629};
675 630
676/* l4_per -> timer2 */ 631/* l4_per -> timer2 */
@@ -679,7 +634,6 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer2 = {
679 .slave = &omap3xxx_timer2_hwmod, 634 .slave = &omap3xxx_timer2_hwmod,
680 .clk = "gpt2_ick", 635 .clk = "gpt2_ick",
681 .addr = omap3xxx_timer2_addrs, 636 .addr = omap3xxx_timer2_addrs,
682 .addr_cnt = ARRAY_SIZE(omap3xxx_timer2_addrs),
683 .user = OCP_USER_MPU | OCP_USER_SDMA, 637 .user = OCP_USER_MPU | OCP_USER_SDMA,
684}; 638};
685 639
@@ -691,8 +645,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_timer2_slaves[] = {
691/* timer2 hwmod */ 645/* timer2 hwmod */
692static struct omap_hwmod omap3xxx_timer2_hwmod = { 646static struct omap_hwmod omap3xxx_timer2_hwmod = {
693 .name = "timer2", 647 .name = "timer2",
694 .mpu_irqs = omap3xxx_timer2_mpu_irqs, 648 .mpu_irqs = omap2_timer2_mpu_irqs,
695 .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_timer2_mpu_irqs),
696 .main_clk = "gpt2_fck", 649 .main_clk = "gpt2_fck",
697 .prcm = { 650 .prcm = {
698 .omap2 = { 651 .omap2 = {
@@ -711,9 +664,6 @@ static struct omap_hwmod omap3xxx_timer2_hwmod = {
711 664
712/* timer3 */ 665/* timer3 */
713static struct omap_hwmod omap3xxx_timer3_hwmod; 666static struct omap_hwmod omap3xxx_timer3_hwmod;
714static struct omap_hwmod_irq_info omap3xxx_timer3_mpu_irqs[] = {
715 { .irq = 39, },
716};
717 667
718static struct omap_hwmod_addr_space omap3xxx_timer3_addrs[] = { 668static struct omap_hwmod_addr_space omap3xxx_timer3_addrs[] = {
719 { 669 {
@@ -721,6 +671,7 @@ static struct omap_hwmod_addr_space omap3xxx_timer3_addrs[] = {
721 .pa_end = 0x49034000 + SZ_1K - 1, 671 .pa_end = 0x49034000 + SZ_1K - 1,
722 .flags = ADDR_TYPE_RT 672 .flags = ADDR_TYPE_RT
723 }, 673 },
674 { }
724}; 675};
725 676
726/* l4_per -> timer3 */ 677/* l4_per -> timer3 */
@@ -729,7 +680,6 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer3 = {
729 .slave = &omap3xxx_timer3_hwmod, 680 .slave = &omap3xxx_timer3_hwmod,
730 .clk = "gpt3_ick", 681 .clk = "gpt3_ick",
731 .addr = omap3xxx_timer3_addrs, 682 .addr = omap3xxx_timer3_addrs,
732 .addr_cnt = ARRAY_SIZE(omap3xxx_timer3_addrs),
733 .user = OCP_USER_MPU | OCP_USER_SDMA, 683 .user = OCP_USER_MPU | OCP_USER_SDMA,
734}; 684};
735 685
@@ -741,8 +691,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_timer3_slaves[] = {
741/* timer3 hwmod */ 691/* timer3 hwmod */
742static struct omap_hwmod omap3xxx_timer3_hwmod = { 692static struct omap_hwmod omap3xxx_timer3_hwmod = {
743 .name = "timer3", 693 .name = "timer3",
744 .mpu_irqs = omap3xxx_timer3_mpu_irqs, 694 .mpu_irqs = omap2_timer3_mpu_irqs,
745 .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_timer3_mpu_irqs),
746 .main_clk = "gpt3_fck", 695 .main_clk = "gpt3_fck",
747 .prcm = { 696 .prcm = {
748 .omap2 = { 697 .omap2 = {
@@ -761,9 +710,6 @@ static struct omap_hwmod omap3xxx_timer3_hwmod = {
761 710
762/* timer4 */ 711/* timer4 */
763static struct omap_hwmod omap3xxx_timer4_hwmod; 712static struct omap_hwmod omap3xxx_timer4_hwmod;
764static struct omap_hwmod_irq_info omap3xxx_timer4_mpu_irqs[] = {
765 { .irq = 40, },
766};
767 713
768static struct omap_hwmod_addr_space omap3xxx_timer4_addrs[] = { 714static struct omap_hwmod_addr_space omap3xxx_timer4_addrs[] = {
769 { 715 {
@@ -771,6 +717,7 @@ static struct omap_hwmod_addr_space omap3xxx_timer4_addrs[] = {
771 .pa_end = 0x49036000 + SZ_1K - 1, 717 .pa_end = 0x49036000 + SZ_1K - 1,
772 .flags = ADDR_TYPE_RT 718 .flags = ADDR_TYPE_RT
773 }, 719 },
720 { }
774}; 721};
775 722
776/* l4_per -> timer4 */ 723/* l4_per -> timer4 */
@@ -779,7 +726,6 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer4 = {
779 .slave = &omap3xxx_timer4_hwmod, 726 .slave = &omap3xxx_timer4_hwmod,
780 .clk = "gpt4_ick", 727 .clk = "gpt4_ick",
781 .addr = omap3xxx_timer4_addrs, 728 .addr = omap3xxx_timer4_addrs,
782 .addr_cnt = ARRAY_SIZE(omap3xxx_timer4_addrs),
783 .user = OCP_USER_MPU | OCP_USER_SDMA, 729 .user = OCP_USER_MPU | OCP_USER_SDMA,
784}; 730};
785 731
@@ -791,8 +737,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_timer4_slaves[] = {
791/* timer4 hwmod */ 737/* timer4 hwmod */
792static struct omap_hwmod omap3xxx_timer4_hwmod = { 738static struct omap_hwmod omap3xxx_timer4_hwmod = {
793 .name = "timer4", 739 .name = "timer4",
794 .mpu_irqs = omap3xxx_timer4_mpu_irqs, 740 .mpu_irqs = omap2_timer4_mpu_irqs,
795 .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_timer4_mpu_irqs),
796 .main_clk = "gpt4_fck", 741 .main_clk = "gpt4_fck",
797 .prcm = { 742 .prcm = {
798 .omap2 = { 743 .omap2 = {
@@ -811,9 +756,6 @@ static struct omap_hwmod omap3xxx_timer4_hwmod = {
811 756
812/* timer5 */ 757/* timer5 */
813static struct omap_hwmod omap3xxx_timer5_hwmod; 758static struct omap_hwmod omap3xxx_timer5_hwmod;
814static struct omap_hwmod_irq_info omap3xxx_timer5_mpu_irqs[] = {
815 { .irq = 41, },
816};
817 759
818static struct omap_hwmod_addr_space omap3xxx_timer5_addrs[] = { 760static struct omap_hwmod_addr_space omap3xxx_timer5_addrs[] = {
819 { 761 {
@@ -821,6 +763,7 @@ static struct omap_hwmod_addr_space omap3xxx_timer5_addrs[] = {
821 .pa_end = 0x49038000 + SZ_1K - 1, 763 .pa_end = 0x49038000 + SZ_1K - 1,
822 .flags = ADDR_TYPE_RT 764 .flags = ADDR_TYPE_RT
823 }, 765 },
766 { }
824}; 767};
825 768
826/* l4_per -> timer5 */ 769/* l4_per -> timer5 */
@@ -829,7 +772,6 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer5 = {
829 .slave = &omap3xxx_timer5_hwmod, 772 .slave = &omap3xxx_timer5_hwmod,
830 .clk = "gpt5_ick", 773 .clk = "gpt5_ick",
831 .addr = omap3xxx_timer5_addrs, 774 .addr = omap3xxx_timer5_addrs,
832 .addr_cnt = ARRAY_SIZE(omap3xxx_timer5_addrs),
833 .user = OCP_USER_MPU | OCP_USER_SDMA, 775 .user = OCP_USER_MPU | OCP_USER_SDMA,
834}; 776};
835 777
@@ -841,8 +783,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_timer5_slaves[] = {
841/* timer5 hwmod */ 783/* timer5 hwmod */
842static struct omap_hwmod omap3xxx_timer5_hwmod = { 784static struct omap_hwmod omap3xxx_timer5_hwmod = {
843 .name = "timer5", 785 .name = "timer5",
844 .mpu_irqs = omap3xxx_timer5_mpu_irqs, 786 .mpu_irqs = omap2_timer5_mpu_irqs,
845 .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_timer5_mpu_irqs),
846 .main_clk = "gpt5_fck", 787 .main_clk = "gpt5_fck",
847 .prcm = { 788 .prcm = {
848 .omap2 = { 789 .omap2 = {
@@ -861,9 +802,6 @@ static struct omap_hwmod omap3xxx_timer5_hwmod = {
861 802
862/* timer6 */ 803/* timer6 */
863static struct omap_hwmod omap3xxx_timer6_hwmod; 804static struct omap_hwmod omap3xxx_timer6_hwmod;
864static struct omap_hwmod_irq_info omap3xxx_timer6_mpu_irqs[] = {
865 { .irq = 42, },
866};
867 805
868static struct omap_hwmod_addr_space omap3xxx_timer6_addrs[] = { 806static struct omap_hwmod_addr_space omap3xxx_timer6_addrs[] = {
869 { 807 {
@@ -871,6 +809,7 @@ static struct omap_hwmod_addr_space omap3xxx_timer6_addrs[] = {
871 .pa_end = 0x4903A000 + SZ_1K - 1, 809 .pa_end = 0x4903A000 + SZ_1K - 1,
872 .flags = ADDR_TYPE_RT 810 .flags = ADDR_TYPE_RT
873 }, 811 },
812 { }
874}; 813};
875 814
876/* l4_per -> timer6 */ 815/* l4_per -> timer6 */
@@ -879,7 +818,6 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer6 = {
879 .slave = &omap3xxx_timer6_hwmod, 818 .slave = &omap3xxx_timer6_hwmod,
880 .clk = "gpt6_ick", 819 .clk = "gpt6_ick",
881 .addr = omap3xxx_timer6_addrs, 820 .addr = omap3xxx_timer6_addrs,
882 .addr_cnt = ARRAY_SIZE(omap3xxx_timer6_addrs),
883 .user = OCP_USER_MPU | OCP_USER_SDMA, 821 .user = OCP_USER_MPU | OCP_USER_SDMA,
884}; 822};
885 823
@@ -891,8 +829,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_timer6_slaves[] = {
891/* timer6 hwmod */ 829/* timer6 hwmod */
892static struct omap_hwmod omap3xxx_timer6_hwmod = { 830static struct omap_hwmod omap3xxx_timer6_hwmod = {
893 .name = "timer6", 831 .name = "timer6",
894 .mpu_irqs = omap3xxx_timer6_mpu_irqs, 832 .mpu_irqs = omap2_timer6_mpu_irqs,
895 .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_timer6_mpu_irqs),
896 .main_clk = "gpt6_fck", 833 .main_clk = "gpt6_fck",
897 .prcm = { 834 .prcm = {
898 .omap2 = { 835 .omap2 = {
@@ -911,9 +848,6 @@ static struct omap_hwmod omap3xxx_timer6_hwmod = {
911 848
912/* timer7 */ 849/* timer7 */
913static struct omap_hwmod omap3xxx_timer7_hwmod; 850static struct omap_hwmod omap3xxx_timer7_hwmod;
914static struct omap_hwmod_irq_info omap3xxx_timer7_mpu_irqs[] = {
915 { .irq = 43, },
916};
917 851
918static struct omap_hwmod_addr_space omap3xxx_timer7_addrs[] = { 852static struct omap_hwmod_addr_space omap3xxx_timer7_addrs[] = {
919 { 853 {
@@ -921,6 +855,7 @@ static struct omap_hwmod_addr_space omap3xxx_timer7_addrs[] = {
921 .pa_end = 0x4903C000 + SZ_1K - 1, 855 .pa_end = 0x4903C000 + SZ_1K - 1,
922 .flags = ADDR_TYPE_RT 856 .flags = ADDR_TYPE_RT
923 }, 857 },
858 { }
924}; 859};
925 860
926/* l4_per -> timer7 */ 861/* l4_per -> timer7 */
@@ -929,7 +864,6 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer7 = {
929 .slave = &omap3xxx_timer7_hwmod, 864 .slave = &omap3xxx_timer7_hwmod,
930 .clk = "gpt7_ick", 865 .clk = "gpt7_ick",
931 .addr = omap3xxx_timer7_addrs, 866 .addr = omap3xxx_timer7_addrs,
932 .addr_cnt = ARRAY_SIZE(omap3xxx_timer7_addrs),
933 .user = OCP_USER_MPU | OCP_USER_SDMA, 867 .user = OCP_USER_MPU | OCP_USER_SDMA,
934}; 868};
935 869
@@ -941,8 +875,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_timer7_slaves[] = {
941/* timer7 hwmod */ 875/* timer7 hwmod */
942static struct omap_hwmod omap3xxx_timer7_hwmod = { 876static struct omap_hwmod omap3xxx_timer7_hwmod = {
943 .name = "timer7", 877 .name = "timer7",
944 .mpu_irqs = omap3xxx_timer7_mpu_irqs, 878 .mpu_irqs = omap2_timer7_mpu_irqs,
945 .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_timer7_mpu_irqs),
946 .main_clk = "gpt7_fck", 879 .main_clk = "gpt7_fck",
947 .prcm = { 880 .prcm = {
948 .omap2 = { 881 .omap2 = {
@@ -961,9 +894,6 @@ static struct omap_hwmod omap3xxx_timer7_hwmod = {
961 894
962/* timer8 */ 895/* timer8 */
963static struct omap_hwmod omap3xxx_timer8_hwmod; 896static struct omap_hwmod omap3xxx_timer8_hwmod;
964static struct omap_hwmod_irq_info omap3xxx_timer8_mpu_irqs[] = {
965 { .irq = 44, },
966};
967 897
968static struct omap_hwmod_addr_space omap3xxx_timer8_addrs[] = { 898static struct omap_hwmod_addr_space omap3xxx_timer8_addrs[] = {
969 { 899 {
@@ -971,6 +901,7 @@ static struct omap_hwmod_addr_space omap3xxx_timer8_addrs[] = {
971 .pa_end = 0x4903E000 + SZ_1K - 1, 901 .pa_end = 0x4903E000 + SZ_1K - 1,
972 .flags = ADDR_TYPE_RT 902 .flags = ADDR_TYPE_RT
973 }, 903 },
904 { }
974}; 905};
975 906
976/* l4_per -> timer8 */ 907/* l4_per -> timer8 */
@@ -979,7 +910,6 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer8 = {
979 .slave = &omap3xxx_timer8_hwmod, 910 .slave = &omap3xxx_timer8_hwmod,
980 .clk = "gpt8_ick", 911 .clk = "gpt8_ick",
981 .addr = omap3xxx_timer8_addrs, 912 .addr = omap3xxx_timer8_addrs,
982 .addr_cnt = ARRAY_SIZE(omap3xxx_timer8_addrs),
983 .user = OCP_USER_MPU | OCP_USER_SDMA, 913 .user = OCP_USER_MPU | OCP_USER_SDMA,
984}; 914};
985 915
@@ -991,8 +921,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_timer8_slaves[] = {
991/* timer8 hwmod */ 921/* timer8 hwmod */
992static struct omap_hwmod omap3xxx_timer8_hwmod = { 922static struct omap_hwmod omap3xxx_timer8_hwmod = {
993 .name = "timer8", 923 .name = "timer8",
994 .mpu_irqs = omap3xxx_timer8_mpu_irqs, 924 .mpu_irqs = omap2_timer8_mpu_irqs,
995 .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_timer8_mpu_irqs),
996 .main_clk = "gpt8_fck", 925 .main_clk = "gpt8_fck",
997 .prcm = { 926 .prcm = {
998 .omap2 = { 927 .omap2 = {
@@ -1011,9 +940,6 @@ static struct omap_hwmod omap3xxx_timer8_hwmod = {
1011 940
1012/* timer9 */ 941/* timer9 */
1013static struct omap_hwmod omap3xxx_timer9_hwmod; 942static struct omap_hwmod omap3xxx_timer9_hwmod;
1014static struct omap_hwmod_irq_info omap3xxx_timer9_mpu_irqs[] = {
1015 { .irq = 45, },
1016};
1017 943
1018static struct omap_hwmod_addr_space omap3xxx_timer9_addrs[] = { 944static struct omap_hwmod_addr_space omap3xxx_timer9_addrs[] = {
1019 { 945 {
@@ -1021,6 +947,7 @@ static struct omap_hwmod_addr_space omap3xxx_timer9_addrs[] = {
1021 .pa_end = 0x49040000 + SZ_1K - 1, 947 .pa_end = 0x49040000 + SZ_1K - 1,
1022 .flags = ADDR_TYPE_RT 948 .flags = ADDR_TYPE_RT
1023 }, 949 },
950 { }
1024}; 951};
1025 952
1026/* l4_per -> timer9 */ 953/* l4_per -> timer9 */
@@ -1029,7 +956,6 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_per__timer9 = {
1029 .slave = &omap3xxx_timer9_hwmod, 956 .slave = &omap3xxx_timer9_hwmod,
1030 .clk = "gpt9_ick", 957 .clk = "gpt9_ick",
1031 .addr = omap3xxx_timer9_addrs, 958 .addr = omap3xxx_timer9_addrs,
1032 .addr_cnt = ARRAY_SIZE(omap3xxx_timer9_addrs),
1033 .user = OCP_USER_MPU | OCP_USER_SDMA, 959 .user = OCP_USER_MPU | OCP_USER_SDMA,
1034}; 960};
1035 961
@@ -1041,8 +967,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_timer9_slaves[] = {
1041/* timer9 hwmod */ 967/* timer9 hwmod */
1042static struct omap_hwmod omap3xxx_timer9_hwmod = { 968static struct omap_hwmod omap3xxx_timer9_hwmod = {
1043 .name = "timer9", 969 .name = "timer9",
1044 .mpu_irqs = omap3xxx_timer9_mpu_irqs, 970 .mpu_irqs = omap2_timer9_mpu_irqs,
1045 .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_timer9_mpu_irqs),
1046 .main_clk = "gpt9_fck", 971 .main_clk = "gpt9_fck",
1047 .prcm = { 972 .prcm = {
1048 .omap2 = { 973 .omap2 = {
@@ -1061,25 +986,13 @@ static struct omap_hwmod omap3xxx_timer9_hwmod = {
1061 986
1062/* timer10 */ 987/* timer10 */
1063static struct omap_hwmod omap3xxx_timer10_hwmod; 988static struct omap_hwmod omap3xxx_timer10_hwmod;
1064static struct omap_hwmod_irq_info omap3xxx_timer10_mpu_irqs[] = {
1065 { .irq = 46, },
1066};
1067
1068static struct omap_hwmod_addr_space omap3xxx_timer10_addrs[] = {
1069 {
1070 .pa_start = 0x48086000,
1071 .pa_end = 0x48086000 + SZ_1K - 1,
1072 .flags = ADDR_TYPE_RT
1073 },
1074};
1075 989
1076/* l4_core -> timer10 */ 990/* l4_core -> timer10 */
1077static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer10 = { 991static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer10 = {
1078 .master = &omap3xxx_l4_core_hwmod, 992 .master = &omap3xxx_l4_core_hwmod,
1079 .slave = &omap3xxx_timer10_hwmod, 993 .slave = &omap3xxx_timer10_hwmod,
1080 .clk = "gpt10_ick", 994 .clk = "gpt10_ick",
1081 .addr = omap3xxx_timer10_addrs, 995 .addr = omap2_timer10_addrs,
1082 .addr_cnt = ARRAY_SIZE(omap3xxx_timer10_addrs),
1083 .user = OCP_USER_MPU | OCP_USER_SDMA, 996 .user = OCP_USER_MPU | OCP_USER_SDMA,
1084}; 997};
1085 998
@@ -1091,8 +1004,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_timer10_slaves[] = {
1091/* timer10 hwmod */ 1004/* timer10 hwmod */
1092static struct omap_hwmod omap3xxx_timer10_hwmod = { 1005static struct omap_hwmod omap3xxx_timer10_hwmod = {
1093 .name = "timer10", 1006 .name = "timer10",
1094 .mpu_irqs = omap3xxx_timer10_mpu_irqs, 1007 .mpu_irqs = omap2_timer10_mpu_irqs,
1095 .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_timer10_mpu_irqs),
1096 .main_clk = "gpt10_fck", 1008 .main_clk = "gpt10_fck",
1097 .prcm = { 1009 .prcm = {
1098 .omap2 = { 1010 .omap2 = {
@@ -1111,25 +1023,13 @@ static struct omap_hwmod omap3xxx_timer10_hwmod = {
1111 1023
1112/* timer11 */ 1024/* timer11 */
1113static struct omap_hwmod omap3xxx_timer11_hwmod; 1025static struct omap_hwmod omap3xxx_timer11_hwmod;
1114static struct omap_hwmod_irq_info omap3xxx_timer11_mpu_irqs[] = {
1115 { .irq = 47, },
1116};
1117
1118static struct omap_hwmod_addr_space omap3xxx_timer11_addrs[] = {
1119 {
1120 .pa_start = 0x48088000,
1121 .pa_end = 0x48088000 + SZ_1K - 1,
1122 .flags = ADDR_TYPE_RT
1123 },
1124};
1125 1026
1126/* l4_core -> timer11 */ 1027/* l4_core -> timer11 */
1127static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer11 = { 1028static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer11 = {
1128 .master = &omap3xxx_l4_core_hwmod, 1029 .master = &omap3xxx_l4_core_hwmod,
1129 .slave = &omap3xxx_timer11_hwmod, 1030 .slave = &omap3xxx_timer11_hwmod,
1130 .clk = "gpt11_ick", 1031 .clk = "gpt11_ick",
1131 .addr = omap3xxx_timer11_addrs, 1032 .addr = omap2_timer11_addrs,
1132 .addr_cnt = ARRAY_SIZE(omap3xxx_timer11_addrs),
1133 .user = OCP_USER_MPU | OCP_USER_SDMA, 1033 .user = OCP_USER_MPU | OCP_USER_SDMA,
1134}; 1034};
1135 1035
@@ -1141,8 +1041,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_timer11_slaves[] = {
1141/* timer11 hwmod */ 1041/* timer11 hwmod */
1142static struct omap_hwmod omap3xxx_timer11_hwmod = { 1042static struct omap_hwmod omap3xxx_timer11_hwmod = {
1143 .name = "timer11", 1043 .name = "timer11",
1144 .mpu_irqs = omap3xxx_timer11_mpu_irqs, 1044 .mpu_irqs = omap2_timer11_mpu_irqs,
1145 .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_timer11_mpu_irqs),
1146 .main_clk = "gpt11_fck", 1045 .main_clk = "gpt11_fck",
1147 .prcm = { 1046 .prcm = {
1148 .omap2 = { 1047 .omap2 = {
@@ -1163,6 +1062,7 @@ static struct omap_hwmod omap3xxx_timer11_hwmod = {
1163static struct omap_hwmod omap3xxx_timer12_hwmod; 1062static struct omap_hwmod omap3xxx_timer12_hwmod;
1164static struct omap_hwmod_irq_info omap3xxx_timer12_mpu_irqs[] = { 1063static struct omap_hwmod_irq_info omap3xxx_timer12_mpu_irqs[] = {
1165 { .irq = 95, }, 1064 { .irq = 95, },
1065 { .irq = -1 }
1166}; 1066};
1167 1067
1168static struct omap_hwmod_addr_space omap3xxx_timer12_addrs[] = { 1068static struct omap_hwmod_addr_space omap3xxx_timer12_addrs[] = {
@@ -1171,6 +1071,7 @@ static struct omap_hwmod_addr_space omap3xxx_timer12_addrs[] = {
1171 .pa_end = 0x48304000 + SZ_1K - 1, 1071 .pa_end = 0x48304000 + SZ_1K - 1,
1172 .flags = ADDR_TYPE_RT 1072 .flags = ADDR_TYPE_RT
1173 }, 1073 },
1074 { }
1174}; 1075};
1175 1076
1176/* l4_core -> timer12 */ 1077/* l4_core -> timer12 */
@@ -1179,7 +1080,6 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_core__timer12 = {
1179 .slave = &omap3xxx_timer12_hwmod, 1080 .slave = &omap3xxx_timer12_hwmod,
1180 .clk = "gpt12_ick", 1081 .clk = "gpt12_ick",
1181 .addr = omap3xxx_timer12_addrs, 1082 .addr = omap3xxx_timer12_addrs,
1182 .addr_cnt = ARRAY_SIZE(omap3xxx_timer12_addrs),
1183 .user = OCP_USER_MPU | OCP_USER_SDMA, 1083 .user = OCP_USER_MPU | OCP_USER_SDMA,
1184}; 1084};
1185 1085
@@ -1192,7 +1092,6 @@ static struct omap_hwmod_ocp_if *omap3xxx_timer12_slaves[] = {
1192static struct omap_hwmod omap3xxx_timer12_hwmod = { 1092static struct omap_hwmod omap3xxx_timer12_hwmod = {
1193 .name = "timer12", 1093 .name = "timer12",
1194 .mpu_irqs = omap3xxx_timer12_mpu_irqs, 1094 .mpu_irqs = omap3xxx_timer12_mpu_irqs,
1195 .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_timer12_mpu_irqs),
1196 .main_clk = "gpt12_fck", 1095 .main_clk = "gpt12_fck",
1197 .prcm = { 1096 .prcm = {
1198 .omap2 = { 1097 .omap2 = {
@@ -1216,6 +1115,7 @@ static struct omap_hwmod_addr_space omap3xxx_wd_timer2_addrs[] = {
1216 .pa_end = 0x4831407f, 1115 .pa_end = 0x4831407f,
1217 .flags = ADDR_TYPE_RT 1116 .flags = ADDR_TYPE_RT
1218 }, 1117 },
1118 { }
1219}; 1119};
1220 1120
1221static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__wd_timer2 = { 1121static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__wd_timer2 = {
@@ -1223,7 +1123,6 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__wd_timer2 = {
1223 .slave = &omap3xxx_wd_timer2_hwmod, 1123 .slave = &omap3xxx_wd_timer2_hwmod,
1224 .clk = "wdt2_ick", 1124 .clk = "wdt2_ick",
1225 .addr = omap3xxx_wd_timer2_addrs, 1125 .addr = omap3xxx_wd_timer2_addrs,
1226 .addr_cnt = ARRAY_SIZE(omap3xxx_wd_timer2_addrs),
1227 .user = OCP_USER_MPU | OCP_USER_SDMA, 1126 .user = OCP_USER_MPU | OCP_USER_SDMA,
1228}; 1127};
1229 1128
@@ -1291,45 +1190,16 @@ static struct omap_hwmod omap3xxx_wd_timer2_hwmod = {
1291 .flags = HWMOD_SWSUP_SIDLE, 1190 .flags = HWMOD_SWSUP_SIDLE,
1292}; 1191};
1293 1192
1294/* UART common */
1295
1296static struct omap_hwmod_class_sysconfig uart_sysc = {
1297 .rev_offs = 0x50,
1298 .sysc_offs = 0x54,
1299 .syss_offs = 0x58,
1300 .sysc_flags = (SYSC_HAS_SIDLEMODE |
1301 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
1302 SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
1303 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1304 .sysc_fields = &omap_hwmod_sysc_type1,
1305};
1306
1307static struct omap_hwmod_class uart_class = {
1308 .name = "uart",
1309 .sysc = &uart_sysc,
1310};
1311
1312/* UART1 */ 1193/* UART1 */
1313 1194
1314static struct omap_hwmod_irq_info uart1_mpu_irqs[] = {
1315 { .irq = INT_24XX_UART1_IRQ, },
1316};
1317
1318static struct omap_hwmod_dma_info uart1_sdma_reqs[] = {
1319 { .name = "tx", .dma_req = OMAP24XX_DMA_UART1_TX, },
1320 { .name = "rx", .dma_req = OMAP24XX_DMA_UART1_RX, },
1321};
1322
1323static struct omap_hwmod_ocp_if *omap3xxx_uart1_slaves[] = { 1195static struct omap_hwmod_ocp_if *omap3xxx_uart1_slaves[] = {
1324 &omap3_l4_core__uart1, 1196 &omap3_l4_core__uart1,
1325}; 1197};
1326 1198
1327static struct omap_hwmod omap3xxx_uart1_hwmod = { 1199static struct omap_hwmod omap3xxx_uart1_hwmod = {
1328 .name = "uart1", 1200 .name = "uart1",
1329 .mpu_irqs = uart1_mpu_irqs, 1201 .mpu_irqs = omap2_uart1_mpu_irqs,
1330 .mpu_irqs_cnt = ARRAY_SIZE(uart1_mpu_irqs), 1202 .sdma_reqs = omap2_uart1_sdma_reqs,
1331 .sdma_reqs = uart1_sdma_reqs,
1332 .sdma_reqs_cnt = ARRAY_SIZE(uart1_sdma_reqs),
1333 .main_clk = "uart1_fck", 1203 .main_clk = "uart1_fck",
1334 .prcm = { 1204 .prcm = {
1335 .omap2 = { 1205 .omap2 = {
@@ -1342,31 +1212,20 @@ static struct omap_hwmod omap3xxx_uart1_hwmod = {
1342 }, 1212 },
1343 .slaves = omap3xxx_uart1_slaves, 1213 .slaves = omap3xxx_uart1_slaves,
1344 .slaves_cnt = ARRAY_SIZE(omap3xxx_uart1_slaves), 1214 .slaves_cnt = ARRAY_SIZE(omap3xxx_uart1_slaves),
1345 .class = &uart_class, 1215 .class = &omap2_uart_class,
1346 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430), 1216 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
1347}; 1217};
1348 1218
1349/* UART2 */ 1219/* UART2 */
1350 1220
1351static struct omap_hwmod_irq_info uart2_mpu_irqs[] = {
1352 { .irq = INT_24XX_UART2_IRQ, },
1353};
1354
1355static struct omap_hwmod_dma_info uart2_sdma_reqs[] = {
1356 { .name = "tx", .dma_req = OMAP24XX_DMA_UART2_TX, },
1357 { .name = "rx", .dma_req = OMAP24XX_DMA_UART2_RX, },
1358};
1359
1360static struct omap_hwmod_ocp_if *omap3xxx_uart2_slaves[] = { 1221static struct omap_hwmod_ocp_if *omap3xxx_uart2_slaves[] = {
1361 &omap3_l4_core__uart2, 1222 &omap3_l4_core__uart2,
1362}; 1223};
1363 1224
1364static struct omap_hwmod omap3xxx_uart2_hwmod = { 1225static struct omap_hwmod omap3xxx_uart2_hwmod = {
1365 .name = "uart2", 1226 .name = "uart2",
1366 .mpu_irqs = uart2_mpu_irqs, 1227 .mpu_irqs = omap2_uart2_mpu_irqs,
1367 .mpu_irqs_cnt = ARRAY_SIZE(uart2_mpu_irqs), 1228 .sdma_reqs = omap2_uart2_sdma_reqs,
1368 .sdma_reqs = uart2_sdma_reqs,
1369 .sdma_reqs_cnt = ARRAY_SIZE(uart2_sdma_reqs),
1370 .main_clk = "uart2_fck", 1229 .main_clk = "uart2_fck",
1371 .prcm = { 1230 .prcm = {
1372 .omap2 = { 1231 .omap2 = {
@@ -1379,31 +1238,20 @@ static struct omap_hwmod omap3xxx_uart2_hwmod = {
1379 }, 1238 },
1380 .slaves = omap3xxx_uart2_slaves, 1239 .slaves = omap3xxx_uart2_slaves,
1381 .slaves_cnt = ARRAY_SIZE(omap3xxx_uart2_slaves), 1240 .slaves_cnt = ARRAY_SIZE(omap3xxx_uart2_slaves),
1382 .class = &uart_class, 1241 .class = &omap2_uart_class,
1383 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430), 1242 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
1384}; 1243};
1385 1244
1386/* UART3 */ 1245/* UART3 */
1387 1246
1388static struct omap_hwmod_irq_info uart3_mpu_irqs[] = {
1389 { .irq = INT_24XX_UART3_IRQ, },
1390};
1391
1392static struct omap_hwmod_dma_info uart3_sdma_reqs[] = {
1393 { .name = "tx", .dma_req = OMAP24XX_DMA_UART3_TX, },
1394 { .name = "rx", .dma_req = OMAP24XX_DMA_UART3_RX, },
1395};
1396
1397static struct omap_hwmod_ocp_if *omap3xxx_uart3_slaves[] = { 1247static struct omap_hwmod_ocp_if *omap3xxx_uart3_slaves[] = {
1398 &omap3_l4_per__uart3, 1248 &omap3_l4_per__uart3,
1399}; 1249};
1400 1250
1401static struct omap_hwmod omap3xxx_uart3_hwmod = { 1251static struct omap_hwmod omap3xxx_uart3_hwmod = {
1402 .name = "uart3", 1252 .name = "uart3",
1403 .mpu_irqs = uart3_mpu_irqs, 1253 .mpu_irqs = omap2_uart3_mpu_irqs,
1404 .mpu_irqs_cnt = ARRAY_SIZE(uart3_mpu_irqs), 1254 .sdma_reqs = omap2_uart3_sdma_reqs,
1405 .sdma_reqs = uart3_sdma_reqs,
1406 .sdma_reqs_cnt = ARRAY_SIZE(uart3_sdma_reqs),
1407 .main_clk = "uart3_fck", 1255 .main_clk = "uart3_fck",
1408 .prcm = { 1256 .prcm = {
1409 .omap2 = { 1257 .omap2 = {
@@ -1416,7 +1264,7 @@ static struct omap_hwmod omap3xxx_uart3_hwmod = {
1416 }, 1264 },
1417 .slaves = omap3xxx_uart3_slaves, 1265 .slaves = omap3xxx_uart3_slaves,
1418 .slaves_cnt = ARRAY_SIZE(omap3xxx_uart3_slaves), 1266 .slaves_cnt = ARRAY_SIZE(omap3xxx_uart3_slaves),
1419 .class = &uart_class, 1267 .class = &omap2_uart_class,
1420 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430), 1268 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
1421}; 1269};
1422 1270
@@ -1424,11 +1272,13 @@ static struct omap_hwmod omap3xxx_uart3_hwmod = {
1424 1272
1425static struct omap_hwmod_irq_info uart4_mpu_irqs[] = { 1273static struct omap_hwmod_irq_info uart4_mpu_irqs[] = {
1426 { .irq = INT_36XX_UART4_IRQ, }, 1274 { .irq = INT_36XX_UART4_IRQ, },
1275 { .irq = -1 }
1427}; 1276};
1428 1277
1429static struct omap_hwmod_dma_info uart4_sdma_reqs[] = { 1278static struct omap_hwmod_dma_info uart4_sdma_reqs[] = {
1430 { .name = "rx", .dma_req = OMAP36XX_DMA_UART4_RX, }, 1279 { .name = "rx", .dma_req = OMAP36XX_DMA_UART4_RX, },
1431 { .name = "tx", .dma_req = OMAP36XX_DMA_UART4_TX, }, 1280 { .name = "tx", .dma_req = OMAP36XX_DMA_UART4_TX, },
1281 { .dma_req = -1 }
1432}; 1282};
1433 1283
1434static struct omap_hwmod_ocp_if *omap3xxx_uart4_slaves[] = { 1284static struct omap_hwmod_ocp_if *omap3xxx_uart4_slaves[] = {
@@ -1438,9 +1288,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_uart4_slaves[] = {
1438static struct omap_hwmod omap3xxx_uart4_hwmod = { 1288static struct omap_hwmod omap3xxx_uart4_hwmod = {
1439 .name = "uart4", 1289 .name = "uart4",
1440 .mpu_irqs = uart4_mpu_irqs, 1290 .mpu_irqs = uart4_mpu_irqs,
1441 .mpu_irqs_cnt = ARRAY_SIZE(uart4_mpu_irqs),
1442 .sdma_reqs = uart4_sdma_reqs, 1291 .sdma_reqs = uart4_sdma_reqs,
1443 .sdma_reqs_cnt = ARRAY_SIZE(uart4_sdma_reqs),
1444 .main_clk = "uart4_fck", 1292 .main_clk = "uart4_fck",
1445 .prcm = { 1293 .prcm = {
1446 .omap2 = { 1294 .omap2 = {
@@ -1453,36 +1301,21 @@ static struct omap_hwmod omap3xxx_uart4_hwmod = {
1453 }, 1301 },
1454 .slaves = omap3xxx_uart4_slaves, 1302 .slaves = omap3xxx_uart4_slaves,
1455 .slaves_cnt = ARRAY_SIZE(omap3xxx_uart4_slaves), 1303 .slaves_cnt = ARRAY_SIZE(omap3xxx_uart4_slaves),
1456 .class = &uart_class, 1304 .class = &omap2_uart_class,
1457 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3630ES1), 1305 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3630ES1),
1458}; 1306};
1459 1307
1460static struct omap_hwmod_class i2c_class = { 1308static struct omap_hwmod_class i2c_class = {
1461 .name = "i2c", 1309 .name = "i2c",
1462 .sysc = &i2c_sysc, 1310 .sysc = &i2c_sysc,
1463}; 1311 .rev = OMAP_I2C_IP_VERSION_1,
1464 1312 .reset = &omap_i2c_reset,
1465/*
1466 * 'dss' class
1467 * display sub-system
1468 */
1469
1470static struct omap_hwmod_class_sysconfig omap3xxx_dss_sysc = {
1471 .rev_offs = 0x0000,
1472 .sysc_offs = 0x0010,
1473 .syss_offs = 0x0014,
1474 .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
1475 .sysc_fields = &omap_hwmod_sysc_type1,
1476};
1477
1478static struct omap_hwmod_class omap3xxx_dss_hwmod_class = {
1479 .name = "dss",
1480 .sysc = &omap3xxx_dss_sysc,
1481}; 1313};
1482 1314
1483static struct omap_hwmod_dma_info omap3xxx_dss_sdma_chs[] = { 1315static struct omap_hwmod_dma_info omap3xxx_dss_sdma_chs[] = {
1484 { .name = "dispc", .dma_req = 5 }, 1316 { .name = "dispc", .dma_req = 5 },
1485 { .name = "dsi1", .dma_req = 74 }, 1317 { .name = "dsi1", .dma_req = 74 },
1318 { .dma_req = -1 }
1486}; 1319};
1487 1320
1488/* dss */ 1321/* dss */
@@ -1491,21 +1324,12 @@ static struct omap_hwmod_ocp_if *omap3xxx_dss_masters[] = {
1491 &omap3xxx_dss__l3, 1324 &omap3xxx_dss__l3,
1492}; 1325};
1493 1326
1494static struct omap_hwmod_addr_space omap3xxx_dss_addrs[] = {
1495 {
1496 .pa_start = 0x48050000,
1497 .pa_end = 0x480503FF,
1498 .flags = ADDR_TYPE_RT
1499 },
1500};
1501
1502/* l4_core -> dss */ 1327/* l4_core -> dss */
1503static struct omap_hwmod_ocp_if omap3430es1_l4_core__dss = { 1328static struct omap_hwmod_ocp_if omap3430es1_l4_core__dss = {
1504 .master = &omap3xxx_l4_core_hwmod, 1329 .master = &omap3xxx_l4_core_hwmod,
1505 .slave = &omap3430es1_dss_core_hwmod, 1330 .slave = &omap3430es1_dss_core_hwmod,
1506 .clk = "dss_ick", 1331 .clk = "dss_ick",
1507 .addr = omap3xxx_dss_addrs, 1332 .addr = omap2_dss_addrs,
1508 .addr_cnt = ARRAY_SIZE(omap3xxx_dss_addrs),
1509 .fw = { 1333 .fw = {
1510 .omap2 = { 1334 .omap2 = {
1511 .l4_fw_region = OMAP3ES1_L4_CORE_FW_DSS_CORE_REGION, 1335 .l4_fw_region = OMAP3ES1_L4_CORE_FW_DSS_CORE_REGION,
@@ -1520,8 +1344,7 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss = {
1520 .master = &omap3xxx_l4_core_hwmod, 1344 .master = &omap3xxx_l4_core_hwmod,
1521 .slave = &omap3xxx_dss_core_hwmod, 1345 .slave = &omap3xxx_dss_core_hwmod,
1522 .clk = "dss_ick", 1346 .clk = "dss_ick",
1523 .addr = omap3xxx_dss_addrs, 1347 .addr = omap2_dss_addrs,
1524 .addr_cnt = ARRAY_SIZE(omap3xxx_dss_addrs),
1525 .fw = { 1348 .fw = {
1526 .omap2 = { 1349 .omap2 = {
1527 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_CORE_REGION, 1350 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_CORE_REGION,
@@ -1549,11 +1372,9 @@ static struct omap_hwmod_opt_clk dss_opt_clks[] = {
1549 1372
1550static struct omap_hwmod omap3430es1_dss_core_hwmod = { 1373static struct omap_hwmod omap3430es1_dss_core_hwmod = {
1551 .name = "dss_core", 1374 .name = "dss_core",
1552 .class = &omap3xxx_dss_hwmod_class, 1375 .class = &omap2_dss_hwmod_class,
1553 .main_clk = "dss1_alwon_fck", /* instead of dss_fck */ 1376 .main_clk = "dss1_alwon_fck", /* instead of dss_fck */
1554 .sdma_reqs = omap3xxx_dss_sdma_chs, 1377 .sdma_reqs = omap3xxx_dss_sdma_chs,
1555 .sdma_reqs_cnt = ARRAY_SIZE(omap3xxx_dss_sdma_chs),
1556
1557 .prcm = { 1378 .prcm = {
1558 .omap2 = { 1379 .omap2 = {
1559 .prcm_reg_id = 1, 1380 .prcm_reg_id = 1,
@@ -1575,11 +1396,9 @@ static struct omap_hwmod omap3430es1_dss_core_hwmod = {
1575 1396
1576static struct omap_hwmod omap3xxx_dss_core_hwmod = { 1397static struct omap_hwmod omap3xxx_dss_core_hwmod = {
1577 .name = "dss_core", 1398 .name = "dss_core",
1578 .class = &omap3xxx_dss_hwmod_class, 1399 .class = &omap2_dss_hwmod_class,
1579 .main_clk = "dss1_alwon_fck", /* instead of dss_fck */ 1400 .main_clk = "dss1_alwon_fck", /* instead of dss_fck */
1580 .sdma_reqs = omap3xxx_dss_sdma_chs, 1401 .sdma_reqs = omap3xxx_dss_sdma_chs,
1581 .sdma_reqs_cnt = ARRAY_SIZE(omap3xxx_dss_sdma_chs),
1582
1583 .prcm = { 1402 .prcm = {
1584 .omap2 = { 1403 .omap2 = {
1585 .prcm_reg_id = 1, 1404 .prcm_reg_id = 1,
@@ -1600,47 +1419,12 @@ static struct omap_hwmod omap3xxx_dss_core_hwmod = {
1600 CHIP_IS_OMAP3630ES1 | CHIP_GE_OMAP3630ES1_1), 1419 CHIP_IS_OMAP3630ES1 | CHIP_GE_OMAP3630ES1_1),
1601}; 1420};
1602 1421
1603/*
1604 * 'dispc' class
1605 * display controller
1606 */
1607
1608static struct omap_hwmod_class_sysconfig omap3xxx_dispc_sysc = {
1609 .rev_offs = 0x0000,
1610 .sysc_offs = 0x0010,
1611 .syss_offs = 0x0014,
1612 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
1613 SYSC_HAS_MIDLEMODE | SYSC_HAS_ENAWAKEUP |
1614 SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
1615 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1616 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
1617 .sysc_fields = &omap_hwmod_sysc_type1,
1618};
1619
1620static struct omap_hwmod_class omap3xxx_dispc_hwmod_class = {
1621 .name = "dispc",
1622 .sysc = &omap3xxx_dispc_sysc,
1623};
1624
1625static struct omap_hwmod_irq_info omap3xxx_dispc_irqs[] = {
1626 { .irq = 25 },
1627};
1628
1629static struct omap_hwmod_addr_space omap3xxx_dss_dispc_addrs[] = {
1630 {
1631 .pa_start = 0x48050400,
1632 .pa_end = 0x480507FF,
1633 .flags = ADDR_TYPE_RT
1634 },
1635};
1636
1637/* l4_core -> dss_dispc */ 1422/* l4_core -> dss_dispc */
1638static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dispc = { 1423static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dispc = {
1639 .master = &omap3xxx_l4_core_hwmod, 1424 .master = &omap3xxx_l4_core_hwmod,
1640 .slave = &omap3xxx_dss_dispc_hwmod, 1425 .slave = &omap3xxx_dss_dispc_hwmod,
1641 .clk = "dss_ick", 1426 .clk = "dss_ick",
1642 .addr = omap3xxx_dss_dispc_addrs, 1427 .addr = omap2_dss_dispc_addrs,
1643 .addr_cnt = ARRAY_SIZE(omap3xxx_dss_dispc_addrs),
1644 .fw = { 1428 .fw = {
1645 .omap2 = { 1429 .omap2 = {
1646 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_DISPC_REGION, 1430 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_DISPC_REGION,
@@ -1658,9 +1442,8 @@ static struct omap_hwmod_ocp_if *omap3xxx_dss_dispc_slaves[] = {
1658 1442
1659static struct omap_hwmod omap3xxx_dss_dispc_hwmod = { 1443static struct omap_hwmod omap3xxx_dss_dispc_hwmod = {
1660 .name = "dss_dispc", 1444 .name = "dss_dispc",
1661 .class = &omap3xxx_dispc_hwmod_class, 1445 .class = &omap2_dispc_hwmod_class,
1662 .mpu_irqs = omap3xxx_dispc_irqs, 1446 .mpu_irqs = omap2_dispc_irqs,
1663 .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_dispc_irqs),
1664 .main_clk = "dss1_alwon_fck", 1447 .main_clk = "dss1_alwon_fck",
1665 .prcm = { 1448 .prcm = {
1666 .omap2 = { 1449 .omap2 = {
@@ -1688,6 +1471,7 @@ static struct omap_hwmod_class omap3xxx_dsi_hwmod_class = {
1688 1471
1689static struct omap_hwmod_irq_info omap3xxx_dsi1_irqs[] = { 1472static struct omap_hwmod_irq_info omap3xxx_dsi1_irqs[] = {
1690 { .irq = 25 }, 1473 { .irq = 25 },
1474 { .irq = -1 }
1691}; 1475};
1692 1476
1693/* dss_dsi1 */ 1477/* dss_dsi1 */
@@ -1697,6 +1481,7 @@ static struct omap_hwmod_addr_space omap3xxx_dss_dsi1_addrs[] = {
1697 .pa_end = 0x4804FFFF, 1481 .pa_end = 0x4804FFFF,
1698 .flags = ADDR_TYPE_RT 1482 .flags = ADDR_TYPE_RT
1699 }, 1483 },
1484 { }
1700}; 1485};
1701 1486
1702/* l4_core -> dss_dsi1 */ 1487/* l4_core -> dss_dsi1 */
@@ -1704,7 +1489,6 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_dsi1 = {
1704 .master = &omap3xxx_l4_core_hwmod, 1489 .master = &omap3xxx_l4_core_hwmod,
1705 .slave = &omap3xxx_dss_dsi1_hwmod, 1490 .slave = &omap3xxx_dss_dsi1_hwmod,
1706 .addr = omap3xxx_dss_dsi1_addrs, 1491 .addr = omap3xxx_dss_dsi1_addrs,
1707 .addr_cnt = ARRAY_SIZE(omap3xxx_dss_dsi1_addrs),
1708 .fw = { 1492 .fw = {
1709 .omap2 = { 1493 .omap2 = {
1710 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_DSI_REGION, 1494 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_DSI_REGION,
@@ -1724,7 +1508,6 @@ static struct omap_hwmod omap3xxx_dss_dsi1_hwmod = {
1724 .name = "dss_dsi1", 1508 .name = "dss_dsi1",
1725 .class = &omap3xxx_dsi_hwmod_class, 1509 .class = &omap3xxx_dsi_hwmod_class,
1726 .mpu_irqs = omap3xxx_dsi1_irqs, 1510 .mpu_irqs = omap3xxx_dsi1_irqs,
1727 .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_dsi1_irqs),
1728 .main_clk = "dss1_alwon_fck", 1511 .main_clk = "dss1_alwon_fck",
1729 .prcm = { 1512 .prcm = {
1730 .omap2 = { 1513 .omap2 = {
@@ -1741,41 +1524,12 @@ static struct omap_hwmod omap3xxx_dss_dsi1_hwmod = {
1741 .flags = HWMOD_NO_IDLEST, 1524 .flags = HWMOD_NO_IDLEST,
1742}; 1525};
1743 1526
1744/*
1745 * 'rfbi' class
1746 * remote frame buffer interface
1747 */
1748
1749static struct omap_hwmod_class_sysconfig omap3xxx_rfbi_sysc = {
1750 .rev_offs = 0x0000,
1751 .sysc_offs = 0x0010,
1752 .syss_offs = 0x0014,
1753 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
1754 SYSC_HAS_AUTOIDLE),
1755 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
1756 .sysc_fields = &omap_hwmod_sysc_type1,
1757};
1758
1759static struct omap_hwmod_class omap3xxx_rfbi_hwmod_class = {
1760 .name = "rfbi",
1761 .sysc = &omap3xxx_rfbi_sysc,
1762};
1763
1764static struct omap_hwmod_addr_space omap3xxx_dss_rfbi_addrs[] = {
1765 {
1766 .pa_start = 0x48050800,
1767 .pa_end = 0x48050BFF,
1768 .flags = ADDR_TYPE_RT
1769 },
1770};
1771
1772/* l4_core -> dss_rfbi */ 1527/* l4_core -> dss_rfbi */
1773static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_rfbi = { 1528static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_rfbi = {
1774 .master = &omap3xxx_l4_core_hwmod, 1529 .master = &omap3xxx_l4_core_hwmod,
1775 .slave = &omap3xxx_dss_rfbi_hwmod, 1530 .slave = &omap3xxx_dss_rfbi_hwmod,
1776 .clk = "dss_ick", 1531 .clk = "dss_ick",
1777 .addr = omap3xxx_dss_rfbi_addrs, 1532 .addr = omap2_dss_rfbi_addrs,
1778 .addr_cnt = ARRAY_SIZE(omap3xxx_dss_rfbi_addrs),
1779 .fw = { 1533 .fw = {
1780 .omap2 = { 1534 .omap2 = {
1781 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_RFBI_REGION, 1535 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_RFBI_REGION,
@@ -1793,7 +1547,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_dss_rfbi_slaves[] = {
1793 1547
1794static struct omap_hwmod omap3xxx_dss_rfbi_hwmod = { 1548static struct omap_hwmod omap3xxx_dss_rfbi_hwmod = {
1795 .name = "dss_rfbi", 1549 .name = "dss_rfbi",
1796 .class = &omap3xxx_rfbi_hwmod_class, 1550 .class = &omap2_rfbi_hwmod_class,
1797 .main_clk = "dss1_alwon_fck", 1551 .main_clk = "dss1_alwon_fck",
1798 .prcm = { 1552 .prcm = {
1799 .omap2 = { 1553 .omap2 = {
@@ -1810,31 +1564,12 @@ static struct omap_hwmod omap3xxx_dss_rfbi_hwmod = {
1810 .flags = HWMOD_NO_IDLEST, 1564 .flags = HWMOD_NO_IDLEST,
1811}; 1565};
1812 1566
1813/*
1814 * 'venc' class
1815 * video encoder
1816 */
1817
1818static struct omap_hwmod_class omap3xxx_venc_hwmod_class = {
1819 .name = "venc",
1820};
1821
1822/* dss_venc */
1823static struct omap_hwmod_addr_space omap3xxx_dss_venc_addrs[] = {
1824 {
1825 .pa_start = 0x48050C00,
1826 .pa_end = 0x48050FFF,
1827 .flags = ADDR_TYPE_RT
1828 },
1829};
1830
1831/* l4_core -> dss_venc */ 1567/* l4_core -> dss_venc */
1832static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_venc = { 1568static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_venc = {
1833 .master = &omap3xxx_l4_core_hwmod, 1569 .master = &omap3xxx_l4_core_hwmod,
1834 .slave = &omap3xxx_dss_venc_hwmod, 1570 .slave = &omap3xxx_dss_venc_hwmod,
1835 .clk = "dss_tv_fck", 1571 .clk = "dss_tv_fck",
1836 .addr = omap3xxx_dss_venc_addrs, 1572 .addr = omap2_dss_venc_addrs,
1837 .addr_cnt = ARRAY_SIZE(omap3xxx_dss_venc_addrs),
1838 .fw = { 1573 .fw = {
1839 .omap2 = { 1574 .omap2 = {
1840 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_VENC_REGION, 1575 .l4_fw_region = OMAP3_L4_CORE_FW_DSS_VENC_REGION,
@@ -1853,7 +1588,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_dss_venc_slaves[] = {
1853 1588
1854static struct omap_hwmod omap3xxx_dss_venc_hwmod = { 1589static struct omap_hwmod omap3xxx_dss_venc_hwmod = {
1855 .name = "dss_venc", 1590 .name = "dss_venc",
1856 .class = &omap3xxx_venc_hwmod_class, 1591 .class = &omap2_venc_hwmod_class,
1857 .main_clk = "dss1_alwon_fck", 1592 .main_clk = "dss1_alwon_fck",
1858 .prcm = { 1593 .prcm = {
1859 .omap2 = { 1594 .omap2 = {
@@ -1874,15 +1609,9 @@ static struct omap_hwmod omap3xxx_dss_venc_hwmod = {
1874 1609
1875static struct omap_i2c_dev_attr i2c1_dev_attr = { 1610static struct omap_i2c_dev_attr i2c1_dev_attr = {
1876 .fifo_depth = 8, /* bytes */ 1611 .fifo_depth = 8, /* bytes */
1877}; 1612 .flags = OMAP_I2C_FLAG_APPLY_ERRATA_I207 |
1878 1613 OMAP_I2C_FLAG_RESET_REGS_POSTIDLE |
1879static struct omap_hwmod_irq_info i2c1_mpu_irqs[] = { 1614 OMAP_I2C_FLAG_BUS_SHIFT_2,
1880 { .irq = INT_24XX_I2C1_IRQ, },
1881};
1882
1883static struct omap_hwmod_dma_info i2c1_sdma_reqs[] = {
1884 { .name = "tx", .dma_req = OMAP24XX_DMA_I2C1_TX },
1885 { .name = "rx", .dma_req = OMAP24XX_DMA_I2C1_RX },
1886}; 1615};
1887 1616
1888static struct omap_hwmod_ocp_if *omap3xxx_i2c1_slaves[] = { 1617static struct omap_hwmod_ocp_if *omap3xxx_i2c1_slaves[] = {
@@ -1891,10 +1620,9 @@ static struct omap_hwmod_ocp_if *omap3xxx_i2c1_slaves[] = {
1891 1620
1892static struct omap_hwmod omap3xxx_i2c1_hwmod = { 1621static struct omap_hwmod omap3xxx_i2c1_hwmod = {
1893 .name = "i2c1", 1622 .name = "i2c1",
1894 .mpu_irqs = i2c1_mpu_irqs, 1623 .flags = HWMOD_16BIT_REG,
1895 .mpu_irqs_cnt = ARRAY_SIZE(i2c1_mpu_irqs), 1624 .mpu_irqs = omap2_i2c1_mpu_irqs,
1896 .sdma_reqs = i2c1_sdma_reqs, 1625 .sdma_reqs = omap2_i2c1_sdma_reqs,
1897 .sdma_reqs_cnt = ARRAY_SIZE(i2c1_sdma_reqs),
1898 .main_clk = "i2c1_fck", 1626 .main_clk = "i2c1_fck",
1899 .prcm = { 1627 .prcm = {
1900 .omap2 = { 1628 .omap2 = {
@@ -1916,15 +1644,9 @@ static struct omap_hwmod omap3xxx_i2c1_hwmod = {
1916 1644
1917static struct omap_i2c_dev_attr i2c2_dev_attr = { 1645static struct omap_i2c_dev_attr i2c2_dev_attr = {
1918 .fifo_depth = 8, /* bytes */ 1646 .fifo_depth = 8, /* bytes */
1919}; 1647 .flags = OMAP_I2C_FLAG_APPLY_ERRATA_I207 |
1920 1648 OMAP_I2C_FLAG_RESET_REGS_POSTIDLE |
1921static struct omap_hwmod_irq_info i2c2_mpu_irqs[] = { 1649 OMAP_I2C_FLAG_BUS_SHIFT_2,
1922 { .irq = INT_24XX_I2C2_IRQ, },
1923};
1924
1925static struct omap_hwmod_dma_info i2c2_sdma_reqs[] = {
1926 { .name = "tx", .dma_req = OMAP24XX_DMA_I2C2_TX },
1927 { .name = "rx", .dma_req = OMAP24XX_DMA_I2C2_RX },
1928}; 1650};
1929 1651
1930static struct omap_hwmod_ocp_if *omap3xxx_i2c2_slaves[] = { 1652static struct omap_hwmod_ocp_if *omap3xxx_i2c2_slaves[] = {
@@ -1933,10 +1655,9 @@ static struct omap_hwmod_ocp_if *omap3xxx_i2c2_slaves[] = {
1933 1655
1934static struct omap_hwmod omap3xxx_i2c2_hwmod = { 1656static struct omap_hwmod omap3xxx_i2c2_hwmod = {
1935 .name = "i2c2", 1657 .name = "i2c2",
1936 .mpu_irqs = i2c2_mpu_irqs, 1658 .flags = HWMOD_16BIT_REG,
1937 .mpu_irqs_cnt = ARRAY_SIZE(i2c2_mpu_irqs), 1659 .mpu_irqs = omap2_i2c2_mpu_irqs,
1938 .sdma_reqs = i2c2_sdma_reqs, 1660 .sdma_reqs = omap2_i2c2_sdma_reqs,
1939 .sdma_reqs_cnt = ARRAY_SIZE(i2c2_sdma_reqs),
1940 .main_clk = "i2c2_fck", 1661 .main_clk = "i2c2_fck",
1941 .prcm = { 1662 .prcm = {
1942 .omap2 = { 1663 .omap2 = {
@@ -1958,15 +1679,20 @@ static struct omap_hwmod omap3xxx_i2c2_hwmod = {
1958 1679
1959static struct omap_i2c_dev_attr i2c3_dev_attr = { 1680static struct omap_i2c_dev_attr i2c3_dev_attr = {
1960 .fifo_depth = 64, /* bytes */ 1681 .fifo_depth = 64, /* bytes */
1682 .flags = OMAP_I2C_FLAG_APPLY_ERRATA_I207 |
1683 OMAP_I2C_FLAG_RESET_REGS_POSTIDLE |
1684 OMAP_I2C_FLAG_BUS_SHIFT_2,
1961}; 1685};
1962 1686
1963static struct omap_hwmod_irq_info i2c3_mpu_irqs[] = { 1687static struct omap_hwmod_irq_info i2c3_mpu_irqs[] = {
1964 { .irq = INT_34XX_I2C3_IRQ, }, 1688 { .irq = INT_34XX_I2C3_IRQ, },
1689 { .irq = -1 }
1965}; 1690};
1966 1691
1967static struct omap_hwmod_dma_info i2c3_sdma_reqs[] = { 1692static struct omap_hwmod_dma_info i2c3_sdma_reqs[] = {
1968 { .name = "tx", .dma_req = OMAP34XX_DMA_I2C3_TX }, 1693 { .name = "tx", .dma_req = OMAP34XX_DMA_I2C3_TX },
1969 { .name = "rx", .dma_req = OMAP34XX_DMA_I2C3_RX }, 1694 { .name = "rx", .dma_req = OMAP34XX_DMA_I2C3_RX },
1695 { .dma_req = -1 }
1970}; 1696};
1971 1697
1972static struct omap_hwmod_ocp_if *omap3xxx_i2c3_slaves[] = { 1698static struct omap_hwmod_ocp_if *omap3xxx_i2c3_slaves[] = {
@@ -1975,10 +1701,9 @@ static struct omap_hwmod_ocp_if *omap3xxx_i2c3_slaves[] = {
1975 1701
1976static struct omap_hwmod omap3xxx_i2c3_hwmod = { 1702static struct omap_hwmod omap3xxx_i2c3_hwmod = {
1977 .name = "i2c3", 1703 .name = "i2c3",
1704 .flags = HWMOD_16BIT_REG,
1978 .mpu_irqs = i2c3_mpu_irqs, 1705 .mpu_irqs = i2c3_mpu_irqs,
1979 .mpu_irqs_cnt = ARRAY_SIZE(i2c3_mpu_irqs),
1980 .sdma_reqs = i2c3_sdma_reqs, 1706 .sdma_reqs = i2c3_sdma_reqs,
1981 .sdma_reqs_cnt = ARRAY_SIZE(i2c3_sdma_reqs),
1982 .main_clk = "i2c3_fck", 1707 .main_clk = "i2c3_fck",
1983 .prcm = { 1708 .prcm = {
1984 .omap2 = { 1709 .omap2 = {
@@ -2003,13 +1728,13 @@ static struct omap_hwmod_addr_space omap3xxx_gpio1_addrs[] = {
2003 .pa_end = 0x483101ff, 1728 .pa_end = 0x483101ff,
2004 .flags = ADDR_TYPE_RT 1729 .flags = ADDR_TYPE_RT
2005 }, 1730 },
1731 { }
2006}; 1732};
2007 1733
2008static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__gpio1 = { 1734static struct omap_hwmod_ocp_if omap3xxx_l4_wkup__gpio1 = {
2009 .master = &omap3xxx_l4_wkup_hwmod, 1735 .master = &omap3xxx_l4_wkup_hwmod,
2010 .slave = &omap3xxx_gpio1_hwmod, 1736 .slave = &omap3xxx_gpio1_hwmod,
2011 .addr = omap3xxx_gpio1_addrs, 1737 .addr = omap3xxx_gpio1_addrs,
2012 .addr_cnt = ARRAY_SIZE(omap3xxx_gpio1_addrs),
2013 .user = OCP_USER_MPU | OCP_USER_SDMA, 1738 .user = OCP_USER_MPU | OCP_USER_SDMA,
2014}; 1739};
2015 1740
@@ -2020,13 +1745,13 @@ static struct omap_hwmod_addr_space omap3xxx_gpio2_addrs[] = {
2020 .pa_end = 0x490501ff, 1745 .pa_end = 0x490501ff,
2021 .flags = ADDR_TYPE_RT 1746 .flags = ADDR_TYPE_RT
2022 }, 1747 },
1748 { }
2023}; 1749};
2024 1750
2025static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio2 = { 1751static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio2 = {
2026 .master = &omap3xxx_l4_per_hwmod, 1752 .master = &omap3xxx_l4_per_hwmod,
2027 .slave = &omap3xxx_gpio2_hwmod, 1753 .slave = &omap3xxx_gpio2_hwmod,
2028 .addr = omap3xxx_gpio2_addrs, 1754 .addr = omap3xxx_gpio2_addrs,
2029 .addr_cnt = ARRAY_SIZE(omap3xxx_gpio2_addrs),
2030 .user = OCP_USER_MPU | OCP_USER_SDMA, 1755 .user = OCP_USER_MPU | OCP_USER_SDMA,
2031}; 1756};
2032 1757
@@ -2037,13 +1762,13 @@ static struct omap_hwmod_addr_space omap3xxx_gpio3_addrs[] = {
2037 .pa_end = 0x490521ff, 1762 .pa_end = 0x490521ff,
2038 .flags = ADDR_TYPE_RT 1763 .flags = ADDR_TYPE_RT
2039 }, 1764 },
1765 { }
2040}; 1766};
2041 1767
2042static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio3 = { 1768static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio3 = {
2043 .master = &omap3xxx_l4_per_hwmod, 1769 .master = &omap3xxx_l4_per_hwmod,
2044 .slave = &omap3xxx_gpio3_hwmod, 1770 .slave = &omap3xxx_gpio3_hwmod,
2045 .addr = omap3xxx_gpio3_addrs, 1771 .addr = omap3xxx_gpio3_addrs,
2046 .addr_cnt = ARRAY_SIZE(omap3xxx_gpio3_addrs),
2047 .user = OCP_USER_MPU | OCP_USER_SDMA, 1772 .user = OCP_USER_MPU | OCP_USER_SDMA,
2048}; 1773};
2049 1774
@@ -2054,13 +1779,13 @@ static struct omap_hwmod_addr_space omap3xxx_gpio4_addrs[] = {
2054 .pa_end = 0x490541ff, 1779 .pa_end = 0x490541ff,
2055 .flags = ADDR_TYPE_RT 1780 .flags = ADDR_TYPE_RT
2056 }, 1781 },
1782 { }
2057}; 1783};
2058 1784
2059static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio4 = { 1785static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio4 = {
2060 .master = &omap3xxx_l4_per_hwmod, 1786 .master = &omap3xxx_l4_per_hwmod,
2061 .slave = &omap3xxx_gpio4_hwmod, 1787 .slave = &omap3xxx_gpio4_hwmod,
2062 .addr = omap3xxx_gpio4_addrs, 1788 .addr = omap3xxx_gpio4_addrs,
2063 .addr_cnt = ARRAY_SIZE(omap3xxx_gpio4_addrs),
2064 .user = OCP_USER_MPU | OCP_USER_SDMA, 1789 .user = OCP_USER_MPU | OCP_USER_SDMA,
2065}; 1790};
2066 1791
@@ -2071,13 +1796,13 @@ static struct omap_hwmod_addr_space omap3xxx_gpio5_addrs[] = {
2071 .pa_end = 0x490561ff, 1796 .pa_end = 0x490561ff,
2072 .flags = ADDR_TYPE_RT 1797 .flags = ADDR_TYPE_RT
2073 }, 1798 },
1799 { }
2074}; 1800};
2075 1801
2076static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio5 = { 1802static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio5 = {
2077 .master = &omap3xxx_l4_per_hwmod, 1803 .master = &omap3xxx_l4_per_hwmod,
2078 .slave = &omap3xxx_gpio5_hwmod, 1804 .slave = &omap3xxx_gpio5_hwmod,
2079 .addr = omap3xxx_gpio5_addrs, 1805 .addr = omap3xxx_gpio5_addrs,
2080 .addr_cnt = ARRAY_SIZE(omap3xxx_gpio5_addrs),
2081 .user = OCP_USER_MPU | OCP_USER_SDMA, 1806 .user = OCP_USER_MPU | OCP_USER_SDMA,
2082}; 1807};
2083 1808
@@ -2088,13 +1813,13 @@ static struct omap_hwmod_addr_space omap3xxx_gpio6_addrs[] = {
2088 .pa_end = 0x490581ff, 1813 .pa_end = 0x490581ff,
2089 .flags = ADDR_TYPE_RT 1814 .flags = ADDR_TYPE_RT
2090 }, 1815 },
1816 { }
2091}; 1817};
2092 1818
2093static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio6 = { 1819static struct omap_hwmod_ocp_if omap3xxx_l4_per__gpio6 = {
2094 .master = &omap3xxx_l4_per_hwmod, 1820 .master = &omap3xxx_l4_per_hwmod,
2095 .slave = &omap3xxx_gpio6_hwmod, 1821 .slave = &omap3xxx_gpio6_hwmod,
2096 .addr = omap3xxx_gpio6_addrs, 1822 .addr = omap3xxx_gpio6_addrs,
2097 .addr_cnt = ARRAY_SIZE(omap3xxx_gpio6_addrs),
2098 .user = OCP_USER_MPU | OCP_USER_SDMA, 1823 .user = OCP_USER_MPU | OCP_USER_SDMA,
2099}; 1824};
2100 1825
@@ -2127,10 +1852,6 @@ static struct omap_gpio_dev_attr gpio_dev_attr = {
2127}; 1852};
2128 1853
2129/* gpio1 */ 1854/* gpio1 */
2130static struct omap_hwmod_irq_info omap3xxx_gpio1_irqs[] = {
2131 { .irq = 29 }, /* INT_34XX_GPIO_BANK1 */
2132};
2133
2134static struct omap_hwmod_opt_clk gpio1_opt_clks[] = { 1855static struct omap_hwmod_opt_clk gpio1_opt_clks[] = {
2135 { .role = "dbclk", .clk = "gpio1_dbck", }, 1856 { .role = "dbclk", .clk = "gpio1_dbck", },
2136}; 1857};
@@ -2142,8 +1863,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_gpio1_slaves[] = {
2142static struct omap_hwmod omap3xxx_gpio1_hwmod = { 1863static struct omap_hwmod omap3xxx_gpio1_hwmod = {
2143 .name = "gpio1", 1864 .name = "gpio1",
2144 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, 1865 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
2145 .mpu_irqs = omap3xxx_gpio1_irqs, 1866 .mpu_irqs = omap2_gpio1_irqs,
2146 .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_gpio1_irqs),
2147 .main_clk = "gpio1_ick", 1867 .main_clk = "gpio1_ick",
2148 .opt_clks = gpio1_opt_clks, 1868 .opt_clks = gpio1_opt_clks,
2149 .opt_clks_cnt = ARRAY_SIZE(gpio1_opt_clks), 1869 .opt_clks_cnt = ARRAY_SIZE(gpio1_opt_clks),
@@ -2164,10 +1884,6 @@ static struct omap_hwmod omap3xxx_gpio1_hwmod = {
2164}; 1884};
2165 1885
2166/* gpio2 */ 1886/* gpio2 */
2167static struct omap_hwmod_irq_info omap3xxx_gpio2_irqs[] = {
2168 { .irq = 30 }, /* INT_34XX_GPIO_BANK2 */
2169};
2170
2171static struct omap_hwmod_opt_clk gpio2_opt_clks[] = { 1887static struct omap_hwmod_opt_clk gpio2_opt_clks[] = {
2172 { .role = "dbclk", .clk = "gpio2_dbck", }, 1888 { .role = "dbclk", .clk = "gpio2_dbck", },
2173}; 1889};
@@ -2179,8 +1895,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_gpio2_slaves[] = {
2179static struct omap_hwmod omap3xxx_gpio2_hwmod = { 1895static struct omap_hwmod omap3xxx_gpio2_hwmod = {
2180 .name = "gpio2", 1896 .name = "gpio2",
2181 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, 1897 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
2182 .mpu_irqs = omap3xxx_gpio2_irqs, 1898 .mpu_irqs = omap2_gpio2_irqs,
2183 .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_gpio2_irqs),
2184 .main_clk = "gpio2_ick", 1899 .main_clk = "gpio2_ick",
2185 .opt_clks = gpio2_opt_clks, 1900 .opt_clks = gpio2_opt_clks,
2186 .opt_clks_cnt = ARRAY_SIZE(gpio2_opt_clks), 1901 .opt_clks_cnt = ARRAY_SIZE(gpio2_opt_clks),
@@ -2201,10 +1916,6 @@ static struct omap_hwmod omap3xxx_gpio2_hwmod = {
2201}; 1916};
2202 1917
2203/* gpio3 */ 1918/* gpio3 */
2204static struct omap_hwmod_irq_info omap3xxx_gpio3_irqs[] = {
2205 { .irq = 31 }, /* INT_34XX_GPIO_BANK3 */
2206};
2207
2208static struct omap_hwmod_opt_clk gpio3_opt_clks[] = { 1919static struct omap_hwmod_opt_clk gpio3_opt_clks[] = {
2209 { .role = "dbclk", .clk = "gpio3_dbck", }, 1920 { .role = "dbclk", .clk = "gpio3_dbck", },
2210}; 1921};
@@ -2216,8 +1927,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_gpio3_slaves[] = {
2216static struct omap_hwmod omap3xxx_gpio3_hwmod = { 1927static struct omap_hwmod omap3xxx_gpio3_hwmod = {
2217 .name = "gpio3", 1928 .name = "gpio3",
2218 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, 1929 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
2219 .mpu_irqs = omap3xxx_gpio3_irqs, 1930 .mpu_irqs = omap2_gpio3_irqs,
2220 .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_gpio3_irqs),
2221 .main_clk = "gpio3_ick", 1931 .main_clk = "gpio3_ick",
2222 .opt_clks = gpio3_opt_clks, 1932 .opt_clks = gpio3_opt_clks,
2223 .opt_clks_cnt = ARRAY_SIZE(gpio3_opt_clks), 1933 .opt_clks_cnt = ARRAY_SIZE(gpio3_opt_clks),
@@ -2238,10 +1948,6 @@ static struct omap_hwmod omap3xxx_gpio3_hwmod = {
2238}; 1948};
2239 1949
2240/* gpio4 */ 1950/* gpio4 */
2241static struct omap_hwmod_irq_info omap3xxx_gpio4_irqs[] = {
2242 { .irq = 32 }, /* INT_34XX_GPIO_BANK4 */
2243};
2244
2245static struct omap_hwmod_opt_clk gpio4_opt_clks[] = { 1951static struct omap_hwmod_opt_clk gpio4_opt_clks[] = {
2246 { .role = "dbclk", .clk = "gpio4_dbck", }, 1952 { .role = "dbclk", .clk = "gpio4_dbck", },
2247}; 1953};
@@ -2253,8 +1959,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_gpio4_slaves[] = {
2253static struct omap_hwmod omap3xxx_gpio4_hwmod = { 1959static struct omap_hwmod omap3xxx_gpio4_hwmod = {
2254 .name = "gpio4", 1960 .name = "gpio4",
2255 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, 1961 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
2256 .mpu_irqs = omap3xxx_gpio4_irqs, 1962 .mpu_irqs = omap2_gpio4_irqs,
2257 .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_gpio4_irqs),
2258 .main_clk = "gpio4_ick", 1963 .main_clk = "gpio4_ick",
2259 .opt_clks = gpio4_opt_clks, 1964 .opt_clks = gpio4_opt_clks,
2260 .opt_clks_cnt = ARRAY_SIZE(gpio4_opt_clks), 1965 .opt_clks_cnt = ARRAY_SIZE(gpio4_opt_clks),
@@ -2277,6 +1982,7 @@ static struct omap_hwmod omap3xxx_gpio4_hwmod = {
2277/* gpio5 */ 1982/* gpio5 */
2278static struct omap_hwmod_irq_info omap3xxx_gpio5_irqs[] = { 1983static struct omap_hwmod_irq_info omap3xxx_gpio5_irqs[] = {
2279 { .irq = 33 }, /* INT_34XX_GPIO_BANK5 */ 1984 { .irq = 33 }, /* INT_34XX_GPIO_BANK5 */
1985 { .irq = -1 }
2280}; 1986};
2281 1987
2282static struct omap_hwmod_opt_clk gpio5_opt_clks[] = { 1988static struct omap_hwmod_opt_clk gpio5_opt_clks[] = {
@@ -2291,7 +1997,6 @@ static struct omap_hwmod omap3xxx_gpio5_hwmod = {
2291 .name = "gpio5", 1997 .name = "gpio5",
2292 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, 1998 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
2293 .mpu_irqs = omap3xxx_gpio5_irqs, 1999 .mpu_irqs = omap3xxx_gpio5_irqs,
2294 .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_gpio5_irqs),
2295 .main_clk = "gpio5_ick", 2000 .main_clk = "gpio5_ick",
2296 .opt_clks = gpio5_opt_clks, 2001 .opt_clks = gpio5_opt_clks,
2297 .opt_clks_cnt = ARRAY_SIZE(gpio5_opt_clks), 2002 .opt_clks_cnt = ARRAY_SIZE(gpio5_opt_clks),
@@ -2314,6 +2019,7 @@ static struct omap_hwmod omap3xxx_gpio5_hwmod = {
2314/* gpio6 */ 2019/* gpio6 */
2315static struct omap_hwmod_irq_info omap3xxx_gpio6_irqs[] = { 2020static struct omap_hwmod_irq_info omap3xxx_gpio6_irqs[] = {
2316 { .irq = 34 }, /* INT_34XX_GPIO_BANK6 */ 2021 { .irq = 34 }, /* INT_34XX_GPIO_BANK6 */
2022 { .irq = -1 }
2317}; 2023};
2318 2024
2319static struct omap_hwmod_opt_clk gpio6_opt_clks[] = { 2025static struct omap_hwmod_opt_clk gpio6_opt_clks[] = {
@@ -2328,7 +2034,6 @@ static struct omap_hwmod omap3xxx_gpio6_hwmod = {
2328 .name = "gpio6", 2034 .name = "gpio6",
2329 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, 2035 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
2330 .mpu_irqs = omap3xxx_gpio6_irqs, 2036 .mpu_irqs = omap3xxx_gpio6_irqs,
2331 .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_gpio6_irqs),
2332 .main_clk = "gpio6_ick", 2037 .main_clk = "gpio6_ick",
2333 .opt_clks = gpio6_opt_clks, 2038 .opt_clks = gpio6_opt_clks,
2334 .opt_clks_cnt = ARRAY_SIZE(gpio6_opt_clks), 2039 .opt_clks_cnt = ARRAY_SIZE(gpio6_opt_clks),
@@ -2382,19 +2087,13 @@ static struct omap_hwmod_class omap3xxx_dma_hwmod_class = {
2382}; 2087};
2383 2088
2384/* dma_system */ 2089/* dma_system */
2385static struct omap_hwmod_irq_info omap3xxx_dma_system_irqs[] = {
2386 { .name = "0", .irq = 12 }, /* INT_24XX_SDMA_IRQ0 */
2387 { .name = "1", .irq = 13 }, /* INT_24XX_SDMA_IRQ1 */
2388 { .name = "2", .irq = 14 }, /* INT_24XX_SDMA_IRQ2 */
2389 { .name = "3", .irq = 15 }, /* INT_24XX_SDMA_IRQ3 */
2390};
2391
2392static struct omap_hwmod_addr_space omap3xxx_dma_system_addrs[] = { 2090static struct omap_hwmod_addr_space omap3xxx_dma_system_addrs[] = {
2393 { 2091 {
2394 .pa_start = 0x48056000, 2092 .pa_start = 0x48056000,
2395 .pa_end = 0x48056fff, 2093 .pa_end = 0x48056fff,
2396 .flags = ADDR_TYPE_RT 2094 .flags = ADDR_TYPE_RT
2397 }, 2095 },
2096 { }
2398}; 2097};
2399 2098
2400/* dma_system master ports */ 2099/* dma_system master ports */
@@ -2408,7 +2107,6 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_core__dma_system = {
2408 .slave = &omap3xxx_dma_system_hwmod, 2107 .slave = &omap3xxx_dma_system_hwmod,
2409 .clk = "core_l4_ick", 2108 .clk = "core_l4_ick",
2410 .addr = omap3xxx_dma_system_addrs, 2109 .addr = omap3xxx_dma_system_addrs,
2411 .addr_cnt = ARRAY_SIZE(omap3xxx_dma_system_addrs),
2412 .user = OCP_USER_MPU | OCP_USER_SDMA, 2110 .user = OCP_USER_MPU | OCP_USER_SDMA,
2413}; 2111};
2414 2112
@@ -2420,8 +2118,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_dma_system_slaves[] = {
2420static struct omap_hwmod omap3xxx_dma_system_hwmod = { 2118static struct omap_hwmod omap3xxx_dma_system_hwmod = {
2421 .name = "dma", 2119 .name = "dma",
2422 .class = &omap3xxx_dma_hwmod_class, 2120 .class = &omap3xxx_dma_hwmod_class,
2423 .mpu_irqs = omap3xxx_dma_system_irqs, 2121 .mpu_irqs = omap2_dma_system_irqs,
2424 .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_dma_system_irqs),
2425 .main_clk = "core_l3_ick", 2122 .main_clk = "core_l3_ick",
2426 .prcm = { 2123 .prcm = {
2427 .omap2 = { 2124 .omap2 = {
@@ -2466,11 +2163,7 @@ static struct omap_hwmod_irq_info omap3xxx_mcbsp1_irqs[] = {
2466 { .name = "irq", .irq = 16 }, 2163 { .name = "irq", .irq = 16 },
2467 { .name = "tx", .irq = 59 }, 2164 { .name = "tx", .irq = 59 },
2468 { .name = "rx", .irq = 60 }, 2165 { .name = "rx", .irq = 60 },
2469}; 2166 { .irq = -1 }
2470
2471static struct omap_hwmod_dma_info omap3xxx_mcbsp1_sdma_chs[] = {
2472 { .name = "rx", .dma_req = 32 },
2473 { .name = "tx", .dma_req = 31 },
2474}; 2167};
2475 2168
2476static struct omap_hwmod_addr_space omap3xxx_mcbsp1_addrs[] = { 2169static struct omap_hwmod_addr_space omap3xxx_mcbsp1_addrs[] = {
@@ -2480,6 +2173,7 @@ static struct omap_hwmod_addr_space omap3xxx_mcbsp1_addrs[] = {
2480 .pa_end = 0x480740ff, 2173 .pa_end = 0x480740ff,
2481 .flags = ADDR_TYPE_RT 2174 .flags = ADDR_TYPE_RT
2482 }, 2175 },
2176 { }
2483}; 2177};
2484 2178
2485/* l4_core -> mcbsp1 */ 2179/* l4_core -> mcbsp1 */
@@ -2488,7 +2182,6 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_core__mcbsp1 = {
2488 .slave = &omap3xxx_mcbsp1_hwmod, 2182 .slave = &omap3xxx_mcbsp1_hwmod,
2489 .clk = "mcbsp1_ick", 2183 .clk = "mcbsp1_ick",
2490 .addr = omap3xxx_mcbsp1_addrs, 2184 .addr = omap3xxx_mcbsp1_addrs,
2491 .addr_cnt = ARRAY_SIZE(omap3xxx_mcbsp1_addrs),
2492 .user = OCP_USER_MPU | OCP_USER_SDMA, 2185 .user = OCP_USER_MPU | OCP_USER_SDMA,
2493}; 2186};
2494 2187
@@ -2501,9 +2194,7 @@ static struct omap_hwmod omap3xxx_mcbsp1_hwmod = {
2501 .name = "mcbsp1", 2194 .name = "mcbsp1",
2502 .class = &omap3xxx_mcbsp_hwmod_class, 2195 .class = &omap3xxx_mcbsp_hwmod_class,
2503 .mpu_irqs = omap3xxx_mcbsp1_irqs, 2196 .mpu_irqs = omap3xxx_mcbsp1_irqs,
2504 .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp1_irqs), 2197 .sdma_reqs = omap2_mcbsp1_sdma_reqs,
2505 .sdma_reqs = omap3xxx_mcbsp1_sdma_chs,
2506 .sdma_reqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp1_sdma_chs),
2507 .main_clk = "mcbsp1_fck", 2198 .main_clk = "mcbsp1_fck",
2508 .prcm = { 2199 .prcm = {
2509 .omap2 = { 2200 .omap2 = {
@@ -2524,11 +2215,7 @@ static struct omap_hwmod_irq_info omap3xxx_mcbsp2_irqs[] = {
2524 { .name = "irq", .irq = 17 }, 2215 { .name = "irq", .irq = 17 },
2525 { .name = "tx", .irq = 62 }, 2216 { .name = "tx", .irq = 62 },
2526 { .name = "rx", .irq = 63 }, 2217 { .name = "rx", .irq = 63 },
2527}; 2218 { .irq = -1 }
2528
2529static struct omap_hwmod_dma_info omap3xxx_mcbsp2_sdma_chs[] = {
2530 { .name = "rx", .dma_req = 34 },
2531 { .name = "tx", .dma_req = 33 },
2532}; 2219};
2533 2220
2534static struct omap_hwmod_addr_space omap3xxx_mcbsp2_addrs[] = { 2221static struct omap_hwmod_addr_space omap3xxx_mcbsp2_addrs[] = {
@@ -2538,6 +2225,7 @@ static struct omap_hwmod_addr_space omap3xxx_mcbsp2_addrs[] = {
2538 .pa_end = 0x490220ff, 2225 .pa_end = 0x490220ff,
2539 .flags = ADDR_TYPE_RT 2226 .flags = ADDR_TYPE_RT
2540 }, 2227 },
2228 { }
2541}; 2229};
2542 2230
2543/* l4_per -> mcbsp2 */ 2231/* l4_per -> mcbsp2 */
@@ -2546,7 +2234,6 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp2 = {
2546 .slave = &omap3xxx_mcbsp2_hwmod, 2234 .slave = &omap3xxx_mcbsp2_hwmod,
2547 .clk = "mcbsp2_ick", 2235 .clk = "mcbsp2_ick",
2548 .addr = omap3xxx_mcbsp2_addrs, 2236 .addr = omap3xxx_mcbsp2_addrs,
2549 .addr_cnt = ARRAY_SIZE(omap3xxx_mcbsp2_addrs),
2550 .user = OCP_USER_MPU | OCP_USER_SDMA, 2237 .user = OCP_USER_MPU | OCP_USER_SDMA,
2551}; 2238};
2552 2239
@@ -2563,9 +2250,7 @@ static struct omap_hwmod omap3xxx_mcbsp2_hwmod = {
2563 .name = "mcbsp2", 2250 .name = "mcbsp2",
2564 .class = &omap3xxx_mcbsp_hwmod_class, 2251 .class = &omap3xxx_mcbsp_hwmod_class,
2565 .mpu_irqs = omap3xxx_mcbsp2_irqs, 2252 .mpu_irqs = omap3xxx_mcbsp2_irqs,
2566 .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp2_irqs), 2253 .sdma_reqs = omap2_mcbsp2_sdma_reqs,
2567 .sdma_reqs = omap3xxx_mcbsp2_sdma_chs,
2568 .sdma_reqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp2_sdma_chs),
2569 .main_clk = "mcbsp2_fck", 2254 .main_clk = "mcbsp2_fck",
2570 .prcm = { 2255 .prcm = {
2571 .omap2 = { 2256 .omap2 = {
@@ -2587,11 +2272,7 @@ static struct omap_hwmod_irq_info omap3xxx_mcbsp3_irqs[] = {
2587 { .name = "irq", .irq = 22 }, 2272 { .name = "irq", .irq = 22 },
2588 { .name = "tx", .irq = 89 }, 2273 { .name = "tx", .irq = 89 },
2589 { .name = "rx", .irq = 90 }, 2274 { .name = "rx", .irq = 90 },
2590}; 2275 { .irq = -1 }
2591
2592static struct omap_hwmod_dma_info omap3xxx_mcbsp3_sdma_chs[] = {
2593 { .name = "rx", .dma_req = 18 },
2594 { .name = "tx", .dma_req = 17 },
2595}; 2276};
2596 2277
2597static struct omap_hwmod_addr_space omap3xxx_mcbsp3_addrs[] = { 2278static struct omap_hwmod_addr_space omap3xxx_mcbsp3_addrs[] = {
@@ -2601,6 +2282,7 @@ static struct omap_hwmod_addr_space omap3xxx_mcbsp3_addrs[] = {
2601 .pa_end = 0x490240ff, 2282 .pa_end = 0x490240ff,
2602 .flags = ADDR_TYPE_RT 2283 .flags = ADDR_TYPE_RT
2603 }, 2284 },
2285 { }
2604}; 2286};
2605 2287
2606/* l4_per -> mcbsp3 */ 2288/* l4_per -> mcbsp3 */
@@ -2609,7 +2291,6 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp3 = {
2609 .slave = &omap3xxx_mcbsp3_hwmod, 2291 .slave = &omap3xxx_mcbsp3_hwmod,
2610 .clk = "mcbsp3_ick", 2292 .clk = "mcbsp3_ick",
2611 .addr = omap3xxx_mcbsp3_addrs, 2293 .addr = omap3xxx_mcbsp3_addrs,
2612 .addr_cnt = ARRAY_SIZE(omap3xxx_mcbsp3_addrs),
2613 .user = OCP_USER_MPU | OCP_USER_SDMA, 2294 .user = OCP_USER_MPU | OCP_USER_SDMA,
2614}; 2295};
2615 2296
@@ -2626,9 +2307,7 @@ static struct omap_hwmod omap3xxx_mcbsp3_hwmod = {
2626 .name = "mcbsp3", 2307 .name = "mcbsp3",
2627 .class = &omap3xxx_mcbsp_hwmod_class, 2308 .class = &omap3xxx_mcbsp_hwmod_class,
2628 .mpu_irqs = omap3xxx_mcbsp3_irqs, 2309 .mpu_irqs = omap3xxx_mcbsp3_irqs,
2629 .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp3_irqs), 2310 .sdma_reqs = omap2_mcbsp3_sdma_reqs,
2630 .sdma_reqs = omap3xxx_mcbsp3_sdma_chs,
2631 .sdma_reqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp3_sdma_chs),
2632 .main_clk = "mcbsp3_fck", 2311 .main_clk = "mcbsp3_fck",
2633 .prcm = { 2312 .prcm = {
2634 .omap2 = { 2313 .omap2 = {
@@ -2650,11 +2329,13 @@ static struct omap_hwmod_irq_info omap3xxx_mcbsp4_irqs[] = {
2650 { .name = "irq", .irq = 23 }, 2329 { .name = "irq", .irq = 23 },
2651 { .name = "tx", .irq = 54 }, 2330 { .name = "tx", .irq = 54 },
2652 { .name = "rx", .irq = 55 }, 2331 { .name = "rx", .irq = 55 },
2332 { .irq = -1 }
2653}; 2333};
2654 2334
2655static struct omap_hwmod_dma_info omap3xxx_mcbsp4_sdma_chs[] = { 2335static struct omap_hwmod_dma_info omap3xxx_mcbsp4_sdma_chs[] = {
2656 { .name = "rx", .dma_req = 20 }, 2336 { .name = "rx", .dma_req = 20 },
2657 { .name = "tx", .dma_req = 19 }, 2337 { .name = "tx", .dma_req = 19 },
2338 { .dma_req = -1 }
2658}; 2339};
2659 2340
2660static struct omap_hwmod_addr_space omap3xxx_mcbsp4_addrs[] = { 2341static struct omap_hwmod_addr_space omap3xxx_mcbsp4_addrs[] = {
@@ -2664,6 +2345,7 @@ static struct omap_hwmod_addr_space omap3xxx_mcbsp4_addrs[] = {
2664 .pa_end = 0x490260ff, 2345 .pa_end = 0x490260ff,
2665 .flags = ADDR_TYPE_RT 2346 .flags = ADDR_TYPE_RT
2666 }, 2347 },
2348 { }
2667}; 2349};
2668 2350
2669/* l4_per -> mcbsp4 */ 2351/* l4_per -> mcbsp4 */
@@ -2672,7 +2354,6 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp4 = {
2672 .slave = &omap3xxx_mcbsp4_hwmod, 2354 .slave = &omap3xxx_mcbsp4_hwmod,
2673 .clk = "mcbsp4_ick", 2355 .clk = "mcbsp4_ick",
2674 .addr = omap3xxx_mcbsp4_addrs, 2356 .addr = omap3xxx_mcbsp4_addrs,
2675 .addr_cnt = ARRAY_SIZE(omap3xxx_mcbsp4_addrs),
2676 .user = OCP_USER_MPU | OCP_USER_SDMA, 2357 .user = OCP_USER_MPU | OCP_USER_SDMA,
2677}; 2358};
2678 2359
@@ -2685,9 +2366,7 @@ static struct omap_hwmod omap3xxx_mcbsp4_hwmod = {
2685 .name = "mcbsp4", 2366 .name = "mcbsp4",
2686 .class = &omap3xxx_mcbsp_hwmod_class, 2367 .class = &omap3xxx_mcbsp_hwmod_class,
2687 .mpu_irqs = omap3xxx_mcbsp4_irqs, 2368 .mpu_irqs = omap3xxx_mcbsp4_irqs,
2688 .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp4_irqs),
2689 .sdma_reqs = omap3xxx_mcbsp4_sdma_chs, 2369 .sdma_reqs = omap3xxx_mcbsp4_sdma_chs,
2690 .sdma_reqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp4_sdma_chs),
2691 .main_clk = "mcbsp4_fck", 2370 .main_clk = "mcbsp4_fck",
2692 .prcm = { 2371 .prcm = {
2693 .omap2 = { 2372 .omap2 = {
@@ -2708,11 +2387,13 @@ static struct omap_hwmod_irq_info omap3xxx_mcbsp5_irqs[] = {
2708 { .name = "irq", .irq = 27 }, 2387 { .name = "irq", .irq = 27 },
2709 { .name = "tx", .irq = 81 }, 2388 { .name = "tx", .irq = 81 },
2710 { .name = "rx", .irq = 82 }, 2389 { .name = "rx", .irq = 82 },
2390 { .irq = -1 }
2711}; 2391};
2712 2392
2713static struct omap_hwmod_dma_info omap3xxx_mcbsp5_sdma_chs[] = { 2393static struct omap_hwmod_dma_info omap3xxx_mcbsp5_sdma_chs[] = {
2714 { .name = "rx", .dma_req = 22 }, 2394 { .name = "rx", .dma_req = 22 },
2715 { .name = "tx", .dma_req = 21 }, 2395 { .name = "tx", .dma_req = 21 },
2396 { .dma_req = -1 }
2716}; 2397};
2717 2398
2718static struct omap_hwmod_addr_space omap3xxx_mcbsp5_addrs[] = { 2399static struct omap_hwmod_addr_space omap3xxx_mcbsp5_addrs[] = {
@@ -2722,6 +2403,7 @@ static struct omap_hwmod_addr_space omap3xxx_mcbsp5_addrs[] = {
2722 .pa_end = 0x480960ff, 2403 .pa_end = 0x480960ff,
2723 .flags = ADDR_TYPE_RT 2404 .flags = ADDR_TYPE_RT
2724 }, 2405 },
2406 { }
2725}; 2407};
2726 2408
2727/* l4_core -> mcbsp5 */ 2409/* l4_core -> mcbsp5 */
@@ -2730,7 +2412,6 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_core__mcbsp5 = {
2730 .slave = &omap3xxx_mcbsp5_hwmod, 2412 .slave = &omap3xxx_mcbsp5_hwmod,
2731 .clk = "mcbsp5_ick", 2413 .clk = "mcbsp5_ick",
2732 .addr = omap3xxx_mcbsp5_addrs, 2414 .addr = omap3xxx_mcbsp5_addrs,
2733 .addr_cnt = ARRAY_SIZE(omap3xxx_mcbsp5_addrs),
2734 .user = OCP_USER_MPU | OCP_USER_SDMA, 2415 .user = OCP_USER_MPU | OCP_USER_SDMA,
2735}; 2416};
2736 2417
@@ -2743,9 +2424,7 @@ static struct omap_hwmod omap3xxx_mcbsp5_hwmod = {
2743 .name = "mcbsp5", 2424 .name = "mcbsp5",
2744 .class = &omap3xxx_mcbsp_hwmod_class, 2425 .class = &omap3xxx_mcbsp_hwmod_class,
2745 .mpu_irqs = omap3xxx_mcbsp5_irqs, 2426 .mpu_irqs = omap3xxx_mcbsp5_irqs,
2746 .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp5_irqs),
2747 .sdma_reqs = omap3xxx_mcbsp5_sdma_chs, 2427 .sdma_reqs = omap3xxx_mcbsp5_sdma_chs,
2748 .sdma_reqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp5_sdma_chs),
2749 .main_clk = "mcbsp5_fck", 2428 .main_clk = "mcbsp5_fck",
2750 .prcm = { 2429 .prcm = {
2751 .omap2 = { 2430 .omap2 = {
@@ -2776,6 +2455,7 @@ static struct omap_hwmod_class omap3xxx_mcbsp_sidetone_hwmod_class = {
2776/* mcbsp2_sidetone */ 2455/* mcbsp2_sidetone */
2777static struct omap_hwmod_irq_info omap3xxx_mcbsp2_sidetone_irqs[] = { 2456static struct omap_hwmod_irq_info omap3xxx_mcbsp2_sidetone_irqs[] = {
2778 { .name = "irq", .irq = 4 }, 2457 { .name = "irq", .irq = 4 },
2458 { .irq = -1 }
2779}; 2459};
2780 2460
2781static struct omap_hwmod_addr_space omap3xxx_mcbsp2_sidetone_addrs[] = { 2461static struct omap_hwmod_addr_space omap3xxx_mcbsp2_sidetone_addrs[] = {
@@ -2785,6 +2465,7 @@ static struct omap_hwmod_addr_space omap3xxx_mcbsp2_sidetone_addrs[] = {
2785 .pa_end = 0x490280ff, 2465 .pa_end = 0x490280ff,
2786 .flags = ADDR_TYPE_RT 2466 .flags = ADDR_TYPE_RT
2787 }, 2467 },
2468 { }
2788}; 2469};
2789 2470
2790/* l4_per -> mcbsp2_sidetone */ 2471/* l4_per -> mcbsp2_sidetone */
@@ -2793,7 +2474,6 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp2_sidetone = {
2793 .slave = &omap3xxx_mcbsp2_sidetone_hwmod, 2474 .slave = &omap3xxx_mcbsp2_sidetone_hwmod,
2794 .clk = "mcbsp2_ick", 2475 .clk = "mcbsp2_ick",
2795 .addr = omap3xxx_mcbsp2_sidetone_addrs, 2476 .addr = omap3xxx_mcbsp2_sidetone_addrs,
2796 .addr_cnt = ARRAY_SIZE(omap3xxx_mcbsp2_sidetone_addrs),
2797 .user = OCP_USER_MPU, 2477 .user = OCP_USER_MPU,
2798}; 2478};
2799 2479
@@ -2806,7 +2486,6 @@ static struct omap_hwmod omap3xxx_mcbsp2_sidetone_hwmod = {
2806 .name = "mcbsp2_sidetone", 2486 .name = "mcbsp2_sidetone",
2807 .class = &omap3xxx_mcbsp_sidetone_hwmod_class, 2487 .class = &omap3xxx_mcbsp_sidetone_hwmod_class,
2808 .mpu_irqs = omap3xxx_mcbsp2_sidetone_irqs, 2488 .mpu_irqs = omap3xxx_mcbsp2_sidetone_irqs,
2809 .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp2_sidetone_irqs),
2810 .main_clk = "mcbsp2_fck", 2489 .main_clk = "mcbsp2_fck",
2811 .prcm = { 2490 .prcm = {
2812 .omap2 = { 2491 .omap2 = {
@@ -2825,6 +2504,7 @@ static struct omap_hwmod omap3xxx_mcbsp2_sidetone_hwmod = {
2825/* mcbsp3_sidetone */ 2504/* mcbsp3_sidetone */
2826static struct omap_hwmod_irq_info omap3xxx_mcbsp3_sidetone_irqs[] = { 2505static struct omap_hwmod_irq_info omap3xxx_mcbsp3_sidetone_irqs[] = {
2827 { .name = "irq", .irq = 5 }, 2506 { .name = "irq", .irq = 5 },
2507 { .irq = -1 }
2828}; 2508};
2829 2509
2830static struct omap_hwmod_addr_space omap3xxx_mcbsp3_sidetone_addrs[] = { 2510static struct omap_hwmod_addr_space omap3xxx_mcbsp3_sidetone_addrs[] = {
@@ -2834,6 +2514,7 @@ static struct omap_hwmod_addr_space omap3xxx_mcbsp3_sidetone_addrs[] = {
2834 .pa_end = 0x4902A0ff, 2514 .pa_end = 0x4902A0ff,
2835 .flags = ADDR_TYPE_RT 2515 .flags = ADDR_TYPE_RT
2836 }, 2516 },
2517 { }
2837}; 2518};
2838 2519
2839/* l4_per -> mcbsp3_sidetone */ 2520/* l4_per -> mcbsp3_sidetone */
@@ -2842,7 +2523,6 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_per__mcbsp3_sidetone = {
2842 .slave = &omap3xxx_mcbsp3_sidetone_hwmod, 2523 .slave = &omap3xxx_mcbsp3_sidetone_hwmod,
2843 .clk = "mcbsp3_ick", 2524 .clk = "mcbsp3_ick",
2844 .addr = omap3xxx_mcbsp3_sidetone_addrs, 2525 .addr = omap3xxx_mcbsp3_sidetone_addrs,
2845 .addr_cnt = ARRAY_SIZE(omap3xxx_mcbsp3_sidetone_addrs),
2846 .user = OCP_USER_MPU, 2526 .user = OCP_USER_MPU,
2847}; 2527};
2848 2528
@@ -2855,7 +2535,6 @@ static struct omap_hwmod omap3xxx_mcbsp3_sidetone_hwmod = {
2855 .name = "mcbsp3_sidetone", 2535 .name = "mcbsp3_sidetone",
2856 .class = &omap3xxx_mcbsp_sidetone_hwmod_class, 2536 .class = &omap3xxx_mcbsp_sidetone_hwmod_class,
2857 .mpu_irqs = omap3xxx_mcbsp3_sidetone_irqs, 2537 .mpu_irqs = omap3xxx_mcbsp3_sidetone_irqs,
2858 .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_mcbsp3_sidetone_irqs),
2859 .main_clk = "mcbsp3_fck", 2538 .main_clk = "mcbsp3_fck",
2860 .prcm = { 2539 .prcm = {
2861 .omap2 = { 2540 .omap2 = {
@@ -3025,6 +2704,7 @@ static struct omap_hwmod_class omap3xxx_mailbox_hwmod_class = {
3025static struct omap_hwmod omap3xxx_mailbox_hwmod; 2704static struct omap_hwmod omap3xxx_mailbox_hwmod;
3026static struct omap_hwmod_irq_info omap3xxx_mailbox_irqs[] = { 2705static struct omap_hwmod_irq_info omap3xxx_mailbox_irqs[] = {
3027 { .irq = 26 }, 2706 { .irq = 26 },
2707 { .irq = -1 }
3028}; 2708};
3029 2709
3030static struct omap_hwmod_addr_space omap3xxx_mailbox_addrs[] = { 2710static struct omap_hwmod_addr_space omap3xxx_mailbox_addrs[] = {
@@ -3033,6 +2713,7 @@ static struct omap_hwmod_addr_space omap3xxx_mailbox_addrs[] = {
3033 .pa_end = 0x480941ff, 2713 .pa_end = 0x480941ff,
3034 .flags = ADDR_TYPE_RT, 2714 .flags = ADDR_TYPE_RT,
3035 }, 2715 },
2716 { }
3036}; 2717};
3037 2718
3038/* l4_core -> mailbox */ 2719/* l4_core -> mailbox */
@@ -3040,7 +2721,6 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_core__mailbox = {
3040 .master = &omap3xxx_l4_core_hwmod, 2721 .master = &omap3xxx_l4_core_hwmod,
3041 .slave = &omap3xxx_mailbox_hwmod, 2722 .slave = &omap3xxx_mailbox_hwmod,
3042 .addr = omap3xxx_mailbox_addrs, 2723 .addr = omap3xxx_mailbox_addrs,
3043 .addr_cnt = ARRAY_SIZE(omap3xxx_mailbox_addrs),
3044 .user = OCP_USER_MPU | OCP_USER_SDMA, 2724 .user = OCP_USER_MPU | OCP_USER_SDMA,
3045}; 2725};
3046 2726
@@ -3053,7 +2733,6 @@ static struct omap_hwmod omap3xxx_mailbox_hwmod = {
3053 .name = "mailbox", 2733 .name = "mailbox",
3054 .class = &omap3xxx_mailbox_hwmod_class, 2734 .class = &omap3xxx_mailbox_hwmod_class,
3055 .mpu_irqs = omap3xxx_mailbox_irqs, 2735 .mpu_irqs = omap3xxx_mailbox_irqs,
3056 .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_mailbox_irqs),
3057 .main_clk = "mailboxes_ick", 2736 .main_clk = "mailboxes_ick",
3058 .prcm = { 2737 .prcm = {
3059 .omap2 = { 2738 .omap2 = {
@@ -3070,56 +2749,29 @@ static struct omap_hwmod omap3xxx_mailbox_hwmod = {
3070}; 2749};
3071 2750
3072/* l4 core -> mcspi1 interface */ 2751/* l4 core -> mcspi1 interface */
3073static struct omap_hwmod_addr_space omap34xx_mcspi1_addr_space[] = {
3074 {
3075 .pa_start = 0x48098000,
3076 .pa_end = 0x480980ff,
3077 .flags = ADDR_TYPE_RT,
3078 },
3079};
3080
3081static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi1 = { 2752static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi1 = {
3082 .master = &omap3xxx_l4_core_hwmod, 2753 .master = &omap3xxx_l4_core_hwmod,
3083 .slave = &omap34xx_mcspi1, 2754 .slave = &omap34xx_mcspi1,
3084 .clk = "mcspi1_ick", 2755 .clk = "mcspi1_ick",
3085 .addr = omap34xx_mcspi1_addr_space, 2756 .addr = omap2_mcspi1_addr_space,
3086 .addr_cnt = ARRAY_SIZE(omap34xx_mcspi1_addr_space),
3087 .user = OCP_USER_MPU | OCP_USER_SDMA, 2757 .user = OCP_USER_MPU | OCP_USER_SDMA,
3088}; 2758};
3089 2759
3090/* l4 core -> mcspi2 interface */ 2760/* l4 core -> mcspi2 interface */
3091static struct omap_hwmod_addr_space omap34xx_mcspi2_addr_space[] = {
3092 {
3093 .pa_start = 0x4809a000,
3094 .pa_end = 0x4809a0ff,
3095 .flags = ADDR_TYPE_RT,
3096 },
3097};
3098
3099static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi2 = { 2761static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi2 = {
3100 .master = &omap3xxx_l4_core_hwmod, 2762 .master = &omap3xxx_l4_core_hwmod,
3101 .slave = &omap34xx_mcspi2, 2763 .slave = &omap34xx_mcspi2,
3102 .clk = "mcspi2_ick", 2764 .clk = "mcspi2_ick",
3103 .addr = omap34xx_mcspi2_addr_space, 2765 .addr = omap2_mcspi2_addr_space,
3104 .addr_cnt = ARRAY_SIZE(omap34xx_mcspi2_addr_space),
3105 .user = OCP_USER_MPU | OCP_USER_SDMA, 2766 .user = OCP_USER_MPU | OCP_USER_SDMA,
3106}; 2767};
3107 2768
3108/* l4 core -> mcspi3 interface */ 2769/* l4 core -> mcspi3 interface */
3109static struct omap_hwmod_addr_space omap34xx_mcspi3_addr_space[] = {
3110 {
3111 .pa_start = 0x480b8000,
3112 .pa_end = 0x480b80ff,
3113 .flags = ADDR_TYPE_RT,
3114 },
3115};
3116
3117static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi3 = { 2770static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi3 = {
3118 .master = &omap3xxx_l4_core_hwmod, 2771 .master = &omap3xxx_l4_core_hwmod,
3119 .slave = &omap34xx_mcspi3, 2772 .slave = &omap34xx_mcspi3,
3120 .clk = "mcspi3_ick", 2773 .clk = "mcspi3_ick",
3121 .addr = omap34xx_mcspi3_addr_space, 2774 .addr = omap2430_mcspi3_addr_space,
3122 .addr_cnt = ARRAY_SIZE(omap34xx_mcspi3_addr_space),
3123 .user = OCP_USER_MPU | OCP_USER_SDMA, 2775 .user = OCP_USER_MPU | OCP_USER_SDMA,
3124}; 2776};
3125 2777
@@ -3130,6 +2782,7 @@ static struct omap_hwmod_addr_space omap34xx_mcspi4_addr_space[] = {
3130 .pa_end = 0x480ba0ff, 2782 .pa_end = 0x480ba0ff,
3131 .flags = ADDR_TYPE_RT, 2783 .flags = ADDR_TYPE_RT,
3132 }, 2784 },
2785 { }
3133}; 2786};
3134 2787
3135static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi4 = { 2788static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi4 = {
@@ -3137,7 +2790,6 @@ static struct omap_hwmod_ocp_if omap34xx_l4_core__mcspi4 = {
3137 .slave = &omap34xx_mcspi4, 2790 .slave = &omap34xx_mcspi4,
3138 .clk = "mcspi4_ick", 2791 .clk = "mcspi4_ick",
3139 .addr = omap34xx_mcspi4_addr_space, 2792 .addr = omap34xx_mcspi4_addr_space,
3140 .addr_cnt = ARRAY_SIZE(omap34xx_mcspi4_addr_space),
3141 .user = OCP_USER_MPU | OCP_USER_SDMA, 2793 .user = OCP_USER_MPU | OCP_USER_SDMA,
3142}; 2794};
3143 2795
@@ -3165,21 +2817,6 @@ static struct omap_hwmod_class omap34xx_mcspi_class = {
3165}; 2817};
3166 2818
3167/* mcspi1 */ 2819/* mcspi1 */
3168static struct omap_hwmod_irq_info omap34xx_mcspi1_mpu_irqs[] = {
3169 { .name = "irq", .irq = 65 },
3170};
3171
3172static struct omap_hwmod_dma_info omap34xx_mcspi1_sdma_reqs[] = {
3173 { .name = "tx0", .dma_req = 35 },
3174 { .name = "rx0", .dma_req = 36 },
3175 { .name = "tx1", .dma_req = 37 },
3176 { .name = "rx1", .dma_req = 38 },
3177 { .name = "tx2", .dma_req = 39 },
3178 { .name = "rx2", .dma_req = 40 },
3179 { .name = "tx3", .dma_req = 41 },
3180 { .name = "rx3", .dma_req = 42 },
3181};
3182
3183static struct omap_hwmod_ocp_if *omap34xx_mcspi1_slaves[] = { 2820static struct omap_hwmod_ocp_if *omap34xx_mcspi1_slaves[] = {
3184 &omap34xx_l4_core__mcspi1, 2821 &omap34xx_l4_core__mcspi1,
3185}; 2822};
@@ -3190,10 +2827,8 @@ static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = {
3190 2827
3191static struct omap_hwmod omap34xx_mcspi1 = { 2828static struct omap_hwmod omap34xx_mcspi1 = {
3192 .name = "mcspi1", 2829 .name = "mcspi1",
3193 .mpu_irqs = omap34xx_mcspi1_mpu_irqs, 2830 .mpu_irqs = omap2_mcspi1_mpu_irqs,
3194 .mpu_irqs_cnt = ARRAY_SIZE(omap34xx_mcspi1_mpu_irqs), 2831 .sdma_reqs = omap2_mcspi1_sdma_reqs,
3195 .sdma_reqs = omap34xx_mcspi1_sdma_reqs,
3196 .sdma_reqs_cnt = ARRAY_SIZE(omap34xx_mcspi1_sdma_reqs),
3197 .main_clk = "mcspi1_fck", 2832 .main_clk = "mcspi1_fck",
3198 .prcm = { 2833 .prcm = {
3199 .omap2 = { 2834 .omap2 = {
@@ -3212,17 +2847,6 @@ static struct omap_hwmod omap34xx_mcspi1 = {
3212}; 2847};
3213 2848
3214/* mcspi2 */ 2849/* mcspi2 */
3215static struct omap_hwmod_irq_info omap34xx_mcspi2_mpu_irqs[] = {
3216 { .name = "irq", .irq = 66 },
3217};
3218
3219static struct omap_hwmod_dma_info omap34xx_mcspi2_sdma_reqs[] = {
3220 { .name = "tx0", .dma_req = 43 },
3221 { .name = "rx0", .dma_req = 44 },
3222 { .name = "tx1", .dma_req = 45 },
3223 { .name = "rx1", .dma_req = 46 },
3224};
3225
3226static struct omap_hwmod_ocp_if *omap34xx_mcspi2_slaves[] = { 2850static struct omap_hwmod_ocp_if *omap34xx_mcspi2_slaves[] = {
3227 &omap34xx_l4_core__mcspi2, 2851 &omap34xx_l4_core__mcspi2,
3228}; 2852};
@@ -3233,10 +2857,8 @@ static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = {
3233 2857
3234static struct omap_hwmod omap34xx_mcspi2 = { 2858static struct omap_hwmod omap34xx_mcspi2 = {
3235 .name = "mcspi2", 2859 .name = "mcspi2",
3236 .mpu_irqs = omap34xx_mcspi2_mpu_irqs, 2860 .mpu_irqs = omap2_mcspi2_mpu_irqs,
3237 .mpu_irqs_cnt = ARRAY_SIZE(omap34xx_mcspi2_mpu_irqs), 2861 .sdma_reqs = omap2_mcspi2_sdma_reqs,
3238 .sdma_reqs = omap34xx_mcspi2_sdma_reqs,
3239 .sdma_reqs_cnt = ARRAY_SIZE(omap34xx_mcspi2_sdma_reqs),
3240 .main_clk = "mcspi2_fck", 2862 .main_clk = "mcspi2_fck",
3241 .prcm = { 2863 .prcm = {
3242 .omap2 = { 2864 .omap2 = {
@@ -3257,6 +2879,7 @@ static struct omap_hwmod omap34xx_mcspi2 = {
3257/* mcspi3 */ 2879/* mcspi3 */
3258static struct omap_hwmod_irq_info omap34xx_mcspi3_mpu_irqs[] = { 2880static struct omap_hwmod_irq_info omap34xx_mcspi3_mpu_irqs[] = {
3259 { .name = "irq", .irq = 91 }, /* 91 */ 2881 { .name = "irq", .irq = 91 }, /* 91 */
2882 { .irq = -1 }
3260}; 2883};
3261 2884
3262static struct omap_hwmod_dma_info omap34xx_mcspi3_sdma_reqs[] = { 2885static struct omap_hwmod_dma_info omap34xx_mcspi3_sdma_reqs[] = {
@@ -3264,6 +2887,7 @@ static struct omap_hwmod_dma_info omap34xx_mcspi3_sdma_reqs[] = {
3264 { .name = "rx0", .dma_req = 16 }, 2887 { .name = "rx0", .dma_req = 16 },
3265 { .name = "tx1", .dma_req = 23 }, 2888 { .name = "tx1", .dma_req = 23 },
3266 { .name = "rx1", .dma_req = 24 }, 2889 { .name = "rx1", .dma_req = 24 },
2890 { .dma_req = -1 }
3267}; 2891};
3268 2892
3269static struct omap_hwmod_ocp_if *omap34xx_mcspi3_slaves[] = { 2893static struct omap_hwmod_ocp_if *omap34xx_mcspi3_slaves[] = {
@@ -3277,9 +2901,7 @@ static struct omap2_mcspi_dev_attr omap_mcspi3_dev_attr = {
3277static struct omap_hwmod omap34xx_mcspi3 = { 2901static struct omap_hwmod omap34xx_mcspi3 = {
3278 .name = "mcspi3", 2902 .name = "mcspi3",
3279 .mpu_irqs = omap34xx_mcspi3_mpu_irqs, 2903 .mpu_irqs = omap34xx_mcspi3_mpu_irqs,
3280 .mpu_irqs_cnt = ARRAY_SIZE(omap34xx_mcspi3_mpu_irqs),
3281 .sdma_reqs = omap34xx_mcspi3_sdma_reqs, 2904 .sdma_reqs = omap34xx_mcspi3_sdma_reqs,
3282 .sdma_reqs_cnt = ARRAY_SIZE(omap34xx_mcspi3_sdma_reqs),
3283 .main_clk = "mcspi3_fck", 2905 .main_clk = "mcspi3_fck",
3284 .prcm = { 2906 .prcm = {
3285 .omap2 = { 2907 .omap2 = {
@@ -3300,11 +2922,13 @@ static struct omap_hwmod omap34xx_mcspi3 = {
3300/* SPI4 */ 2922/* SPI4 */
3301static struct omap_hwmod_irq_info omap34xx_mcspi4_mpu_irqs[] = { 2923static struct omap_hwmod_irq_info omap34xx_mcspi4_mpu_irqs[] = {
3302 { .name = "irq", .irq = INT_34XX_SPI4_IRQ }, /* 48 */ 2924 { .name = "irq", .irq = INT_34XX_SPI4_IRQ }, /* 48 */
2925 { .irq = -1 }
3303}; 2926};
3304 2927
3305static struct omap_hwmod_dma_info omap34xx_mcspi4_sdma_reqs[] = { 2928static struct omap_hwmod_dma_info omap34xx_mcspi4_sdma_reqs[] = {
3306 { .name = "tx0", .dma_req = 70 }, /* DMA_SPI4_TX0 */ 2929 { .name = "tx0", .dma_req = 70 }, /* DMA_SPI4_TX0 */
3307 { .name = "rx0", .dma_req = 71 }, /* DMA_SPI4_RX0 */ 2930 { .name = "rx0", .dma_req = 71 }, /* DMA_SPI4_RX0 */
2931 { .dma_req = -1 }
3308}; 2932};
3309 2933
3310static struct omap_hwmod_ocp_if *omap34xx_mcspi4_slaves[] = { 2934static struct omap_hwmod_ocp_if *omap34xx_mcspi4_slaves[] = {
@@ -3318,9 +2942,7 @@ static struct omap2_mcspi_dev_attr omap_mcspi4_dev_attr = {
3318static struct omap_hwmod omap34xx_mcspi4 = { 2942static struct omap_hwmod omap34xx_mcspi4 = {
3319 .name = "mcspi4", 2943 .name = "mcspi4",
3320 .mpu_irqs = omap34xx_mcspi4_mpu_irqs, 2944 .mpu_irqs = omap34xx_mcspi4_mpu_irqs,
3321 .mpu_irqs_cnt = ARRAY_SIZE(omap34xx_mcspi4_mpu_irqs),
3322 .sdma_reqs = omap34xx_mcspi4_sdma_reqs, 2945 .sdma_reqs = omap34xx_mcspi4_sdma_reqs,
3323 .sdma_reqs_cnt = ARRAY_SIZE(omap34xx_mcspi4_sdma_reqs),
3324 .main_clk = "mcspi4_fck", 2946 .main_clk = "mcspi4_fck",
3325 .prcm = { 2947 .prcm = {
3326 .omap2 = { 2948 .omap2 = {
@@ -3362,12 +2984,12 @@ static struct omap_hwmod_irq_info omap3xxx_usbhsotg_mpu_irqs[] = {
3362 2984
3363 { .name = "mc", .irq = 92 }, 2985 { .name = "mc", .irq = 92 },
3364 { .name = "dma", .irq = 93 }, 2986 { .name = "dma", .irq = 93 },
2987 { .irq = -1 }
3365}; 2988};
3366 2989
3367static struct omap_hwmod omap3xxx_usbhsotg_hwmod = { 2990static struct omap_hwmod omap3xxx_usbhsotg_hwmod = {
3368 .name = "usb_otg_hs", 2991 .name = "usb_otg_hs",
3369 .mpu_irqs = omap3xxx_usbhsotg_mpu_irqs, 2992 .mpu_irqs = omap3xxx_usbhsotg_mpu_irqs,
3370 .mpu_irqs_cnt = ARRAY_SIZE(omap3xxx_usbhsotg_mpu_irqs),
3371 .main_clk = "hsotgusb_ick", 2993 .main_clk = "hsotgusb_ick",
3372 .prcm = { 2994 .prcm = {
3373 .omap2 = { 2995 .omap2 = {
@@ -3399,6 +3021,7 @@ static struct omap_hwmod omap3xxx_usbhsotg_hwmod = {
3399static struct omap_hwmod_irq_info am35xx_usbhsotg_mpu_irqs[] = { 3021static struct omap_hwmod_irq_info am35xx_usbhsotg_mpu_irqs[] = {
3400 3022
3401 { .name = "mc", .irq = 71 }, 3023 { .name = "mc", .irq = 71 },
3024 { .irq = -1 }
3402}; 3025};
3403 3026
3404static struct omap_hwmod_class am35xx_usbotg_class = { 3027static struct omap_hwmod_class am35xx_usbotg_class = {
@@ -3409,7 +3032,6 @@ static struct omap_hwmod_class am35xx_usbotg_class = {
3409static struct omap_hwmod am35xx_usbhsotg_hwmod = { 3032static struct omap_hwmod am35xx_usbhsotg_hwmod = {
3410 .name = "am35x_otg_hs", 3033 .name = "am35x_otg_hs",
3411 .mpu_irqs = am35xx_usbhsotg_mpu_irqs, 3034 .mpu_irqs = am35xx_usbhsotg_mpu_irqs,
3412 .mpu_irqs_cnt = ARRAY_SIZE(am35xx_usbhsotg_mpu_irqs),
3413 .main_clk = NULL, 3035 .main_clk = NULL,
3414 .prcm = { 3036 .prcm = {
3415 .omap2 = { 3037 .omap2 = {
@@ -3445,11 +3067,13 @@ static struct omap_hwmod_class omap34xx_mmc_class = {
3445 3067
3446static struct omap_hwmod_irq_info omap34xx_mmc1_mpu_irqs[] = { 3068static struct omap_hwmod_irq_info omap34xx_mmc1_mpu_irqs[] = {
3447 { .irq = 83, }, 3069 { .irq = 83, },
3070 { .irq = -1 }
3448}; 3071};
3449 3072
3450static struct omap_hwmod_dma_info omap34xx_mmc1_sdma_reqs[] = { 3073static struct omap_hwmod_dma_info omap34xx_mmc1_sdma_reqs[] = {
3451 { .name = "tx", .dma_req = 61, }, 3074 { .name = "tx", .dma_req = 61, },
3452 { .name = "rx", .dma_req = 62, }, 3075 { .name = "rx", .dma_req = 62, },
3076 { .dma_req = -1 }
3453}; 3077};
3454 3078
3455static struct omap_hwmod_opt_clk omap34xx_mmc1_opt_clks[] = { 3079static struct omap_hwmod_opt_clk omap34xx_mmc1_opt_clks[] = {
@@ -3467,9 +3091,7 @@ static struct omap_mmc_dev_attr mmc1_dev_attr = {
3467static struct omap_hwmod omap3xxx_mmc1_hwmod = { 3091static struct omap_hwmod omap3xxx_mmc1_hwmod = {
3468 .name = "mmc1", 3092 .name = "mmc1",
3469 .mpu_irqs = omap34xx_mmc1_mpu_irqs, 3093 .mpu_irqs = omap34xx_mmc1_mpu_irqs,
3470 .mpu_irqs_cnt = ARRAY_SIZE(omap34xx_mmc1_mpu_irqs),
3471 .sdma_reqs = omap34xx_mmc1_sdma_reqs, 3094 .sdma_reqs = omap34xx_mmc1_sdma_reqs,
3472 .sdma_reqs_cnt = ARRAY_SIZE(omap34xx_mmc1_sdma_reqs),
3473 .opt_clks = omap34xx_mmc1_opt_clks, 3095 .opt_clks = omap34xx_mmc1_opt_clks,
3474 .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc1_opt_clks), 3096 .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc1_opt_clks),
3475 .main_clk = "mmchs1_fck", 3097 .main_clk = "mmchs1_fck",
@@ -3493,11 +3115,13 @@ static struct omap_hwmod omap3xxx_mmc1_hwmod = {
3493 3115
3494static struct omap_hwmod_irq_info omap34xx_mmc2_mpu_irqs[] = { 3116static struct omap_hwmod_irq_info omap34xx_mmc2_mpu_irqs[] = {
3495 { .irq = INT_24XX_MMC2_IRQ, }, 3117 { .irq = INT_24XX_MMC2_IRQ, },
3118 { .irq = -1 }
3496}; 3119};
3497 3120
3498static struct omap_hwmod_dma_info omap34xx_mmc2_sdma_reqs[] = { 3121static struct omap_hwmod_dma_info omap34xx_mmc2_sdma_reqs[] = {
3499 { .name = "tx", .dma_req = 47, }, 3122 { .name = "tx", .dma_req = 47, },
3500 { .name = "rx", .dma_req = 48, }, 3123 { .name = "rx", .dma_req = 48, },
3124 { .dma_req = -1 }
3501}; 3125};
3502 3126
3503static struct omap_hwmod_opt_clk omap34xx_mmc2_opt_clks[] = { 3127static struct omap_hwmod_opt_clk omap34xx_mmc2_opt_clks[] = {
@@ -3511,9 +3135,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_mmc2_slaves[] = {
3511static struct omap_hwmod omap3xxx_mmc2_hwmod = { 3135static struct omap_hwmod omap3xxx_mmc2_hwmod = {
3512 .name = "mmc2", 3136 .name = "mmc2",
3513 .mpu_irqs = omap34xx_mmc2_mpu_irqs, 3137 .mpu_irqs = omap34xx_mmc2_mpu_irqs,
3514 .mpu_irqs_cnt = ARRAY_SIZE(omap34xx_mmc2_mpu_irqs),
3515 .sdma_reqs = omap34xx_mmc2_sdma_reqs, 3138 .sdma_reqs = omap34xx_mmc2_sdma_reqs,
3516 .sdma_reqs_cnt = ARRAY_SIZE(omap34xx_mmc2_sdma_reqs),
3517 .opt_clks = omap34xx_mmc2_opt_clks, 3139 .opt_clks = omap34xx_mmc2_opt_clks,
3518 .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc2_opt_clks), 3140 .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc2_opt_clks),
3519 .main_clk = "mmchs2_fck", 3141 .main_clk = "mmchs2_fck",
@@ -3536,11 +3158,13 @@ static struct omap_hwmod omap3xxx_mmc2_hwmod = {
3536 3158
3537static struct omap_hwmod_irq_info omap34xx_mmc3_mpu_irqs[] = { 3159static struct omap_hwmod_irq_info omap34xx_mmc3_mpu_irqs[] = {
3538 { .irq = 94, }, 3160 { .irq = 94, },
3161 { .irq = -1 }
3539}; 3162};
3540 3163
3541static struct omap_hwmod_dma_info omap34xx_mmc3_sdma_reqs[] = { 3164static struct omap_hwmod_dma_info omap34xx_mmc3_sdma_reqs[] = {
3542 { .name = "tx", .dma_req = 77, }, 3165 { .name = "tx", .dma_req = 77, },
3543 { .name = "rx", .dma_req = 78, }, 3166 { .name = "rx", .dma_req = 78, },
3167 { .dma_req = -1 }
3544}; 3168};
3545 3169
3546static struct omap_hwmod_opt_clk omap34xx_mmc3_opt_clks[] = { 3170static struct omap_hwmod_opt_clk omap34xx_mmc3_opt_clks[] = {
@@ -3554,9 +3178,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_mmc3_slaves[] = {
3554static struct omap_hwmod omap3xxx_mmc3_hwmod = { 3178static struct omap_hwmod omap3xxx_mmc3_hwmod = {
3555 .name = "mmc3", 3179 .name = "mmc3",
3556 .mpu_irqs = omap34xx_mmc3_mpu_irqs, 3180 .mpu_irqs = omap34xx_mmc3_mpu_irqs,
3557 .mpu_irqs_cnt = ARRAY_SIZE(omap34xx_mmc3_mpu_irqs),
3558 .sdma_reqs = omap34xx_mmc3_sdma_reqs, 3181 .sdma_reqs = omap34xx_mmc3_sdma_reqs,
3559 .sdma_reqs_cnt = ARRAY_SIZE(omap34xx_mmc3_sdma_reqs),
3560 .opt_clks = omap34xx_mmc3_opt_clks, 3182 .opt_clks = omap34xx_mmc3_opt_clks,
3561 .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc3_opt_clks), 3183 .opt_clks_cnt = ARRAY_SIZE(omap34xx_mmc3_opt_clks),
3562 .main_clk = "mmchs3_fck", 3184 .main_clk = "mmchs3_fck",
diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
index e1c69ffe0f6..6201422c060 100644
--- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
@@ -22,11 +22,13 @@
22 22
23#include <plat/omap_hwmod.h> 23#include <plat/omap_hwmod.h>
24#include <plat/cpu.h> 24#include <plat/cpu.h>
25#include <plat/i2c.h>
25#include <plat/gpio.h> 26#include <plat/gpio.h>
26#include <plat/dma.h> 27#include <plat/dma.h>
27#include <plat/mcspi.h> 28#include <plat/mcspi.h>
28#include <plat/mcbsp.h> 29#include <plat/mcbsp.h>
29#include <plat/mmc.h> 30#include <plat/mmc.h>
31#include <plat/i2c.h>
30 32
31#include "omap_hwmod_common_data.h" 33#include "omap_hwmod_common_data.h"
32 34
@@ -80,7 +82,12 @@ static struct omap_hwmod_class omap44xx_dmm_hwmod_class = {
80 .name = "dmm", 82 .name = "dmm",
81}; 83};
82 84
83/* dmm interface data */ 85/* dmm */
86static struct omap_hwmod_irq_info omap44xx_dmm_irqs[] = {
87 { .irq = 113 + OMAP44XX_IRQ_GIC_START },
88 { .irq = -1 }
89};
90
84/* l3_main_1 -> dmm */ 91/* l3_main_1 -> dmm */
85static struct omap_hwmod_ocp_if omap44xx_l3_main_1__dmm = { 92static struct omap_hwmod_ocp_if omap44xx_l3_main_1__dmm = {
86 .master = &omap44xx_l3_main_1_hwmod, 93 .master = &omap44xx_l3_main_1_hwmod,
@@ -95,6 +102,7 @@ static struct omap_hwmod_addr_space omap44xx_dmm_addrs[] = {
95 .pa_end = 0x4e0007ff, 102 .pa_end = 0x4e0007ff,
96 .flags = ADDR_TYPE_RT 103 .flags = ADDR_TYPE_RT
97 }, 104 },
105 { }
98}; 106};
99 107
100/* mpu -> dmm */ 108/* mpu -> dmm */
@@ -103,7 +111,6 @@ static struct omap_hwmod_ocp_if omap44xx_mpu__dmm = {
103 .slave = &omap44xx_dmm_hwmod, 111 .slave = &omap44xx_dmm_hwmod,
104 .clk = "l3_div_ck", 112 .clk = "l3_div_ck",
105 .addr = omap44xx_dmm_addrs, 113 .addr = omap44xx_dmm_addrs,
106 .addr_cnt = ARRAY_SIZE(omap44xx_dmm_addrs),
107 .user = OCP_USER_MPU, 114 .user = OCP_USER_MPU,
108}; 115};
109 116
@@ -113,17 +120,19 @@ static struct omap_hwmod_ocp_if *omap44xx_dmm_slaves[] = {
113 &omap44xx_mpu__dmm, 120 &omap44xx_mpu__dmm,
114}; 121};
115 122
116static struct omap_hwmod_irq_info omap44xx_dmm_irqs[] = {
117 { .irq = 113 + OMAP44XX_IRQ_GIC_START },
118};
119
120static struct omap_hwmod omap44xx_dmm_hwmod = { 123static struct omap_hwmod omap44xx_dmm_hwmod = {
121 .name = "dmm", 124 .name = "dmm",
122 .class = &omap44xx_dmm_hwmod_class, 125 .class = &omap44xx_dmm_hwmod_class,
126 .clkdm_name = "l3_emif_clkdm",
127 .prcm = {
128 .omap4 = {
129 .clkctrl_offs = OMAP4_CM_MEMIF_DMM_CLKCTRL_OFFSET,
130 .context_offs = OMAP4_RM_MEMIF_DMM_CONTEXT_OFFSET,
131 },
132 },
123 .slaves = omap44xx_dmm_slaves, 133 .slaves = omap44xx_dmm_slaves,
124 .slaves_cnt = ARRAY_SIZE(omap44xx_dmm_slaves), 134 .slaves_cnt = ARRAY_SIZE(omap44xx_dmm_slaves),
125 .mpu_irqs = omap44xx_dmm_irqs, 135 .mpu_irqs = omap44xx_dmm_irqs,
126 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_dmm_irqs),
127 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), 136 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
128}; 137};
129 138
@@ -135,7 +144,7 @@ static struct omap_hwmod_class omap44xx_emif_fw_hwmod_class = {
135 .name = "emif_fw", 144 .name = "emif_fw",
136}; 145};
137 146
138/* emif_fw interface data */ 147/* emif_fw */
139/* dmm -> emif_fw */ 148/* dmm -> emif_fw */
140static struct omap_hwmod_ocp_if omap44xx_dmm__emif_fw = { 149static struct omap_hwmod_ocp_if omap44xx_dmm__emif_fw = {
141 .master = &omap44xx_dmm_hwmod, 150 .master = &omap44xx_dmm_hwmod,
@@ -150,6 +159,7 @@ static struct omap_hwmod_addr_space omap44xx_emif_fw_addrs[] = {
150 .pa_end = 0x4a20c0ff, 159 .pa_end = 0x4a20c0ff,
151 .flags = ADDR_TYPE_RT 160 .flags = ADDR_TYPE_RT
152 }, 161 },
162 { }
153}; 163};
154 164
155/* l4_cfg -> emif_fw */ 165/* l4_cfg -> emif_fw */
@@ -158,7 +168,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_cfg__emif_fw = {
158 .slave = &omap44xx_emif_fw_hwmod, 168 .slave = &omap44xx_emif_fw_hwmod,
159 .clk = "l4_div_ck", 169 .clk = "l4_div_ck",
160 .addr = omap44xx_emif_fw_addrs, 170 .addr = omap44xx_emif_fw_addrs,
161 .addr_cnt = ARRAY_SIZE(omap44xx_emif_fw_addrs),
162 .user = OCP_USER_MPU, 171 .user = OCP_USER_MPU,
163}; 172};
164 173
@@ -171,6 +180,13 @@ static struct omap_hwmod_ocp_if *omap44xx_emif_fw_slaves[] = {
171static struct omap_hwmod omap44xx_emif_fw_hwmod = { 180static struct omap_hwmod omap44xx_emif_fw_hwmod = {
172 .name = "emif_fw", 181 .name = "emif_fw",
173 .class = &omap44xx_emif_fw_hwmod_class, 182 .class = &omap44xx_emif_fw_hwmod_class,
183 .clkdm_name = "l3_emif_clkdm",
184 .prcm = {
185 .omap4 = {
186 .clkctrl_offs = OMAP4_CM_MEMIF_EMIF_FW_CLKCTRL_OFFSET,
187 .context_offs = OMAP4_RM_MEMIF_EMIF_FW_CONTEXT_OFFSET,
188 },
189 },
174 .slaves = omap44xx_emif_fw_slaves, 190 .slaves = omap44xx_emif_fw_slaves,
175 .slaves_cnt = ARRAY_SIZE(omap44xx_emif_fw_slaves), 191 .slaves_cnt = ARRAY_SIZE(omap44xx_emif_fw_slaves),
176 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), 192 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
@@ -184,7 +200,7 @@ static struct omap_hwmod_class omap44xx_l3_hwmod_class = {
184 .name = "l3", 200 .name = "l3",
185}; 201};
186 202
187/* l3_instr interface data */ 203/* l3_instr */
188/* iva -> l3_instr */ 204/* iva -> l3_instr */
189static struct omap_hwmod_ocp_if omap44xx_iva__l3_instr = { 205static struct omap_hwmod_ocp_if omap44xx_iva__l3_instr = {
190 .master = &omap44xx_iva_hwmod, 206 .master = &omap44xx_iva_hwmod,
@@ -210,12 +226,26 @@ static struct omap_hwmod_ocp_if *omap44xx_l3_instr_slaves[] = {
210static struct omap_hwmod omap44xx_l3_instr_hwmod = { 226static struct omap_hwmod omap44xx_l3_instr_hwmod = {
211 .name = "l3_instr", 227 .name = "l3_instr",
212 .class = &omap44xx_l3_hwmod_class, 228 .class = &omap44xx_l3_hwmod_class,
229 .clkdm_name = "l3_instr_clkdm",
230 .prcm = {
231 .omap4 = {
232 .clkctrl_offs = OMAP4_CM_L3INSTR_L3_INSTR_CLKCTRL_OFFSET,
233 .context_offs = OMAP4_RM_L3INSTR_L3_INSTR_CONTEXT_OFFSET,
234 .modulemode = MODULEMODE_HWCTRL,
235 },
236 },
213 .slaves = omap44xx_l3_instr_slaves, 237 .slaves = omap44xx_l3_instr_slaves,
214 .slaves_cnt = ARRAY_SIZE(omap44xx_l3_instr_slaves), 238 .slaves_cnt = ARRAY_SIZE(omap44xx_l3_instr_slaves),
215 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), 239 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
216}; 240};
217 241
218/* l3_main_1 interface data */ 242/* l3_main_1 */
243static struct omap_hwmod_irq_info omap44xx_l3_main_1_irqs[] = {
244 { .name = "dbg_err", .irq = 9 + OMAP44XX_IRQ_GIC_START },
245 { .name = "app_err", .irq = 10 + OMAP44XX_IRQ_GIC_START },
246 { .irq = -1 }
247};
248
219/* dsp -> l3_main_1 */ 249/* dsp -> l3_main_1 */
220static struct omap_hwmod_ocp_if omap44xx_dsp__l3_main_1 = { 250static struct omap_hwmod_ocp_if omap44xx_dsp__l3_main_1 = {
221 .master = &omap44xx_dsp_hwmod, 251 .master = &omap44xx_dsp_hwmod,
@@ -264,18 +294,13 @@ static struct omap_hwmod_ocp_if omap44xx_mmc2__l3_main_1 = {
264 .user = OCP_USER_MPU | OCP_USER_SDMA, 294 .user = OCP_USER_MPU | OCP_USER_SDMA,
265}; 295};
266 296
267/* L3 target configuration and error log registers */
268static struct omap_hwmod_irq_info omap44xx_l3_targ_irqs[] = {
269 { .irq = 9 + OMAP44XX_IRQ_GIC_START },
270 { .irq = 10 + OMAP44XX_IRQ_GIC_START },
271};
272
273static struct omap_hwmod_addr_space omap44xx_l3_main_1_addrs[] = { 297static struct omap_hwmod_addr_space omap44xx_l3_main_1_addrs[] = {
274 { 298 {
275 .pa_start = 0x44000000, 299 .pa_start = 0x44000000,
276 .pa_end = 0x44000fff, 300 .pa_end = 0x44000fff,
277 .flags = ADDR_TYPE_RT, 301 .flags = ADDR_TYPE_RT
278 }, 302 },
303 { }
279}; 304};
280 305
281/* mpu -> l3_main_1 */ 306/* mpu -> l3_main_1 */
@@ -284,8 +309,7 @@ static struct omap_hwmod_ocp_if omap44xx_mpu__l3_main_1 = {
284 .slave = &omap44xx_l3_main_1_hwmod, 309 .slave = &omap44xx_l3_main_1_hwmod,
285 .clk = "l3_div_ck", 310 .clk = "l3_div_ck",
286 .addr = omap44xx_l3_main_1_addrs, 311 .addr = omap44xx_l3_main_1_addrs,
287 .addr_cnt = ARRAY_SIZE(omap44xx_l3_main_1_addrs), 312 .user = OCP_USER_MPU,
288 .user = OCP_USER_MPU | OCP_USER_SDMA,
289}; 313};
290 314
291/* l3_main_1 slave ports */ 315/* l3_main_1 slave ports */
@@ -302,14 +326,20 @@ static struct omap_hwmod_ocp_if *omap44xx_l3_main_1_slaves[] = {
302static struct omap_hwmod omap44xx_l3_main_1_hwmod = { 326static struct omap_hwmod omap44xx_l3_main_1_hwmod = {
303 .name = "l3_main_1", 327 .name = "l3_main_1",
304 .class = &omap44xx_l3_hwmod_class, 328 .class = &omap44xx_l3_hwmod_class,
305 .mpu_irqs = omap44xx_l3_targ_irqs, 329 .clkdm_name = "l3_1_clkdm",
306 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_l3_targ_irqs), 330 .mpu_irqs = omap44xx_l3_main_1_irqs,
331 .prcm = {
332 .omap4 = {
333 .clkctrl_offs = OMAP4_CM_L3_1_L3_1_CLKCTRL_OFFSET,
334 .context_offs = OMAP4_RM_L3_1_L3_1_CONTEXT_OFFSET,
335 },
336 },
307 .slaves = omap44xx_l3_main_1_slaves, 337 .slaves = omap44xx_l3_main_1_slaves,
308 .slaves_cnt = ARRAY_SIZE(omap44xx_l3_main_1_slaves), 338 .slaves_cnt = ARRAY_SIZE(omap44xx_l3_main_1_slaves),
309 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), 339 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
310}; 340};
311 341
312/* l3_main_2 interface data */ 342/* l3_main_2 */
313/* dma_system -> l3_main_2 */ 343/* dma_system -> l3_main_2 */
314static struct omap_hwmod_ocp_if omap44xx_dma_system__l3_main_2 = { 344static struct omap_hwmod_ocp_if omap44xx_dma_system__l3_main_2 = {
315 .master = &omap44xx_dma_system_hwmod, 345 .master = &omap44xx_dma_system_hwmod,
@@ -354,8 +384,9 @@ static struct omap_hwmod_addr_space omap44xx_l3_main_2_addrs[] = {
354 { 384 {
355 .pa_start = 0x44800000, 385 .pa_start = 0x44800000,
356 .pa_end = 0x44801fff, 386 .pa_end = 0x44801fff,
357 .flags = ADDR_TYPE_RT, 387 .flags = ADDR_TYPE_RT
358 }, 388 },
389 { }
359}; 390};
360 391
361/* l3_main_1 -> l3_main_2 */ 392/* l3_main_1 -> l3_main_2 */
@@ -364,8 +395,7 @@ static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l3_main_2 = {
364 .slave = &omap44xx_l3_main_2_hwmod, 395 .slave = &omap44xx_l3_main_2_hwmod,
365 .clk = "l3_div_ck", 396 .clk = "l3_div_ck",
366 .addr = omap44xx_l3_main_2_addrs, 397 .addr = omap44xx_l3_main_2_addrs,
367 .addr_cnt = ARRAY_SIZE(omap44xx_l3_main_2_addrs), 398 .user = OCP_USER_MPU,
368 .user = OCP_USER_MPU | OCP_USER_SDMA,
369}; 399};
370 400
371/* l4_cfg -> l3_main_2 */ 401/* l4_cfg -> l3_main_2 */
@@ -399,18 +429,26 @@ static struct omap_hwmod_ocp_if *omap44xx_l3_main_2_slaves[] = {
399static struct omap_hwmod omap44xx_l3_main_2_hwmod = { 429static struct omap_hwmod omap44xx_l3_main_2_hwmod = {
400 .name = "l3_main_2", 430 .name = "l3_main_2",
401 .class = &omap44xx_l3_hwmod_class, 431 .class = &omap44xx_l3_hwmod_class,
432 .clkdm_name = "l3_2_clkdm",
433 .prcm = {
434 .omap4 = {
435 .clkctrl_offs = OMAP4_CM_L3_2_L3_2_CLKCTRL_OFFSET,
436 .context_offs = OMAP4_RM_L3_2_L3_2_CONTEXT_OFFSET,
437 },
438 },
402 .slaves = omap44xx_l3_main_2_slaves, 439 .slaves = omap44xx_l3_main_2_slaves,
403 .slaves_cnt = ARRAY_SIZE(omap44xx_l3_main_2_slaves), 440 .slaves_cnt = ARRAY_SIZE(omap44xx_l3_main_2_slaves),
404 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), 441 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
405}; 442};
406 443
407/* l3_main_3 interface data */ 444/* l3_main_3 */
408static struct omap_hwmod_addr_space omap44xx_l3_main_3_addrs[] = { 445static struct omap_hwmod_addr_space omap44xx_l3_main_3_addrs[] = {
409 { 446 {
410 .pa_start = 0x45000000, 447 .pa_start = 0x45000000,
411 .pa_end = 0x45000fff, 448 .pa_end = 0x45000fff,
412 .flags = ADDR_TYPE_RT, 449 .flags = ADDR_TYPE_RT
413 }, 450 },
451 { }
414}; 452};
415 453
416/* l3_main_1 -> l3_main_3 */ 454/* l3_main_1 -> l3_main_3 */
@@ -419,8 +457,7 @@ static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l3_main_3 = {
419 .slave = &omap44xx_l3_main_3_hwmod, 457 .slave = &omap44xx_l3_main_3_hwmod,
420 .clk = "l3_div_ck", 458 .clk = "l3_div_ck",
421 .addr = omap44xx_l3_main_3_addrs, 459 .addr = omap44xx_l3_main_3_addrs,
422 .addr_cnt = ARRAY_SIZE(omap44xx_l3_main_3_addrs), 460 .user = OCP_USER_MPU,
423 .user = OCP_USER_MPU | OCP_USER_SDMA,
424}; 461};
425 462
426/* l3_main_2 -> l3_main_3 */ 463/* l3_main_2 -> l3_main_3 */
@@ -449,6 +486,14 @@ static struct omap_hwmod_ocp_if *omap44xx_l3_main_3_slaves[] = {
449static struct omap_hwmod omap44xx_l3_main_3_hwmod = { 486static struct omap_hwmod omap44xx_l3_main_3_hwmod = {
450 .name = "l3_main_3", 487 .name = "l3_main_3",
451 .class = &omap44xx_l3_hwmod_class, 488 .class = &omap44xx_l3_hwmod_class,
489 .clkdm_name = "l3_instr_clkdm",
490 .prcm = {
491 .omap4 = {
492 .clkctrl_offs = OMAP4_CM_L3INSTR_L3_3_CLKCTRL_OFFSET,
493 .context_offs = OMAP4_RM_L3INSTR_L3_3_CONTEXT_OFFSET,
494 .modulemode = MODULEMODE_HWCTRL,
495 },
496 },
452 .slaves = omap44xx_l3_main_3_slaves, 497 .slaves = omap44xx_l3_main_3_slaves,
453 .slaves_cnt = ARRAY_SIZE(omap44xx_l3_main_3_slaves), 498 .slaves_cnt = ARRAY_SIZE(omap44xx_l3_main_3_slaves),
454 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), 499 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
@@ -462,7 +507,7 @@ static struct omap_hwmod_class omap44xx_l4_hwmod_class = {
462 .name = "l4", 507 .name = "l4",
463}; 508};
464 509
465/* l4_abe interface data */ 510/* l4_abe */
466/* aess -> l4_abe */ 511/* aess -> l4_abe */
467static struct omap_hwmod_ocp_if omap44xx_aess__l4_abe = { 512static struct omap_hwmod_ocp_if omap44xx_aess__l4_abe = {
468 .master = &omap44xx_aess_hwmod, 513 .master = &omap44xx_aess_hwmod,
@@ -506,12 +551,18 @@ static struct omap_hwmod_ocp_if *omap44xx_l4_abe_slaves[] = {
506static struct omap_hwmod omap44xx_l4_abe_hwmod = { 551static struct omap_hwmod omap44xx_l4_abe_hwmod = {
507 .name = "l4_abe", 552 .name = "l4_abe",
508 .class = &omap44xx_l4_hwmod_class, 553 .class = &omap44xx_l4_hwmod_class,
554 .clkdm_name = "abe_clkdm",
555 .prcm = {
556 .omap4 = {
557 .clkctrl_offs = OMAP4_CM1_ABE_L4ABE_CLKCTRL_OFFSET,
558 },
559 },
509 .slaves = omap44xx_l4_abe_slaves, 560 .slaves = omap44xx_l4_abe_slaves,
510 .slaves_cnt = ARRAY_SIZE(omap44xx_l4_abe_slaves), 561 .slaves_cnt = ARRAY_SIZE(omap44xx_l4_abe_slaves),
511 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), 562 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
512}; 563};
513 564
514/* l4_cfg interface data */ 565/* l4_cfg */
515/* l3_main_1 -> l4_cfg */ 566/* l3_main_1 -> l4_cfg */
516static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l4_cfg = { 567static struct omap_hwmod_ocp_if omap44xx_l3_main_1__l4_cfg = {
517 .master = &omap44xx_l3_main_1_hwmod, 568 .master = &omap44xx_l3_main_1_hwmod,
@@ -528,12 +579,19 @@ static struct omap_hwmod_ocp_if *omap44xx_l4_cfg_slaves[] = {
528static struct omap_hwmod omap44xx_l4_cfg_hwmod = { 579static struct omap_hwmod omap44xx_l4_cfg_hwmod = {
529 .name = "l4_cfg", 580 .name = "l4_cfg",
530 .class = &omap44xx_l4_hwmod_class, 581 .class = &omap44xx_l4_hwmod_class,
582 .clkdm_name = "l4_cfg_clkdm",
583 .prcm = {
584 .omap4 = {
585 .clkctrl_offs = OMAP4_CM_L4CFG_L4_CFG_CLKCTRL_OFFSET,
586 .context_offs = OMAP4_RM_L4CFG_L4_CFG_CONTEXT_OFFSET,
587 },
588 },
531 .slaves = omap44xx_l4_cfg_slaves, 589 .slaves = omap44xx_l4_cfg_slaves,
532 .slaves_cnt = ARRAY_SIZE(omap44xx_l4_cfg_slaves), 590 .slaves_cnt = ARRAY_SIZE(omap44xx_l4_cfg_slaves),
533 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), 591 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
534}; 592};
535 593
536/* l4_per interface data */ 594/* l4_per */
537/* l3_main_2 -> l4_per */ 595/* l3_main_2 -> l4_per */
538static struct omap_hwmod_ocp_if omap44xx_l3_main_2__l4_per = { 596static struct omap_hwmod_ocp_if omap44xx_l3_main_2__l4_per = {
539 .master = &omap44xx_l3_main_2_hwmod, 597 .master = &omap44xx_l3_main_2_hwmod,
@@ -550,12 +608,19 @@ static struct omap_hwmod_ocp_if *omap44xx_l4_per_slaves[] = {
550static struct omap_hwmod omap44xx_l4_per_hwmod = { 608static struct omap_hwmod omap44xx_l4_per_hwmod = {
551 .name = "l4_per", 609 .name = "l4_per",
552 .class = &omap44xx_l4_hwmod_class, 610 .class = &omap44xx_l4_hwmod_class,
611 .clkdm_name = "l4_per_clkdm",
612 .prcm = {
613 .omap4 = {
614 .clkctrl_offs = OMAP4_CM_L4PER_L4PER_CLKCTRL_OFFSET,
615 .context_offs = OMAP4_RM_L4PER_L4_PER_CONTEXT_OFFSET,
616 },
617 },
553 .slaves = omap44xx_l4_per_slaves, 618 .slaves = omap44xx_l4_per_slaves,
554 .slaves_cnt = ARRAY_SIZE(omap44xx_l4_per_slaves), 619 .slaves_cnt = ARRAY_SIZE(omap44xx_l4_per_slaves),
555 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), 620 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
556}; 621};
557 622
558/* l4_wkup interface data */ 623/* l4_wkup */
559/* l4_cfg -> l4_wkup */ 624/* l4_cfg -> l4_wkup */
560static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l4_wkup = { 625static struct omap_hwmod_ocp_if omap44xx_l4_cfg__l4_wkup = {
561 .master = &omap44xx_l4_cfg_hwmod, 626 .master = &omap44xx_l4_cfg_hwmod,
@@ -572,6 +637,13 @@ static struct omap_hwmod_ocp_if *omap44xx_l4_wkup_slaves[] = {
572static struct omap_hwmod omap44xx_l4_wkup_hwmod = { 637static struct omap_hwmod omap44xx_l4_wkup_hwmod = {
573 .name = "l4_wkup", 638 .name = "l4_wkup",
574 .class = &omap44xx_l4_hwmod_class, 639 .class = &omap44xx_l4_hwmod_class,
640 .clkdm_name = "l4_wkup_clkdm",
641 .prcm = {
642 .omap4 = {
643 .clkctrl_offs = OMAP4_CM_WKUP_L4WKUP_CLKCTRL_OFFSET,
644 .context_offs = OMAP4_RM_WKUP_L4WKUP_CONTEXT_OFFSET,
645 },
646 },
575 .slaves = omap44xx_l4_wkup_slaves, 647 .slaves = omap44xx_l4_wkup_slaves,
576 .slaves_cnt = ARRAY_SIZE(omap44xx_l4_wkup_slaves), 648 .slaves_cnt = ARRAY_SIZE(omap44xx_l4_wkup_slaves),
577 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), 649 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
@@ -585,7 +657,7 @@ static struct omap_hwmod_class omap44xx_mpu_bus_hwmod_class = {
585 .name = "mpu_bus", 657 .name = "mpu_bus",
586}; 658};
587 659
588/* mpu_private interface data */ 660/* mpu_private */
589/* mpu -> mpu_private */ 661/* mpu -> mpu_private */
590static struct omap_hwmod_ocp_if omap44xx_mpu__mpu_private = { 662static struct omap_hwmod_ocp_if omap44xx_mpu__mpu_private = {
591 .master = &omap44xx_mpu_hwmod, 663 .master = &omap44xx_mpu_hwmod,
@@ -602,6 +674,7 @@ static struct omap_hwmod_ocp_if *omap44xx_mpu_private_slaves[] = {
602static struct omap_hwmod omap44xx_mpu_private_hwmod = { 674static struct omap_hwmod omap44xx_mpu_private_hwmod = {
603 .name = "mpu_private", 675 .name = "mpu_private",
604 .class = &omap44xx_mpu_bus_hwmod_class, 676 .class = &omap44xx_mpu_bus_hwmod_class,
677 .clkdm_name = "mpuss_clkdm",
605 .slaves = omap44xx_mpu_private_slaves, 678 .slaves = omap44xx_mpu_private_slaves,
606 .slaves_cnt = ARRAY_SIZE(omap44xx_mpu_private_slaves), 679 .slaves_cnt = ARRAY_SIZE(omap44xx_mpu_private_slaves),
607 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), 680 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
@@ -633,7 +706,9 @@ static struct omap_hwmod omap44xx_mpu_private_hwmod = {
633 * gpmc 706 * gpmc
634 * gpu 707 * gpu
635 * hdq1w 708 * hdq1w
636 * hsi 709 * mcasp
710 * mpu_c0
711 * mpu_c1
637 * ocmc_ram 712 * ocmc_ram
638 * ocp2scp_usb_phy 713 * ocp2scp_usb_phy
639 * ocp_wp_noc 714 * ocp_wp_noc
@@ -660,7 +735,8 @@ static struct omap_hwmod_class_sysconfig omap44xx_aess_sysc = {
660 .sysc_offs = 0x0010, 735 .sysc_offs = 0x0010,
661 .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE), 736 .sysc_flags = (SYSC_HAS_MIDLEMODE | SYSC_HAS_SIDLEMODE),
662 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | 737 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
663 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART), 738 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART |
739 MSTANDBY_SMART_WKUP),
664 .sysc_fields = &omap_hwmod_sysc_type2, 740 .sysc_fields = &omap_hwmod_sysc_type2,
665}; 741};
666 742
@@ -672,6 +748,7 @@ static struct omap_hwmod_class omap44xx_aess_hwmod_class = {
672/* aess */ 748/* aess */
673static struct omap_hwmod_irq_info omap44xx_aess_irqs[] = { 749static struct omap_hwmod_irq_info omap44xx_aess_irqs[] = {
674 { .irq = 99 + OMAP44XX_IRQ_GIC_START }, 750 { .irq = 99 + OMAP44XX_IRQ_GIC_START },
751 { .irq = -1 }
675}; 752};
676 753
677static struct omap_hwmod_dma_info omap44xx_aess_sdma_reqs[] = { 754static struct omap_hwmod_dma_info omap44xx_aess_sdma_reqs[] = {
@@ -683,6 +760,7 @@ static struct omap_hwmod_dma_info omap44xx_aess_sdma_reqs[] = {
683 { .name = "fifo5", .dma_req = 105 + OMAP44XX_DMA_REQ_START }, 760 { .name = "fifo5", .dma_req = 105 + OMAP44XX_DMA_REQ_START },
684 { .name = "fifo6", .dma_req = 106 + OMAP44XX_DMA_REQ_START }, 761 { .name = "fifo6", .dma_req = 106 + OMAP44XX_DMA_REQ_START },
685 { .name = "fifo7", .dma_req = 107 + OMAP44XX_DMA_REQ_START }, 762 { .name = "fifo7", .dma_req = 107 + OMAP44XX_DMA_REQ_START },
763 { .dma_req = -1 }
686}; 764};
687 765
688/* aess master ports */ 766/* aess master ports */
@@ -696,6 +774,7 @@ static struct omap_hwmod_addr_space omap44xx_aess_addrs[] = {
696 .pa_end = 0x401f13ff, 774 .pa_end = 0x401f13ff,
697 .flags = ADDR_TYPE_RT 775 .flags = ADDR_TYPE_RT
698 }, 776 },
777 { }
699}; 778};
700 779
701/* l4_abe -> aess */ 780/* l4_abe -> aess */
@@ -704,7 +783,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__aess = {
704 .slave = &omap44xx_aess_hwmod, 783 .slave = &omap44xx_aess_hwmod,
705 .clk = "ocp_abe_iclk", 784 .clk = "ocp_abe_iclk",
706 .addr = omap44xx_aess_addrs, 785 .addr = omap44xx_aess_addrs,
707 .addr_cnt = ARRAY_SIZE(omap44xx_aess_addrs),
708 .user = OCP_USER_MPU, 786 .user = OCP_USER_MPU,
709}; 787};
710 788
@@ -714,6 +792,7 @@ static struct omap_hwmod_addr_space omap44xx_aess_dma_addrs[] = {
714 .pa_end = 0x490f13ff, 792 .pa_end = 0x490f13ff,
715 .flags = ADDR_TYPE_RT 793 .flags = ADDR_TYPE_RT
716 }, 794 },
795 { }
717}; 796};
718 797
719/* l4_abe -> aess (dma) */ 798/* l4_abe -> aess (dma) */
@@ -722,7 +801,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__aess_dma = {
722 .slave = &omap44xx_aess_hwmod, 801 .slave = &omap44xx_aess_hwmod,
723 .clk = "ocp_abe_iclk", 802 .clk = "ocp_abe_iclk",
724 .addr = omap44xx_aess_dma_addrs, 803 .addr = omap44xx_aess_dma_addrs,
725 .addr_cnt = ARRAY_SIZE(omap44xx_aess_dma_addrs),
726 .user = OCP_USER_SDMA, 804 .user = OCP_USER_SDMA,
727}; 805};
728 806
@@ -735,14 +813,15 @@ static struct omap_hwmod_ocp_if *omap44xx_aess_slaves[] = {
735static struct omap_hwmod omap44xx_aess_hwmod = { 813static struct omap_hwmod omap44xx_aess_hwmod = {
736 .name = "aess", 814 .name = "aess",
737 .class = &omap44xx_aess_hwmod_class, 815 .class = &omap44xx_aess_hwmod_class,
816 .clkdm_name = "abe_clkdm",
738 .mpu_irqs = omap44xx_aess_irqs, 817 .mpu_irqs = omap44xx_aess_irqs,
739 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_aess_irqs),
740 .sdma_reqs = omap44xx_aess_sdma_reqs, 818 .sdma_reqs = omap44xx_aess_sdma_reqs,
741 .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_aess_sdma_reqs),
742 .main_clk = "aess_fck", 819 .main_clk = "aess_fck",
743 .prcm = { 820 .prcm = {
744 .omap4 = { 821 .omap4 = {
745 .clkctrl_reg = OMAP4430_CM1_ABE_AESS_CLKCTRL, 822 .clkctrl_offs = OMAP4_CM1_ABE_AESS_CLKCTRL_OFFSET,
823 .context_offs = OMAP4_RM_ABE_AESS_CONTEXT_OFFSET,
824 .modulemode = MODULEMODE_SWCTRL,
746 }, 825 },
747 }, 826 },
748 .slaves = omap44xx_aess_slaves, 827 .slaves = omap44xx_aess_slaves,
@@ -769,9 +848,10 @@ static struct omap_hwmod_opt_clk bandgap_opt_clks[] = {
769static struct omap_hwmod omap44xx_bandgap_hwmod = { 848static struct omap_hwmod omap44xx_bandgap_hwmod = {
770 .name = "bandgap", 849 .name = "bandgap",
771 .class = &omap44xx_bandgap_hwmod_class, 850 .class = &omap44xx_bandgap_hwmod_class,
772 .prcm = { 851 .clkdm_name = "l4_wkup_clkdm",
852 .prcm = {
773 .omap4 = { 853 .omap4 = {
774 .clkctrl_reg = OMAP4430_CM_WKUP_BANDGAP_CLKCTRL, 854 .clkctrl_offs = OMAP4_CM_WKUP_BANDGAP_CLKCTRL_OFFSET,
775 }, 855 },
776 }, 856 },
777 .opt_clks = bandgap_opt_clks, 857 .opt_clks = bandgap_opt_clks,
@@ -806,6 +886,7 @@ static struct omap_hwmod_addr_space omap44xx_counter_32k_addrs[] = {
806 .pa_end = 0x4a30401f, 886 .pa_end = 0x4a30401f,
807 .flags = ADDR_TYPE_RT 887 .flags = ADDR_TYPE_RT
808 }, 888 },
889 { }
809}; 890};
810 891
811/* l4_wkup -> counter_32k */ 892/* l4_wkup -> counter_32k */
@@ -814,7 +895,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_wkup__counter_32k = {
814 .slave = &omap44xx_counter_32k_hwmod, 895 .slave = &omap44xx_counter_32k_hwmod,
815 .clk = "l4_wkup_clk_mux_ck", 896 .clk = "l4_wkup_clk_mux_ck",
816 .addr = omap44xx_counter_32k_addrs, 897 .addr = omap44xx_counter_32k_addrs,
817 .addr_cnt = ARRAY_SIZE(omap44xx_counter_32k_addrs),
818 .user = OCP_USER_MPU | OCP_USER_SDMA, 898 .user = OCP_USER_MPU | OCP_USER_SDMA,
819}; 899};
820 900
@@ -826,11 +906,13 @@ static struct omap_hwmod_ocp_if *omap44xx_counter_32k_slaves[] = {
826static struct omap_hwmod omap44xx_counter_32k_hwmod = { 906static struct omap_hwmod omap44xx_counter_32k_hwmod = {
827 .name = "counter_32k", 907 .name = "counter_32k",
828 .class = &omap44xx_counter_hwmod_class, 908 .class = &omap44xx_counter_hwmod_class,
909 .clkdm_name = "l4_wkup_clkdm",
829 .flags = HWMOD_SWSUP_SIDLE, 910 .flags = HWMOD_SWSUP_SIDLE,
830 .main_clk = "sys_32k_ck", 911 .main_clk = "sys_32k_ck",
831 .prcm = { 912 .prcm = {
832 .omap4 = { 913 .omap4 = {
833 .clkctrl_reg = OMAP4430_CM_WKUP_SYNCTIMER_CLKCTRL, 914 .clkctrl_offs = OMAP4_CM_WKUP_SYNCTIMER_CLKCTRL_OFFSET,
915 .context_offs = OMAP4_RM_WKUP_SYNCTIMER_CONTEXT_OFFSET,
834 }, 916 },
835 }, 917 },
836 .slaves = omap44xx_counter_32k_slaves, 918 .slaves = omap44xx_counter_32k_slaves,
@@ -875,6 +957,7 @@ static struct omap_hwmod_irq_info omap44xx_dma_system_irqs[] = {
875 { .name = "1", .irq = 13 + OMAP44XX_IRQ_GIC_START }, 957 { .name = "1", .irq = 13 + OMAP44XX_IRQ_GIC_START },
876 { .name = "2", .irq = 14 + OMAP44XX_IRQ_GIC_START }, 958 { .name = "2", .irq = 14 + OMAP44XX_IRQ_GIC_START },
877 { .name = "3", .irq = 15 + OMAP44XX_IRQ_GIC_START }, 959 { .name = "3", .irq = 15 + OMAP44XX_IRQ_GIC_START },
960 { .irq = -1 }
878}; 961};
879 962
880/* dma_system master ports */ 963/* dma_system master ports */
@@ -888,6 +971,7 @@ static struct omap_hwmod_addr_space omap44xx_dma_system_addrs[] = {
888 .pa_end = 0x4a056fff, 971 .pa_end = 0x4a056fff,
889 .flags = ADDR_TYPE_RT 972 .flags = ADDR_TYPE_RT
890 }, 973 },
974 { }
891}; 975};
892 976
893/* l4_cfg -> dma_system */ 977/* l4_cfg -> dma_system */
@@ -896,7 +980,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_cfg__dma_system = {
896 .slave = &omap44xx_dma_system_hwmod, 980 .slave = &omap44xx_dma_system_hwmod,
897 .clk = "l4_div_ck", 981 .clk = "l4_div_ck",
898 .addr = omap44xx_dma_system_addrs, 982 .addr = omap44xx_dma_system_addrs,
899 .addr_cnt = ARRAY_SIZE(omap44xx_dma_system_addrs),
900 .user = OCP_USER_MPU | OCP_USER_SDMA, 983 .user = OCP_USER_MPU | OCP_USER_SDMA,
901}; 984};
902 985
@@ -908,12 +991,13 @@ static struct omap_hwmod_ocp_if *omap44xx_dma_system_slaves[] = {
908static struct omap_hwmod omap44xx_dma_system_hwmod = { 991static struct omap_hwmod omap44xx_dma_system_hwmod = {
909 .name = "dma_system", 992 .name = "dma_system",
910 .class = &omap44xx_dma_hwmod_class, 993 .class = &omap44xx_dma_hwmod_class,
994 .clkdm_name = "l3_dma_clkdm",
911 .mpu_irqs = omap44xx_dma_system_irqs, 995 .mpu_irqs = omap44xx_dma_system_irqs,
912 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_dma_system_irqs),
913 .main_clk = "l3_div_ck", 996 .main_clk = "l3_div_ck",
914 .prcm = { 997 .prcm = {
915 .omap4 = { 998 .omap4 = {
916 .clkctrl_reg = OMAP4430_CM_SDMA_SDMA_CLKCTRL, 999 .clkctrl_offs = OMAP4_CM_SDMA_SDMA_CLKCTRL_OFFSET,
1000 .context_offs = OMAP4_RM_SDMA_SDMA_CONTEXT_OFFSET,
917 }, 1001 },
918 }, 1002 },
919 .dev_attr = &dma_dev_attr, 1003 .dev_attr = &dma_dev_attr,
@@ -948,10 +1032,12 @@ static struct omap_hwmod_class omap44xx_dmic_hwmod_class = {
948static struct omap_hwmod omap44xx_dmic_hwmod; 1032static struct omap_hwmod omap44xx_dmic_hwmod;
949static struct omap_hwmod_irq_info omap44xx_dmic_irqs[] = { 1033static struct omap_hwmod_irq_info omap44xx_dmic_irqs[] = {
950 { .irq = 114 + OMAP44XX_IRQ_GIC_START }, 1034 { .irq = 114 + OMAP44XX_IRQ_GIC_START },
1035 { .irq = -1 }
951}; 1036};
952 1037
953static struct omap_hwmod_dma_info omap44xx_dmic_sdma_reqs[] = { 1038static struct omap_hwmod_dma_info omap44xx_dmic_sdma_reqs[] = {
954 { .dma_req = 66 + OMAP44XX_DMA_REQ_START }, 1039 { .dma_req = 66 + OMAP44XX_DMA_REQ_START },
1040 { .dma_req = -1 }
955}; 1041};
956 1042
957static struct omap_hwmod_addr_space omap44xx_dmic_addrs[] = { 1043static struct omap_hwmod_addr_space omap44xx_dmic_addrs[] = {
@@ -960,6 +1046,7 @@ static struct omap_hwmod_addr_space omap44xx_dmic_addrs[] = {
960 .pa_end = 0x4012e07f, 1046 .pa_end = 0x4012e07f,
961 .flags = ADDR_TYPE_RT 1047 .flags = ADDR_TYPE_RT
962 }, 1048 },
1049 { }
963}; 1050};
964 1051
965/* l4_abe -> dmic */ 1052/* l4_abe -> dmic */
@@ -968,7 +1055,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__dmic = {
968 .slave = &omap44xx_dmic_hwmod, 1055 .slave = &omap44xx_dmic_hwmod,
969 .clk = "ocp_abe_iclk", 1056 .clk = "ocp_abe_iclk",
970 .addr = omap44xx_dmic_addrs, 1057 .addr = omap44xx_dmic_addrs,
971 .addr_cnt = ARRAY_SIZE(omap44xx_dmic_addrs),
972 .user = OCP_USER_MPU, 1058 .user = OCP_USER_MPU,
973}; 1059};
974 1060
@@ -978,6 +1064,7 @@ static struct omap_hwmod_addr_space omap44xx_dmic_dma_addrs[] = {
978 .pa_end = 0x4902e07f, 1064 .pa_end = 0x4902e07f,
979 .flags = ADDR_TYPE_RT 1065 .flags = ADDR_TYPE_RT
980 }, 1066 },
1067 { }
981}; 1068};
982 1069
983/* l4_abe -> dmic (dma) */ 1070/* l4_abe -> dmic (dma) */
@@ -986,7 +1073,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__dmic_dma = {
986 .slave = &omap44xx_dmic_hwmod, 1073 .slave = &omap44xx_dmic_hwmod,
987 .clk = "ocp_abe_iclk", 1074 .clk = "ocp_abe_iclk",
988 .addr = omap44xx_dmic_dma_addrs, 1075 .addr = omap44xx_dmic_dma_addrs,
989 .addr_cnt = ARRAY_SIZE(omap44xx_dmic_dma_addrs),
990 .user = OCP_USER_SDMA, 1076 .user = OCP_USER_SDMA,
991}; 1077};
992 1078
@@ -999,14 +1085,15 @@ static struct omap_hwmod_ocp_if *omap44xx_dmic_slaves[] = {
999static struct omap_hwmod omap44xx_dmic_hwmod = { 1085static struct omap_hwmod omap44xx_dmic_hwmod = {
1000 .name = "dmic", 1086 .name = "dmic",
1001 .class = &omap44xx_dmic_hwmod_class, 1087 .class = &omap44xx_dmic_hwmod_class,
1088 .clkdm_name = "abe_clkdm",
1002 .mpu_irqs = omap44xx_dmic_irqs, 1089 .mpu_irqs = omap44xx_dmic_irqs,
1003 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_dmic_irqs),
1004 .sdma_reqs = omap44xx_dmic_sdma_reqs, 1090 .sdma_reqs = omap44xx_dmic_sdma_reqs,
1005 .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_dmic_sdma_reqs),
1006 .main_clk = "dmic_fck", 1091 .main_clk = "dmic_fck",
1007 .prcm = { 1092 .prcm = {
1008 .omap4 = { 1093 .omap4 = {
1009 .clkctrl_reg = OMAP4430_CM1_ABE_DMIC_CLKCTRL, 1094 .clkctrl_offs = OMAP4_CM1_ABE_DMIC_CLKCTRL_OFFSET,
1095 .context_offs = OMAP4_RM_ABE_DMIC_CONTEXT_OFFSET,
1096 .modulemode = MODULEMODE_SWCTRL,
1010 }, 1097 },
1011 }, 1098 },
1012 .slaves = omap44xx_dmic_slaves, 1099 .slaves = omap44xx_dmic_slaves,
@@ -1026,6 +1113,7 @@ static struct omap_hwmod_class omap44xx_dsp_hwmod_class = {
1026/* dsp */ 1113/* dsp */
1027static struct omap_hwmod_irq_info omap44xx_dsp_irqs[] = { 1114static struct omap_hwmod_irq_info omap44xx_dsp_irqs[] = {
1028 { .irq = 28 + OMAP44XX_IRQ_GIC_START }, 1115 { .irq = 28 + OMAP44XX_IRQ_GIC_START },
1116 { .irq = -1 }
1029}; 1117};
1030 1118
1031static struct omap_hwmod_rst_info omap44xx_dsp_resets[] = { 1119static struct omap_hwmod_rst_info omap44xx_dsp_resets[] = {
@@ -1067,12 +1155,13 @@ static struct omap_hwmod_ocp_if *omap44xx_dsp_slaves[] = {
1067static struct omap_hwmod omap44xx_dsp_c0_hwmod = { 1155static struct omap_hwmod omap44xx_dsp_c0_hwmod = {
1068 .name = "dsp_c0", 1156 .name = "dsp_c0",
1069 .class = &omap44xx_dsp_hwmod_class, 1157 .class = &omap44xx_dsp_hwmod_class,
1158 .clkdm_name = "tesla_clkdm",
1070 .flags = HWMOD_INIT_NO_RESET, 1159 .flags = HWMOD_INIT_NO_RESET,
1071 .rst_lines = omap44xx_dsp_c0_resets, 1160 .rst_lines = omap44xx_dsp_c0_resets,
1072 .rst_lines_cnt = ARRAY_SIZE(omap44xx_dsp_c0_resets), 1161 .rst_lines_cnt = ARRAY_SIZE(omap44xx_dsp_c0_resets),
1073 .prcm = { 1162 .prcm = {
1074 .omap4 = { 1163 .omap4 = {
1075 .rstctrl_reg = OMAP4430_RM_TESLA_RSTCTRL, 1164 .rstctrl_offs = OMAP4_RM_TESLA_RSTCTRL_OFFSET,
1076 }, 1165 },
1077 }, 1166 },
1078 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), 1167 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
@@ -1081,15 +1170,17 @@ static struct omap_hwmod omap44xx_dsp_c0_hwmod = {
1081static struct omap_hwmod omap44xx_dsp_hwmod = { 1170static struct omap_hwmod omap44xx_dsp_hwmod = {
1082 .name = "dsp", 1171 .name = "dsp",
1083 .class = &omap44xx_dsp_hwmod_class, 1172 .class = &omap44xx_dsp_hwmod_class,
1173 .clkdm_name = "tesla_clkdm",
1084 .mpu_irqs = omap44xx_dsp_irqs, 1174 .mpu_irqs = omap44xx_dsp_irqs,
1085 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_dsp_irqs),
1086 .rst_lines = omap44xx_dsp_resets, 1175 .rst_lines = omap44xx_dsp_resets,
1087 .rst_lines_cnt = ARRAY_SIZE(omap44xx_dsp_resets), 1176 .rst_lines_cnt = ARRAY_SIZE(omap44xx_dsp_resets),
1088 .main_clk = "dsp_fck", 1177 .main_clk = "dsp_fck",
1089 .prcm = { 1178 .prcm = {
1090 .omap4 = { 1179 .omap4 = {
1091 .clkctrl_reg = OMAP4430_CM_TESLA_TESLA_CLKCTRL, 1180 .clkctrl_offs = OMAP4_CM_TESLA_TESLA_CLKCTRL_OFFSET,
1092 .rstctrl_reg = OMAP4430_RM_TESLA_RSTCTRL, 1181 .rstctrl_offs = OMAP4_RM_TESLA_RSTCTRL_OFFSET,
1182 .context_offs = OMAP4_RM_TESLA_TESLA_CONTEXT_OFFSET,
1183 .modulemode = MODULEMODE_HWCTRL,
1093 }, 1184 },
1094 }, 1185 },
1095 .slaves = omap44xx_dsp_slaves, 1186 .slaves = omap44xx_dsp_slaves,
@@ -1127,15 +1218,15 @@ static struct omap_hwmod_addr_space omap44xx_dss_dma_addrs[] = {
1127 .pa_end = 0x5800007f, 1218 .pa_end = 0x5800007f,
1128 .flags = ADDR_TYPE_RT 1219 .flags = ADDR_TYPE_RT
1129 }, 1220 },
1221 { }
1130}; 1222};
1131 1223
1132/* l3_main_2 -> dss */ 1224/* l3_main_2 -> dss */
1133static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss = { 1225static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss = {
1134 .master = &omap44xx_l3_main_2_hwmod, 1226 .master = &omap44xx_l3_main_2_hwmod,
1135 .slave = &omap44xx_dss_hwmod, 1227 .slave = &omap44xx_dss_hwmod,
1136 .clk = "l3_div_ck", 1228 .clk = "dss_fck",
1137 .addr = omap44xx_dss_dma_addrs, 1229 .addr = omap44xx_dss_dma_addrs,
1138 .addr_cnt = ARRAY_SIZE(omap44xx_dss_dma_addrs),
1139 .user = OCP_USER_SDMA, 1230 .user = OCP_USER_SDMA,
1140}; 1231};
1141 1232
@@ -1145,6 +1236,7 @@ static struct omap_hwmod_addr_space omap44xx_dss_addrs[] = {
1145 .pa_end = 0x4804007f, 1236 .pa_end = 0x4804007f,
1146 .flags = ADDR_TYPE_RT 1237 .flags = ADDR_TYPE_RT
1147 }, 1238 },
1239 { }
1148}; 1240};
1149 1241
1150/* l4_per -> dss */ 1242/* l4_per -> dss */
@@ -1153,7 +1245,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__dss = {
1153 .slave = &omap44xx_dss_hwmod, 1245 .slave = &omap44xx_dss_hwmod,
1154 .clk = "l4_div_ck", 1246 .clk = "l4_div_ck",
1155 .addr = omap44xx_dss_addrs, 1247 .addr = omap44xx_dss_addrs,
1156 .addr_cnt = ARRAY_SIZE(omap44xx_dss_addrs),
1157 .user = OCP_USER_MPU, 1248 .user = OCP_USER_MPU,
1158}; 1249};
1159 1250
@@ -1173,10 +1264,12 @@ static struct omap_hwmod_opt_clk dss_opt_clks[] = {
1173static struct omap_hwmod omap44xx_dss_hwmod = { 1264static struct omap_hwmod omap44xx_dss_hwmod = {
1174 .name = "dss_core", 1265 .name = "dss_core",
1175 .class = &omap44xx_dss_hwmod_class, 1266 .class = &omap44xx_dss_hwmod_class,
1176 .main_clk = "dss_fck", 1267 .clkdm_name = "l3_dss_clkdm",
1268 .main_clk = "dss_dss_clk",
1177 .prcm = { 1269 .prcm = {
1178 .omap4 = { 1270 .omap4 = {
1179 .clkctrl_reg = OMAP4430_CM_DSS_DSS_CLKCTRL, 1271 .clkctrl_offs = OMAP4_CM_DSS_DSS_CLKCTRL_OFFSET,
1272 .context_offs = OMAP4_RM_DSS_DSS_CONTEXT_OFFSET,
1180 }, 1273 },
1181 }, 1274 },
1182 .opt_clks = dss_opt_clks, 1275 .opt_clks = dss_opt_clks,
@@ -1215,10 +1308,12 @@ static struct omap_hwmod_class omap44xx_dispc_hwmod_class = {
1215static struct omap_hwmod omap44xx_dss_dispc_hwmod; 1308static struct omap_hwmod omap44xx_dss_dispc_hwmod;
1216static struct omap_hwmod_irq_info omap44xx_dss_dispc_irqs[] = { 1309static struct omap_hwmod_irq_info omap44xx_dss_dispc_irqs[] = {
1217 { .irq = 25 + OMAP44XX_IRQ_GIC_START }, 1310 { .irq = 25 + OMAP44XX_IRQ_GIC_START },
1311 { .irq = -1 }
1218}; 1312};
1219 1313
1220static struct omap_hwmod_dma_info omap44xx_dss_dispc_sdma_reqs[] = { 1314static struct omap_hwmod_dma_info omap44xx_dss_dispc_sdma_reqs[] = {
1221 { .dma_req = 5 + OMAP44XX_DMA_REQ_START }, 1315 { .dma_req = 5 + OMAP44XX_DMA_REQ_START },
1316 { .dma_req = -1 }
1222}; 1317};
1223 1318
1224static struct omap_hwmod_addr_space omap44xx_dss_dispc_dma_addrs[] = { 1319static struct omap_hwmod_addr_space omap44xx_dss_dispc_dma_addrs[] = {
@@ -1227,15 +1322,15 @@ static struct omap_hwmod_addr_space omap44xx_dss_dispc_dma_addrs[] = {
1227 .pa_end = 0x58001fff, 1322 .pa_end = 0x58001fff,
1228 .flags = ADDR_TYPE_RT 1323 .flags = ADDR_TYPE_RT
1229 }, 1324 },
1325 { }
1230}; 1326};
1231 1327
1232/* l3_main_2 -> dss_dispc */ 1328/* l3_main_2 -> dss_dispc */
1233static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_dispc = { 1329static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_dispc = {
1234 .master = &omap44xx_l3_main_2_hwmod, 1330 .master = &omap44xx_l3_main_2_hwmod,
1235 .slave = &omap44xx_dss_dispc_hwmod, 1331 .slave = &omap44xx_dss_dispc_hwmod,
1236 .clk = "l3_div_ck", 1332 .clk = "dss_fck",
1237 .addr = omap44xx_dss_dispc_dma_addrs, 1333 .addr = omap44xx_dss_dispc_dma_addrs,
1238 .addr_cnt = ARRAY_SIZE(omap44xx_dss_dispc_dma_addrs),
1239 .user = OCP_USER_SDMA, 1334 .user = OCP_USER_SDMA,
1240}; 1335};
1241 1336
@@ -1245,6 +1340,7 @@ static struct omap_hwmod_addr_space omap44xx_dss_dispc_addrs[] = {
1245 .pa_end = 0x48041fff, 1340 .pa_end = 0x48041fff,
1246 .flags = ADDR_TYPE_RT 1341 .flags = ADDR_TYPE_RT
1247 }, 1342 },
1343 { }
1248}; 1344};
1249 1345
1250/* l4_per -> dss_dispc */ 1346/* l4_per -> dss_dispc */
@@ -1253,7 +1349,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_dispc = {
1253 .slave = &omap44xx_dss_dispc_hwmod, 1349 .slave = &omap44xx_dss_dispc_hwmod,
1254 .clk = "l4_div_ck", 1350 .clk = "l4_div_ck",
1255 .addr = omap44xx_dss_dispc_addrs, 1351 .addr = omap44xx_dss_dispc_addrs,
1256 .addr_cnt = ARRAY_SIZE(omap44xx_dss_dispc_addrs),
1257 .user = OCP_USER_MPU, 1352 .user = OCP_USER_MPU,
1258}; 1353};
1259 1354
@@ -1263,19 +1358,27 @@ static struct omap_hwmod_ocp_if *omap44xx_dss_dispc_slaves[] = {
1263 &omap44xx_l4_per__dss_dispc, 1358 &omap44xx_l4_per__dss_dispc,
1264}; 1359};
1265 1360
1361static struct omap_hwmod_opt_clk dss_dispc_opt_clks[] = {
1362 { .role = "sys_clk", .clk = "dss_sys_clk" },
1363 { .role = "tv_clk", .clk = "dss_tv_clk" },
1364 { .role = "hdmi_clk", .clk = "dss_48mhz_clk" },
1365};
1366
1266static struct omap_hwmod omap44xx_dss_dispc_hwmod = { 1367static struct omap_hwmod omap44xx_dss_dispc_hwmod = {
1267 .name = "dss_dispc", 1368 .name = "dss_dispc",
1268 .class = &omap44xx_dispc_hwmod_class, 1369 .class = &omap44xx_dispc_hwmod_class,
1370 .clkdm_name = "l3_dss_clkdm",
1269 .mpu_irqs = omap44xx_dss_dispc_irqs, 1371 .mpu_irqs = omap44xx_dss_dispc_irqs,
1270 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_dss_dispc_irqs),
1271 .sdma_reqs = omap44xx_dss_dispc_sdma_reqs, 1372 .sdma_reqs = omap44xx_dss_dispc_sdma_reqs,
1272 .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_dss_dispc_sdma_reqs), 1373 .main_clk = "dss_dss_clk",
1273 .main_clk = "dss_fck",
1274 .prcm = { 1374 .prcm = {
1275 .omap4 = { 1375 .omap4 = {
1276 .clkctrl_reg = OMAP4430_CM_DSS_DSS_CLKCTRL, 1376 .clkctrl_offs = OMAP4_CM_DSS_DSS_CLKCTRL_OFFSET,
1377 .context_offs = OMAP4_RM_DSS_DSS_CONTEXT_OFFSET,
1277 }, 1378 },
1278 }, 1379 },
1380 .opt_clks = dss_dispc_opt_clks,
1381 .opt_clks_cnt = ARRAY_SIZE(dss_dispc_opt_clks),
1279 .slaves = omap44xx_dss_dispc_slaves, 1382 .slaves = omap44xx_dss_dispc_slaves,
1280 .slaves_cnt = ARRAY_SIZE(omap44xx_dss_dispc_slaves), 1383 .slaves_cnt = ARRAY_SIZE(omap44xx_dss_dispc_slaves),
1281 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), 1384 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
@@ -1306,10 +1409,12 @@ static struct omap_hwmod_class omap44xx_dsi_hwmod_class = {
1306static struct omap_hwmod omap44xx_dss_dsi1_hwmod; 1409static struct omap_hwmod omap44xx_dss_dsi1_hwmod;
1307static struct omap_hwmod_irq_info omap44xx_dss_dsi1_irqs[] = { 1410static struct omap_hwmod_irq_info omap44xx_dss_dsi1_irqs[] = {
1308 { .irq = 53 + OMAP44XX_IRQ_GIC_START }, 1411 { .irq = 53 + OMAP44XX_IRQ_GIC_START },
1412 { .irq = -1 }
1309}; 1413};
1310 1414
1311static struct omap_hwmod_dma_info omap44xx_dss_dsi1_sdma_reqs[] = { 1415static struct omap_hwmod_dma_info omap44xx_dss_dsi1_sdma_reqs[] = {
1312 { .dma_req = 74 + OMAP44XX_DMA_REQ_START }, 1416 { .dma_req = 74 + OMAP44XX_DMA_REQ_START },
1417 { .dma_req = -1 }
1313}; 1418};
1314 1419
1315static struct omap_hwmod_addr_space omap44xx_dss_dsi1_dma_addrs[] = { 1420static struct omap_hwmod_addr_space omap44xx_dss_dsi1_dma_addrs[] = {
@@ -1318,15 +1423,15 @@ static struct omap_hwmod_addr_space omap44xx_dss_dsi1_dma_addrs[] = {
1318 .pa_end = 0x580041ff, 1423 .pa_end = 0x580041ff,
1319 .flags = ADDR_TYPE_RT 1424 .flags = ADDR_TYPE_RT
1320 }, 1425 },
1426 { }
1321}; 1427};
1322 1428
1323/* l3_main_2 -> dss_dsi1 */ 1429/* l3_main_2 -> dss_dsi1 */
1324static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_dsi1 = { 1430static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_dsi1 = {
1325 .master = &omap44xx_l3_main_2_hwmod, 1431 .master = &omap44xx_l3_main_2_hwmod,
1326 .slave = &omap44xx_dss_dsi1_hwmod, 1432 .slave = &omap44xx_dss_dsi1_hwmod,
1327 .clk = "l3_div_ck", 1433 .clk = "dss_fck",
1328 .addr = omap44xx_dss_dsi1_dma_addrs, 1434 .addr = omap44xx_dss_dsi1_dma_addrs,
1329 .addr_cnt = ARRAY_SIZE(omap44xx_dss_dsi1_dma_addrs),
1330 .user = OCP_USER_SDMA, 1435 .user = OCP_USER_SDMA,
1331}; 1436};
1332 1437
@@ -1336,6 +1441,7 @@ static struct omap_hwmod_addr_space omap44xx_dss_dsi1_addrs[] = {
1336 .pa_end = 0x480441ff, 1441 .pa_end = 0x480441ff,
1337 .flags = ADDR_TYPE_RT 1442 .flags = ADDR_TYPE_RT
1338 }, 1443 },
1444 { }
1339}; 1445};
1340 1446
1341/* l4_per -> dss_dsi1 */ 1447/* l4_per -> dss_dsi1 */
@@ -1344,7 +1450,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_dsi1 = {
1344 .slave = &omap44xx_dss_dsi1_hwmod, 1450 .slave = &omap44xx_dss_dsi1_hwmod,
1345 .clk = "l4_div_ck", 1451 .clk = "l4_div_ck",
1346 .addr = omap44xx_dss_dsi1_addrs, 1452 .addr = omap44xx_dss_dsi1_addrs,
1347 .addr_cnt = ARRAY_SIZE(omap44xx_dss_dsi1_addrs),
1348 .user = OCP_USER_MPU, 1453 .user = OCP_USER_MPU,
1349}; 1454};
1350 1455
@@ -1354,19 +1459,25 @@ static struct omap_hwmod_ocp_if *omap44xx_dss_dsi1_slaves[] = {
1354 &omap44xx_l4_per__dss_dsi1, 1459 &omap44xx_l4_per__dss_dsi1,
1355}; 1460};
1356 1461
1462static struct omap_hwmod_opt_clk dss_dsi1_opt_clks[] = {
1463 { .role = "sys_clk", .clk = "dss_sys_clk" },
1464};
1465
1357static struct omap_hwmod omap44xx_dss_dsi1_hwmod = { 1466static struct omap_hwmod omap44xx_dss_dsi1_hwmod = {
1358 .name = "dss_dsi1", 1467 .name = "dss_dsi1",
1359 .class = &omap44xx_dsi_hwmod_class, 1468 .class = &omap44xx_dsi_hwmod_class,
1469 .clkdm_name = "l3_dss_clkdm",
1360 .mpu_irqs = omap44xx_dss_dsi1_irqs, 1470 .mpu_irqs = omap44xx_dss_dsi1_irqs,
1361 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_dss_dsi1_irqs),
1362 .sdma_reqs = omap44xx_dss_dsi1_sdma_reqs, 1471 .sdma_reqs = omap44xx_dss_dsi1_sdma_reqs,
1363 .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_dss_dsi1_sdma_reqs), 1472 .main_clk = "dss_dss_clk",
1364 .main_clk = "dss_fck",
1365 .prcm = { 1473 .prcm = {
1366 .omap4 = { 1474 .omap4 = {
1367 .clkctrl_reg = OMAP4430_CM_DSS_DSS_CLKCTRL, 1475 .clkctrl_offs = OMAP4_CM_DSS_DSS_CLKCTRL_OFFSET,
1476 .context_offs = OMAP4_RM_DSS_DSS_CONTEXT_OFFSET,
1368 }, 1477 },
1369 }, 1478 },
1479 .opt_clks = dss_dsi1_opt_clks,
1480 .opt_clks_cnt = ARRAY_SIZE(dss_dsi1_opt_clks),
1370 .slaves = omap44xx_dss_dsi1_slaves, 1481 .slaves = omap44xx_dss_dsi1_slaves,
1371 .slaves_cnt = ARRAY_SIZE(omap44xx_dss_dsi1_slaves), 1482 .slaves_cnt = ARRAY_SIZE(omap44xx_dss_dsi1_slaves),
1372 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), 1483 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
@@ -1376,10 +1487,12 @@ static struct omap_hwmod omap44xx_dss_dsi1_hwmod = {
1376static struct omap_hwmod omap44xx_dss_dsi2_hwmod; 1487static struct omap_hwmod omap44xx_dss_dsi2_hwmod;
1377static struct omap_hwmod_irq_info omap44xx_dss_dsi2_irqs[] = { 1488static struct omap_hwmod_irq_info omap44xx_dss_dsi2_irqs[] = {
1378 { .irq = 84 + OMAP44XX_IRQ_GIC_START }, 1489 { .irq = 84 + OMAP44XX_IRQ_GIC_START },
1490 { .irq = -1 }
1379}; 1491};
1380 1492
1381static struct omap_hwmod_dma_info omap44xx_dss_dsi2_sdma_reqs[] = { 1493static struct omap_hwmod_dma_info omap44xx_dss_dsi2_sdma_reqs[] = {
1382 { .dma_req = 83 + OMAP44XX_DMA_REQ_START }, 1494 { .dma_req = 83 + OMAP44XX_DMA_REQ_START },
1495 { .dma_req = -1 }
1383}; 1496};
1384 1497
1385static struct omap_hwmod_addr_space omap44xx_dss_dsi2_dma_addrs[] = { 1498static struct omap_hwmod_addr_space omap44xx_dss_dsi2_dma_addrs[] = {
@@ -1388,15 +1501,15 @@ static struct omap_hwmod_addr_space omap44xx_dss_dsi2_dma_addrs[] = {
1388 .pa_end = 0x580051ff, 1501 .pa_end = 0x580051ff,
1389 .flags = ADDR_TYPE_RT 1502 .flags = ADDR_TYPE_RT
1390 }, 1503 },
1504 { }
1391}; 1505};
1392 1506
1393/* l3_main_2 -> dss_dsi2 */ 1507/* l3_main_2 -> dss_dsi2 */
1394static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_dsi2 = { 1508static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_dsi2 = {
1395 .master = &omap44xx_l3_main_2_hwmod, 1509 .master = &omap44xx_l3_main_2_hwmod,
1396 .slave = &omap44xx_dss_dsi2_hwmod, 1510 .slave = &omap44xx_dss_dsi2_hwmod,
1397 .clk = "l3_div_ck", 1511 .clk = "dss_fck",
1398 .addr = omap44xx_dss_dsi2_dma_addrs, 1512 .addr = omap44xx_dss_dsi2_dma_addrs,
1399 .addr_cnt = ARRAY_SIZE(omap44xx_dss_dsi2_dma_addrs),
1400 .user = OCP_USER_SDMA, 1513 .user = OCP_USER_SDMA,
1401}; 1514};
1402 1515
@@ -1406,6 +1519,7 @@ static struct omap_hwmod_addr_space omap44xx_dss_dsi2_addrs[] = {
1406 .pa_end = 0x480451ff, 1519 .pa_end = 0x480451ff,
1407 .flags = ADDR_TYPE_RT 1520 .flags = ADDR_TYPE_RT
1408 }, 1521 },
1522 { }
1409}; 1523};
1410 1524
1411/* l4_per -> dss_dsi2 */ 1525/* l4_per -> dss_dsi2 */
@@ -1414,7 +1528,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_dsi2 = {
1414 .slave = &omap44xx_dss_dsi2_hwmod, 1528 .slave = &omap44xx_dss_dsi2_hwmod,
1415 .clk = "l4_div_ck", 1529 .clk = "l4_div_ck",
1416 .addr = omap44xx_dss_dsi2_addrs, 1530 .addr = omap44xx_dss_dsi2_addrs,
1417 .addr_cnt = ARRAY_SIZE(omap44xx_dss_dsi2_addrs),
1418 .user = OCP_USER_MPU, 1531 .user = OCP_USER_MPU,
1419}; 1532};
1420 1533
@@ -1424,19 +1537,25 @@ static struct omap_hwmod_ocp_if *omap44xx_dss_dsi2_slaves[] = {
1424 &omap44xx_l4_per__dss_dsi2, 1537 &omap44xx_l4_per__dss_dsi2,
1425}; 1538};
1426 1539
1540static struct omap_hwmod_opt_clk dss_dsi2_opt_clks[] = {
1541 { .role = "sys_clk", .clk = "dss_sys_clk" },
1542};
1543
1427static struct omap_hwmod omap44xx_dss_dsi2_hwmod = { 1544static struct omap_hwmod omap44xx_dss_dsi2_hwmod = {
1428 .name = "dss_dsi2", 1545 .name = "dss_dsi2",
1429 .class = &omap44xx_dsi_hwmod_class, 1546 .class = &omap44xx_dsi_hwmod_class,
1547 .clkdm_name = "l3_dss_clkdm",
1430 .mpu_irqs = omap44xx_dss_dsi2_irqs, 1548 .mpu_irqs = omap44xx_dss_dsi2_irqs,
1431 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_dss_dsi2_irqs),
1432 .sdma_reqs = omap44xx_dss_dsi2_sdma_reqs, 1549 .sdma_reqs = omap44xx_dss_dsi2_sdma_reqs,
1433 .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_dss_dsi2_sdma_reqs), 1550 .main_clk = "dss_dss_clk",
1434 .main_clk = "dss_fck",
1435 .prcm = { 1551 .prcm = {
1436 .omap4 = { 1552 .omap4 = {
1437 .clkctrl_reg = OMAP4430_CM_DSS_DSS_CLKCTRL, 1553 .clkctrl_offs = OMAP4_CM_DSS_DSS_CLKCTRL_OFFSET,
1554 .context_offs = OMAP4_RM_DSS_DSS_CONTEXT_OFFSET,
1438 }, 1555 },
1439 }, 1556 },
1557 .opt_clks = dss_dsi2_opt_clks,
1558 .opt_clks_cnt = ARRAY_SIZE(dss_dsi2_opt_clks),
1440 .slaves = omap44xx_dss_dsi2_slaves, 1559 .slaves = omap44xx_dss_dsi2_slaves,
1441 .slaves_cnt = ARRAY_SIZE(omap44xx_dss_dsi2_slaves), 1560 .slaves_cnt = ARRAY_SIZE(omap44xx_dss_dsi2_slaves),
1442 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), 1561 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
@@ -1466,10 +1585,12 @@ static struct omap_hwmod_class omap44xx_hdmi_hwmod_class = {
1466static struct omap_hwmod omap44xx_dss_hdmi_hwmod; 1585static struct omap_hwmod omap44xx_dss_hdmi_hwmod;
1467static struct omap_hwmod_irq_info omap44xx_dss_hdmi_irqs[] = { 1586static struct omap_hwmod_irq_info omap44xx_dss_hdmi_irqs[] = {
1468 { .irq = 101 + OMAP44XX_IRQ_GIC_START }, 1587 { .irq = 101 + OMAP44XX_IRQ_GIC_START },
1588 { .irq = -1 }
1469}; 1589};
1470 1590
1471static struct omap_hwmod_dma_info omap44xx_dss_hdmi_sdma_reqs[] = { 1591static struct omap_hwmod_dma_info omap44xx_dss_hdmi_sdma_reqs[] = {
1472 { .dma_req = 75 + OMAP44XX_DMA_REQ_START }, 1592 { .dma_req = 75 + OMAP44XX_DMA_REQ_START },
1593 { .dma_req = -1 }
1473}; 1594};
1474 1595
1475static struct omap_hwmod_addr_space omap44xx_dss_hdmi_dma_addrs[] = { 1596static struct omap_hwmod_addr_space omap44xx_dss_hdmi_dma_addrs[] = {
@@ -1478,15 +1599,15 @@ static struct omap_hwmod_addr_space omap44xx_dss_hdmi_dma_addrs[] = {
1478 .pa_end = 0x58006fff, 1599 .pa_end = 0x58006fff,
1479 .flags = ADDR_TYPE_RT 1600 .flags = ADDR_TYPE_RT
1480 }, 1601 },
1602 { }
1481}; 1603};
1482 1604
1483/* l3_main_2 -> dss_hdmi */ 1605/* l3_main_2 -> dss_hdmi */
1484static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_hdmi = { 1606static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_hdmi = {
1485 .master = &omap44xx_l3_main_2_hwmod, 1607 .master = &omap44xx_l3_main_2_hwmod,
1486 .slave = &omap44xx_dss_hdmi_hwmod, 1608 .slave = &omap44xx_dss_hdmi_hwmod,
1487 .clk = "l3_div_ck", 1609 .clk = "dss_fck",
1488 .addr = omap44xx_dss_hdmi_dma_addrs, 1610 .addr = omap44xx_dss_hdmi_dma_addrs,
1489 .addr_cnt = ARRAY_SIZE(omap44xx_dss_hdmi_dma_addrs),
1490 .user = OCP_USER_SDMA, 1611 .user = OCP_USER_SDMA,
1491}; 1612};
1492 1613
@@ -1496,6 +1617,7 @@ static struct omap_hwmod_addr_space omap44xx_dss_hdmi_addrs[] = {
1496 .pa_end = 0x48046fff, 1617 .pa_end = 0x48046fff,
1497 .flags = ADDR_TYPE_RT 1618 .flags = ADDR_TYPE_RT
1498 }, 1619 },
1620 { }
1499}; 1621};
1500 1622
1501/* l4_per -> dss_hdmi */ 1623/* l4_per -> dss_hdmi */
@@ -1504,7 +1626,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_hdmi = {
1504 .slave = &omap44xx_dss_hdmi_hwmod, 1626 .slave = &omap44xx_dss_hdmi_hwmod,
1505 .clk = "l4_div_ck", 1627 .clk = "l4_div_ck",
1506 .addr = omap44xx_dss_hdmi_addrs, 1628 .addr = omap44xx_dss_hdmi_addrs,
1507 .addr_cnt = ARRAY_SIZE(omap44xx_dss_hdmi_addrs),
1508 .user = OCP_USER_MPU, 1629 .user = OCP_USER_MPU,
1509}; 1630};
1510 1631
@@ -1514,19 +1635,25 @@ static struct omap_hwmod_ocp_if *omap44xx_dss_hdmi_slaves[] = {
1514 &omap44xx_l4_per__dss_hdmi, 1635 &omap44xx_l4_per__dss_hdmi,
1515}; 1636};
1516 1637
1638static struct omap_hwmod_opt_clk dss_hdmi_opt_clks[] = {
1639 { .role = "sys_clk", .clk = "dss_sys_clk" },
1640};
1641
1517static struct omap_hwmod omap44xx_dss_hdmi_hwmod = { 1642static struct omap_hwmod omap44xx_dss_hdmi_hwmod = {
1518 .name = "dss_hdmi", 1643 .name = "dss_hdmi",
1519 .class = &omap44xx_hdmi_hwmod_class, 1644 .class = &omap44xx_hdmi_hwmod_class,
1645 .clkdm_name = "l3_dss_clkdm",
1520 .mpu_irqs = omap44xx_dss_hdmi_irqs, 1646 .mpu_irqs = omap44xx_dss_hdmi_irqs,
1521 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_dss_hdmi_irqs),
1522 .sdma_reqs = omap44xx_dss_hdmi_sdma_reqs, 1647 .sdma_reqs = omap44xx_dss_hdmi_sdma_reqs,
1523 .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_dss_hdmi_sdma_reqs), 1648 .main_clk = "dss_dss_clk",
1524 .main_clk = "dss_fck",
1525 .prcm = { 1649 .prcm = {
1526 .omap4 = { 1650 .omap4 = {
1527 .clkctrl_reg = OMAP4430_CM_DSS_DSS_CLKCTRL, 1651 .clkctrl_offs = OMAP4_CM_DSS_DSS_CLKCTRL_OFFSET,
1652 .context_offs = OMAP4_RM_DSS_DSS_CONTEXT_OFFSET,
1528 }, 1653 },
1529 }, 1654 },
1655 .opt_clks = dss_hdmi_opt_clks,
1656 .opt_clks_cnt = ARRAY_SIZE(dss_hdmi_opt_clks),
1530 .slaves = omap44xx_dss_hdmi_slaves, 1657 .slaves = omap44xx_dss_hdmi_slaves,
1531 .slaves_cnt = ARRAY_SIZE(omap44xx_dss_hdmi_slaves), 1658 .slaves_cnt = ARRAY_SIZE(omap44xx_dss_hdmi_slaves),
1532 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), 1659 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
@@ -1556,6 +1683,7 @@ static struct omap_hwmod_class omap44xx_rfbi_hwmod_class = {
1556static struct omap_hwmod omap44xx_dss_rfbi_hwmod; 1683static struct omap_hwmod omap44xx_dss_rfbi_hwmod;
1557static struct omap_hwmod_dma_info omap44xx_dss_rfbi_sdma_reqs[] = { 1684static struct omap_hwmod_dma_info omap44xx_dss_rfbi_sdma_reqs[] = {
1558 { .dma_req = 13 + OMAP44XX_DMA_REQ_START }, 1685 { .dma_req = 13 + OMAP44XX_DMA_REQ_START },
1686 { .dma_req = -1 }
1559}; 1687};
1560 1688
1561static struct omap_hwmod_addr_space omap44xx_dss_rfbi_dma_addrs[] = { 1689static struct omap_hwmod_addr_space omap44xx_dss_rfbi_dma_addrs[] = {
@@ -1564,15 +1692,15 @@ static struct omap_hwmod_addr_space omap44xx_dss_rfbi_dma_addrs[] = {
1564 .pa_end = 0x580020ff, 1692 .pa_end = 0x580020ff,
1565 .flags = ADDR_TYPE_RT 1693 .flags = ADDR_TYPE_RT
1566 }, 1694 },
1695 { }
1567}; 1696};
1568 1697
1569/* l3_main_2 -> dss_rfbi */ 1698/* l3_main_2 -> dss_rfbi */
1570static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_rfbi = { 1699static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_rfbi = {
1571 .master = &omap44xx_l3_main_2_hwmod, 1700 .master = &omap44xx_l3_main_2_hwmod,
1572 .slave = &omap44xx_dss_rfbi_hwmod, 1701 .slave = &omap44xx_dss_rfbi_hwmod,
1573 .clk = "l3_div_ck", 1702 .clk = "dss_fck",
1574 .addr = omap44xx_dss_rfbi_dma_addrs, 1703 .addr = omap44xx_dss_rfbi_dma_addrs,
1575 .addr_cnt = ARRAY_SIZE(omap44xx_dss_rfbi_dma_addrs),
1576 .user = OCP_USER_SDMA, 1704 .user = OCP_USER_SDMA,
1577}; 1705};
1578 1706
@@ -1582,6 +1710,7 @@ static struct omap_hwmod_addr_space omap44xx_dss_rfbi_addrs[] = {
1582 .pa_end = 0x480420ff, 1710 .pa_end = 0x480420ff,
1583 .flags = ADDR_TYPE_RT 1711 .flags = ADDR_TYPE_RT
1584 }, 1712 },
1713 { }
1585}; 1714};
1586 1715
1587/* l4_per -> dss_rfbi */ 1716/* l4_per -> dss_rfbi */
@@ -1590,7 +1719,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_rfbi = {
1590 .slave = &omap44xx_dss_rfbi_hwmod, 1719 .slave = &omap44xx_dss_rfbi_hwmod,
1591 .clk = "l4_div_ck", 1720 .clk = "l4_div_ck",
1592 .addr = omap44xx_dss_rfbi_addrs, 1721 .addr = omap44xx_dss_rfbi_addrs,
1593 .addr_cnt = ARRAY_SIZE(omap44xx_dss_rfbi_addrs),
1594 .user = OCP_USER_MPU, 1722 .user = OCP_USER_MPU,
1595}; 1723};
1596 1724
@@ -1600,17 +1728,24 @@ static struct omap_hwmod_ocp_if *omap44xx_dss_rfbi_slaves[] = {
1600 &omap44xx_l4_per__dss_rfbi, 1728 &omap44xx_l4_per__dss_rfbi,
1601}; 1729};
1602 1730
1731static struct omap_hwmod_opt_clk dss_rfbi_opt_clks[] = {
1732 { .role = "ick", .clk = "dss_fck" },
1733};
1734
1603static struct omap_hwmod omap44xx_dss_rfbi_hwmod = { 1735static struct omap_hwmod omap44xx_dss_rfbi_hwmod = {
1604 .name = "dss_rfbi", 1736 .name = "dss_rfbi",
1605 .class = &omap44xx_rfbi_hwmod_class, 1737 .class = &omap44xx_rfbi_hwmod_class,
1738 .clkdm_name = "l3_dss_clkdm",
1606 .sdma_reqs = omap44xx_dss_rfbi_sdma_reqs, 1739 .sdma_reqs = omap44xx_dss_rfbi_sdma_reqs,
1607 .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_dss_rfbi_sdma_reqs), 1740 .main_clk = "dss_dss_clk",
1608 .main_clk = "dss_fck",
1609 .prcm = { 1741 .prcm = {
1610 .omap4 = { 1742 .omap4 = {
1611 .clkctrl_reg = OMAP4430_CM_DSS_DSS_CLKCTRL, 1743 .clkctrl_offs = OMAP4_CM_DSS_DSS_CLKCTRL_OFFSET,
1744 .context_offs = OMAP4_RM_DSS_DSS_CONTEXT_OFFSET,
1612 }, 1745 },
1613 }, 1746 },
1747 .opt_clks = dss_rfbi_opt_clks,
1748 .opt_clks_cnt = ARRAY_SIZE(dss_rfbi_opt_clks),
1614 .slaves = omap44xx_dss_rfbi_slaves, 1749 .slaves = omap44xx_dss_rfbi_slaves,
1615 .slaves_cnt = ARRAY_SIZE(omap44xx_dss_rfbi_slaves), 1750 .slaves_cnt = ARRAY_SIZE(omap44xx_dss_rfbi_slaves),
1616 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), 1751 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
@@ -1633,15 +1768,15 @@ static struct omap_hwmod_addr_space omap44xx_dss_venc_dma_addrs[] = {
1633 .pa_end = 0x580030ff, 1768 .pa_end = 0x580030ff,
1634 .flags = ADDR_TYPE_RT 1769 .flags = ADDR_TYPE_RT
1635 }, 1770 },
1771 { }
1636}; 1772};
1637 1773
1638/* l3_main_2 -> dss_venc */ 1774/* l3_main_2 -> dss_venc */
1639static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_venc = { 1775static struct omap_hwmod_ocp_if omap44xx_l3_main_2__dss_venc = {
1640 .master = &omap44xx_l3_main_2_hwmod, 1776 .master = &omap44xx_l3_main_2_hwmod,
1641 .slave = &omap44xx_dss_venc_hwmod, 1777 .slave = &omap44xx_dss_venc_hwmod,
1642 .clk = "l3_div_ck", 1778 .clk = "dss_fck",
1643 .addr = omap44xx_dss_venc_dma_addrs, 1779 .addr = omap44xx_dss_venc_dma_addrs,
1644 .addr_cnt = ARRAY_SIZE(omap44xx_dss_venc_dma_addrs),
1645 .user = OCP_USER_SDMA, 1780 .user = OCP_USER_SDMA,
1646}; 1781};
1647 1782
@@ -1651,6 +1786,7 @@ static struct omap_hwmod_addr_space omap44xx_dss_venc_addrs[] = {
1651 .pa_end = 0x480430ff, 1786 .pa_end = 0x480430ff,
1652 .flags = ADDR_TYPE_RT 1787 .flags = ADDR_TYPE_RT
1653 }, 1788 },
1789 { }
1654}; 1790};
1655 1791
1656/* l4_per -> dss_venc */ 1792/* l4_per -> dss_venc */
@@ -1659,7 +1795,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__dss_venc = {
1659 .slave = &omap44xx_dss_venc_hwmod, 1795 .slave = &omap44xx_dss_venc_hwmod,
1660 .clk = "l4_div_ck", 1796 .clk = "l4_div_ck",
1661 .addr = omap44xx_dss_venc_addrs, 1797 .addr = omap44xx_dss_venc_addrs,
1662 .addr_cnt = ARRAY_SIZE(omap44xx_dss_venc_addrs),
1663 .user = OCP_USER_MPU, 1798 .user = OCP_USER_MPU,
1664}; 1799};
1665 1800
@@ -1672,10 +1807,12 @@ static struct omap_hwmod_ocp_if *omap44xx_dss_venc_slaves[] = {
1672static struct omap_hwmod omap44xx_dss_venc_hwmod = { 1807static struct omap_hwmod omap44xx_dss_venc_hwmod = {
1673 .name = "dss_venc", 1808 .name = "dss_venc",
1674 .class = &omap44xx_venc_hwmod_class, 1809 .class = &omap44xx_venc_hwmod_class,
1675 .main_clk = "dss_fck", 1810 .clkdm_name = "l3_dss_clkdm",
1811 .main_clk = "dss_dss_clk",
1676 .prcm = { 1812 .prcm = {
1677 .omap4 = { 1813 .omap4 = {
1678 .clkctrl_reg = OMAP4430_CM_DSS_DSS_CLKCTRL, 1814 .clkctrl_offs = OMAP4_CM_DSS_DSS_CLKCTRL_OFFSET,
1815 .context_offs = OMAP4_RM_DSS_DSS_CONTEXT_OFFSET,
1679 }, 1816 },
1680 }, 1817 },
1681 .slaves = omap44xx_dss_venc_slaves, 1818 .slaves = omap44xx_dss_venc_slaves,
@@ -1716,6 +1853,7 @@ static struct omap_gpio_dev_attr gpio_dev_attr = {
1716static struct omap_hwmod omap44xx_gpio1_hwmod; 1853static struct omap_hwmod omap44xx_gpio1_hwmod;
1717static struct omap_hwmod_irq_info omap44xx_gpio1_irqs[] = { 1854static struct omap_hwmod_irq_info omap44xx_gpio1_irqs[] = {
1718 { .irq = 29 + OMAP44XX_IRQ_GIC_START }, 1855 { .irq = 29 + OMAP44XX_IRQ_GIC_START },
1856 { .irq = -1 }
1719}; 1857};
1720 1858
1721static struct omap_hwmod_addr_space omap44xx_gpio1_addrs[] = { 1859static struct omap_hwmod_addr_space omap44xx_gpio1_addrs[] = {
@@ -1724,6 +1862,7 @@ static struct omap_hwmod_addr_space omap44xx_gpio1_addrs[] = {
1724 .pa_end = 0x4a3101ff, 1862 .pa_end = 0x4a3101ff,
1725 .flags = ADDR_TYPE_RT 1863 .flags = ADDR_TYPE_RT
1726 }, 1864 },
1865 { }
1727}; 1866};
1728 1867
1729/* l4_wkup -> gpio1 */ 1868/* l4_wkup -> gpio1 */
@@ -1732,7 +1871,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_wkup__gpio1 = {
1732 .slave = &omap44xx_gpio1_hwmod, 1871 .slave = &omap44xx_gpio1_hwmod,
1733 .clk = "l4_wkup_clk_mux_ck", 1872 .clk = "l4_wkup_clk_mux_ck",
1734 .addr = omap44xx_gpio1_addrs, 1873 .addr = omap44xx_gpio1_addrs,
1735 .addr_cnt = ARRAY_SIZE(omap44xx_gpio1_addrs),
1736 .user = OCP_USER_MPU | OCP_USER_SDMA, 1874 .user = OCP_USER_MPU | OCP_USER_SDMA,
1737}; 1875};
1738 1876
@@ -1748,12 +1886,14 @@ static struct omap_hwmod_opt_clk gpio1_opt_clks[] = {
1748static struct omap_hwmod omap44xx_gpio1_hwmod = { 1886static struct omap_hwmod omap44xx_gpio1_hwmod = {
1749 .name = "gpio1", 1887 .name = "gpio1",
1750 .class = &omap44xx_gpio_hwmod_class, 1888 .class = &omap44xx_gpio_hwmod_class,
1889 .clkdm_name = "l4_wkup_clkdm",
1751 .mpu_irqs = omap44xx_gpio1_irqs, 1890 .mpu_irqs = omap44xx_gpio1_irqs,
1752 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_gpio1_irqs),
1753 .main_clk = "gpio1_ick", 1891 .main_clk = "gpio1_ick",
1754 .prcm = { 1892 .prcm = {
1755 .omap4 = { 1893 .omap4 = {
1756 .clkctrl_reg = OMAP4430_CM_WKUP_GPIO1_CLKCTRL, 1894 .clkctrl_offs = OMAP4_CM_WKUP_GPIO1_CLKCTRL_OFFSET,
1895 .context_offs = OMAP4_RM_WKUP_GPIO1_CONTEXT_OFFSET,
1896 .modulemode = MODULEMODE_HWCTRL,
1757 }, 1897 },
1758 }, 1898 },
1759 .opt_clks = gpio1_opt_clks, 1899 .opt_clks = gpio1_opt_clks,
@@ -1768,6 +1908,7 @@ static struct omap_hwmod omap44xx_gpio1_hwmod = {
1768static struct omap_hwmod omap44xx_gpio2_hwmod; 1908static struct omap_hwmod omap44xx_gpio2_hwmod;
1769static struct omap_hwmod_irq_info omap44xx_gpio2_irqs[] = { 1909static struct omap_hwmod_irq_info omap44xx_gpio2_irqs[] = {
1770 { .irq = 30 + OMAP44XX_IRQ_GIC_START }, 1910 { .irq = 30 + OMAP44XX_IRQ_GIC_START },
1911 { .irq = -1 }
1771}; 1912};
1772 1913
1773static struct omap_hwmod_addr_space omap44xx_gpio2_addrs[] = { 1914static struct omap_hwmod_addr_space omap44xx_gpio2_addrs[] = {
@@ -1776,6 +1917,7 @@ static struct omap_hwmod_addr_space omap44xx_gpio2_addrs[] = {
1776 .pa_end = 0x480551ff, 1917 .pa_end = 0x480551ff,
1777 .flags = ADDR_TYPE_RT 1918 .flags = ADDR_TYPE_RT
1778 }, 1919 },
1920 { }
1779}; 1921};
1780 1922
1781/* l4_per -> gpio2 */ 1923/* l4_per -> gpio2 */
@@ -1784,7 +1926,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio2 = {
1784 .slave = &omap44xx_gpio2_hwmod, 1926 .slave = &omap44xx_gpio2_hwmod,
1785 .clk = "l4_div_ck", 1927 .clk = "l4_div_ck",
1786 .addr = omap44xx_gpio2_addrs, 1928 .addr = omap44xx_gpio2_addrs,
1787 .addr_cnt = ARRAY_SIZE(omap44xx_gpio2_addrs),
1788 .user = OCP_USER_MPU | OCP_USER_SDMA, 1929 .user = OCP_USER_MPU | OCP_USER_SDMA,
1789}; 1930};
1790 1931
@@ -1800,13 +1941,15 @@ static struct omap_hwmod_opt_clk gpio2_opt_clks[] = {
1800static struct omap_hwmod omap44xx_gpio2_hwmod = { 1941static struct omap_hwmod omap44xx_gpio2_hwmod = {
1801 .name = "gpio2", 1942 .name = "gpio2",
1802 .class = &omap44xx_gpio_hwmod_class, 1943 .class = &omap44xx_gpio_hwmod_class,
1944 .clkdm_name = "l4_per_clkdm",
1803 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, 1945 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
1804 .mpu_irqs = omap44xx_gpio2_irqs, 1946 .mpu_irqs = omap44xx_gpio2_irqs,
1805 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_gpio2_irqs),
1806 .main_clk = "gpio2_ick", 1947 .main_clk = "gpio2_ick",
1807 .prcm = { 1948 .prcm = {
1808 .omap4 = { 1949 .omap4 = {
1809 .clkctrl_reg = OMAP4430_CM_L4PER_GPIO2_CLKCTRL, 1950 .clkctrl_offs = OMAP4_CM_L4PER_GPIO2_CLKCTRL_OFFSET,
1951 .context_offs = OMAP4_RM_L4PER_GPIO2_CONTEXT_OFFSET,
1952 .modulemode = MODULEMODE_HWCTRL,
1810 }, 1953 },
1811 }, 1954 },
1812 .opt_clks = gpio2_opt_clks, 1955 .opt_clks = gpio2_opt_clks,
@@ -1821,6 +1964,7 @@ static struct omap_hwmod omap44xx_gpio2_hwmod = {
1821static struct omap_hwmod omap44xx_gpio3_hwmod; 1964static struct omap_hwmod omap44xx_gpio3_hwmod;
1822static struct omap_hwmod_irq_info omap44xx_gpio3_irqs[] = { 1965static struct omap_hwmod_irq_info omap44xx_gpio3_irqs[] = {
1823 { .irq = 31 + OMAP44XX_IRQ_GIC_START }, 1966 { .irq = 31 + OMAP44XX_IRQ_GIC_START },
1967 { .irq = -1 }
1824}; 1968};
1825 1969
1826static struct omap_hwmod_addr_space omap44xx_gpio3_addrs[] = { 1970static struct omap_hwmod_addr_space omap44xx_gpio3_addrs[] = {
@@ -1829,6 +1973,7 @@ static struct omap_hwmod_addr_space omap44xx_gpio3_addrs[] = {
1829 .pa_end = 0x480571ff, 1973 .pa_end = 0x480571ff,
1830 .flags = ADDR_TYPE_RT 1974 .flags = ADDR_TYPE_RT
1831 }, 1975 },
1976 { }
1832}; 1977};
1833 1978
1834/* l4_per -> gpio3 */ 1979/* l4_per -> gpio3 */
@@ -1837,7 +1982,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio3 = {
1837 .slave = &omap44xx_gpio3_hwmod, 1982 .slave = &omap44xx_gpio3_hwmod,
1838 .clk = "l4_div_ck", 1983 .clk = "l4_div_ck",
1839 .addr = omap44xx_gpio3_addrs, 1984 .addr = omap44xx_gpio3_addrs,
1840 .addr_cnt = ARRAY_SIZE(omap44xx_gpio3_addrs),
1841 .user = OCP_USER_MPU | OCP_USER_SDMA, 1985 .user = OCP_USER_MPU | OCP_USER_SDMA,
1842}; 1986};
1843 1987
@@ -1853,13 +1997,15 @@ static struct omap_hwmod_opt_clk gpio3_opt_clks[] = {
1853static struct omap_hwmod omap44xx_gpio3_hwmod = { 1997static struct omap_hwmod omap44xx_gpio3_hwmod = {
1854 .name = "gpio3", 1998 .name = "gpio3",
1855 .class = &omap44xx_gpio_hwmod_class, 1999 .class = &omap44xx_gpio_hwmod_class,
2000 .clkdm_name = "l4_per_clkdm",
1856 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, 2001 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
1857 .mpu_irqs = omap44xx_gpio3_irqs, 2002 .mpu_irqs = omap44xx_gpio3_irqs,
1858 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_gpio3_irqs),
1859 .main_clk = "gpio3_ick", 2003 .main_clk = "gpio3_ick",
1860 .prcm = { 2004 .prcm = {
1861 .omap4 = { 2005 .omap4 = {
1862 .clkctrl_reg = OMAP4430_CM_L4PER_GPIO3_CLKCTRL, 2006 .clkctrl_offs = OMAP4_CM_L4PER_GPIO3_CLKCTRL_OFFSET,
2007 .context_offs = OMAP4_RM_L4PER_GPIO3_CONTEXT_OFFSET,
2008 .modulemode = MODULEMODE_HWCTRL,
1863 }, 2009 },
1864 }, 2010 },
1865 .opt_clks = gpio3_opt_clks, 2011 .opt_clks = gpio3_opt_clks,
@@ -1874,6 +2020,7 @@ static struct omap_hwmod omap44xx_gpio3_hwmod = {
1874static struct omap_hwmod omap44xx_gpio4_hwmod; 2020static struct omap_hwmod omap44xx_gpio4_hwmod;
1875static struct omap_hwmod_irq_info omap44xx_gpio4_irqs[] = { 2021static struct omap_hwmod_irq_info omap44xx_gpio4_irqs[] = {
1876 { .irq = 32 + OMAP44XX_IRQ_GIC_START }, 2022 { .irq = 32 + OMAP44XX_IRQ_GIC_START },
2023 { .irq = -1 }
1877}; 2024};
1878 2025
1879static struct omap_hwmod_addr_space omap44xx_gpio4_addrs[] = { 2026static struct omap_hwmod_addr_space omap44xx_gpio4_addrs[] = {
@@ -1882,6 +2029,7 @@ static struct omap_hwmod_addr_space omap44xx_gpio4_addrs[] = {
1882 .pa_end = 0x480591ff, 2029 .pa_end = 0x480591ff,
1883 .flags = ADDR_TYPE_RT 2030 .flags = ADDR_TYPE_RT
1884 }, 2031 },
2032 { }
1885}; 2033};
1886 2034
1887/* l4_per -> gpio4 */ 2035/* l4_per -> gpio4 */
@@ -1890,7 +2038,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio4 = {
1890 .slave = &omap44xx_gpio4_hwmod, 2038 .slave = &omap44xx_gpio4_hwmod,
1891 .clk = "l4_div_ck", 2039 .clk = "l4_div_ck",
1892 .addr = omap44xx_gpio4_addrs, 2040 .addr = omap44xx_gpio4_addrs,
1893 .addr_cnt = ARRAY_SIZE(omap44xx_gpio4_addrs),
1894 .user = OCP_USER_MPU | OCP_USER_SDMA, 2041 .user = OCP_USER_MPU | OCP_USER_SDMA,
1895}; 2042};
1896 2043
@@ -1906,13 +2053,15 @@ static struct omap_hwmod_opt_clk gpio4_opt_clks[] = {
1906static struct omap_hwmod omap44xx_gpio4_hwmod = { 2053static struct omap_hwmod omap44xx_gpio4_hwmod = {
1907 .name = "gpio4", 2054 .name = "gpio4",
1908 .class = &omap44xx_gpio_hwmod_class, 2055 .class = &omap44xx_gpio_hwmod_class,
2056 .clkdm_name = "l4_per_clkdm",
1909 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, 2057 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
1910 .mpu_irqs = omap44xx_gpio4_irqs, 2058 .mpu_irqs = omap44xx_gpio4_irqs,
1911 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_gpio4_irqs),
1912 .main_clk = "gpio4_ick", 2059 .main_clk = "gpio4_ick",
1913 .prcm = { 2060 .prcm = {
1914 .omap4 = { 2061 .omap4 = {
1915 .clkctrl_reg = OMAP4430_CM_L4PER_GPIO4_CLKCTRL, 2062 .clkctrl_offs = OMAP4_CM_L4PER_GPIO4_CLKCTRL_OFFSET,
2063 .context_offs = OMAP4_RM_L4PER_GPIO4_CONTEXT_OFFSET,
2064 .modulemode = MODULEMODE_HWCTRL,
1916 }, 2065 },
1917 }, 2066 },
1918 .opt_clks = gpio4_opt_clks, 2067 .opt_clks = gpio4_opt_clks,
@@ -1927,6 +2076,7 @@ static struct omap_hwmod omap44xx_gpio4_hwmod = {
1927static struct omap_hwmod omap44xx_gpio5_hwmod; 2076static struct omap_hwmod omap44xx_gpio5_hwmod;
1928static struct omap_hwmod_irq_info omap44xx_gpio5_irqs[] = { 2077static struct omap_hwmod_irq_info omap44xx_gpio5_irqs[] = {
1929 { .irq = 33 + OMAP44XX_IRQ_GIC_START }, 2078 { .irq = 33 + OMAP44XX_IRQ_GIC_START },
2079 { .irq = -1 }
1930}; 2080};
1931 2081
1932static struct omap_hwmod_addr_space omap44xx_gpio5_addrs[] = { 2082static struct omap_hwmod_addr_space omap44xx_gpio5_addrs[] = {
@@ -1935,6 +2085,7 @@ static struct omap_hwmod_addr_space omap44xx_gpio5_addrs[] = {
1935 .pa_end = 0x4805b1ff, 2085 .pa_end = 0x4805b1ff,
1936 .flags = ADDR_TYPE_RT 2086 .flags = ADDR_TYPE_RT
1937 }, 2087 },
2088 { }
1938}; 2089};
1939 2090
1940/* l4_per -> gpio5 */ 2091/* l4_per -> gpio5 */
@@ -1943,7 +2094,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio5 = {
1943 .slave = &omap44xx_gpio5_hwmod, 2094 .slave = &omap44xx_gpio5_hwmod,
1944 .clk = "l4_div_ck", 2095 .clk = "l4_div_ck",
1945 .addr = omap44xx_gpio5_addrs, 2096 .addr = omap44xx_gpio5_addrs,
1946 .addr_cnt = ARRAY_SIZE(omap44xx_gpio5_addrs),
1947 .user = OCP_USER_MPU | OCP_USER_SDMA, 2097 .user = OCP_USER_MPU | OCP_USER_SDMA,
1948}; 2098};
1949 2099
@@ -1959,13 +2109,15 @@ static struct omap_hwmod_opt_clk gpio5_opt_clks[] = {
1959static struct omap_hwmod omap44xx_gpio5_hwmod = { 2109static struct omap_hwmod omap44xx_gpio5_hwmod = {
1960 .name = "gpio5", 2110 .name = "gpio5",
1961 .class = &omap44xx_gpio_hwmod_class, 2111 .class = &omap44xx_gpio_hwmod_class,
2112 .clkdm_name = "l4_per_clkdm",
1962 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, 2113 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
1963 .mpu_irqs = omap44xx_gpio5_irqs, 2114 .mpu_irqs = omap44xx_gpio5_irqs,
1964 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_gpio5_irqs),
1965 .main_clk = "gpio5_ick", 2115 .main_clk = "gpio5_ick",
1966 .prcm = { 2116 .prcm = {
1967 .omap4 = { 2117 .omap4 = {
1968 .clkctrl_reg = OMAP4430_CM_L4PER_GPIO5_CLKCTRL, 2118 .clkctrl_offs = OMAP4_CM_L4PER_GPIO5_CLKCTRL_OFFSET,
2119 .context_offs = OMAP4_RM_L4PER_GPIO5_CONTEXT_OFFSET,
2120 .modulemode = MODULEMODE_HWCTRL,
1969 }, 2121 },
1970 }, 2122 },
1971 .opt_clks = gpio5_opt_clks, 2123 .opt_clks = gpio5_opt_clks,
@@ -1980,6 +2132,7 @@ static struct omap_hwmod omap44xx_gpio5_hwmod = {
1980static struct omap_hwmod omap44xx_gpio6_hwmod; 2132static struct omap_hwmod omap44xx_gpio6_hwmod;
1981static struct omap_hwmod_irq_info omap44xx_gpio6_irqs[] = { 2133static struct omap_hwmod_irq_info omap44xx_gpio6_irqs[] = {
1982 { .irq = 34 + OMAP44XX_IRQ_GIC_START }, 2134 { .irq = 34 + OMAP44XX_IRQ_GIC_START },
2135 { .irq = -1 }
1983}; 2136};
1984 2137
1985static struct omap_hwmod_addr_space omap44xx_gpio6_addrs[] = { 2138static struct omap_hwmod_addr_space omap44xx_gpio6_addrs[] = {
@@ -1988,6 +2141,7 @@ static struct omap_hwmod_addr_space omap44xx_gpio6_addrs[] = {
1988 .pa_end = 0x4805d1ff, 2141 .pa_end = 0x4805d1ff,
1989 .flags = ADDR_TYPE_RT 2142 .flags = ADDR_TYPE_RT
1990 }, 2143 },
2144 { }
1991}; 2145};
1992 2146
1993/* l4_per -> gpio6 */ 2147/* l4_per -> gpio6 */
@@ -1996,7 +2150,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__gpio6 = {
1996 .slave = &omap44xx_gpio6_hwmod, 2150 .slave = &omap44xx_gpio6_hwmod,
1997 .clk = "l4_div_ck", 2151 .clk = "l4_div_ck",
1998 .addr = omap44xx_gpio6_addrs, 2152 .addr = omap44xx_gpio6_addrs,
1999 .addr_cnt = ARRAY_SIZE(omap44xx_gpio6_addrs),
2000 .user = OCP_USER_MPU | OCP_USER_SDMA, 2153 .user = OCP_USER_MPU | OCP_USER_SDMA,
2001}; 2154};
2002 2155
@@ -2012,13 +2165,15 @@ static struct omap_hwmod_opt_clk gpio6_opt_clks[] = {
2012static struct omap_hwmod omap44xx_gpio6_hwmod = { 2165static struct omap_hwmod omap44xx_gpio6_hwmod = {
2013 .name = "gpio6", 2166 .name = "gpio6",
2014 .class = &omap44xx_gpio_hwmod_class, 2167 .class = &omap44xx_gpio_hwmod_class,
2168 .clkdm_name = "l4_per_clkdm",
2015 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET, 2169 .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
2016 .mpu_irqs = omap44xx_gpio6_irqs, 2170 .mpu_irqs = omap44xx_gpio6_irqs,
2017 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_gpio6_irqs),
2018 .main_clk = "gpio6_ick", 2171 .main_clk = "gpio6_ick",
2019 .prcm = { 2172 .prcm = {
2020 .omap4 = { 2173 .omap4 = {
2021 .clkctrl_reg = OMAP4430_CM_L4PER_GPIO6_CLKCTRL, 2174 .clkctrl_offs = OMAP4_CM_L4PER_GPIO6_CLKCTRL_OFFSET,
2175 .context_offs = OMAP4_RM_L4PER_GPIO6_CONTEXT_OFFSET,
2176 .modulemode = MODULEMODE_HWCTRL,
2022 }, 2177 },
2023 }, 2178 },
2024 .opt_clks = gpio6_opt_clks, 2179 .opt_clks = gpio6_opt_clks,
@@ -2044,7 +2199,7 @@ static struct omap_hwmod_class_sysconfig omap44xx_hsi_sysc = {
2044 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS), 2199 SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
2045 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | 2200 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
2046 SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO | 2201 SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
2047 MSTANDBY_SMART), 2202 MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
2048 .sysc_fields = &omap_hwmod_sysc_type1, 2203 .sysc_fields = &omap_hwmod_sysc_type1,
2049}; 2204};
2050 2205
@@ -2058,6 +2213,7 @@ static struct omap_hwmod_irq_info omap44xx_hsi_irqs[] = {
2058 { .name = "mpu_p1", .irq = 67 + OMAP44XX_IRQ_GIC_START }, 2213 { .name = "mpu_p1", .irq = 67 + OMAP44XX_IRQ_GIC_START },
2059 { .name = "mpu_p2", .irq = 68 + OMAP44XX_IRQ_GIC_START }, 2214 { .name = "mpu_p2", .irq = 68 + OMAP44XX_IRQ_GIC_START },
2060 { .name = "mpu_dma", .irq = 71 + OMAP44XX_IRQ_GIC_START }, 2215 { .name = "mpu_dma", .irq = 71 + OMAP44XX_IRQ_GIC_START },
2216 { .irq = -1 }
2061}; 2217};
2062 2218
2063/* hsi master ports */ 2219/* hsi master ports */
@@ -2071,6 +2227,7 @@ static struct omap_hwmod_addr_space omap44xx_hsi_addrs[] = {
2071 .pa_end = 0x4a05bfff, 2227 .pa_end = 0x4a05bfff,
2072 .flags = ADDR_TYPE_RT 2228 .flags = ADDR_TYPE_RT
2073 }, 2229 },
2230 { }
2074}; 2231};
2075 2232
2076/* l4_cfg -> hsi */ 2233/* l4_cfg -> hsi */
@@ -2079,7 +2236,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_cfg__hsi = {
2079 .slave = &omap44xx_hsi_hwmod, 2236 .slave = &omap44xx_hsi_hwmod,
2080 .clk = "l4_div_ck", 2237 .clk = "l4_div_ck",
2081 .addr = omap44xx_hsi_addrs, 2238 .addr = omap44xx_hsi_addrs,
2082 .addr_cnt = ARRAY_SIZE(omap44xx_hsi_addrs),
2083 .user = OCP_USER_MPU | OCP_USER_SDMA, 2239 .user = OCP_USER_MPU | OCP_USER_SDMA,
2084}; 2240};
2085 2241
@@ -2091,12 +2247,14 @@ static struct omap_hwmod_ocp_if *omap44xx_hsi_slaves[] = {
2091static struct omap_hwmod omap44xx_hsi_hwmod = { 2247static struct omap_hwmod omap44xx_hsi_hwmod = {
2092 .name = "hsi", 2248 .name = "hsi",
2093 .class = &omap44xx_hsi_hwmod_class, 2249 .class = &omap44xx_hsi_hwmod_class,
2250 .clkdm_name = "l3_init_clkdm",
2094 .mpu_irqs = omap44xx_hsi_irqs, 2251 .mpu_irqs = omap44xx_hsi_irqs,
2095 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_hsi_irqs),
2096 .main_clk = "hsi_fck", 2252 .main_clk = "hsi_fck",
2097 .prcm = { 2253 .prcm = {
2098 .omap4 = { 2254 .omap4 = {
2099 .clkctrl_reg = OMAP4430_CM_L3INIT_HSI_CLKCTRL, 2255 .clkctrl_offs = OMAP4_CM_L3INIT_HSI_CLKCTRL_OFFSET,
2256 .context_offs = OMAP4_RM_L3INIT_HSI_CONTEXT_OFFSET,
2257 .modulemode = MODULEMODE_HWCTRL,
2100 }, 2258 },
2101 }, 2259 },
2102 .slaves = omap44xx_hsi_slaves, 2260 .slaves = omap44xx_hsi_slaves,
@@ -2125,17 +2283,25 @@ static struct omap_hwmod_class_sysconfig omap44xx_i2c_sysc = {
2125static struct omap_hwmod_class omap44xx_i2c_hwmod_class = { 2283static struct omap_hwmod_class omap44xx_i2c_hwmod_class = {
2126 .name = "i2c", 2284 .name = "i2c",
2127 .sysc = &omap44xx_i2c_sysc, 2285 .sysc = &omap44xx_i2c_sysc,
2286 .rev = OMAP_I2C_IP_VERSION_2,
2287 .reset = &omap_i2c_reset,
2288};
2289
2290static struct omap_i2c_dev_attr i2c_dev_attr = {
2291 .flags = OMAP_I2C_FLAG_BUS_SHIFT_NONE,
2128}; 2292};
2129 2293
2130/* i2c1 */ 2294/* i2c1 */
2131static struct omap_hwmod omap44xx_i2c1_hwmod; 2295static struct omap_hwmod omap44xx_i2c1_hwmod;
2132static struct omap_hwmod_irq_info omap44xx_i2c1_irqs[] = { 2296static struct omap_hwmod_irq_info omap44xx_i2c1_irqs[] = {
2133 { .irq = 56 + OMAP44XX_IRQ_GIC_START }, 2297 { .irq = 56 + OMAP44XX_IRQ_GIC_START },
2298 { .irq = -1 }
2134}; 2299};
2135 2300
2136static struct omap_hwmod_dma_info omap44xx_i2c1_sdma_reqs[] = { 2301static struct omap_hwmod_dma_info omap44xx_i2c1_sdma_reqs[] = {
2137 { .name = "tx", .dma_req = 26 + OMAP44XX_DMA_REQ_START }, 2302 { .name = "tx", .dma_req = 26 + OMAP44XX_DMA_REQ_START },
2138 { .name = "rx", .dma_req = 27 + OMAP44XX_DMA_REQ_START }, 2303 { .name = "rx", .dma_req = 27 + OMAP44XX_DMA_REQ_START },
2304 { .dma_req = -1 }
2139}; 2305};
2140 2306
2141static struct omap_hwmod_addr_space omap44xx_i2c1_addrs[] = { 2307static struct omap_hwmod_addr_space omap44xx_i2c1_addrs[] = {
@@ -2144,6 +2310,7 @@ static struct omap_hwmod_addr_space omap44xx_i2c1_addrs[] = {
2144 .pa_end = 0x480700ff, 2310 .pa_end = 0x480700ff,
2145 .flags = ADDR_TYPE_RT 2311 .flags = ADDR_TYPE_RT
2146 }, 2312 },
2313 { }
2147}; 2314};
2148 2315
2149/* l4_per -> i2c1 */ 2316/* l4_per -> i2c1 */
@@ -2152,7 +2319,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__i2c1 = {
2152 .slave = &omap44xx_i2c1_hwmod, 2319 .slave = &omap44xx_i2c1_hwmod,
2153 .clk = "l4_div_ck", 2320 .clk = "l4_div_ck",
2154 .addr = omap44xx_i2c1_addrs, 2321 .addr = omap44xx_i2c1_addrs,
2155 .addr_cnt = ARRAY_SIZE(omap44xx_i2c1_addrs),
2156 .user = OCP_USER_MPU | OCP_USER_SDMA, 2322 .user = OCP_USER_MPU | OCP_USER_SDMA,
2157}; 2323};
2158 2324
@@ -2164,19 +2330,21 @@ static struct omap_hwmod_ocp_if *omap44xx_i2c1_slaves[] = {
2164static struct omap_hwmod omap44xx_i2c1_hwmod = { 2330static struct omap_hwmod omap44xx_i2c1_hwmod = {
2165 .name = "i2c1", 2331 .name = "i2c1",
2166 .class = &omap44xx_i2c_hwmod_class, 2332 .class = &omap44xx_i2c_hwmod_class,
2167 .flags = HWMOD_INIT_NO_RESET, 2333 .clkdm_name = "l4_per_clkdm",
2334 .flags = HWMOD_16BIT_REG,
2168 .mpu_irqs = omap44xx_i2c1_irqs, 2335 .mpu_irqs = omap44xx_i2c1_irqs,
2169 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_i2c1_irqs),
2170 .sdma_reqs = omap44xx_i2c1_sdma_reqs, 2336 .sdma_reqs = omap44xx_i2c1_sdma_reqs,
2171 .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_i2c1_sdma_reqs),
2172 .main_clk = "i2c1_fck", 2337 .main_clk = "i2c1_fck",
2173 .prcm = { 2338 .prcm = {
2174 .omap4 = { 2339 .omap4 = {
2175 .clkctrl_reg = OMAP4430_CM_L4PER_I2C1_CLKCTRL, 2340 .clkctrl_offs = OMAP4_CM_L4PER_I2C1_CLKCTRL_OFFSET,
2341 .context_offs = OMAP4_RM_L4PER_I2C1_CONTEXT_OFFSET,
2342 .modulemode = MODULEMODE_SWCTRL,
2176 }, 2343 },
2177 }, 2344 },
2178 .slaves = omap44xx_i2c1_slaves, 2345 .slaves = omap44xx_i2c1_slaves,
2179 .slaves_cnt = ARRAY_SIZE(omap44xx_i2c1_slaves), 2346 .slaves_cnt = ARRAY_SIZE(omap44xx_i2c1_slaves),
2347 .dev_attr = &i2c_dev_attr,
2180 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), 2348 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
2181}; 2349};
2182 2350
@@ -2184,11 +2352,13 @@ static struct omap_hwmod omap44xx_i2c1_hwmod = {
2184static struct omap_hwmod omap44xx_i2c2_hwmod; 2352static struct omap_hwmod omap44xx_i2c2_hwmod;
2185static struct omap_hwmod_irq_info omap44xx_i2c2_irqs[] = { 2353static struct omap_hwmod_irq_info omap44xx_i2c2_irqs[] = {
2186 { .irq = 57 + OMAP44XX_IRQ_GIC_START }, 2354 { .irq = 57 + OMAP44XX_IRQ_GIC_START },
2355 { .irq = -1 }
2187}; 2356};
2188 2357
2189static struct omap_hwmod_dma_info omap44xx_i2c2_sdma_reqs[] = { 2358static struct omap_hwmod_dma_info omap44xx_i2c2_sdma_reqs[] = {
2190 { .name = "tx", .dma_req = 28 + OMAP44XX_DMA_REQ_START }, 2359 { .name = "tx", .dma_req = 28 + OMAP44XX_DMA_REQ_START },
2191 { .name = "rx", .dma_req = 29 + OMAP44XX_DMA_REQ_START }, 2360 { .name = "rx", .dma_req = 29 + OMAP44XX_DMA_REQ_START },
2361 { .dma_req = -1 }
2192}; 2362};
2193 2363
2194static struct omap_hwmod_addr_space omap44xx_i2c2_addrs[] = { 2364static struct omap_hwmod_addr_space omap44xx_i2c2_addrs[] = {
@@ -2197,6 +2367,7 @@ static struct omap_hwmod_addr_space omap44xx_i2c2_addrs[] = {
2197 .pa_end = 0x480720ff, 2367 .pa_end = 0x480720ff,
2198 .flags = ADDR_TYPE_RT 2368 .flags = ADDR_TYPE_RT
2199 }, 2369 },
2370 { }
2200}; 2371};
2201 2372
2202/* l4_per -> i2c2 */ 2373/* l4_per -> i2c2 */
@@ -2205,7 +2376,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__i2c2 = {
2205 .slave = &omap44xx_i2c2_hwmod, 2376 .slave = &omap44xx_i2c2_hwmod,
2206 .clk = "l4_div_ck", 2377 .clk = "l4_div_ck",
2207 .addr = omap44xx_i2c2_addrs, 2378 .addr = omap44xx_i2c2_addrs,
2208 .addr_cnt = ARRAY_SIZE(omap44xx_i2c2_addrs),
2209 .user = OCP_USER_MPU | OCP_USER_SDMA, 2379 .user = OCP_USER_MPU | OCP_USER_SDMA,
2210}; 2380};
2211 2381
@@ -2217,19 +2387,21 @@ static struct omap_hwmod_ocp_if *omap44xx_i2c2_slaves[] = {
2217static struct omap_hwmod omap44xx_i2c2_hwmod = { 2387static struct omap_hwmod omap44xx_i2c2_hwmod = {
2218 .name = "i2c2", 2388 .name = "i2c2",
2219 .class = &omap44xx_i2c_hwmod_class, 2389 .class = &omap44xx_i2c_hwmod_class,
2220 .flags = HWMOD_INIT_NO_RESET, 2390 .clkdm_name = "l4_per_clkdm",
2391 .flags = HWMOD_16BIT_REG,
2221 .mpu_irqs = omap44xx_i2c2_irqs, 2392 .mpu_irqs = omap44xx_i2c2_irqs,
2222 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_i2c2_irqs),
2223 .sdma_reqs = omap44xx_i2c2_sdma_reqs, 2393 .sdma_reqs = omap44xx_i2c2_sdma_reqs,
2224 .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_i2c2_sdma_reqs),
2225 .main_clk = "i2c2_fck", 2394 .main_clk = "i2c2_fck",
2226 .prcm = { 2395 .prcm = {
2227 .omap4 = { 2396 .omap4 = {
2228 .clkctrl_reg = OMAP4430_CM_L4PER_I2C2_CLKCTRL, 2397 .clkctrl_offs = OMAP4_CM_L4PER_I2C2_CLKCTRL_OFFSET,
2398 .context_offs = OMAP4_RM_L4PER_I2C2_CONTEXT_OFFSET,
2399 .modulemode = MODULEMODE_SWCTRL,
2229 }, 2400 },
2230 }, 2401 },
2231 .slaves = omap44xx_i2c2_slaves, 2402 .slaves = omap44xx_i2c2_slaves,
2232 .slaves_cnt = ARRAY_SIZE(omap44xx_i2c2_slaves), 2403 .slaves_cnt = ARRAY_SIZE(omap44xx_i2c2_slaves),
2404 .dev_attr = &i2c_dev_attr,
2233 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), 2405 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
2234}; 2406};
2235 2407
@@ -2237,11 +2409,13 @@ static struct omap_hwmod omap44xx_i2c2_hwmod = {
2237static struct omap_hwmod omap44xx_i2c3_hwmod; 2409static struct omap_hwmod omap44xx_i2c3_hwmod;
2238static struct omap_hwmod_irq_info omap44xx_i2c3_irqs[] = { 2410static struct omap_hwmod_irq_info omap44xx_i2c3_irqs[] = {
2239 { .irq = 61 + OMAP44XX_IRQ_GIC_START }, 2411 { .irq = 61 + OMAP44XX_IRQ_GIC_START },
2412 { .irq = -1 }
2240}; 2413};
2241 2414
2242static struct omap_hwmod_dma_info omap44xx_i2c3_sdma_reqs[] = { 2415static struct omap_hwmod_dma_info omap44xx_i2c3_sdma_reqs[] = {
2243 { .name = "tx", .dma_req = 24 + OMAP44XX_DMA_REQ_START }, 2416 { .name = "tx", .dma_req = 24 + OMAP44XX_DMA_REQ_START },
2244 { .name = "rx", .dma_req = 25 + OMAP44XX_DMA_REQ_START }, 2417 { .name = "rx", .dma_req = 25 + OMAP44XX_DMA_REQ_START },
2418 { .dma_req = -1 }
2245}; 2419};
2246 2420
2247static struct omap_hwmod_addr_space omap44xx_i2c3_addrs[] = { 2421static struct omap_hwmod_addr_space omap44xx_i2c3_addrs[] = {
@@ -2250,6 +2424,7 @@ static struct omap_hwmod_addr_space omap44xx_i2c3_addrs[] = {
2250 .pa_end = 0x480600ff, 2424 .pa_end = 0x480600ff,
2251 .flags = ADDR_TYPE_RT 2425 .flags = ADDR_TYPE_RT
2252 }, 2426 },
2427 { }
2253}; 2428};
2254 2429
2255/* l4_per -> i2c3 */ 2430/* l4_per -> i2c3 */
@@ -2258,7 +2433,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__i2c3 = {
2258 .slave = &omap44xx_i2c3_hwmod, 2433 .slave = &omap44xx_i2c3_hwmod,
2259 .clk = "l4_div_ck", 2434 .clk = "l4_div_ck",
2260 .addr = omap44xx_i2c3_addrs, 2435 .addr = omap44xx_i2c3_addrs,
2261 .addr_cnt = ARRAY_SIZE(omap44xx_i2c3_addrs),
2262 .user = OCP_USER_MPU | OCP_USER_SDMA, 2436 .user = OCP_USER_MPU | OCP_USER_SDMA,
2263}; 2437};
2264 2438
@@ -2270,19 +2444,21 @@ static struct omap_hwmod_ocp_if *omap44xx_i2c3_slaves[] = {
2270static struct omap_hwmod omap44xx_i2c3_hwmod = { 2444static struct omap_hwmod omap44xx_i2c3_hwmod = {
2271 .name = "i2c3", 2445 .name = "i2c3",
2272 .class = &omap44xx_i2c_hwmod_class, 2446 .class = &omap44xx_i2c_hwmod_class,
2273 .flags = HWMOD_INIT_NO_RESET, 2447 .clkdm_name = "l4_per_clkdm",
2448 .flags = HWMOD_16BIT_REG,
2274 .mpu_irqs = omap44xx_i2c3_irqs, 2449 .mpu_irqs = omap44xx_i2c3_irqs,
2275 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_i2c3_irqs),
2276 .sdma_reqs = omap44xx_i2c3_sdma_reqs, 2450 .sdma_reqs = omap44xx_i2c3_sdma_reqs,
2277 .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_i2c3_sdma_reqs),
2278 .main_clk = "i2c3_fck", 2451 .main_clk = "i2c3_fck",
2279 .prcm = { 2452 .prcm = {
2280 .omap4 = { 2453 .omap4 = {
2281 .clkctrl_reg = OMAP4430_CM_L4PER_I2C3_CLKCTRL, 2454 .clkctrl_offs = OMAP4_CM_L4PER_I2C3_CLKCTRL_OFFSET,
2455 .context_offs = OMAP4_RM_L4PER_I2C3_CONTEXT_OFFSET,
2456 .modulemode = MODULEMODE_SWCTRL,
2282 }, 2457 },
2283 }, 2458 },
2284 .slaves = omap44xx_i2c3_slaves, 2459 .slaves = omap44xx_i2c3_slaves,
2285 .slaves_cnt = ARRAY_SIZE(omap44xx_i2c3_slaves), 2460 .slaves_cnt = ARRAY_SIZE(omap44xx_i2c3_slaves),
2461 .dev_attr = &i2c_dev_attr,
2286 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), 2462 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
2287}; 2463};
2288 2464
@@ -2290,11 +2466,13 @@ static struct omap_hwmod omap44xx_i2c3_hwmod = {
2290static struct omap_hwmod omap44xx_i2c4_hwmod; 2466static struct omap_hwmod omap44xx_i2c4_hwmod;
2291static struct omap_hwmod_irq_info omap44xx_i2c4_irqs[] = { 2467static struct omap_hwmod_irq_info omap44xx_i2c4_irqs[] = {
2292 { .irq = 62 + OMAP44XX_IRQ_GIC_START }, 2468 { .irq = 62 + OMAP44XX_IRQ_GIC_START },
2469 { .irq = -1 }
2293}; 2470};
2294 2471
2295static struct omap_hwmod_dma_info omap44xx_i2c4_sdma_reqs[] = { 2472static struct omap_hwmod_dma_info omap44xx_i2c4_sdma_reqs[] = {
2296 { .name = "tx", .dma_req = 123 + OMAP44XX_DMA_REQ_START }, 2473 { .name = "tx", .dma_req = 123 + OMAP44XX_DMA_REQ_START },
2297 { .name = "rx", .dma_req = 124 + OMAP44XX_DMA_REQ_START }, 2474 { .name = "rx", .dma_req = 124 + OMAP44XX_DMA_REQ_START },
2475 { .dma_req = -1 }
2298}; 2476};
2299 2477
2300static struct omap_hwmod_addr_space omap44xx_i2c4_addrs[] = { 2478static struct omap_hwmod_addr_space omap44xx_i2c4_addrs[] = {
@@ -2303,6 +2481,7 @@ static struct omap_hwmod_addr_space omap44xx_i2c4_addrs[] = {
2303 .pa_end = 0x483500ff, 2481 .pa_end = 0x483500ff,
2304 .flags = ADDR_TYPE_RT 2482 .flags = ADDR_TYPE_RT
2305 }, 2483 },
2484 { }
2306}; 2485};
2307 2486
2308/* l4_per -> i2c4 */ 2487/* l4_per -> i2c4 */
@@ -2311,7 +2490,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__i2c4 = {
2311 .slave = &omap44xx_i2c4_hwmod, 2490 .slave = &omap44xx_i2c4_hwmod,
2312 .clk = "l4_div_ck", 2491 .clk = "l4_div_ck",
2313 .addr = omap44xx_i2c4_addrs, 2492 .addr = omap44xx_i2c4_addrs,
2314 .addr_cnt = ARRAY_SIZE(omap44xx_i2c4_addrs),
2315 .user = OCP_USER_MPU | OCP_USER_SDMA, 2493 .user = OCP_USER_MPU | OCP_USER_SDMA,
2316}; 2494};
2317 2495
@@ -2323,19 +2501,21 @@ static struct omap_hwmod_ocp_if *omap44xx_i2c4_slaves[] = {
2323static struct omap_hwmod omap44xx_i2c4_hwmod = { 2501static struct omap_hwmod omap44xx_i2c4_hwmod = {
2324 .name = "i2c4", 2502 .name = "i2c4",
2325 .class = &omap44xx_i2c_hwmod_class, 2503 .class = &omap44xx_i2c_hwmod_class,
2326 .flags = HWMOD_INIT_NO_RESET, 2504 .clkdm_name = "l4_per_clkdm",
2505 .flags = HWMOD_16BIT_REG,
2327 .mpu_irqs = omap44xx_i2c4_irqs, 2506 .mpu_irqs = omap44xx_i2c4_irqs,
2328 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_i2c4_irqs),
2329 .sdma_reqs = omap44xx_i2c4_sdma_reqs, 2507 .sdma_reqs = omap44xx_i2c4_sdma_reqs,
2330 .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_i2c4_sdma_reqs),
2331 .main_clk = "i2c4_fck", 2508 .main_clk = "i2c4_fck",
2332 .prcm = { 2509 .prcm = {
2333 .omap4 = { 2510 .omap4 = {
2334 .clkctrl_reg = OMAP4430_CM_L4PER_I2C4_CLKCTRL, 2511 .clkctrl_offs = OMAP4_CM_L4PER_I2C4_CLKCTRL_OFFSET,
2512 .context_offs = OMAP4_RM_L4PER_I2C4_CONTEXT_OFFSET,
2513 .modulemode = MODULEMODE_SWCTRL,
2335 }, 2514 },
2336 }, 2515 },
2337 .slaves = omap44xx_i2c4_slaves, 2516 .slaves = omap44xx_i2c4_slaves,
2338 .slaves_cnt = ARRAY_SIZE(omap44xx_i2c4_slaves), 2517 .slaves_cnt = ARRAY_SIZE(omap44xx_i2c4_slaves),
2518 .dev_attr = &i2c_dev_attr,
2339 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), 2519 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
2340}; 2520};
2341 2521
@@ -2351,6 +2531,7 @@ static struct omap_hwmod_class omap44xx_ipu_hwmod_class = {
2351/* ipu */ 2531/* ipu */
2352static struct omap_hwmod_irq_info omap44xx_ipu_irqs[] = { 2532static struct omap_hwmod_irq_info omap44xx_ipu_irqs[] = {
2353 { .irq = 100 + OMAP44XX_IRQ_GIC_START }, 2533 { .irq = 100 + OMAP44XX_IRQ_GIC_START },
2534 { .irq = -1 }
2354}; 2535};
2355 2536
2356static struct omap_hwmod_rst_info omap44xx_ipu_c0_resets[] = { 2537static struct omap_hwmod_rst_info omap44xx_ipu_c0_resets[] = {
@@ -2387,12 +2568,13 @@ static struct omap_hwmod_ocp_if *omap44xx_ipu_slaves[] = {
2387static struct omap_hwmod omap44xx_ipu_c0_hwmod = { 2568static struct omap_hwmod omap44xx_ipu_c0_hwmod = {
2388 .name = "ipu_c0", 2569 .name = "ipu_c0",
2389 .class = &omap44xx_ipu_hwmod_class, 2570 .class = &omap44xx_ipu_hwmod_class,
2571 .clkdm_name = "ducati_clkdm",
2390 .flags = HWMOD_INIT_NO_RESET, 2572 .flags = HWMOD_INIT_NO_RESET,
2391 .rst_lines = omap44xx_ipu_c0_resets, 2573 .rst_lines = omap44xx_ipu_c0_resets,
2392 .rst_lines_cnt = ARRAY_SIZE(omap44xx_ipu_c0_resets), 2574 .rst_lines_cnt = ARRAY_SIZE(omap44xx_ipu_c0_resets),
2393 .prcm = { 2575 .prcm = {
2394 .omap4 = { 2576 .omap4 = {
2395 .rstctrl_reg = OMAP4430_RM_DUCATI_RSTCTRL, 2577 .rstctrl_offs = OMAP4_RM_DUCATI_RSTCTRL_OFFSET,
2396 }, 2578 },
2397 }, 2579 },
2398 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), 2580 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
@@ -2402,12 +2584,13 @@ static struct omap_hwmod omap44xx_ipu_c0_hwmod = {
2402static struct omap_hwmod omap44xx_ipu_c1_hwmod = { 2584static struct omap_hwmod omap44xx_ipu_c1_hwmod = {
2403 .name = "ipu_c1", 2585 .name = "ipu_c1",
2404 .class = &omap44xx_ipu_hwmod_class, 2586 .class = &omap44xx_ipu_hwmod_class,
2587 .clkdm_name = "ducati_clkdm",
2405 .flags = HWMOD_INIT_NO_RESET, 2588 .flags = HWMOD_INIT_NO_RESET,
2406 .rst_lines = omap44xx_ipu_c1_resets, 2589 .rst_lines = omap44xx_ipu_c1_resets,
2407 .rst_lines_cnt = ARRAY_SIZE(omap44xx_ipu_c1_resets), 2590 .rst_lines_cnt = ARRAY_SIZE(omap44xx_ipu_c1_resets),
2408 .prcm = { 2591 .prcm = {
2409 .omap4 = { 2592 .omap4 = {
2410 .rstctrl_reg = OMAP4430_RM_DUCATI_RSTCTRL, 2593 .rstctrl_offs = OMAP4_RM_DUCATI_RSTCTRL_OFFSET,
2411 }, 2594 },
2412 }, 2595 },
2413 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), 2596 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
@@ -2416,15 +2599,17 @@ static struct omap_hwmod omap44xx_ipu_c1_hwmod = {
2416static struct omap_hwmod omap44xx_ipu_hwmod = { 2599static struct omap_hwmod omap44xx_ipu_hwmod = {
2417 .name = "ipu", 2600 .name = "ipu",
2418 .class = &omap44xx_ipu_hwmod_class, 2601 .class = &omap44xx_ipu_hwmod_class,
2602 .clkdm_name = "ducati_clkdm",
2419 .mpu_irqs = omap44xx_ipu_irqs, 2603 .mpu_irqs = omap44xx_ipu_irqs,
2420 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_ipu_irqs),
2421 .rst_lines = omap44xx_ipu_resets, 2604 .rst_lines = omap44xx_ipu_resets,
2422 .rst_lines_cnt = ARRAY_SIZE(omap44xx_ipu_resets), 2605 .rst_lines_cnt = ARRAY_SIZE(omap44xx_ipu_resets),
2423 .main_clk = "ipu_fck", 2606 .main_clk = "ipu_fck",
2424 .prcm = { 2607 .prcm = {
2425 .omap4 = { 2608 .omap4 = {
2426 .clkctrl_reg = OMAP4430_CM_DUCATI_DUCATI_CLKCTRL, 2609 .clkctrl_offs = OMAP4_CM_DUCATI_DUCATI_CLKCTRL_OFFSET,
2427 .rstctrl_reg = OMAP4430_RM_DUCATI_RSTCTRL, 2610 .rstctrl_offs = OMAP4_RM_DUCATI_RSTCTRL_OFFSET,
2611 .context_offs = OMAP4_RM_DUCATI_DUCATI_CONTEXT_OFFSET,
2612 .modulemode = MODULEMODE_HWCTRL,
2428 }, 2613 },
2429 }, 2614 },
2430 .slaves = omap44xx_ipu_slaves, 2615 .slaves = omap44xx_ipu_slaves,
@@ -2446,7 +2631,7 @@ static struct omap_hwmod_class_sysconfig omap44xx_iss_sysc = {
2446 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET), 2631 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
2447 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | 2632 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
2448 SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO | 2633 SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
2449 MSTANDBY_SMART), 2634 MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
2450 .sysc_fields = &omap_hwmod_sysc_type2, 2635 .sysc_fields = &omap_hwmod_sysc_type2,
2451}; 2636};
2452 2637
@@ -2458,6 +2643,7 @@ static struct omap_hwmod_class omap44xx_iss_hwmod_class = {
2458/* iss */ 2643/* iss */
2459static struct omap_hwmod_irq_info omap44xx_iss_irqs[] = { 2644static struct omap_hwmod_irq_info omap44xx_iss_irqs[] = {
2460 { .irq = 24 + OMAP44XX_IRQ_GIC_START }, 2645 { .irq = 24 + OMAP44XX_IRQ_GIC_START },
2646 { .irq = -1 }
2461}; 2647};
2462 2648
2463static struct omap_hwmod_dma_info omap44xx_iss_sdma_reqs[] = { 2649static struct omap_hwmod_dma_info omap44xx_iss_sdma_reqs[] = {
@@ -2465,6 +2651,7 @@ static struct omap_hwmod_dma_info omap44xx_iss_sdma_reqs[] = {
2465 { .name = "2", .dma_req = 9 + OMAP44XX_DMA_REQ_START }, 2651 { .name = "2", .dma_req = 9 + OMAP44XX_DMA_REQ_START },
2466 { .name = "3", .dma_req = 11 + OMAP44XX_DMA_REQ_START }, 2652 { .name = "3", .dma_req = 11 + OMAP44XX_DMA_REQ_START },
2467 { .name = "4", .dma_req = 12 + OMAP44XX_DMA_REQ_START }, 2653 { .name = "4", .dma_req = 12 + OMAP44XX_DMA_REQ_START },
2654 { .dma_req = -1 }
2468}; 2655};
2469 2656
2470/* iss master ports */ 2657/* iss master ports */
@@ -2478,6 +2665,7 @@ static struct omap_hwmod_addr_space omap44xx_iss_addrs[] = {
2478 .pa_end = 0x520000ff, 2665 .pa_end = 0x520000ff,
2479 .flags = ADDR_TYPE_RT 2666 .flags = ADDR_TYPE_RT
2480 }, 2667 },
2668 { }
2481}; 2669};
2482 2670
2483/* l3_main_2 -> iss */ 2671/* l3_main_2 -> iss */
@@ -2486,7 +2674,6 @@ static struct omap_hwmod_ocp_if omap44xx_l3_main_2__iss = {
2486 .slave = &omap44xx_iss_hwmod, 2674 .slave = &omap44xx_iss_hwmod,
2487 .clk = "l3_div_ck", 2675 .clk = "l3_div_ck",
2488 .addr = omap44xx_iss_addrs, 2676 .addr = omap44xx_iss_addrs,
2489 .addr_cnt = ARRAY_SIZE(omap44xx_iss_addrs),
2490 .user = OCP_USER_MPU | OCP_USER_SDMA, 2677 .user = OCP_USER_MPU | OCP_USER_SDMA,
2491}; 2678};
2492 2679
@@ -2502,14 +2689,15 @@ static struct omap_hwmod_opt_clk iss_opt_clks[] = {
2502static struct omap_hwmod omap44xx_iss_hwmod = { 2689static struct omap_hwmod omap44xx_iss_hwmod = {
2503 .name = "iss", 2690 .name = "iss",
2504 .class = &omap44xx_iss_hwmod_class, 2691 .class = &omap44xx_iss_hwmod_class,
2692 .clkdm_name = "iss_clkdm",
2505 .mpu_irqs = omap44xx_iss_irqs, 2693 .mpu_irqs = omap44xx_iss_irqs,
2506 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_iss_irqs),
2507 .sdma_reqs = omap44xx_iss_sdma_reqs, 2694 .sdma_reqs = omap44xx_iss_sdma_reqs,
2508 .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_iss_sdma_reqs),
2509 .main_clk = "iss_fck", 2695 .main_clk = "iss_fck",
2510 .prcm = { 2696 .prcm = {
2511 .omap4 = { 2697 .omap4 = {
2512 .clkctrl_reg = OMAP4430_CM_CAM_ISS_CLKCTRL, 2698 .clkctrl_offs = OMAP4_CM_CAM_ISS_CLKCTRL_OFFSET,
2699 .context_offs = OMAP4_RM_CAM_ISS_CONTEXT_OFFSET,
2700 .modulemode = MODULEMODE_SWCTRL,
2513 }, 2701 },
2514 }, 2702 },
2515 .opt_clks = iss_opt_clks, 2703 .opt_clks = iss_opt_clks,
@@ -2535,6 +2723,7 @@ static struct omap_hwmod_irq_info omap44xx_iva_irqs[] = {
2535 { .name = "sync_1", .irq = 103 + OMAP44XX_IRQ_GIC_START }, 2723 { .name = "sync_1", .irq = 103 + OMAP44XX_IRQ_GIC_START },
2536 { .name = "sync_0", .irq = 104 + OMAP44XX_IRQ_GIC_START }, 2724 { .name = "sync_0", .irq = 104 + OMAP44XX_IRQ_GIC_START },
2537 { .name = "mailbox_0", .irq = 107 + OMAP44XX_IRQ_GIC_START }, 2725 { .name = "mailbox_0", .irq = 107 + OMAP44XX_IRQ_GIC_START },
2726 { .irq = -1 }
2538}; 2727};
2539 2728
2540static struct omap_hwmod_rst_info omap44xx_iva_resets[] = { 2729static struct omap_hwmod_rst_info omap44xx_iva_resets[] = {
@@ -2561,6 +2750,7 @@ static struct omap_hwmod_addr_space omap44xx_iva_addrs[] = {
2561 .pa_end = 0x5a07ffff, 2750 .pa_end = 0x5a07ffff,
2562 .flags = ADDR_TYPE_RT 2751 .flags = ADDR_TYPE_RT
2563 }, 2752 },
2753 { }
2564}; 2754};
2565 2755
2566/* l3_main_2 -> iva */ 2756/* l3_main_2 -> iva */
@@ -2569,7 +2759,6 @@ static struct omap_hwmod_ocp_if omap44xx_l3_main_2__iva = {
2569 .slave = &omap44xx_iva_hwmod, 2759 .slave = &omap44xx_iva_hwmod,
2570 .clk = "l3_div_ck", 2760 .clk = "l3_div_ck",
2571 .addr = omap44xx_iva_addrs, 2761 .addr = omap44xx_iva_addrs,
2572 .addr_cnt = ARRAY_SIZE(omap44xx_iva_addrs),
2573 .user = OCP_USER_MPU, 2762 .user = OCP_USER_MPU,
2574}; 2763};
2575 2764
@@ -2583,12 +2772,13 @@ static struct omap_hwmod_ocp_if *omap44xx_iva_slaves[] = {
2583static struct omap_hwmod omap44xx_iva_seq0_hwmod = { 2772static struct omap_hwmod omap44xx_iva_seq0_hwmod = {
2584 .name = "iva_seq0", 2773 .name = "iva_seq0",
2585 .class = &omap44xx_iva_hwmod_class, 2774 .class = &omap44xx_iva_hwmod_class,
2775 .clkdm_name = "ivahd_clkdm",
2586 .flags = HWMOD_INIT_NO_RESET, 2776 .flags = HWMOD_INIT_NO_RESET,
2587 .rst_lines = omap44xx_iva_seq0_resets, 2777 .rst_lines = omap44xx_iva_seq0_resets,
2588 .rst_lines_cnt = ARRAY_SIZE(omap44xx_iva_seq0_resets), 2778 .rst_lines_cnt = ARRAY_SIZE(omap44xx_iva_seq0_resets),
2589 .prcm = { 2779 .prcm = {
2590 .omap4 = { 2780 .omap4 = {
2591 .rstctrl_reg = OMAP4430_RM_IVAHD_RSTCTRL, 2781 .rstctrl_offs = OMAP4_RM_IVAHD_RSTCTRL_OFFSET,
2592 }, 2782 },
2593 }, 2783 },
2594 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), 2784 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
@@ -2598,12 +2788,13 @@ static struct omap_hwmod omap44xx_iva_seq0_hwmod = {
2598static struct omap_hwmod omap44xx_iva_seq1_hwmod = { 2788static struct omap_hwmod omap44xx_iva_seq1_hwmod = {
2599 .name = "iva_seq1", 2789 .name = "iva_seq1",
2600 .class = &omap44xx_iva_hwmod_class, 2790 .class = &omap44xx_iva_hwmod_class,
2791 .clkdm_name = "ivahd_clkdm",
2601 .flags = HWMOD_INIT_NO_RESET, 2792 .flags = HWMOD_INIT_NO_RESET,
2602 .rst_lines = omap44xx_iva_seq1_resets, 2793 .rst_lines = omap44xx_iva_seq1_resets,
2603 .rst_lines_cnt = ARRAY_SIZE(omap44xx_iva_seq1_resets), 2794 .rst_lines_cnt = ARRAY_SIZE(omap44xx_iva_seq1_resets),
2604 .prcm = { 2795 .prcm = {
2605 .omap4 = { 2796 .omap4 = {
2606 .rstctrl_reg = OMAP4430_RM_IVAHD_RSTCTRL, 2797 .rstctrl_offs = OMAP4_RM_IVAHD_RSTCTRL_OFFSET,
2607 }, 2798 },
2608 }, 2799 },
2609 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), 2800 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
@@ -2612,15 +2803,17 @@ static struct omap_hwmod omap44xx_iva_seq1_hwmod = {
2612static struct omap_hwmod omap44xx_iva_hwmod = { 2803static struct omap_hwmod omap44xx_iva_hwmod = {
2613 .name = "iva", 2804 .name = "iva",
2614 .class = &omap44xx_iva_hwmod_class, 2805 .class = &omap44xx_iva_hwmod_class,
2806 .clkdm_name = "ivahd_clkdm",
2615 .mpu_irqs = omap44xx_iva_irqs, 2807 .mpu_irqs = omap44xx_iva_irqs,
2616 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_iva_irqs),
2617 .rst_lines = omap44xx_iva_resets, 2808 .rst_lines = omap44xx_iva_resets,
2618 .rst_lines_cnt = ARRAY_SIZE(omap44xx_iva_resets), 2809 .rst_lines_cnt = ARRAY_SIZE(omap44xx_iva_resets),
2619 .main_clk = "iva_fck", 2810 .main_clk = "iva_fck",
2620 .prcm = { 2811 .prcm = {
2621 .omap4 = { 2812 .omap4 = {
2622 .clkctrl_reg = OMAP4430_CM_IVAHD_IVAHD_CLKCTRL, 2813 .clkctrl_offs = OMAP4_CM_IVAHD_IVAHD_CLKCTRL_OFFSET,
2623 .rstctrl_reg = OMAP4430_RM_IVAHD_RSTCTRL, 2814 .rstctrl_offs = OMAP4_RM_IVAHD_RSTCTRL_OFFSET,
2815 .context_offs = OMAP4_RM_IVAHD_IVAHD_CONTEXT_OFFSET,
2816 .modulemode = MODULEMODE_HWCTRL,
2624 }, 2817 },
2625 }, 2818 },
2626 .slaves = omap44xx_iva_slaves, 2819 .slaves = omap44xx_iva_slaves,
@@ -2656,6 +2849,7 @@ static struct omap_hwmod_class omap44xx_kbd_hwmod_class = {
2656static struct omap_hwmod omap44xx_kbd_hwmod; 2849static struct omap_hwmod omap44xx_kbd_hwmod;
2657static struct omap_hwmod_irq_info omap44xx_kbd_irqs[] = { 2850static struct omap_hwmod_irq_info omap44xx_kbd_irqs[] = {
2658 { .irq = 120 + OMAP44XX_IRQ_GIC_START }, 2851 { .irq = 120 + OMAP44XX_IRQ_GIC_START },
2852 { .irq = -1 }
2659}; 2853};
2660 2854
2661static struct omap_hwmod_addr_space omap44xx_kbd_addrs[] = { 2855static struct omap_hwmod_addr_space omap44xx_kbd_addrs[] = {
@@ -2664,6 +2858,7 @@ static struct omap_hwmod_addr_space omap44xx_kbd_addrs[] = {
2664 .pa_end = 0x4a31c07f, 2858 .pa_end = 0x4a31c07f,
2665 .flags = ADDR_TYPE_RT 2859 .flags = ADDR_TYPE_RT
2666 }, 2860 },
2861 { }
2667}; 2862};
2668 2863
2669/* l4_wkup -> kbd */ 2864/* l4_wkup -> kbd */
@@ -2672,7 +2867,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_wkup__kbd = {
2672 .slave = &omap44xx_kbd_hwmod, 2867 .slave = &omap44xx_kbd_hwmod,
2673 .clk = "l4_wkup_clk_mux_ck", 2868 .clk = "l4_wkup_clk_mux_ck",
2674 .addr = omap44xx_kbd_addrs, 2869 .addr = omap44xx_kbd_addrs,
2675 .addr_cnt = ARRAY_SIZE(omap44xx_kbd_addrs),
2676 .user = OCP_USER_MPU | OCP_USER_SDMA, 2870 .user = OCP_USER_MPU | OCP_USER_SDMA,
2677}; 2871};
2678 2872
@@ -2684,12 +2878,14 @@ static struct omap_hwmod_ocp_if *omap44xx_kbd_slaves[] = {
2684static struct omap_hwmod omap44xx_kbd_hwmod = { 2878static struct omap_hwmod omap44xx_kbd_hwmod = {
2685 .name = "kbd", 2879 .name = "kbd",
2686 .class = &omap44xx_kbd_hwmod_class, 2880 .class = &omap44xx_kbd_hwmod_class,
2881 .clkdm_name = "l4_wkup_clkdm",
2687 .mpu_irqs = omap44xx_kbd_irqs, 2882 .mpu_irqs = omap44xx_kbd_irqs,
2688 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_kbd_irqs),
2689 .main_clk = "kbd_fck", 2883 .main_clk = "kbd_fck",
2690 .prcm = { 2884 .prcm = {
2691 .omap4 = { 2885 .omap4 = {
2692 .clkctrl_reg = OMAP4430_CM_WKUP_KEYBOARD_CLKCTRL, 2886 .clkctrl_offs = OMAP4_CM_WKUP_KEYBOARD_CLKCTRL_OFFSET,
2887 .context_offs = OMAP4_RM_WKUP_KEYBOARD_CONTEXT_OFFSET,
2888 .modulemode = MODULEMODE_SWCTRL,
2693 }, 2889 },
2694 }, 2890 },
2695 .slaves = omap44xx_kbd_slaves, 2891 .slaves = omap44xx_kbd_slaves,
@@ -2721,6 +2917,7 @@ static struct omap_hwmod_class omap44xx_mailbox_hwmod_class = {
2721static struct omap_hwmod omap44xx_mailbox_hwmod; 2917static struct omap_hwmod omap44xx_mailbox_hwmod;
2722static struct omap_hwmod_irq_info omap44xx_mailbox_irqs[] = { 2918static struct omap_hwmod_irq_info omap44xx_mailbox_irqs[] = {
2723 { .irq = 26 + OMAP44XX_IRQ_GIC_START }, 2919 { .irq = 26 + OMAP44XX_IRQ_GIC_START },
2920 { .irq = -1 }
2724}; 2921};
2725 2922
2726static struct omap_hwmod_addr_space omap44xx_mailbox_addrs[] = { 2923static struct omap_hwmod_addr_space omap44xx_mailbox_addrs[] = {
@@ -2729,6 +2926,7 @@ static struct omap_hwmod_addr_space omap44xx_mailbox_addrs[] = {
2729 .pa_end = 0x4a0f41ff, 2926 .pa_end = 0x4a0f41ff,
2730 .flags = ADDR_TYPE_RT 2927 .flags = ADDR_TYPE_RT
2731 }, 2928 },
2929 { }
2732}; 2930};
2733 2931
2734/* l4_cfg -> mailbox */ 2932/* l4_cfg -> mailbox */
@@ -2737,7 +2935,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_cfg__mailbox = {
2737 .slave = &omap44xx_mailbox_hwmod, 2935 .slave = &omap44xx_mailbox_hwmod,
2738 .clk = "l4_div_ck", 2936 .clk = "l4_div_ck",
2739 .addr = omap44xx_mailbox_addrs, 2937 .addr = omap44xx_mailbox_addrs,
2740 .addr_cnt = ARRAY_SIZE(omap44xx_mailbox_addrs),
2741 .user = OCP_USER_MPU | OCP_USER_SDMA, 2938 .user = OCP_USER_MPU | OCP_USER_SDMA,
2742}; 2939};
2743 2940
@@ -2749,11 +2946,12 @@ static struct omap_hwmod_ocp_if *omap44xx_mailbox_slaves[] = {
2749static struct omap_hwmod omap44xx_mailbox_hwmod = { 2946static struct omap_hwmod omap44xx_mailbox_hwmod = {
2750 .name = "mailbox", 2947 .name = "mailbox",
2751 .class = &omap44xx_mailbox_hwmod_class, 2948 .class = &omap44xx_mailbox_hwmod_class,
2949 .clkdm_name = "l4_cfg_clkdm",
2752 .mpu_irqs = omap44xx_mailbox_irqs, 2950 .mpu_irqs = omap44xx_mailbox_irqs,
2753 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mailbox_irqs), 2951 .prcm = {
2754 .prcm = {
2755 .omap4 = { 2952 .omap4 = {
2756 .clkctrl_reg = OMAP4430_CM_L4CFG_MAILBOX_CLKCTRL, 2953 .clkctrl_offs = OMAP4_CM_L4CFG_MAILBOX_CLKCTRL_OFFSET,
2954 .context_offs = OMAP4_RM_L4CFG_MAILBOX_CONTEXT_OFFSET,
2757 }, 2955 },
2758 }, 2956 },
2759 .slaves = omap44xx_mailbox_slaves, 2957 .slaves = omap44xx_mailbox_slaves,
@@ -2784,11 +2982,13 @@ static struct omap_hwmod_class omap44xx_mcbsp_hwmod_class = {
2784static struct omap_hwmod omap44xx_mcbsp1_hwmod; 2982static struct omap_hwmod omap44xx_mcbsp1_hwmod;
2785static struct omap_hwmod_irq_info omap44xx_mcbsp1_irqs[] = { 2983static struct omap_hwmod_irq_info omap44xx_mcbsp1_irqs[] = {
2786 { .irq = 17 + OMAP44XX_IRQ_GIC_START }, 2984 { .irq = 17 + OMAP44XX_IRQ_GIC_START },
2985 { .irq = -1 }
2787}; 2986};
2788 2987
2789static struct omap_hwmod_dma_info omap44xx_mcbsp1_sdma_reqs[] = { 2988static struct omap_hwmod_dma_info omap44xx_mcbsp1_sdma_reqs[] = {
2790 { .name = "tx", .dma_req = 32 + OMAP44XX_DMA_REQ_START }, 2989 { .name = "tx", .dma_req = 32 + OMAP44XX_DMA_REQ_START },
2791 { .name = "rx", .dma_req = 33 + OMAP44XX_DMA_REQ_START }, 2990 { .name = "rx", .dma_req = 33 + OMAP44XX_DMA_REQ_START },
2991 { .dma_req = -1 }
2792}; 2992};
2793 2993
2794static struct omap_hwmod_addr_space omap44xx_mcbsp1_addrs[] = { 2994static struct omap_hwmod_addr_space omap44xx_mcbsp1_addrs[] = {
@@ -2798,6 +2998,7 @@ static struct omap_hwmod_addr_space omap44xx_mcbsp1_addrs[] = {
2798 .pa_end = 0x401220ff, 2998 .pa_end = 0x401220ff,
2799 .flags = ADDR_TYPE_RT 2999 .flags = ADDR_TYPE_RT
2800 }, 3000 },
3001 { }
2801}; 3002};
2802 3003
2803/* l4_abe -> mcbsp1 */ 3004/* l4_abe -> mcbsp1 */
@@ -2806,7 +3007,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp1 = {
2806 .slave = &omap44xx_mcbsp1_hwmod, 3007 .slave = &omap44xx_mcbsp1_hwmod,
2807 .clk = "ocp_abe_iclk", 3008 .clk = "ocp_abe_iclk",
2808 .addr = omap44xx_mcbsp1_addrs, 3009 .addr = omap44xx_mcbsp1_addrs,
2809 .addr_cnt = ARRAY_SIZE(omap44xx_mcbsp1_addrs),
2810 .user = OCP_USER_MPU, 3010 .user = OCP_USER_MPU,
2811}; 3011};
2812 3012
@@ -2817,6 +3017,7 @@ static struct omap_hwmod_addr_space omap44xx_mcbsp1_dma_addrs[] = {
2817 .pa_end = 0x490220ff, 3017 .pa_end = 0x490220ff,
2818 .flags = ADDR_TYPE_RT 3018 .flags = ADDR_TYPE_RT
2819 }, 3019 },
3020 { }
2820}; 3021};
2821 3022
2822/* l4_abe -> mcbsp1 (dma) */ 3023/* l4_abe -> mcbsp1 (dma) */
@@ -2825,7 +3026,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp1_dma = {
2825 .slave = &omap44xx_mcbsp1_hwmod, 3026 .slave = &omap44xx_mcbsp1_hwmod,
2826 .clk = "ocp_abe_iclk", 3027 .clk = "ocp_abe_iclk",
2827 .addr = omap44xx_mcbsp1_dma_addrs, 3028 .addr = omap44xx_mcbsp1_dma_addrs,
2828 .addr_cnt = ARRAY_SIZE(omap44xx_mcbsp1_dma_addrs),
2829 .user = OCP_USER_SDMA, 3029 .user = OCP_USER_SDMA,
2830}; 3030};
2831 3031
@@ -2838,14 +3038,15 @@ static struct omap_hwmod_ocp_if *omap44xx_mcbsp1_slaves[] = {
2838static struct omap_hwmod omap44xx_mcbsp1_hwmod = { 3038static struct omap_hwmod omap44xx_mcbsp1_hwmod = {
2839 .name = "mcbsp1", 3039 .name = "mcbsp1",
2840 .class = &omap44xx_mcbsp_hwmod_class, 3040 .class = &omap44xx_mcbsp_hwmod_class,
3041 .clkdm_name = "abe_clkdm",
2841 .mpu_irqs = omap44xx_mcbsp1_irqs, 3042 .mpu_irqs = omap44xx_mcbsp1_irqs,
2842 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mcbsp1_irqs),
2843 .sdma_reqs = omap44xx_mcbsp1_sdma_reqs, 3043 .sdma_reqs = omap44xx_mcbsp1_sdma_reqs,
2844 .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_mcbsp1_sdma_reqs),
2845 .main_clk = "mcbsp1_fck", 3044 .main_clk = "mcbsp1_fck",
2846 .prcm = { 3045 .prcm = {
2847 .omap4 = { 3046 .omap4 = {
2848 .clkctrl_reg = OMAP4430_CM1_ABE_MCBSP1_CLKCTRL, 3047 .clkctrl_offs = OMAP4_CM1_ABE_MCBSP1_CLKCTRL_OFFSET,
3048 .context_offs = OMAP4_RM_ABE_MCBSP1_CONTEXT_OFFSET,
3049 .modulemode = MODULEMODE_SWCTRL,
2849 }, 3050 },
2850 }, 3051 },
2851 .slaves = omap44xx_mcbsp1_slaves, 3052 .slaves = omap44xx_mcbsp1_slaves,
@@ -2857,11 +3058,13 @@ static struct omap_hwmod omap44xx_mcbsp1_hwmod = {
2857static struct omap_hwmod omap44xx_mcbsp2_hwmod; 3058static struct omap_hwmod omap44xx_mcbsp2_hwmod;
2858static struct omap_hwmod_irq_info omap44xx_mcbsp2_irqs[] = { 3059static struct omap_hwmod_irq_info omap44xx_mcbsp2_irqs[] = {
2859 { .irq = 22 + OMAP44XX_IRQ_GIC_START }, 3060 { .irq = 22 + OMAP44XX_IRQ_GIC_START },
3061 { .irq = -1 }
2860}; 3062};
2861 3063
2862static struct omap_hwmod_dma_info omap44xx_mcbsp2_sdma_reqs[] = { 3064static struct omap_hwmod_dma_info omap44xx_mcbsp2_sdma_reqs[] = {
2863 { .name = "tx", .dma_req = 16 + OMAP44XX_DMA_REQ_START }, 3065 { .name = "tx", .dma_req = 16 + OMAP44XX_DMA_REQ_START },
2864 { .name = "rx", .dma_req = 17 + OMAP44XX_DMA_REQ_START }, 3066 { .name = "rx", .dma_req = 17 + OMAP44XX_DMA_REQ_START },
3067 { .dma_req = -1 }
2865}; 3068};
2866 3069
2867static struct omap_hwmod_addr_space omap44xx_mcbsp2_addrs[] = { 3070static struct omap_hwmod_addr_space omap44xx_mcbsp2_addrs[] = {
@@ -2871,6 +3074,7 @@ static struct omap_hwmod_addr_space omap44xx_mcbsp2_addrs[] = {
2871 .pa_end = 0x401240ff, 3074 .pa_end = 0x401240ff,
2872 .flags = ADDR_TYPE_RT 3075 .flags = ADDR_TYPE_RT
2873 }, 3076 },
3077 { }
2874}; 3078};
2875 3079
2876/* l4_abe -> mcbsp2 */ 3080/* l4_abe -> mcbsp2 */
@@ -2879,7 +3083,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp2 = {
2879 .slave = &omap44xx_mcbsp2_hwmod, 3083 .slave = &omap44xx_mcbsp2_hwmod,
2880 .clk = "ocp_abe_iclk", 3084 .clk = "ocp_abe_iclk",
2881 .addr = omap44xx_mcbsp2_addrs, 3085 .addr = omap44xx_mcbsp2_addrs,
2882 .addr_cnt = ARRAY_SIZE(omap44xx_mcbsp2_addrs),
2883 .user = OCP_USER_MPU, 3086 .user = OCP_USER_MPU,
2884}; 3087};
2885 3088
@@ -2890,6 +3093,7 @@ static struct omap_hwmod_addr_space omap44xx_mcbsp2_dma_addrs[] = {
2890 .pa_end = 0x490240ff, 3093 .pa_end = 0x490240ff,
2891 .flags = ADDR_TYPE_RT 3094 .flags = ADDR_TYPE_RT
2892 }, 3095 },
3096 { }
2893}; 3097};
2894 3098
2895/* l4_abe -> mcbsp2 (dma) */ 3099/* l4_abe -> mcbsp2 (dma) */
@@ -2898,7 +3102,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp2_dma = {
2898 .slave = &omap44xx_mcbsp2_hwmod, 3102 .slave = &omap44xx_mcbsp2_hwmod,
2899 .clk = "ocp_abe_iclk", 3103 .clk = "ocp_abe_iclk",
2900 .addr = omap44xx_mcbsp2_dma_addrs, 3104 .addr = omap44xx_mcbsp2_dma_addrs,
2901 .addr_cnt = ARRAY_SIZE(omap44xx_mcbsp2_dma_addrs),
2902 .user = OCP_USER_SDMA, 3105 .user = OCP_USER_SDMA,
2903}; 3106};
2904 3107
@@ -2911,14 +3114,15 @@ static struct omap_hwmod_ocp_if *omap44xx_mcbsp2_slaves[] = {
2911static struct omap_hwmod omap44xx_mcbsp2_hwmod = { 3114static struct omap_hwmod omap44xx_mcbsp2_hwmod = {
2912 .name = "mcbsp2", 3115 .name = "mcbsp2",
2913 .class = &omap44xx_mcbsp_hwmod_class, 3116 .class = &omap44xx_mcbsp_hwmod_class,
3117 .clkdm_name = "abe_clkdm",
2914 .mpu_irqs = omap44xx_mcbsp2_irqs, 3118 .mpu_irqs = omap44xx_mcbsp2_irqs,
2915 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mcbsp2_irqs),
2916 .sdma_reqs = omap44xx_mcbsp2_sdma_reqs, 3119 .sdma_reqs = omap44xx_mcbsp2_sdma_reqs,
2917 .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_mcbsp2_sdma_reqs),
2918 .main_clk = "mcbsp2_fck", 3120 .main_clk = "mcbsp2_fck",
2919 .prcm = { 3121 .prcm = {
2920 .omap4 = { 3122 .omap4 = {
2921 .clkctrl_reg = OMAP4430_CM1_ABE_MCBSP2_CLKCTRL, 3123 .clkctrl_offs = OMAP4_CM1_ABE_MCBSP2_CLKCTRL_OFFSET,
3124 .context_offs = OMAP4_RM_ABE_MCBSP2_CONTEXT_OFFSET,
3125 .modulemode = MODULEMODE_SWCTRL,
2922 }, 3126 },
2923 }, 3127 },
2924 .slaves = omap44xx_mcbsp2_slaves, 3128 .slaves = omap44xx_mcbsp2_slaves,
@@ -2930,11 +3134,13 @@ static struct omap_hwmod omap44xx_mcbsp2_hwmod = {
2930static struct omap_hwmod omap44xx_mcbsp3_hwmod; 3134static struct omap_hwmod omap44xx_mcbsp3_hwmod;
2931static struct omap_hwmod_irq_info omap44xx_mcbsp3_irqs[] = { 3135static struct omap_hwmod_irq_info omap44xx_mcbsp3_irqs[] = {
2932 { .irq = 23 + OMAP44XX_IRQ_GIC_START }, 3136 { .irq = 23 + OMAP44XX_IRQ_GIC_START },
3137 { .irq = -1 }
2933}; 3138};
2934 3139
2935static struct omap_hwmod_dma_info omap44xx_mcbsp3_sdma_reqs[] = { 3140static struct omap_hwmod_dma_info omap44xx_mcbsp3_sdma_reqs[] = {
2936 { .name = "tx", .dma_req = 18 + OMAP44XX_DMA_REQ_START }, 3141 { .name = "tx", .dma_req = 18 + OMAP44XX_DMA_REQ_START },
2937 { .name = "rx", .dma_req = 19 + OMAP44XX_DMA_REQ_START }, 3142 { .name = "rx", .dma_req = 19 + OMAP44XX_DMA_REQ_START },
3143 { .dma_req = -1 }
2938}; 3144};
2939 3145
2940static struct omap_hwmod_addr_space omap44xx_mcbsp3_addrs[] = { 3146static struct omap_hwmod_addr_space omap44xx_mcbsp3_addrs[] = {
@@ -2944,6 +3150,7 @@ static struct omap_hwmod_addr_space omap44xx_mcbsp3_addrs[] = {
2944 .pa_end = 0x401260ff, 3150 .pa_end = 0x401260ff,
2945 .flags = ADDR_TYPE_RT 3151 .flags = ADDR_TYPE_RT
2946 }, 3152 },
3153 { }
2947}; 3154};
2948 3155
2949/* l4_abe -> mcbsp3 */ 3156/* l4_abe -> mcbsp3 */
@@ -2952,7 +3159,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp3 = {
2952 .slave = &omap44xx_mcbsp3_hwmod, 3159 .slave = &omap44xx_mcbsp3_hwmod,
2953 .clk = "ocp_abe_iclk", 3160 .clk = "ocp_abe_iclk",
2954 .addr = omap44xx_mcbsp3_addrs, 3161 .addr = omap44xx_mcbsp3_addrs,
2955 .addr_cnt = ARRAY_SIZE(omap44xx_mcbsp3_addrs),
2956 .user = OCP_USER_MPU, 3162 .user = OCP_USER_MPU,
2957}; 3163};
2958 3164
@@ -2963,6 +3169,7 @@ static struct omap_hwmod_addr_space omap44xx_mcbsp3_dma_addrs[] = {
2963 .pa_end = 0x490260ff, 3169 .pa_end = 0x490260ff,
2964 .flags = ADDR_TYPE_RT 3170 .flags = ADDR_TYPE_RT
2965 }, 3171 },
3172 { }
2966}; 3173};
2967 3174
2968/* l4_abe -> mcbsp3 (dma) */ 3175/* l4_abe -> mcbsp3 (dma) */
@@ -2971,7 +3178,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcbsp3_dma = {
2971 .slave = &omap44xx_mcbsp3_hwmod, 3178 .slave = &omap44xx_mcbsp3_hwmod,
2972 .clk = "ocp_abe_iclk", 3179 .clk = "ocp_abe_iclk",
2973 .addr = omap44xx_mcbsp3_dma_addrs, 3180 .addr = omap44xx_mcbsp3_dma_addrs,
2974 .addr_cnt = ARRAY_SIZE(omap44xx_mcbsp3_dma_addrs),
2975 .user = OCP_USER_SDMA, 3181 .user = OCP_USER_SDMA,
2976}; 3182};
2977 3183
@@ -2984,14 +3190,15 @@ static struct omap_hwmod_ocp_if *omap44xx_mcbsp3_slaves[] = {
2984static struct omap_hwmod omap44xx_mcbsp3_hwmod = { 3190static struct omap_hwmod omap44xx_mcbsp3_hwmod = {
2985 .name = "mcbsp3", 3191 .name = "mcbsp3",
2986 .class = &omap44xx_mcbsp_hwmod_class, 3192 .class = &omap44xx_mcbsp_hwmod_class,
3193 .clkdm_name = "abe_clkdm",
2987 .mpu_irqs = omap44xx_mcbsp3_irqs, 3194 .mpu_irqs = omap44xx_mcbsp3_irqs,
2988 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mcbsp3_irqs),
2989 .sdma_reqs = omap44xx_mcbsp3_sdma_reqs, 3195 .sdma_reqs = omap44xx_mcbsp3_sdma_reqs,
2990 .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_mcbsp3_sdma_reqs),
2991 .main_clk = "mcbsp3_fck", 3196 .main_clk = "mcbsp3_fck",
2992 .prcm = { 3197 .prcm = {
2993 .omap4 = { 3198 .omap4 = {
2994 .clkctrl_reg = OMAP4430_CM1_ABE_MCBSP3_CLKCTRL, 3199 .clkctrl_offs = OMAP4_CM1_ABE_MCBSP3_CLKCTRL_OFFSET,
3200 .context_offs = OMAP4_RM_ABE_MCBSP3_CONTEXT_OFFSET,
3201 .modulemode = MODULEMODE_SWCTRL,
2995 }, 3202 },
2996 }, 3203 },
2997 .slaves = omap44xx_mcbsp3_slaves, 3204 .slaves = omap44xx_mcbsp3_slaves,
@@ -3003,11 +3210,13 @@ static struct omap_hwmod omap44xx_mcbsp3_hwmod = {
3003static struct omap_hwmod omap44xx_mcbsp4_hwmod; 3210static struct omap_hwmod omap44xx_mcbsp4_hwmod;
3004static struct omap_hwmod_irq_info omap44xx_mcbsp4_irqs[] = { 3211static struct omap_hwmod_irq_info omap44xx_mcbsp4_irqs[] = {
3005 { .irq = 16 + OMAP44XX_IRQ_GIC_START }, 3212 { .irq = 16 + OMAP44XX_IRQ_GIC_START },
3213 { .irq = -1 }
3006}; 3214};
3007 3215
3008static struct omap_hwmod_dma_info omap44xx_mcbsp4_sdma_reqs[] = { 3216static struct omap_hwmod_dma_info omap44xx_mcbsp4_sdma_reqs[] = {
3009 { .name = "tx", .dma_req = 30 + OMAP44XX_DMA_REQ_START }, 3217 { .name = "tx", .dma_req = 30 + OMAP44XX_DMA_REQ_START },
3010 { .name = "rx", .dma_req = 31 + OMAP44XX_DMA_REQ_START }, 3218 { .name = "rx", .dma_req = 31 + OMAP44XX_DMA_REQ_START },
3219 { .dma_req = -1 }
3011}; 3220};
3012 3221
3013static struct omap_hwmod_addr_space omap44xx_mcbsp4_addrs[] = { 3222static struct omap_hwmod_addr_space omap44xx_mcbsp4_addrs[] = {
@@ -3016,6 +3225,7 @@ static struct omap_hwmod_addr_space omap44xx_mcbsp4_addrs[] = {
3016 .pa_end = 0x480960ff, 3225 .pa_end = 0x480960ff,
3017 .flags = ADDR_TYPE_RT 3226 .flags = ADDR_TYPE_RT
3018 }, 3227 },
3228 { }
3019}; 3229};
3020 3230
3021/* l4_per -> mcbsp4 */ 3231/* l4_per -> mcbsp4 */
@@ -3024,7 +3234,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__mcbsp4 = {
3024 .slave = &omap44xx_mcbsp4_hwmod, 3234 .slave = &omap44xx_mcbsp4_hwmod,
3025 .clk = "l4_div_ck", 3235 .clk = "l4_div_ck",
3026 .addr = omap44xx_mcbsp4_addrs, 3236 .addr = omap44xx_mcbsp4_addrs,
3027 .addr_cnt = ARRAY_SIZE(omap44xx_mcbsp4_addrs),
3028 .user = OCP_USER_MPU | OCP_USER_SDMA, 3237 .user = OCP_USER_MPU | OCP_USER_SDMA,
3029}; 3238};
3030 3239
@@ -3036,14 +3245,15 @@ static struct omap_hwmod_ocp_if *omap44xx_mcbsp4_slaves[] = {
3036static struct omap_hwmod omap44xx_mcbsp4_hwmod = { 3245static struct omap_hwmod omap44xx_mcbsp4_hwmod = {
3037 .name = "mcbsp4", 3246 .name = "mcbsp4",
3038 .class = &omap44xx_mcbsp_hwmod_class, 3247 .class = &omap44xx_mcbsp_hwmod_class,
3248 .clkdm_name = "l4_per_clkdm",
3039 .mpu_irqs = omap44xx_mcbsp4_irqs, 3249 .mpu_irqs = omap44xx_mcbsp4_irqs,
3040 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mcbsp4_irqs),
3041 .sdma_reqs = omap44xx_mcbsp4_sdma_reqs, 3250 .sdma_reqs = omap44xx_mcbsp4_sdma_reqs,
3042 .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_mcbsp4_sdma_reqs),
3043 .main_clk = "mcbsp4_fck", 3251 .main_clk = "mcbsp4_fck",
3044 .prcm = { 3252 .prcm = {
3045 .omap4 = { 3253 .omap4 = {
3046 .clkctrl_reg = OMAP4430_CM_L4PER_MCBSP4_CLKCTRL, 3254 .clkctrl_offs = OMAP4_CM_L4PER_MCBSP4_CLKCTRL_OFFSET,
3255 .context_offs = OMAP4_RM_L4PER_MCBSP4_CONTEXT_OFFSET,
3256 .modulemode = MODULEMODE_SWCTRL,
3047 }, 3257 },
3048 }, 3258 },
3049 .slaves = omap44xx_mcbsp4_slaves, 3259 .slaves = omap44xx_mcbsp4_slaves,
@@ -3076,11 +3286,13 @@ static struct omap_hwmod_class omap44xx_mcpdm_hwmod_class = {
3076static struct omap_hwmod omap44xx_mcpdm_hwmod; 3286static struct omap_hwmod omap44xx_mcpdm_hwmod;
3077static struct omap_hwmod_irq_info omap44xx_mcpdm_irqs[] = { 3287static struct omap_hwmod_irq_info omap44xx_mcpdm_irqs[] = {
3078 { .irq = 112 + OMAP44XX_IRQ_GIC_START }, 3288 { .irq = 112 + OMAP44XX_IRQ_GIC_START },
3289 { .irq = -1 }
3079}; 3290};
3080 3291
3081static struct omap_hwmod_dma_info omap44xx_mcpdm_sdma_reqs[] = { 3292static struct omap_hwmod_dma_info omap44xx_mcpdm_sdma_reqs[] = {
3082 { .name = "up_link", .dma_req = 64 + OMAP44XX_DMA_REQ_START }, 3293 { .name = "up_link", .dma_req = 64 + OMAP44XX_DMA_REQ_START },
3083 { .name = "dn_link", .dma_req = 65 + OMAP44XX_DMA_REQ_START }, 3294 { .name = "dn_link", .dma_req = 65 + OMAP44XX_DMA_REQ_START },
3295 { .dma_req = -1 }
3084}; 3296};
3085 3297
3086static struct omap_hwmod_addr_space omap44xx_mcpdm_addrs[] = { 3298static struct omap_hwmod_addr_space omap44xx_mcpdm_addrs[] = {
@@ -3089,6 +3301,7 @@ static struct omap_hwmod_addr_space omap44xx_mcpdm_addrs[] = {
3089 .pa_end = 0x4013207f, 3301 .pa_end = 0x4013207f,
3090 .flags = ADDR_TYPE_RT 3302 .flags = ADDR_TYPE_RT
3091 }, 3303 },
3304 { }
3092}; 3305};
3093 3306
3094/* l4_abe -> mcpdm */ 3307/* l4_abe -> mcpdm */
@@ -3097,7 +3310,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcpdm = {
3097 .slave = &omap44xx_mcpdm_hwmod, 3310 .slave = &omap44xx_mcpdm_hwmod,
3098 .clk = "ocp_abe_iclk", 3311 .clk = "ocp_abe_iclk",
3099 .addr = omap44xx_mcpdm_addrs, 3312 .addr = omap44xx_mcpdm_addrs,
3100 .addr_cnt = ARRAY_SIZE(omap44xx_mcpdm_addrs),
3101 .user = OCP_USER_MPU, 3313 .user = OCP_USER_MPU,
3102}; 3314};
3103 3315
@@ -3107,6 +3319,7 @@ static struct omap_hwmod_addr_space omap44xx_mcpdm_dma_addrs[] = {
3107 .pa_end = 0x4903207f, 3319 .pa_end = 0x4903207f,
3108 .flags = ADDR_TYPE_RT 3320 .flags = ADDR_TYPE_RT
3109 }, 3321 },
3322 { }
3110}; 3323};
3111 3324
3112/* l4_abe -> mcpdm (dma) */ 3325/* l4_abe -> mcpdm (dma) */
@@ -3115,7 +3328,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__mcpdm_dma = {
3115 .slave = &omap44xx_mcpdm_hwmod, 3328 .slave = &omap44xx_mcpdm_hwmod,
3116 .clk = "ocp_abe_iclk", 3329 .clk = "ocp_abe_iclk",
3117 .addr = omap44xx_mcpdm_dma_addrs, 3330 .addr = omap44xx_mcpdm_dma_addrs,
3118 .addr_cnt = ARRAY_SIZE(omap44xx_mcpdm_dma_addrs),
3119 .user = OCP_USER_SDMA, 3331 .user = OCP_USER_SDMA,
3120}; 3332};
3121 3333
@@ -3128,14 +3340,15 @@ static struct omap_hwmod_ocp_if *omap44xx_mcpdm_slaves[] = {
3128static struct omap_hwmod omap44xx_mcpdm_hwmod = { 3340static struct omap_hwmod omap44xx_mcpdm_hwmod = {
3129 .name = "mcpdm", 3341 .name = "mcpdm",
3130 .class = &omap44xx_mcpdm_hwmod_class, 3342 .class = &omap44xx_mcpdm_hwmod_class,
3343 .clkdm_name = "abe_clkdm",
3131 .mpu_irqs = omap44xx_mcpdm_irqs, 3344 .mpu_irqs = omap44xx_mcpdm_irqs,
3132 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mcpdm_irqs),
3133 .sdma_reqs = omap44xx_mcpdm_sdma_reqs, 3345 .sdma_reqs = omap44xx_mcpdm_sdma_reqs,
3134 .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_mcpdm_sdma_reqs),
3135 .main_clk = "mcpdm_fck", 3346 .main_clk = "mcpdm_fck",
3136 .prcm = { 3347 .prcm = {
3137 .omap4 = { 3348 .omap4 = {
3138 .clkctrl_reg = OMAP4430_CM1_ABE_PDM_CLKCTRL, 3349 .clkctrl_offs = OMAP4_CM1_ABE_PDM_CLKCTRL_OFFSET,
3350 .context_offs = OMAP4_RM_ABE_PDM_CONTEXT_OFFSET,
3351 .modulemode = MODULEMODE_SWCTRL,
3139 }, 3352 },
3140 }, 3353 },
3141 .slaves = omap44xx_mcpdm_slaves, 3354 .slaves = omap44xx_mcpdm_slaves,
@@ -3169,6 +3382,7 @@ static struct omap_hwmod_class omap44xx_mcspi_hwmod_class = {
3169static struct omap_hwmod omap44xx_mcspi1_hwmod; 3382static struct omap_hwmod omap44xx_mcspi1_hwmod;
3170static struct omap_hwmod_irq_info omap44xx_mcspi1_irqs[] = { 3383static struct omap_hwmod_irq_info omap44xx_mcspi1_irqs[] = {
3171 { .irq = 65 + OMAP44XX_IRQ_GIC_START }, 3384 { .irq = 65 + OMAP44XX_IRQ_GIC_START },
3385 { .irq = -1 }
3172}; 3386};
3173 3387
3174static struct omap_hwmod_dma_info omap44xx_mcspi1_sdma_reqs[] = { 3388static struct omap_hwmod_dma_info omap44xx_mcspi1_sdma_reqs[] = {
@@ -3180,6 +3394,7 @@ static struct omap_hwmod_dma_info omap44xx_mcspi1_sdma_reqs[] = {
3180 { .name = "rx2", .dma_req = 39 + OMAP44XX_DMA_REQ_START }, 3394 { .name = "rx2", .dma_req = 39 + OMAP44XX_DMA_REQ_START },
3181 { .name = "tx3", .dma_req = 40 + OMAP44XX_DMA_REQ_START }, 3395 { .name = "tx3", .dma_req = 40 + OMAP44XX_DMA_REQ_START },
3182 { .name = "rx3", .dma_req = 41 + OMAP44XX_DMA_REQ_START }, 3396 { .name = "rx3", .dma_req = 41 + OMAP44XX_DMA_REQ_START },
3397 { .dma_req = -1 }
3183}; 3398};
3184 3399
3185static struct omap_hwmod_addr_space omap44xx_mcspi1_addrs[] = { 3400static struct omap_hwmod_addr_space omap44xx_mcspi1_addrs[] = {
@@ -3188,6 +3403,7 @@ static struct omap_hwmod_addr_space omap44xx_mcspi1_addrs[] = {
3188 .pa_end = 0x480981ff, 3403 .pa_end = 0x480981ff,
3189 .flags = ADDR_TYPE_RT 3404 .flags = ADDR_TYPE_RT
3190 }, 3405 },
3406 { }
3191}; 3407};
3192 3408
3193/* l4_per -> mcspi1 */ 3409/* l4_per -> mcspi1 */
@@ -3196,7 +3412,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__mcspi1 = {
3196 .slave = &omap44xx_mcspi1_hwmod, 3412 .slave = &omap44xx_mcspi1_hwmod,
3197 .clk = "l4_div_ck", 3413 .clk = "l4_div_ck",
3198 .addr = omap44xx_mcspi1_addrs, 3414 .addr = omap44xx_mcspi1_addrs,
3199 .addr_cnt = ARRAY_SIZE(omap44xx_mcspi1_addrs),
3200 .user = OCP_USER_MPU | OCP_USER_SDMA, 3415 .user = OCP_USER_MPU | OCP_USER_SDMA,
3201}; 3416};
3202 3417
@@ -3213,14 +3428,15 @@ static struct omap2_mcspi_dev_attr mcspi1_dev_attr = {
3213static struct omap_hwmod omap44xx_mcspi1_hwmod = { 3428static struct omap_hwmod omap44xx_mcspi1_hwmod = {
3214 .name = "mcspi1", 3429 .name = "mcspi1",
3215 .class = &omap44xx_mcspi_hwmod_class, 3430 .class = &omap44xx_mcspi_hwmod_class,
3431 .clkdm_name = "l4_per_clkdm",
3216 .mpu_irqs = omap44xx_mcspi1_irqs, 3432 .mpu_irqs = omap44xx_mcspi1_irqs,
3217 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mcspi1_irqs),
3218 .sdma_reqs = omap44xx_mcspi1_sdma_reqs, 3433 .sdma_reqs = omap44xx_mcspi1_sdma_reqs,
3219 .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_mcspi1_sdma_reqs),
3220 .main_clk = "mcspi1_fck", 3434 .main_clk = "mcspi1_fck",
3221 .prcm = { 3435 .prcm = {
3222 .omap4 = { 3436 .omap4 = {
3223 .clkctrl_reg = OMAP4430_CM_L4PER_MCSPI1_CLKCTRL, 3437 .clkctrl_offs = OMAP4_CM_L4PER_MCSPI1_CLKCTRL_OFFSET,
3438 .context_offs = OMAP4_RM_L4PER_MCSPI1_CONTEXT_OFFSET,
3439 .modulemode = MODULEMODE_SWCTRL,
3224 }, 3440 },
3225 }, 3441 },
3226 .dev_attr = &mcspi1_dev_attr, 3442 .dev_attr = &mcspi1_dev_attr,
@@ -3233,6 +3449,7 @@ static struct omap_hwmod omap44xx_mcspi1_hwmod = {
3233static struct omap_hwmod omap44xx_mcspi2_hwmod; 3449static struct omap_hwmod omap44xx_mcspi2_hwmod;
3234static struct omap_hwmod_irq_info omap44xx_mcspi2_irqs[] = { 3450static struct omap_hwmod_irq_info omap44xx_mcspi2_irqs[] = {
3235 { .irq = 66 + OMAP44XX_IRQ_GIC_START }, 3451 { .irq = 66 + OMAP44XX_IRQ_GIC_START },
3452 { .irq = -1 }
3236}; 3453};
3237 3454
3238static struct omap_hwmod_dma_info omap44xx_mcspi2_sdma_reqs[] = { 3455static struct omap_hwmod_dma_info omap44xx_mcspi2_sdma_reqs[] = {
@@ -3240,6 +3457,7 @@ static struct omap_hwmod_dma_info omap44xx_mcspi2_sdma_reqs[] = {
3240 { .name = "rx0", .dma_req = 43 + OMAP44XX_DMA_REQ_START }, 3457 { .name = "rx0", .dma_req = 43 + OMAP44XX_DMA_REQ_START },
3241 { .name = "tx1", .dma_req = 44 + OMAP44XX_DMA_REQ_START }, 3458 { .name = "tx1", .dma_req = 44 + OMAP44XX_DMA_REQ_START },
3242 { .name = "rx1", .dma_req = 45 + OMAP44XX_DMA_REQ_START }, 3459 { .name = "rx1", .dma_req = 45 + OMAP44XX_DMA_REQ_START },
3460 { .dma_req = -1 }
3243}; 3461};
3244 3462
3245static struct omap_hwmod_addr_space omap44xx_mcspi2_addrs[] = { 3463static struct omap_hwmod_addr_space omap44xx_mcspi2_addrs[] = {
@@ -3248,6 +3466,7 @@ static struct omap_hwmod_addr_space omap44xx_mcspi2_addrs[] = {
3248 .pa_end = 0x4809a1ff, 3466 .pa_end = 0x4809a1ff,
3249 .flags = ADDR_TYPE_RT 3467 .flags = ADDR_TYPE_RT
3250 }, 3468 },
3469 { }
3251}; 3470};
3252 3471
3253/* l4_per -> mcspi2 */ 3472/* l4_per -> mcspi2 */
@@ -3256,7 +3475,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__mcspi2 = {
3256 .slave = &omap44xx_mcspi2_hwmod, 3475 .slave = &omap44xx_mcspi2_hwmod,
3257 .clk = "l4_div_ck", 3476 .clk = "l4_div_ck",
3258 .addr = omap44xx_mcspi2_addrs, 3477 .addr = omap44xx_mcspi2_addrs,
3259 .addr_cnt = ARRAY_SIZE(omap44xx_mcspi2_addrs),
3260 .user = OCP_USER_MPU | OCP_USER_SDMA, 3478 .user = OCP_USER_MPU | OCP_USER_SDMA,
3261}; 3479};
3262 3480
@@ -3273,14 +3491,15 @@ static struct omap2_mcspi_dev_attr mcspi2_dev_attr = {
3273static struct omap_hwmod omap44xx_mcspi2_hwmod = { 3491static struct omap_hwmod omap44xx_mcspi2_hwmod = {
3274 .name = "mcspi2", 3492 .name = "mcspi2",
3275 .class = &omap44xx_mcspi_hwmod_class, 3493 .class = &omap44xx_mcspi_hwmod_class,
3494 .clkdm_name = "l4_per_clkdm",
3276 .mpu_irqs = omap44xx_mcspi2_irqs, 3495 .mpu_irqs = omap44xx_mcspi2_irqs,
3277 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mcspi2_irqs),
3278 .sdma_reqs = omap44xx_mcspi2_sdma_reqs, 3496 .sdma_reqs = omap44xx_mcspi2_sdma_reqs,
3279 .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_mcspi2_sdma_reqs),
3280 .main_clk = "mcspi2_fck", 3497 .main_clk = "mcspi2_fck",
3281 .prcm = { 3498 .prcm = {
3282 .omap4 = { 3499 .omap4 = {
3283 .clkctrl_reg = OMAP4430_CM_L4PER_MCSPI2_CLKCTRL, 3500 .clkctrl_offs = OMAP4_CM_L4PER_MCSPI2_CLKCTRL_OFFSET,
3501 .context_offs = OMAP4_RM_L4PER_MCSPI2_CONTEXT_OFFSET,
3502 .modulemode = MODULEMODE_SWCTRL,
3284 }, 3503 },
3285 }, 3504 },
3286 .dev_attr = &mcspi2_dev_attr, 3505 .dev_attr = &mcspi2_dev_attr,
@@ -3293,6 +3512,7 @@ static struct omap_hwmod omap44xx_mcspi2_hwmod = {
3293static struct omap_hwmod omap44xx_mcspi3_hwmod; 3512static struct omap_hwmod omap44xx_mcspi3_hwmod;
3294static struct omap_hwmod_irq_info omap44xx_mcspi3_irqs[] = { 3513static struct omap_hwmod_irq_info omap44xx_mcspi3_irqs[] = {
3295 { .irq = 91 + OMAP44XX_IRQ_GIC_START }, 3514 { .irq = 91 + OMAP44XX_IRQ_GIC_START },
3515 { .irq = -1 }
3296}; 3516};
3297 3517
3298static struct omap_hwmod_dma_info omap44xx_mcspi3_sdma_reqs[] = { 3518static struct omap_hwmod_dma_info omap44xx_mcspi3_sdma_reqs[] = {
@@ -3300,6 +3520,7 @@ static struct omap_hwmod_dma_info omap44xx_mcspi3_sdma_reqs[] = {
3300 { .name = "rx0", .dma_req = 15 + OMAP44XX_DMA_REQ_START }, 3520 { .name = "rx0", .dma_req = 15 + OMAP44XX_DMA_REQ_START },
3301 { .name = "tx1", .dma_req = 22 + OMAP44XX_DMA_REQ_START }, 3521 { .name = "tx1", .dma_req = 22 + OMAP44XX_DMA_REQ_START },
3302 { .name = "rx1", .dma_req = 23 + OMAP44XX_DMA_REQ_START }, 3522 { .name = "rx1", .dma_req = 23 + OMAP44XX_DMA_REQ_START },
3523 { .dma_req = -1 }
3303}; 3524};
3304 3525
3305static struct omap_hwmod_addr_space omap44xx_mcspi3_addrs[] = { 3526static struct omap_hwmod_addr_space omap44xx_mcspi3_addrs[] = {
@@ -3308,6 +3529,7 @@ static struct omap_hwmod_addr_space omap44xx_mcspi3_addrs[] = {
3308 .pa_end = 0x480b81ff, 3529 .pa_end = 0x480b81ff,
3309 .flags = ADDR_TYPE_RT 3530 .flags = ADDR_TYPE_RT
3310 }, 3531 },
3532 { }
3311}; 3533};
3312 3534
3313/* l4_per -> mcspi3 */ 3535/* l4_per -> mcspi3 */
@@ -3316,7 +3538,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__mcspi3 = {
3316 .slave = &omap44xx_mcspi3_hwmod, 3538 .slave = &omap44xx_mcspi3_hwmod,
3317 .clk = "l4_div_ck", 3539 .clk = "l4_div_ck",
3318 .addr = omap44xx_mcspi3_addrs, 3540 .addr = omap44xx_mcspi3_addrs,
3319 .addr_cnt = ARRAY_SIZE(omap44xx_mcspi3_addrs),
3320 .user = OCP_USER_MPU | OCP_USER_SDMA, 3541 .user = OCP_USER_MPU | OCP_USER_SDMA,
3321}; 3542};
3322 3543
@@ -3333,14 +3554,15 @@ static struct omap2_mcspi_dev_attr mcspi3_dev_attr = {
3333static struct omap_hwmod omap44xx_mcspi3_hwmod = { 3554static struct omap_hwmod omap44xx_mcspi3_hwmod = {
3334 .name = "mcspi3", 3555 .name = "mcspi3",
3335 .class = &omap44xx_mcspi_hwmod_class, 3556 .class = &omap44xx_mcspi_hwmod_class,
3557 .clkdm_name = "l4_per_clkdm",
3336 .mpu_irqs = omap44xx_mcspi3_irqs, 3558 .mpu_irqs = omap44xx_mcspi3_irqs,
3337 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mcspi3_irqs),
3338 .sdma_reqs = omap44xx_mcspi3_sdma_reqs, 3559 .sdma_reqs = omap44xx_mcspi3_sdma_reqs,
3339 .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_mcspi3_sdma_reqs),
3340 .main_clk = "mcspi3_fck", 3560 .main_clk = "mcspi3_fck",
3341 .prcm = { 3561 .prcm = {
3342 .omap4 = { 3562 .omap4 = {
3343 .clkctrl_reg = OMAP4430_CM_L4PER_MCSPI3_CLKCTRL, 3563 .clkctrl_offs = OMAP4_CM_L4PER_MCSPI3_CLKCTRL_OFFSET,
3564 .context_offs = OMAP4_RM_L4PER_MCSPI3_CONTEXT_OFFSET,
3565 .modulemode = MODULEMODE_SWCTRL,
3344 }, 3566 },
3345 }, 3567 },
3346 .dev_attr = &mcspi3_dev_attr, 3568 .dev_attr = &mcspi3_dev_attr,
@@ -3353,11 +3575,13 @@ static struct omap_hwmod omap44xx_mcspi3_hwmod = {
3353static struct omap_hwmod omap44xx_mcspi4_hwmod; 3575static struct omap_hwmod omap44xx_mcspi4_hwmod;
3354static struct omap_hwmod_irq_info omap44xx_mcspi4_irqs[] = { 3576static struct omap_hwmod_irq_info omap44xx_mcspi4_irqs[] = {
3355 { .irq = 48 + OMAP44XX_IRQ_GIC_START }, 3577 { .irq = 48 + OMAP44XX_IRQ_GIC_START },
3578 { .irq = -1 }
3356}; 3579};
3357 3580
3358static struct omap_hwmod_dma_info omap44xx_mcspi4_sdma_reqs[] = { 3581static struct omap_hwmod_dma_info omap44xx_mcspi4_sdma_reqs[] = {
3359 { .name = "tx0", .dma_req = 69 + OMAP44XX_DMA_REQ_START }, 3582 { .name = "tx0", .dma_req = 69 + OMAP44XX_DMA_REQ_START },
3360 { .name = "rx0", .dma_req = 70 + OMAP44XX_DMA_REQ_START }, 3583 { .name = "rx0", .dma_req = 70 + OMAP44XX_DMA_REQ_START },
3584 { .dma_req = -1 }
3361}; 3585};
3362 3586
3363static struct omap_hwmod_addr_space omap44xx_mcspi4_addrs[] = { 3587static struct omap_hwmod_addr_space omap44xx_mcspi4_addrs[] = {
@@ -3366,6 +3590,7 @@ static struct omap_hwmod_addr_space omap44xx_mcspi4_addrs[] = {
3366 .pa_end = 0x480ba1ff, 3590 .pa_end = 0x480ba1ff,
3367 .flags = ADDR_TYPE_RT 3591 .flags = ADDR_TYPE_RT
3368 }, 3592 },
3593 { }
3369}; 3594};
3370 3595
3371/* l4_per -> mcspi4 */ 3596/* l4_per -> mcspi4 */
@@ -3374,7 +3599,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__mcspi4 = {
3374 .slave = &omap44xx_mcspi4_hwmod, 3599 .slave = &omap44xx_mcspi4_hwmod,
3375 .clk = "l4_div_ck", 3600 .clk = "l4_div_ck",
3376 .addr = omap44xx_mcspi4_addrs, 3601 .addr = omap44xx_mcspi4_addrs,
3377 .addr_cnt = ARRAY_SIZE(omap44xx_mcspi4_addrs),
3378 .user = OCP_USER_MPU | OCP_USER_SDMA, 3602 .user = OCP_USER_MPU | OCP_USER_SDMA,
3379}; 3603};
3380 3604
@@ -3391,14 +3615,15 @@ static struct omap2_mcspi_dev_attr mcspi4_dev_attr = {
3391static struct omap_hwmod omap44xx_mcspi4_hwmod = { 3615static struct omap_hwmod omap44xx_mcspi4_hwmod = {
3392 .name = "mcspi4", 3616 .name = "mcspi4",
3393 .class = &omap44xx_mcspi_hwmod_class, 3617 .class = &omap44xx_mcspi_hwmod_class,
3618 .clkdm_name = "l4_per_clkdm",
3394 .mpu_irqs = omap44xx_mcspi4_irqs, 3619 .mpu_irqs = omap44xx_mcspi4_irqs,
3395 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mcspi4_irqs),
3396 .sdma_reqs = omap44xx_mcspi4_sdma_reqs, 3620 .sdma_reqs = omap44xx_mcspi4_sdma_reqs,
3397 .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_mcspi4_sdma_reqs),
3398 .main_clk = "mcspi4_fck", 3621 .main_clk = "mcspi4_fck",
3399 .prcm = { 3622 .prcm = {
3400 .omap4 = { 3623 .omap4 = {
3401 .clkctrl_reg = OMAP4430_CM_L4PER_MCSPI4_CLKCTRL, 3624 .clkctrl_offs = OMAP4_CM_L4PER_MCSPI4_CLKCTRL_OFFSET,
3625 .context_offs = OMAP4_RM_L4PER_MCSPI4_CONTEXT_OFFSET,
3626 .modulemode = MODULEMODE_SWCTRL,
3402 }, 3627 },
3403 }, 3628 },
3404 .dev_attr = &mcspi4_dev_attr, 3629 .dev_attr = &mcspi4_dev_attr,
@@ -3420,7 +3645,7 @@ static struct omap_hwmod_class_sysconfig omap44xx_mmc_sysc = {
3420 SYSC_HAS_SOFTRESET), 3645 SYSC_HAS_SOFTRESET),
3421 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART | 3646 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
3422 SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO | 3647 SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
3423 MSTANDBY_SMART), 3648 MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
3424 .sysc_fields = &omap_hwmod_sysc_type2, 3649 .sysc_fields = &omap_hwmod_sysc_type2,
3425}; 3650};
3426 3651
@@ -3430,14 +3655,15 @@ static struct omap_hwmod_class omap44xx_mmc_hwmod_class = {
3430}; 3655};
3431 3656
3432/* mmc1 */ 3657/* mmc1 */
3433
3434static struct omap_hwmod_irq_info omap44xx_mmc1_irqs[] = { 3658static struct omap_hwmod_irq_info omap44xx_mmc1_irqs[] = {
3435 { .irq = 83 + OMAP44XX_IRQ_GIC_START }, 3659 { .irq = 83 + OMAP44XX_IRQ_GIC_START },
3660 { .irq = -1 }
3436}; 3661};
3437 3662
3438static struct omap_hwmod_dma_info omap44xx_mmc1_sdma_reqs[] = { 3663static struct omap_hwmod_dma_info omap44xx_mmc1_sdma_reqs[] = {
3439 { .name = "tx", .dma_req = 60 + OMAP44XX_DMA_REQ_START }, 3664 { .name = "tx", .dma_req = 60 + OMAP44XX_DMA_REQ_START },
3440 { .name = "rx", .dma_req = 61 + OMAP44XX_DMA_REQ_START }, 3665 { .name = "rx", .dma_req = 61 + OMAP44XX_DMA_REQ_START },
3666 { .dma_req = -1 }
3441}; 3667};
3442 3668
3443/* mmc1 master ports */ 3669/* mmc1 master ports */
@@ -3451,6 +3677,7 @@ static struct omap_hwmod_addr_space omap44xx_mmc1_addrs[] = {
3451 .pa_end = 0x4809c3ff, 3677 .pa_end = 0x4809c3ff,
3452 .flags = ADDR_TYPE_RT 3678 .flags = ADDR_TYPE_RT
3453 }, 3679 },
3680 { }
3454}; 3681};
3455 3682
3456/* l4_per -> mmc1 */ 3683/* l4_per -> mmc1 */
@@ -3459,7 +3686,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc1 = {
3459 .slave = &omap44xx_mmc1_hwmod, 3686 .slave = &omap44xx_mmc1_hwmod,
3460 .clk = "l4_div_ck", 3687 .clk = "l4_div_ck",
3461 .addr = omap44xx_mmc1_addrs, 3688 .addr = omap44xx_mmc1_addrs,
3462 .addr_cnt = ARRAY_SIZE(omap44xx_mmc1_addrs),
3463 .user = OCP_USER_MPU | OCP_USER_SDMA, 3689 .user = OCP_USER_MPU | OCP_USER_SDMA,
3464}; 3690};
3465 3691
@@ -3476,14 +3702,15 @@ static struct omap_mmc_dev_attr mmc1_dev_attr = {
3476static struct omap_hwmod omap44xx_mmc1_hwmod = { 3702static struct omap_hwmod omap44xx_mmc1_hwmod = {
3477 .name = "mmc1", 3703 .name = "mmc1",
3478 .class = &omap44xx_mmc_hwmod_class, 3704 .class = &omap44xx_mmc_hwmod_class,
3705 .clkdm_name = "l3_init_clkdm",
3479 .mpu_irqs = omap44xx_mmc1_irqs, 3706 .mpu_irqs = omap44xx_mmc1_irqs,
3480 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mmc1_irqs),
3481 .sdma_reqs = omap44xx_mmc1_sdma_reqs, 3707 .sdma_reqs = omap44xx_mmc1_sdma_reqs,
3482 .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_mmc1_sdma_reqs),
3483 .main_clk = "mmc1_fck", 3708 .main_clk = "mmc1_fck",
3484 .prcm = { 3709 .prcm = {
3485 .omap4 = { 3710 .omap4 = {
3486 .clkctrl_reg = OMAP4430_CM_L3INIT_MMC1_CLKCTRL, 3711 .clkctrl_offs = OMAP4_CM_L3INIT_MMC1_CLKCTRL_OFFSET,
3712 .context_offs = OMAP4_RM_L3INIT_MMC1_CONTEXT_OFFSET,
3713 .modulemode = MODULEMODE_SWCTRL,
3487 }, 3714 },
3488 }, 3715 },
3489 .dev_attr = &mmc1_dev_attr, 3716 .dev_attr = &mmc1_dev_attr,
@@ -3497,11 +3724,13 @@ static struct omap_hwmod omap44xx_mmc1_hwmod = {
3497/* mmc2 */ 3724/* mmc2 */
3498static struct omap_hwmod_irq_info omap44xx_mmc2_irqs[] = { 3725static struct omap_hwmod_irq_info omap44xx_mmc2_irqs[] = {
3499 { .irq = 86 + OMAP44XX_IRQ_GIC_START }, 3726 { .irq = 86 + OMAP44XX_IRQ_GIC_START },
3727 { .irq = -1 }
3500}; 3728};
3501 3729
3502static struct omap_hwmod_dma_info omap44xx_mmc2_sdma_reqs[] = { 3730static struct omap_hwmod_dma_info omap44xx_mmc2_sdma_reqs[] = {
3503 { .name = "tx", .dma_req = 46 + OMAP44XX_DMA_REQ_START }, 3731 { .name = "tx", .dma_req = 46 + OMAP44XX_DMA_REQ_START },
3504 { .name = "rx", .dma_req = 47 + OMAP44XX_DMA_REQ_START }, 3732 { .name = "rx", .dma_req = 47 + OMAP44XX_DMA_REQ_START },
3733 { .dma_req = -1 }
3505}; 3734};
3506 3735
3507/* mmc2 master ports */ 3736/* mmc2 master ports */
@@ -3515,6 +3744,7 @@ static struct omap_hwmod_addr_space omap44xx_mmc2_addrs[] = {
3515 .pa_end = 0x480b43ff, 3744 .pa_end = 0x480b43ff,
3516 .flags = ADDR_TYPE_RT 3745 .flags = ADDR_TYPE_RT
3517 }, 3746 },
3747 { }
3518}; 3748};
3519 3749
3520/* l4_per -> mmc2 */ 3750/* l4_per -> mmc2 */
@@ -3523,7 +3753,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc2 = {
3523 .slave = &omap44xx_mmc2_hwmod, 3753 .slave = &omap44xx_mmc2_hwmod,
3524 .clk = "l4_div_ck", 3754 .clk = "l4_div_ck",
3525 .addr = omap44xx_mmc2_addrs, 3755 .addr = omap44xx_mmc2_addrs,
3526 .addr_cnt = ARRAY_SIZE(omap44xx_mmc2_addrs),
3527 .user = OCP_USER_MPU | OCP_USER_SDMA, 3756 .user = OCP_USER_MPU | OCP_USER_SDMA,
3528}; 3757};
3529 3758
@@ -3535,14 +3764,15 @@ static struct omap_hwmod_ocp_if *omap44xx_mmc2_slaves[] = {
3535static struct omap_hwmod omap44xx_mmc2_hwmod = { 3764static struct omap_hwmod omap44xx_mmc2_hwmod = {
3536 .name = "mmc2", 3765 .name = "mmc2",
3537 .class = &omap44xx_mmc_hwmod_class, 3766 .class = &omap44xx_mmc_hwmod_class,
3767 .clkdm_name = "l3_init_clkdm",
3538 .mpu_irqs = omap44xx_mmc2_irqs, 3768 .mpu_irqs = omap44xx_mmc2_irqs,
3539 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mmc2_irqs),
3540 .sdma_reqs = omap44xx_mmc2_sdma_reqs, 3769 .sdma_reqs = omap44xx_mmc2_sdma_reqs,
3541 .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_mmc2_sdma_reqs),
3542 .main_clk = "mmc2_fck", 3770 .main_clk = "mmc2_fck",
3543 .prcm = { 3771 .prcm = {
3544 .omap4 = { 3772 .omap4 = {
3545 .clkctrl_reg = OMAP4430_CM_L3INIT_MMC2_CLKCTRL, 3773 .clkctrl_offs = OMAP4_CM_L3INIT_MMC2_CLKCTRL_OFFSET,
3774 .context_offs = OMAP4_RM_L3INIT_MMC2_CONTEXT_OFFSET,
3775 .modulemode = MODULEMODE_SWCTRL,
3546 }, 3776 },
3547 }, 3777 },
3548 .slaves = omap44xx_mmc2_slaves, 3778 .slaves = omap44xx_mmc2_slaves,
@@ -3556,11 +3786,13 @@ static struct omap_hwmod omap44xx_mmc2_hwmod = {
3556static struct omap_hwmod omap44xx_mmc3_hwmod; 3786static struct omap_hwmod omap44xx_mmc3_hwmod;
3557static struct omap_hwmod_irq_info omap44xx_mmc3_irqs[] = { 3787static struct omap_hwmod_irq_info omap44xx_mmc3_irqs[] = {
3558 { .irq = 94 + OMAP44XX_IRQ_GIC_START }, 3788 { .irq = 94 + OMAP44XX_IRQ_GIC_START },
3789 { .irq = -1 }
3559}; 3790};
3560 3791
3561static struct omap_hwmod_dma_info omap44xx_mmc3_sdma_reqs[] = { 3792static struct omap_hwmod_dma_info omap44xx_mmc3_sdma_reqs[] = {
3562 { .name = "tx", .dma_req = 76 + OMAP44XX_DMA_REQ_START }, 3793 { .name = "tx", .dma_req = 76 + OMAP44XX_DMA_REQ_START },
3563 { .name = "rx", .dma_req = 77 + OMAP44XX_DMA_REQ_START }, 3794 { .name = "rx", .dma_req = 77 + OMAP44XX_DMA_REQ_START },
3795 { .dma_req = -1 }
3564}; 3796};
3565 3797
3566static struct omap_hwmod_addr_space omap44xx_mmc3_addrs[] = { 3798static struct omap_hwmod_addr_space omap44xx_mmc3_addrs[] = {
@@ -3569,6 +3801,7 @@ static struct omap_hwmod_addr_space omap44xx_mmc3_addrs[] = {
3569 .pa_end = 0x480ad3ff, 3801 .pa_end = 0x480ad3ff,
3570 .flags = ADDR_TYPE_RT 3802 .flags = ADDR_TYPE_RT
3571 }, 3803 },
3804 { }
3572}; 3805};
3573 3806
3574/* l4_per -> mmc3 */ 3807/* l4_per -> mmc3 */
@@ -3577,7 +3810,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc3 = {
3577 .slave = &omap44xx_mmc3_hwmod, 3810 .slave = &omap44xx_mmc3_hwmod,
3578 .clk = "l4_div_ck", 3811 .clk = "l4_div_ck",
3579 .addr = omap44xx_mmc3_addrs, 3812 .addr = omap44xx_mmc3_addrs,
3580 .addr_cnt = ARRAY_SIZE(omap44xx_mmc3_addrs),
3581 .user = OCP_USER_MPU | OCP_USER_SDMA, 3813 .user = OCP_USER_MPU | OCP_USER_SDMA,
3582}; 3814};
3583 3815
@@ -3589,14 +3821,15 @@ static struct omap_hwmod_ocp_if *omap44xx_mmc3_slaves[] = {
3589static struct omap_hwmod omap44xx_mmc3_hwmod = { 3821static struct omap_hwmod omap44xx_mmc3_hwmod = {
3590 .name = "mmc3", 3822 .name = "mmc3",
3591 .class = &omap44xx_mmc_hwmod_class, 3823 .class = &omap44xx_mmc_hwmod_class,
3824 .clkdm_name = "l4_per_clkdm",
3592 .mpu_irqs = omap44xx_mmc3_irqs, 3825 .mpu_irqs = omap44xx_mmc3_irqs,
3593 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mmc3_irqs),
3594 .sdma_reqs = omap44xx_mmc3_sdma_reqs, 3826 .sdma_reqs = omap44xx_mmc3_sdma_reqs,
3595 .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_mmc3_sdma_reqs),
3596 .main_clk = "mmc3_fck", 3827 .main_clk = "mmc3_fck",
3597 .prcm = { 3828 .prcm = {
3598 .omap4 = { 3829 .omap4 = {
3599 .clkctrl_reg = OMAP4430_CM_L4PER_MMCSD3_CLKCTRL, 3830 .clkctrl_offs = OMAP4_CM_L4PER_MMCSD3_CLKCTRL_OFFSET,
3831 .context_offs = OMAP4_RM_L4PER_MMCSD3_CONTEXT_OFFSET,
3832 .modulemode = MODULEMODE_SWCTRL,
3600 }, 3833 },
3601 }, 3834 },
3602 .slaves = omap44xx_mmc3_slaves, 3835 .slaves = omap44xx_mmc3_slaves,
@@ -3608,11 +3841,13 @@ static struct omap_hwmod omap44xx_mmc3_hwmod = {
3608static struct omap_hwmod omap44xx_mmc4_hwmod; 3841static struct omap_hwmod omap44xx_mmc4_hwmod;
3609static struct omap_hwmod_irq_info omap44xx_mmc4_irqs[] = { 3842static struct omap_hwmod_irq_info omap44xx_mmc4_irqs[] = {
3610 { .irq = 96 + OMAP44XX_IRQ_GIC_START }, 3843 { .irq = 96 + OMAP44XX_IRQ_GIC_START },
3844 { .irq = -1 }
3611}; 3845};
3612 3846
3613static struct omap_hwmod_dma_info omap44xx_mmc4_sdma_reqs[] = { 3847static struct omap_hwmod_dma_info omap44xx_mmc4_sdma_reqs[] = {
3614 { .name = "tx", .dma_req = 56 + OMAP44XX_DMA_REQ_START }, 3848 { .name = "tx", .dma_req = 56 + OMAP44XX_DMA_REQ_START },
3615 { .name = "rx", .dma_req = 57 + OMAP44XX_DMA_REQ_START }, 3849 { .name = "rx", .dma_req = 57 + OMAP44XX_DMA_REQ_START },
3850 { .dma_req = -1 }
3616}; 3851};
3617 3852
3618static struct omap_hwmod_addr_space omap44xx_mmc4_addrs[] = { 3853static struct omap_hwmod_addr_space omap44xx_mmc4_addrs[] = {
@@ -3621,6 +3856,7 @@ static struct omap_hwmod_addr_space omap44xx_mmc4_addrs[] = {
3621 .pa_end = 0x480d13ff, 3856 .pa_end = 0x480d13ff,
3622 .flags = ADDR_TYPE_RT 3857 .flags = ADDR_TYPE_RT
3623 }, 3858 },
3859 { }
3624}; 3860};
3625 3861
3626/* l4_per -> mmc4 */ 3862/* l4_per -> mmc4 */
@@ -3629,7 +3865,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc4 = {
3629 .slave = &omap44xx_mmc4_hwmod, 3865 .slave = &omap44xx_mmc4_hwmod,
3630 .clk = "l4_div_ck", 3866 .clk = "l4_div_ck",
3631 .addr = omap44xx_mmc4_addrs, 3867 .addr = omap44xx_mmc4_addrs,
3632 .addr_cnt = ARRAY_SIZE(omap44xx_mmc4_addrs),
3633 .user = OCP_USER_MPU | OCP_USER_SDMA, 3868 .user = OCP_USER_MPU | OCP_USER_SDMA,
3634}; 3869};
3635 3870
@@ -3641,14 +3876,16 @@ static struct omap_hwmod_ocp_if *omap44xx_mmc4_slaves[] = {
3641static struct omap_hwmod omap44xx_mmc4_hwmod = { 3876static struct omap_hwmod omap44xx_mmc4_hwmod = {
3642 .name = "mmc4", 3877 .name = "mmc4",
3643 .class = &omap44xx_mmc_hwmod_class, 3878 .class = &omap44xx_mmc_hwmod_class,
3879 .clkdm_name = "l4_per_clkdm",
3644 .mpu_irqs = omap44xx_mmc4_irqs, 3880 .mpu_irqs = omap44xx_mmc4_irqs,
3645 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mmc4_irqs), 3881
3646 .sdma_reqs = omap44xx_mmc4_sdma_reqs, 3882 .sdma_reqs = omap44xx_mmc4_sdma_reqs,
3647 .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_mmc4_sdma_reqs),
3648 .main_clk = "mmc4_fck", 3883 .main_clk = "mmc4_fck",
3649 .prcm = { 3884 .prcm = {
3650 .omap4 = { 3885 .omap4 = {
3651 .clkctrl_reg = OMAP4430_CM_L4PER_MMCSD4_CLKCTRL, 3886 .clkctrl_offs = OMAP4_CM_L4PER_MMCSD4_CLKCTRL_OFFSET,
3887 .context_offs = OMAP4_RM_L4PER_MMCSD4_CONTEXT_OFFSET,
3888 .modulemode = MODULEMODE_SWCTRL,
3652 }, 3889 },
3653 }, 3890 },
3654 .slaves = omap44xx_mmc4_slaves, 3891 .slaves = omap44xx_mmc4_slaves,
@@ -3660,11 +3897,13 @@ static struct omap_hwmod omap44xx_mmc4_hwmod = {
3660static struct omap_hwmod omap44xx_mmc5_hwmod; 3897static struct omap_hwmod omap44xx_mmc5_hwmod;
3661static struct omap_hwmod_irq_info omap44xx_mmc5_irqs[] = { 3898static struct omap_hwmod_irq_info omap44xx_mmc5_irqs[] = {
3662 { .irq = 59 + OMAP44XX_IRQ_GIC_START }, 3899 { .irq = 59 + OMAP44XX_IRQ_GIC_START },
3900 { .irq = -1 }
3663}; 3901};
3664 3902
3665static struct omap_hwmod_dma_info omap44xx_mmc5_sdma_reqs[] = { 3903static struct omap_hwmod_dma_info omap44xx_mmc5_sdma_reqs[] = {
3666 { .name = "tx", .dma_req = 58 + OMAP44XX_DMA_REQ_START }, 3904 { .name = "tx", .dma_req = 58 + OMAP44XX_DMA_REQ_START },
3667 { .name = "rx", .dma_req = 59 + OMAP44XX_DMA_REQ_START }, 3905 { .name = "rx", .dma_req = 59 + OMAP44XX_DMA_REQ_START },
3906 { .dma_req = -1 }
3668}; 3907};
3669 3908
3670static struct omap_hwmod_addr_space omap44xx_mmc5_addrs[] = { 3909static struct omap_hwmod_addr_space omap44xx_mmc5_addrs[] = {
@@ -3673,6 +3912,7 @@ static struct omap_hwmod_addr_space omap44xx_mmc5_addrs[] = {
3673 .pa_end = 0x480d53ff, 3912 .pa_end = 0x480d53ff,
3674 .flags = ADDR_TYPE_RT 3913 .flags = ADDR_TYPE_RT
3675 }, 3914 },
3915 { }
3676}; 3916};
3677 3917
3678/* l4_per -> mmc5 */ 3918/* l4_per -> mmc5 */
@@ -3681,7 +3921,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__mmc5 = {
3681 .slave = &omap44xx_mmc5_hwmod, 3921 .slave = &omap44xx_mmc5_hwmod,
3682 .clk = "l4_div_ck", 3922 .clk = "l4_div_ck",
3683 .addr = omap44xx_mmc5_addrs, 3923 .addr = omap44xx_mmc5_addrs,
3684 .addr_cnt = ARRAY_SIZE(omap44xx_mmc5_addrs),
3685 .user = OCP_USER_MPU | OCP_USER_SDMA, 3924 .user = OCP_USER_MPU | OCP_USER_SDMA,
3686}; 3925};
3687 3926
@@ -3693,14 +3932,15 @@ static struct omap_hwmod_ocp_if *omap44xx_mmc5_slaves[] = {
3693static struct omap_hwmod omap44xx_mmc5_hwmod = { 3932static struct omap_hwmod omap44xx_mmc5_hwmod = {
3694 .name = "mmc5", 3933 .name = "mmc5",
3695 .class = &omap44xx_mmc_hwmod_class, 3934 .class = &omap44xx_mmc_hwmod_class,
3935 .clkdm_name = "l4_per_clkdm",
3696 .mpu_irqs = omap44xx_mmc5_irqs, 3936 .mpu_irqs = omap44xx_mmc5_irqs,
3697 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mmc5_irqs),
3698 .sdma_reqs = omap44xx_mmc5_sdma_reqs, 3937 .sdma_reqs = omap44xx_mmc5_sdma_reqs,
3699 .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_mmc5_sdma_reqs),
3700 .main_clk = "mmc5_fck", 3938 .main_clk = "mmc5_fck",
3701 .prcm = { 3939 .prcm = {
3702 .omap4 = { 3940 .omap4 = {
3703 .clkctrl_reg = OMAP4430_CM_L4PER_MMCSD5_CLKCTRL, 3941 .clkctrl_offs = OMAP4_CM_L4PER_MMCSD5_CLKCTRL_OFFSET,
3942 .context_offs = OMAP4_RM_L4PER_MMCSD5_CONTEXT_OFFSET,
3943 .modulemode = MODULEMODE_SWCTRL,
3704 }, 3944 },
3705 }, 3945 },
3706 .slaves = omap44xx_mmc5_slaves, 3946 .slaves = omap44xx_mmc5_slaves,
@@ -3722,6 +3962,7 @@ static struct omap_hwmod_irq_info omap44xx_mpu_irqs[] = {
3722 { .name = "pl310", .irq = 0 + OMAP44XX_IRQ_GIC_START }, 3962 { .name = "pl310", .irq = 0 + OMAP44XX_IRQ_GIC_START },
3723 { .name = "cti0", .irq = 1 + OMAP44XX_IRQ_GIC_START }, 3963 { .name = "cti0", .irq = 1 + OMAP44XX_IRQ_GIC_START },
3724 { .name = "cti1", .irq = 2 + OMAP44XX_IRQ_GIC_START }, 3964 { .name = "cti1", .irq = 2 + OMAP44XX_IRQ_GIC_START },
3965 { .irq = -1 }
3725}; 3966};
3726 3967
3727/* mpu master ports */ 3968/* mpu master ports */
@@ -3734,13 +3975,14 @@ static struct omap_hwmod_ocp_if *omap44xx_mpu_masters[] = {
3734static struct omap_hwmod omap44xx_mpu_hwmod = { 3975static struct omap_hwmod omap44xx_mpu_hwmod = {
3735 .name = "mpu", 3976 .name = "mpu",
3736 .class = &omap44xx_mpu_hwmod_class, 3977 .class = &omap44xx_mpu_hwmod_class,
3737 .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET), 3978 .clkdm_name = "mpuss_clkdm",
3979 .flags = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET,
3738 .mpu_irqs = omap44xx_mpu_irqs, 3980 .mpu_irqs = omap44xx_mpu_irqs,
3739 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_mpu_irqs),
3740 .main_clk = "dpll_mpu_m2_ck", 3981 .main_clk = "dpll_mpu_m2_ck",
3741 .prcm = { 3982 .prcm = {
3742 .omap4 = { 3983 .omap4 = {
3743 .clkctrl_reg = OMAP4430_CM_MPU_MPU_CLKCTRL, 3984 .clkctrl_offs = OMAP4_CM_MPU_MPU_CLKCTRL_OFFSET,
3985 .context_offs = OMAP4_RM_MPU_MPU_CONTEXT_OFFSET,
3744 }, 3986 },
3745 }, 3987 },
3746 .masters = omap44xx_mpu_masters, 3988 .masters = omap44xx_mpu_masters,
@@ -3778,6 +4020,7 @@ static struct omap_hwmod_class omap44xx_smartreflex_hwmod_class = {
3778static struct omap_hwmod omap44xx_smartreflex_core_hwmod; 4020static struct omap_hwmod omap44xx_smartreflex_core_hwmod;
3779static struct omap_hwmod_irq_info omap44xx_smartreflex_core_irqs[] = { 4021static struct omap_hwmod_irq_info omap44xx_smartreflex_core_irqs[] = {
3780 { .irq = 19 + OMAP44XX_IRQ_GIC_START }, 4022 { .irq = 19 + OMAP44XX_IRQ_GIC_START },
4023 { .irq = -1 }
3781}; 4024};
3782 4025
3783static struct omap_hwmod_addr_space omap44xx_smartreflex_core_addrs[] = { 4026static struct omap_hwmod_addr_space omap44xx_smartreflex_core_addrs[] = {
@@ -3786,6 +4029,7 @@ static struct omap_hwmod_addr_space omap44xx_smartreflex_core_addrs[] = {
3786 .pa_end = 0x4a0dd03f, 4029 .pa_end = 0x4a0dd03f,
3787 .flags = ADDR_TYPE_RT 4030 .flags = ADDR_TYPE_RT
3788 }, 4031 },
4032 { }
3789}; 4033};
3790 4034
3791/* l4_cfg -> smartreflex_core */ 4035/* l4_cfg -> smartreflex_core */
@@ -3794,7 +4038,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_cfg__smartreflex_core = {
3794 .slave = &omap44xx_smartreflex_core_hwmod, 4038 .slave = &omap44xx_smartreflex_core_hwmod,
3795 .clk = "l4_div_ck", 4039 .clk = "l4_div_ck",
3796 .addr = omap44xx_smartreflex_core_addrs, 4040 .addr = omap44xx_smartreflex_core_addrs,
3797 .addr_cnt = ARRAY_SIZE(omap44xx_smartreflex_core_addrs),
3798 .user = OCP_USER_MPU | OCP_USER_SDMA, 4041 .user = OCP_USER_MPU | OCP_USER_SDMA,
3799}; 4042};
3800 4043
@@ -3806,13 +4049,16 @@ static struct omap_hwmod_ocp_if *omap44xx_smartreflex_core_slaves[] = {
3806static struct omap_hwmod omap44xx_smartreflex_core_hwmod = { 4049static struct omap_hwmod omap44xx_smartreflex_core_hwmod = {
3807 .name = "smartreflex_core", 4050 .name = "smartreflex_core",
3808 .class = &omap44xx_smartreflex_hwmod_class, 4051 .class = &omap44xx_smartreflex_hwmod_class,
4052 .clkdm_name = "l4_ao_clkdm",
3809 .mpu_irqs = omap44xx_smartreflex_core_irqs, 4053 .mpu_irqs = omap44xx_smartreflex_core_irqs,
3810 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_smartreflex_core_irqs), 4054
3811 .main_clk = "smartreflex_core_fck", 4055 .main_clk = "smartreflex_core_fck",
3812 .vdd_name = "core", 4056 .vdd_name = "core",
3813 .prcm = { 4057 .prcm = {
3814 .omap4 = { 4058 .omap4 = {
3815 .clkctrl_reg = OMAP4430_CM_ALWON_SR_CORE_CLKCTRL, 4059 .clkctrl_offs = OMAP4_CM_ALWON_SR_CORE_CLKCTRL_OFFSET,
4060 .context_offs = OMAP4_RM_ALWON_SR_CORE_CONTEXT_OFFSET,
4061 .modulemode = MODULEMODE_SWCTRL,
3816 }, 4062 },
3817 }, 4063 },
3818 .slaves = omap44xx_smartreflex_core_slaves, 4064 .slaves = omap44xx_smartreflex_core_slaves,
@@ -3824,6 +4070,7 @@ static struct omap_hwmod omap44xx_smartreflex_core_hwmod = {
3824static struct omap_hwmod omap44xx_smartreflex_iva_hwmod; 4070static struct omap_hwmod omap44xx_smartreflex_iva_hwmod;
3825static struct omap_hwmod_irq_info omap44xx_smartreflex_iva_irqs[] = { 4071static struct omap_hwmod_irq_info omap44xx_smartreflex_iva_irqs[] = {
3826 { .irq = 102 + OMAP44XX_IRQ_GIC_START }, 4072 { .irq = 102 + OMAP44XX_IRQ_GIC_START },
4073 { .irq = -1 }
3827}; 4074};
3828 4075
3829static struct omap_hwmod_addr_space omap44xx_smartreflex_iva_addrs[] = { 4076static struct omap_hwmod_addr_space omap44xx_smartreflex_iva_addrs[] = {
@@ -3832,6 +4079,7 @@ static struct omap_hwmod_addr_space omap44xx_smartreflex_iva_addrs[] = {
3832 .pa_end = 0x4a0db03f, 4079 .pa_end = 0x4a0db03f,
3833 .flags = ADDR_TYPE_RT 4080 .flags = ADDR_TYPE_RT
3834 }, 4081 },
4082 { }
3835}; 4083};
3836 4084
3837/* l4_cfg -> smartreflex_iva */ 4085/* l4_cfg -> smartreflex_iva */
@@ -3840,7 +4088,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_cfg__smartreflex_iva = {
3840 .slave = &omap44xx_smartreflex_iva_hwmod, 4088 .slave = &omap44xx_smartreflex_iva_hwmod,
3841 .clk = "l4_div_ck", 4089 .clk = "l4_div_ck",
3842 .addr = omap44xx_smartreflex_iva_addrs, 4090 .addr = omap44xx_smartreflex_iva_addrs,
3843 .addr_cnt = ARRAY_SIZE(omap44xx_smartreflex_iva_addrs),
3844 .user = OCP_USER_MPU | OCP_USER_SDMA, 4091 .user = OCP_USER_MPU | OCP_USER_SDMA,
3845}; 4092};
3846 4093
@@ -3852,13 +4099,15 @@ static struct omap_hwmod_ocp_if *omap44xx_smartreflex_iva_slaves[] = {
3852static struct omap_hwmod omap44xx_smartreflex_iva_hwmod = { 4099static struct omap_hwmod omap44xx_smartreflex_iva_hwmod = {
3853 .name = "smartreflex_iva", 4100 .name = "smartreflex_iva",
3854 .class = &omap44xx_smartreflex_hwmod_class, 4101 .class = &omap44xx_smartreflex_hwmod_class,
4102 .clkdm_name = "l4_ao_clkdm",
3855 .mpu_irqs = omap44xx_smartreflex_iva_irqs, 4103 .mpu_irqs = omap44xx_smartreflex_iva_irqs,
3856 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_smartreflex_iva_irqs),
3857 .main_clk = "smartreflex_iva_fck", 4104 .main_clk = "smartreflex_iva_fck",
3858 .vdd_name = "iva", 4105 .vdd_name = "iva",
3859 .prcm = { 4106 .prcm = {
3860 .omap4 = { 4107 .omap4 = {
3861 .clkctrl_reg = OMAP4430_CM_ALWON_SR_IVA_CLKCTRL, 4108 .clkctrl_offs = OMAP4_CM_ALWON_SR_IVA_CLKCTRL_OFFSET,
4109 .context_offs = OMAP4_RM_ALWON_SR_IVA_CONTEXT_OFFSET,
4110 .modulemode = MODULEMODE_SWCTRL,
3862 }, 4111 },
3863 }, 4112 },
3864 .slaves = omap44xx_smartreflex_iva_slaves, 4113 .slaves = omap44xx_smartreflex_iva_slaves,
@@ -3870,6 +4119,7 @@ static struct omap_hwmod omap44xx_smartreflex_iva_hwmod = {
3870static struct omap_hwmod omap44xx_smartreflex_mpu_hwmod; 4119static struct omap_hwmod omap44xx_smartreflex_mpu_hwmod;
3871static struct omap_hwmod_irq_info omap44xx_smartreflex_mpu_irqs[] = { 4120static struct omap_hwmod_irq_info omap44xx_smartreflex_mpu_irqs[] = {
3872 { .irq = 18 + OMAP44XX_IRQ_GIC_START }, 4121 { .irq = 18 + OMAP44XX_IRQ_GIC_START },
4122 { .irq = -1 }
3873}; 4123};
3874 4124
3875static struct omap_hwmod_addr_space omap44xx_smartreflex_mpu_addrs[] = { 4125static struct omap_hwmod_addr_space omap44xx_smartreflex_mpu_addrs[] = {
@@ -3878,6 +4128,7 @@ static struct omap_hwmod_addr_space omap44xx_smartreflex_mpu_addrs[] = {
3878 .pa_end = 0x4a0d903f, 4128 .pa_end = 0x4a0d903f,
3879 .flags = ADDR_TYPE_RT 4129 .flags = ADDR_TYPE_RT
3880 }, 4130 },
4131 { }
3881}; 4132};
3882 4133
3883/* l4_cfg -> smartreflex_mpu */ 4134/* l4_cfg -> smartreflex_mpu */
@@ -3886,7 +4137,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_cfg__smartreflex_mpu = {
3886 .slave = &omap44xx_smartreflex_mpu_hwmod, 4137 .slave = &omap44xx_smartreflex_mpu_hwmod,
3887 .clk = "l4_div_ck", 4138 .clk = "l4_div_ck",
3888 .addr = omap44xx_smartreflex_mpu_addrs, 4139 .addr = omap44xx_smartreflex_mpu_addrs,
3889 .addr_cnt = ARRAY_SIZE(omap44xx_smartreflex_mpu_addrs),
3890 .user = OCP_USER_MPU | OCP_USER_SDMA, 4140 .user = OCP_USER_MPU | OCP_USER_SDMA,
3891}; 4141};
3892 4142
@@ -3898,13 +4148,15 @@ static struct omap_hwmod_ocp_if *omap44xx_smartreflex_mpu_slaves[] = {
3898static struct omap_hwmod omap44xx_smartreflex_mpu_hwmod = { 4148static struct omap_hwmod omap44xx_smartreflex_mpu_hwmod = {
3899 .name = "smartreflex_mpu", 4149 .name = "smartreflex_mpu",
3900 .class = &omap44xx_smartreflex_hwmod_class, 4150 .class = &omap44xx_smartreflex_hwmod_class,
4151 .clkdm_name = "l4_ao_clkdm",
3901 .mpu_irqs = omap44xx_smartreflex_mpu_irqs, 4152 .mpu_irqs = omap44xx_smartreflex_mpu_irqs,
3902 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_smartreflex_mpu_irqs),
3903 .main_clk = "smartreflex_mpu_fck", 4153 .main_clk = "smartreflex_mpu_fck",
3904 .vdd_name = "mpu", 4154 .vdd_name = "mpu",
3905 .prcm = { 4155 .prcm = {
3906 .omap4 = { 4156 .omap4 = {
3907 .clkctrl_reg = OMAP4430_CM_ALWON_SR_MPU_CLKCTRL, 4157 .clkctrl_offs = OMAP4_CM_ALWON_SR_MPU_CLKCTRL_OFFSET,
4158 .context_offs = OMAP4_RM_ALWON_SR_MPU_CONTEXT_OFFSET,
4159 .modulemode = MODULEMODE_SWCTRL,
3908 }, 4160 },
3909 }, 4161 },
3910 .slaves = omap44xx_smartreflex_mpu_slaves, 4162 .slaves = omap44xx_smartreflex_mpu_slaves,
@@ -3943,6 +4195,7 @@ static struct omap_hwmod_addr_space omap44xx_spinlock_addrs[] = {
3943 .pa_end = 0x4a0f6fff, 4195 .pa_end = 0x4a0f6fff,
3944 .flags = ADDR_TYPE_RT 4196 .flags = ADDR_TYPE_RT
3945 }, 4197 },
4198 { }
3946}; 4199};
3947 4200
3948/* l4_cfg -> spinlock */ 4201/* l4_cfg -> spinlock */
@@ -3951,7 +4204,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_cfg__spinlock = {
3951 .slave = &omap44xx_spinlock_hwmod, 4204 .slave = &omap44xx_spinlock_hwmod,
3952 .clk = "l4_div_ck", 4205 .clk = "l4_div_ck",
3953 .addr = omap44xx_spinlock_addrs, 4206 .addr = omap44xx_spinlock_addrs,
3954 .addr_cnt = ARRAY_SIZE(omap44xx_spinlock_addrs),
3955 .user = OCP_USER_MPU | OCP_USER_SDMA, 4207 .user = OCP_USER_MPU | OCP_USER_SDMA,
3956}; 4208};
3957 4209
@@ -3963,9 +4215,11 @@ static struct omap_hwmod_ocp_if *omap44xx_spinlock_slaves[] = {
3963static struct omap_hwmod omap44xx_spinlock_hwmod = { 4215static struct omap_hwmod omap44xx_spinlock_hwmod = {
3964 .name = "spinlock", 4216 .name = "spinlock",
3965 .class = &omap44xx_spinlock_hwmod_class, 4217 .class = &omap44xx_spinlock_hwmod_class,
4218 .clkdm_name = "l4_cfg_clkdm",
3966 .prcm = { 4219 .prcm = {
3967 .omap4 = { 4220 .omap4 = {
3968 .clkctrl_reg = OMAP4430_CM_L4CFG_HW_SEM_CLKCTRL, 4221 .clkctrl_offs = OMAP4_CM_L4CFG_HW_SEM_CLKCTRL_OFFSET,
4222 .context_offs = OMAP4_RM_L4CFG_HW_SEM_CONTEXT_OFFSET,
3969 }, 4223 },
3970 }, 4224 },
3971 .slaves = omap44xx_spinlock_slaves, 4225 .slaves = omap44xx_spinlock_slaves,
@@ -4015,6 +4269,7 @@ static struct omap_hwmod_class omap44xx_timer_hwmod_class = {
4015static struct omap_hwmod omap44xx_timer1_hwmod; 4269static struct omap_hwmod omap44xx_timer1_hwmod;
4016static struct omap_hwmod_irq_info omap44xx_timer1_irqs[] = { 4270static struct omap_hwmod_irq_info omap44xx_timer1_irqs[] = {
4017 { .irq = 37 + OMAP44XX_IRQ_GIC_START }, 4271 { .irq = 37 + OMAP44XX_IRQ_GIC_START },
4272 { .irq = -1 }
4018}; 4273};
4019 4274
4020static struct omap_hwmod_addr_space omap44xx_timer1_addrs[] = { 4275static struct omap_hwmod_addr_space omap44xx_timer1_addrs[] = {
@@ -4023,6 +4278,7 @@ static struct omap_hwmod_addr_space omap44xx_timer1_addrs[] = {
4023 .pa_end = 0x4a31807f, 4278 .pa_end = 0x4a31807f,
4024 .flags = ADDR_TYPE_RT 4279 .flags = ADDR_TYPE_RT
4025 }, 4280 },
4281 { }
4026}; 4282};
4027 4283
4028/* l4_wkup -> timer1 */ 4284/* l4_wkup -> timer1 */
@@ -4031,7 +4287,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_wkup__timer1 = {
4031 .slave = &omap44xx_timer1_hwmod, 4287 .slave = &omap44xx_timer1_hwmod,
4032 .clk = "l4_wkup_clk_mux_ck", 4288 .clk = "l4_wkup_clk_mux_ck",
4033 .addr = omap44xx_timer1_addrs, 4289 .addr = omap44xx_timer1_addrs,
4034 .addr_cnt = ARRAY_SIZE(omap44xx_timer1_addrs),
4035 .user = OCP_USER_MPU | OCP_USER_SDMA, 4290 .user = OCP_USER_MPU | OCP_USER_SDMA,
4036}; 4291};
4037 4292
@@ -4043,12 +4298,14 @@ static struct omap_hwmod_ocp_if *omap44xx_timer1_slaves[] = {
4043static struct omap_hwmod omap44xx_timer1_hwmod = { 4298static struct omap_hwmod omap44xx_timer1_hwmod = {
4044 .name = "timer1", 4299 .name = "timer1",
4045 .class = &omap44xx_timer_1ms_hwmod_class, 4300 .class = &omap44xx_timer_1ms_hwmod_class,
4301 .clkdm_name = "l4_wkup_clkdm",
4046 .mpu_irqs = omap44xx_timer1_irqs, 4302 .mpu_irqs = omap44xx_timer1_irqs,
4047 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_timer1_irqs),
4048 .main_clk = "timer1_fck", 4303 .main_clk = "timer1_fck",
4049 .prcm = { 4304 .prcm = {
4050 .omap4 = { 4305 .omap4 = {
4051 .clkctrl_reg = OMAP4430_CM_WKUP_TIMER1_CLKCTRL, 4306 .clkctrl_offs = OMAP4_CM_WKUP_TIMER1_CLKCTRL_OFFSET,
4307 .context_offs = OMAP4_RM_WKUP_TIMER1_CONTEXT_OFFSET,
4308 .modulemode = MODULEMODE_SWCTRL,
4052 }, 4309 },
4053 }, 4310 },
4054 .slaves = omap44xx_timer1_slaves, 4311 .slaves = omap44xx_timer1_slaves,
@@ -4060,6 +4317,7 @@ static struct omap_hwmod omap44xx_timer1_hwmod = {
4060static struct omap_hwmod omap44xx_timer2_hwmod; 4317static struct omap_hwmod omap44xx_timer2_hwmod;
4061static struct omap_hwmod_irq_info omap44xx_timer2_irqs[] = { 4318static struct omap_hwmod_irq_info omap44xx_timer2_irqs[] = {
4062 { .irq = 38 + OMAP44XX_IRQ_GIC_START }, 4319 { .irq = 38 + OMAP44XX_IRQ_GIC_START },
4320 { .irq = -1 }
4063}; 4321};
4064 4322
4065static struct omap_hwmod_addr_space omap44xx_timer2_addrs[] = { 4323static struct omap_hwmod_addr_space omap44xx_timer2_addrs[] = {
@@ -4068,6 +4326,7 @@ static struct omap_hwmod_addr_space omap44xx_timer2_addrs[] = {
4068 .pa_end = 0x4803207f, 4326 .pa_end = 0x4803207f,
4069 .flags = ADDR_TYPE_RT 4327 .flags = ADDR_TYPE_RT
4070 }, 4328 },
4329 { }
4071}; 4330};
4072 4331
4073/* l4_per -> timer2 */ 4332/* l4_per -> timer2 */
@@ -4076,7 +4335,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__timer2 = {
4076 .slave = &omap44xx_timer2_hwmod, 4335 .slave = &omap44xx_timer2_hwmod,
4077 .clk = "l4_div_ck", 4336 .clk = "l4_div_ck",
4078 .addr = omap44xx_timer2_addrs, 4337 .addr = omap44xx_timer2_addrs,
4079 .addr_cnt = ARRAY_SIZE(omap44xx_timer2_addrs),
4080 .user = OCP_USER_MPU | OCP_USER_SDMA, 4338 .user = OCP_USER_MPU | OCP_USER_SDMA,
4081}; 4339};
4082 4340
@@ -4088,12 +4346,14 @@ static struct omap_hwmod_ocp_if *omap44xx_timer2_slaves[] = {
4088static struct omap_hwmod omap44xx_timer2_hwmod = { 4346static struct omap_hwmod omap44xx_timer2_hwmod = {
4089 .name = "timer2", 4347 .name = "timer2",
4090 .class = &omap44xx_timer_1ms_hwmod_class, 4348 .class = &omap44xx_timer_1ms_hwmod_class,
4349 .clkdm_name = "l4_per_clkdm",
4091 .mpu_irqs = omap44xx_timer2_irqs, 4350 .mpu_irqs = omap44xx_timer2_irqs,
4092 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_timer2_irqs),
4093 .main_clk = "timer2_fck", 4351 .main_clk = "timer2_fck",
4094 .prcm = { 4352 .prcm = {
4095 .omap4 = { 4353 .omap4 = {
4096 .clkctrl_reg = OMAP4430_CM_L4PER_DMTIMER2_CLKCTRL, 4354 .clkctrl_offs = OMAP4_CM_L4PER_DMTIMER2_CLKCTRL_OFFSET,
4355 .context_offs = OMAP4_RM_L4PER_DMTIMER2_CONTEXT_OFFSET,
4356 .modulemode = MODULEMODE_SWCTRL,
4097 }, 4357 },
4098 }, 4358 },
4099 .slaves = omap44xx_timer2_slaves, 4359 .slaves = omap44xx_timer2_slaves,
@@ -4105,6 +4365,7 @@ static struct omap_hwmod omap44xx_timer2_hwmod = {
4105static struct omap_hwmod omap44xx_timer3_hwmod; 4365static struct omap_hwmod omap44xx_timer3_hwmod;
4106static struct omap_hwmod_irq_info omap44xx_timer3_irqs[] = { 4366static struct omap_hwmod_irq_info omap44xx_timer3_irqs[] = {
4107 { .irq = 39 + OMAP44XX_IRQ_GIC_START }, 4367 { .irq = 39 + OMAP44XX_IRQ_GIC_START },
4368 { .irq = -1 }
4108}; 4369};
4109 4370
4110static struct omap_hwmod_addr_space omap44xx_timer3_addrs[] = { 4371static struct omap_hwmod_addr_space omap44xx_timer3_addrs[] = {
@@ -4113,6 +4374,7 @@ static struct omap_hwmod_addr_space omap44xx_timer3_addrs[] = {
4113 .pa_end = 0x4803407f, 4374 .pa_end = 0x4803407f,
4114 .flags = ADDR_TYPE_RT 4375 .flags = ADDR_TYPE_RT
4115 }, 4376 },
4377 { }
4116}; 4378};
4117 4379
4118/* l4_per -> timer3 */ 4380/* l4_per -> timer3 */
@@ -4121,7 +4383,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__timer3 = {
4121 .slave = &omap44xx_timer3_hwmod, 4383 .slave = &omap44xx_timer3_hwmod,
4122 .clk = "l4_div_ck", 4384 .clk = "l4_div_ck",
4123 .addr = omap44xx_timer3_addrs, 4385 .addr = omap44xx_timer3_addrs,
4124 .addr_cnt = ARRAY_SIZE(omap44xx_timer3_addrs),
4125 .user = OCP_USER_MPU | OCP_USER_SDMA, 4386 .user = OCP_USER_MPU | OCP_USER_SDMA,
4126}; 4387};
4127 4388
@@ -4133,12 +4394,14 @@ static struct omap_hwmod_ocp_if *omap44xx_timer3_slaves[] = {
4133static struct omap_hwmod omap44xx_timer3_hwmod = { 4394static struct omap_hwmod omap44xx_timer3_hwmod = {
4134 .name = "timer3", 4395 .name = "timer3",
4135 .class = &omap44xx_timer_hwmod_class, 4396 .class = &omap44xx_timer_hwmod_class,
4397 .clkdm_name = "l4_per_clkdm",
4136 .mpu_irqs = omap44xx_timer3_irqs, 4398 .mpu_irqs = omap44xx_timer3_irqs,
4137 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_timer3_irqs),
4138 .main_clk = "timer3_fck", 4399 .main_clk = "timer3_fck",
4139 .prcm = { 4400 .prcm = {
4140 .omap4 = { 4401 .omap4 = {
4141 .clkctrl_reg = OMAP4430_CM_L4PER_DMTIMER3_CLKCTRL, 4402 .clkctrl_offs = OMAP4_CM_L4PER_DMTIMER3_CLKCTRL_OFFSET,
4403 .context_offs = OMAP4_RM_L4PER_DMTIMER3_CONTEXT_OFFSET,
4404 .modulemode = MODULEMODE_SWCTRL,
4142 }, 4405 },
4143 }, 4406 },
4144 .slaves = omap44xx_timer3_slaves, 4407 .slaves = omap44xx_timer3_slaves,
@@ -4150,6 +4413,7 @@ static struct omap_hwmod omap44xx_timer3_hwmod = {
4150static struct omap_hwmod omap44xx_timer4_hwmod; 4413static struct omap_hwmod omap44xx_timer4_hwmod;
4151static struct omap_hwmod_irq_info omap44xx_timer4_irqs[] = { 4414static struct omap_hwmod_irq_info omap44xx_timer4_irqs[] = {
4152 { .irq = 40 + OMAP44XX_IRQ_GIC_START }, 4415 { .irq = 40 + OMAP44XX_IRQ_GIC_START },
4416 { .irq = -1 }
4153}; 4417};
4154 4418
4155static struct omap_hwmod_addr_space omap44xx_timer4_addrs[] = { 4419static struct omap_hwmod_addr_space omap44xx_timer4_addrs[] = {
@@ -4158,6 +4422,7 @@ static struct omap_hwmod_addr_space omap44xx_timer4_addrs[] = {
4158 .pa_end = 0x4803607f, 4422 .pa_end = 0x4803607f,
4159 .flags = ADDR_TYPE_RT 4423 .flags = ADDR_TYPE_RT
4160 }, 4424 },
4425 { }
4161}; 4426};
4162 4427
4163/* l4_per -> timer4 */ 4428/* l4_per -> timer4 */
@@ -4166,7 +4431,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__timer4 = {
4166 .slave = &omap44xx_timer4_hwmod, 4431 .slave = &omap44xx_timer4_hwmod,
4167 .clk = "l4_div_ck", 4432 .clk = "l4_div_ck",
4168 .addr = omap44xx_timer4_addrs, 4433 .addr = omap44xx_timer4_addrs,
4169 .addr_cnt = ARRAY_SIZE(omap44xx_timer4_addrs),
4170 .user = OCP_USER_MPU | OCP_USER_SDMA, 4434 .user = OCP_USER_MPU | OCP_USER_SDMA,
4171}; 4435};
4172 4436
@@ -4178,12 +4442,14 @@ static struct omap_hwmod_ocp_if *omap44xx_timer4_slaves[] = {
4178static struct omap_hwmod omap44xx_timer4_hwmod = { 4442static struct omap_hwmod omap44xx_timer4_hwmod = {
4179 .name = "timer4", 4443 .name = "timer4",
4180 .class = &omap44xx_timer_hwmod_class, 4444 .class = &omap44xx_timer_hwmod_class,
4445 .clkdm_name = "l4_per_clkdm",
4181 .mpu_irqs = omap44xx_timer4_irqs, 4446 .mpu_irqs = omap44xx_timer4_irqs,
4182 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_timer4_irqs),
4183 .main_clk = "timer4_fck", 4447 .main_clk = "timer4_fck",
4184 .prcm = { 4448 .prcm = {
4185 .omap4 = { 4449 .omap4 = {
4186 .clkctrl_reg = OMAP4430_CM_L4PER_DMTIMER4_CLKCTRL, 4450 .clkctrl_offs = OMAP4_CM_L4PER_DMTIMER4_CLKCTRL_OFFSET,
4451 .context_offs = OMAP4_RM_L4PER_DMTIMER4_CONTEXT_OFFSET,
4452 .modulemode = MODULEMODE_SWCTRL,
4187 }, 4453 },
4188 }, 4454 },
4189 .slaves = omap44xx_timer4_slaves, 4455 .slaves = omap44xx_timer4_slaves,
@@ -4195,6 +4461,7 @@ static struct omap_hwmod omap44xx_timer4_hwmod = {
4195static struct omap_hwmod omap44xx_timer5_hwmod; 4461static struct omap_hwmod omap44xx_timer5_hwmod;
4196static struct omap_hwmod_irq_info omap44xx_timer5_irqs[] = { 4462static struct omap_hwmod_irq_info omap44xx_timer5_irqs[] = {
4197 { .irq = 41 + OMAP44XX_IRQ_GIC_START }, 4463 { .irq = 41 + OMAP44XX_IRQ_GIC_START },
4464 { .irq = -1 }
4198}; 4465};
4199 4466
4200static struct omap_hwmod_addr_space omap44xx_timer5_addrs[] = { 4467static struct omap_hwmod_addr_space omap44xx_timer5_addrs[] = {
@@ -4203,6 +4470,7 @@ static struct omap_hwmod_addr_space omap44xx_timer5_addrs[] = {
4203 .pa_end = 0x4013807f, 4470 .pa_end = 0x4013807f,
4204 .flags = ADDR_TYPE_RT 4471 .flags = ADDR_TYPE_RT
4205 }, 4472 },
4473 { }
4206}; 4474};
4207 4475
4208/* l4_abe -> timer5 */ 4476/* l4_abe -> timer5 */
@@ -4211,7 +4479,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer5 = {
4211 .slave = &omap44xx_timer5_hwmod, 4479 .slave = &omap44xx_timer5_hwmod,
4212 .clk = "ocp_abe_iclk", 4480 .clk = "ocp_abe_iclk",
4213 .addr = omap44xx_timer5_addrs, 4481 .addr = omap44xx_timer5_addrs,
4214 .addr_cnt = ARRAY_SIZE(omap44xx_timer5_addrs),
4215 .user = OCP_USER_MPU, 4482 .user = OCP_USER_MPU,
4216}; 4483};
4217 4484
@@ -4221,6 +4488,7 @@ static struct omap_hwmod_addr_space omap44xx_timer5_dma_addrs[] = {
4221 .pa_end = 0x4903807f, 4488 .pa_end = 0x4903807f,
4222 .flags = ADDR_TYPE_RT 4489 .flags = ADDR_TYPE_RT
4223 }, 4490 },
4491 { }
4224}; 4492};
4225 4493
4226/* l4_abe -> timer5 (dma) */ 4494/* l4_abe -> timer5 (dma) */
@@ -4229,7 +4497,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer5_dma = {
4229 .slave = &omap44xx_timer5_hwmod, 4497 .slave = &omap44xx_timer5_hwmod,
4230 .clk = "ocp_abe_iclk", 4498 .clk = "ocp_abe_iclk",
4231 .addr = omap44xx_timer5_dma_addrs, 4499 .addr = omap44xx_timer5_dma_addrs,
4232 .addr_cnt = ARRAY_SIZE(omap44xx_timer5_dma_addrs),
4233 .user = OCP_USER_SDMA, 4500 .user = OCP_USER_SDMA,
4234}; 4501};
4235 4502
@@ -4242,12 +4509,14 @@ static struct omap_hwmod_ocp_if *omap44xx_timer5_slaves[] = {
4242static struct omap_hwmod omap44xx_timer5_hwmod = { 4509static struct omap_hwmod omap44xx_timer5_hwmod = {
4243 .name = "timer5", 4510 .name = "timer5",
4244 .class = &omap44xx_timer_hwmod_class, 4511 .class = &omap44xx_timer_hwmod_class,
4512 .clkdm_name = "abe_clkdm",
4245 .mpu_irqs = omap44xx_timer5_irqs, 4513 .mpu_irqs = omap44xx_timer5_irqs,
4246 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_timer5_irqs),
4247 .main_clk = "timer5_fck", 4514 .main_clk = "timer5_fck",
4248 .prcm = { 4515 .prcm = {
4249 .omap4 = { 4516 .omap4 = {
4250 .clkctrl_reg = OMAP4430_CM1_ABE_TIMER5_CLKCTRL, 4517 .clkctrl_offs = OMAP4_CM1_ABE_TIMER5_CLKCTRL_OFFSET,
4518 .context_offs = OMAP4_RM_ABE_TIMER5_CONTEXT_OFFSET,
4519 .modulemode = MODULEMODE_SWCTRL,
4251 }, 4520 },
4252 }, 4521 },
4253 .slaves = omap44xx_timer5_slaves, 4522 .slaves = omap44xx_timer5_slaves,
@@ -4259,6 +4528,7 @@ static struct omap_hwmod omap44xx_timer5_hwmod = {
4259static struct omap_hwmod omap44xx_timer6_hwmod; 4528static struct omap_hwmod omap44xx_timer6_hwmod;
4260static struct omap_hwmod_irq_info omap44xx_timer6_irqs[] = { 4529static struct omap_hwmod_irq_info omap44xx_timer6_irqs[] = {
4261 { .irq = 42 + OMAP44XX_IRQ_GIC_START }, 4530 { .irq = 42 + OMAP44XX_IRQ_GIC_START },
4531 { .irq = -1 }
4262}; 4532};
4263 4533
4264static struct omap_hwmod_addr_space omap44xx_timer6_addrs[] = { 4534static struct omap_hwmod_addr_space omap44xx_timer6_addrs[] = {
@@ -4267,6 +4537,7 @@ static struct omap_hwmod_addr_space omap44xx_timer6_addrs[] = {
4267 .pa_end = 0x4013a07f, 4537 .pa_end = 0x4013a07f,
4268 .flags = ADDR_TYPE_RT 4538 .flags = ADDR_TYPE_RT
4269 }, 4539 },
4540 { }
4270}; 4541};
4271 4542
4272/* l4_abe -> timer6 */ 4543/* l4_abe -> timer6 */
@@ -4275,7 +4546,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer6 = {
4275 .slave = &omap44xx_timer6_hwmod, 4546 .slave = &omap44xx_timer6_hwmod,
4276 .clk = "ocp_abe_iclk", 4547 .clk = "ocp_abe_iclk",
4277 .addr = omap44xx_timer6_addrs, 4548 .addr = omap44xx_timer6_addrs,
4278 .addr_cnt = ARRAY_SIZE(omap44xx_timer6_addrs),
4279 .user = OCP_USER_MPU, 4549 .user = OCP_USER_MPU,
4280}; 4550};
4281 4551
@@ -4285,6 +4555,7 @@ static struct omap_hwmod_addr_space omap44xx_timer6_dma_addrs[] = {
4285 .pa_end = 0x4903a07f, 4555 .pa_end = 0x4903a07f,
4286 .flags = ADDR_TYPE_RT 4556 .flags = ADDR_TYPE_RT
4287 }, 4557 },
4558 { }
4288}; 4559};
4289 4560
4290/* l4_abe -> timer6 (dma) */ 4561/* l4_abe -> timer6 (dma) */
@@ -4293,7 +4564,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer6_dma = {
4293 .slave = &omap44xx_timer6_hwmod, 4564 .slave = &omap44xx_timer6_hwmod,
4294 .clk = "ocp_abe_iclk", 4565 .clk = "ocp_abe_iclk",
4295 .addr = omap44xx_timer6_dma_addrs, 4566 .addr = omap44xx_timer6_dma_addrs,
4296 .addr_cnt = ARRAY_SIZE(omap44xx_timer6_dma_addrs),
4297 .user = OCP_USER_SDMA, 4567 .user = OCP_USER_SDMA,
4298}; 4568};
4299 4569
@@ -4306,12 +4576,15 @@ static struct omap_hwmod_ocp_if *omap44xx_timer6_slaves[] = {
4306static struct omap_hwmod omap44xx_timer6_hwmod = { 4576static struct omap_hwmod omap44xx_timer6_hwmod = {
4307 .name = "timer6", 4577 .name = "timer6",
4308 .class = &omap44xx_timer_hwmod_class, 4578 .class = &omap44xx_timer_hwmod_class,
4579 .clkdm_name = "abe_clkdm",
4309 .mpu_irqs = omap44xx_timer6_irqs, 4580 .mpu_irqs = omap44xx_timer6_irqs,
4310 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_timer6_irqs), 4581
4311 .main_clk = "timer6_fck", 4582 .main_clk = "timer6_fck",
4312 .prcm = { 4583 .prcm = {
4313 .omap4 = { 4584 .omap4 = {
4314 .clkctrl_reg = OMAP4430_CM1_ABE_TIMER6_CLKCTRL, 4585 .clkctrl_offs = OMAP4_CM1_ABE_TIMER6_CLKCTRL_OFFSET,
4586 .context_offs = OMAP4_RM_ABE_TIMER6_CONTEXT_OFFSET,
4587 .modulemode = MODULEMODE_SWCTRL,
4315 }, 4588 },
4316 }, 4589 },
4317 .slaves = omap44xx_timer6_slaves, 4590 .slaves = omap44xx_timer6_slaves,
@@ -4323,6 +4596,7 @@ static struct omap_hwmod omap44xx_timer6_hwmod = {
4323static struct omap_hwmod omap44xx_timer7_hwmod; 4596static struct omap_hwmod omap44xx_timer7_hwmod;
4324static struct omap_hwmod_irq_info omap44xx_timer7_irqs[] = { 4597static struct omap_hwmod_irq_info omap44xx_timer7_irqs[] = {
4325 { .irq = 43 + OMAP44XX_IRQ_GIC_START }, 4598 { .irq = 43 + OMAP44XX_IRQ_GIC_START },
4599 { .irq = -1 }
4326}; 4600};
4327 4601
4328static struct omap_hwmod_addr_space omap44xx_timer7_addrs[] = { 4602static struct omap_hwmod_addr_space omap44xx_timer7_addrs[] = {
@@ -4331,6 +4605,7 @@ static struct omap_hwmod_addr_space omap44xx_timer7_addrs[] = {
4331 .pa_end = 0x4013c07f, 4605 .pa_end = 0x4013c07f,
4332 .flags = ADDR_TYPE_RT 4606 .flags = ADDR_TYPE_RT
4333 }, 4607 },
4608 { }
4334}; 4609};
4335 4610
4336/* l4_abe -> timer7 */ 4611/* l4_abe -> timer7 */
@@ -4339,7 +4614,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer7 = {
4339 .slave = &omap44xx_timer7_hwmod, 4614 .slave = &omap44xx_timer7_hwmod,
4340 .clk = "ocp_abe_iclk", 4615 .clk = "ocp_abe_iclk",
4341 .addr = omap44xx_timer7_addrs, 4616 .addr = omap44xx_timer7_addrs,
4342 .addr_cnt = ARRAY_SIZE(omap44xx_timer7_addrs),
4343 .user = OCP_USER_MPU, 4617 .user = OCP_USER_MPU,
4344}; 4618};
4345 4619
@@ -4349,6 +4623,7 @@ static struct omap_hwmod_addr_space omap44xx_timer7_dma_addrs[] = {
4349 .pa_end = 0x4903c07f, 4623 .pa_end = 0x4903c07f,
4350 .flags = ADDR_TYPE_RT 4624 .flags = ADDR_TYPE_RT
4351 }, 4625 },
4626 { }
4352}; 4627};
4353 4628
4354/* l4_abe -> timer7 (dma) */ 4629/* l4_abe -> timer7 (dma) */
@@ -4357,7 +4632,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer7_dma = {
4357 .slave = &omap44xx_timer7_hwmod, 4632 .slave = &omap44xx_timer7_hwmod,
4358 .clk = "ocp_abe_iclk", 4633 .clk = "ocp_abe_iclk",
4359 .addr = omap44xx_timer7_dma_addrs, 4634 .addr = omap44xx_timer7_dma_addrs,
4360 .addr_cnt = ARRAY_SIZE(omap44xx_timer7_dma_addrs),
4361 .user = OCP_USER_SDMA, 4635 .user = OCP_USER_SDMA,
4362}; 4636};
4363 4637
@@ -4370,12 +4644,14 @@ static struct omap_hwmod_ocp_if *omap44xx_timer7_slaves[] = {
4370static struct omap_hwmod omap44xx_timer7_hwmod = { 4644static struct omap_hwmod omap44xx_timer7_hwmod = {
4371 .name = "timer7", 4645 .name = "timer7",
4372 .class = &omap44xx_timer_hwmod_class, 4646 .class = &omap44xx_timer_hwmod_class,
4647 .clkdm_name = "abe_clkdm",
4373 .mpu_irqs = omap44xx_timer7_irqs, 4648 .mpu_irqs = omap44xx_timer7_irqs,
4374 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_timer7_irqs),
4375 .main_clk = "timer7_fck", 4649 .main_clk = "timer7_fck",
4376 .prcm = { 4650 .prcm = {
4377 .omap4 = { 4651 .omap4 = {
4378 .clkctrl_reg = OMAP4430_CM1_ABE_TIMER7_CLKCTRL, 4652 .clkctrl_offs = OMAP4_CM1_ABE_TIMER7_CLKCTRL_OFFSET,
4653 .context_offs = OMAP4_RM_ABE_TIMER7_CONTEXT_OFFSET,
4654 .modulemode = MODULEMODE_SWCTRL,
4379 }, 4655 },
4380 }, 4656 },
4381 .slaves = omap44xx_timer7_slaves, 4657 .slaves = omap44xx_timer7_slaves,
@@ -4387,6 +4663,7 @@ static struct omap_hwmod omap44xx_timer7_hwmod = {
4387static struct omap_hwmod omap44xx_timer8_hwmod; 4663static struct omap_hwmod omap44xx_timer8_hwmod;
4388static struct omap_hwmod_irq_info omap44xx_timer8_irqs[] = { 4664static struct omap_hwmod_irq_info omap44xx_timer8_irqs[] = {
4389 { .irq = 44 + OMAP44XX_IRQ_GIC_START }, 4665 { .irq = 44 + OMAP44XX_IRQ_GIC_START },
4666 { .irq = -1 }
4390}; 4667};
4391 4668
4392static struct omap_hwmod_addr_space omap44xx_timer8_addrs[] = { 4669static struct omap_hwmod_addr_space omap44xx_timer8_addrs[] = {
@@ -4395,6 +4672,7 @@ static struct omap_hwmod_addr_space omap44xx_timer8_addrs[] = {
4395 .pa_end = 0x4013e07f, 4672 .pa_end = 0x4013e07f,
4396 .flags = ADDR_TYPE_RT 4673 .flags = ADDR_TYPE_RT
4397 }, 4674 },
4675 { }
4398}; 4676};
4399 4677
4400/* l4_abe -> timer8 */ 4678/* l4_abe -> timer8 */
@@ -4403,7 +4681,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer8 = {
4403 .slave = &omap44xx_timer8_hwmod, 4681 .slave = &omap44xx_timer8_hwmod,
4404 .clk = "ocp_abe_iclk", 4682 .clk = "ocp_abe_iclk",
4405 .addr = omap44xx_timer8_addrs, 4683 .addr = omap44xx_timer8_addrs,
4406 .addr_cnt = ARRAY_SIZE(omap44xx_timer8_addrs),
4407 .user = OCP_USER_MPU, 4684 .user = OCP_USER_MPU,
4408}; 4685};
4409 4686
@@ -4413,6 +4690,7 @@ static struct omap_hwmod_addr_space omap44xx_timer8_dma_addrs[] = {
4413 .pa_end = 0x4903e07f, 4690 .pa_end = 0x4903e07f,
4414 .flags = ADDR_TYPE_RT 4691 .flags = ADDR_TYPE_RT
4415 }, 4692 },
4693 { }
4416}; 4694};
4417 4695
4418/* l4_abe -> timer8 (dma) */ 4696/* l4_abe -> timer8 (dma) */
@@ -4421,7 +4699,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__timer8_dma = {
4421 .slave = &omap44xx_timer8_hwmod, 4699 .slave = &omap44xx_timer8_hwmod,
4422 .clk = "ocp_abe_iclk", 4700 .clk = "ocp_abe_iclk",
4423 .addr = omap44xx_timer8_dma_addrs, 4701 .addr = omap44xx_timer8_dma_addrs,
4424 .addr_cnt = ARRAY_SIZE(omap44xx_timer8_dma_addrs),
4425 .user = OCP_USER_SDMA, 4702 .user = OCP_USER_SDMA,
4426}; 4703};
4427 4704
@@ -4434,12 +4711,14 @@ static struct omap_hwmod_ocp_if *omap44xx_timer8_slaves[] = {
4434static struct omap_hwmod omap44xx_timer8_hwmod = { 4711static struct omap_hwmod omap44xx_timer8_hwmod = {
4435 .name = "timer8", 4712 .name = "timer8",
4436 .class = &omap44xx_timer_hwmod_class, 4713 .class = &omap44xx_timer_hwmod_class,
4714 .clkdm_name = "abe_clkdm",
4437 .mpu_irqs = omap44xx_timer8_irqs, 4715 .mpu_irqs = omap44xx_timer8_irqs,
4438 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_timer8_irqs),
4439 .main_clk = "timer8_fck", 4716 .main_clk = "timer8_fck",
4440 .prcm = { 4717 .prcm = {
4441 .omap4 = { 4718 .omap4 = {
4442 .clkctrl_reg = OMAP4430_CM1_ABE_TIMER8_CLKCTRL, 4719 .clkctrl_offs = OMAP4_CM1_ABE_TIMER8_CLKCTRL_OFFSET,
4720 .context_offs = OMAP4_RM_ABE_TIMER8_CONTEXT_OFFSET,
4721 .modulemode = MODULEMODE_SWCTRL,
4443 }, 4722 },
4444 }, 4723 },
4445 .slaves = omap44xx_timer8_slaves, 4724 .slaves = omap44xx_timer8_slaves,
@@ -4451,6 +4730,7 @@ static struct omap_hwmod omap44xx_timer8_hwmod = {
4451static struct omap_hwmod omap44xx_timer9_hwmod; 4730static struct omap_hwmod omap44xx_timer9_hwmod;
4452static struct omap_hwmod_irq_info omap44xx_timer9_irqs[] = { 4731static struct omap_hwmod_irq_info omap44xx_timer9_irqs[] = {
4453 { .irq = 45 + OMAP44XX_IRQ_GIC_START }, 4732 { .irq = 45 + OMAP44XX_IRQ_GIC_START },
4733 { .irq = -1 }
4454}; 4734};
4455 4735
4456static struct omap_hwmod_addr_space omap44xx_timer9_addrs[] = { 4736static struct omap_hwmod_addr_space omap44xx_timer9_addrs[] = {
@@ -4459,6 +4739,7 @@ static struct omap_hwmod_addr_space omap44xx_timer9_addrs[] = {
4459 .pa_end = 0x4803e07f, 4739 .pa_end = 0x4803e07f,
4460 .flags = ADDR_TYPE_RT 4740 .flags = ADDR_TYPE_RT
4461 }, 4741 },
4742 { }
4462}; 4743};
4463 4744
4464/* l4_per -> timer9 */ 4745/* l4_per -> timer9 */
@@ -4467,7 +4748,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__timer9 = {
4467 .slave = &omap44xx_timer9_hwmod, 4748 .slave = &omap44xx_timer9_hwmod,
4468 .clk = "l4_div_ck", 4749 .clk = "l4_div_ck",
4469 .addr = omap44xx_timer9_addrs, 4750 .addr = omap44xx_timer9_addrs,
4470 .addr_cnt = ARRAY_SIZE(omap44xx_timer9_addrs),
4471 .user = OCP_USER_MPU | OCP_USER_SDMA, 4751 .user = OCP_USER_MPU | OCP_USER_SDMA,
4472}; 4752};
4473 4753
@@ -4479,12 +4759,14 @@ static struct omap_hwmod_ocp_if *omap44xx_timer9_slaves[] = {
4479static struct omap_hwmod omap44xx_timer9_hwmod = { 4759static struct omap_hwmod omap44xx_timer9_hwmod = {
4480 .name = "timer9", 4760 .name = "timer9",
4481 .class = &omap44xx_timer_hwmod_class, 4761 .class = &omap44xx_timer_hwmod_class,
4762 .clkdm_name = "l4_per_clkdm",
4482 .mpu_irqs = omap44xx_timer9_irqs, 4763 .mpu_irqs = omap44xx_timer9_irqs,
4483 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_timer9_irqs),
4484 .main_clk = "timer9_fck", 4764 .main_clk = "timer9_fck",
4485 .prcm = { 4765 .prcm = {
4486 .omap4 = { 4766 .omap4 = {
4487 .clkctrl_reg = OMAP4430_CM_L4PER_DMTIMER9_CLKCTRL, 4767 .clkctrl_offs = OMAP4_CM_L4PER_DMTIMER9_CLKCTRL_OFFSET,
4768 .context_offs = OMAP4_RM_L4PER_DMTIMER9_CONTEXT_OFFSET,
4769 .modulemode = MODULEMODE_SWCTRL,
4488 }, 4770 },
4489 }, 4771 },
4490 .slaves = omap44xx_timer9_slaves, 4772 .slaves = omap44xx_timer9_slaves,
@@ -4496,6 +4778,7 @@ static struct omap_hwmod omap44xx_timer9_hwmod = {
4496static struct omap_hwmod omap44xx_timer10_hwmod; 4778static struct omap_hwmod omap44xx_timer10_hwmod;
4497static struct omap_hwmod_irq_info omap44xx_timer10_irqs[] = { 4779static struct omap_hwmod_irq_info omap44xx_timer10_irqs[] = {
4498 { .irq = 46 + OMAP44XX_IRQ_GIC_START }, 4780 { .irq = 46 + OMAP44XX_IRQ_GIC_START },
4781 { .irq = -1 }
4499}; 4782};
4500 4783
4501static struct omap_hwmod_addr_space omap44xx_timer10_addrs[] = { 4784static struct omap_hwmod_addr_space omap44xx_timer10_addrs[] = {
@@ -4504,6 +4787,7 @@ static struct omap_hwmod_addr_space omap44xx_timer10_addrs[] = {
4504 .pa_end = 0x4808607f, 4787 .pa_end = 0x4808607f,
4505 .flags = ADDR_TYPE_RT 4788 .flags = ADDR_TYPE_RT
4506 }, 4789 },
4790 { }
4507}; 4791};
4508 4792
4509/* l4_per -> timer10 */ 4793/* l4_per -> timer10 */
@@ -4512,7 +4796,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__timer10 = {
4512 .slave = &omap44xx_timer10_hwmod, 4796 .slave = &omap44xx_timer10_hwmod,
4513 .clk = "l4_div_ck", 4797 .clk = "l4_div_ck",
4514 .addr = omap44xx_timer10_addrs, 4798 .addr = omap44xx_timer10_addrs,
4515 .addr_cnt = ARRAY_SIZE(omap44xx_timer10_addrs),
4516 .user = OCP_USER_MPU | OCP_USER_SDMA, 4799 .user = OCP_USER_MPU | OCP_USER_SDMA,
4517}; 4800};
4518 4801
@@ -4524,12 +4807,14 @@ static struct omap_hwmod_ocp_if *omap44xx_timer10_slaves[] = {
4524static struct omap_hwmod omap44xx_timer10_hwmod = { 4807static struct omap_hwmod omap44xx_timer10_hwmod = {
4525 .name = "timer10", 4808 .name = "timer10",
4526 .class = &omap44xx_timer_1ms_hwmod_class, 4809 .class = &omap44xx_timer_1ms_hwmod_class,
4810 .clkdm_name = "l4_per_clkdm",
4527 .mpu_irqs = omap44xx_timer10_irqs, 4811 .mpu_irqs = omap44xx_timer10_irqs,
4528 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_timer10_irqs),
4529 .main_clk = "timer10_fck", 4812 .main_clk = "timer10_fck",
4530 .prcm = { 4813 .prcm = {
4531 .omap4 = { 4814 .omap4 = {
4532 .clkctrl_reg = OMAP4430_CM_L4PER_DMTIMER10_CLKCTRL, 4815 .clkctrl_offs = OMAP4_CM_L4PER_DMTIMER10_CLKCTRL_OFFSET,
4816 .context_offs = OMAP4_RM_L4PER_DMTIMER10_CONTEXT_OFFSET,
4817 .modulemode = MODULEMODE_SWCTRL,
4533 }, 4818 },
4534 }, 4819 },
4535 .slaves = omap44xx_timer10_slaves, 4820 .slaves = omap44xx_timer10_slaves,
@@ -4541,6 +4826,7 @@ static struct omap_hwmod omap44xx_timer10_hwmod = {
4541static struct omap_hwmod omap44xx_timer11_hwmod; 4826static struct omap_hwmod omap44xx_timer11_hwmod;
4542static struct omap_hwmod_irq_info omap44xx_timer11_irqs[] = { 4827static struct omap_hwmod_irq_info omap44xx_timer11_irqs[] = {
4543 { .irq = 47 + OMAP44XX_IRQ_GIC_START }, 4828 { .irq = 47 + OMAP44XX_IRQ_GIC_START },
4829 { .irq = -1 }
4544}; 4830};
4545 4831
4546static struct omap_hwmod_addr_space omap44xx_timer11_addrs[] = { 4832static struct omap_hwmod_addr_space omap44xx_timer11_addrs[] = {
@@ -4549,6 +4835,7 @@ static struct omap_hwmod_addr_space omap44xx_timer11_addrs[] = {
4549 .pa_end = 0x4808807f, 4835 .pa_end = 0x4808807f,
4550 .flags = ADDR_TYPE_RT 4836 .flags = ADDR_TYPE_RT
4551 }, 4837 },
4838 { }
4552}; 4839};
4553 4840
4554/* l4_per -> timer11 */ 4841/* l4_per -> timer11 */
@@ -4557,7 +4844,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__timer11 = {
4557 .slave = &omap44xx_timer11_hwmod, 4844 .slave = &omap44xx_timer11_hwmod,
4558 .clk = "l4_div_ck", 4845 .clk = "l4_div_ck",
4559 .addr = omap44xx_timer11_addrs, 4846 .addr = omap44xx_timer11_addrs,
4560 .addr_cnt = ARRAY_SIZE(omap44xx_timer11_addrs),
4561 .user = OCP_USER_MPU | OCP_USER_SDMA, 4847 .user = OCP_USER_MPU | OCP_USER_SDMA,
4562}; 4848};
4563 4849
@@ -4569,12 +4855,14 @@ static struct omap_hwmod_ocp_if *omap44xx_timer11_slaves[] = {
4569static struct omap_hwmod omap44xx_timer11_hwmod = { 4855static struct omap_hwmod omap44xx_timer11_hwmod = {
4570 .name = "timer11", 4856 .name = "timer11",
4571 .class = &omap44xx_timer_hwmod_class, 4857 .class = &omap44xx_timer_hwmod_class,
4858 .clkdm_name = "l4_per_clkdm",
4572 .mpu_irqs = omap44xx_timer11_irqs, 4859 .mpu_irqs = omap44xx_timer11_irqs,
4573 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_timer11_irqs),
4574 .main_clk = "timer11_fck", 4860 .main_clk = "timer11_fck",
4575 .prcm = { 4861 .prcm = {
4576 .omap4 = { 4862 .omap4 = {
4577 .clkctrl_reg = OMAP4430_CM_L4PER_DMTIMER11_CLKCTRL, 4863 .clkctrl_offs = OMAP4_CM_L4PER_DMTIMER11_CLKCTRL_OFFSET,
4864 .context_offs = OMAP4_RM_L4PER_DMTIMER11_CONTEXT_OFFSET,
4865 .modulemode = MODULEMODE_SWCTRL,
4578 }, 4866 },
4579 }, 4867 },
4580 .slaves = omap44xx_timer11_slaves, 4868 .slaves = omap44xx_timer11_slaves,
@@ -4608,11 +4896,13 @@ static struct omap_hwmod_class omap44xx_uart_hwmod_class = {
4608static struct omap_hwmod omap44xx_uart1_hwmod; 4896static struct omap_hwmod omap44xx_uart1_hwmod;
4609static struct omap_hwmod_irq_info omap44xx_uart1_irqs[] = { 4897static struct omap_hwmod_irq_info omap44xx_uart1_irqs[] = {
4610 { .irq = 72 + OMAP44XX_IRQ_GIC_START }, 4898 { .irq = 72 + OMAP44XX_IRQ_GIC_START },
4899 { .irq = -1 }
4611}; 4900};
4612 4901
4613static struct omap_hwmod_dma_info omap44xx_uart1_sdma_reqs[] = { 4902static struct omap_hwmod_dma_info omap44xx_uart1_sdma_reqs[] = {
4614 { .name = "tx", .dma_req = 48 + OMAP44XX_DMA_REQ_START }, 4903 { .name = "tx", .dma_req = 48 + OMAP44XX_DMA_REQ_START },
4615 { .name = "rx", .dma_req = 49 + OMAP44XX_DMA_REQ_START }, 4904 { .name = "rx", .dma_req = 49 + OMAP44XX_DMA_REQ_START },
4905 { .dma_req = -1 }
4616}; 4906};
4617 4907
4618static struct omap_hwmod_addr_space omap44xx_uart1_addrs[] = { 4908static struct omap_hwmod_addr_space omap44xx_uart1_addrs[] = {
@@ -4621,6 +4911,7 @@ static struct omap_hwmod_addr_space omap44xx_uart1_addrs[] = {
4621 .pa_end = 0x4806a0ff, 4911 .pa_end = 0x4806a0ff,
4622 .flags = ADDR_TYPE_RT 4912 .flags = ADDR_TYPE_RT
4623 }, 4913 },
4914 { }
4624}; 4915};
4625 4916
4626/* l4_per -> uart1 */ 4917/* l4_per -> uart1 */
@@ -4629,7 +4920,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__uart1 = {
4629 .slave = &omap44xx_uart1_hwmod, 4920 .slave = &omap44xx_uart1_hwmod,
4630 .clk = "l4_div_ck", 4921 .clk = "l4_div_ck",
4631 .addr = omap44xx_uart1_addrs, 4922 .addr = omap44xx_uart1_addrs,
4632 .addr_cnt = ARRAY_SIZE(omap44xx_uart1_addrs),
4633 .user = OCP_USER_MPU | OCP_USER_SDMA, 4923 .user = OCP_USER_MPU | OCP_USER_SDMA,
4634}; 4924};
4635 4925
@@ -4641,14 +4931,15 @@ static struct omap_hwmod_ocp_if *omap44xx_uart1_slaves[] = {
4641static struct omap_hwmod omap44xx_uart1_hwmod = { 4931static struct omap_hwmod omap44xx_uart1_hwmod = {
4642 .name = "uart1", 4932 .name = "uart1",
4643 .class = &omap44xx_uart_hwmod_class, 4933 .class = &omap44xx_uart_hwmod_class,
4934 .clkdm_name = "l4_per_clkdm",
4644 .mpu_irqs = omap44xx_uart1_irqs, 4935 .mpu_irqs = omap44xx_uart1_irqs,
4645 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_uart1_irqs),
4646 .sdma_reqs = omap44xx_uart1_sdma_reqs, 4936 .sdma_reqs = omap44xx_uart1_sdma_reqs,
4647 .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_uart1_sdma_reqs),
4648 .main_clk = "uart1_fck", 4937 .main_clk = "uart1_fck",
4649 .prcm = { 4938 .prcm = {
4650 .omap4 = { 4939 .omap4 = {
4651 .clkctrl_reg = OMAP4430_CM_L4PER_UART1_CLKCTRL, 4940 .clkctrl_offs = OMAP4_CM_L4PER_UART1_CLKCTRL_OFFSET,
4941 .context_offs = OMAP4_RM_L4PER_UART1_CONTEXT_OFFSET,
4942 .modulemode = MODULEMODE_SWCTRL,
4652 }, 4943 },
4653 }, 4944 },
4654 .slaves = omap44xx_uart1_slaves, 4945 .slaves = omap44xx_uart1_slaves,
@@ -4660,11 +4951,13 @@ static struct omap_hwmod omap44xx_uart1_hwmod = {
4660static struct omap_hwmod omap44xx_uart2_hwmod; 4951static struct omap_hwmod omap44xx_uart2_hwmod;
4661static struct omap_hwmod_irq_info omap44xx_uart2_irqs[] = { 4952static struct omap_hwmod_irq_info omap44xx_uart2_irqs[] = {
4662 { .irq = 73 + OMAP44XX_IRQ_GIC_START }, 4953 { .irq = 73 + OMAP44XX_IRQ_GIC_START },
4954 { .irq = -1 }
4663}; 4955};
4664 4956
4665static struct omap_hwmod_dma_info omap44xx_uart2_sdma_reqs[] = { 4957static struct omap_hwmod_dma_info omap44xx_uart2_sdma_reqs[] = {
4666 { .name = "tx", .dma_req = 50 + OMAP44XX_DMA_REQ_START }, 4958 { .name = "tx", .dma_req = 50 + OMAP44XX_DMA_REQ_START },
4667 { .name = "rx", .dma_req = 51 + OMAP44XX_DMA_REQ_START }, 4959 { .name = "rx", .dma_req = 51 + OMAP44XX_DMA_REQ_START },
4960 { .dma_req = -1 }
4668}; 4961};
4669 4962
4670static struct omap_hwmod_addr_space omap44xx_uart2_addrs[] = { 4963static struct omap_hwmod_addr_space omap44xx_uart2_addrs[] = {
@@ -4673,6 +4966,7 @@ static struct omap_hwmod_addr_space omap44xx_uart2_addrs[] = {
4673 .pa_end = 0x4806c0ff, 4966 .pa_end = 0x4806c0ff,
4674 .flags = ADDR_TYPE_RT 4967 .flags = ADDR_TYPE_RT
4675 }, 4968 },
4969 { }
4676}; 4970};
4677 4971
4678/* l4_per -> uart2 */ 4972/* l4_per -> uart2 */
@@ -4681,7 +4975,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__uart2 = {
4681 .slave = &omap44xx_uart2_hwmod, 4975 .slave = &omap44xx_uart2_hwmod,
4682 .clk = "l4_div_ck", 4976 .clk = "l4_div_ck",
4683 .addr = omap44xx_uart2_addrs, 4977 .addr = omap44xx_uart2_addrs,
4684 .addr_cnt = ARRAY_SIZE(omap44xx_uart2_addrs),
4685 .user = OCP_USER_MPU | OCP_USER_SDMA, 4978 .user = OCP_USER_MPU | OCP_USER_SDMA,
4686}; 4979};
4687 4980
@@ -4693,14 +4986,15 @@ static struct omap_hwmod_ocp_if *omap44xx_uart2_slaves[] = {
4693static struct omap_hwmod omap44xx_uart2_hwmod = { 4986static struct omap_hwmod omap44xx_uart2_hwmod = {
4694 .name = "uart2", 4987 .name = "uart2",
4695 .class = &omap44xx_uart_hwmod_class, 4988 .class = &omap44xx_uart_hwmod_class,
4989 .clkdm_name = "l4_per_clkdm",
4696 .mpu_irqs = omap44xx_uart2_irqs, 4990 .mpu_irqs = omap44xx_uart2_irqs,
4697 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_uart2_irqs),
4698 .sdma_reqs = omap44xx_uart2_sdma_reqs, 4991 .sdma_reqs = omap44xx_uart2_sdma_reqs,
4699 .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_uart2_sdma_reqs),
4700 .main_clk = "uart2_fck", 4992 .main_clk = "uart2_fck",
4701 .prcm = { 4993 .prcm = {
4702 .omap4 = { 4994 .omap4 = {
4703 .clkctrl_reg = OMAP4430_CM_L4PER_UART2_CLKCTRL, 4995 .clkctrl_offs = OMAP4_CM_L4PER_UART2_CLKCTRL_OFFSET,
4996 .context_offs = OMAP4_RM_L4PER_UART2_CONTEXT_OFFSET,
4997 .modulemode = MODULEMODE_SWCTRL,
4704 }, 4998 },
4705 }, 4999 },
4706 .slaves = omap44xx_uart2_slaves, 5000 .slaves = omap44xx_uart2_slaves,
@@ -4712,11 +5006,13 @@ static struct omap_hwmod omap44xx_uart2_hwmod = {
4712static struct omap_hwmod omap44xx_uart3_hwmod; 5006static struct omap_hwmod omap44xx_uart3_hwmod;
4713static struct omap_hwmod_irq_info omap44xx_uart3_irqs[] = { 5007static struct omap_hwmod_irq_info omap44xx_uart3_irqs[] = {
4714 { .irq = 74 + OMAP44XX_IRQ_GIC_START }, 5008 { .irq = 74 + OMAP44XX_IRQ_GIC_START },
5009 { .irq = -1 }
4715}; 5010};
4716 5011
4717static struct omap_hwmod_dma_info omap44xx_uart3_sdma_reqs[] = { 5012static struct omap_hwmod_dma_info omap44xx_uart3_sdma_reqs[] = {
4718 { .name = "tx", .dma_req = 52 + OMAP44XX_DMA_REQ_START }, 5013 { .name = "tx", .dma_req = 52 + OMAP44XX_DMA_REQ_START },
4719 { .name = "rx", .dma_req = 53 + OMAP44XX_DMA_REQ_START }, 5014 { .name = "rx", .dma_req = 53 + OMAP44XX_DMA_REQ_START },
5015 { .dma_req = -1 }
4720}; 5016};
4721 5017
4722static struct omap_hwmod_addr_space omap44xx_uart3_addrs[] = { 5018static struct omap_hwmod_addr_space omap44xx_uart3_addrs[] = {
@@ -4725,6 +5021,7 @@ static struct omap_hwmod_addr_space omap44xx_uart3_addrs[] = {
4725 .pa_end = 0x480200ff, 5021 .pa_end = 0x480200ff,
4726 .flags = ADDR_TYPE_RT 5022 .flags = ADDR_TYPE_RT
4727 }, 5023 },
5024 { }
4728}; 5025};
4729 5026
4730/* l4_per -> uart3 */ 5027/* l4_per -> uart3 */
@@ -4733,7 +5030,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__uart3 = {
4733 .slave = &omap44xx_uart3_hwmod, 5030 .slave = &omap44xx_uart3_hwmod,
4734 .clk = "l4_div_ck", 5031 .clk = "l4_div_ck",
4735 .addr = omap44xx_uart3_addrs, 5032 .addr = omap44xx_uart3_addrs,
4736 .addr_cnt = ARRAY_SIZE(omap44xx_uart3_addrs),
4737 .user = OCP_USER_MPU | OCP_USER_SDMA, 5033 .user = OCP_USER_MPU | OCP_USER_SDMA,
4738}; 5034};
4739 5035
@@ -4745,15 +5041,16 @@ static struct omap_hwmod_ocp_if *omap44xx_uart3_slaves[] = {
4745static struct omap_hwmod omap44xx_uart3_hwmod = { 5041static struct omap_hwmod omap44xx_uart3_hwmod = {
4746 .name = "uart3", 5042 .name = "uart3",
4747 .class = &omap44xx_uart_hwmod_class, 5043 .class = &omap44xx_uart_hwmod_class,
4748 .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET), 5044 .clkdm_name = "l4_per_clkdm",
5045 .flags = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET,
4749 .mpu_irqs = omap44xx_uart3_irqs, 5046 .mpu_irqs = omap44xx_uart3_irqs,
4750 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_uart3_irqs),
4751 .sdma_reqs = omap44xx_uart3_sdma_reqs, 5047 .sdma_reqs = omap44xx_uart3_sdma_reqs,
4752 .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_uart3_sdma_reqs),
4753 .main_clk = "uart3_fck", 5048 .main_clk = "uart3_fck",
4754 .prcm = { 5049 .prcm = {
4755 .omap4 = { 5050 .omap4 = {
4756 .clkctrl_reg = OMAP4430_CM_L4PER_UART3_CLKCTRL, 5051 .clkctrl_offs = OMAP4_CM_L4PER_UART3_CLKCTRL_OFFSET,
5052 .context_offs = OMAP4_RM_L4PER_UART3_CONTEXT_OFFSET,
5053 .modulemode = MODULEMODE_SWCTRL,
4757 }, 5054 },
4758 }, 5055 },
4759 .slaves = omap44xx_uart3_slaves, 5056 .slaves = omap44xx_uart3_slaves,
@@ -4765,11 +5062,13 @@ static struct omap_hwmod omap44xx_uart3_hwmod = {
4765static struct omap_hwmod omap44xx_uart4_hwmod; 5062static struct omap_hwmod omap44xx_uart4_hwmod;
4766static struct omap_hwmod_irq_info omap44xx_uart4_irqs[] = { 5063static struct omap_hwmod_irq_info omap44xx_uart4_irqs[] = {
4767 { .irq = 70 + OMAP44XX_IRQ_GIC_START }, 5064 { .irq = 70 + OMAP44XX_IRQ_GIC_START },
5065 { .irq = -1 }
4768}; 5066};
4769 5067
4770static struct omap_hwmod_dma_info omap44xx_uart4_sdma_reqs[] = { 5068static struct omap_hwmod_dma_info omap44xx_uart4_sdma_reqs[] = {
4771 { .name = "tx", .dma_req = 54 + OMAP44XX_DMA_REQ_START }, 5069 { .name = "tx", .dma_req = 54 + OMAP44XX_DMA_REQ_START },
4772 { .name = "rx", .dma_req = 55 + OMAP44XX_DMA_REQ_START }, 5070 { .name = "rx", .dma_req = 55 + OMAP44XX_DMA_REQ_START },
5071 { .dma_req = -1 }
4773}; 5072};
4774 5073
4775static struct omap_hwmod_addr_space omap44xx_uart4_addrs[] = { 5074static struct omap_hwmod_addr_space omap44xx_uart4_addrs[] = {
@@ -4778,6 +5077,7 @@ static struct omap_hwmod_addr_space omap44xx_uart4_addrs[] = {
4778 .pa_end = 0x4806e0ff, 5077 .pa_end = 0x4806e0ff,
4779 .flags = ADDR_TYPE_RT 5078 .flags = ADDR_TYPE_RT
4780 }, 5079 },
5080 { }
4781}; 5081};
4782 5082
4783/* l4_per -> uart4 */ 5083/* l4_per -> uart4 */
@@ -4786,7 +5086,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_per__uart4 = {
4786 .slave = &omap44xx_uart4_hwmod, 5086 .slave = &omap44xx_uart4_hwmod,
4787 .clk = "l4_div_ck", 5087 .clk = "l4_div_ck",
4788 .addr = omap44xx_uart4_addrs, 5088 .addr = omap44xx_uart4_addrs,
4789 .addr_cnt = ARRAY_SIZE(omap44xx_uart4_addrs),
4790 .user = OCP_USER_MPU | OCP_USER_SDMA, 5089 .user = OCP_USER_MPU | OCP_USER_SDMA,
4791}; 5090};
4792 5091
@@ -4798,14 +5097,15 @@ static struct omap_hwmod_ocp_if *omap44xx_uart4_slaves[] = {
4798static struct omap_hwmod omap44xx_uart4_hwmod = { 5097static struct omap_hwmod omap44xx_uart4_hwmod = {
4799 .name = "uart4", 5098 .name = "uart4",
4800 .class = &omap44xx_uart_hwmod_class, 5099 .class = &omap44xx_uart_hwmod_class,
5100 .clkdm_name = "l4_per_clkdm",
4801 .mpu_irqs = omap44xx_uart4_irqs, 5101 .mpu_irqs = omap44xx_uart4_irqs,
4802 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_uart4_irqs),
4803 .sdma_reqs = omap44xx_uart4_sdma_reqs, 5102 .sdma_reqs = omap44xx_uart4_sdma_reqs,
4804 .sdma_reqs_cnt = ARRAY_SIZE(omap44xx_uart4_sdma_reqs),
4805 .main_clk = "uart4_fck", 5103 .main_clk = "uart4_fck",
4806 .prcm = { 5104 .prcm = {
4807 .omap4 = { 5105 .omap4 = {
4808 .clkctrl_reg = OMAP4430_CM_L4PER_UART4_CLKCTRL, 5106 .clkctrl_offs = OMAP4_CM_L4PER_UART4_CLKCTRL_OFFSET,
5107 .context_offs = OMAP4_RM_L4PER_UART4_CONTEXT_OFFSET,
5108 .modulemode = MODULEMODE_SWCTRL,
4809 }, 5109 },
4810 }, 5110 },
4811 .slaves = omap44xx_uart4_slaves, 5111 .slaves = omap44xx_uart4_slaves,
@@ -4832,14 +5132,15 @@ static struct omap_hwmod_class_sysconfig omap44xx_usb_otg_hs_sysc = {
4832}; 5132};
4833 5133
4834static struct omap_hwmod_class omap44xx_usb_otg_hs_hwmod_class = { 5134static struct omap_hwmod_class omap44xx_usb_otg_hs_hwmod_class = {
4835 .name = "usb_otg_hs", 5135 .name = "usb_otg_hs",
4836 .sysc = &omap44xx_usb_otg_hs_sysc, 5136 .sysc = &omap44xx_usb_otg_hs_sysc,
4837}; 5137};
4838 5138
4839/* usb_otg_hs */ 5139/* usb_otg_hs */
4840static struct omap_hwmod_irq_info omap44xx_usb_otg_hs_irqs[] = { 5140static struct omap_hwmod_irq_info omap44xx_usb_otg_hs_irqs[] = {
4841 { .name = "mc", .irq = 92 + OMAP44XX_IRQ_GIC_START }, 5141 { .name = "mc", .irq = 92 + OMAP44XX_IRQ_GIC_START },
4842 { .name = "dma", .irq = 93 + OMAP44XX_IRQ_GIC_START }, 5142 { .name = "dma", .irq = 93 + OMAP44XX_IRQ_GIC_START },
5143 { .irq = -1 }
4843}; 5144};
4844 5145
4845/* usb_otg_hs master ports */ 5146/* usb_otg_hs master ports */
@@ -4853,6 +5154,7 @@ static struct omap_hwmod_addr_space omap44xx_usb_otg_hs_addrs[] = {
4853 .pa_end = 0x4a0ab003, 5154 .pa_end = 0x4a0ab003,
4854 .flags = ADDR_TYPE_RT 5155 .flags = ADDR_TYPE_RT
4855 }, 5156 },
5157 { }
4856}; 5158};
4857 5159
4858/* l4_cfg -> usb_otg_hs */ 5160/* l4_cfg -> usb_otg_hs */
@@ -4861,7 +5163,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_cfg__usb_otg_hs = {
4861 .slave = &omap44xx_usb_otg_hs_hwmod, 5163 .slave = &omap44xx_usb_otg_hs_hwmod,
4862 .clk = "l4_div_ck", 5164 .clk = "l4_div_ck",
4863 .addr = omap44xx_usb_otg_hs_addrs, 5165 .addr = omap44xx_usb_otg_hs_addrs,
4864 .addr_cnt = ARRAY_SIZE(omap44xx_usb_otg_hs_addrs),
4865 .user = OCP_USER_MPU | OCP_USER_SDMA, 5166 .user = OCP_USER_MPU | OCP_USER_SDMA,
4866}; 5167};
4867 5168
@@ -4877,17 +5178,19 @@ static struct omap_hwmod_opt_clk usb_otg_hs_opt_clks[] = {
4877static struct omap_hwmod omap44xx_usb_otg_hs_hwmod = { 5178static struct omap_hwmod omap44xx_usb_otg_hs_hwmod = {
4878 .name = "usb_otg_hs", 5179 .name = "usb_otg_hs",
4879 .class = &omap44xx_usb_otg_hs_hwmod_class, 5180 .class = &omap44xx_usb_otg_hs_hwmod_class,
5181 .clkdm_name = "l3_init_clkdm",
4880 .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY, 5182 .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
4881 .mpu_irqs = omap44xx_usb_otg_hs_irqs, 5183 .mpu_irqs = omap44xx_usb_otg_hs_irqs,
4882 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_usb_otg_hs_irqs),
4883 .main_clk = "usb_otg_hs_ick", 5184 .main_clk = "usb_otg_hs_ick",
4884 .prcm = { 5185 .prcm = {
4885 .omap4 = { 5186 .omap4 = {
4886 .clkctrl_reg = OMAP4430_CM_L3INIT_USB_OTG_CLKCTRL, 5187 .clkctrl_offs = OMAP4_CM_L3INIT_USB_OTG_CLKCTRL_OFFSET,
5188 .context_offs = OMAP4_RM_L3INIT_USB_OTG_CONTEXT_OFFSET,
5189 .modulemode = MODULEMODE_HWCTRL,
4887 }, 5190 },
4888 }, 5191 },
4889 .opt_clks = usb_otg_hs_opt_clks, 5192 .opt_clks = usb_otg_hs_opt_clks,
4890 .opt_clks_cnt = ARRAY_SIZE(usb_otg_hs_opt_clks), 5193 .opt_clks_cnt = ARRAY_SIZE(usb_otg_hs_opt_clks),
4891 .slaves = omap44xx_usb_otg_hs_slaves, 5194 .slaves = omap44xx_usb_otg_hs_slaves,
4892 .slaves_cnt = ARRAY_SIZE(omap44xx_usb_otg_hs_slaves), 5195 .slaves_cnt = ARRAY_SIZE(omap44xx_usb_otg_hs_slaves),
4893 .masters = omap44xx_usb_otg_hs_masters, 5196 .masters = omap44xx_usb_otg_hs_masters,
@@ -4922,6 +5225,7 @@ static struct omap_hwmod_class omap44xx_wd_timer_hwmod_class = {
4922static struct omap_hwmod omap44xx_wd_timer2_hwmod; 5225static struct omap_hwmod omap44xx_wd_timer2_hwmod;
4923static struct omap_hwmod_irq_info omap44xx_wd_timer2_irqs[] = { 5226static struct omap_hwmod_irq_info omap44xx_wd_timer2_irqs[] = {
4924 { .irq = 80 + OMAP44XX_IRQ_GIC_START }, 5227 { .irq = 80 + OMAP44XX_IRQ_GIC_START },
5228 { .irq = -1 }
4925}; 5229};
4926 5230
4927static struct omap_hwmod_addr_space omap44xx_wd_timer2_addrs[] = { 5231static struct omap_hwmod_addr_space omap44xx_wd_timer2_addrs[] = {
@@ -4930,6 +5234,7 @@ static struct omap_hwmod_addr_space omap44xx_wd_timer2_addrs[] = {
4930 .pa_end = 0x4a31407f, 5234 .pa_end = 0x4a31407f,
4931 .flags = ADDR_TYPE_RT 5235 .flags = ADDR_TYPE_RT
4932 }, 5236 },
5237 { }
4933}; 5238};
4934 5239
4935/* l4_wkup -> wd_timer2 */ 5240/* l4_wkup -> wd_timer2 */
@@ -4938,7 +5243,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_wkup__wd_timer2 = {
4938 .slave = &omap44xx_wd_timer2_hwmod, 5243 .slave = &omap44xx_wd_timer2_hwmod,
4939 .clk = "l4_wkup_clk_mux_ck", 5244 .clk = "l4_wkup_clk_mux_ck",
4940 .addr = omap44xx_wd_timer2_addrs, 5245 .addr = omap44xx_wd_timer2_addrs,
4941 .addr_cnt = ARRAY_SIZE(omap44xx_wd_timer2_addrs),
4942 .user = OCP_USER_MPU | OCP_USER_SDMA, 5246 .user = OCP_USER_MPU | OCP_USER_SDMA,
4943}; 5247};
4944 5248
@@ -4950,12 +5254,14 @@ static struct omap_hwmod_ocp_if *omap44xx_wd_timer2_slaves[] = {
4950static struct omap_hwmod omap44xx_wd_timer2_hwmod = { 5254static struct omap_hwmod omap44xx_wd_timer2_hwmod = {
4951 .name = "wd_timer2", 5255 .name = "wd_timer2",
4952 .class = &omap44xx_wd_timer_hwmod_class, 5256 .class = &omap44xx_wd_timer_hwmod_class,
5257 .clkdm_name = "l4_wkup_clkdm",
4953 .mpu_irqs = omap44xx_wd_timer2_irqs, 5258 .mpu_irqs = omap44xx_wd_timer2_irqs,
4954 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_wd_timer2_irqs),
4955 .main_clk = "wd_timer2_fck", 5259 .main_clk = "wd_timer2_fck",
4956 .prcm = { 5260 .prcm = {
4957 .omap4 = { 5261 .omap4 = {
4958 .clkctrl_reg = OMAP4430_CM_WKUP_WDT2_CLKCTRL, 5262 .clkctrl_offs = OMAP4_CM_WKUP_WDT2_CLKCTRL_OFFSET,
5263 .context_offs = OMAP4_RM_WKUP_WDT2_CONTEXT_OFFSET,
5264 .modulemode = MODULEMODE_SWCTRL,
4959 }, 5265 },
4960 }, 5266 },
4961 .slaves = omap44xx_wd_timer2_slaves, 5267 .slaves = omap44xx_wd_timer2_slaves,
@@ -4967,6 +5273,7 @@ static struct omap_hwmod omap44xx_wd_timer2_hwmod = {
4967static struct omap_hwmod omap44xx_wd_timer3_hwmod; 5273static struct omap_hwmod omap44xx_wd_timer3_hwmod;
4968static struct omap_hwmod_irq_info omap44xx_wd_timer3_irqs[] = { 5274static struct omap_hwmod_irq_info omap44xx_wd_timer3_irqs[] = {
4969 { .irq = 36 + OMAP44XX_IRQ_GIC_START }, 5275 { .irq = 36 + OMAP44XX_IRQ_GIC_START },
5276 { .irq = -1 }
4970}; 5277};
4971 5278
4972static struct omap_hwmod_addr_space omap44xx_wd_timer3_addrs[] = { 5279static struct omap_hwmod_addr_space omap44xx_wd_timer3_addrs[] = {
@@ -4975,6 +5282,7 @@ static struct omap_hwmod_addr_space omap44xx_wd_timer3_addrs[] = {
4975 .pa_end = 0x4013007f, 5282 .pa_end = 0x4013007f,
4976 .flags = ADDR_TYPE_RT 5283 .flags = ADDR_TYPE_RT
4977 }, 5284 },
5285 { }
4978}; 5286};
4979 5287
4980/* l4_abe -> wd_timer3 */ 5288/* l4_abe -> wd_timer3 */
@@ -4983,7 +5291,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__wd_timer3 = {
4983 .slave = &omap44xx_wd_timer3_hwmod, 5291 .slave = &omap44xx_wd_timer3_hwmod,
4984 .clk = "ocp_abe_iclk", 5292 .clk = "ocp_abe_iclk",
4985 .addr = omap44xx_wd_timer3_addrs, 5293 .addr = omap44xx_wd_timer3_addrs,
4986 .addr_cnt = ARRAY_SIZE(omap44xx_wd_timer3_addrs),
4987 .user = OCP_USER_MPU, 5294 .user = OCP_USER_MPU,
4988}; 5295};
4989 5296
@@ -4993,6 +5300,7 @@ static struct omap_hwmod_addr_space omap44xx_wd_timer3_dma_addrs[] = {
4993 .pa_end = 0x4903007f, 5300 .pa_end = 0x4903007f,
4994 .flags = ADDR_TYPE_RT 5301 .flags = ADDR_TYPE_RT
4995 }, 5302 },
5303 { }
4996}; 5304};
4997 5305
4998/* l4_abe -> wd_timer3 (dma) */ 5306/* l4_abe -> wd_timer3 (dma) */
@@ -5001,7 +5309,6 @@ static struct omap_hwmod_ocp_if omap44xx_l4_abe__wd_timer3_dma = {
5001 .slave = &omap44xx_wd_timer3_hwmod, 5309 .slave = &omap44xx_wd_timer3_hwmod,
5002 .clk = "ocp_abe_iclk", 5310 .clk = "ocp_abe_iclk",
5003 .addr = omap44xx_wd_timer3_dma_addrs, 5311 .addr = omap44xx_wd_timer3_dma_addrs,
5004 .addr_cnt = ARRAY_SIZE(omap44xx_wd_timer3_dma_addrs),
5005 .user = OCP_USER_SDMA, 5312 .user = OCP_USER_SDMA,
5006}; 5313};
5007 5314
@@ -5014,12 +5321,14 @@ static struct omap_hwmod_ocp_if *omap44xx_wd_timer3_slaves[] = {
5014static struct omap_hwmod omap44xx_wd_timer3_hwmod = { 5321static struct omap_hwmod omap44xx_wd_timer3_hwmod = {
5015 .name = "wd_timer3", 5322 .name = "wd_timer3",
5016 .class = &omap44xx_wd_timer_hwmod_class, 5323 .class = &omap44xx_wd_timer_hwmod_class,
5324 .clkdm_name = "abe_clkdm",
5017 .mpu_irqs = omap44xx_wd_timer3_irqs, 5325 .mpu_irqs = omap44xx_wd_timer3_irqs,
5018 .mpu_irqs_cnt = ARRAY_SIZE(omap44xx_wd_timer3_irqs),
5019 .main_clk = "wd_timer3_fck", 5326 .main_clk = "wd_timer3_fck",
5020 .prcm = { 5327 .prcm = {
5021 .omap4 = { 5328 .omap4 = {
5022 .clkctrl_reg = OMAP4430_CM1_ABE_WDT3_CLKCTRL, 5329 .clkctrl_offs = OMAP4_CM1_ABE_WDT3_CLKCTRL_OFFSET,
5330 .context_offs = OMAP4_RM_ABE_WDT3_CONTEXT_OFFSET,
5331 .modulemode = MODULEMODE_SWCTRL,
5023 }, 5332 },
5024 }, 5333 },
5025 .slaves = omap44xx_wd_timer3_slaves, 5334 .slaves = omap44xx_wd_timer3_slaves,
diff --git a/arch/arm/mach-omap2/omap_hwmod_common_data.c b/arch/arm/mach-omap2/omap_hwmod_common_data.c
index 08a134243ec..de832ebc93a 100644
--- a/arch/arm/mach-omap2/omap_hwmod_common_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_common_data.c
@@ -49,23 +49,3 @@ struct omap_hwmod_sysc_fields omap_hwmod_sysc_type2 = {
49 .srst_shift = SYSC_TYPE2_SOFTRESET_SHIFT, 49 .srst_shift = SYSC_TYPE2_SOFTRESET_SHIFT,
50}; 50};
51 51
52
53/*
54 * omap_hwmod class data
55 */
56
57struct omap_hwmod_class l3_hwmod_class = {
58 .name = "l3"
59};
60
61struct omap_hwmod_class l4_hwmod_class = {
62 .name = "l4"
63};
64
65struct omap_hwmod_class mpu_hwmod_class = {
66 .name = "mpu"
67};
68
69struct omap_hwmod_class iva_hwmod_class = {
70 .name = "iva"
71};
diff --git a/arch/arm/mach-omap2/omap_hwmod_common_data.h b/arch/arm/mach-omap2/omap_hwmod_common_data.h
index c34e98bf124..39a7c37f458 100644
--- a/arch/arm/mach-omap2/omap_hwmod_common_data.h
+++ b/arch/arm/mach-omap2/omap_hwmod_common_data.h
@@ -1,10 +1,10 @@
1/* 1/*
2 * omap_hwmod_common_data.h - OMAP hwmod common macros and declarations 2 * omap_hwmod_common_data.h - OMAP hwmod common macros and declarations
3 * 3 *
4 * Copyright (C) 2010 Nokia Corporation 4 * Copyright (C) 2010-2011 Nokia Corporation
5 * Paul Walmsley 5 * Paul Walmsley
6 * 6 *
7 * Copyright (C) 2010 Texas Instruments, Inc. 7 * Copyright (C) 2010-2011 Texas Instruments, Inc.
8 * Benoît Cousson 8 * Benoît Cousson
9 * 9 *
10 * This program is free software; you can redistribute it and/or modify 10 * This program is free software; you can redistribute it and/or modify
@@ -16,10 +16,99 @@
16 16
17#include <plat/omap_hwmod.h> 17#include <plat/omap_hwmod.h>
18 18
19/* Common address space across OMAP2xxx */
20extern struct omap_hwmod_addr_space omap2xxx_uart1_addr_space[];
21extern struct omap_hwmod_addr_space omap2xxx_uart2_addr_space[];
22extern struct omap_hwmod_addr_space omap2xxx_uart3_addr_space[];
23extern struct omap_hwmod_addr_space omap2xxx_timer2_addrs[];
24extern struct omap_hwmod_addr_space omap2xxx_timer3_addrs[];
25extern struct omap_hwmod_addr_space omap2xxx_timer4_addrs[];
26extern struct omap_hwmod_addr_space omap2xxx_timer5_addrs[];
27extern struct omap_hwmod_addr_space omap2xxx_timer6_addrs[];
28extern struct omap_hwmod_addr_space omap2xxx_timer7_addrs[];
29extern struct omap_hwmod_addr_space omap2xxx_timer8_addrs[];
30extern struct omap_hwmod_addr_space omap2xxx_timer9_addrs[];
31extern struct omap_hwmod_addr_space omap2xxx_timer12_addrs[];
32extern struct omap_hwmod_addr_space omap2xxx_mcbsp2_addrs[];
33
34/* Common address space across OMAP2xxx/3xxx */
35extern struct omap_hwmod_addr_space omap2_i2c1_addr_space[];
36extern struct omap_hwmod_addr_space omap2_i2c2_addr_space[];
37extern struct omap_hwmod_addr_space omap2_dss_addrs[];
38extern struct omap_hwmod_addr_space omap2_dss_dispc_addrs[];
39extern struct omap_hwmod_addr_space omap2_dss_rfbi_addrs[];
40extern struct omap_hwmod_addr_space omap2_dss_venc_addrs[];
41extern struct omap_hwmod_addr_space omap2_timer10_addrs[];
42extern struct omap_hwmod_addr_space omap2_timer11_addrs[];
43extern struct omap_hwmod_addr_space omap2430_mmc1_addr_space[];
44extern struct omap_hwmod_addr_space omap2430_mmc2_addr_space[];
45extern struct omap_hwmod_addr_space omap2_mcspi1_addr_space[];
46extern struct omap_hwmod_addr_space omap2_mcspi2_addr_space[];
47extern struct omap_hwmod_addr_space omap2430_mcspi3_addr_space[];
48extern struct omap_hwmod_addr_space omap2_dma_system_addrs[];
49extern struct omap_hwmod_addr_space omap2_mailbox_addrs[];
50extern struct omap_hwmod_addr_space omap2_mcbsp1_addrs[];
51
52/* Common IP block data across OMAP2xxx */
53extern struct omap_hwmod_irq_info omap2xxx_timer12_mpu_irqs[];
54extern struct omap_hwmod_dma_info omap2xxx_dss_sdma_chs[];
55
56/* Common IP block data */
57extern struct omap_hwmod_dma_info omap2_uart1_sdma_reqs[];
58extern struct omap_hwmod_dma_info omap2_uart2_sdma_reqs[];
59extern struct omap_hwmod_dma_info omap2_uart3_sdma_reqs[];
60extern struct omap_hwmod_dma_info omap2_i2c1_sdma_reqs[];
61extern struct omap_hwmod_dma_info omap2_i2c2_sdma_reqs[];
62extern struct omap_hwmod_dma_info omap2_mcspi1_sdma_reqs[];
63extern struct omap_hwmod_dma_info omap2_mcspi2_sdma_reqs[];
64extern struct omap_hwmod_dma_info omap2_mcbsp1_sdma_reqs[];
65extern struct omap_hwmod_dma_info omap2_mcbsp2_sdma_reqs[];
66
67/* Common IP block data on OMAP2430/OMAP3 */
68extern struct omap_hwmod_dma_info omap2_mcbsp3_sdma_reqs[];
69
70/* Common IP block data across OMAP2/3 */
71extern struct omap_hwmod_irq_info omap2_timer1_mpu_irqs[];
72extern struct omap_hwmod_irq_info omap2_timer2_mpu_irqs[];
73extern struct omap_hwmod_irq_info omap2_timer3_mpu_irqs[];
74extern struct omap_hwmod_irq_info omap2_timer4_mpu_irqs[];
75extern struct omap_hwmod_irq_info omap2_timer5_mpu_irqs[];
76extern struct omap_hwmod_irq_info omap2_timer6_mpu_irqs[];
77extern struct omap_hwmod_irq_info omap2_timer7_mpu_irqs[];
78extern struct omap_hwmod_irq_info omap2_timer8_mpu_irqs[];
79extern struct omap_hwmod_irq_info omap2_timer9_mpu_irqs[];
80extern struct omap_hwmod_irq_info omap2_timer10_mpu_irqs[];
81extern struct omap_hwmod_irq_info omap2_timer11_mpu_irqs[];
82extern struct omap_hwmod_irq_info omap2_uart1_mpu_irqs[];
83extern struct omap_hwmod_irq_info omap2_uart2_mpu_irqs[];
84extern struct omap_hwmod_irq_info omap2_uart3_mpu_irqs[];
85extern struct omap_hwmod_irq_info omap2_dispc_irqs[];
86extern struct omap_hwmod_irq_info omap2_i2c1_mpu_irqs[];
87extern struct omap_hwmod_irq_info omap2_i2c2_mpu_irqs[];
88extern struct omap_hwmod_irq_info omap2_gpio1_irqs[];
89extern struct omap_hwmod_irq_info omap2_gpio2_irqs[];
90extern struct omap_hwmod_irq_info omap2_gpio3_irqs[];
91extern struct omap_hwmod_irq_info omap2_gpio4_irqs[];
92extern struct omap_hwmod_irq_info omap2_dma_system_irqs[];
93extern struct omap_hwmod_irq_info omap2_mcspi1_mpu_irqs[];
94extern struct omap_hwmod_irq_info omap2_mcspi2_mpu_irqs[];
95
19/* OMAP hwmod classes - forward declarations */ 96/* OMAP hwmod classes - forward declarations */
20extern struct omap_hwmod_class l3_hwmod_class; 97extern struct omap_hwmod_class l3_hwmod_class;
21extern struct omap_hwmod_class l4_hwmod_class; 98extern struct omap_hwmod_class l4_hwmod_class;
22extern struct omap_hwmod_class mpu_hwmod_class; 99extern struct omap_hwmod_class mpu_hwmod_class;
23extern struct omap_hwmod_class iva_hwmod_class; 100extern struct omap_hwmod_class iva_hwmod_class;
101extern struct omap_hwmod_class omap2_uart_class;
102extern struct omap_hwmod_class omap2_dss_hwmod_class;
103extern struct omap_hwmod_class omap2_dispc_hwmod_class;
104extern struct omap_hwmod_class omap2_rfbi_hwmod_class;
105extern struct omap_hwmod_class omap2_venc_hwmod_class;
106
107extern struct omap_hwmod_class omap2xxx_timer_hwmod_class;
108extern struct omap_hwmod_class omap2xxx_wd_timer_hwmod_class;
109extern struct omap_hwmod_class omap2xxx_gpio_hwmod_class;
110extern struct omap_hwmod_class omap2xxx_dma_hwmod_class;
111extern struct omap_hwmod_class omap2xxx_mailbox_hwmod_class;
112extern struct omap_hwmod_class omap2xxx_mcspi_class;
24 113
25#endif 114#endif
diff --git a/arch/arm/mach-omap2/pm-debug.c b/arch/arm/mach-omap2/pm-debug.c
index e01da45c053..4411163e012 100644
--- a/arch/arm/mach-omap2/pm-debug.c
+++ b/arch/arm/mach-omap2/pm-debug.c
@@ -38,155 +38,12 @@
38#include "prm2xxx_3xxx.h" 38#include "prm2xxx_3xxx.h"
39#include "pm.h" 39#include "pm.h"
40 40
41int omap2_pm_debug;
42u32 enable_off_mode; 41u32 enable_off_mode;
43u32 sleep_while_idle;
44u32 wakeup_timer_seconds;
45u32 wakeup_timer_milliseconds;
46
47#define DUMP_PRM_MOD_REG(mod, reg) \
48 regs[reg_count].name = #mod "." #reg; \
49 regs[reg_count++].val = omap2_prm_read_mod_reg(mod, reg)
50#define DUMP_CM_MOD_REG(mod, reg) \
51 regs[reg_count].name = #mod "." #reg; \
52 regs[reg_count++].val = omap2_cm_read_mod_reg(mod, reg)
53#define DUMP_PRM_REG(reg) \
54 regs[reg_count].name = #reg; \
55 regs[reg_count++].val = __raw_readl(reg)
56#define DUMP_CM_REG(reg) \
57 regs[reg_count].name = #reg; \
58 regs[reg_count++].val = __raw_readl(reg)
59#define DUMP_INTC_REG(reg, off) \
60 regs[reg_count].name = #reg; \
61 regs[reg_count++].val = \
62 __raw_readl(OMAP2_L4_IO_ADDRESS(0x480fe000 + (off)))
63
64void omap2_pm_dump(int mode, int resume, unsigned int us)
65{
66 struct reg {
67 const char *name;
68 u32 val;
69 } regs[32];
70 int reg_count = 0, i;
71 const char *s1 = NULL, *s2 = NULL;
72
73 if (!resume) {
74#if 0
75 /* MPU */
76 DUMP_PRM_MOD_REG(OCP_MOD, OMAP2_PRM_IRQENABLE_MPU_OFFSET);
77 DUMP_CM_MOD_REG(MPU_MOD, OMAP2_CM_CLKSTCTRL);
78 DUMP_PRM_MOD_REG(MPU_MOD, OMAP2_PM_PWSTCTRL);
79 DUMP_PRM_MOD_REG(MPU_MOD, OMAP2_PM_PWSTST);
80 DUMP_PRM_MOD_REG(MPU_MOD, PM_WKDEP);
81#endif
82#if 0
83 /* INTC */
84 DUMP_INTC_REG(INTC_MIR0, 0x0084);
85 DUMP_INTC_REG(INTC_MIR1, 0x00a4);
86 DUMP_INTC_REG(INTC_MIR2, 0x00c4);
87#endif
88#if 0
89 DUMP_CM_MOD_REG(CORE_MOD, CM_FCLKEN1);
90 if (cpu_is_omap24xx()) {
91 DUMP_CM_MOD_REG(CORE_MOD, OMAP24XX_CM_FCLKEN2);
92 DUMP_PRM_MOD_REG(OMAP24XX_GR_MOD,
93 OMAP2_PRCM_CLKEMUL_CTRL_OFFSET);
94 DUMP_PRM_MOD_REG(OMAP24XX_GR_MOD,
95 OMAP2_PRCM_CLKSRC_CTRL_OFFSET);
96 }
97 DUMP_CM_MOD_REG(WKUP_MOD, CM_FCLKEN);
98 DUMP_CM_MOD_REG(CORE_MOD, CM_ICLKEN1);
99 DUMP_CM_MOD_REG(CORE_MOD, CM_ICLKEN2);
100 DUMP_CM_MOD_REG(WKUP_MOD, CM_ICLKEN);
101 DUMP_CM_MOD_REG(PLL_MOD, CM_CLKEN);
102 DUMP_CM_MOD_REG(PLL_MOD, CM_AUTOIDLE);
103 DUMP_PRM_MOD_REG(CORE_MOD, OMAP2_PM_PWSTST);
104#endif
105#if 0
106 /* DSP */
107 if (cpu_is_omap24xx()) {
108 DUMP_CM_MOD_REG(OMAP24XX_DSP_MOD, CM_FCLKEN);
109 DUMP_CM_MOD_REG(OMAP24XX_DSP_MOD, CM_ICLKEN);
110 DUMP_CM_MOD_REG(OMAP24XX_DSP_MOD, CM_IDLEST);
111 DUMP_CM_MOD_REG(OMAP24XX_DSP_MOD, CM_AUTOIDLE);
112 DUMP_CM_MOD_REG(OMAP24XX_DSP_MOD, CM_CLKSEL);
113 DUMP_CM_MOD_REG(OMAP24XX_DSP_MOD, OMAP2_CM_CLKSTCTRL);
114 DUMP_PRM_MOD_REG(OMAP24XX_DSP_MOD, OMAP2_RM_RSTCTRL);
115 DUMP_PRM_MOD_REG(OMAP24XX_DSP_MOD, OMAP2_RM_RSTST);
116 DUMP_PRM_MOD_REG(OMAP24XX_DSP_MOD, OMAP2_PM_PWSTCTRL);
117 DUMP_PRM_MOD_REG(OMAP24XX_DSP_MOD, OMAP2_PM_PWSTST);
118 }
119#endif
120 } else {
121 DUMP_PRM_MOD_REG(CORE_MOD, PM_WKST1);
122 if (cpu_is_omap24xx())
123 DUMP_PRM_MOD_REG(CORE_MOD, OMAP24XX_PM_WKST2);
124 DUMP_PRM_MOD_REG(WKUP_MOD, PM_WKST);
125 DUMP_PRM_MOD_REG(OCP_MOD, OMAP2_PRCM_IRQSTATUS_MPU_OFFSET);
126#if 1
127 DUMP_INTC_REG(INTC_PENDING_IRQ0, 0x0098);
128 DUMP_INTC_REG(INTC_PENDING_IRQ1, 0x00b8);
129 DUMP_INTC_REG(INTC_PENDING_IRQ2, 0x00d8);
130#endif
131 }
132
133 switch (mode) {
134 case 0:
135 s1 = "full";
136 s2 = "retention";
137 break;
138 case 1:
139 s1 = "MPU";
140 s2 = "retention";
141 break;
142 case 2:
143 s1 = "MPU";
144 s2 = "idle";
145 break;
146 }
147
148 if (!resume)
149#ifdef CONFIG_NO_HZ
150 printk(KERN_INFO
151 "--- Going to %s %s (next timer after %u ms)\n", s1, s2,
152 jiffies_to_msecs(get_next_timer_interrupt(jiffies) -
153 jiffies));
154#else
155 printk(KERN_INFO "--- Going to %s %s\n", s1, s2);
156#endif
157 else
158 printk(KERN_INFO "--- Woke up (slept for %u.%03u ms)\n",
159 us / 1000, us % 1000);
160
161 for (i = 0; i < reg_count; i++)
162 printk(KERN_INFO "%-20s: 0x%08x\n", regs[i].name, regs[i].val);
163}
164
165void omap2_pm_wakeup_on_timer(u32 seconds, u32 milliseconds)
166{
167 u32 tick_rate, cycles;
168
169 if (!seconds && !milliseconds)
170 return;
171
172 tick_rate = clk_get_rate(omap_dm_timer_get_fclk(gptimer_wakeup));
173 cycles = tick_rate * seconds + tick_rate * milliseconds / 1000;
174 omap_dm_timer_stop(gptimer_wakeup);
175 omap_dm_timer_set_load_start(gptimer_wakeup, 0, 0xffffffff - cycles);
176
177 pr_info("PM: Resume timer in %u.%03u secs"
178 " (%d ticks at %d ticks/sec.)\n",
179 seconds, milliseconds, cycles, tick_rate);
180}
181 42
182#ifdef CONFIG_DEBUG_FS 43#ifdef CONFIG_DEBUG_FS
183#include <linux/debugfs.h> 44#include <linux/debugfs.h>
184#include <linux/seq_file.h> 45#include <linux/seq_file.h>
185 46
186static void pm_dbg_regset_store(u32 *ptr);
187
188static struct dentry *pm_dbg_dir;
189
190static int pm_dbg_init_done; 47static int pm_dbg_init_done;
191 48
192static int pm_dbg_init(void); 49static int pm_dbg_init(void);
@@ -196,160 +53,6 @@ enum {
196 DEBUG_FILE_TIMERS, 53 DEBUG_FILE_TIMERS,
197}; 54};
198 55
199struct pm_module_def {
200 char name[8]; /* Name of the module */
201 short type; /* CM or PRM */
202 unsigned short offset;
203 int low; /* First register address on this module */
204 int high; /* Last register address on this module */
205};
206
207#define MOD_CM 0
208#define MOD_PRM 1
209
210static const struct pm_module_def *pm_dbg_reg_modules;
211static const struct pm_module_def omap3_pm_reg_modules[] = {
212 { "IVA2", MOD_CM, OMAP3430_IVA2_MOD, 0, 0x4c },
213 { "OCP", MOD_CM, OCP_MOD, 0, 0x10 },
214 { "MPU", MOD_CM, MPU_MOD, 4, 0x4c },
215 { "CORE", MOD_CM, CORE_MOD, 0, 0x4c },
216 { "SGX", MOD_CM, OMAP3430ES2_SGX_MOD, 0, 0x4c },
217 { "WKUP", MOD_CM, WKUP_MOD, 0, 0x40 },
218 { "CCR", MOD_CM, PLL_MOD, 0, 0x70 },
219 { "DSS", MOD_CM, OMAP3430_DSS_MOD, 0, 0x4c },
220 { "CAM", MOD_CM, OMAP3430_CAM_MOD, 0, 0x4c },
221 { "PER", MOD_CM, OMAP3430_PER_MOD, 0, 0x4c },
222 { "EMU", MOD_CM, OMAP3430_EMU_MOD, 0x40, 0x54 },
223 { "NEON", MOD_CM, OMAP3430_NEON_MOD, 0x20, 0x48 },
224 { "USB", MOD_CM, OMAP3430ES2_USBHOST_MOD, 0, 0x4c },
225
226 { "IVA2", MOD_PRM, OMAP3430_IVA2_MOD, 0x50, 0xfc },
227 { "OCP", MOD_PRM, OCP_MOD, 4, 0x1c },
228 { "MPU", MOD_PRM, MPU_MOD, 0x58, 0xe8 },
229 { "CORE", MOD_PRM, CORE_MOD, 0x58, 0xf8 },
230 { "SGX", MOD_PRM, OMAP3430ES2_SGX_MOD, 0x58, 0xe8 },
231 { "WKUP", MOD_PRM, WKUP_MOD, 0xa0, 0xb0 },
232 { "CCR", MOD_PRM, PLL_MOD, 0x40, 0x70 },
233 { "DSS", MOD_PRM, OMAP3430_DSS_MOD, 0x58, 0xe8 },
234 { "CAM", MOD_PRM, OMAP3430_CAM_MOD, 0x58, 0xe8 },
235 { "PER", MOD_PRM, OMAP3430_PER_MOD, 0x58, 0xe8 },
236 { "EMU", MOD_PRM, OMAP3430_EMU_MOD, 0x58, 0xe4 },
237 { "GLBL", MOD_PRM, OMAP3430_GR_MOD, 0x20, 0xe4 },
238 { "NEON", MOD_PRM, OMAP3430_NEON_MOD, 0x58, 0xe8 },
239 { "USB", MOD_PRM, OMAP3430ES2_USBHOST_MOD, 0x58, 0xe8 },
240 { "", 0, 0, 0, 0 },
241};
242
243#define PM_DBG_MAX_REG_SETS 4
244
245static void *pm_dbg_reg_set[PM_DBG_MAX_REG_SETS];
246
247static int pm_dbg_get_regset_size(void)
248{
249 static int regset_size;
250
251 if (regset_size == 0) {
252 int i = 0;
253
254 while (pm_dbg_reg_modules[i].name[0] != 0) {
255 regset_size += pm_dbg_reg_modules[i].high +
256 4 - pm_dbg_reg_modules[i].low;
257 i++;
258 }
259 }
260 return regset_size;
261}
262
263static int pm_dbg_show_regs(struct seq_file *s, void *unused)
264{
265 int i, j;
266 unsigned long val;
267 int reg_set = (int)s->private;
268 u32 *ptr;
269 void *store = NULL;
270 int regs;
271 int linefeed;
272
273 if (reg_set == 0) {
274 store = kmalloc(pm_dbg_get_regset_size(), GFP_KERNEL);
275 ptr = store;
276 pm_dbg_regset_store(ptr);
277 } else {
278 ptr = pm_dbg_reg_set[reg_set - 1];
279 }
280
281 i = 0;
282
283 while (pm_dbg_reg_modules[i].name[0] != 0) {
284 regs = 0;
285 linefeed = 0;
286 if (pm_dbg_reg_modules[i].type == MOD_CM)
287 seq_printf(s, "MOD: CM_%s (%08x)\n",
288 pm_dbg_reg_modules[i].name,
289 (u32)(OMAP3430_CM_BASE +
290 pm_dbg_reg_modules[i].offset));
291 else
292 seq_printf(s, "MOD: PRM_%s (%08x)\n",
293 pm_dbg_reg_modules[i].name,
294 (u32)(OMAP3430_PRM_BASE +
295 pm_dbg_reg_modules[i].offset));
296
297 for (j = pm_dbg_reg_modules[i].low;
298 j <= pm_dbg_reg_modules[i].high; j += 4) {
299 val = *(ptr++);
300 if (val != 0) {
301 regs++;
302 if (linefeed) {
303 seq_printf(s, "\n");
304 linefeed = 0;
305 }
306 seq_printf(s, " %02x => %08lx", j, val);
307 if (regs % 4 == 0)
308 linefeed = 1;
309 }
310 }
311 seq_printf(s, "\n");
312 i++;
313 }
314
315 if (store != NULL)
316 kfree(store);
317
318 return 0;
319}
320
321static void pm_dbg_regset_store(u32 *ptr)
322{
323 int i, j;
324 u32 val;
325
326 i = 0;
327
328 while (pm_dbg_reg_modules[i].name[0] != 0) {
329 for (j = pm_dbg_reg_modules[i].low;
330 j <= pm_dbg_reg_modules[i].high; j += 4) {
331 if (pm_dbg_reg_modules[i].type == MOD_CM)
332 val = omap2_cm_read_mod_reg(
333 pm_dbg_reg_modules[i].offset, j);
334 else
335 val = omap2_prm_read_mod_reg(
336 pm_dbg_reg_modules[i].offset, j);
337 *(ptr++) = val;
338 }
339 i++;
340 }
341}
342
343int pm_dbg_regset_save(int reg_set)
344{
345 if (pm_dbg_reg_set[reg_set-1] == NULL)
346 return -EINVAL;
347
348 pm_dbg_regset_store(pm_dbg_reg_set[reg_set-1]);
349
350 return 0;
351}
352
353static const char pwrdm_state_names[][PWRDM_MAX_PWRSTS] = { 56static const char pwrdm_state_names[][PWRDM_MAX_PWRSTS] = {
354 "OFF", 57 "OFF",
355 "RET", 58 "RET",
@@ -469,11 +172,6 @@ static int pm_dbg_open(struct inode *inode, struct file *file)
469 }; 172 };
470} 173}
471 174
472static int pm_dbg_reg_open(struct inode *inode, struct file *file)
473{
474 return single_open(file, pm_dbg_show_regs, inode->i_private);
475}
476
477static const struct file_operations debug_fops = { 175static const struct file_operations debug_fops = {
478 .open = pm_dbg_open, 176 .open = pm_dbg_open,
479 .read = seq_read, 177 .read = seq_read,
@@ -481,40 +179,6 @@ static const struct file_operations debug_fops = {
481 .release = single_release, 179 .release = single_release,
482}; 180};
483 181
484static const struct file_operations debug_reg_fops = {
485 .open = pm_dbg_reg_open,
486 .read = seq_read,
487 .llseek = seq_lseek,
488 .release = single_release,
489};
490
491int pm_dbg_regset_init(int reg_set)
492{
493 char name[2];
494
495 if (!pm_dbg_init_done)
496 pm_dbg_init();
497
498 if (reg_set < 1 || reg_set > PM_DBG_MAX_REG_SETS ||
499 pm_dbg_reg_set[reg_set-1] != NULL)
500 return -EINVAL;
501
502 pm_dbg_reg_set[reg_set-1] =
503 kmalloc(pm_dbg_get_regset_size(), GFP_KERNEL);
504
505 if (pm_dbg_reg_set[reg_set-1] == NULL)
506 return -ENOMEM;
507
508 if (pm_dbg_dir != NULL) {
509 sprintf(name, "%d", reg_set);
510
511 (void) debugfs_create_file(name, S_IRUGO,
512 pm_dbg_dir, (void *)reg_set, &debug_reg_fops);
513 }
514
515 return 0;
516}
517
518static int pwrdm_suspend_get(void *data, u64 *val) 182static int pwrdm_suspend_get(void *data, u64 *val)
519{ 183{
520 int ret = -EINVAL; 184 int ret = -EINVAL;
@@ -576,9 +240,6 @@ static int option_set(void *data, u64 val)
576{ 240{
577 u32 *option = data; 241 u32 *option = data;
578 242
579 if (option == &wakeup_timer_milliseconds && val >= 1000)
580 return -EINVAL;
581
582 *option = val; 243 *option = val;
583 244
584 if (option == &enable_off_mode) { 245 if (option == &enable_off_mode) {
@@ -595,22 +256,13 @@ static int option_set(void *data, u64 val)
595 256
596DEFINE_SIMPLE_ATTRIBUTE(pm_dbg_option_fops, option_get, option_set, "%llu\n"); 257DEFINE_SIMPLE_ATTRIBUTE(pm_dbg_option_fops, option_get, option_set, "%llu\n");
597 258
598static int pm_dbg_init(void) 259static int __init pm_dbg_init(void)
599{ 260{
600 int i;
601 struct dentry *d; 261 struct dentry *d;
602 char name[2];
603 262
604 if (pm_dbg_init_done) 263 if (pm_dbg_init_done)
605 return 0; 264 return 0;
606 265
607 if (cpu_is_omap34xx())
608 pm_dbg_reg_modules = omap3_pm_reg_modules;
609 else {
610 printk(KERN_ERR "%s: only OMAP3 supported\n", __func__);
611 return -ENODEV;
612 }
613
614 d = debugfs_create_dir("pm_debug", NULL); 266 d = debugfs_create_dir("pm_debug", NULL);
615 if (IS_ERR(d)) 267 if (IS_ERR(d))
616 return PTR_ERR(d); 268 return PTR_ERR(d);
@@ -622,30 +274,8 @@ static int pm_dbg_init(void)
622 274
623 pwrdm_for_each(pwrdms_setup, (void *)d); 275 pwrdm_for_each(pwrdms_setup, (void *)d);
624 276
625 pm_dbg_dir = debugfs_create_dir("registers", d);
626 if (IS_ERR(pm_dbg_dir))
627 return PTR_ERR(pm_dbg_dir);
628
629 (void) debugfs_create_file("current", S_IRUGO,
630 pm_dbg_dir, (void *)0, &debug_reg_fops);
631
632 for (i = 0; i < PM_DBG_MAX_REG_SETS; i++)
633 if (pm_dbg_reg_set[i] != NULL) {
634 sprintf(name, "%d", i+1);
635 (void) debugfs_create_file(name, S_IRUGO,
636 pm_dbg_dir, (void *)(i+1), &debug_reg_fops);
637
638 }
639
640 (void) debugfs_create_file("enable_off_mode", S_IRUGO | S_IWUSR, d, 277 (void) debugfs_create_file("enable_off_mode", S_IRUGO | S_IWUSR, d,
641 &enable_off_mode, &pm_dbg_option_fops); 278 &enable_off_mode, &pm_dbg_option_fops);
642 (void) debugfs_create_file("sleep_while_idle", S_IRUGO | S_IWUSR, d,
643 &sleep_while_idle, &pm_dbg_option_fops);
644 (void) debugfs_create_file("wakeup_timer_seconds", S_IRUGO | S_IWUSR, d,
645 &wakeup_timer_seconds, &pm_dbg_option_fops);
646 (void) debugfs_create_file("wakeup_timer_milliseconds",
647 S_IRUGO | S_IWUSR, d, &wakeup_timer_milliseconds,
648 &pm_dbg_option_fops);
649 pm_dbg_init_done = 1; 279 pm_dbg_init_done = 1;
650 280
651 return 0; 281 return 0;
diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c
index 49486f522dc..3feb35911a3 100644
--- a/arch/arm/mach-omap2/pm.c
+++ b/arch/arm/mach-omap2/pm.c
@@ -106,8 +106,9 @@ static void omap2_init_processor_devices(void)
106int omap_set_pwrdm_state(struct powerdomain *pwrdm, u32 state) 106int omap_set_pwrdm_state(struct powerdomain *pwrdm, u32 state)
107{ 107{
108 u32 cur_state; 108 u32 cur_state;
109 int sleep_switch = 0; 109 int sleep_switch = -1;
110 int ret = 0; 110 int ret = 0;
111 int hwsup = 0;
111 112
112 if (pwrdm == NULL || IS_ERR(pwrdm)) 113 if (pwrdm == NULL || IS_ERR(pwrdm))
113 return -EINVAL; 114 return -EINVAL;
@@ -127,6 +128,7 @@ int omap_set_pwrdm_state(struct powerdomain *pwrdm, u32 state)
127 (pwrdm->flags & PWRDM_HAS_LOWPOWERSTATECHANGE)) { 128 (pwrdm->flags & PWRDM_HAS_LOWPOWERSTATECHANGE)) {
128 sleep_switch = LOWPOWERSTATE_SWITCH; 129 sleep_switch = LOWPOWERSTATE_SWITCH;
129 } else { 130 } else {
131 hwsup = clkdm_in_hwsup(pwrdm->pwrdm_clkdms[0]);
130 clkdm_wakeup(pwrdm->pwrdm_clkdms[0]); 132 clkdm_wakeup(pwrdm->pwrdm_clkdms[0]);
131 pwrdm_wait_transition(pwrdm); 133 pwrdm_wait_transition(pwrdm);
132 sleep_switch = FORCEWAKEUP_SWITCH; 134 sleep_switch = FORCEWAKEUP_SWITCH;
@@ -142,7 +144,7 @@ int omap_set_pwrdm_state(struct powerdomain *pwrdm, u32 state)
142 144
143 switch (sleep_switch) { 145 switch (sleep_switch) {
144 case FORCEWAKEUP_SWITCH: 146 case FORCEWAKEUP_SWITCH:
145 if (pwrdm->pwrdm_clkdms[0]->flags & CLKDM_CAN_ENABLE_AUTO) 147 if (hwsup)
146 clkdm_allow_idle(pwrdm->pwrdm_clkdms[0]); 148 clkdm_allow_idle(pwrdm->pwrdm_clkdms[0]);
147 else 149 else
148 clkdm_sleep(pwrdm->pwrdm_clkdms[0]); 150 clkdm_sleep(pwrdm->pwrdm_clkdms[0]);
diff --git a/arch/arm/mach-omap2/pm.h b/arch/arm/mach-omap2/pm.h
index 04ee5664612..4e166add2f3 100644
--- a/arch/arm/mach-omap2/pm.h
+++ b/arch/arm/mach-omap2/pm.h
@@ -60,32 +60,16 @@ inline void omap3_pm_init_cpuidle(struct cpuidle_params *cpuidle_board_params)
60extern int omap3_pm_get_suspend_state(struct powerdomain *pwrdm); 60extern int omap3_pm_get_suspend_state(struct powerdomain *pwrdm);
61extern int omap3_pm_set_suspend_state(struct powerdomain *pwrdm, int state); 61extern int omap3_pm_set_suspend_state(struct powerdomain *pwrdm, int state);
62 62
63extern u32 wakeup_timer_seconds;
64extern u32 wakeup_timer_milliseconds;
65extern struct omap_dm_timer *gptimer_wakeup;
66
67#ifdef CONFIG_PM_DEBUG 63#ifdef CONFIG_PM_DEBUG
68extern void omap2_pm_dump(int mode, int resume, unsigned int us);
69extern void omap2_pm_wakeup_on_timer(u32 seconds, u32 milliseconds);
70extern int omap2_pm_debug;
71extern u32 enable_off_mode; 64extern u32 enable_off_mode;
72extern u32 sleep_while_idle;
73#else 65#else
74#define omap2_pm_dump(mode, resume, us) do {} while (0);
75#define omap2_pm_wakeup_on_timer(seconds, milliseconds) do {} while (0);
76#define omap2_pm_debug 0
77#define enable_off_mode 0 66#define enable_off_mode 0
78#define sleep_while_idle 0
79#endif 67#endif
80 68
81#if defined(CONFIG_PM_DEBUG) && defined(CONFIG_DEBUG_FS) 69#if defined(CONFIG_PM_DEBUG) && defined(CONFIG_DEBUG_FS)
82extern void pm_dbg_update_time(struct powerdomain *pwrdm, int prev); 70extern void pm_dbg_update_time(struct powerdomain *pwrdm, int prev);
83extern int pm_dbg_regset_save(int reg_set);
84extern int pm_dbg_regset_init(int reg_set);
85#else 71#else
86#define pm_dbg_update_time(pwrdm, prev) do {} while (0); 72#define pm_dbg_update_time(pwrdm, prev) do {} while (0);
87#define pm_dbg_regset_save(reg_set) do {} while (0);
88#define pm_dbg_regset_init(reg_set) do {} while (0);
89#endif /* CONFIG_PM_DEBUG */ 73#endif /* CONFIG_PM_DEBUG */
90 74
91/* 24xx */ 75/* 24xx */
diff --git a/arch/arm/mach-omap2/pm24xx.c b/arch/arm/mach-omap2/pm24xx.c
index df3ded6fe19..bf089e743ed 100644
--- a/arch/arm/mach-omap2/pm24xx.c
+++ b/arch/arm/mach-omap2/pm24xx.c
@@ -53,6 +53,8 @@
53#include "powerdomain.h" 53#include "powerdomain.h"
54#include "clockdomain.h" 54#include "clockdomain.h"
55 55
56static int omap2_pm_debug;
57
56#ifdef CONFIG_SUSPEND 58#ifdef CONFIG_SUSPEND
57static suspend_state_t suspend_state = PM_SUSPEND_ON; 59static suspend_state_t suspend_state = PM_SUSPEND_ON;
58static inline bool is_suspending(void) 60static inline bool is_suspending(void)
@@ -123,7 +125,6 @@ static void omap2_enter_full_retention(void)
123 omap2_gpio_prepare_for_idle(0); 125 omap2_gpio_prepare_for_idle(0);
124 126
125 if (omap2_pm_debug) { 127 if (omap2_pm_debug) {
126 omap2_pm_dump(0, 0, 0);
127 getnstimeofday(&ts_preidle); 128 getnstimeofday(&ts_preidle);
128 } 129 }
129 130
@@ -160,7 +161,6 @@ no_sleep:
160 getnstimeofday(&ts_postidle); 161 getnstimeofday(&ts_postidle);
161 ts_idle = timespec_sub(ts_postidle, ts_preidle); 162 ts_idle = timespec_sub(ts_postidle, ts_preidle);
162 tmp = timespec_to_ns(&ts_idle) * NSEC_PER_USEC; 163 tmp = timespec_to_ns(&ts_idle) * NSEC_PER_USEC;
163 omap2_pm_dump(0, 1, tmp);
164 } 164 }
165 omap2_gpio_resume_after_idle(); 165 omap2_gpio_resume_after_idle();
166 166
@@ -247,7 +247,6 @@ static void omap2_enter_mpu_retention(void)
247 } 247 }
248 248
249 if (omap2_pm_debug) { 249 if (omap2_pm_debug) {
250 omap2_pm_dump(only_idle ? 2 : 1, 0, 0);
251 getnstimeofday(&ts_preidle); 250 getnstimeofday(&ts_preidle);
252 } 251 }
253 252
@@ -259,7 +258,6 @@ static void omap2_enter_mpu_retention(void)
259 getnstimeofday(&ts_postidle); 258 getnstimeofday(&ts_postidle);
260 ts_idle = timespec_sub(ts_postidle, ts_preidle); 259 ts_idle = timespec_sub(ts_postidle, ts_preidle);
261 tmp = timespec_to_ns(&ts_idle) * NSEC_PER_USEC; 260 tmp = timespec_to_ns(&ts_idle) * NSEC_PER_USEC;
262 omap2_pm_dump(only_idle ? 2 : 1, 1, tmp);
263 } 261 }
264} 262}
265 263
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
index b77d82665ab..7255d9bce86 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -485,8 +485,6 @@ console_still_active:
485 485
486int omap3_can_sleep(void) 486int omap3_can_sleep(void)
487{ 487{
488 if (!sleep_while_idle)
489 return 0;
490 if (!omap_uart_can_sleep()) 488 if (!omap_uart_can_sleep())
491 return 0; 489 return 0;
492 return 1; 490 return 1;
@@ -522,10 +520,6 @@ static int omap3_pm_suspend(void)
522 struct power_state *pwrst; 520 struct power_state *pwrst;
523 int state, ret = 0; 521 int state, ret = 0;
524 522
525 if (wakeup_timer_seconds || wakeup_timer_milliseconds)
526 omap2_pm_wakeup_on_timer(wakeup_timer_seconds,
527 wakeup_timer_milliseconds);
528
529 /* Read current next_pwrsts */ 523 /* Read current next_pwrsts */
530 list_for_each_entry(pwrst, &pwrst_list, node) 524 list_for_each_entry(pwrst, &pwrst_list, node)
531 pwrst->saved_state = pwrdm_read_next_pwrst(pwrst->pwrdm); 525 pwrst->saved_state = pwrdm_read_next_pwrst(pwrst->pwrdm);
diff --git a/arch/arm/mach-omap2/powerdomains44xx_data.c b/arch/arm/mach-omap2/powerdomains44xx_data.c
index c4222c7036a..247e7949511 100644
--- a/arch/arm/mach-omap2/powerdomains44xx_data.c
+++ b/arch/arm/mach-omap2/powerdomains44xx_data.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * OMAP4 Power domains framework 2 * OMAP4 Power domains framework
3 * 3 *
4 * Copyright (C) 2009-2010 Texas Instruments, Inc. 4 * Copyright (C) 2009-2011 Texas Instruments, Inc.
5 * Copyright (C) 2009-2011 Nokia Corporation 5 * Copyright (C) 2009-2011 Nokia Corporation
6 * 6 *
7 * Abhijit Pagare (abhijitpagare@ti.com) 7 * Abhijit Pagare (abhijitpagare@ti.com)
@@ -41,19 +41,19 @@ static struct powerdomain core_44xx_pwrdm = {
41 .banks = 5, 41 .banks = 5,
42 .pwrsts_mem_ret = { 42 .pwrsts_mem_ret = {
43 [0] = PWRSTS_OFF, /* core_nret_bank */ 43 [0] = PWRSTS_OFF, /* core_nret_bank */
44 [1] = PWRSTS_OFF_RET, /* core_ocmram */ 44 [1] = PWRSTS_RET, /* core_ocmram */
45 [2] = PWRSTS_RET, /* core_other_bank */ 45 [2] = PWRSTS_RET, /* core_other_bank */
46 [3] = PWRSTS_OFF_RET, /* ducati_l2ram */ 46 [3] = PWRSTS_OFF_RET, /* ducati_l2ram */
47 [4] = PWRSTS_OFF_RET, /* ducati_unicache */ 47 [4] = PWRSTS_OFF_RET, /* ducati_unicache */
48 }, 48 },
49 .pwrsts_mem_on = { 49 .pwrsts_mem_on = {
50 [0] = PWRSTS_ON, /* core_nret_bank */ 50 [0] = PWRSTS_ON, /* core_nret_bank */
51 [1] = PWRSTS_OFF_RET, /* core_ocmram */ 51 [1] = PWRSTS_ON, /* core_ocmram */
52 [2] = PWRSTS_ON, /* core_other_bank */ 52 [2] = PWRSTS_ON, /* core_other_bank */
53 [3] = PWRSTS_ON, /* ducati_l2ram */ 53 [3] = PWRSTS_ON, /* ducati_l2ram */
54 [4] = PWRSTS_ON, /* ducati_unicache */ 54 [4] = PWRSTS_ON, /* ducati_unicache */
55 }, 55 },
56 .flags = PWRDM_HAS_LOWPOWERSTATECHANGE, 56 .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
57}; 57};
58 58
59/* gfx_44xx_pwrdm: 3D accelerator power domain */ 59/* gfx_44xx_pwrdm: 3D accelerator power domain */
@@ -70,7 +70,7 @@ static struct powerdomain gfx_44xx_pwrdm = {
70 .pwrsts_mem_on = { 70 .pwrsts_mem_on = {
71 [0] = PWRSTS_ON, /* gfx_mem */ 71 [0] = PWRSTS_ON, /* gfx_mem */
72 }, 72 },
73 .flags = PWRDM_HAS_LOWPOWERSTATECHANGE, 73 .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
74}; 74};
75 75
76/* abe_44xx_pwrdm: Audio back end power domain */ 76/* abe_44xx_pwrdm: Audio back end power domain */
@@ -90,7 +90,7 @@ static struct powerdomain abe_44xx_pwrdm = {
90 [0] = PWRSTS_ON, /* aessmem */ 90 [0] = PWRSTS_ON, /* aessmem */
91 [1] = PWRSTS_ON, /* periphmem */ 91 [1] = PWRSTS_ON, /* periphmem */
92 }, 92 },
93 .flags = PWRDM_HAS_LOWPOWERSTATECHANGE, 93 .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
94}; 94};
95 95
96/* dss_44xx_pwrdm: Display subsystem power domain */ 96/* dss_44xx_pwrdm: Display subsystem power domain */
@@ -108,7 +108,7 @@ static struct powerdomain dss_44xx_pwrdm = {
108 .pwrsts_mem_on = { 108 .pwrsts_mem_on = {
109 [0] = PWRSTS_ON, /* dss_mem */ 109 [0] = PWRSTS_ON, /* dss_mem */
110 }, 110 },
111 .flags = PWRDM_HAS_LOWPOWERSTATECHANGE, 111 .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
112}; 112};
113 113
114/* tesla_44xx_pwrdm: Tesla processor power domain */ 114/* tesla_44xx_pwrdm: Tesla processor power domain */
@@ -130,7 +130,7 @@ static struct powerdomain tesla_44xx_pwrdm = {
130 [1] = PWRSTS_ON, /* tesla_l1 */ 130 [1] = PWRSTS_ON, /* tesla_l1 */
131 [2] = PWRSTS_ON, /* tesla_l2 */ 131 [2] = PWRSTS_ON, /* tesla_l2 */
132 }, 132 },
133 .flags = PWRDM_HAS_LOWPOWERSTATECHANGE, 133 .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
134}; 134};
135 135
136/* wkup_44xx_pwrdm: Wake-up power domain */ 136/* wkup_44xx_pwrdm: Wake-up power domain */
@@ -205,7 +205,7 @@ static struct powerdomain mpu_44xx_pwrdm = {
205 .prcm_offs = OMAP4430_PRM_MPU_INST, 205 .prcm_offs = OMAP4430_PRM_MPU_INST,
206 .prcm_partition = OMAP4430_PRM_PARTITION, 206 .prcm_partition = OMAP4430_PRM_PARTITION,
207 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), 207 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
208 .pwrsts = PWRSTS_OFF_RET_ON, 208 .pwrsts = PWRSTS_RET_ON,
209 .pwrsts_logic_ret = PWRSTS_OFF_RET, 209 .pwrsts_logic_ret = PWRSTS_OFF_RET,
210 .banks = 3, 210 .banks = 3,
211 .pwrsts_mem_ret = { 211 .pwrsts_mem_ret = {
@@ -241,7 +241,7 @@ static struct powerdomain ivahd_44xx_pwrdm = {
241 [2] = PWRSTS_ON, /* tcm1_mem */ 241 [2] = PWRSTS_ON, /* tcm1_mem */
242 [3] = PWRSTS_ON, /* tcm2_mem */ 242 [3] = PWRSTS_ON, /* tcm2_mem */
243 }, 243 },
244 .flags = PWRDM_HAS_LOWPOWERSTATECHANGE, 244 .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
245}; 245};
246 246
247/* cam_44xx_pwrdm: Camera subsystem power domain */ 247/* cam_44xx_pwrdm: Camera subsystem power domain */
@@ -258,7 +258,7 @@ static struct powerdomain cam_44xx_pwrdm = {
258 .pwrsts_mem_on = { 258 .pwrsts_mem_on = {
259 [0] = PWRSTS_ON, /* cam_mem */ 259 [0] = PWRSTS_ON, /* cam_mem */
260 }, 260 },
261 .flags = PWRDM_HAS_LOWPOWERSTATECHANGE, 261 .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
262}; 262};
263 263
264/* l3init_44xx_pwrdm: L3 initators pheripherals power domain */ 264/* l3init_44xx_pwrdm: L3 initators pheripherals power domain */
@@ -276,7 +276,7 @@ static struct powerdomain l3init_44xx_pwrdm = {
276 .pwrsts_mem_on = { 276 .pwrsts_mem_on = {
277 [0] = PWRSTS_ON, /* l3init_bank1 */ 277 [0] = PWRSTS_ON, /* l3init_bank1 */
278 }, 278 },
279 .flags = PWRDM_HAS_LOWPOWERSTATECHANGE, 279 .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
280}; 280};
281 281
282/* l4per_44xx_pwrdm: Target peripherals power domain */ 282/* l4per_44xx_pwrdm: Target peripherals power domain */
@@ -296,7 +296,7 @@ static struct powerdomain l4per_44xx_pwrdm = {
296 [0] = PWRSTS_ON, /* nonretained_bank */ 296 [0] = PWRSTS_ON, /* nonretained_bank */
297 [1] = PWRSTS_ON, /* retained_bank */ 297 [1] = PWRSTS_ON, /* retained_bank */
298 }, 298 },
299 .flags = PWRDM_HAS_LOWPOWERSTATECHANGE, 299 .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
300}; 300};
301 301
302/* 302/*
@@ -318,6 +318,7 @@ static struct powerdomain cefuse_44xx_pwrdm = {
318 .prcm_partition = OMAP4430_PRM_PARTITION, 318 .prcm_partition = OMAP4430_PRM_PARTITION,
319 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), 319 .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
320 .pwrsts = PWRSTS_OFF_ON, 320 .pwrsts = PWRSTS_OFF_ON,
321 .flags = PWRDM_HAS_LOWPOWERSTATECHANGE,
321}; 322};
322 323
323/* 324/*
diff --git a/arch/arm/mach-omap2/prcm.c b/arch/arm/mach-omap2/prcm.c
index 6be14389e4f..2e40a5cf016 100644
--- a/arch/arm/mach-omap2/prcm.c
+++ b/arch/arm/mach-omap2/prcm.c
@@ -70,7 +70,7 @@ static void omap_prcm_arch_reset(char mode, const char *cmd)
70 prcm_offs = OMAP3430_GR_MOD; 70 prcm_offs = OMAP3430_GR_MOD;
71 omap3_ctrl_write_boot_mode((cmd ? (u8)*cmd : 0)); 71 omap3_ctrl_write_boot_mode((cmd ? (u8)*cmd : 0));
72 } else if (cpu_is_omap44xx()) { 72 } else if (cpu_is_omap44xx()) {
73 omap4_prm_global_warm_sw_reset(); /* never returns */ 73 omap4_prminst_global_warm_sw_reset(); /* never returns */
74 } else { 74 } else {
75 WARN_ON(1); 75 WARN_ON(1);
76 } 76 }
diff --git a/arch/arm/mach-omap2/prcm_mpu44xx.h b/arch/arm/mach-omap2/prcm_mpu44xx.h
index d22d1b43bcc..8a6e250f04b 100644
--- a/arch/arm/mach-omap2/prcm_mpu44xx.h
+++ b/arch/arm/mach-omap2/prcm_mpu44xx.h
@@ -31,7 +31,6 @@
31 OMAP2_L4_IO_ADDRESS(OMAP4430_PRCM_MPU_BASE + (inst) + (reg)) 31 OMAP2_L4_IO_ADDRESS(OMAP4430_PRCM_MPU_BASE + (inst) + (reg))
32 32
33/* PRCM_MPU instances */ 33/* PRCM_MPU instances */
34
35#define OMAP4430_PRCM_MPU_OCP_SOCKET_PRCM_INST 0x0000 34#define OMAP4430_PRCM_MPU_OCP_SOCKET_PRCM_INST 0x0000
36#define OMAP4430_PRCM_MPU_DEVICE_PRM_INST 0x0200 35#define OMAP4430_PRCM_MPU_DEVICE_PRM_INST 0x0200
37#define OMAP4430_PRCM_MPU_CPU0_INST 0x0400 36#define OMAP4430_PRCM_MPU_CPU0_INST 0x0400
@@ -52,46 +51,46 @@
52 */ 51 */
53 52
54/* PRCM_MPU.OCP_SOCKET_PRCM register offsets */ 53/* PRCM_MPU.OCP_SOCKET_PRCM register offsets */
55#define OMAP4_REVISION_PRCM_OFFSET 0x0000 54#define OMAP4_REVISION_PRCM_OFFSET 0x0000
56#define OMAP4430_REVISION_PRCM OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_OCP_SOCKET_PRCM_INST, 0x0000) 55#define OMAP4430_REVISION_PRCM OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_OCP_SOCKET_PRCM_INST, 0x0000)
57 56
58/* PRCM_MPU.DEVICE_PRM register offsets */ 57/* PRCM_MPU.DEVICE_PRM register offsets */
59#define OMAP4_PRCM_MPU_PRM_RSTST_OFFSET 0x0000 58#define OMAP4_PRCM_MPU_PRM_RSTST_OFFSET 0x0000
60#define OMAP4430_PRCM_MPU_PRM_RSTST OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_DEVICE_PRM_INST, 0x0000) 59#define OMAP4430_PRCM_MPU_PRM_RSTST OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_DEVICE_PRM_INST, 0x0000)
61#define OMAP4_PRCM_MPU_PRM_PSCON_COUNT_OFFSET 0x0004 60#define OMAP4_PRCM_MPU_PRM_PSCON_COUNT_OFFSET 0x0004
62#define OMAP4430_PRCM_MPU_PRM_PSCON_COUNT OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_DEVICE_PRM_INST, 0x0004) 61#define OMAP4430_PRCM_MPU_PRM_PSCON_COUNT OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_DEVICE_PRM_INST, 0x0004)
63 62
64/* PRCM_MPU.CPU0 register offsets */ 63/* PRCM_MPU.CPU0 register offsets */
65#define OMAP4_PM_CPU0_PWRSTCTRL_OFFSET 0x0000 64#define OMAP4_PM_CPU0_PWRSTCTRL_OFFSET 0x0000
66#define OMAP4430_PM_CPU0_PWRSTCTRL OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU0_INST, 0x0000) 65#define OMAP4430_PM_CPU0_PWRSTCTRL OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU0_INST, 0x0000)
67#define OMAP4_PM_CPU0_PWRSTST_OFFSET 0x0004 66#define OMAP4_PM_CPU0_PWRSTST_OFFSET 0x0004
68#define OMAP4430_PM_CPU0_PWRSTST OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU0_INST, 0x0004) 67#define OMAP4430_PM_CPU0_PWRSTST OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU0_INST, 0x0004)
69#define OMAP4_RM_CPU0_CPU0_CONTEXT_OFFSET 0x0008 68#define OMAP4_RM_CPU0_CPU0_CONTEXT_OFFSET 0x0008
70#define OMAP4430_RM_CPU0_CPU0_CONTEXT OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU0_INST, 0x0008) 69#define OMAP4430_RM_CPU0_CPU0_CONTEXT OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU0_INST, 0x0008)
71#define OMAP4_RM_CPU0_CPU0_RSTCTRL_OFFSET 0x000c 70#define OMAP4_RM_CPU0_CPU0_RSTCTRL_OFFSET 0x000c
72#define OMAP4430_RM_CPU0_CPU0_RSTCTRL OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU0_INST, 0x000c) 71#define OMAP4430_RM_CPU0_CPU0_RSTCTRL OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU0_INST, 0x000c)
73#define OMAP4_RM_CPU0_CPU0_RSTST_OFFSET 0x0010 72#define OMAP4_RM_CPU0_CPU0_RSTST_OFFSET 0x0010
74#define OMAP4430_RM_CPU0_CPU0_RSTST OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU0_INST, 0x0010) 73#define OMAP4430_RM_CPU0_CPU0_RSTST OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU0_INST, 0x0010)
75#define OMAP4_CM_CPU0_CPU0_CLKCTRL_OFFSET 0x0014 74#define OMAP4_CM_CPU0_CPU0_CLKCTRL_OFFSET 0x0014
76#define OMAP4430_CM_CPU0_CPU0_CLKCTRL OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU0_INST, 0x0014) 75#define OMAP4430_CM_CPU0_CPU0_CLKCTRL OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU0_INST, 0x0014)
77#define OMAP4_CM_CPU0_CLKSTCTRL_OFFSET 0x0018 76#define OMAP4_CM_CPU0_CLKSTCTRL_OFFSET 0x0018
78#define OMAP4430_CM_CPU0_CLKSTCTRL OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU0_INST, 0x0018) 77#define OMAP4430_CM_CPU0_CLKSTCTRL OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU0_INST, 0x0018)
79 78
80/* PRCM_MPU.CPU1 register offsets */ 79/* PRCM_MPU.CPU1 register offsets */
81#define OMAP4_PM_CPU1_PWRSTCTRL_OFFSET 0x0000 80#define OMAP4_PM_CPU1_PWRSTCTRL_OFFSET 0x0000
82#define OMAP4430_PM_CPU1_PWRSTCTRL OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU1_INST, 0x0000) 81#define OMAP4430_PM_CPU1_PWRSTCTRL OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU1_INST, 0x0000)
83#define OMAP4_PM_CPU1_PWRSTST_OFFSET 0x0004 82#define OMAP4_PM_CPU1_PWRSTST_OFFSET 0x0004
84#define OMAP4430_PM_CPU1_PWRSTST OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU1_INST, 0x0004) 83#define OMAP4430_PM_CPU1_PWRSTST OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU1_INST, 0x0004)
85#define OMAP4_RM_CPU1_CPU1_CONTEXT_OFFSET 0x0008 84#define OMAP4_RM_CPU1_CPU1_CONTEXT_OFFSET 0x0008
86#define OMAP4430_RM_CPU1_CPU1_CONTEXT OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU1_INST, 0x0008) 85#define OMAP4430_RM_CPU1_CPU1_CONTEXT OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU1_INST, 0x0008)
87#define OMAP4_RM_CPU1_CPU1_RSTCTRL_OFFSET 0x000c 86#define OMAP4_RM_CPU1_CPU1_RSTCTRL_OFFSET 0x000c
88#define OMAP4430_RM_CPU1_CPU1_RSTCTRL OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU1_INST, 0x000c) 87#define OMAP4430_RM_CPU1_CPU1_RSTCTRL OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU1_INST, 0x000c)
89#define OMAP4_RM_CPU1_CPU1_RSTST_OFFSET 0x0010 88#define OMAP4_RM_CPU1_CPU1_RSTST_OFFSET 0x0010
90#define OMAP4430_RM_CPU1_CPU1_RSTST OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU1_INST, 0x0010) 89#define OMAP4430_RM_CPU1_CPU1_RSTST OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU1_INST, 0x0010)
91#define OMAP4_CM_CPU1_CPU1_CLKCTRL_OFFSET 0x0014 90#define OMAP4_CM_CPU1_CPU1_CLKCTRL_OFFSET 0x0014
92#define OMAP4430_CM_CPU1_CPU1_CLKCTRL OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU1_INST, 0x0014) 91#define OMAP4430_CM_CPU1_CPU1_CLKCTRL OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU1_INST, 0x0014)
93#define OMAP4_CM_CPU1_CLKSTCTRL_OFFSET 0x0018 92#define OMAP4_CM_CPU1_CLKSTCTRL_OFFSET 0x0018
94#define OMAP4430_CM_CPU1_CLKSTCTRL OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU1_INST, 0x0018) 93#define OMAP4430_CM_CPU1_CLKSTCTRL OMAP44XX_PRCM_MPU_REGADDR(OMAP4430_PRCM_MPU_CPU1_INST, 0x0018)
95 94
96/* Function prototypes */ 95/* Function prototypes */
97# ifndef __ASSEMBLER__ 96# ifndef __ASSEMBLER__
diff --git a/arch/arm/mach-omap2/prm-regbits-44xx.h b/arch/arm/mach-omap2/prm-regbits-44xx.h
index 6d2776f6fc0..3cb247bebda 100644
--- a/arch/arm/mach-omap2/prm-regbits-44xx.h
+++ b/arch/arm/mach-omap2/prm-regbits-44xx.h
@@ -283,6 +283,14 @@
283#define OMAP4430_DUCATI_UNICACHE_STATEST_SHIFT 10 283#define OMAP4430_DUCATI_UNICACHE_STATEST_SHIFT 10
284#define OMAP4430_DUCATI_UNICACHE_STATEST_MASK (0x3 << 10) 284#define OMAP4430_DUCATI_UNICACHE_STATEST_MASK (0x3 << 10)
285 285
286/* Used by PRM_DEVICE_OFF_CTRL */
287#define OMAP4460_EMIF1_OFFWKUP_DISABLE_SHIFT 8
288#define OMAP4460_EMIF1_OFFWKUP_DISABLE_MASK (1 << 8)
289
290/* Used by PRM_DEVICE_OFF_CTRL */
291#define OMAP4460_EMIF2_OFFWKUP_DISABLE_SHIFT 9
292#define OMAP4460_EMIF2_OFFWKUP_DISABLE_MASK (1 << 9)
293
286/* Used by RM_MPU_RSTST */ 294/* Used by RM_MPU_RSTST */
287#define OMAP4430_EMULATION_RST_SHIFT 0 295#define OMAP4430_EMULATION_RST_SHIFT 0
288#define OMAP4430_EMULATION_RST_MASK (1 << 0) 296#define OMAP4430_EMULATION_RST_MASK (1 << 0)
diff --git a/arch/arm/mach-omap2/prm44xx.c b/arch/arm/mach-omap2/prm44xx.c
index a2a04bfa962..00165558fc4 100644
--- a/arch/arm/mach-omap2/prm44xx.c
+++ b/arch/arm/mach-omap2/prm44xx.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * OMAP4 PRM module functions 2 * OMAP4 PRM module functions
3 * 3 *
4 * Copyright (C) 2010 Texas Instruments, Inc. 4 * Copyright (C) 2011 Texas Instruments, Inc.
5 * Copyright (C) 2010 Nokia Corporation 5 * Copyright (C) 2010 Nokia Corporation
6 * Benoît Cousson 6 * Benoît Cousson
7 * Paul Walmsley 7 * Paul Walmsley
@@ -24,12 +24,6 @@
24#include "prm44xx.h" 24#include "prm44xx.h"
25#include "prm-regbits-44xx.h" 25#include "prm-regbits-44xx.h"
26 26
27/*
28 * Address offset (in bytes) between the reset control and the reset
29 * status registers: 4 bytes on OMAP4
30 */
31#define OMAP4_RST_CTRL_ST_OFFSET 4
32
33/* PRM low-level functions */ 27/* PRM low-level functions */
34 28
35/* Read a register in a CM/PRM instance in the PRM module */ 29/* Read a register in a CM/PRM instance in the PRM module */
@@ -56,140 +50,3 @@ u32 omap4_prm_rmw_inst_reg_bits(u32 mask, u32 bits, s16 inst, s16 reg)
56 50
57 return v; 51 return v;
58} 52}
59
60/* Read a PRM register, AND it, and shift the result down to bit 0 */
61/* XXX deprecated */
62u32 omap4_prm_read_bits_shift(void __iomem *reg, u32 mask)
63{
64 u32 v;
65
66 v = __raw_readl(reg);
67 v &= mask;
68 v >>= __ffs(mask);
69
70 return v;
71}
72
73/* Read-modify-write a register in a PRM module. Caller must lock */
74/* XXX deprecated */
75u32 omap4_prm_rmw_reg_bits(u32 mask, u32 bits, void __iomem *reg)
76{
77 u32 v;
78
79 v = __raw_readl(reg);
80 v &= ~mask;
81 v |= bits;
82 __raw_writel(v, reg);
83
84 return v;
85}
86
87u32 omap4_prm_set_inst_reg_bits(u32 bits, s16 inst, s16 reg)
88{
89 return omap4_prm_rmw_inst_reg_bits(bits, bits, inst, reg);
90}
91
92u32 omap4_prm_clear_inst_reg_bits(u32 bits, s16 inst, s16 reg)
93{
94 return omap4_prm_rmw_inst_reg_bits(bits, 0x0, inst, reg);
95}
96
97/**
98 * omap4_prm_is_hardreset_asserted - read the HW reset line state of
99 * submodules contained in the hwmod module
100 * @rstctrl_reg: RM_RSTCTRL register address for this module
101 * @shift: register bit shift corresponding to the reset line to check
102 *
103 * Returns 1 if the (sub)module hardreset line is currently asserted,
104 * 0 if the (sub)module hardreset line is not currently asserted, or
105 * -EINVAL upon parameter error.
106 */
107int omap4_prm_is_hardreset_asserted(void __iomem *rstctrl_reg, u8 shift)
108{
109 if (!cpu_is_omap44xx() || !rstctrl_reg)
110 return -EINVAL;
111
112 return omap4_prm_read_bits_shift(rstctrl_reg, (1 << shift));
113}
114
115/**
116 * omap4_prm_assert_hardreset - assert the HW reset line of a submodule
117 * @rstctrl_reg: RM_RSTCTRL register address for this module
118 * @shift: register bit shift corresponding to the reset line to assert
119 *
120 * Some IPs like dsp, ipu or iva contain processors that require an HW
121 * reset line to be asserted / deasserted in order to fully enable the
122 * IP. These modules may have multiple hard-reset lines that reset
123 * different 'submodules' inside the IP block. This function will
124 * place the submodule into reset. Returns 0 upon success or -EINVAL
125 * upon an argument error.
126 */
127int omap4_prm_assert_hardreset(void __iomem *rstctrl_reg, u8 shift)
128{
129 u32 mask;
130
131 if (!cpu_is_omap44xx() || !rstctrl_reg)
132 return -EINVAL;
133
134 mask = 1 << shift;
135 omap4_prm_rmw_reg_bits(mask, mask, rstctrl_reg);
136
137 return 0;
138}
139
140/**
141 * omap4_prm_deassert_hardreset - deassert a submodule hardreset line and wait
142 * @rstctrl_reg: RM_RSTCTRL register address for this module
143 * @shift: register bit shift corresponding to the reset line to deassert
144 *
145 * Some IPs like dsp, ipu or iva contain processors that require an HW
146 * reset line to be asserted / deasserted in order to fully enable the
147 * IP. These modules may have multiple hard-reset lines that reset
148 * different 'submodules' inside the IP block. This function will
149 * take the submodule out of reset and wait until the PRCM indicates
150 * that the reset has completed before returning. Returns 0 upon success or
151 * -EINVAL upon an argument error, -EEXIST if the submodule was already out
152 * of reset, or -EBUSY if the submodule did not exit reset promptly.
153 */
154int omap4_prm_deassert_hardreset(void __iomem *rstctrl_reg, u8 shift)
155{
156 u32 mask;
157 void __iomem *rstst_reg;
158 int c;
159
160 if (!cpu_is_omap44xx() || !rstctrl_reg)
161 return -EINVAL;
162
163 rstst_reg = rstctrl_reg + OMAP4_RST_CTRL_ST_OFFSET;
164
165 mask = 1 << shift;
166
167 /* Check the current status to avoid de-asserting the line twice */
168 if (omap4_prm_read_bits_shift(rstctrl_reg, mask) == 0)
169 return -EEXIST;
170
171 /* Clear the reset status by writing 1 to the status bit */
172 omap4_prm_rmw_reg_bits(0xffffffff, mask, rstst_reg);
173 /* de-assert the reset control line */
174 omap4_prm_rmw_reg_bits(mask, 0, rstctrl_reg);
175 /* wait the status to be set */
176 omap_test_timeout(omap4_prm_read_bits_shift(rstst_reg, mask),
177 MAX_MODULE_HARDRESET_WAIT, c);
178
179 return (c == MAX_MODULE_HARDRESET_WAIT) ? -EBUSY : 0;
180}
181
182void omap4_prm_global_warm_sw_reset(void)
183{
184 u32 v;
185
186 v = omap4_prm_read_inst_reg(OMAP4430_PRM_DEVICE_INST,
187 OMAP4_RM_RSTCTRL);
188 v |= OMAP4430_RST_GLOBAL_WARM_SW_MASK;
189 omap4_prm_write_inst_reg(v, OMAP4430_PRM_DEVICE_INST,
190 OMAP4_RM_RSTCTRL);
191
192 /* OCP barrier */
193 v = omap4_prm_read_inst_reg(OMAP4430_PRM_DEVICE_INST,
194 OMAP4_RM_RSTCTRL);
195}
diff --git a/arch/arm/mach-omap2/prm44xx.h b/arch/arm/mach-omap2/prm44xx.h
index 67a0d3feb3f..7dfa379b625 100644
--- a/arch/arm/mach-omap2/prm44xx.h
+++ b/arch/arm/mach-omap2/prm44xx.h
@@ -31,7 +31,7 @@
31#define OMAP4430_PRM_BASE 0x4a306000 31#define OMAP4430_PRM_BASE 0x4a306000
32 32
33#define OMAP44XX_PRM_REGADDR(inst, reg) \ 33#define OMAP44XX_PRM_REGADDR(inst, reg) \
34 OMAP2_L4_IO_ADDRESS(OMAP4430_PRM_BASE + (inst) + (reg)) 34 OMAP2_L4_IO_ADDRESS(OMAP4430_PRM_BASE + (inst) + (reg))
35 35
36 36
37/* PRM instances */ 37/* PRM instances */
@@ -46,30 +46,18 @@
46#define OMAP4430_PRM_CAM_INST 0x1000 46#define OMAP4430_PRM_CAM_INST 0x1000
47#define OMAP4430_PRM_DSS_INST 0x1100 47#define OMAP4430_PRM_DSS_INST 0x1100
48#define OMAP4430_PRM_GFX_INST 0x1200 48#define OMAP4430_PRM_GFX_INST 0x1200
49#define OMAP4430_PRM_L3INIT_INST 0x1300 49#define OMAP4430_PRM_L3INIT_INST 0x1300
50#define OMAP4430_PRM_L4PER_INST 0x1400 50#define OMAP4430_PRM_L4PER_INST 0x1400
51#define OMAP4430_PRM_CEFUSE_INST 0x1600 51#define OMAP4430_PRM_CEFUSE_INST 0x1600
52#define OMAP4430_PRM_WKUP_INST 0x1700 52#define OMAP4430_PRM_WKUP_INST 0x1700
53#define OMAP4430_PRM_WKUP_CM_INST 0x1800 53#define OMAP4430_PRM_WKUP_CM_INST 0x1800
54#define OMAP4430_PRM_EMU_INST 0x1900 54#define OMAP4430_PRM_EMU_INST 0x1900
55#define OMAP4430_PRM_EMU_CM_INST 0x1a00 55#define OMAP4430_PRM_EMU_CM_INST 0x1a00
56#define OMAP4430_PRM_DEVICE_INST 0x1b00 56#define OMAP4430_PRM_DEVICE_INST 0x1b00
57#define OMAP4430_PRM_INSTR_INST 0x1f00 57#define OMAP4430_PRM_INSTR_INST 0x1f00
58 58
59/* PRM clockdomain register offsets (from instance start) */ 59/* PRM clockdomain register offsets (from instance start) */
60#define OMAP4430_PRM_MPU_MPU_CDOFFS 0x0000
61#define OMAP4430_PRM_TESLA_TESLA_CDOFFS 0x0000
62#define OMAP4430_PRM_ABE_ABE_CDOFFS 0x0000
63#define OMAP4430_PRM_CORE_CORE_CDOFFS 0x0000
64#define OMAP4430_PRM_IVAHD_IVAHD_CDOFFS 0x0000
65#define OMAP4430_PRM_CAM_CAM_CDOFFS 0x0000
66#define OMAP4430_PRM_DSS_DSS_CDOFFS 0x0000
67#define OMAP4430_PRM_GFX_GFX_CDOFFS 0x0000
68#define OMAP4430_PRM_L3INIT_L3INIT_CDOFFS 0x0000
69#define OMAP4430_PRM_L4PER_L4PER_CDOFFS 0x0000
70#define OMAP4430_PRM_CEFUSE_CEFUSE_CDOFFS 0x0000
71#define OMAP4430_PRM_WKUP_CM_WKUP_CDOFFS 0x0000 60#define OMAP4430_PRM_WKUP_CM_WKUP_CDOFFS 0x0000
72#define OMAP4430_PRM_EMU_EMU_CDOFFS 0x0000
73#define OMAP4430_PRM_EMU_CM_EMU_CDOFFS 0x0000 61#define OMAP4430_PRM_EMU_CM_EMU_CDOFFS 0x0000
74 62
75/* OMAP4 specific register offsets */ 63/* OMAP4 specific register offsets */
@@ -247,8 +235,8 @@
247#define OMAP4430_RM_MEMIF_DLL_H_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_CORE_INST, 0x0464) 235#define OMAP4430_RM_MEMIF_DLL_H_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_CORE_INST, 0x0464)
248#define OMAP4_RM_D2D_SAD2D_CONTEXT_OFFSET 0x0524 236#define OMAP4_RM_D2D_SAD2D_CONTEXT_OFFSET 0x0524
249#define OMAP4430_RM_D2D_SAD2D_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_CORE_INST, 0x0524) 237#define OMAP4430_RM_D2D_SAD2D_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_CORE_INST, 0x0524)
250#define OMAP4_RM_D2D_INSTEM_ICR_CONTEXT_OFFSET 0x052c 238#define OMAP4_RM_D2D_MODEM_ICR_CONTEXT_OFFSET 0x052c
251#define OMAP4430_RM_D2D_INSTEM_ICR_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_CORE_INST, 0x052c) 239#define OMAP4430_RM_D2D_MODEM_ICR_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_CORE_INST, 0x052c)
252#define OMAP4_RM_D2D_SAD2D_FW_CONTEXT_OFFSET 0x0534 240#define OMAP4_RM_D2D_SAD2D_FW_CONTEXT_OFFSET 0x0534
253#define OMAP4430_RM_D2D_SAD2D_FW_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_CORE_INST, 0x0534) 241#define OMAP4430_RM_D2D_SAD2D_FW_CONTEXT OMAP44XX_PRM_REGADDR(OMAP4430_PRM_CORE_INST, 0x0534)
254#define OMAP4_RM_L4CFG_L4_CFG_CONTEXT_OFFSET 0x0624 242#define OMAP4_RM_L4CFG_L4_CFG_CONTEXT_OFFSET 0x0624
@@ -713,8 +701,8 @@
713#define OMAP4430_PRM_VC_VAL_BYPASS OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_INST, 0x00a0) 701#define OMAP4430_PRM_VC_VAL_BYPASS OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_INST, 0x00a0)
714#define OMAP4_PRM_VC_CFG_CHANNEL_OFFSET 0x00a4 702#define OMAP4_PRM_VC_CFG_CHANNEL_OFFSET 0x00a4
715#define OMAP4430_PRM_VC_CFG_CHANNEL OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_INST, 0x00a4) 703#define OMAP4430_PRM_VC_CFG_CHANNEL OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_INST, 0x00a4)
716#define OMAP4_PRM_VC_CFG_I2C_INSTE_OFFSET 0x00a8 704#define OMAP4_PRM_VC_CFG_I2C_MODE_OFFSET 0x00a8
717#define OMAP4430_PRM_VC_CFG_I2C_INSTE OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_INST, 0x00a8) 705#define OMAP4430_PRM_VC_CFG_I2C_MODE OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_INST, 0x00a8)
718#define OMAP4_PRM_VC_CFG_I2C_CLK_OFFSET 0x00ac 706#define OMAP4_PRM_VC_CFG_I2C_CLK_OFFSET 0x00ac
719#define OMAP4430_PRM_VC_CFG_I2C_CLK OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_INST, 0x00ac) 707#define OMAP4430_PRM_VC_CFG_I2C_CLK OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_INST, 0x00ac)
720#define OMAP4_PRM_SRAM_COUNT_OFFSET 0x00b0 708#define OMAP4_PRM_SRAM_COUNT_OFFSET 0x00b0
@@ -751,8 +739,8 @@
751#define OMAP4430_PRM_PHASE2A_CNDP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_INST, 0x00ec) 739#define OMAP4430_PRM_PHASE2A_CNDP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_INST, 0x00ec)
752#define OMAP4_PRM_PHASE2B_CNDP_OFFSET 0x00f0 740#define OMAP4_PRM_PHASE2B_CNDP_OFFSET 0x00f0
753#define OMAP4430_PRM_PHASE2B_CNDP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_INST, 0x00f0) 741#define OMAP4430_PRM_PHASE2B_CNDP OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_INST, 0x00f0)
754#define OMAP4_PRM_INSTEM_IF_CTRL_OFFSET 0x00f4 742#define OMAP4_PRM_MODEM_IF_CTRL_OFFSET 0x00f4
755#define OMAP4430_PRM_INSTEM_IF_CTRL OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_INST, 0x00f4) 743#define OMAP4430_PRM_MODEM_IF_CTRL OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_INST, 0x00f4)
756#define OMAP4_PRM_VC_ERRST_OFFSET 0x00f8 744#define OMAP4_PRM_VC_ERRST_OFFSET 0x00f8
757#define OMAP4430_PRM_VC_ERRST OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_INST, 0x00f8) 745#define OMAP4430_PRM_VC_ERRST OMAP44XX_PRM_REGADDR(OMAP4430_PRM_DEVICE_INST, 0x00f8)
758 746
@@ -762,16 +750,6 @@
762extern u32 omap4_prm_read_inst_reg(s16 inst, u16 idx); 750extern u32 omap4_prm_read_inst_reg(s16 inst, u16 idx);
763extern void omap4_prm_write_inst_reg(u32 val, s16 inst, u16 idx); 751extern void omap4_prm_write_inst_reg(u32 val, s16 inst, u16 idx);
764extern u32 omap4_prm_rmw_inst_reg_bits(u32 mask, u32 bits, s16 inst, s16 idx); 752extern u32 omap4_prm_rmw_inst_reg_bits(u32 mask, u32 bits, s16 inst, s16 idx);
765extern u32 omap4_prm_rmw_reg_bits(u32 mask, u32 bits, void __iomem *reg);
766extern u32 omap4_prm_set_inst_reg_bits(u32 bits, s16 inst, s16 idx);
767extern u32 omap4_prm_clear_inst_reg_bits(u32 bits, s16 inst, s16 idx);
768extern u32 omap4_prm_read_bits_shift(void __iomem *reg, u32 mask);
769
770extern int omap4_prm_is_hardreset_asserted(void __iomem *rstctrl_reg, u8 shift);
771extern int omap4_prm_assert_hardreset(void __iomem *rstctrl_reg, u8 shift);
772extern int omap4_prm_deassert_hardreset(void __iomem *rstctrl_reg, u8 shift);
773
774extern void omap4_prm_global_warm_sw_reset(void);
775 753
776# endif 754# endif
777 755
diff --git a/arch/arm/mach-omap2/prminst44xx.c b/arch/arm/mach-omap2/prminst44xx.c
index a3032429727..3a7bab16edd 100644
--- a/arch/arm/mach-omap2/prminst44xx.c
+++ b/arch/arm/mach-omap2/prminst44xx.c
@@ -2,6 +2,7 @@
2 * OMAP4 PRM instance functions 2 * OMAP4 PRM instance functions
3 * 3 *
4 * Copyright (C) 2009 Nokia Corporation 4 * Copyright (C) 2009 Nokia Corporation
5 * Copyright (C) 2011 Texas Instruments, Inc.
5 * Paul Walmsley 6 * Paul Walmsley
6 * 7 *
7 * This program is free software; you can redistribute it and/or modify 8 * This program is free software; you can redistribute it and/or modify
@@ -53,7 +54,7 @@ void omap4_prminst_write_inst_reg(u32 val, u8 part, s16 inst, u16 idx)
53 54
54/* Read-modify-write a register in PRM. Caller must lock */ 55/* Read-modify-write a register in PRM. Caller must lock */
55u32 omap4_prminst_rmw_inst_reg_bits(u32 mask, u32 bits, u8 part, s16 inst, 56u32 omap4_prminst_rmw_inst_reg_bits(u32 mask, u32 bits, u8 part, s16 inst,
56 s16 idx) 57 u16 idx)
57{ 58{
58 u32 v; 59 u32 v;
59 60
@@ -64,3 +65,112 @@ u32 omap4_prminst_rmw_inst_reg_bits(u32 mask, u32 bits, u8 part, s16 inst,
64 65
65 return v; 66 return v;
66} 67}
68
69/*
70 * Address offset (in bytes) between the reset control and the reset
71 * status registers: 4 bytes on OMAP4
72 */
73#define OMAP4_RST_CTRL_ST_OFFSET 4
74
75/**
76 * omap4_prminst_is_hardreset_asserted - read the HW reset line state of
77 * submodules contained in the hwmod module
78 * @rstctrl_reg: RM_RSTCTRL register address for this module
79 * @shift: register bit shift corresponding to the reset line to check
80 *
81 * Returns 1 if the (sub)module hardreset line is currently asserted,
82 * 0 if the (sub)module hardreset line is not currently asserted, or
83 * -EINVAL upon parameter error.
84 */
85int omap4_prminst_is_hardreset_asserted(u8 shift, u8 part, s16 inst,
86 u16 rstctrl_offs)
87{
88 u32 v;
89
90 v = omap4_prminst_read_inst_reg(part, inst, rstctrl_offs);
91 v &= 1 << shift;
92 v >>= shift;
93
94 return v;
95}
96
97/**
98 * omap4_prminst_assert_hardreset - assert the HW reset line of a submodule
99 * @rstctrl_reg: RM_RSTCTRL register address for this module
100 * @shift: register bit shift corresponding to the reset line to assert
101 *
102 * Some IPs like dsp, ipu or iva contain processors that require an HW
103 * reset line to be asserted / deasserted in order to fully enable the
104 * IP. These modules may have multiple hard-reset lines that reset
105 * different 'submodules' inside the IP block. This function will
106 * place the submodule into reset. Returns 0 upon success or -EINVAL
107 * upon an argument error.
108 */
109int omap4_prminst_assert_hardreset(u8 shift, u8 part, s16 inst,
110 u16 rstctrl_offs)
111{
112 u32 mask = 1 << shift;
113
114 omap4_prminst_rmw_inst_reg_bits(mask, mask, part, inst, rstctrl_offs);
115
116 return 0;
117}
118
119/**
120 * omap4_prminst_deassert_hardreset - deassert a submodule hardreset line and
121 * wait
122 * @rstctrl_reg: RM_RSTCTRL register address for this module
123 * @shift: register bit shift corresponding to the reset line to deassert
124 *
125 * Some IPs like dsp, ipu or iva contain processors that require an HW
126 * reset line to be asserted / deasserted in order to fully enable the
127 * IP. These modules may have multiple hard-reset lines that reset
128 * different 'submodules' inside the IP block. This function will
129 * take the submodule out of reset and wait until the PRCM indicates
130 * that the reset has completed before returning. Returns 0 upon success or
131 * -EINVAL upon an argument error, -EEXIST if the submodule was already out
132 * of reset, or -EBUSY if the submodule did not exit reset promptly.
133 */
134int omap4_prminst_deassert_hardreset(u8 shift, u8 part, s16 inst,
135 u16 rstctrl_offs)
136{
137 int c;
138 u32 mask = 1 << shift;
139 u16 rstst_offs = rstctrl_offs + OMAP4_RST_CTRL_ST_OFFSET;
140
141 /* Check the current status to avoid de-asserting the line twice */
142 if (omap4_prminst_is_hardreset_asserted(shift, part, inst,
143 rstctrl_offs) == 0)
144 return -EEXIST;
145
146 /* Clear the reset status by writing 1 to the status bit */
147 omap4_prminst_rmw_inst_reg_bits(0xffffffff, mask, part, inst,
148 rstst_offs);
149 /* de-assert the reset control line */
150 omap4_prminst_rmw_inst_reg_bits(mask, 0, part, inst, rstctrl_offs);
151 /* wait the status to be set */
152 omap_test_timeout(omap4_prminst_is_hardreset_asserted(shift, part, inst,
153 rstst_offs),
154 MAX_MODULE_HARDRESET_WAIT, c);
155
156 return (c == MAX_MODULE_HARDRESET_WAIT) ? -EBUSY : 0;
157}
158
159
160void omap4_prminst_global_warm_sw_reset(void)
161{
162 u32 v;
163
164 v = omap4_prminst_read_inst_reg(OMAP4430_PRM_PARTITION,
165 OMAP4430_PRM_DEVICE_INST,
166 OMAP4_PRM_RSTCTRL_OFFSET);
167 v |= OMAP4430_RST_GLOBAL_WARM_SW_MASK;
168 omap4_prminst_write_inst_reg(v, OMAP4430_PRM_PARTITION,
169 OMAP4430_PRM_DEVICE_INST,
170 OMAP4_PRM_RSTCTRL_OFFSET);
171
172 /* OCP barrier */
173 v = omap4_prminst_read_inst_reg(OMAP4430_PRM_PARTITION,
174 OMAP4430_PRM_DEVICE_INST,
175 OMAP4_PRM_RSTCTRL_OFFSET);
176}
diff --git a/arch/arm/mach-omap2/prminst44xx.h b/arch/arm/mach-omap2/prminst44xx.h
index 02dd66ddda8..46f2efb3659 100644
--- a/arch/arm/mach-omap2/prminst44xx.h
+++ b/arch/arm/mach-omap2/prminst44xx.h
@@ -2,6 +2,7 @@
2 * OMAP4 Power/Reset Management (PRM) function prototypes 2 * OMAP4 Power/Reset Management (PRM) function prototypes
3 * 3 *
4 * Copyright (C) 2010 Nokia Corporation 4 * Copyright (C) 2010 Nokia Corporation
5 * Copyright (C) 2011 Texas Instruments, Inc.
5 * Paul Walmsley 6 * Paul Walmsley
6 * 7 *
7 * This program is free software; you can redistribute it and/or modify 8 * This program is free software; you can redistribute it and/or modify
@@ -18,8 +19,15 @@
18extern u32 omap4_prminst_read_inst_reg(u8 part, s16 inst, u16 idx); 19extern u32 omap4_prminst_read_inst_reg(u8 part, s16 inst, u16 idx);
19extern void omap4_prminst_write_inst_reg(u32 val, u8 part, s16 inst, u16 idx); 20extern void omap4_prminst_write_inst_reg(u32 val, u8 part, s16 inst, u16 idx);
20extern u32 omap4_prminst_rmw_inst_reg_bits(u32 mask, u32 bits, u8 part, 21extern u32 omap4_prminst_rmw_inst_reg_bits(u32 mask, u32 bits, u8 part,
21 s16 inst, s16 idx); 22 s16 inst, u16 idx);
22 23
23extern void omap4_prm_global_warm_sw_reset(void); 24extern void omap4_prminst_global_warm_sw_reset(void);
25
26extern int omap4_prminst_is_hardreset_asserted(u8 shift, u8 part, s16 inst,
27 u16 rstctrl_offs);
28extern int omap4_prminst_assert_hardreset(u8 shift, u8 part, s16 inst,
29 u16 rstctrl_offs);
30extern int omap4_prminst_deassert_hardreset(u8 shift, u8 part, s16 inst,
31 u16 rstctrl_offs);
24 32
25#endif 33#endif
diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c
index fb7dc52394a..2ce2fb7664b 100644
--- a/arch/arm/mach-omap2/smartreflex.c
+++ b/arch/arm/mach-omap2/smartreflex.c
@@ -143,7 +143,7 @@ static irqreturn_t sr_interrupt(int irq, void *data)
143 sr_write_reg(sr_info, IRQSTATUS, status); 143 sr_write_reg(sr_info, IRQSTATUS, status);
144 } 144 }
145 145
146 if (sr_class->class_type == SR_CLASS2 && sr_class->notify) 146 if (sr_class->notify)
147 sr_class->notify(sr_info->voltdm, status); 147 sr_class->notify(sr_info->voltdm, status);
148 148
149 return IRQ_HANDLED; 149 return IRQ_HANDLED;
@@ -258,9 +258,7 @@ static int sr_late_init(struct omap_sr *sr_info)
258 struct resource *mem; 258 struct resource *mem;
259 int ret = 0; 259 int ret = 0;
260 260
261 if (sr_class->class_type == SR_CLASS2 && 261 if (sr_class->notify && sr_class->notify_flags && sr_info->irq) {
262 sr_class->notify_flags && sr_info->irq) {
263
264 name = kasprintf(GFP_KERNEL, "sr_%s", sr_info->voltdm->name); 262 name = kasprintf(GFP_KERNEL, "sr_%s", sr_info->voltdm->name);
265 if (name == NULL) { 263 if (name == NULL) {
266 ret = -ENOMEM; 264 ret = -ENOMEM;
@@ -270,6 +268,7 @@ static int sr_late_init(struct omap_sr *sr_info)
270 0, name, (void *)sr_info); 268 0, name, (void *)sr_info);
271 if (ret) 269 if (ret)
272 goto error; 270 goto error;
271 disable_irq(sr_info->irq);
273 } 272 }
274 273
275 if (pdata && pdata->enable_on_init) 274 if (pdata && pdata->enable_on_init)
@@ -278,16 +277,16 @@ static int sr_late_init(struct omap_sr *sr_info)
278 return ret; 277 return ret;
279 278
280error: 279error:
281 iounmap(sr_info->base); 280 iounmap(sr_info->base);
282 mem = platform_get_resource(sr_info->pdev, IORESOURCE_MEM, 0); 281 mem = platform_get_resource(sr_info->pdev, IORESOURCE_MEM, 0);
283 release_mem_region(mem->start, resource_size(mem)); 282 release_mem_region(mem->start, resource_size(mem));
284 list_del(&sr_info->node); 283 list_del(&sr_info->node);
285 dev_err(&sr_info->pdev->dev, "%s: ERROR in registering" 284 dev_err(&sr_info->pdev->dev, "%s: ERROR in registering"
286 "interrupt handler. Smartreflex will" 285 "interrupt handler. Smartreflex will"
287 "not function as desired\n", __func__); 286 "not function as desired\n", __func__);
288 kfree(name); 287 kfree(name);
289 kfree(sr_info); 288 kfree(sr_info);
290 return ret; 289 return ret;
291} 290}
292 291
293static void sr_v1_disable(struct omap_sr *sr) 292static void sr_v1_disable(struct omap_sr *sr)
@@ -808,10 +807,13 @@ static int omap_sr_autocomp_store(void *data, u64 val)
808 return -EINVAL; 807 return -EINVAL;
809 } 808 }
810 809
811 if (!val) 810 /* control enable/disable only if there is a delta in value */
812 sr_stop_vddautocomp(sr_info); 811 if (sr_info->autocomp_active != val) {
813 else 812 if (!val)
814 sr_start_vddautocomp(sr_info); 813 sr_stop_vddautocomp(sr_info);
814 else
815 sr_start_vddautocomp(sr_info);
816 }
815 817
816 return 0; 818 return 0;
817} 819}
diff --git a/arch/arm/mach-omap2/timer-gp.c b/arch/arm/mach-omap2/timer-gp.c
deleted file mode 100644
index 3b9cf85f4bb..00000000000
--- a/arch/arm/mach-omap2/timer-gp.c
+++ /dev/null
@@ -1,266 +0,0 @@
1/*
2 * linux/arch/arm/mach-omap2/timer-gp.c
3 *
4 * OMAP2 GP timer support.
5 *
6 * Copyright (C) 2009 Nokia Corporation
7 *
8 * Update to use new clocksource/clockevent layers
9 * Author: Kevin Hilman, MontaVista Software, Inc. <source@mvista.com>
10 * Copyright (C) 2007 MontaVista Software, Inc.
11 *
12 * Original driver:
13 * Copyright (C) 2005 Nokia Corporation
14 * Author: Paul Mundt <paul.mundt@nokia.com>
15 * Juha Yrjölä <juha.yrjola@nokia.com>
16 * OMAP Dual-mode timer framework support by Timo Teras
17 *
18 * Some parts based off of TI's 24xx code:
19 *
20 * Copyright (C) 2004-2009 Texas Instruments, Inc.
21 *
22 * Roughly modelled after the OMAP1 MPU timer code.
23 * Added OMAP4 support - Santosh Shilimkar <santosh.shilimkar@ti.com>
24 *
25 * This file is subject to the terms and conditions of the GNU General Public
26 * License. See the file "COPYING" in the main directory of this archive
27 * for more details.
28 */
29#include <linux/init.h>
30#include <linux/time.h>
31#include <linux/interrupt.h>
32#include <linux/err.h>
33#include <linux/clk.h>
34#include <linux/delay.h>
35#include <linux/irq.h>
36#include <linux/clocksource.h>
37#include <linux/clockchips.h>
38
39#include <asm/mach/time.h>
40#include <plat/dmtimer.h>
41#include <asm/localtimer.h>
42#include <asm/sched_clock.h>
43#include <plat/common.h>
44#include <plat/omap_hwmod.h>
45
46#include "timer-gp.h"
47
48
49/* MAX_GPTIMER_ID: number of GPTIMERs on the chip */
50#define MAX_GPTIMER_ID 12
51
52static struct omap_dm_timer *gptimer;
53static struct clock_event_device clockevent_gpt;
54static u8 __initdata gptimer_id = 1;
55static u8 __initdata inited;
56struct omap_dm_timer *gptimer_wakeup;
57
58static irqreturn_t omap2_gp_timer_interrupt(int irq, void *dev_id)
59{
60 struct omap_dm_timer *gpt = (struct omap_dm_timer *)dev_id;
61 struct clock_event_device *evt = &clockevent_gpt;
62
63 omap_dm_timer_write_status(gpt, OMAP_TIMER_INT_OVERFLOW);
64
65 evt->event_handler(evt);
66 return IRQ_HANDLED;
67}
68
69static struct irqaction omap2_gp_timer_irq = {
70 .name = "gp timer",
71 .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL,
72 .handler = omap2_gp_timer_interrupt,
73};
74
75static int omap2_gp_timer_set_next_event(unsigned long cycles,
76 struct clock_event_device *evt)
77{
78 omap_dm_timer_set_load_start(gptimer, 0, 0xffffffff - cycles);
79
80 return 0;
81}
82
83static void omap2_gp_timer_set_mode(enum clock_event_mode mode,
84 struct clock_event_device *evt)
85{
86 u32 period;
87
88 omap_dm_timer_stop(gptimer);
89
90 switch (mode) {
91 case CLOCK_EVT_MODE_PERIODIC:
92 period = clk_get_rate(omap_dm_timer_get_fclk(gptimer)) / HZ;
93 period -= 1;
94 omap_dm_timer_set_load_start(gptimer, 1, 0xffffffff - period);
95 break;
96 case CLOCK_EVT_MODE_ONESHOT:
97 break;
98 case CLOCK_EVT_MODE_UNUSED:
99 case CLOCK_EVT_MODE_SHUTDOWN:
100 case CLOCK_EVT_MODE_RESUME:
101 break;
102 }
103}
104
105static struct clock_event_device clockevent_gpt = {
106 .name = "gp timer",
107 .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT,
108 .shift = 32,
109 .set_next_event = omap2_gp_timer_set_next_event,
110 .set_mode = omap2_gp_timer_set_mode,
111};
112
113/**
114 * omap2_gp_clockevent_set_gptimer - set which GPTIMER is used for clockevents
115 * @id: GPTIMER to use (1..MAX_GPTIMER_ID)
116 *
117 * Define the GPTIMER that the system should use for the tick timer.
118 * Meant to be called from board-*.c files in the event that GPTIMER1, the
119 * default, is unsuitable. Returns -EINVAL on error or 0 on success.
120 */
121int __init omap2_gp_clockevent_set_gptimer(u8 id)
122{
123 if (id < 1 || id > MAX_GPTIMER_ID)
124 return -EINVAL;
125
126 BUG_ON(inited);
127
128 gptimer_id = id;
129
130 return 0;
131}
132
133static void __init omap2_gp_clockevent_init(void)
134{
135 u32 tick_rate;
136 int src;
137 char clockevent_hwmod_name[8]; /* 8 = sizeof("timerXX0") */
138
139 inited = 1;
140
141 sprintf(clockevent_hwmod_name, "timer%d", gptimer_id);
142 omap_hwmod_setup_one(clockevent_hwmod_name);
143
144 gptimer = omap_dm_timer_request_specific(gptimer_id);
145 BUG_ON(gptimer == NULL);
146 gptimer_wakeup = gptimer;
147
148#if defined(CONFIG_OMAP_32K_TIMER)
149 src = OMAP_TIMER_SRC_32_KHZ;
150#else
151 src = OMAP_TIMER_SRC_SYS_CLK;
152 WARN(gptimer_id == 12, "WARNING: GPTIMER12 can only use the "
153 "secure 32KiHz clock source\n");
154#endif
155
156 if (gptimer_id != 12)
157 WARN(IS_ERR_VALUE(omap_dm_timer_set_source(gptimer, src)),
158 "timer-gp: omap_dm_timer_set_source() failed\n");
159
160 tick_rate = clk_get_rate(omap_dm_timer_get_fclk(gptimer));
161
162 pr_info("OMAP clockevent source: GPTIMER%d at %u Hz\n",
163 gptimer_id, tick_rate);
164
165 omap2_gp_timer_irq.dev_id = (void *)gptimer;
166 setup_irq(omap_dm_timer_get_irq(gptimer), &omap2_gp_timer_irq);
167 omap_dm_timer_set_int_enable(gptimer, OMAP_TIMER_INT_OVERFLOW);
168
169 clockevent_gpt.mult = div_sc(tick_rate, NSEC_PER_SEC,
170 clockevent_gpt.shift);
171 clockevent_gpt.max_delta_ns =
172 clockevent_delta2ns(0xffffffff, &clockevent_gpt);
173 clockevent_gpt.min_delta_ns =
174 clockevent_delta2ns(3, &clockevent_gpt);
175 /* Timer internal resynch latency. */
176
177 clockevent_gpt.cpumask = cpumask_of(0);
178 clockevents_register_device(&clockevent_gpt);
179}
180
181/* Clocksource code */
182
183#ifdef CONFIG_OMAP_32K_TIMER
184/*
185 * When 32k-timer is enabled, don't use GPTimer for clocksource
186 * instead, just leave default clocksource which uses the 32k
187 * sync counter. See clocksource setup in plat-omap/counter_32k.c
188 */
189
190static void __init omap2_gp_clocksource_init(void)
191{
192 omap_init_clocksource_32k();
193}
194
195#else
196/*
197 * clocksource
198 */
199static DEFINE_CLOCK_DATA(cd);
200static struct omap_dm_timer *gpt_clocksource;
201static cycle_t clocksource_read_cycles(struct clocksource *cs)
202{
203 return (cycle_t)omap_dm_timer_read_counter(gpt_clocksource);
204}
205
206static struct clocksource clocksource_gpt = {
207 .name = "gp timer",
208 .rating = 300,
209 .read = clocksource_read_cycles,
210 .mask = CLOCKSOURCE_MASK(32),
211 .flags = CLOCK_SOURCE_IS_CONTINUOUS,
212};
213
214static void notrace dmtimer_update_sched_clock(void)
215{
216 u32 cyc;
217
218 cyc = omap_dm_timer_read_counter(gpt_clocksource);
219
220 update_sched_clock(&cd, cyc, (u32)~0);
221}
222
223/* Setup free-running counter for clocksource */
224static void __init omap2_gp_clocksource_init(void)
225{
226 static struct omap_dm_timer *gpt;
227 u32 tick_rate;
228 static char err1[] __initdata = KERN_ERR
229 "%s: failed to request dm-timer\n";
230 static char err2[] __initdata = KERN_ERR
231 "%s: can't register clocksource!\n";
232
233 gpt = omap_dm_timer_request();
234 if (!gpt)
235 printk(err1, clocksource_gpt.name);
236 gpt_clocksource = gpt;
237
238 omap_dm_timer_set_source(gpt, OMAP_TIMER_SRC_SYS_CLK);
239 tick_rate = clk_get_rate(omap_dm_timer_get_fclk(gpt));
240
241 omap_dm_timer_set_load_start(gpt, 1, 0);
242
243 init_sched_clock(&cd, dmtimer_update_sched_clock, 32, tick_rate);
244
245 if (clocksource_register_hz(&clocksource_gpt, tick_rate))
246 printk(err2, clocksource_gpt.name);
247}
248#endif
249
250static void __init omap2_gp_timer_init(void)
251{
252#ifdef CONFIG_LOCAL_TIMERS
253 if (cpu_is_omap44xx()) {
254 twd_base = ioremap(OMAP44XX_LOCAL_TWD_BASE, SZ_256);
255 BUG_ON(!twd_base);
256 }
257#endif
258 omap_dm_timer_init();
259
260 omap2_gp_clockevent_init();
261 omap2_gp_clocksource_init();
262}
263
264struct sys_timer omap_timer = {
265 .init = omap2_gp_timer_init,
266};
diff --git a/arch/arm/mach-omap2/timer-gp.h b/arch/arm/mach-omap2/timer-gp.h
deleted file mode 100644
index 5c1072c6783..00000000000
--- a/arch/arm/mach-omap2/timer-gp.h
+++ /dev/null
@@ -1,16 +0,0 @@
1/*
2 * OMAP2/3 GPTIMER support.headers
3 *
4 * Copyright (C) 2009 Nokia Corporation
5 *
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file "COPYING" in the main directory of this archive
8 * for more details.
9 */
10
11#ifndef __ARCH_ARM_PLAT_OMAP_INCLUDE_MACH_TIMER_GP_H
12#define __ARCH_ARM_PLAT_OMAP_INCLUDE_MACH_TIMER_GP_H
13
14extern int __init omap2_gp_clockevent_set_gptimer(u8 id);
15
16#endif
diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
new file mode 100644
index 00000000000..e9640728239
--- /dev/null
+++ b/arch/arm/mach-omap2/timer.c
@@ -0,0 +1,342 @@
1/*
2 * linux/arch/arm/mach-omap2/timer.c
3 *
4 * OMAP2 GP timer support.
5 *
6 * Copyright (C) 2009 Nokia Corporation
7 *
8 * Update to use new clocksource/clockevent layers
9 * Author: Kevin Hilman, MontaVista Software, Inc. <source@mvista.com>
10 * Copyright (C) 2007 MontaVista Software, Inc.
11 *
12 * Original driver:
13 * Copyright (C) 2005 Nokia Corporation
14 * Author: Paul Mundt <paul.mundt@nokia.com>
15 * Juha Yrjölä <juha.yrjola@nokia.com>
16 * OMAP Dual-mode timer framework support by Timo Teras
17 *
18 * Some parts based off of TI's 24xx code:
19 *
20 * Copyright (C) 2004-2009 Texas Instruments, Inc.
21 *
22 * Roughly modelled after the OMAP1 MPU timer code.
23 * Added OMAP4 support - Santosh Shilimkar <santosh.shilimkar@ti.com>
24 *
25 * This file is subject to the terms and conditions of the GNU General Public
26 * License. See the file "COPYING" in the main directory of this archive
27 * for more details.
28 */
29#include <linux/init.h>
30#include <linux/time.h>
31#include <linux/interrupt.h>
32#include <linux/err.h>
33#include <linux/clk.h>
34#include <linux/delay.h>
35#include <linux/irq.h>
36#include <linux/clocksource.h>
37#include <linux/clockchips.h>
38
39#include <asm/mach/time.h>
40#include <plat/dmtimer.h>
41#include <asm/localtimer.h>
42#include <asm/sched_clock.h>
43#include <plat/common.h>
44#include <plat/omap_hwmod.h>
45
46/* Parent clocks, eventually these will come from the clock framework */
47
48#define OMAP2_MPU_SOURCE "sys_ck"
49#define OMAP3_MPU_SOURCE OMAP2_MPU_SOURCE
50#define OMAP4_MPU_SOURCE "sys_clkin_ck"
51#define OMAP2_32K_SOURCE "func_32k_ck"
52#define OMAP3_32K_SOURCE "omap_32k_fck"
53#define OMAP4_32K_SOURCE "sys_32k_ck"
54
55#ifdef CONFIG_OMAP_32K_TIMER
56#define OMAP2_CLKEV_SOURCE OMAP2_32K_SOURCE
57#define OMAP3_CLKEV_SOURCE OMAP3_32K_SOURCE
58#define OMAP4_CLKEV_SOURCE OMAP4_32K_SOURCE
59#define OMAP3_SECURE_TIMER 12
60#else
61#define OMAP2_CLKEV_SOURCE OMAP2_MPU_SOURCE
62#define OMAP3_CLKEV_SOURCE OMAP3_MPU_SOURCE
63#define OMAP4_CLKEV_SOURCE OMAP4_MPU_SOURCE
64#define OMAP3_SECURE_TIMER 1
65#endif
66
67/* MAX_GPTIMER_ID: number of GPTIMERs on the chip */
68#define MAX_GPTIMER_ID 12
69
70u32 sys_timer_reserved;
71
72/* Clockevent code */
73
74static struct omap_dm_timer clkev;
75static struct clock_event_device clockevent_gpt;
76
77static irqreturn_t omap2_gp_timer_interrupt(int irq, void *dev_id)
78{
79 struct clock_event_device *evt = &clockevent_gpt;
80
81 __omap_dm_timer_write_status(clkev.io_base, OMAP_TIMER_INT_OVERFLOW);
82
83 evt->event_handler(evt);
84 return IRQ_HANDLED;
85}
86
87static struct irqaction omap2_gp_timer_irq = {
88 .name = "gp timer",
89 .flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL,
90 .handler = omap2_gp_timer_interrupt,
91};
92
93static int omap2_gp_timer_set_next_event(unsigned long cycles,
94 struct clock_event_device *evt)
95{
96 __omap_dm_timer_load_start(clkev.io_base, OMAP_TIMER_CTRL_ST,
97 0xffffffff - cycles, 1);
98
99 return 0;
100}
101
102static void omap2_gp_timer_set_mode(enum clock_event_mode mode,
103 struct clock_event_device *evt)
104{
105 u32 period;
106
107 __omap_dm_timer_stop(clkev.io_base, 1, clkev.rate);
108
109 switch (mode) {
110 case CLOCK_EVT_MODE_PERIODIC:
111 period = clkev.rate / HZ;
112 period -= 1;
113 /* Looks like we need to first set the load value separately */
114 __omap_dm_timer_write(clkev.io_base, OMAP_TIMER_LOAD_REG,
115 0xffffffff - period, 1);
116 __omap_dm_timer_load_start(clkev.io_base,
117 OMAP_TIMER_CTRL_AR | OMAP_TIMER_CTRL_ST,
118 0xffffffff - period, 1);
119 break;
120 case CLOCK_EVT_MODE_ONESHOT:
121 break;
122 case CLOCK_EVT_MODE_UNUSED:
123 case CLOCK_EVT_MODE_SHUTDOWN:
124 case CLOCK_EVT_MODE_RESUME:
125 break;
126 }
127}
128
129static struct clock_event_device clockevent_gpt = {
130 .name = "gp timer",
131 .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT,
132 .shift = 32,
133 .set_next_event = omap2_gp_timer_set_next_event,
134 .set_mode = omap2_gp_timer_set_mode,
135};
136
137static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer,
138 int gptimer_id,
139 const char *fck_source)
140{
141 char name[10]; /* 10 = sizeof("gptXX_Xck0") */
142 struct omap_hwmod *oh;
143 size_t size;
144 int res = 0;
145
146 sprintf(name, "timer%d", gptimer_id);
147 omap_hwmod_setup_one(name);
148 oh = omap_hwmod_lookup(name);
149 if (!oh)
150 return -ENODEV;
151
152 timer->irq = oh->mpu_irqs[0].irq;
153 timer->phys_base = oh->slaves[0]->addr->pa_start;
154 size = oh->slaves[0]->addr->pa_end - timer->phys_base;
155
156 /* Static mapping, never released */
157 timer->io_base = ioremap(timer->phys_base, size);
158 if (!timer->io_base)
159 return -ENXIO;
160
161 /* After the dmtimer is using hwmod these clocks won't be needed */
162 sprintf(name, "gpt%d_fck", gptimer_id);
163 timer->fclk = clk_get(NULL, name);
164 if (IS_ERR(timer->fclk))
165 return -ENODEV;
166
167 sprintf(name, "gpt%d_ick", gptimer_id);
168 timer->iclk = clk_get(NULL, name);
169 if (IS_ERR(timer->iclk)) {
170 clk_put(timer->fclk);
171 return -ENODEV;
172 }
173
174 omap_hwmod_enable(oh);
175
176 sys_timer_reserved |= (1 << (gptimer_id - 1));
177
178 if (gptimer_id != 12) {
179 struct clk *src;
180
181 src = clk_get(NULL, fck_source);
182 if (IS_ERR(src)) {
183 res = -EINVAL;
184 } else {
185 res = __omap_dm_timer_set_source(timer->fclk, src);
186 if (IS_ERR_VALUE(res))
187 pr_warning("%s: timer%i cannot set source\n",
188 __func__, gptimer_id);
189 clk_put(src);
190 }
191 }
192 __omap_dm_timer_reset(timer->io_base, 1, 1);
193 timer->posted = 1;
194
195 timer->rate = clk_get_rate(timer->fclk);
196
197 timer->reserved = 1;
198
199 return res;
200}
201
202static void __init omap2_gp_clockevent_init(int gptimer_id,
203 const char *fck_source)
204{
205 int res;
206
207 res = omap_dm_timer_init_one(&clkev, gptimer_id, fck_source);
208 BUG_ON(res);
209
210 omap2_gp_timer_irq.dev_id = (void *)&clkev;
211 setup_irq(clkev.irq, &omap2_gp_timer_irq);
212
213 __omap_dm_timer_int_enable(clkev.io_base, OMAP_TIMER_INT_OVERFLOW);
214
215 clockevent_gpt.mult = div_sc(clkev.rate, NSEC_PER_SEC,
216 clockevent_gpt.shift);
217 clockevent_gpt.max_delta_ns =
218 clockevent_delta2ns(0xffffffff, &clockevent_gpt);
219 clockevent_gpt.min_delta_ns =
220 clockevent_delta2ns(3, &clockevent_gpt);
221 /* Timer internal resynch latency. */
222
223 clockevent_gpt.cpumask = cpumask_of(0);
224 clockevents_register_device(&clockevent_gpt);
225
226 pr_info("OMAP clockevent source: GPTIMER%d at %lu Hz\n",
227 gptimer_id, clkev.rate);
228}
229
230/* Clocksource code */
231
232#ifdef CONFIG_OMAP_32K_TIMER
233/*
234 * When 32k-timer is enabled, don't use GPTimer for clocksource
235 * instead, just leave default clocksource which uses the 32k
236 * sync counter. See clocksource setup in plat-omap/counter_32k.c
237 */
238
239static void __init omap2_gp_clocksource_init(int unused, const char *dummy)
240{
241 omap_init_clocksource_32k();
242}
243
244#else
245
246static struct omap_dm_timer clksrc;
247
248/*
249 * clocksource
250 */
251static DEFINE_CLOCK_DATA(cd);
252static cycle_t clocksource_read_cycles(struct clocksource *cs)
253{
254 return (cycle_t)__omap_dm_timer_read_counter(clksrc.io_base, 1);
255}
256
257static struct clocksource clocksource_gpt = {
258 .name = "gp timer",
259 .rating = 300,
260 .read = clocksource_read_cycles,
261 .mask = CLOCKSOURCE_MASK(32),
262 .flags = CLOCK_SOURCE_IS_CONTINUOUS,
263};
264
265static void notrace dmtimer_update_sched_clock(void)
266{
267 u32 cyc;
268
269 cyc = __omap_dm_timer_read_counter(clksrc.io_base, 1);
270
271 update_sched_clock(&cd, cyc, (u32)~0);
272}
273
274unsigned long long notrace sched_clock(void)
275{
276 u32 cyc = 0;
277
278 if (clksrc.reserved)
279 cyc = __omap_dm_timer_read_counter(clksrc.io_base, 1);
280
281 return cyc_to_sched_clock(&cd, cyc, (u32)~0);
282}
283
284/* Setup free-running counter for clocksource */
285static void __init omap2_gp_clocksource_init(int gptimer_id,
286 const char *fck_source)
287{
288 int res;
289
290 res = omap_dm_timer_init_one(&clksrc, gptimer_id, fck_source);
291 BUG_ON(res);
292
293 pr_info("OMAP clocksource: GPTIMER%d at %lu Hz\n",
294 gptimer_id, clksrc.rate);
295
296 __omap_dm_timer_load_start(clksrc.io_base, OMAP_TIMER_CTRL_ST, 0, 1);
297 init_sched_clock(&cd, dmtimer_update_sched_clock, 32, clksrc.rate);
298
299 if (clocksource_register_hz(&clocksource_gpt, clksrc.rate))
300 pr_err("Could not register clocksource %s\n",
301 clocksource_gpt.name);
302}
303#endif
304
305#define OMAP_SYS_TIMER_INIT(name, clkev_nr, clkev_src, \
306 clksrc_nr, clksrc_src) \
307static void __init omap##name##_timer_init(void) \
308{ \
309 omap2_gp_clockevent_init((clkev_nr), clkev_src); \
310 omap2_gp_clocksource_init((clksrc_nr), clksrc_src); \
311}
312
313#define OMAP_SYS_TIMER(name) \
314struct sys_timer omap##name##_timer = { \
315 .init = omap##name##_timer_init, \
316};
317
318#ifdef CONFIG_ARCH_OMAP2
319OMAP_SYS_TIMER_INIT(2, 1, OMAP2_CLKEV_SOURCE, 2, OMAP2_MPU_SOURCE)
320OMAP_SYS_TIMER(2)
321#endif
322
323#ifdef CONFIG_ARCH_OMAP3
324OMAP_SYS_TIMER_INIT(3, 1, OMAP3_CLKEV_SOURCE, 2, OMAP3_MPU_SOURCE)
325OMAP_SYS_TIMER(3)
326OMAP_SYS_TIMER_INIT(3_secure, OMAP3_SECURE_TIMER, OMAP3_CLKEV_SOURCE,
327 2, OMAP3_MPU_SOURCE)
328OMAP_SYS_TIMER(3_secure)
329#endif
330
331#ifdef CONFIG_ARCH_OMAP4
332static void __init omap4_timer_init(void)
333{
334#ifdef CONFIG_LOCAL_TIMERS
335 twd_base = ioremap(OMAP44XX_LOCAL_TWD_BASE, SZ_256);
336 BUG_ON(!twd_base);
337#endif
338 omap2_gp_clockevent_init(1, OMAP4_CLKEV_SOURCE);
339 omap2_gp_clocksource_init(2, OMAP4_MPU_SOURCE);
340}
341OMAP_SYS_TIMER(4)
342#endif
diff --git a/arch/arm/mach-omap2/twl-common.c b/arch/arm/mach-omap2/twl-common.c
new file mode 100644
index 00000000000..2543342dbcc
--- /dev/null
+++ b/arch/arm/mach-omap2/twl-common.c
@@ -0,0 +1,304 @@
1/*
2 * twl-common.c
3 *
4 * Copyright (C) 2011 Texas Instruments, Inc..
5 * Author: Peter Ujfalusi <peter.ujfalusi@ti.com>
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * version 2 as published by the Free Software Foundation.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
19 * 02110-1301 USA
20 *
21 */
22
23#include <linux/i2c.h>
24#include <linux/i2c/twl.h>
25#include <linux/gpio.h>
26#include <linux/regulator/machine.h>
27#include <linux/regulator/fixed.h>
28
29#include <plat/i2c.h>
30#include <plat/usb.h>
31
32#include "twl-common.h"
33
34static struct i2c_board_info __initdata pmic_i2c_board_info = {
35 .addr = 0x48,
36 .flags = I2C_CLIENT_WAKE,
37};
38
39void __init omap_pmic_init(int bus, u32 clkrate,
40 const char *pmic_type, int pmic_irq,
41 struct twl4030_platform_data *pmic_data)
42{
43 strncpy(pmic_i2c_board_info.type, pmic_type,
44 sizeof(pmic_i2c_board_info.type));
45 pmic_i2c_board_info.irq = pmic_irq;
46 pmic_i2c_board_info.platform_data = pmic_data;
47
48 omap_register_i2c_bus(bus, clkrate, &pmic_i2c_board_info, 1);
49}
50
51static struct twl4030_usb_data omap4_usb_pdata = {
52 .phy_init = omap4430_phy_init,
53 .phy_exit = omap4430_phy_exit,
54 .phy_power = omap4430_phy_power,
55 .phy_set_clock = omap4430_phy_set_clk,
56 .phy_suspend = omap4430_phy_suspend,
57};
58
59static struct twl4030_usb_data omap3_usb_pdata = {
60 .usb_mode = T2_USB_MODE_ULPI,
61};
62
63static int omap3_batt_table[] = {
64/* 0 C */
6530800, 29500, 28300, 27100,
6626000, 24900, 23900, 22900, 22000, 21100, 20300, 19400, 18700, 17900,
6717200, 16500, 15900, 15300, 14700, 14100, 13600, 13100, 12600, 12100,
6811600, 11200, 10800, 10400, 10000, 9630, 9280, 8950, 8620, 8310,
698020, 7730, 7460, 7200, 6950, 6710, 6470, 6250, 6040, 5830,
705640, 5450, 5260, 5090, 4920, 4760, 4600, 4450, 4310, 4170,
714040, 3910, 3790, 3670, 3550
72};
73
74static struct twl4030_bci_platform_data omap3_bci_pdata = {
75 .battery_tmp_tbl = omap3_batt_table,
76 .tblsize = ARRAY_SIZE(omap3_batt_table),
77};
78
79static struct twl4030_madc_platform_data omap3_madc_pdata = {
80 .irq_line = 1,
81};
82
83static struct twl4030_codec_data omap3_codec;
84
85static struct twl4030_audio_data omap3_audio_pdata = {
86 .audio_mclk = 26000000,
87 .codec = &omap3_codec,
88};
89
90static struct regulator_consumer_supply omap3_vdda_dac_supplies[] = {
91 REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"),
92};
93
94static struct regulator_init_data omap3_vdac_idata = {
95 .constraints = {
96 .min_uV = 1800000,
97 .max_uV = 1800000,
98 .valid_modes_mask = REGULATOR_MODE_NORMAL
99 | REGULATOR_MODE_STANDBY,
100 .valid_ops_mask = REGULATOR_CHANGE_MODE
101 | REGULATOR_CHANGE_STATUS,
102 },
103 .num_consumer_supplies = ARRAY_SIZE(omap3_vdda_dac_supplies),
104 .consumer_supplies = omap3_vdda_dac_supplies,
105};
106
107static struct regulator_consumer_supply omap3_vpll2_supplies[] = {
108 REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
109 REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"),
110};
111
112static struct regulator_init_data omap3_vpll2_idata = {
113 .constraints = {
114 .min_uV = 1800000,
115 .max_uV = 1800000,
116 .valid_modes_mask = REGULATOR_MODE_NORMAL
117 | REGULATOR_MODE_STANDBY,
118 .valid_ops_mask = REGULATOR_CHANGE_MODE
119 | REGULATOR_CHANGE_STATUS,
120 },
121 .num_consumer_supplies = ARRAY_SIZE(omap3_vpll2_supplies),
122 .consumer_supplies = omap3_vpll2_supplies,
123};
124
125static struct regulator_init_data omap4_vdac_idata = {
126 .constraints = {
127 .min_uV = 1800000,
128 .max_uV = 1800000,
129 .valid_modes_mask = REGULATOR_MODE_NORMAL
130 | REGULATOR_MODE_STANDBY,
131 .valid_ops_mask = REGULATOR_CHANGE_MODE
132 | REGULATOR_CHANGE_STATUS,
133 },
134};
135
136static struct regulator_init_data omap4_vaux2_idata = {
137 .constraints = {
138 .min_uV = 1200000,
139 .max_uV = 2800000,
140 .apply_uV = true,
141 .valid_modes_mask = REGULATOR_MODE_NORMAL
142 | REGULATOR_MODE_STANDBY,
143 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
144 | REGULATOR_CHANGE_MODE
145 | REGULATOR_CHANGE_STATUS,
146 },
147};
148
149static struct regulator_init_data omap4_vaux3_idata = {
150 .constraints = {
151 .min_uV = 1000000,
152 .max_uV = 3000000,
153 .apply_uV = true,
154 .valid_modes_mask = REGULATOR_MODE_NORMAL
155 | REGULATOR_MODE_STANDBY,
156 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
157 | REGULATOR_CHANGE_MODE
158 | REGULATOR_CHANGE_STATUS,
159 },
160};
161
162static struct regulator_consumer_supply omap4_vmmc_supply[] = {
163 REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
164};
165
166/* VMMC1 for MMC1 card */
167static struct regulator_init_data omap4_vmmc_idata = {
168 .constraints = {
169 .min_uV = 1200000,
170 .max_uV = 3000000,
171 .apply_uV = true,
172 .valid_modes_mask = REGULATOR_MODE_NORMAL
173 | REGULATOR_MODE_STANDBY,
174 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
175 | REGULATOR_CHANGE_MODE
176 | REGULATOR_CHANGE_STATUS,
177 },
178 .num_consumer_supplies = ARRAY_SIZE(omap4_vmmc_supply),
179 .consumer_supplies = omap4_vmmc_supply,
180};
181
182static struct regulator_init_data omap4_vpp_idata = {
183 .constraints = {
184 .min_uV = 1800000,
185 .max_uV = 2500000,
186 .apply_uV = true,
187 .valid_modes_mask = REGULATOR_MODE_NORMAL
188 | REGULATOR_MODE_STANDBY,
189 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
190 | REGULATOR_CHANGE_MODE
191 | REGULATOR_CHANGE_STATUS,
192 },
193};
194
195static struct regulator_init_data omap4_vana_idata = {
196 .constraints = {
197 .min_uV = 2100000,
198 .max_uV = 2100000,
199 .valid_modes_mask = REGULATOR_MODE_NORMAL
200 | REGULATOR_MODE_STANDBY,
201 .valid_ops_mask = REGULATOR_CHANGE_MODE
202 | REGULATOR_CHANGE_STATUS,
203 },
204};
205
206static struct regulator_init_data omap4_vcxio_idata = {
207 .constraints = {
208 .min_uV = 1800000,
209 .max_uV = 1800000,
210 .valid_modes_mask = REGULATOR_MODE_NORMAL
211 | REGULATOR_MODE_STANDBY,
212 .valid_ops_mask = REGULATOR_CHANGE_MODE
213 | REGULATOR_CHANGE_STATUS,
214 },
215};
216
217static struct regulator_init_data omap4_vusb_idata = {
218 .constraints = {
219 .min_uV = 3300000,
220 .max_uV = 3300000,
221 .apply_uV = true,
222 .valid_modes_mask = REGULATOR_MODE_NORMAL
223 | REGULATOR_MODE_STANDBY,
224 .valid_ops_mask = REGULATOR_CHANGE_MODE
225 | REGULATOR_CHANGE_STATUS,
226 },
227};
228
229static struct regulator_init_data omap4_clk32kg_idata = {
230 .constraints = {
231 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
232 },
233};
234
235void __init omap4_pmic_get_config(struct twl4030_platform_data *pmic_data,
236 u32 pdata_flags, u32 regulators_flags)
237{
238 if (!pmic_data->irq_base)
239 pmic_data->irq_base = TWL6030_IRQ_BASE;
240 if (!pmic_data->irq_end)
241 pmic_data->irq_end = TWL6030_IRQ_END;
242
243 /* Common platform data configurations */
244 if (pdata_flags & TWL_COMMON_PDATA_USB && !pmic_data->usb)
245 pmic_data->usb = &omap4_usb_pdata;
246
247 /* Common regulator configurations */
248 if (regulators_flags & TWL_COMMON_REGULATOR_VDAC && !pmic_data->vdac)
249 pmic_data->vdac = &omap4_vdac_idata;
250
251 if (regulators_flags & TWL_COMMON_REGULATOR_VAUX2 && !pmic_data->vaux2)
252 pmic_data->vaux2 = &omap4_vaux2_idata;
253
254 if (regulators_flags & TWL_COMMON_REGULATOR_VAUX3 && !pmic_data->vaux3)
255 pmic_data->vaux3 = &omap4_vaux3_idata;
256
257 if (regulators_flags & TWL_COMMON_REGULATOR_VMMC && !pmic_data->vmmc)
258 pmic_data->vmmc = &omap4_vmmc_idata;
259
260 if (regulators_flags & TWL_COMMON_REGULATOR_VPP && !pmic_data->vpp)
261 pmic_data->vpp = &omap4_vpp_idata;
262
263 if (regulators_flags & TWL_COMMON_REGULATOR_VANA && !pmic_data->vana)
264 pmic_data->vana = &omap4_vana_idata;
265
266 if (regulators_flags & TWL_COMMON_REGULATOR_VCXIO && !pmic_data->vcxio)
267 pmic_data->vcxio = &omap4_vcxio_idata;
268
269 if (regulators_flags & TWL_COMMON_REGULATOR_VUSB && !pmic_data->vusb)
270 pmic_data->vusb = &omap4_vusb_idata;
271
272 if (regulators_flags & TWL_COMMON_REGULATOR_CLK32KG &&
273 !pmic_data->clk32kg)
274 pmic_data->clk32kg = &omap4_clk32kg_idata;
275}
276
277void __init omap3_pmic_get_config(struct twl4030_platform_data *pmic_data,
278 u32 pdata_flags, u32 regulators_flags)
279{
280 if (!pmic_data->irq_base)
281 pmic_data->irq_base = TWL4030_IRQ_BASE;
282 if (!pmic_data->irq_end)
283 pmic_data->irq_end = TWL4030_IRQ_END;
284
285 /* Common platform data configurations */
286 if (pdata_flags & TWL_COMMON_PDATA_USB && !pmic_data->usb)
287 pmic_data->usb = &omap3_usb_pdata;
288
289 if (pdata_flags & TWL_COMMON_PDATA_BCI && !pmic_data->bci)
290 pmic_data->bci = &omap3_bci_pdata;
291
292 if (pdata_flags & TWL_COMMON_PDATA_MADC && !pmic_data->madc)
293 pmic_data->madc = &omap3_madc_pdata;
294
295 if (pdata_flags & TWL_COMMON_PDATA_AUDIO && !pmic_data->audio)
296 pmic_data->audio = &omap3_audio_pdata;
297
298 /* Common regulator configurations */
299 if (regulators_flags & TWL_COMMON_REGULATOR_VDAC && !pmic_data->vdac)
300 pmic_data->vdac = &omap3_vdac_idata;
301
302 if (regulators_flags & TWL_COMMON_REGULATOR_VPLL2 && !pmic_data->vpll2)
303 pmic_data->vpll2 = &omap3_vpll2_idata;
304}
diff --git a/arch/arm/mach-omap2/twl-common.h b/arch/arm/mach-omap2/twl-common.h
new file mode 100644
index 00000000000..5e83a5bd37f
--- /dev/null
+++ b/arch/arm/mach-omap2/twl-common.h
@@ -0,0 +1,59 @@
1#ifndef __OMAP_PMIC_COMMON__
2#define __OMAP_PMIC_COMMON__
3
4#define TWL_COMMON_PDATA_USB (1 << 0)
5#define TWL_COMMON_PDATA_BCI (1 << 1)
6#define TWL_COMMON_PDATA_MADC (1 << 2)
7#define TWL_COMMON_PDATA_AUDIO (1 << 3)
8
9/* Common LDO regulators for TWL4030/TWL6030 */
10#define TWL_COMMON_REGULATOR_VDAC (1 << 0)
11#define TWL_COMMON_REGULATOR_VAUX1 (1 << 1)
12#define TWL_COMMON_REGULATOR_VAUX2 (1 << 2)
13#define TWL_COMMON_REGULATOR_VAUX3 (1 << 3)
14
15/* TWL6030 LDO regulators */
16#define TWL_COMMON_REGULATOR_VMMC (1 << 4)
17#define TWL_COMMON_REGULATOR_VPP (1 << 5)
18#define TWL_COMMON_REGULATOR_VUSIM (1 << 6)
19#define TWL_COMMON_REGULATOR_VANA (1 << 7)
20#define TWL_COMMON_REGULATOR_VCXIO (1 << 8)
21#define TWL_COMMON_REGULATOR_VUSB (1 << 9)
22#define TWL_COMMON_REGULATOR_CLK32KG (1 << 10)
23
24/* TWL4030 LDO regulators */
25#define TWL_COMMON_REGULATOR_VPLL1 (1 << 4)
26#define TWL_COMMON_REGULATOR_VPLL2 (1 << 5)
27
28
29struct twl4030_platform_data;
30
31void omap_pmic_init(int bus, u32 clkrate, const char *pmic_type, int pmic_irq,
32 struct twl4030_platform_data *pmic_data);
33
34static inline void omap2_pmic_init(const char *pmic_type,
35 struct twl4030_platform_data *pmic_data)
36{
37 omap_pmic_init(2, 2600, pmic_type, INT_24XX_SYS_NIRQ, pmic_data);
38}
39
40static inline void omap3_pmic_init(const char *pmic_type,
41 struct twl4030_platform_data *pmic_data)
42{
43 omap_pmic_init(1, 2600, pmic_type, INT_34XX_SYS_NIRQ, pmic_data);
44}
45
46static inline void omap4_pmic_init(const char *pmic_type,
47 struct twl4030_platform_data *pmic_data)
48{
49 /* Phoenix Audio IC needs I2C1 to start with 400 KHz or less */
50 omap_pmic_init(1, 400, pmic_type, OMAP44XX_IRQ_SYS_1N, pmic_data);
51}
52
53void omap3_pmic_get_config(struct twl4030_platform_data *pmic_data,
54 u32 pdata_flags, u32 regulators_flags);
55
56void omap4_pmic_get_config(struct twl4030_platform_data *pmic_data,
57 u32 pdata_flags, u32 regulators_flags);
58
59#endif /* __OMAP_PMIC_COMMON__ */
diff --git a/arch/arm/mach-omap2/usb-musb.c b/arch/arm/mach-omap2/usb-musb.c
index c7ed540d868..a65145b02a5 100644
--- a/arch/arm/mach-omap2/usb-musb.c
+++ b/arch/arm/mach-omap2/usb-musb.c
@@ -33,8 +33,6 @@
33#include <plat/omap_device.h> 33#include <plat/omap_device.h>
34#include "mux.h" 34#include "mux.h"
35 35
36#if defined(CONFIG_USB_MUSB_OMAP2PLUS) || defined (CONFIG_USB_MUSB_AM35X)
37
38static struct musb_hdrc_config musb_config = { 36static struct musb_hdrc_config musb_config = {
39 .multipoint = 1, 37 .multipoint = 1,
40 .dyn_fifo = 1, 38 .dyn_fifo = 1,
@@ -175,11 +173,3 @@ void __init usb_musb_init(struct omap_musb_board_data *musb_board_data)
175 if (cpu_is_omap44xx()) 173 if (cpu_is_omap44xx())
176 omap4430_phy_init(dev); 174 omap4430_phy_init(dev);
177} 175}
178
179#else
180void __init usb_musb_init(struct omap_musb_board_data *board_data)
181{
182 if (cpu_is_omap44xx())
183 omap4430_phy_init(NULL);
184}
185#endif /* CONFIG_USB_MUSB_SOC */