提交 bc574e19 编写于 作者: A Arnd Bergmann

Merge branches 'omap/prcm' and 'omap/mfd' of...

Merge branches 'omap/prcm' and 'omap/mfd' of git+ssh://master.kernel.org/pub/scm/linux/kernel/git/arm/linux-arm-soc into next/devel-2
...@@ -138,7 +138,7 @@ void ams_delta_latch2_write(u16 mask, u16 value) ...@@ -138,7 +138,7 @@ void ams_delta_latch2_write(u16 mask, u16 value)
static void __init ams_delta_init_irq(void) static void __init ams_delta_init_irq(void)
{ {
omap1_init_common_hw(); omap1_init_common_hw();
omap_init_irq(); omap1_init_irq();
} }
static struct map_desc ams_delta_io_desc[] __initdata = { static struct map_desc ams_delta_io_desc[] __initdata = {
...@@ -391,7 +391,7 @@ MACHINE_START(AMS_DELTA, "Amstrad E3 (Delta)") ...@@ -391,7 +391,7 @@ MACHINE_START(AMS_DELTA, "Amstrad E3 (Delta)")
.reserve = omap_reserve, .reserve = omap_reserve,
.init_irq = ams_delta_init_irq, .init_irq = ams_delta_init_irq,
.init_machine = ams_delta_init, .init_machine = ams_delta_init,
.timer = &omap_timer, .timer = &omap1_timer,
MACHINE_END MACHINE_END
EXPORT_SYMBOL(ams_delta_latch1_write); EXPORT_SYMBOL(ams_delta_latch1_write);
......
...@@ -329,7 +329,7 @@ static void __init omap_fsample_init(void) ...@@ -329,7 +329,7 @@ static void __init omap_fsample_init(void)
static void __init omap_fsample_init_irq(void) static void __init omap_fsample_init_irq(void)
{ {
omap1_init_common_hw(); omap1_init_common_hw();
omap_init_irq(); omap1_init_irq();
} }
/* Only FPGA needs to be mapped here. All others are done with ioremap */ /* Only FPGA needs to be mapped here. All others are done with ioremap */
...@@ -394,5 +394,5 @@ MACHINE_START(OMAP_FSAMPLE, "OMAP730 F-Sample") ...@@ -394,5 +394,5 @@ MACHINE_START(OMAP_FSAMPLE, "OMAP730 F-Sample")
.reserve = omap_reserve, .reserve = omap_reserve,
.init_irq = omap_fsample_init_irq, .init_irq = omap_fsample_init_irq,
.init_machine = omap_fsample_init, .init_machine = omap_fsample_init,
.timer = &omap_timer, .timer = &omap1_timer,
MACHINE_END MACHINE_END
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
static void __init omap_generic_init_irq(void) static void __init omap_generic_init_irq(void)
{ {
omap1_init_common_hw(); omap1_init_common_hw();
omap_init_irq(); omap1_init_irq();
} }
/* assume no Mini-AB port */ /* assume no Mini-AB port */
...@@ -99,5 +99,5 @@ MACHINE_START(OMAP_GENERIC, "Generic OMAP1510/1610/1710") ...@@ -99,5 +99,5 @@ MACHINE_START(OMAP_GENERIC, "Generic OMAP1510/1610/1710")
.reserve = omap_reserve, .reserve = omap_reserve,
.init_irq = omap_generic_init_irq, .init_irq = omap_generic_init_irq,
.init_machine = omap_generic_init, .init_machine = omap_generic_init,
.timer = &omap_timer, .timer = &omap1_timer,
MACHINE_END MACHINE_END
...@@ -376,7 +376,7 @@ static struct i2c_board_info __initdata h2_i2c_board_info[] = { ...@@ -376,7 +376,7 @@ static struct i2c_board_info __initdata h2_i2c_board_info[] = {
static void __init h2_init_irq(void) static void __init h2_init_irq(void)
{ {
omap1_init_common_hw(); omap1_init_common_hw();
omap_init_irq(); omap1_init_irq();
} }
static struct omap_usb_config h2_usb_config __initdata = { static struct omap_usb_config h2_usb_config __initdata = {
...@@ -466,5 +466,5 @@ MACHINE_START(OMAP_H2, "TI-H2") ...@@ -466,5 +466,5 @@ MACHINE_START(OMAP_H2, "TI-H2")
.reserve = omap_reserve, .reserve = omap_reserve,
.init_irq = h2_init_irq, .init_irq = h2_init_irq,
.init_machine = h2_init, .init_machine = h2_init,
.timer = &omap_timer, .timer = &omap1_timer,
MACHINE_END MACHINE_END
...@@ -439,7 +439,7 @@ static void __init h3_init(void) ...@@ -439,7 +439,7 @@ static void __init h3_init(void)
static void __init h3_init_irq(void) static void __init h3_init_irq(void)
{ {
omap1_init_common_hw(); omap1_init_common_hw();
omap_init_irq(); omap1_init_irq();
} }
static void __init h3_map_io(void) static void __init h3_map_io(void)
...@@ -454,5 +454,5 @@ MACHINE_START(OMAP_H3, "TI OMAP1710 H3 board") ...@@ -454,5 +454,5 @@ MACHINE_START(OMAP_H3, "TI OMAP1710 H3 board")
.reserve = omap_reserve, .reserve = omap_reserve,
.init_irq = h3_init_irq, .init_irq = h3_init_irq,
.init_machine = h3_init, .init_machine = h3_init,
.timer = &omap_timer, .timer = &omap1_timer,
MACHINE_END MACHINE_END
...@@ -605,7 +605,7 @@ static void __init htcherald_init_irq(void) ...@@ -605,7 +605,7 @@ static void __init htcherald_init_irq(void)
{ {
printk(KERN_INFO "htcherald_init_irq.\n"); printk(KERN_INFO "htcherald_init_irq.\n");
omap1_init_common_hw(); omap1_init_common_hw();
omap_init_irq(); omap1_init_irq();
} }
MACHINE_START(HERALD, "HTC Herald") MACHINE_START(HERALD, "HTC Herald")
...@@ -616,5 +616,5 @@ MACHINE_START(HERALD, "HTC Herald") ...@@ -616,5 +616,5 @@ MACHINE_START(HERALD, "HTC Herald")
.reserve = omap_reserve, .reserve = omap_reserve,
.init_irq = htcherald_init_irq, .init_irq = htcherald_init_irq,
.init_machine = htcherald_init, .init_machine = htcherald_init,
.timer = &omap_timer, .timer = &omap1_timer,
MACHINE_END MACHINE_END
...@@ -292,7 +292,7 @@ static void __init innovator_init_smc91x(void) ...@@ -292,7 +292,7 @@ static void __init innovator_init_smc91x(void)
static void __init innovator_init_irq(void) static void __init innovator_init_irq(void)
{ {
omap1_init_common_hw(); omap1_init_common_hw();
omap_init_irq(); omap1_init_irq();
} }
#ifdef CONFIG_ARCH_OMAP15XX #ifdef CONFIG_ARCH_OMAP15XX
...@@ -464,5 +464,5 @@ MACHINE_START(OMAP_INNOVATOR, "TI-Innovator") ...@@ -464,5 +464,5 @@ MACHINE_START(OMAP_INNOVATOR, "TI-Innovator")
.reserve = omap_reserve, .reserve = omap_reserve,
.init_irq = innovator_init_irq, .init_irq = innovator_init_irq,
.init_machine = innovator_init, .init_machine = innovator_init,
.timer = &omap_timer, .timer = &omap1_timer,
MACHINE_END MACHINE_END
...@@ -51,7 +51,7 @@ static void __init omap_nokia770_init_irq(void) ...@@ -51,7 +51,7 @@ static void __init omap_nokia770_init_irq(void)
omap_writew((omap_readw(0xfffb5004) & ~2), 0xfffb5004); omap_writew((omap_readw(0xfffb5004) & ~2), 0xfffb5004);
omap1_init_common_hw(); omap1_init_common_hw();
omap_init_irq(); omap1_init_irq();
} }
static const unsigned int nokia770_keymap[] = { static const unsigned int nokia770_keymap[] = {
...@@ -269,5 +269,5 @@ MACHINE_START(NOKIA770, "Nokia 770") ...@@ -269,5 +269,5 @@ MACHINE_START(NOKIA770, "Nokia 770")
.reserve = omap_reserve, .reserve = omap_reserve,
.init_irq = omap_nokia770_init_irq, .init_irq = omap_nokia770_init_irq,
.init_machine = omap_nokia770_init, .init_machine = omap_nokia770_init,
.timer = &omap_timer, .timer = &omap1_timer,
MACHINE_END MACHINE_END
...@@ -282,7 +282,7 @@ static void __init osk_init_cf(void) ...@@ -282,7 +282,7 @@ static void __init osk_init_cf(void)
static void __init osk_init_irq(void) static void __init osk_init_irq(void)
{ {
omap1_init_common_hw(); omap1_init_common_hw();
omap_init_irq(); omap1_init_irq();
} }
static struct omap_usb_config osk_usb_config __initdata = { static struct omap_usb_config osk_usb_config __initdata = {
...@@ -588,5 +588,5 @@ MACHINE_START(OMAP_OSK, "TI-OSK") ...@@ -588,5 +588,5 @@ MACHINE_START(OMAP_OSK, "TI-OSK")
.reserve = omap_reserve, .reserve = omap_reserve,
.init_irq = osk_init_irq, .init_irq = osk_init_irq,
.init_machine = osk_init, .init_machine = osk_init,
.timer = &omap_timer, .timer = &omap1_timer,
MACHINE_END MACHINE_END
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
static void __init omap_palmte_init_irq(void) static void __init omap_palmte_init_irq(void)
{ {
omap1_init_common_hw(); omap1_init_common_hw();
omap_init_irq(); omap1_init_irq();
} }
static const unsigned int palmte_keymap[] = { static const unsigned int palmte_keymap[] = {
...@@ -280,5 +280,5 @@ MACHINE_START(OMAP_PALMTE, "OMAP310 based Palm Tungsten E") ...@@ -280,5 +280,5 @@ MACHINE_START(OMAP_PALMTE, "OMAP310 based Palm Tungsten E")
.reserve = omap_reserve, .reserve = omap_reserve,
.init_irq = omap_palmte_init_irq, .init_irq = omap_palmte_init_irq,
.init_machine = omap_palmte_init, .init_machine = omap_palmte_init,
.timer = &omap_timer, .timer = &omap1_timer,
MACHINE_END MACHINE_END
...@@ -266,7 +266,7 @@ static struct spi_board_info __initdata palmtt_boardinfo[] = { ...@@ -266,7 +266,7 @@ static struct spi_board_info __initdata palmtt_boardinfo[] = {
static void __init omap_palmtt_init_irq(void) static void __init omap_palmtt_init_irq(void)
{ {
omap1_init_common_hw(); omap1_init_common_hw();
omap_init_irq(); omap1_init_irq();
} }
static struct omap_usb_config palmtt_usb_config __initdata = { static struct omap_usb_config palmtt_usb_config __initdata = {
...@@ -326,5 +326,5 @@ MACHINE_START(OMAP_PALMTT, "OMAP1510 based Palm Tungsten|T") ...@@ -326,5 +326,5 @@ MACHINE_START(OMAP_PALMTT, "OMAP1510 based Palm Tungsten|T")
.reserve = omap_reserve, .reserve = omap_reserve,
.init_irq = omap_palmtt_init_irq, .init_irq = omap_palmtt_init_irq,
.init_machine = omap_palmtt_init, .init_machine = omap_palmtt_init,
.timer = &omap_timer, .timer = &omap1_timer,
MACHINE_END MACHINE_END
...@@ -61,7 +61,7 @@ static void __init ...@@ -61,7 +61,7 @@ static void __init
omap_palmz71_init_irq(void) omap_palmz71_init_irq(void)
{ {
omap1_init_common_hw(); omap1_init_common_hw();
omap_init_irq(); omap1_init_irq();
} }
static const unsigned int palmz71_keymap[] = { static const unsigned int palmz71_keymap[] = {
...@@ -346,5 +346,5 @@ MACHINE_START(OMAP_PALMZ71, "OMAP310 based Palm Zire71") ...@@ -346,5 +346,5 @@ MACHINE_START(OMAP_PALMZ71, "OMAP310 based Palm Zire71")
.reserve = omap_reserve, .reserve = omap_reserve,
.init_irq = omap_palmz71_init_irq, .init_irq = omap_palmz71_init_irq,
.init_machine = omap_palmz71_init, .init_machine = omap_palmz71_init,
.timer = &omap_timer, .timer = &omap1_timer,
MACHINE_END MACHINE_END
...@@ -297,7 +297,7 @@ static void __init omap_perseus2_init(void) ...@@ -297,7 +297,7 @@ static void __init omap_perseus2_init(void)
static void __init omap_perseus2_init_irq(void) static void __init omap_perseus2_init_irq(void)
{ {
omap1_init_common_hw(); omap1_init_common_hw();
omap_init_irq(); omap1_init_irq();
} }
/* Only FPGA needs to be mapped here. All others are done with ioremap */ /* Only FPGA needs to be mapped here. All others are done with ioremap */
static struct map_desc omap_perseus2_io_desc[] __initdata = { static struct map_desc omap_perseus2_io_desc[] __initdata = {
...@@ -355,5 +355,5 @@ MACHINE_START(OMAP_PERSEUS2, "OMAP730 Perseus2") ...@@ -355,5 +355,5 @@ MACHINE_START(OMAP_PERSEUS2, "OMAP730 Perseus2")
.reserve = omap_reserve, .reserve = omap_reserve,
.init_irq = omap_perseus2_init_irq, .init_irq = omap_perseus2_init_irq,
.init_machine = omap_perseus2_init, .init_machine = omap_perseus2_init,
.timer = &omap_timer, .timer = &omap1_timer,
MACHINE_END MACHINE_END
...@@ -411,7 +411,7 @@ static void __init omap_sx1_init(void) ...@@ -411,7 +411,7 @@ static void __init omap_sx1_init(void)
static void __init omap_sx1_init_irq(void) static void __init omap_sx1_init_irq(void)
{ {
omap1_init_common_hw(); omap1_init_common_hw();
omap_init_irq(); omap1_init_irq();
} }
/*----------------------------------------*/ /*----------------------------------------*/
...@@ -426,5 +426,5 @@ MACHINE_START(SX1, "OMAP310 based Siemens SX1") ...@@ -426,5 +426,5 @@ MACHINE_START(SX1, "OMAP310 based Siemens SX1")
.reserve = omap_reserve, .reserve = omap_reserve,
.init_irq = omap_sx1_init_irq, .init_irq = omap_sx1_init_irq,
.init_machine = omap_sx1_init, .init_machine = omap_sx1_init,
.timer = &omap_timer, .timer = &omap1_timer,
MACHINE_END MACHINE_END
...@@ -162,7 +162,7 @@ static struct omap_board_config_kernel voiceblue_config[] = { ...@@ -162,7 +162,7 @@ static struct omap_board_config_kernel voiceblue_config[] = {
static void __init voiceblue_init_irq(void) static void __init voiceblue_init_irq(void)
{ {
omap1_init_common_hw(); omap1_init_common_hw();
omap_init_irq(); omap1_init_irq();
} }
static void __init voiceblue_map_io(void) static void __init voiceblue_map_io(void)
...@@ -306,5 +306,5 @@ MACHINE_START(VOICEBLUE, "VoiceBlue OMAP5910") ...@@ -306,5 +306,5 @@ MACHINE_START(VOICEBLUE, "VoiceBlue OMAP5910")
.reserve = omap_reserve, .reserve = omap_reserve,
.init_irq = voiceblue_init_irq, .init_irq = voiceblue_init_irq,
.init_machine = voiceblue_init, .init_machine = voiceblue_init,
.timer = &omap_timer, .timer = &omap1_timer,
MACHINE_END MACHINE_END
...@@ -175,7 +175,7 @@ static struct irq_chip omap_irq_chip = { ...@@ -175,7 +175,7 @@ static struct irq_chip omap_irq_chip = {
.irq_set_wake = omap_wake_irq, .irq_set_wake = omap_wake_irq,
}; };
void __init omap_init_irq(void) void __init omap1_init_irq(void)
{ {
int i, j; int i, j;
......
...@@ -38,7 +38,7 @@ static void omap1_mcbsp_request(unsigned int id) ...@@ -38,7 +38,7 @@ static void omap1_mcbsp_request(unsigned int id)
* On 1510, 1610 and 1710, McBSP1 and McBSP3 * On 1510, 1610 and 1710, McBSP1 and McBSP3
* are DSP public peripherals. * are DSP public peripherals.
*/ */
if (id == OMAP_MCBSP1 || id == OMAP_MCBSP3) { if (id == 0 || id == 2) {
if (dsp_use++ == 0) { if (dsp_use++ == 0) {
api_clk = clk_get(NULL, "api_ck"); api_clk = clk_get(NULL, "api_ck");
dsp_clk = clk_get(NULL, "dsp_ck"); dsp_clk = clk_get(NULL, "dsp_ck");
...@@ -59,7 +59,7 @@ static void omap1_mcbsp_request(unsigned int id) ...@@ -59,7 +59,7 @@ static void omap1_mcbsp_request(unsigned int id)
static void omap1_mcbsp_free(unsigned int id) static void omap1_mcbsp_free(unsigned int id)
{ {
if (id == OMAP_MCBSP1 || id == OMAP_MCBSP3) { if (id == 0 || id == 2) {
if (--dsp_use == 0) { if (--dsp_use == 0) {
if (!IS_ERR(api_clk)) { if (!IS_ERR(api_clk)) {
clk_disable(api_clk); clk_disable(api_clk);
......
...@@ -297,7 +297,7 @@ static inline int omap_32k_timer_usable(void) ...@@ -297,7 +297,7 @@ static inline int omap_32k_timer_usable(void)
* Timer initialization * Timer initialization
* --------------------------------------------------------------------------- * ---------------------------------------------------------------------------
*/ */
static void __init omap_timer_init(void) static void __init omap1_timer_init(void)
{ {
if (omap_32k_timer_usable()) { if (omap_32k_timer_usable()) {
preferred_sched_clock_init(1); preferred_sched_clock_init(1);
...@@ -307,6 +307,6 @@ static void __init omap_timer_init(void) ...@@ -307,6 +307,6 @@ static void __init omap_timer_init(void)
} }
} }
struct sys_timer omap_timer = { struct sys_timer omap1_timer = {
.init = omap_timer_init, .init = omap1_timer_init,
}; };
...@@ -183,10 +183,6 @@ static __init void omap_init_32k_timer(void) ...@@ -183,10 +183,6 @@ static __init void omap_init_32k_timer(void)
bool __init omap_32k_timer_init(void) bool __init omap_32k_timer_init(void)
{ {
omap_init_clocksource_32k(); omap_init_clocksource_32k();
#ifdef CONFIG_OMAP_DM_TIMER
omap_dm_timer_init();
#endif
omap_init_32k_timer(); omap_init_32k_timer();
return true; return true;
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
# #
# Common support # Common support
obj-y := id.o io.o control.o mux.o devices.o serial.o gpmc.o timer-gp.o pm.o \ obj-y := id.o io.o control.o mux.o devices.o serial.o gpmc.o timer.o pm.o \
common.o gpio.o dma.o wd_timer.o common.o gpio.o dma.o wd_timer.o
omap-2-3-common = irq.o sdrc.o omap-2-3-common = irq.o sdrc.o
...@@ -145,9 +145,19 @@ obj-$(CONFIG_SOC_OMAP2420) += opp2420_data.o ...@@ -145,9 +145,19 @@ obj-$(CONFIG_SOC_OMAP2420) += opp2420_data.o
obj-$(CONFIG_SOC_OMAP2430) += opp2430_data.o obj-$(CONFIG_SOC_OMAP2430) += opp2430_data.o
# hwmod data # hwmod data
obj-$(CONFIG_SOC_OMAP2420) += omap_hwmod_2420_data.o obj-$(CONFIG_SOC_OMAP2420) += omap_hwmod_2xxx_ipblock_data.o \
obj-$(CONFIG_SOC_OMAP2430) += omap_hwmod_2430_data.o omap_hwmod_2xxx_3xxx_ipblock_data.o \
obj-$(CONFIG_ARCH_OMAP3) += omap_hwmod_3xxx_data.o omap_hwmod_2xxx_interconnect_data.o \
omap_hwmod_2xxx_3xxx_interconnect_data.o \
omap_hwmod_2420_data.o
obj-$(CONFIG_SOC_OMAP2430) += omap_hwmod_2xxx_ipblock_data.o \
omap_hwmod_2xxx_3xxx_ipblock_data.o \
omap_hwmod_2xxx_interconnect_data.o \
omap_hwmod_2xxx_3xxx_interconnect_data.o \
omap_hwmod_2430_data.o
obj-$(CONFIG_ARCH_OMAP3) += omap_hwmod_2xxx_3xxx_ipblock_data.o \
omap_hwmod_2xxx_3xxx_interconnect_data.o \
omap_hwmod_3xxx_data.o
obj-$(CONFIG_ARCH_OMAP4) += omap_hwmod_44xx_data.o obj-$(CONFIG_ARCH_OMAP4) += omap_hwmod_44xx_data.o
# EMU peripherals # EMU peripherals
...@@ -269,4 +279,4 @@ obj-$(CONFIG_ARCH_OMAP4) += hwspinlock.o ...@@ -269,4 +279,4 @@ obj-$(CONFIG_ARCH_OMAP4) += hwspinlock.o
disp-$(CONFIG_OMAP2_DSS) := display.o disp-$(CONFIG_OMAP2_DSS) := display.o
obj-y += $(disp-m) $(disp-y) obj-y += $(disp-m) $(disp-y)
obj-y += common-board-devices.o obj-y += common-board-devices.o twl-common.o
...@@ -260,7 +260,7 @@ MACHINE_START(OMAP_2430SDP, "OMAP2430 sdp2430 board") ...@@ -260,7 +260,7 @@ MACHINE_START(OMAP_2430SDP, "OMAP2430 sdp2430 board")
.reserve = omap_reserve, .reserve = omap_reserve,
.map_io = omap_2430sdp_map_io, .map_io = omap_2430sdp_map_io,
.init_early = omap_2430sdp_init_early, .init_early = omap_2430sdp_init_early,
.init_irq = omap_init_irq, .init_irq = omap2_init_irq,
.init_machine = omap_2430sdp_init, .init_machine = omap_2430sdp_init,
.timer = &omap_timer, .timer = &omap2_timer,
MACHINE_END MACHINE_END
...@@ -231,22 +231,6 @@ static void __init omap_3430sdp_init_early(void) ...@@ -231,22 +231,6 @@ static void __init omap_3430sdp_init_early(void)
omap2_init_common_devices(hyb18m512160af6_sdrc_params, NULL); omap2_init_common_devices(hyb18m512160af6_sdrc_params, NULL);
} }
static int sdp3430_batt_table[] = {
/* 0 C*/
30800, 29500, 28300, 27100,
26000, 24900, 23900, 22900, 22000, 21100, 20300, 19400, 18700, 17900,
17200, 16500, 15900, 15300, 14700, 14100, 13600, 13100, 12600, 12100,
11600, 11200, 10800, 10400, 10000, 9630, 9280, 8950, 8620, 8310,
8020, 7730, 7460, 7200, 6950, 6710, 6470, 6250, 6040, 5830,
5640, 5450, 5260, 5090, 4920, 4760, 4600, 4450, 4310, 4170,
4040, 3910, 3790, 3670, 3550
};
static struct twl4030_bci_platform_data sdp3430_bci_data = {
.battery_tmp_tbl = sdp3430_batt_table,
.tblsize = ARRAY_SIZE(sdp3430_batt_table),
};
static struct omap2_hsmmc_info mmc[] = { static struct omap2_hsmmc_info mmc[] = {
{ {
.mmc = 1, .mmc = 1,
...@@ -292,14 +276,6 @@ static struct twl4030_gpio_platform_data sdp3430_gpio_data = { ...@@ -292,14 +276,6 @@ static struct twl4030_gpio_platform_data sdp3430_gpio_data = {
.setup = sdp3430_twl_gpio_setup, .setup = sdp3430_twl_gpio_setup,
}; };
static struct twl4030_usb_data sdp3430_usb_data = {
.usb_mode = T2_USB_MODE_ULPI,
};
static struct twl4030_madc_platform_data sdp3430_madc_data = {
.irq_line = 1,
};
/* regulator consumer mappings */ /* regulator consumer mappings */
/* ads7846 on SPI */ /* ads7846 on SPI */
...@@ -307,16 +283,6 @@ static struct regulator_consumer_supply sdp3430_vaux3_supplies[] = { ...@@ -307,16 +283,6 @@ static struct regulator_consumer_supply sdp3430_vaux3_supplies[] = {
REGULATOR_SUPPLY("vcc", "spi1.0"), REGULATOR_SUPPLY("vcc", "spi1.0"),
}; };
static struct regulator_consumer_supply sdp3430_vdda_dac_supplies[] = {
REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"),
};
/* VPLL2 for digital video outputs */
static struct regulator_consumer_supply sdp3430_vpll2_supplies[] = {
REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"),
};
static struct regulator_consumer_supply sdp3430_vmmc1_supplies[] = { static struct regulator_consumer_supply sdp3430_vmmc1_supplies[] = {
REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"), REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
}; };
...@@ -433,54 +399,10 @@ static struct regulator_init_data sdp3430_vsim = { ...@@ -433,54 +399,10 @@ static struct regulator_init_data sdp3430_vsim = {
.consumer_supplies = sdp3430_vsim_supplies, .consumer_supplies = sdp3430_vsim_supplies,
}; };
/* VDAC for DSS driving S-Video */
static struct regulator_init_data sdp3430_vdac = {
.constraints = {
.min_uV = 1800000,
.max_uV = 1800000,
.apply_uV = true,
.valid_modes_mask = REGULATOR_MODE_NORMAL
| REGULATOR_MODE_STANDBY,
.valid_ops_mask = REGULATOR_CHANGE_MODE
| REGULATOR_CHANGE_STATUS,
},
.num_consumer_supplies = ARRAY_SIZE(sdp3430_vdda_dac_supplies),
.consumer_supplies = sdp3430_vdda_dac_supplies,
};
static struct regulator_init_data sdp3430_vpll2 = {
.constraints = {
.name = "VDVI",
.min_uV = 1800000,
.max_uV = 1800000,
.apply_uV = true,
.valid_modes_mask = REGULATOR_MODE_NORMAL
| REGULATOR_MODE_STANDBY,
.valid_ops_mask = REGULATOR_CHANGE_MODE
| REGULATOR_CHANGE_STATUS,
},
.num_consumer_supplies = ARRAY_SIZE(sdp3430_vpll2_supplies),
.consumer_supplies = sdp3430_vpll2_supplies,
};
static struct twl4030_codec_audio_data sdp3430_audio;
static struct twl4030_codec_data sdp3430_codec = {
.audio_mclk = 26000000,
.audio = &sdp3430_audio,
};
static struct twl4030_platform_data sdp3430_twldata = { static struct twl4030_platform_data sdp3430_twldata = {
.irq_base = TWL4030_IRQ_BASE,
.irq_end = TWL4030_IRQ_END,
/* platform_data for children goes here */ /* platform_data for children goes here */
.bci = &sdp3430_bci_data,
.gpio = &sdp3430_gpio_data, .gpio = &sdp3430_gpio_data,
.madc = &sdp3430_madc_data,
.keypad = &sdp3430_kp_data, .keypad = &sdp3430_kp_data,
.usb = &sdp3430_usb_data,
.codec = &sdp3430_codec,
.vaux1 = &sdp3430_vaux1, .vaux1 = &sdp3430_vaux1,
.vaux2 = &sdp3430_vaux2, .vaux2 = &sdp3430_vaux2,
...@@ -489,14 +411,21 @@ static struct twl4030_platform_data sdp3430_twldata = { ...@@ -489,14 +411,21 @@ static struct twl4030_platform_data sdp3430_twldata = {
.vmmc1 = &sdp3430_vmmc1, .vmmc1 = &sdp3430_vmmc1,
.vmmc2 = &sdp3430_vmmc2, .vmmc2 = &sdp3430_vmmc2,
.vsim = &sdp3430_vsim, .vsim = &sdp3430_vsim,
.vdac = &sdp3430_vdac,
.vpll2 = &sdp3430_vpll2,
}; };
static int __init omap3430_i2c_init(void) static int __init omap3430_i2c_init(void)
{ {
/* i2c1 for PMIC only */ /* i2c1 for PMIC only */
omap3_pmic_get_config(&sdp3430_twldata,
TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_BCI |
TWL_COMMON_PDATA_MADC | TWL_COMMON_PDATA_AUDIO,
TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2);
sdp3430_twldata.vdac->constraints.apply_uV = true;
sdp3430_twldata.vpll2->constraints.apply_uV = true;
sdp3430_twldata.vpll2->constraints.name = "VDVI";
omap3_pmic_init("twl4030", &sdp3430_twldata); omap3_pmic_init("twl4030", &sdp3430_twldata);
/* i2c2 on camera connector (for sensor control) and optional isp1301 */ /* i2c2 on camera connector (for sensor control) and optional isp1301 */
omap_register_i2c_bus(2, 400, NULL, 0); omap_register_i2c_bus(2, 400, NULL, 0);
/* i2c3 on display connector (for DVI, tfp410) */ /* i2c3 on display connector (for DVI, tfp410) */
...@@ -804,7 +733,7 @@ MACHINE_START(OMAP_3430SDP, "OMAP3430 3430SDP board") ...@@ -804,7 +733,7 @@ MACHINE_START(OMAP_3430SDP, "OMAP3430 3430SDP board")
.reserve = omap_reserve, .reserve = omap_reserve,
.map_io = omap3_map_io, .map_io = omap3_map_io,
.init_early = omap_3430sdp_init_early, .init_early = omap_3430sdp_init_early,
.init_irq = omap_init_irq, .init_irq = omap3_init_irq,
.init_machine = omap_3430sdp_init, .init_machine = omap_3430sdp_init,
.timer = &omap_timer, .timer = &omap3_timer,
MACHINE_END MACHINE_END
...@@ -219,7 +219,7 @@ MACHINE_START(OMAP_3630SDP, "OMAP 3630SDP board") ...@@ -219,7 +219,7 @@ MACHINE_START(OMAP_3630SDP, "OMAP 3630SDP board")
.reserve = omap_reserve, .reserve = omap_reserve,
.map_io = omap3_map_io, .map_io = omap3_map_io,
.init_early = omap_sdp_init_early, .init_early = omap_sdp_init_early,
.init_irq = omap_init_irq, .init_irq = omap3_init_irq,
.init_machine = omap_sdp_init, .init_machine = omap_sdp_init,
.timer = &omap_timer, .timer = &omap3_timer,
MACHINE_END MACHINE_END
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#include <linux/i2c/twl.h> #include <linux/i2c/twl.h>
#include <linux/gpio_keys.h> #include <linux/gpio_keys.h>
#include <linux/regulator/machine.h> #include <linux/regulator/machine.h>
#include <linux/regulator/fixed.h>
#include <linux/leds.h> #include <linux/leds.h>
#include <linux/leds_pwm.h> #include <linux/leds_pwm.h>
...@@ -40,7 +41,6 @@ ...@@ -40,7 +41,6 @@
#include "mux.h" #include "mux.h"
#include "hsmmc.h" #include "hsmmc.h"
#include "timer-gp.h"
#include "control.h" #include "control.h"
#include "common-board-devices.h" #include "common-board-devices.h"
...@@ -276,11 +276,40 @@ static struct platform_device sdp4430_lcd_device = { ...@@ -276,11 +276,40 @@ static struct platform_device sdp4430_lcd_device = {
.id = -1, .id = -1,
}; };
static struct regulator_consumer_supply sdp4430_vbat_supply[] = {
REGULATOR_SUPPLY("vddvibl", "twl6040-vibra"),
REGULATOR_SUPPLY("vddvibr", "twl6040-vibra"),
};
static struct regulator_init_data sdp4430_vbat_data = {
.constraints = {
.always_on = 1,
},
.num_consumer_supplies = ARRAY_SIZE(sdp4430_vbat_supply),
.consumer_supplies = sdp4430_vbat_supply,
};
static struct fixed_voltage_config sdp4430_vbat_pdata = {
.supply_name = "VBAT",
.microvolts = 3750000,
.init_data = &sdp4430_vbat_data,
.gpio = -EINVAL,
};
static struct platform_device sdp4430_vbat = {
.name = "reg-fixed-voltage",
.id = -1,
.dev = {
.platform_data = &sdp4430_vbat_pdata,
},
};
static struct platform_device *sdp4430_devices[] __initdata = { static struct platform_device *sdp4430_devices[] __initdata = {
&sdp4430_lcd_device, &sdp4430_lcd_device,
&sdp4430_gpio_keys_device, &sdp4430_gpio_keys_device,
&sdp4430_leds_gpio, &sdp4430_leds_gpio,
&sdp4430_leds_pwm, &sdp4430_leds_pwm,
&sdp4430_vbat,
}; };
static struct omap_lcd_config sdp4430_lcd_config __initdata = { static struct omap_lcd_config sdp4430_lcd_config __initdata = {
...@@ -295,9 +324,6 @@ static void __init omap_4430sdp_init_early(void) ...@@ -295,9 +324,6 @@ static void __init omap_4430sdp_init_early(void)
{ {
omap2_init_common_infrastructure(); omap2_init_common_infrastructure();
omap2_init_common_devices(NULL, NULL); omap2_init_common_devices(NULL, NULL);
#ifdef CONFIG_OMAP_32K_TIMER
omap2_gp_clockevent_set_gptimer(1);
#endif
} }
static struct omap_musb_board_data musb_board_data = { static struct omap_musb_board_data musb_board_data = {
...@@ -306,14 +332,6 @@ static struct omap_musb_board_data musb_board_data = { ...@@ -306,14 +332,6 @@ static struct omap_musb_board_data musb_board_data = {
.power = 100, .power = 100,
}; };
static struct twl4030_usb_data omap4_usbphy_data = {
.phy_init = omap4430_phy_init,
.phy_exit = omap4430_phy_exit,
.phy_power = omap4430_phy_power,
.phy_set_clock = omap4430_phy_set_clk,
.phy_suspend = omap4430_phy_suspend,
};
static struct omap2_hsmmc_info mmc[] = { static struct omap2_hsmmc_info mmc[] = {
{ {
.mmc = 2, .mmc = 2,
...@@ -333,16 +351,7 @@ static struct omap2_hsmmc_info mmc[] = { ...@@ -333,16 +351,7 @@ static struct omap2_hsmmc_info mmc[] = {
}; };
static struct regulator_consumer_supply sdp4430_vaux_supply[] = { static struct regulator_consumer_supply sdp4430_vaux_supply[] = {
{ REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"),
.supply = "vmmc",
.dev_name = "omap_hsmmc.1",
},
};
static struct regulator_consumer_supply sdp4430_vmmc_supply[] = {
{
.supply = "vmmc",
.dev_name = "omap_hsmmc.0",
},
}; };
static int omap4_twl6030_hsmmc_late_init(struct device *dev) static int omap4_twl6030_hsmmc_late_init(struct device *dev)
...@@ -399,65 +408,10 @@ static struct regulator_init_data sdp4430_vaux1 = { ...@@ -399,65 +408,10 @@ static struct regulator_init_data sdp4430_vaux1 = {
| REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_MODE
| REGULATOR_CHANGE_STATUS, | REGULATOR_CHANGE_STATUS,
}, },
.num_consumer_supplies = 1, .num_consumer_supplies = ARRAY_SIZE(sdp4430_vaux_supply),
.consumer_supplies = sdp4430_vaux_supply, .consumer_supplies = sdp4430_vaux_supply,
}; };
static struct regulator_init_data sdp4430_vaux2 = {
.constraints = {
.min_uV = 1200000,
.max_uV = 2800000,
.apply_uV = true,
.valid_modes_mask = REGULATOR_MODE_NORMAL
| REGULATOR_MODE_STANDBY,
.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
| REGULATOR_CHANGE_MODE
| REGULATOR_CHANGE_STATUS,
},
};
static struct regulator_init_data sdp4430_vaux3 = {
.constraints = {
.min_uV = 1000000,
.max_uV = 3000000,
.apply_uV = true,
.valid_modes_mask = REGULATOR_MODE_NORMAL
| REGULATOR_MODE_STANDBY,
.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
| REGULATOR_CHANGE_MODE
| REGULATOR_CHANGE_STATUS,
},
};
/* VMMC1 for MMC1 card */
static struct regulator_init_data sdp4430_vmmc = {
.constraints = {
.min_uV = 1200000,
.max_uV = 3000000,
.apply_uV = true,
.valid_modes_mask = REGULATOR_MODE_NORMAL
| REGULATOR_MODE_STANDBY,
.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
| REGULATOR_CHANGE_MODE
| REGULATOR_CHANGE_STATUS,
},
.num_consumer_supplies = 1,
.consumer_supplies = sdp4430_vmmc_supply,
};
static struct regulator_init_data sdp4430_vpp = {
.constraints = {
.min_uV = 1800000,
.max_uV = 2500000,
.apply_uV = true,
.valid_modes_mask = REGULATOR_MODE_NORMAL
| REGULATOR_MODE_STANDBY,
.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
| REGULATOR_CHANGE_MODE
| REGULATOR_CHANGE_STATUS,
},
};
static struct regulator_init_data sdp4430_vusim = { static struct regulator_init_data sdp4430_vusim = {
.constraints = { .constraints = {
.min_uV = 1200000, .min_uV = 1200000,
...@@ -471,74 +425,36 @@ static struct regulator_init_data sdp4430_vusim = { ...@@ -471,74 +425,36 @@ static struct regulator_init_data sdp4430_vusim = {
}, },
}; };
static struct regulator_init_data sdp4430_vana = { static struct twl4030_codec_data twl6040_codec = {
.constraints = { /* single-step ramp for headset and handsfree */
.min_uV = 2100000, .hs_left_step = 0x0f,
.max_uV = 2100000, .hs_right_step = 0x0f,
.valid_modes_mask = REGULATOR_MODE_NORMAL .hf_left_step = 0x1d,
| REGULATOR_MODE_STANDBY, .hf_right_step = 0x1d,
.valid_ops_mask = REGULATOR_CHANGE_MODE
| REGULATOR_CHANGE_STATUS,
},
};
static struct regulator_init_data sdp4430_vcxio = {
.constraints = {
.min_uV = 1800000,
.max_uV = 1800000,
.valid_modes_mask = REGULATOR_MODE_NORMAL
| REGULATOR_MODE_STANDBY,
.valid_ops_mask = REGULATOR_CHANGE_MODE
| REGULATOR_CHANGE_STATUS,
},
}; };
static struct regulator_init_data sdp4430_vdac = { static struct twl4030_vibra_data twl6040_vibra = {
.constraints = { .vibldrv_res = 8,
.min_uV = 1800000, .vibrdrv_res = 3,
.max_uV = 1800000, .viblmotor_res = 10,
.valid_modes_mask = REGULATOR_MODE_NORMAL .vibrmotor_res = 10,
| REGULATOR_MODE_STANDBY, .vddvibl_uV = 0, /* fixed volt supply - VBAT */
.valid_ops_mask = REGULATOR_CHANGE_MODE .vddvibr_uV = 0, /* fixed volt supply - VBAT */
| REGULATOR_CHANGE_STATUS,
},
}; };
static struct regulator_init_data sdp4430_vusb = { static struct twl4030_audio_data twl6040_audio = {
.constraints = { .codec = &twl6040_codec,
.min_uV = 3300000, .vibra = &twl6040_vibra,
.max_uV = 3300000, .audpwron_gpio = 127,
.apply_uV = true, .naudint_irq = OMAP44XX_IRQ_SYS_2N,
.valid_modes_mask = REGULATOR_MODE_NORMAL .irq_base = TWL6040_CODEC_IRQ_BASE,
| REGULATOR_MODE_STANDBY,
.valid_ops_mask = REGULATOR_CHANGE_MODE
| REGULATOR_CHANGE_STATUS,
},
};
static struct regulator_init_data sdp4430_clk32kg = {
.constraints = {
.valid_ops_mask = REGULATOR_CHANGE_STATUS,
},
}; };
static struct twl4030_platform_data sdp4430_twldata = { static struct twl4030_platform_data sdp4430_twldata = {
.irq_base = TWL6030_IRQ_BASE, .audio = &twl6040_audio,
.irq_end = TWL6030_IRQ_END,
/* Regulators */ /* Regulators */
.vmmc = &sdp4430_vmmc,
.vpp = &sdp4430_vpp,
.vusim = &sdp4430_vusim, .vusim = &sdp4430_vusim,
.vana = &sdp4430_vana,
.vcxio = &sdp4430_vcxio,
.vdac = &sdp4430_vdac,
.vusb = &sdp4430_vusb,
.vaux1 = &sdp4430_vaux1, .vaux1 = &sdp4430_vaux1,
.vaux2 = &sdp4430_vaux2,
.vaux3 = &sdp4430_vaux3,
.clk32kg = &sdp4430_clk32kg,
.usb = &omap4_usbphy_data
}; };
static struct i2c_board_info __initdata sdp4430_i2c_3_boardinfo[] = { static struct i2c_board_info __initdata sdp4430_i2c_3_boardinfo[] = {
...@@ -556,6 +472,16 @@ static struct i2c_board_info __initdata sdp4430_i2c_4_boardinfo[] = { ...@@ -556,6 +472,16 @@ static struct i2c_board_info __initdata sdp4430_i2c_4_boardinfo[] = {
}; };
static int __init omap4_i2c_init(void) static int __init omap4_i2c_init(void)
{ {
omap4_pmic_get_config(&sdp4430_twldata, TWL_COMMON_PDATA_USB,
TWL_COMMON_REGULATOR_VDAC |
TWL_COMMON_REGULATOR_VAUX2 |
TWL_COMMON_REGULATOR_VAUX3 |
TWL_COMMON_REGULATOR_VMMC |
TWL_COMMON_REGULATOR_VPP |
TWL_COMMON_REGULATOR_VANA |
TWL_COMMON_REGULATOR_VCXIO |
TWL_COMMON_REGULATOR_VUSB |
TWL_COMMON_REGULATOR_CLK32KG);
omap4_pmic_init("twl6030", &sdp4430_twldata); omap4_pmic_init("twl6030", &sdp4430_twldata);
omap_register_i2c_bus(2, 400, NULL, 0); omap_register_i2c_bus(2, 400, NULL, 0);
omap_register_i2c_bus(3, 400, sdp4430_i2c_3_boardinfo, omap_register_i2c_bus(3, 400, sdp4430_i2c_3_boardinfo,
...@@ -773,5 +699,5 @@ MACHINE_START(OMAP_4430SDP, "OMAP4430 4430SDP board") ...@@ -773,5 +699,5 @@ MACHINE_START(OMAP_4430SDP, "OMAP4430 4430SDP board")
.init_early = omap_4430sdp_init_early, .init_early = omap_4430sdp_init_early,
.init_irq = gic_init_irq, .init_irq = gic_init_irq,
.init_machine = omap_4430sdp_init, .init_machine = omap_4430sdp_init,
.timer = &omap_timer, .timer = &omap4_timer,
MACHINE_END MACHINE_END
...@@ -104,7 +104,7 @@ MACHINE_START(CRANEBOARD, "AM3517/05 CRANEBOARD") ...@@ -104,7 +104,7 @@ MACHINE_START(CRANEBOARD, "AM3517/05 CRANEBOARD")
.reserve = omap_reserve, .reserve = omap_reserve,
.map_io = omap3_map_io, .map_io = omap3_map_io,
.init_early = am3517_crane_init_early, .init_early = am3517_crane_init_early,
.init_irq = omap_init_irq, .init_irq = omap3_init_irq,
.init_machine = am3517_crane_init, .init_machine = am3517_crane_init,
.timer = &omap_timer, .timer = &omap3_timer,
MACHINE_END MACHINE_END
...@@ -494,7 +494,7 @@ MACHINE_START(OMAP3517EVM, "OMAP3517/AM3517 EVM") ...@@ -494,7 +494,7 @@ MACHINE_START(OMAP3517EVM, "OMAP3517/AM3517 EVM")
.reserve = omap_reserve, .reserve = omap_reserve,
.map_io = omap3_map_io, .map_io = omap3_map_io,
.init_early = am3517_evm_init_early, .init_early = am3517_evm_init_early,
.init_irq = omap_init_irq, .init_irq = omap3_init_irq,
.init_machine = am3517_evm_init, .init_machine = am3517_evm_init,
.timer = &omap_timer, .timer = &omap3_timer,
MACHINE_END MACHINE_END
...@@ -354,7 +354,7 @@ MACHINE_START(OMAP_APOLLON, "OMAP24xx Apollon") ...@@ -354,7 +354,7 @@ MACHINE_START(OMAP_APOLLON, "OMAP24xx Apollon")
.reserve = omap_reserve, .reserve = omap_reserve,
.map_io = omap_apollon_map_io, .map_io = omap_apollon_map_io,
.init_early = omap_apollon_init_early, .init_early = omap_apollon_init_early,
.init_irq = omap_init_irq, .init_irq = omap2_init_irq,
.init_machine = omap_apollon_init, .init_machine = omap_apollon_init,
.timer = &omap_timer, .timer = &omap2_timer,
MACHINE_END MACHINE_END
...@@ -162,9 +162,7 @@ static struct mtd_partition cm_t35_nand_partitions[] = { ...@@ -162,9 +162,7 @@ static struct mtd_partition cm_t35_nand_partitions[] = {
static struct omap_nand_platform_data cm_t35_nand_data = { static struct omap_nand_platform_data cm_t35_nand_data = {
.parts = cm_t35_nand_partitions, .parts = cm_t35_nand_partitions,
.nr_parts = ARRAY_SIZE(cm_t35_nand_partitions), .nr_parts = ARRAY_SIZE(cm_t35_nand_partitions),
.dma_channel = -1, /* disable DMA in OMAP NAND driver */
.cs = 0, .cs = 0,
}; };
static void __init cm_t35_init_nand(void) static void __init cm_t35_init_nand(void)
...@@ -337,19 +335,17 @@ static void __init cm_t35_init_display(void) ...@@ -337,19 +335,17 @@ static void __init cm_t35_init_display(void)
} }
} }
static struct regulator_consumer_supply cm_t35_vmmc1_supply = { static struct regulator_consumer_supply cm_t35_vmmc1_supply[] = {
.supply = "vmmc", REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
}; };
static struct regulator_consumer_supply cm_t35_vsim_supply = { static struct regulator_consumer_supply cm_t35_vsim_supply[] = {
.supply = "vmmc_aux", REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.0"),
}; };
static struct regulator_consumer_supply cm_t35_vdac_supply = static struct regulator_consumer_supply cm_t35_vdvi_supply[] = {
REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"); REGULATOR_SUPPLY("vdvi", "omapdss"),
};
static struct regulator_consumer_supply cm_t35_vdvi_supply =
REGULATOR_SUPPLY("vdvi", "omapdss");
/* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */ /* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */
static struct regulator_init_data cm_t35_vmmc1 = { static struct regulator_init_data cm_t35_vmmc1 = {
...@@ -362,8 +358,8 @@ static struct regulator_init_data cm_t35_vmmc1 = { ...@@ -362,8 +358,8 @@ static struct regulator_init_data cm_t35_vmmc1 = {
| REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_MODE
| REGULATOR_CHANGE_STATUS, | REGULATOR_CHANGE_STATUS,
}, },
.num_consumer_supplies = 1, .num_consumer_supplies = ARRAY_SIZE(cm_t35_vmmc1_supply),
.consumer_supplies = &cm_t35_vmmc1_supply, .consumer_supplies = cm_t35_vmmc1_supply,
}; };
/* VSIM for MMC1 pins DAT4..DAT7 (2 mA, plus card == max 50 mA) */ /* VSIM for MMC1 pins DAT4..DAT7 (2 mA, plus card == max 50 mA) */
...@@ -377,41 +373,8 @@ static struct regulator_init_data cm_t35_vsim = { ...@@ -377,41 +373,8 @@ static struct regulator_init_data cm_t35_vsim = {
| REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_MODE
| REGULATOR_CHANGE_STATUS, | REGULATOR_CHANGE_STATUS,
}, },
.num_consumer_supplies = 1, .num_consumer_supplies = ARRAY_SIZE(cm_t35_vsim_supply),
.consumer_supplies = &cm_t35_vsim_supply, .consumer_supplies = cm_t35_vsim_supply,
};
/* VDAC for DSS driving S-Video (8 mA unloaded, max 65 mA) */
static struct regulator_init_data cm_t35_vdac = {
.constraints = {
.min_uV = 1800000,
.max_uV = 1800000,
.valid_modes_mask = REGULATOR_MODE_NORMAL
| REGULATOR_MODE_STANDBY,
.valid_ops_mask = REGULATOR_CHANGE_MODE
| REGULATOR_CHANGE_STATUS,
},
.num_consumer_supplies = 1,
.consumer_supplies = &cm_t35_vdac_supply,
};
/* VPLL2 for digital video outputs */
static struct regulator_init_data cm_t35_vpll2 = {
.constraints = {
.name = "VDVI",
.min_uV = 1800000,
.max_uV = 1800000,
.valid_modes_mask = REGULATOR_MODE_NORMAL
| REGULATOR_MODE_STANDBY,
.valid_ops_mask = REGULATOR_CHANGE_MODE
| REGULATOR_CHANGE_STATUS,
},
.num_consumer_supplies = 1,
.consumer_supplies = &cm_t35_vdvi_supply,
};
static struct twl4030_usb_data cm_t35_usb_data = {
.usb_mode = T2_USB_MODE_ULPI,
}; };
static uint32_t cm_t35_keymap[] = { static uint32_t cm_t35_keymap[] = {
...@@ -481,10 +444,6 @@ static int cm_t35_twl_gpio_setup(struct device *dev, unsigned gpio, ...@@ -481,10 +444,6 @@ static int cm_t35_twl_gpio_setup(struct device *dev, unsigned gpio,
mmc[0].gpio_cd = gpio + 0; mmc[0].gpio_cd = gpio + 0;
omap2_hsmmc_init(mmc); omap2_hsmmc_init(mmc);
/* link regulators to MMC adapters */
cm_t35_vmmc1_supply.dev = mmc[0].dev;
cm_t35_vsim_supply.dev = mmc[0].dev;
return 0; return 0;
} }
...@@ -496,21 +455,23 @@ static struct twl4030_gpio_platform_data cm_t35_gpio_data = { ...@@ -496,21 +455,23 @@ static struct twl4030_gpio_platform_data cm_t35_gpio_data = {
}; };
static struct twl4030_platform_data cm_t35_twldata = { static struct twl4030_platform_data cm_t35_twldata = {
.irq_base = TWL4030_IRQ_BASE,
.irq_end = TWL4030_IRQ_END,
/* platform_data for children goes here */ /* platform_data for children goes here */
.keypad = &cm_t35_kp_data, .keypad = &cm_t35_kp_data,
.usb = &cm_t35_usb_data,
.gpio = &cm_t35_gpio_data, .gpio = &cm_t35_gpio_data,
.vmmc1 = &cm_t35_vmmc1, .vmmc1 = &cm_t35_vmmc1,
.vsim = &cm_t35_vsim, .vsim = &cm_t35_vsim,
.vdac = &cm_t35_vdac,
.vpll2 = &cm_t35_vpll2,
}; };
static void __init cm_t35_init_i2c(void) static void __init cm_t35_init_i2c(void)
{ {
omap3_pmic_get_config(&cm_t35_twldata, TWL_COMMON_PDATA_USB,
TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2);
cm_t35_twldata.vpll2->constraints.name = "VDVI";
cm_t35_twldata.vpll2->num_consumer_supplies =
ARRAY_SIZE(cm_t35_vdvi_supply);
cm_t35_twldata.vpll2->consumer_supplies = cm_t35_vdvi_supply;
omap3_pmic_init("tps65930", &cm_t35_twldata); omap3_pmic_init("tps65930", &cm_t35_twldata);
} }
...@@ -646,7 +607,7 @@ MACHINE_START(CM_T35, "Compulab CM-T35") ...@@ -646,7 +607,7 @@ MACHINE_START(CM_T35, "Compulab CM-T35")
.reserve = omap_reserve, .reserve = omap_reserve,
.map_io = omap3_map_io, .map_io = omap3_map_io,
.init_early = cm_t35_init_early, .init_early = cm_t35_init_early,
.init_irq = omap_init_irq, .init_irq = omap3_init_irq,
.init_machine = cm_t35_init, .init_machine = cm_t35_init,
.timer = &omap_timer, .timer = &omap3_timer,
MACHINE_END MACHINE_END
...@@ -236,7 +236,6 @@ static struct mtd_partition cm_t3517_nand_partitions[] = { ...@@ -236,7 +236,6 @@ static struct mtd_partition cm_t3517_nand_partitions[] = {
static struct omap_nand_platform_data cm_t3517_nand_data = { static struct omap_nand_platform_data cm_t3517_nand_data = {
.parts = cm_t3517_nand_partitions, .parts = cm_t3517_nand_partitions,
.nr_parts = ARRAY_SIZE(cm_t3517_nand_partitions), .nr_parts = ARRAY_SIZE(cm_t3517_nand_partitions),
.dma_channel = -1, /* disable DMA in OMAP NAND driver */
.cs = 0, .cs = 0,
}; };
...@@ -304,7 +303,7 @@ MACHINE_START(CM_T3517, "Compulab CM-T3517") ...@@ -304,7 +303,7 @@ MACHINE_START(CM_T3517, "Compulab CM-T3517")
.reserve = omap_reserve, .reserve = omap_reserve,
.map_io = omap3_map_io, .map_io = omap3_map_io,
.init_early = cm_t3517_init_early, .init_early = cm_t3517_init_early,
.init_irq = omap_init_irq, .init_irq = omap3_init_irq,
.init_machine = cm_t3517_init, .init_machine = cm_t3517_init,
.timer = &omap_timer, .timer = &omap3_timer,
MACHINE_END MACHINE_END
...@@ -58,7 +58,6 @@ ...@@ -58,7 +58,6 @@
#include "mux.h" #include "mux.h"
#include "hsmmc.h" #include "hsmmc.h"
#include "timer-gp.h"
#include "common-board-devices.h" #include "common-board-devices.h"
#define OMAP_DM9000_GPIO_IRQ 25 #define OMAP_DM9000_GPIO_IRQ 25
...@@ -130,13 +129,14 @@ static void devkit8000_panel_disable_dvi(struct omap_dss_device *dssdev) ...@@ -130,13 +129,14 @@ static void devkit8000_panel_disable_dvi(struct omap_dss_device *dssdev)
gpio_set_value_cansleep(dssdev->reset_gpio, 0); gpio_set_value_cansleep(dssdev->reset_gpio, 0);
} }
static struct regulator_consumer_supply devkit8000_vmmc1_supply = static struct regulator_consumer_supply devkit8000_vmmc1_supply[] = {
REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"); REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
};
/* ads7846 on SPI */ /* ads7846 on SPI */
static struct regulator_consumer_supply devkit8000_vio_supply = static struct regulator_consumer_supply devkit8000_vio_supply[] = {
REGULATOR_SUPPLY("vcc", "spi2.0"); REGULATOR_SUPPLY("vcc", "spi2.0"),
};
static struct panel_generic_dpi_data lcd_panel = { static struct panel_generic_dpi_data lcd_panel = {
.name = "generic", .name = "generic",
...@@ -186,9 +186,6 @@ static struct omap_dss_board_info devkit8000_dss_data = { ...@@ -186,9 +186,6 @@ static struct omap_dss_board_info devkit8000_dss_data = {
.default_device = &devkit8000_lcd_device, .default_device = &devkit8000_lcd_device,
}; };
static struct regulator_consumer_supply devkit8000_vdda_dac_supply =
REGULATOR_SUPPLY("vdda_dac", "omapdss_venc");
static uint32_t board_keymap[] = { static uint32_t board_keymap[] = {
KEY(0, 0, KEY_1), KEY(0, 0, KEY_1),
KEY(1, 0, KEY_2), KEY(1, 0, KEY_2),
...@@ -284,22 +281,8 @@ static struct regulator_init_data devkit8000_vmmc1 = { ...@@ -284,22 +281,8 @@ static struct regulator_init_data devkit8000_vmmc1 = {
| REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_MODE
| REGULATOR_CHANGE_STATUS, | REGULATOR_CHANGE_STATUS,
}, },
.num_consumer_supplies = 1, .num_consumer_supplies = ARRAY_SIZE(devkit8000_vmmc1_supply),
.consumer_supplies = &devkit8000_vmmc1_supply, .consumer_supplies = devkit8000_vmmc1_supply,
};
/* VDAC for DSS driving S-Video (8 mA unloaded, max 65 mA) */
static struct regulator_init_data devkit8000_vdac = {
.constraints = {
.min_uV = 1800000,
.max_uV = 1800000,
.valid_modes_mask = REGULATOR_MODE_NORMAL
| REGULATOR_MODE_STANDBY,
.valid_ops_mask = REGULATOR_CHANGE_MODE
| REGULATOR_CHANGE_STATUS,
},
.num_consumer_supplies = 1,
.consumer_supplies = &devkit8000_vdda_dac_supply,
}; };
/* VPLL1 for digital video outputs */ /* VPLL1 for digital video outputs */
...@@ -327,31 +310,14 @@ static struct regulator_init_data devkit8000_vio = { ...@@ -327,31 +310,14 @@ static struct regulator_init_data devkit8000_vio = {
.valid_ops_mask = REGULATOR_CHANGE_MODE .valid_ops_mask = REGULATOR_CHANGE_MODE
| REGULATOR_CHANGE_STATUS, | REGULATOR_CHANGE_STATUS,
}, },
.num_consumer_supplies = 1, .num_consumer_supplies = ARRAY_SIZE(devkit8000_vio_supply),
.consumer_supplies = &devkit8000_vio_supply, .consumer_supplies = devkit8000_vio_supply,
};
static struct twl4030_usb_data devkit8000_usb_data = {
.usb_mode = T2_USB_MODE_ULPI,
};
static struct twl4030_codec_audio_data devkit8000_audio_data;
static struct twl4030_codec_data devkit8000_codec_data = {
.audio_mclk = 26000000,
.audio = &devkit8000_audio_data,
}; };
static struct twl4030_platform_data devkit8000_twldata = { static struct twl4030_platform_data devkit8000_twldata = {
.irq_base = TWL4030_IRQ_BASE,
.irq_end = TWL4030_IRQ_END,
/* platform_data for children goes here */ /* platform_data for children goes here */
.usb = &devkit8000_usb_data,
.gpio = &devkit8000_gpio_data, .gpio = &devkit8000_gpio_data,
.codec = &devkit8000_codec_data,
.vmmc1 = &devkit8000_vmmc1, .vmmc1 = &devkit8000_vmmc1,
.vdac = &devkit8000_vdac,
.vpll1 = &devkit8000_vpll1, .vpll1 = &devkit8000_vpll1,
.vio = &devkit8000_vio, .vio = &devkit8000_vio,
.keypad = &devkit8000_kp_data, .keypad = &devkit8000_kp_data,
...@@ -359,6 +325,9 @@ static struct twl4030_platform_data devkit8000_twldata = { ...@@ -359,6 +325,9 @@ static struct twl4030_platform_data devkit8000_twldata = {
static int __init devkit8000_i2c_init(void) static int __init devkit8000_i2c_init(void)
{ {
omap3_pmic_get_config(&devkit8000_twldata,
TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_AUDIO,
TWL_COMMON_REGULATOR_VDAC);
omap3_pmic_init("tps65930", &devkit8000_twldata); omap3_pmic_init("tps65930", &devkit8000_twldata);
/* Bus 3 is attached to the DVI port where devices like the pico DLP /* Bus 3 is attached to the DVI port where devices like the pico DLP
* projector don't work reliably with 400kHz */ * projector don't work reliably with 400kHz */
...@@ -438,10 +407,7 @@ static void __init devkit8000_init_early(void) ...@@ -438,10 +407,7 @@ static void __init devkit8000_init_early(void)
static void __init devkit8000_init_irq(void) static void __init devkit8000_init_irq(void)
{ {
omap_init_irq(); omap3_init_irq();
#ifdef CONFIG_OMAP_32K_TIMER
omap2_gp_clockevent_set_gptimer(12);
#endif
} }
#define OMAP_DM9000_BASE 0x2c000000 #define OMAP_DM9000_BASE 0x2c000000
...@@ -707,5 +673,5 @@ MACHINE_START(DEVKIT8000, "OMAP3 Devkit8000") ...@@ -707,5 +673,5 @@ MACHINE_START(DEVKIT8000, "OMAP3 Devkit8000")
.init_early = devkit8000_init_early, .init_early = devkit8000_init_early,
.init_irq = devkit8000_init_irq, .init_irq = devkit8000_init_irq,
.init_machine = devkit8000_init, .init_machine = devkit8000_init,
.timer = &omap_timer, .timer = &omap3_secure_timer,
MACHINE_END MACHINE_END
...@@ -132,11 +132,7 @@ static struct gpmc_timings nand_timings = { ...@@ -132,11 +132,7 @@ static struct gpmc_timings nand_timings = {
}; };
static struct omap_nand_platform_data board_nand_data = { static struct omap_nand_platform_data board_nand_data = {
.nand_setup = NULL,
.gpmc_t = &nand_timings, .gpmc_t = &nand_timings,
.dma_channel = -1, /* disable DMA in OMAP NAND driver */
.dev_ready = NULL,
.devsize = 0, /* '0' for 8-bit, '1' for 16-bit device */
}; };
void void
......
...@@ -70,7 +70,7 @@ MACHINE_START(OMAP_GENERIC, "Generic OMAP24xx") ...@@ -70,7 +70,7 @@ MACHINE_START(OMAP_GENERIC, "Generic OMAP24xx")
.reserve = omap_reserve, .reserve = omap_reserve,
.map_io = omap_generic_map_io, .map_io = omap_generic_map_io,
.init_early = omap_generic_init_early, .init_early = omap_generic_init_early,
.init_irq = omap_init_irq, .init_irq = omap2_init_irq,
.init_machine = omap_generic_init, .init_machine = omap_generic_init,
.timer = &omap_timer, .timer = &omap2_timer,
MACHINE_END MACHINE_END
...@@ -298,7 +298,7 @@ static void __init omap_h4_init_early(void) ...@@ -298,7 +298,7 @@ static void __init omap_h4_init_early(void)
static void __init omap_h4_init_irq(void) static void __init omap_h4_init_irq(void)
{ {
omap_init_irq(); omap2_init_irq();
} }
static struct at24_platform_data m24c01 = { static struct at24_platform_data m24c01 = {
...@@ -388,5 +388,5 @@ MACHINE_START(OMAP_H4, "OMAP2420 H4 board") ...@@ -388,5 +388,5 @@ MACHINE_START(OMAP_H4, "OMAP2420 H4 board")
.init_early = omap_h4_init_early, .init_early = omap_h4_init_early,
.init_irq = omap_h4_init_irq, .init_irq = omap_h4_init_irq,
.init_machine = omap_h4_init, .init_machine = omap_h4_init,
.timer = &omap_timer, .timer = &omap2_timer,
MACHINE_END MACHINE_END
...@@ -222,8 +222,9 @@ static inline void __init igep2_init_smsc911x(void) ...@@ -222,8 +222,9 @@ static inline void __init igep2_init_smsc911x(void)
static inline void __init igep2_init_smsc911x(void) { } static inline void __init igep2_init_smsc911x(void) { }
#endif #endif
static struct regulator_consumer_supply igep_vmmc1_supply = static struct regulator_consumer_supply igep_vmmc1_supply[] = {
REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"); REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
};
/* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */ /* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */
static struct regulator_init_data igep_vmmc1 = { static struct regulator_init_data igep_vmmc1 = {
...@@ -236,12 +237,13 @@ static struct regulator_init_data igep_vmmc1 = { ...@@ -236,12 +237,13 @@ static struct regulator_init_data igep_vmmc1 = {
| REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_MODE
| REGULATOR_CHANGE_STATUS, | REGULATOR_CHANGE_STATUS,
}, },
.num_consumer_supplies = 1, .num_consumer_supplies = ARRAY_SIZE(igep_vmmc1_supply),
.consumer_supplies = &igep_vmmc1_supply, .consumer_supplies = igep_vmmc1_supply,
}; };
static struct regulator_consumer_supply igep_vio_supply = static struct regulator_consumer_supply igep_vio_supply[] = {
REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.1"); REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.1"),
};
static struct regulator_init_data igep_vio = { static struct regulator_init_data igep_vio = {
.constraints = { .constraints = {
...@@ -254,20 +256,21 @@ static struct regulator_init_data igep_vio = { ...@@ -254,20 +256,21 @@ static struct regulator_init_data igep_vio = {
| REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_MODE
| REGULATOR_CHANGE_STATUS, | REGULATOR_CHANGE_STATUS,
}, },
.num_consumer_supplies = 1, .num_consumer_supplies = ARRAY_SIZE(igep_vio_supply),
.consumer_supplies = &igep_vio_supply, .consumer_supplies = igep_vio_supply,
}; };
static struct regulator_consumer_supply igep_vmmc2_supply = static struct regulator_consumer_supply igep_vmmc2_supply[] = {
REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"); REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"),
};
static struct regulator_init_data igep_vmmc2 = { static struct regulator_init_data igep_vmmc2 = {
.constraints = { .constraints = {
.valid_modes_mask = REGULATOR_MODE_NORMAL, .valid_modes_mask = REGULATOR_MODE_NORMAL,
.always_on = 1, .always_on = 1,
}, },
.num_consumer_supplies = 1, .num_consumer_supplies = ARRAY_SIZE(igep_vmmc2_supply),
.consumer_supplies = &igep_vmmc2_supply, .consumer_supplies = igep_vmmc2_supply,
}; };
static struct fixed_voltage_config igep_vwlan = { static struct fixed_voltage_config igep_vwlan = {
...@@ -440,10 +443,6 @@ static struct twl4030_gpio_platform_data igep_twl4030_gpio_pdata = { ...@@ -440,10 +443,6 @@ static struct twl4030_gpio_platform_data igep_twl4030_gpio_pdata = {
.setup = igep_twl_gpio_setup, .setup = igep_twl_gpio_setup,
}; };
static struct twl4030_usb_data igep_usb_data = {
.usb_mode = T2_USB_MODE_ULPI,
};
static int igep2_enable_dvi(struct omap_dss_device *dssdev) static int igep2_enable_dvi(struct omap_dss_device *dssdev)
{ {
gpio_direction_output(IGEP2_GPIO_DVI_PUP, 1); gpio_direction_output(IGEP2_GPIO_DVI_PUP, 1);
...@@ -480,26 +479,6 @@ static struct omap_dss_board_info igep2_dss_data = { ...@@ -480,26 +479,6 @@ static struct omap_dss_board_info igep2_dss_data = {
.default_device = &igep2_dvi_device, .default_device = &igep2_dvi_device,
}; };
static struct regulator_consumer_supply igep2_vpll2_supplies[] = {
REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"),
};
static struct regulator_init_data igep2_vpll2 = {
.constraints = {
.name = "VDVI",
.min_uV = 1800000,
.max_uV = 1800000,
.apply_uV = true,
.valid_modes_mask = REGULATOR_MODE_NORMAL
| REGULATOR_MODE_STANDBY,
.valid_ops_mask = REGULATOR_CHANGE_MODE
| REGULATOR_CHANGE_STATUS,
},
.num_consumer_supplies = ARRAY_SIZE(igep2_vpll2_supplies),
.consumer_supplies = igep2_vpll2_supplies,
};
static void __init igep2_display_init(void) static void __init igep2_display_init(void)
{ {
int err = gpio_request_one(IGEP2_GPIO_DVI_PUP, GPIOF_OUT_INIT_HIGH, 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,13 +498,6 @@ static void __init igep_init_early(void)
m65kxxxxam_sdrc_params); m65kxxxxam_sdrc_params);
} }
static struct twl4030_codec_audio_data igep2_audio_data;
static struct twl4030_codec_data igep2_codec_data = {
.audio_mclk = 26000000,
.audio = &igep2_audio_data,
};
static int igep2_keymap[] = { static int igep2_keymap[] = {
KEY(0, 0, KEY_LEFT), KEY(0, 0, KEY_LEFT),
KEY(0, 1, KEY_RIGHT), KEY(0, 1, KEY_RIGHT),
...@@ -558,11 +530,7 @@ static struct twl4030_keypad_data igep2_keypad_pdata = { ...@@ -558,11 +530,7 @@ static struct twl4030_keypad_data igep2_keypad_pdata = {
}; };
static struct twl4030_platform_data igep_twldata = { static struct twl4030_platform_data igep_twldata = {
.irq_base = TWL4030_IRQ_BASE,
.irq_end = TWL4030_IRQ_END,
/* platform_data for children goes here */ /* platform_data for children goes here */
.usb = &igep_usb_data,
.gpio = &igep_twl4030_gpio_pdata, .gpio = &igep_twl4030_gpio_pdata,
.vmmc1 = &igep_vmmc1, .vmmc1 = &igep_vmmc1,
.vio = &igep_vio, .vio = &igep_vio,
...@@ -578,6 +546,8 @@ static void __init igep_i2c_init(void) ...@@ -578,6 +546,8 @@ static void __init igep_i2c_init(void)
{ {
int ret; int ret;
omap3_pmic_get_config(&igep_twldata, TWL_COMMON_PDATA_USB, 0);
if (machine_is_igep0020()) { if (machine_is_igep0020()) {
/* /*
* Bus 3 is attached to the DVI port where devices like the * Bus 3 is attached to the DVI port where devices like the
...@@ -588,9 +558,12 @@ static void __init igep_i2c_init(void) ...@@ -588,9 +558,12 @@ static void __init igep_i2c_init(void)
if (ret) if (ret)
pr_warning("IGEP2: Could not register I2C3 bus (%d)\n", ret); pr_warning("IGEP2: Could not register I2C3 bus (%d)\n", ret);
igep_twldata.codec = &igep2_codec_data;
igep_twldata.keypad = &igep2_keypad_pdata; igep_twldata.keypad = &igep2_keypad_pdata;
igep_twldata.vpll2 = &igep2_vpll2; /* Get common pmic data */
omap3_pmic_get_config(&igep_twldata, TWL_COMMON_PDATA_AUDIO,
TWL_COMMON_REGULATOR_VPLL2);
igep_twldata.vpll2->constraints.apply_uV = true;
igep_twldata.vpll2->constraints.name = "VDVI";
} }
omap3_pmic_init("twl4030", &igep_twldata); omap3_pmic_init("twl4030", &igep_twldata);
...@@ -703,9 +676,9 @@ MACHINE_START(IGEP0020, "IGEP v2 board") ...@@ -703,9 +676,9 @@ MACHINE_START(IGEP0020, "IGEP v2 board")
.reserve = omap_reserve, .reserve = omap_reserve,
.map_io = omap3_map_io, .map_io = omap3_map_io,
.init_early = igep_init_early, .init_early = igep_init_early,
.init_irq = omap_init_irq, .init_irq = omap3_init_irq,
.init_machine = igep_init, .init_machine = igep_init,
.timer = &omap_timer, .timer = &omap3_timer,
MACHINE_END MACHINE_END
MACHINE_START(IGEP0030, "IGEP OMAP3 module") MACHINE_START(IGEP0030, "IGEP OMAP3 module")
...@@ -713,7 +686,7 @@ MACHINE_START(IGEP0030, "IGEP OMAP3 module") ...@@ -713,7 +686,7 @@ MACHINE_START(IGEP0030, "IGEP OMAP3 module")
.reserve = omap_reserve, .reserve = omap_reserve,
.map_io = omap3_map_io, .map_io = omap3_map_io,
.init_early = igep_init_early, .init_early = igep_init_early,
.init_irq = omap_init_irq, .init_irq = omap3_init_irq,
.init_machine = igep_init, .init_machine = igep_init,
.timer = &omap_timer, .timer = &omap3_timer,
MACHINE_END MACHINE_END
...@@ -199,22 +199,14 @@ static void __init omap_ldp_init_early(void) ...@@ -199,22 +199,14 @@ static void __init omap_ldp_init_early(void)
omap2_init_common_devices(NULL, NULL); omap2_init_common_devices(NULL, NULL);
} }
static struct twl4030_usb_data ldp_usb_data = {
.usb_mode = T2_USB_MODE_ULPI,
};
static struct twl4030_gpio_platform_data ldp_gpio_data = { static struct twl4030_gpio_platform_data ldp_gpio_data = {
.gpio_base = OMAP_MAX_GPIO_LINES, .gpio_base = OMAP_MAX_GPIO_LINES,
.irq_base = TWL4030_GPIO_IRQ_BASE, .irq_base = TWL4030_GPIO_IRQ_BASE,
.irq_end = TWL4030_GPIO_IRQ_END, .irq_end = TWL4030_GPIO_IRQ_END,
}; };
static struct twl4030_madc_platform_data ldp_madc_data = { static struct regulator_consumer_supply ldp_vmmc1_supply[] = {
.irq_line = 1, REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
};
static struct regulator_consumer_supply ldp_vmmc1_supply = {
.supply = "vmmc",
}; };
/* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */ /* 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,8 +220,8 @@ static struct regulator_init_data ldp_vmmc1 = {
| REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_MODE
| REGULATOR_CHANGE_STATUS, | REGULATOR_CHANGE_STATUS,
}, },
.num_consumer_supplies = 1, .num_consumer_supplies = ARRAY_SIZE(ldp_vmmc1_supply),
.consumer_supplies = &ldp_vmmc1_supply, .consumer_supplies = ldp_vmmc1_supply,
}; };
/* ads7846 on SPI */ /* ads7846 on SPI */
...@@ -253,12 +245,7 @@ static struct regulator_init_data ldp_vaux1 = { ...@@ -253,12 +245,7 @@ static struct regulator_init_data ldp_vaux1 = {
}; };
static struct twl4030_platform_data ldp_twldata = { static struct twl4030_platform_data ldp_twldata = {
.irq_base = TWL4030_IRQ_BASE,
.irq_end = TWL4030_IRQ_END,
/* platform_data for children goes here */ /* platform_data for children goes here */
.madc = &ldp_madc_data,
.usb = &ldp_usb_data,
.vmmc1 = &ldp_vmmc1, .vmmc1 = &ldp_vmmc1,
.vaux1 = &ldp_vaux1, .vaux1 = &ldp_vaux1,
.gpio = &ldp_gpio_data, .gpio = &ldp_gpio_data,
...@@ -267,6 +254,8 @@ static struct twl4030_platform_data ldp_twldata = { ...@@ -267,6 +254,8 @@ static struct twl4030_platform_data ldp_twldata = {
static int __init omap_i2c_init(void) static int __init omap_i2c_init(void)
{ {
omap3_pmic_get_config(&ldp_twldata,
TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_MADC, 0);
omap3_pmic_init("twl4030", &ldp_twldata); omap3_pmic_init("twl4030", &ldp_twldata);
omap_register_i2c_bus(2, 400, NULL, 0); omap_register_i2c_bus(2, 400, NULL, 0);
omap_register_i2c_bus(3, 400, NULL, 0); omap_register_i2c_bus(3, 400, NULL, 0);
...@@ -341,8 +330,6 @@ static void __init omap_ldp_init(void) ...@@ -341,8 +330,6 @@ static void __init omap_ldp_init(void)
ARRAY_SIZE(ldp_nand_partitions), ZOOM_NAND_CS, 0); ARRAY_SIZE(ldp_nand_partitions), ZOOM_NAND_CS, 0);
omap2_hsmmc_init(mmc); omap2_hsmmc_init(mmc);
/* link regulators to MMC adapters */
ldp_vmmc1_supply.dev = mmc[0].dev;
} }
MACHINE_START(OMAP_LDP, "OMAP LDP board") MACHINE_START(OMAP_LDP, "OMAP LDP board")
...@@ -350,7 +337,7 @@ MACHINE_START(OMAP_LDP, "OMAP LDP board") ...@@ -350,7 +337,7 @@ MACHINE_START(OMAP_LDP, "OMAP LDP board")
.reserve = omap_reserve, .reserve = omap_reserve,
.map_io = omap3_map_io, .map_io = omap3_map_io,
.init_early = omap_ldp_init_early, .init_early = omap_ldp_init_early,
.init_irq = omap_init_irq, .init_irq = omap3_init_irq,
.init_machine = omap_ldp_init, .init_machine = omap_ldp_init,
.timer = &omap_timer, .timer = &omap3_timer,
MACHINE_END MACHINE_END
...@@ -699,9 +699,9 @@ MACHINE_START(NOKIA_N800, "Nokia N800") ...@@ -699,9 +699,9 @@ MACHINE_START(NOKIA_N800, "Nokia N800")
.reserve = omap_reserve, .reserve = omap_reserve,
.map_io = n8x0_map_io, .map_io = n8x0_map_io,
.init_early = n8x0_init_early, .init_early = n8x0_init_early,
.init_irq = omap_init_irq, .init_irq = omap2_init_irq,
.init_machine = n8x0_init_machine, .init_machine = n8x0_init_machine,
.timer = &omap_timer, .timer = &omap2_timer,
MACHINE_END MACHINE_END
MACHINE_START(NOKIA_N810, "Nokia N810") MACHINE_START(NOKIA_N810, "Nokia N810")
...@@ -709,9 +709,9 @@ MACHINE_START(NOKIA_N810, "Nokia N810") ...@@ -709,9 +709,9 @@ MACHINE_START(NOKIA_N810, "Nokia N810")
.reserve = omap_reserve, .reserve = omap_reserve,
.map_io = n8x0_map_io, .map_io = n8x0_map_io,
.init_early = n8x0_init_early, .init_early = n8x0_init_early,
.init_irq = omap_init_irq, .init_irq = omap2_init_irq,
.init_machine = n8x0_init_machine, .init_machine = n8x0_init_machine,
.timer = &omap_timer, .timer = &omap2_timer,
MACHINE_END MACHINE_END
MACHINE_START(NOKIA_N810_WIMAX, "Nokia N810 WiMAX") MACHINE_START(NOKIA_N810_WIMAX, "Nokia N810 WiMAX")
...@@ -719,7 +719,7 @@ MACHINE_START(NOKIA_N810_WIMAX, "Nokia N810 WiMAX") ...@@ -719,7 +719,7 @@ MACHINE_START(NOKIA_N810_WIMAX, "Nokia N810 WiMAX")
.reserve = omap_reserve, .reserve = omap_reserve,
.map_io = n8x0_map_io, .map_io = n8x0_map_io,
.init_early = n8x0_init_early, .init_early = n8x0_init_early,
.init_irq = omap_init_irq, .init_irq = omap2_init_irq,
.init_machine = n8x0_init_machine, .init_machine = n8x0_init_machine,
.timer = &omap_timer, .timer = &omap2_timer,
MACHINE_END MACHINE_END
...@@ -50,7 +50,6 @@ ...@@ -50,7 +50,6 @@
#include "mux.h" #include "mux.h"
#include "hsmmc.h" #include "hsmmc.h"
#include "timer-gp.h"
#include "pm.h" #include "pm.h"
#include "common-board-devices.h" #include "common-board-devices.h"
...@@ -210,14 +209,6 @@ static struct omap_dss_board_info beagle_dss_data = { ...@@ -210,14 +209,6 @@ static struct omap_dss_board_info beagle_dss_data = {
.default_device = &beagle_dvi_device, .default_device = &beagle_dvi_device,
}; };
static struct regulator_consumer_supply beagle_vdac_supply =
REGULATOR_SUPPLY("vdda_dac", "omapdss_venc");
static struct regulator_consumer_supply beagle_vdvi_supplies[] = {
REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"),
};
static void __init beagle_display_init(void) static void __init beagle_display_init(void)
{ {
int r; int r;
...@@ -239,12 +230,12 @@ static struct omap2_hsmmc_info mmc[] = { ...@@ -239,12 +230,12 @@ static struct omap2_hsmmc_info mmc[] = {
{} /* Terminator */ {} /* Terminator */
}; };
static struct regulator_consumer_supply beagle_vmmc1_supply = { static struct regulator_consumer_supply beagle_vmmc1_supply[] = {
.supply = "vmmc", REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
}; };
static struct regulator_consumer_supply beagle_vsim_supply = { static struct regulator_consumer_supply beagle_vsim_supply[] = {
.supply = "vmmc_aux", REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.0"),
}; };
static struct gpio_led gpio_leds[]; static struct gpio_led gpio_leds[];
...@@ -267,10 +258,6 @@ static int beagle_twl_gpio_setup(struct device *dev, ...@@ -267,10 +258,6 @@ static int beagle_twl_gpio_setup(struct device *dev,
mmc[0].gpio_cd = gpio + 0; mmc[0].gpio_cd = gpio + 0;
omap2_hsmmc_init(mmc); omap2_hsmmc_init(mmc);
/* link regulators to MMC adapters */
beagle_vmmc1_supply.dev = mmc[0].dev;
beagle_vsim_supply.dev = mmc[0].dev;
/* /*
* TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, XM active * TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, XM active
* high / others active low) * high / others active low)
...@@ -336,8 +323,8 @@ static struct regulator_init_data beagle_vmmc1 = { ...@@ -336,8 +323,8 @@ static struct regulator_init_data beagle_vmmc1 = {
| REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_MODE
| REGULATOR_CHANGE_STATUS, | REGULATOR_CHANGE_STATUS,
}, },
.num_consumer_supplies = 1, .num_consumer_supplies = ARRAY_SIZE(beagle_vmmc1_supply),
.consumer_supplies = &beagle_vmmc1_supply, .consumer_supplies = beagle_vmmc1_supply,
}; };
/* VSIM for MMC1 pins DAT4..DAT7 (2 mA, plus card == max 50 mA) */ /* VSIM for MMC1 pins DAT4..DAT7 (2 mA, plus card == max 50 mA) */
...@@ -351,62 +338,15 @@ static struct regulator_init_data beagle_vsim = { ...@@ -351,62 +338,15 @@ static struct regulator_init_data beagle_vsim = {
| REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_MODE
| REGULATOR_CHANGE_STATUS, | REGULATOR_CHANGE_STATUS,
}, },
.num_consumer_supplies = 1, .num_consumer_supplies = ARRAY_SIZE(beagle_vsim_supply),
.consumer_supplies = &beagle_vsim_supply, .consumer_supplies = beagle_vsim_supply,
};
/* VDAC for DSS driving S-Video (8 mA unloaded, max 65 mA) */
static struct regulator_init_data beagle_vdac = {
.constraints = {
.min_uV = 1800000,
.max_uV = 1800000,
.valid_modes_mask = REGULATOR_MODE_NORMAL
| REGULATOR_MODE_STANDBY,
.valid_ops_mask = REGULATOR_CHANGE_MODE
| REGULATOR_CHANGE_STATUS,
},
.num_consumer_supplies = 1,
.consumer_supplies = &beagle_vdac_supply,
};
/* VPLL2 for digital video outputs */
static struct regulator_init_data beagle_vpll2 = {
.constraints = {
.name = "VDVI",
.min_uV = 1800000,
.max_uV = 1800000,
.valid_modes_mask = REGULATOR_MODE_NORMAL
| REGULATOR_MODE_STANDBY,
.valid_ops_mask = REGULATOR_CHANGE_MODE
| REGULATOR_CHANGE_STATUS,
},
.num_consumer_supplies = ARRAY_SIZE(beagle_vdvi_supplies),
.consumer_supplies = beagle_vdvi_supplies,
};
static struct twl4030_usb_data beagle_usb_data = {
.usb_mode = T2_USB_MODE_ULPI,
};
static struct twl4030_codec_audio_data beagle_audio_data;
static struct twl4030_codec_data beagle_codec_data = {
.audio_mclk = 26000000,
.audio = &beagle_audio_data,
}; };
static struct twl4030_platform_data beagle_twldata = { static struct twl4030_platform_data beagle_twldata = {
.irq_base = TWL4030_IRQ_BASE,
.irq_end = TWL4030_IRQ_END,
/* platform_data for children goes here */ /* platform_data for children goes here */
.usb = &beagle_usb_data,
.gpio = &beagle_gpio_data, .gpio = &beagle_gpio_data,
.codec = &beagle_codec_data,
.vmmc1 = &beagle_vmmc1, .vmmc1 = &beagle_vmmc1,
.vsim = &beagle_vsim, .vsim = &beagle_vsim,
.vdac = &beagle_vdac,
.vpll2 = &beagle_vpll2,
}; };
static struct i2c_board_info __initdata beagle_i2c_eeprom[] = { static struct i2c_board_info __initdata beagle_i2c_eeprom[] = {
...@@ -417,6 +357,12 @@ static struct i2c_board_info __initdata beagle_i2c_eeprom[] = { ...@@ -417,6 +357,12 @@ static struct i2c_board_info __initdata beagle_i2c_eeprom[] = {
static int __init omap3_beagle_i2c_init(void) static int __init omap3_beagle_i2c_init(void)
{ {
omap3_pmic_get_config(&beagle_twldata,
TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_AUDIO,
TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2);
beagle_twldata.vpll2->constraints.name = "VDVI";
omap3_pmic_init("twl4030", &beagle_twldata); omap3_pmic_init("twl4030", &beagle_twldata);
/* Bus 3 is attached to the DVI port where devices like the pico DLP /* Bus 3 is attached to the DVI port where devices like the pico DLP
* projector don't work reliably with 400kHz */ * projector don't work reliably with 400kHz */
...@@ -486,10 +432,7 @@ static void __init omap3_beagle_init_early(void) ...@@ -486,10 +432,7 @@ static void __init omap3_beagle_init_early(void)
static void __init omap3_beagle_init_irq(void) static void __init omap3_beagle_init_irq(void)
{ {
omap_init_irq(); omap3_init_irq();
#ifdef CONFIG_OMAP_32K_TIMER
omap2_gp_clockevent_set_gptimer(12);
#endif
} }
static struct platform_device *omap3_beagle_devices[] __initdata = { static struct platform_device *omap3_beagle_devices[] __initdata = {
...@@ -599,5 +542,5 @@ MACHINE_START(OMAP3_BEAGLE, "OMAP3 Beagle Board") ...@@ -599,5 +542,5 @@ MACHINE_START(OMAP3_BEAGLE, "OMAP3 Beagle Board")
.init_early = omap3_beagle_init_early, .init_early = omap3_beagle_init_early,
.init_irq = omap3_beagle_init_irq, .init_irq = omap3_beagle_init_irq,
.init_machine = omap3_beagle_init, .init_machine = omap3_beagle_init,
.timer = &omap_timer, .timer = &omap3_secure_timer,
MACHINE_END MACHINE_END
...@@ -273,12 +273,12 @@ static struct omap_dss_board_info omap3_evm_dss_data = { ...@@ -273,12 +273,12 @@ static struct omap_dss_board_info omap3_evm_dss_data = {
.default_device = &omap3_evm_lcd_device, .default_device = &omap3_evm_lcd_device,
}; };
static struct regulator_consumer_supply omap3evm_vmmc1_supply = { static struct regulator_consumer_supply omap3evm_vmmc1_supply[] = {
.supply = "vmmc", REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
}; };
static struct regulator_consumer_supply omap3evm_vsim_supply = { static struct regulator_consumer_supply omap3evm_vsim_supply[] = {
.supply = "vmmc_aux", REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.0"),
}; };
/* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */ /* 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,8 +292,8 @@ static struct regulator_init_data omap3evm_vmmc1 = {
| REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_MODE
| REGULATOR_CHANGE_STATUS, | REGULATOR_CHANGE_STATUS,
}, },
.num_consumer_supplies = 1, .num_consumer_supplies = ARRAY_SIZE(omap3evm_vmmc1_supply),
.consumer_supplies = &omap3evm_vmmc1_supply, .consumer_supplies = omap3evm_vmmc1_supply,
}; };
/* VSIM for MMC1 pins DAT4..DAT7 (2 mA, plus card == max 50 mA) */ /* 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,8 +307,8 @@ static struct regulator_init_data omap3evm_vsim = {
| REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_MODE
| REGULATOR_CHANGE_STATUS, | REGULATOR_CHANGE_STATUS,
}, },
.num_consumer_supplies = 1, .num_consumer_supplies = ARRAY_SIZE(omap3evm_vsim_supply),
.consumer_supplies = &omap3evm_vsim_supply, .consumer_supplies = omap3evm_vsim_supply,
}; };
static struct omap2_hsmmc_info mmc[] = { static struct omap2_hsmmc_info mmc[] = {
...@@ -365,10 +365,6 @@ static int omap3evm_twl_gpio_setup(struct device *dev, ...@@ -365,10 +365,6 @@ static int omap3evm_twl_gpio_setup(struct device *dev,
mmc[0].gpio_cd = gpio + 0; mmc[0].gpio_cd = gpio + 0;
omap2_hsmmc_init(mmc); omap2_hsmmc_init(mmc);
/* link regulators to MMC adapters */
omap3evm_vmmc1_supply.dev = mmc[0].dev;
omap3evm_vsim_supply.dev = mmc[0].dev;
/* /*
* Most GPIOs are for USB OTG. Some are mostly sent to * Most GPIOs are for USB OTG. Some are mostly sent to
* the P2 connector; notably LEDA for the LCD backlight. * the P2 connector; notably LEDA for the LCD backlight.
...@@ -400,10 +396,6 @@ static struct twl4030_gpio_platform_data omap3evm_gpio_data = { ...@@ -400,10 +396,6 @@ static struct twl4030_gpio_platform_data omap3evm_gpio_data = {
.setup = omap3evm_twl_gpio_setup, .setup = omap3evm_twl_gpio_setup,
}; };
static struct twl4030_usb_data omap3evm_usb_data = {
.usb_mode = T2_USB_MODE_ULPI,
};
static uint32_t board_keymap[] = { static uint32_t board_keymap[] = {
KEY(0, 0, KEY_LEFT), KEY(0, 0, KEY_LEFT),
KEY(0, 1, KEY_DOWN), KEY(0, 1, KEY_DOWN),
...@@ -438,58 +430,10 @@ static struct twl4030_keypad_data omap3evm_kp_data = { ...@@ -438,58 +430,10 @@ static struct twl4030_keypad_data omap3evm_kp_data = {
.rep = 1, .rep = 1,
}; };
static struct twl4030_madc_platform_data omap3evm_madc_data = {
.irq_line = 1,
};
static struct twl4030_codec_audio_data omap3evm_audio_data;
static struct twl4030_codec_data omap3evm_codec_data = {
.audio_mclk = 26000000,
.audio = &omap3evm_audio_data,
};
static struct regulator_consumer_supply omap3_evm_vdda_dac_supply =
REGULATOR_SUPPLY("vdda_dac", "omapdss_venc");
/* VDAC for DSS driving S-Video */
static struct regulator_init_data omap3_evm_vdac = {
.constraints = {
.min_uV = 1800000,
.max_uV = 1800000,
.apply_uV = true,
.valid_modes_mask = REGULATOR_MODE_NORMAL
| REGULATOR_MODE_STANDBY,
.valid_ops_mask = REGULATOR_CHANGE_MODE
| REGULATOR_CHANGE_STATUS,
},
.num_consumer_supplies = 1,
.consumer_supplies = &omap3_evm_vdda_dac_supply,
};
/* VPLL2 for digital video outputs */
static struct regulator_consumer_supply omap3_evm_vpll2_supplies[] = {
REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"),
};
static struct regulator_init_data omap3_evm_vpll2 = {
.constraints = {
.min_uV = 1800000,
.max_uV = 1800000,
.apply_uV = true,
.valid_modes_mask = REGULATOR_MODE_NORMAL
| REGULATOR_MODE_STANDBY,
.valid_ops_mask = REGULATOR_CHANGE_MODE
| REGULATOR_CHANGE_STATUS,
},
.num_consumer_supplies = ARRAY_SIZE(omap3_evm_vpll2_supplies),
.consumer_supplies = omap3_evm_vpll2_supplies,
};
/* ads7846 on SPI */ /* ads7846 on SPI */
static struct regulator_consumer_supply omap3evm_vio_supply = static struct regulator_consumer_supply omap3evm_vio_supply[] = {
REGULATOR_SUPPLY("vcc", "spi1.0"); REGULATOR_SUPPLY("vcc", "spi1.0"),
};
/* VIO for ads7846 */ /* VIO for ads7846 */
static struct regulator_init_data omap3evm_vio = { static struct regulator_init_data omap3evm_vio = {
...@@ -502,8 +446,8 @@ static struct regulator_init_data omap3evm_vio = { ...@@ -502,8 +446,8 @@ static struct regulator_init_data omap3evm_vio = {
.valid_ops_mask = REGULATOR_CHANGE_MODE .valid_ops_mask = REGULATOR_CHANGE_MODE
| REGULATOR_CHANGE_STATUS, | REGULATOR_CHANGE_STATUS,
}, },
.num_consumer_supplies = 1, .num_consumer_supplies = ARRAY_SIZE(omap3evm_vio_supply),
.consumer_supplies = &omap3evm_vio_supply, .consumer_supplies = omap3evm_vio_supply,
}; };
#ifdef CONFIG_WL12XX_PLATFORM_DATA #ifdef CONFIG_WL12XX_PLATFORM_DATA
...@@ -511,16 +455,17 @@ static struct regulator_init_data omap3evm_vio = { ...@@ -511,16 +455,17 @@ static struct regulator_init_data omap3evm_vio = {
#define OMAP3EVM_WLAN_PMENA_GPIO (150) #define OMAP3EVM_WLAN_PMENA_GPIO (150)
#define OMAP3EVM_WLAN_IRQ_GPIO (149) #define OMAP3EVM_WLAN_IRQ_GPIO (149)
static struct regulator_consumer_supply omap3evm_vmmc2_supply = static struct regulator_consumer_supply omap3evm_vmmc2_supply[] = {
REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"); REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"),
};
/* VMMC2 for driving the WL12xx module */ /* VMMC2 for driving the WL12xx module */
static struct regulator_init_data omap3evm_vmmc2 = { static struct regulator_init_data omap3evm_vmmc2 = {
.constraints = { .constraints = {
.valid_ops_mask = REGULATOR_CHANGE_STATUS, .valid_ops_mask = REGULATOR_CHANGE_STATUS,
}, },
.num_consumer_supplies = 1, .num_consumer_supplies = ARRAY_SIZE(omap3evm_vmmc2_supply),
.consumer_supplies = &omap3evm_vmmc2_supply, .consumer_supplies = omap3evm_vmmc2_supply,
}; };
static struct fixed_voltage_config omap3evm_vwlan = { static struct fixed_voltage_config omap3evm_vwlan = {
...@@ -548,17 +493,9 @@ struct wl12xx_platform_data omap3evm_wlan_data __initdata = { ...@@ -548,17 +493,9 @@ struct wl12xx_platform_data omap3evm_wlan_data __initdata = {
#endif #endif
static struct twl4030_platform_data omap3evm_twldata = { static struct twl4030_platform_data omap3evm_twldata = {
.irq_base = TWL4030_IRQ_BASE,
.irq_end = TWL4030_IRQ_END,
/* platform_data for children goes here */ /* platform_data for children goes here */
.keypad = &omap3evm_kp_data, .keypad = &omap3evm_kp_data,
.madc = &omap3evm_madc_data,
.usb = &omap3evm_usb_data,
.gpio = &omap3evm_gpio_data, .gpio = &omap3evm_gpio_data,
.codec = &omap3evm_codec_data,
.vdac = &omap3_evm_vdac,
.vpll2 = &omap3_evm_vpll2,
.vio = &omap3evm_vio, .vio = &omap3evm_vio,
.vmmc1 = &omap3evm_vmmc1, .vmmc1 = &omap3evm_vmmc1,
.vsim = &omap3evm_vsim, .vsim = &omap3evm_vsim,
...@@ -566,6 +503,14 @@ static struct twl4030_platform_data omap3evm_twldata = { ...@@ -566,6 +503,14 @@ static struct twl4030_platform_data omap3evm_twldata = {
static int __init omap3_evm_i2c_init(void) static int __init omap3_evm_i2c_init(void)
{ {
omap3_pmic_get_config(&omap3evm_twldata,
TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_MADC |
TWL_COMMON_PDATA_AUDIO,
TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2);
omap3evm_twldata.vdac->constraints.apply_uV = true;
omap3evm_twldata.vpll2->constraints.apply_uV = true;
omap3_pmic_init("twl4030", &omap3evm_twldata); omap3_pmic_init("twl4030", &omap3evm_twldata);
omap_register_i2c_bus(2, 400, NULL, 0); omap_register_i2c_bus(2, 400, NULL, 0);
omap_register_i2c_bus(3, 400, NULL, 0); omap_register_i2c_bus(3, 400, NULL, 0);
...@@ -740,7 +685,7 @@ MACHINE_START(OMAP3EVM, "OMAP3 EVM") ...@@ -740,7 +685,7 @@ MACHINE_START(OMAP3EVM, "OMAP3 EVM")
.reserve = omap_reserve, .reserve = omap_reserve,
.map_io = omap3_map_io, .map_io = omap3_map_io,
.init_early = omap3_evm_init_early, .init_early = omap3_evm_init_early,
.init_irq = omap_init_irq, .init_irq = omap3_init_irq,
.init_machine = omap3_evm_init, .init_machine = omap3_evm_init,
.timer = &omap_timer, .timer = &omap3_timer,
MACHINE_END MACHINE_END
...@@ -35,7 +35,6 @@ ...@@ -35,7 +35,6 @@
#include "mux.h" #include "mux.h"
#include "hsmmc.h" #include "hsmmc.h"
#include "timer-gp.h"
#include "control.h" #include "control.h"
#include "common-board-devices.h" #include "common-board-devices.h"
...@@ -55,8 +54,8 @@ ...@@ -55,8 +54,8 @@
#define OMAP3_TORPEDO_MMC_GPIO_CD 127 #define OMAP3_TORPEDO_MMC_GPIO_CD 127
#define OMAP3_TORPEDO_SMSC911X_GPIO_IRQ 129 #define OMAP3_TORPEDO_SMSC911X_GPIO_IRQ 129
static struct regulator_consumer_supply omap3logic_vmmc1_supply = { static struct regulator_consumer_supply omap3logic_vmmc1_supply[] = {
.supply = "vmmc", REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
}; };
/* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */ /* 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,8 +70,8 @@ static struct regulator_init_data omap3logic_vmmc1 = {
| REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_MODE
| REGULATOR_CHANGE_STATUS, | REGULATOR_CHANGE_STATUS,
}, },
.num_consumer_supplies = 1, .num_consumer_supplies = ARRAY_SIZE(omap3logic_vmmc1_supply),
.consumer_supplies = &omap3logic_vmmc1_supply, .consumer_supplies = omap3logic_vmmc1_supply,
}; };
static struct twl4030_gpio_platform_data omap3logic_gpio_data = { static struct twl4030_gpio_platform_data omap3logic_gpio_data = {
...@@ -130,8 +129,6 @@ static void __init board_mmc_init(void) ...@@ -130,8 +129,6 @@ static void __init board_mmc_init(void)
} }
omap2_hsmmc_init(board_mmc_info); omap2_hsmmc_init(board_mmc_info);
/* link regulators to MMC adapters */
omap3logic_vmmc1_supply.dev = board_mmc_info[0].dev;
} }
static struct omap_smsc911x_platform_data __initdata board_smsc911x_data = { static struct omap_smsc911x_platform_data __initdata board_smsc911x_data = {
...@@ -215,16 +212,16 @@ MACHINE_START(OMAP3_TORPEDO, "Logic OMAP3 Torpedo board") ...@@ -215,16 +212,16 @@ MACHINE_START(OMAP3_TORPEDO, "Logic OMAP3 Torpedo board")
.boot_params = 0x80000100, .boot_params = 0x80000100,
.map_io = omap3_map_io, .map_io = omap3_map_io,
.init_early = omap3logic_init_early, .init_early = omap3logic_init_early,
.init_irq = omap_init_irq, .init_irq = omap3_init_irq,
.init_machine = omap3logic_init, .init_machine = omap3logic_init,
.timer = &omap_timer, .timer = &omap3_timer,
MACHINE_END MACHINE_END
MACHINE_START(OMAP3530_LV_SOM, "OMAP Logic 3530 LV SOM board") MACHINE_START(OMAP3530_LV_SOM, "OMAP Logic 3530 LV SOM board")
.boot_params = 0x80000100, .boot_params = 0x80000100,
.map_io = omap3_map_io, .map_io = omap3_map_io,
.init_early = omap3logic_init_early, .init_early = omap3logic_init_early,
.init_irq = omap_init_irq, .init_irq = omap3_init_irq,
.init_machine = omap3logic_init, .init_machine = omap3logic_init,
.timer = &omap_timer, .timer = &omap3_timer,
MACHINE_END MACHINE_END
...@@ -320,17 +320,17 @@ static struct twl4030_gpio_platform_data omap3pandora_gpio_data = { ...@@ -320,17 +320,17 @@ static struct twl4030_gpio_platform_data omap3pandora_gpio_data = {
.setup = omap3pandora_twl_gpio_setup, .setup = omap3pandora_twl_gpio_setup,
}; };
static struct regulator_consumer_supply pandora_vmmc1_supply = static struct regulator_consumer_supply pandora_vmmc1_supply[] = {
REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"); REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
};
static struct regulator_consumer_supply pandora_vmmc2_supply =
REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1");
static struct regulator_consumer_supply pandora_vmmc3_supply = static struct regulator_consumer_supply pandora_vmmc2_supply[] = {
REGULATOR_SUPPLY("vmmc", "omap_hsmmc.2"); REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1")
};
static struct regulator_consumer_supply pandora_vdda_dac_supply = static struct regulator_consumer_supply pandora_vmmc3_supply[] = {
REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"); REGULATOR_SUPPLY("vmmc", "omap_hsmmc.2"),
};
static struct regulator_consumer_supply pandora_vdds_supplies[] = { static struct regulator_consumer_supply pandora_vdds_supplies[] = {
REGULATOR_SUPPLY("vdds_sdi", "omapdss"), REGULATOR_SUPPLY("vdds_sdi", "omapdss"),
...@@ -338,11 +338,13 @@ static struct regulator_consumer_supply pandora_vdds_supplies[] = { ...@@ -338,11 +338,13 @@ static struct regulator_consumer_supply pandora_vdds_supplies[] = {
REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"), REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"),
}; };
static struct regulator_consumer_supply pandora_vcc_lcd_supply = static struct regulator_consumer_supply pandora_vcc_lcd_supply[] = {
REGULATOR_SUPPLY("vcc", "display0"); REGULATOR_SUPPLY("vcc", "display0"),
};
static struct regulator_consumer_supply pandora_usb_phy_supply = static struct regulator_consumer_supply pandora_usb_phy_supply[] = {
REGULATOR_SUPPLY("hsusb0", "ehci-omap.0"); REGULATOR_SUPPLY("hsusb0", "ehci-omap.0"),
};
/* ads7846 on SPI and 2 nub controllers on I2C */ /* ads7846 on SPI and 2 nub controllers on I2C */
static struct regulator_consumer_supply pandora_vaux4_supplies[] = { static struct regulator_consumer_supply pandora_vaux4_supplies[] = {
...@@ -351,8 +353,9 @@ static struct regulator_consumer_supply pandora_vaux4_supplies[] = { ...@@ -351,8 +353,9 @@ static struct regulator_consumer_supply pandora_vaux4_supplies[] = {
REGULATOR_SUPPLY("vcc", "3-0067"), REGULATOR_SUPPLY("vcc", "3-0067"),
}; };
static struct regulator_consumer_supply pandora_adac_supply = static struct regulator_consumer_supply pandora_adac_supply[] = {
REGULATOR_SUPPLY("vcc", "soc-audio"); REGULATOR_SUPPLY("vcc", "soc-audio"),
};
/* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */ /* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */
static struct regulator_init_data pandora_vmmc1 = { static struct regulator_init_data pandora_vmmc1 = {
...@@ -365,8 +368,8 @@ static struct regulator_init_data pandora_vmmc1 = { ...@@ -365,8 +368,8 @@ static struct regulator_init_data pandora_vmmc1 = {
| REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_MODE
| REGULATOR_CHANGE_STATUS, | REGULATOR_CHANGE_STATUS,
}, },
.num_consumer_supplies = 1, .num_consumer_supplies = ARRAY_SIZE(pandora_vmmc1_supply),
.consumer_supplies = &pandora_vmmc1_supply, .consumer_supplies = pandora_vmmc1_supply,
}; };
/* VMMC2 for MMC2 pins CMD, CLK, DAT0..DAT3 (max 100 mA) */ /* VMMC2 for MMC2 pins CMD, CLK, DAT0..DAT3 (max 100 mA) */
...@@ -380,38 +383,8 @@ static struct regulator_init_data pandora_vmmc2 = { ...@@ -380,38 +383,8 @@ static struct regulator_init_data pandora_vmmc2 = {
| REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_MODE
| REGULATOR_CHANGE_STATUS, | REGULATOR_CHANGE_STATUS,
}, },
.num_consumer_supplies = 1, .num_consumer_supplies = ARRAY_SIZE(pandora_vmmc2_supply),
.consumer_supplies = &pandora_vmmc2_supply, .consumer_supplies = pandora_vmmc2_supply,
};
/* VDAC for DSS driving S-Video */
static struct regulator_init_data pandora_vdac = {
.constraints = {
.min_uV = 1800000,
.max_uV = 1800000,
.apply_uV = true,
.valid_modes_mask = REGULATOR_MODE_NORMAL
| REGULATOR_MODE_STANDBY,
.valid_ops_mask = REGULATOR_CHANGE_MODE
| REGULATOR_CHANGE_STATUS,
},
.num_consumer_supplies = 1,
.consumer_supplies = &pandora_vdda_dac_supply,
};
/* VPLL2 for digital video outputs */
static struct regulator_init_data pandora_vpll2 = {
.constraints = {
.min_uV = 1800000,
.max_uV = 1800000,
.apply_uV = true,
.valid_modes_mask = REGULATOR_MODE_NORMAL
| REGULATOR_MODE_STANDBY,
.valid_ops_mask = REGULATOR_CHANGE_MODE
| REGULATOR_CHANGE_STATUS,
},
.num_consumer_supplies = ARRAY_SIZE(pandora_vdds_supplies),
.consumer_supplies = pandora_vdds_supplies,
}; };
/* VAUX1 for LCD */ /* VAUX1 for LCD */
...@@ -425,8 +398,8 @@ static struct regulator_init_data pandora_vaux1 = { ...@@ -425,8 +398,8 @@ static struct regulator_init_data pandora_vaux1 = {
.valid_ops_mask = REGULATOR_CHANGE_MODE .valid_ops_mask = REGULATOR_CHANGE_MODE
| REGULATOR_CHANGE_STATUS, | REGULATOR_CHANGE_STATUS,
}, },
.num_consumer_supplies = 1, .num_consumer_supplies = ARRAY_SIZE(pandora_vcc_lcd_supply),
.consumer_supplies = &pandora_vcc_lcd_supply, .consumer_supplies = pandora_vcc_lcd_supply,
}; };
/* VAUX2 for USB host PHY */ /* VAUX2 for USB host PHY */
...@@ -440,8 +413,8 @@ static struct regulator_init_data pandora_vaux2 = { ...@@ -440,8 +413,8 @@ static struct regulator_init_data pandora_vaux2 = {
.valid_ops_mask = REGULATOR_CHANGE_MODE .valid_ops_mask = REGULATOR_CHANGE_MODE
| REGULATOR_CHANGE_STATUS, | REGULATOR_CHANGE_STATUS,
}, },
.num_consumer_supplies = 1, .num_consumer_supplies = ARRAY_SIZE(pandora_usb_phy_supply),
.consumer_supplies = &pandora_usb_phy_supply, .consumer_supplies = pandora_usb_phy_supply,
}; };
/* VAUX4 for ads7846 and nubs */ /* VAUX4 for ads7846 and nubs */
...@@ -470,8 +443,8 @@ static struct regulator_init_data pandora_vsim = { ...@@ -470,8 +443,8 @@ static struct regulator_init_data pandora_vsim = {
.valid_ops_mask = REGULATOR_CHANGE_MODE .valid_ops_mask = REGULATOR_CHANGE_MODE
| REGULATOR_CHANGE_STATUS, | REGULATOR_CHANGE_STATUS,
}, },
.num_consumer_supplies = 1, .num_consumer_supplies = ARRAY_SIZE(pandora_adac_supply),
.consumer_supplies = &pandora_adac_supply, .consumer_supplies = pandora_adac_supply,
}; };
/* Fixed regulator internal to Wifi module */ /* Fixed regulator internal to Wifi module */
...@@ -479,8 +452,8 @@ static struct regulator_init_data pandora_vmmc3 = { ...@@ -479,8 +452,8 @@ static struct regulator_init_data pandora_vmmc3 = {
.constraints = { .constraints = {
.valid_ops_mask = REGULATOR_CHANGE_STATUS, .valid_ops_mask = REGULATOR_CHANGE_STATUS,
}, },
.num_consumer_supplies = 1, .num_consumer_supplies = ARRAY_SIZE(pandora_vmmc3_supply),
.consumer_supplies = &pandora_vmmc3_supply, .consumer_supplies = pandora_vmmc3_supply,
}; };
static struct fixed_voltage_config pandora_vwlan = { static struct fixed_voltage_config pandora_vwlan = {
...@@ -501,29 +474,12 @@ static struct platform_device pandora_vwlan_device = { ...@@ -501,29 +474,12 @@ static struct platform_device pandora_vwlan_device = {
}, },
}; };
static struct twl4030_usb_data omap3pandora_usb_data = {
.usb_mode = T2_USB_MODE_ULPI,
};
static struct twl4030_codec_audio_data omap3pandora_audio_data;
static struct twl4030_codec_data omap3pandora_codec_data = {
.audio_mclk = 26000000,
.audio = &omap3pandora_audio_data,
};
static struct twl4030_bci_platform_data pandora_bci_data; static struct twl4030_bci_platform_data pandora_bci_data;
static struct twl4030_platform_data omap3pandora_twldata = { static struct twl4030_platform_data omap3pandora_twldata = {
.irq_base = TWL4030_IRQ_BASE,
.irq_end = TWL4030_IRQ_END,
.gpio = &omap3pandora_gpio_data, .gpio = &omap3pandora_gpio_data,
.usb = &omap3pandora_usb_data,
.codec = &omap3pandora_codec_data,
.vmmc1 = &pandora_vmmc1, .vmmc1 = &pandora_vmmc1,
.vmmc2 = &pandora_vmmc2, .vmmc2 = &pandora_vmmc2,
.vdac = &pandora_vdac,
.vpll2 = &pandora_vpll2,
.vaux1 = &pandora_vaux1, .vaux1 = &pandora_vaux1,
.vaux2 = &pandora_vaux2, .vaux2 = &pandora_vaux2,
.vaux4 = &pandora_vaux4, .vaux4 = &pandora_vaux4,
...@@ -541,6 +497,17 @@ static struct i2c_board_info __initdata omap3pandora_i2c3_boardinfo[] = { ...@@ -541,6 +497,17 @@ static struct i2c_board_info __initdata omap3pandora_i2c3_boardinfo[] = {
static int __init omap3pandora_i2c_init(void) static int __init omap3pandora_i2c_init(void)
{ {
omap3_pmic_get_config(&omap3pandora_twldata,
TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_AUDIO,
TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2);
omap3pandora_twldata.vdac->constraints.apply_uV = true;
omap3pandora_twldata.vpll2->constraints.apply_uV = true;
omap3pandora_twldata.vpll2->num_consumer_supplies =
ARRAY_SIZE(pandora_vdds_supplies);
omap3pandora_twldata.vpll2->consumer_supplies = pandora_vdds_supplies;
omap3_pmic_init("tps65950", &omap3pandora_twldata); omap3_pmic_init("tps65950", &omap3pandora_twldata);
/* i2c2 pins are not connected */ /* i2c2 pins are not connected */
omap_register_i2c_bus(3, 100, omap3pandora_i2c3_boardinfo, omap_register_i2c_bus(3, 100, omap3pandora_i2c3_boardinfo,
...@@ -643,7 +610,7 @@ MACHINE_START(OMAP3_PANDORA, "Pandora Handheld Console") ...@@ -643,7 +610,7 @@ MACHINE_START(OMAP3_PANDORA, "Pandora Handheld Console")
.reserve = omap_reserve, .reserve = omap_reserve,
.map_io = omap3_map_io, .map_io = omap3_map_io,
.init_early = omap3pandora_init_early, .init_early = omap3pandora_init_early,
.init_irq = omap_init_irq, .init_irq = omap3_init_irq,
.init_machine = omap3pandora_init, .init_machine = omap3pandora_init,
.timer = &omap_timer, .timer = &omap3_timer,
MACHINE_END MACHINE_END
...@@ -52,7 +52,6 @@ ...@@ -52,7 +52,6 @@
#include "sdram-micron-mt46h32m32lf-6.h" #include "sdram-micron-mt46h32m32lf-6.h"
#include "mux.h" #include "mux.h"
#include "hsmmc.h" #include "hsmmc.h"
#include "timer-gp.h"
#include "common-board-devices.h" #include "common-board-devices.h"
#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE) #if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE)
...@@ -206,12 +205,12 @@ static struct omap_dss_board_info omap3_stalker_dss_data = { ...@@ -206,12 +205,12 @@ static struct omap_dss_board_info omap3_stalker_dss_data = {
.default_device = &omap3_stalker_dvi_device, .default_device = &omap3_stalker_dvi_device,
}; };
static struct regulator_consumer_supply omap3stalker_vmmc1_supply = { static struct regulator_consumer_supply omap3stalker_vmmc1_supply[] = {
.supply = "vmmc", REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
}; };
static struct regulator_consumer_supply omap3stalker_vsim_supply = { static struct regulator_consumer_supply omap3stalker_vsim_supply[] = {
.supply = "vmmc_aux", REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.0"),
}; };
/* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */ /* 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,8 +223,8 @@ static struct regulator_init_data omap3stalker_vmmc1 = {
.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
| REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS, | REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS,
}, },
.num_consumer_supplies = 1, .num_consumer_supplies = ARRAY_SIZE(omap3stalker_vmmc1_supply),
.consumer_supplies = &omap3stalker_vmmc1_supply, .consumer_supplies = omap3stalker_vmmc1_supply,
}; };
/* VSIM for MMC1 pins DAT4..DAT7 (2 mA, plus card == max 50 mA) */ /* 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,8 +237,8 @@ static struct regulator_init_data omap3stalker_vsim = {
.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
| REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS, | REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS,
}, },
.num_consumer_supplies = 1, .num_consumer_supplies = ARRAY_SIZE(omap3stalker_vsim_supply),
.consumer_supplies = &omap3stalker_vsim_supply, .consumer_supplies = omap3stalker_vsim_supply,
}; };
static struct omap2_hsmmc_info mmc[] = { static struct omap2_hsmmc_info mmc[] = {
...@@ -321,10 +320,6 @@ omap3stalker_twl_gpio_setup(struct device *dev, ...@@ -321,10 +320,6 @@ omap3stalker_twl_gpio_setup(struct device *dev,
mmc[0].gpio_cd = gpio + 0; mmc[0].gpio_cd = gpio + 0;
omap2_hsmmc_init(mmc); omap2_hsmmc_init(mmc);
/* link regulators to MMC adapters */
omap3stalker_vmmc1_supply.dev = mmc[0].dev;
omap3stalker_vsim_supply.dev = mmc[0].dev;
/* /*
* Most GPIOs are for USB OTG. Some are mostly sent to * Most GPIOs are for USB OTG. Some are mostly sent to
* the P2 connector; notably LEDA for the LCD backlight. * the P2 connector; notably LEDA for the LCD backlight.
...@@ -354,10 +349,6 @@ static struct twl4030_gpio_platform_data omap3stalker_gpio_data = { ...@@ -354,10 +349,6 @@ static struct twl4030_gpio_platform_data omap3stalker_gpio_data = {
.setup = omap3stalker_twl_gpio_setup, .setup = omap3stalker_twl_gpio_setup,
}; };
static struct twl4030_usb_data omap3stalker_usb_data = {
.usb_mode = T2_USB_MODE_ULPI,
};
static uint32_t board_keymap[] = { static uint32_t board_keymap[] = {
KEY(0, 0, KEY_LEFT), KEY(0, 0, KEY_LEFT),
KEY(0, 1, KEY_DOWN), KEY(0, 1, KEY_DOWN),
...@@ -392,68 +383,10 @@ static struct twl4030_keypad_data omap3stalker_kp_data = { ...@@ -392,68 +383,10 @@ static struct twl4030_keypad_data omap3stalker_kp_data = {
.rep = 1, .rep = 1,
}; };
static struct twl4030_madc_platform_data omap3stalker_madc_data = {
.irq_line = 1,
};
static struct twl4030_codec_audio_data omap3stalker_audio_data;
static struct twl4030_codec_data omap3stalker_codec_data = {
.audio_mclk = 26000000,
.audio = &omap3stalker_audio_data,
};
static struct regulator_consumer_supply omap3_stalker_vdda_dac_supply =
REGULATOR_SUPPLY("vdda_dac", "omapdss_venc");
/* VDAC for DSS driving S-Video */
static struct regulator_init_data omap3_stalker_vdac = {
.constraints = {
.min_uV = 1800000,
.max_uV = 1800000,
.apply_uV = true,
.valid_modes_mask = REGULATOR_MODE_NORMAL
| REGULATOR_MODE_STANDBY,
.valid_ops_mask = REGULATOR_CHANGE_MODE
| REGULATOR_CHANGE_STATUS,
},
.num_consumer_supplies = 1,
.consumer_supplies = &omap3_stalker_vdda_dac_supply,
};
/* VPLL2 for digital video outputs */
static struct regulator_consumer_supply omap3_stalker_vpll2_supplies[] = {
REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"),
};
static struct regulator_init_data omap3_stalker_vpll2 = {
.constraints = {
.name = "VDVI",
.min_uV = 1800000,
.max_uV = 1800000,
.apply_uV = true,
.valid_modes_mask = REGULATOR_MODE_NORMAL
| REGULATOR_MODE_STANDBY,
.valid_ops_mask = REGULATOR_CHANGE_MODE
| REGULATOR_CHANGE_STATUS,
},
.num_consumer_supplies = ARRAY_SIZE(omap3_stalker_vpll2_supplies),
.consumer_supplies = omap3_stalker_vpll2_supplies,
};
static struct twl4030_platform_data omap3stalker_twldata = { static struct twl4030_platform_data omap3stalker_twldata = {
.irq_base = TWL4030_IRQ_BASE,
.irq_end = TWL4030_IRQ_END,
/* platform_data for children goes here */ /* platform_data for children goes here */
.keypad = &omap3stalker_kp_data, .keypad = &omap3stalker_kp_data,
.madc = &omap3stalker_madc_data,
.usb = &omap3stalker_usb_data,
.gpio = &omap3stalker_gpio_data, .gpio = &omap3stalker_gpio_data,
.codec = &omap3stalker_codec_data,
.vdac = &omap3_stalker_vdac,
.vpll2 = &omap3_stalker_vpll2,
.vmmc1 = &omap3stalker_vmmc1, .vmmc1 = &omap3stalker_vmmc1,
.vsim = &omap3stalker_vsim, .vsim = &omap3stalker_vsim,
}; };
...@@ -474,6 +407,15 @@ static struct i2c_board_info __initdata omap3stalker_i2c_boardinfo3[] = { ...@@ -474,6 +407,15 @@ static struct i2c_board_info __initdata omap3stalker_i2c_boardinfo3[] = {
static int __init omap3_stalker_i2c_init(void) static int __init omap3_stalker_i2c_init(void)
{ {
omap3_pmic_get_config(&omap3stalker_twldata,
TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_MADC |
TWL_COMMON_PDATA_AUDIO,
TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2);
omap3stalker_twldata.vdac->constraints.apply_uV = true;
omap3stalker_twldata.vpll2->constraints.apply_uV = true;
omap3stalker_twldata.vpll2->constraints.name = "VDVI";
omap3_pmic_init("twl4030", &omap3stalker_twldata); omap3_pmic_init("twl4030", &omap3stalker_twldata);
omap_register_i2c_bus(2, 400, NULL, 0); omap_register_i2c_bus(2, 400, NULL, 0);
omap_register_i2c_bus(3, 400, omap3stalker_i2c_boardinfo3, omap_register_i2c_bus(3, 400, omap3stalker_i2c_boardinfo3,
...@@ -494,10 +436,7 @@ static void __init omap3_stalker_init_early(void) ...@@ -494,10 +436,7 @@ static void __init omap3_stalker_init_early(void)
static void __init omap3_stalker_init_irq(void) static void __init omap3_stalker_init_irq(void)
{ {
omap_init_irq(); omap3_init_irq();
#ifdef CONFIG_OMAP_32K_TIMER
omap2_gp_clockevent_set_gptimer(12);
#endif
} }
static struct platform_device *omap3_stalker_devices[] __initdata = { static struct platform_device *omap3_stalker_devices[] __initdata = {
...@@ -560,5 +499,5 @@ MACHINE_START(SBC3530, "OMAP3 STALKER") ...@@ -560,5 +499,5 @@ MACHINE_START(SBC3530, "OMAP3 STALKER")
.init_early = omap3_stalker_init_early, .init_early = omap3_stalker_init_early,
.init_irq = omap3_stalker_init_irq, .init_irq = omap3_stalker_init_irq,
.init_machine = omap3_stalker_init, .init_machine = omap3_stalker_init,
.timer = &omap_timer, .timer = &omap3_secure_timer,
MACHINE_END MACHINE_END
...@@ -51,7 +51,6 @@ ...@@ -51,7 +51,6 @@
#include "mux.h" #include "mux.h"
#include "hsmmc.h" #include "hsmmc.h"
#include "timer-gp.h"
#include "common-board-devices.h" #include "common-board-devices.h"
#include <asm/setup.h> #include <asm/setup.h>
...@@ -114,12 +113,12 @@ static struct omap_lcd_config omap3_touchbook_lcd_config __initdata = { ...@@ -114,12 +113,12 @@ static struct omap_lcd_config omap3_touchbook_lcd_config __initdata = {
.ctrl_name = "internal", .ctrl_name = "internal",
}; };
static struct regulator_consumer_supply touchbook_vmmc1_supply = { static struct regulator_consumer_supply touchbook_vmmc1_supply[] = {
.supply = "vmmc", REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
}; };
static struct regulator_consumer_supply touchbook_vsim_supply = { static struct regulator_consumer_supply touchbook_vsim_supply[] = {
.supply = "vmmc_aux", REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.0"),
}; };
static struct gpio_led gpio_leds[]; static struct gpio_led gpio_leds[];
...@@ -137,10 +136,6 @@ static int touchbook_twl_gpio_setup(struct device *dev, ...@@ -137,10 +136,6 @@ static int touchbook_twl_gpio_setup(struct device *dev,
mmc[0].gpio_cd = gpio + 0; mmc[0].gpio_cd = gpio + 0;
omap2_hsmmc_init(mmc); omap2_hsmmc_init(mmc);
/* link regulators to MMC adapters */
touchbook_vmmc1_supply.dev = mmc[0].dev;
touchbook_vsim_supply.dev = mmc[0].dev;
/* REVISIT: need ehci-omap hooks for external VBUS /* REVISIT: need ehci-omap hooks for external VBUS
* power switch and overcurrent detect * power switch and overcurrent detect
*/ */
...@@ -167,14 +162,18 @@ static struct twl4030_gpio_platform_data touchbook_gpio_data = { ...@@ -167,14 +162,18 @@ static struct twl4030_gpio_platform_data touchbook_gpio_data = {
.setup = touchbook_twl_gpio_setup, .setup = touchbook_twl_gpio_setup,
}; };
static struct regulator_consumer_supply touchbook_vdac_supply = { static struct regulator_consumer_supply touchbook_vdac_supply[] = {
{
.supply = "vdac", .supply = "vdac",
.dev = &omap3_touchbook_lcd_device.dev, .dev = &omap3_touchbook_lcd_device.dev,
},
}; };
static struct regulator_consumer_supply touchbook_vdvi_supply = { static struct regulator_consumer_supply touchbook_vdvi_supply[] = {
{
.supply = "vdvi", .supply = "vdvi",
.dev = &omap3_touchbook_lcd_device.dev, .dev = &omap3_touchbook_lcd_device.dev,
},
}; };
/* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */ /* 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,8 +187,8 @@ static struct regulator_init_data touchbook_vmmc1 = {
| REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_MODE
| REGULATOR_CHANGE_STATUS, | REGULATOR_CHANGE_STATUS,
}, },
.num_consumer_supplies = 1, .num_consumer_supplies = ARRAY_SIZE(touchbook_vmmc1_supply),
.consumer_supplies = &touchbook_vmmc1_supply, .consumer_supplies = touchbook_vmmc1_supply,
}; };
/* VSIM for MMC1 pins DAT4..DAT7 (2 mA, plus card == max 50 mA) */ /* 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,62 +202,15 @@ static struct regulator_init_data touchbook_vsim = {
| REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_MODE
| REGULATOR_CHANGE_STATUS, | REGULATOR_CHANGE_STATUS,
}, },
.num_consumer_supplies = 1, .num_consumer_supplies = ARRAY_SIZE(touchbook_vsim_supply),
.consumer_supplies = &touchbook_vsim_supply, .consumer_supplies = touchbook_vsim_supply,
};
/* VDAC for DSS driving S-Video (8 mA unloaded, max 65 mA) */
static struct regulator_init_data touchbook_vdac = {
.constraints = {
.min_uV = 1800000,
.max_uV = 1800000,
.valid_modes_mask = REGULATOR_MODE_NORMAL
| REGULATOR_MODE_STANDBY,
.valid_ops_mask = REGULATOR_CHANGE_MODE
| REGULATOR_CHANGE_STATUS,
},
.num_consumer_supplies = 1,
.consumer_supplies = &touchbook_vdac_supply,
};
/* VPLL2 for digital video outputs */
static struct regulator_init_data touchbook_vpll2 = {
.constraints = {
.name = "VDVI",
.min_uV = 1800000,
.max_uV = 1800000,
.valid_modes_mask = REGULATOR_MODE_NORMAL
| REGULATOR_MODE_STANDBY,
.valid_ops_mask = REGULATOR_CHANGE_MODE
| REGULATOR_CHANGE_STATUS,
},
.num_consumer_supplies = 1,
.consumer_supplies = &touchbook_vdvi_supply,
};
static struct twl4030_usb_data touchbook_usb_data = {
.usb_mode = T2_USB_MODE_ULPI,
};
static struct twl4030_codec_audio_data touchbook_audio_data;
static struct twl4030_codec_data touchbook_codec_data = {
.audio_mclk = 26000000,
.audio = &touchbook_audio_data,
}; };
static struct twl4030_platform_data touchbook_twldata = { static struct twl4030_platform_data touchbook_twldata = {
.irq_base = TWL4030_IRQ_BASE,
.irq_end = TWL4030_IRQ_END,
/* platform_data for children goes here */ /* platform_data for children goes here */
.usb = &touchbook_usb_data,
.gpio = &touchbook_gpio_data, .gpio = &touchbook_gpio_data,
.codec = &touchbook_codec_data,
.vmmc1 = &touchbook_vmmc1, .vmmc1 = &touchbook_vmmc1,
.vsim = &touchbook_vsim, .vsim = &touchbook_vsim,
.vdac = &touchbook_vdac,
.vpll2 = &touchbook_vpll2,
}; };
static struct i2c_board_info __initdata touchBook_i2c_boardinfo[] = { static struct i2c_board_info __initdata touchBook_i2c_boardinfo[] = {
...@@ -270,8 +222,20 @@ static struct i2c_board_info __initdata touchBook_i2c_boardinfo[] = { ...@@ -270,8 +222,20 @@ static struct i2c_board_info __initdata touchBook_i2c_boardinfo[] = {
static int __init omap3_touchbook_i2c_init(void) static int __init omap3_touchbook_i2c_init(void)
{ {
/* Standard TouchBook bus */ /* Standard TouchBook bus */
omap3_pmic_init("twl4030", &touchbook_twldata); omap3_pmic_get_config(&touchbook_twldata,
TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_AUDIO,
TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2);
touchbook_twldata.vdac->num_consumer_supplies =
ARRAY_SIZE(touchbook_vdac_supply);
touchbook_twldata.vdac->consumer_supplies = touchbook_vdac_supply;
touchbook_twldata.vpll2->constraints.name = "VDVI";
touchbook_twldata.vpll2->num_consumer_supplies =
ARRAY_SIZE(touchbook_vdvi_supply);
touchbook_twldata.vpll2->consumer_supplies = touchbook_vdvi_supply;
omap3_pmic_init("twl4030", &touchbook_twldata);
/* Additional TouchBook bus */ /* Additional TouchBook bus */
omap_register_i2c_bus(3, 100, touchBook_i2c_boardinfo, omap_register_i2c_bus(3, 100, touchBook_i2c_boardinfo,
ARRAY_SIZE(touchBook_i2c_boardinfo)); ARRAY_SIZE(touchBook_i2c_boardinfo));
...@@ -371,10 +335,7 @@ static void __init omap3_touchbook_init_early(void) ...@@ -371,10 +335,7 @@ static void __init omap3_touchbook_init_early(void)
static void __init omap3_touchbook_init_irq(void) static void __init omap3_touchbook_init_irq(void)
{ {
omap_init_irq(); omap3_init_irq();
#ifdef CONFIG_OMAP_32K_TIMER
omap2_gp_clockevent_set_gptimer(12);
#endif
} }
static struct platform_device *omap3_touchbook_devices[] __initdata = { static struct platform_device *omap3_touchbook_devices[] __initdata = {
...@@ -449,5 +410,5 @@ MACHINE_START(TOUCHBOOK, "OMAP3 touchbook Board") ...@@ -449,5 +410,5 @@ MACHINE_START(TOUCHBOOK, "OMAP3 touchbook Board")
.init_early = omap3_touchbook_init_early, .init_early = omap3_touchbook_init_early,
.init_irq = omap3_touchbook_init_irq, .init_irq = omap3_touchbook_init_irq,
.init_machine = omap3_touchbook_init, .init_machine = omap3_touchbook_init,
.timer = &omap_timer, .timer = &omap3_secure_timer,
MACHINE_END MACHINE_END
...@@ -41,7 +41,6 @@ ...@@ -41,7 +41,6 @@
#include <plat/usb.h> #include <plat/usb.h>
#include <plat/mmc.h> #include <plat/mmc.h>
#include <video/omap-panel-generic-dpi.h> #include <video/omap-panel-generic-dpi.h>
#include "timer-gp.h"
#include "hsmmc.h" #include "hsmmc.h"
#include "control.h" #include "control.h"
...@@ -155,14 +154,6 @@ static struct omap_musb_board_data musb_board_data = { ...@@ -155,14 +154,6 @@ static struct omap_musb_board_data musb_board_data = {
.power = 100, .power = 100,
}; };
static struct twl4030_usb_data omap4_usbphy_data = {
.phy_init = omap4430_phy_init,
.phy_exit = omap4430_phy_exit,
.phy_power = omap4430_phy_power,
.phy_set_clock = omap4430_phy_set_clk,
.phy_suspend = omap4430_phy_suspend,
};
static struct omap2_hsmmc_info mmc[] = { static struct omap2_hsmmc_info mmc[] = {
{ {
.mmc = 1, .mmc = 1,
...@@ -182,24 +173,16 @@ static struct omap2_hsmmc_info mmc[] = { ...@@ -182,24 +173,16 @@ static struct omap2_hsmmc_info mmc[] = {
{} /* Terminator */ {} /* Terminator */
}; };
static struct regulator_consumer_supply omap4_panda_vmmc_supply[] = { static struct regulator_consumer_supply omap4_panda_vmmc5_supply[] = {
{ REGULATOR_SUPPLY("vmmc", "omap_hsmmc.4"),
.supply = "vmmc",
.dev_name = "omap_hsmmc.0",
},
};
static struct regulator_consumer_supply omap4_panda_vmmc5_supply = {
.supply = "vmmc",
.dev_name = "omap_hsmmc.4",
}; };
static struct regulator_init_data panda_vmmc5 = { static struct regulator_init_data panda_vmmc5 = {
.constraints = { .constraints = {
.valid_ops_mask = REGULATOR_CHANGE_STATUS, .valid_ops_mask = REGULATOR_CHANGE_STATUS,
}, },
.num_consumer_supplies = 1, .num_consumer_supplies = ARRAY_SIZE(omap4_panda_vmmc5_supply),
.consumer_supplies = &omap4_panda_vmmc5_supply, .consumer_supplies = omap4_panda_vmmc5_supply,
}; };
static struct fixed_voltage_config panda_vwlan = { static struct fixed_voltage_config panda_vwlan = {
...@@ -274,128 +257,8 @@ static int __init omap4_twl6030_hsmmc_init(struct omap2_hsmmc_info *controllers) ...@@ -274,128 +257,8 @@ static int __init omap4_twl6030_hsmmc_init(struct omap2_hsmmc_info *controllers)
return 0; return 0;
} }
static struct regulator_init_data omap4_panda_vaux2 = { /* Panda board uses the common PMIC configuration */
.constraints = { static struct twl4030_platform_data omap4_panda_twldata;
.min_uV = 1200000,
.max_uV = 2800000,
.apply_uV = true,
.valid_modes_mask = REGULATOR_MODE_NORMAL
| REGULATOR_MODE_STANDBY,
.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
| REGULATOR_CHANGE_MODE
| REGULATOR_CHANGE_STATUS,
},
};
static struct regulator_init_data omap4_panda_vaux3 = {
.constraints = {
.min_uV = 1000000,
.max_uV = 3000000,
.apply_uV = true,
.valid_modes_mask = REGULATOR_MODE_NORMAL
| REGULATOR_MODE_STANDBY,
.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
| REGULATOR_CHANGE_MODE
| REGULATOR_CHANGE_STATUS,
},
};
/* VMMC1 for MMC1 card */
static struct regulator_init_data omap4_panda_vmmc = {
.constraints = {
.min_uV = 1200000,
.max_uV = 3000000,
.apply_uV = true,
.valid_modes_mask = REGULATOR_MODE_NORMAL
| REGULATOR_MODE_STANDBY,
.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
| REGULATOR_CHANGE_MODE
| REGULATOR_CHANGE_STATUS,
},
.num_consumer_supplies = 1,
.consumer_supplies = omap4_panda_vmmc_supply,
};
static struct regulator_init_data omap4_panda_vpp = {
.constraints = {
.min_uV = 1800000,
.max_uV = 2500000,
.apply_uV = true,
.valid_modes_mask = REGULATOR_MODE_NORMAL
| REGULATOR_MODE_STANDBY,
.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
| REGULATOR_CHANGE_MODE
| REGULATOR_CHANGE_STATUS,
},
};
static struct regulator_init_data omap4_panda_vana = {
.constraints = {
.min_uV = 2100000,
.max_uV = 2100000,
.valid_modes_mask = REGULATOR_MODE_NORMAL
| REGULATOR_MODE_STANDBY,
.valid_ops_mask = REGULATOR_CHANGE_MODE
| REGULATOR_CHANGE_STATUS,
},
};
static struct regulator_init_data omap4_panda_vcxio = {
.constraints = {
.min_uV = 1800000,
.max_uV = 1800000,
.valid_modes_mask = REGULATOR_MODE_NORMAL
| REGULATOR_MODE_STANDBY,
.valid_ops_mask = REGULATOR_CHANGE_MODE
| REGULATOR_CHANGE_STATUS,
},
};
static struct regulator_init_data omap4_panda_vdac = {
.constraints = {
.min_uV = 1800000,
.max_uV = 1800000,
.valid_modes_mask = REGULATOR_MODE_NORMAL
| REGULATOR_MODE_STANDBY,
.valid_ops_mask = REGULATOR_CHANGE_MODE
| REGULATOR_CHANGE_STATUS,
},
};
static struct regulator_init_data omap4_panda_vusb = {
.constraints = {
.min_uV = 3300000,
.max_uV = 3300000,
.apply_uV = true,
.valid_modes_mask = REGULATOR_MODE_NORMAL
| REGULATOR_MODE_STANDBY,
.valid_ops_mask = REGULATOR_CHANGE_MODE
| REGULATOR_CHANGE_STATUS,
},
};
static struct regulator_init_data omap4_panda_clk32kg = {
.constraints = {
.valid_ops_mask = REGULATOR_CHANGE_STATUS,
},
};
static struct twl4030_platform_data omap4_panda_twldata = {
.irq_base = TWL6030_IRQ_BASE,
.irq_end = TWL6030_IRQ_END,
/* Regulators */
.vmmc = &omap4_panda_vmmc,
.vpp = &omap4_panda_vpp,
.vana = &omap4_panda_vana,
.vcxio = &omap4_panda_vcxio,
.vdac = &omap4_panda_vdac,
.vusb = &omap4_panda_vusb,
.vaux2 = &omap4_panda_vaux2,
.vaux3 = &omap4_panda_vaux3,
.clk32kg = &omap4_panda_clk32kg,
.usb = &omap4_usbphy_data,
};
/* /*
* Display monitor features are burnt in their EEPROM as EDID data. The EEPROM * 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,6 +272,16 @@ static struct i2c_board_info __initdata panda_i2c_eeprom[] = {
static int __init omap4_panda_i2c_init(void) static int __init omap4_panda_i2c_init(void)
{ {
omap4_pmic_get_config(&omap4_panda_twldata, TWL_COMMON_PDATA_USB,
TWL_COMMON_REGULATOR_VDAC |
TWL_COMMON_REGULATOR_VAUX2 |
TWL_COMMON_REGULATOR_VAUX3 |
TWL_COMMON_REGULATOR_VMMC |
TWL_COMMON_REGULATOR_VPP |
TWL_COMMON_REGULATOR_VANA |
TWL_COMMON_REGULATOR_VCXIO |
TWL_COMMON_REGULATOR_VUSB |
TWL_COMMON_REGULATOR_CLK32KG);
omap4_pmic_init("twl6030", &omap4_panda_twldata); omap4_pmic_init("twl6030", &omap4_panda_twldata);
omap_register_i2c_bus(2, 400, NULL, 0); omap_register_i2c_bus(2, 400, NULL, 0);
/* /*
...@@ -716,5 +589,5 @@ MACHINE_START(OMAP4_PANDA, "OMAP4 Panda board") ...@@ -716,5 +589,5 @@ MACHINE_START(OMAP4_PANDA, "OMAP4 Panda board")
.init_early = omap4_panda_init_early, .init_early = omap4_panda_init_early,
.init_irq = gic_init_irq, .init_irq = gic_init_irq,
.init_machine = omap4_panda_init, .init_machine = omap4_panda_init,
.timer = &omap_timer, .timer = &omap4_timer,
MACHINE_END MACHINE_END
...@@ -74,15 +74,16 @@ ...@@ -74,15 +74,16 @@
defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE) defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE)
/* fixed regulator for ads7846 */ /* fixed regulator for ads7846 */
static struct regulator_consumer_supply ads7846_supply = static struct regulator_consumer_supply ads7846_supply[] = {
REGULATOR_SUPPLY("vcc", "spi1.0"); REGULATOR_SUPPLY("vcc", "spi1.0"),
};
static struct regulator_init_data vads7846_regulator = { static struct regulator_init_data vads7846_regulator = {
.constraints = { .constraints = {
.valid_ops_mask = REGULATOR_CHANGE_STATUS, .valid_ops_mask = REGULATOR_CHANGE_STATUS,
}, },
.num_consumer_supplies = 1, .num_consumer_supplies = ARRAY_SIZE(ads7846_supply),
.consumer_supplies = &ads7846_supply, .consumer_supplies = ads7846_supply,
}; };
static struct fixed_voltage_config vads7846 = { static struct fixed_voltage_config vads7846 = {
...@@ -264,14 +265,6 @@ static struct omap_dss_board_info overo_dss_data = { ...@@ -264,14 +265,6 @@ static struct omap_dss_board_info overo_dss_data = {
.default_device = &overo_dvi_device, .default_device = &overo_dvi_device,
}; };
static struct regulator_consumer_supply overo_vdda_dac_supply =
REGULATOR_SUPPLY("vdda_dac", "omapdss_venc");
static struct regulator_consumer_supply overo_vdds_dsi_supply[] = {
REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"),
};
static struct mtd_partition overo_nand_partitions[] = { static struct mtd_partition overo_nand_partitions[] = {
{ {
.name = "xloader", .name = "xloader",
...@@ -319,8 +312,8 @@ static struct omap2_hsmmc_info mmc[] = { ...@@ -319,8 +312,8 @@ static struct omap2_hsmmc_info mmc[] = {
{} /* Terminator */ {} /* Terminator */
}; };
static struct regulator_consumer_supply overo_vmmc1_supply = { static struct regulator_consumer_supply overo_vmmc1_supply[] = {
.supply = "vmmc", REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
}; };
#if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE) #if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE)
...@@ -415,8 +408,6 @@ static int overo_twl_gpio_setup(struct device *dev, ...@@ -415,8 +408,6 @@ static int overo_twl_gpio_setup(struct device *dev,
{ {
omap2_hsmmc_init(mmc); omap2_hsmmc_init(mmc);
overo_vmmc1_supply.dev = mmc[0].dev;
#if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE) #if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE)
/* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */ /* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */
gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1; gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1;
...@@ -433,10 +424,6 @@ static struct twl4030_gpio_platform_data overo_gpio_data = { ...@@ -433,10 +424,6 @@ static struct twl4030_gpio_platform_data overo_gpio_data = {
.setup = overo_twl_gpio_setup, .setup = overo_twl_gpio_setup,
}; };
static struct twl4030_usb_data overo_usb_data = {
.usb_mode = T2_USB_MODE_ULPI,
};
static struct regulator_init_data overo_vmmc1 = { static struct regulator_init_data overo_vmmc1 = {
.constraints = { .constraints = {
.min_uV = 1850000, .min_uV = 1850000,
...@@ -447,59 +434,23 @@ static struct regulator_init_data overo_vmmc1 = { ...@@ -447,59 +434,23 @@ static struct regulator_init_data overo_vmmc1 = {
| REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_MODE
| REGULATOR_CHANGE_STATUS, | REGULATOR_CHANGE_STATUS,
}, },
.num_consumer_supplies = 1, .num_consumer_supplies = ARRAY_SIZE(overo_vmmc1_supply),
.consumer_supplies = &overo_vmmc1_supply, .consumer_supplies = overo_vmmc1_supply,
};
/* VDAC for DSS driving S-Video (8 mA unloaded, max 65 mA) */
static struct regulator_init_data overo_vdac = {
.constraints = {
.min_uV = 1800000,
.max_uV = 1800000,
.valid_modes_mask = REGULATOR_MODE_NORMAL
| REGULATOR_MODE_STANDBY,
.valid_ops_mask = REGULATOR_CHANGE_MODE
| REGULATOR_CHANGE_STATUS,
},
.num_consumer_supplies = 1,
.consumer_supplies = &overo_vdda_dac_supply,
};
/* VPLL2 for digital video outputs */
static struct regulator_init_data overo_vpll2 = {
.constraints = {
.name = "VDVI",
.min_uV = 1800000,
.max_uV = 1800000,
.valid_modes_mask = REGULATOR_MODE_NORMAL
| REGULATOR_MODE_STANDBY,
.valid_ops_mask = REGULATOR_CHANGE_MODE
| REGULATOR_CHANGE_STATUS,
},
.num_consumer_supplies = ARRAY_SIZE(overo_vdds_dsi_supply),
.consumer_supplies = overo_vdds_dsi_supply,
};
static struct twl4030_codec_audio_data overo_audio_data;
static struct twl4030_codec_data overo_codec_data = {
.audio_mclk = 26000000,
.audio = &overo_audio_data,
}; };
static struct twl4030_platform_data overo_twldata = { static struct twl4030_platform_data overo_twldata = {
.irq_base = TWL4030_IRQ_BASE,
.irq_end = TWL4030_IRQ_END,
.gpio = &overo_gpio_data, .gpio = &overo_gpio_data,
.usb = &overo_usb_data,
.codec = &overo_codec_data,
.vmmc1 = &overo_vmmc1, .vmmc1 = &overo_vmmc1,
.vdac = &overo_vdac,
.vpll2 = &overo_vpll2,
}; };
static int __init overo_i2c_init(void) static int __init overo_i2c_init(void)
{ {
omap3_pmic_get_config(&overo_twldata,
TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_AUDIO,
TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2);
overo_twldata.vpll2->constraints.name = "VDVI";
omap3_pmic_init("tps65950", &overo_twldata); omap3_pmic_init("tps65950", &overo_twldata);
/* i2c2 pins are used for gpio */ /* i2c2 pins are used for gpio */
omap_register_i2c_bus(3, 400, NULL, 0); omap_register_i2c_bus(3, 400, NULL, 0);
...@@ -615,7 +566,7 @@ MACHINE_START(OVERO, "Gumstix Overo") ...@@ -615,7 +566,7 @@ MACHINE_START(OVERO, "Gumstix Overo")
.reserve = omap_reserve, .reserve = omap_reserve,
.map_io = omap3_map_io, .map_io = omap3_map_io,
.init_early = overo_init_early, .init_early = overo_init_early,
.init_irq = omap_init_irq, .init_irq = omap3_init_irq,
.init_machine = overo_init, .init_machine = overo_init,
.timer = &omap_timer, .timer = &omap3_timer,
MACHINE_END MACHINE_END
...@@ -79,20 +79,14 @@ static struct twl4030_gpio_platform_data rm680_gpio_data = { ...@@ -79,20 +79,14 @@ static struct twl4030_gpio_platform_data rm680_gpio_data = {
.pulldowns = BIT(1) | BIT(2) | BIT(8) | BIT(15), .pulldowns = BIT(1) | BIT(2) | BIT(8) | BIT(15),
}; };
static struct twl4030_usb_data rm680_usb_data = {
.usb_mode = T2_USB_MODE_ULPI,
};
static struct twl4030_platform_data rm680_twl_data = { static struct twl4030_platform_data rm680_twl_data = {
.irq_base = TWL4030_IRQ_BASE,
.irq_end = TWL4030_IRQ_END,
.gpio = &rm680_gpio_data, .gpio = &rm680_gpio_data,
.usb = &rm680_usb_data,
/* add rest of the children here */ /* add rest of the children here */
}; };
static void __init rm680_i2c_init(void) static void __init rm680_i2c_init(void)
{ {
omap3_pmic_get_config(&rm680_twl_data, TWL_COMMON_PDATA_USB, 0);
omap_pmic_init(1, 2900, "twl5031", INT_34XX_SYS_NIRQ, &rm680_twl_data); omap_pmic_init(1, 2900, "twl5031", INT_34XX_SYS_NIRQ, &rm680_twl_data);
omap_register_i2c_bus(2, 400, NULL, 0); omap_register_i2c_bus(2, 400, NULL, 0);
omap_register_i2c_bus(3, 400, NULL, 0); omap_register_i2c_bus(3, 400, NULL, 0);
...@@ -163,7 +157,7 @@ MACHINE_START(NOKIA_RM680, "Nokia RM-680 board") ...@@ -163,7 +157,7 @@ MACHINE_START(NOKIA_RM680, "Nokia RM-680 board")
.reserve = omap_reserve, .reserve = omap_reserve,
.map_io = rm680_map_io, .map_io = rm680_map_io,
.init_early = rm680_init_early, .init_early = rm680_init_early,
.init_irq = omap_init_irq, .init_irq = omap3_init_irq,
.init_machine = rm680_init, .init_machine = rm680_init,
.timer = &omap_timer, .timer = &omap3_timer,
MACHINE_END MACHINE_END
...@@ -288,10 +288,6 @@ static struct twl4030_keypad_data rx51_kp_data = { ...@@ -288,10 +288,6 @@ static struct twl4030_keypad_data rx51_kp_data = {
.rep = 1, .rep = 1,
}; };
static struct twl4030_madc_platform_data rx51_madc_data = {
.irq_line = 1,
};
/* Enable input logic and pull all lines up when eMMC is on. */ /* Enable input logic and pull all lines up when eMMC is on. */
static struct omap_board_mux rx51_mmc2_on_mux[] = { static struct omap_board_mux rx51_mmc2_on_mux[] = {
OMAP3_MUX(SDMMC2_CMD, OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0), OMAP3_MUX(SDMMC2_CMD, OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0),
...@@ -358,14 +354,17 @@ static struct omap2_hsmmc_info mmc[] __initdata = { ...@@ -358,14 +354,17 @@ static struct omap2_hsmmc_info mmc[] __initdata = {
{} /* Terminator */ {} /* Terminator */
}; };
static struct regulator_consumer_supply rx51_vmmc1_supply = static struct regulator_consumer_supply rx51_vmmc1_supply[] = {
REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"); REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
};
static struct regulator_consumer_supply rx51_vaux3_supply = static struct regulator_consumer_supply rx51_vaux3_supply[] = {
REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"); REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"),
};
static struct regulator_consumer_supply rx51_vsim_supply = static struct regulator_consumer_supply rx51_vsim_supply[] = {
REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.1"); REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.1"),
};
static struct regulator_consumer_supply rx51_vmmc2_supplies[] = { static struct regulator_consumer_supply rx51_vmmc2_supplies[] = {
/* tlv320aic3x analog supplies */ /* tlv320aic3x analog supplies */
...@@ -395,10 +394,6 @@ static struct regulator_consumer_supply rx51_vaux1_consumers[] = { ...@@ -395,10 +394,6 @@ static struct regulator_consumer_supply rx51_vaux1_consumers[] = {
REGULATOR_SUPPLY("vdd", "2-0063"), REGULATOR_SUPPLY("vdd", "2-0063"),
}; };
static struct regulator_consumer_supply rx51_vdac_supply[] = {
REGULATOR_SUPPLY("vdda_dac", "omapdss_venc"),
};
static struct regulator_init_data rx51_vaux1 = { static struct regulator_init_data rx51_vaux1 = {
.constraints = { .constraints = {
.name = "V28", .name = "V28",
...@@ -452,8 +447,8 @@ static struct regulator_init_data rx51_vaux3_mmc = { ...@@ -452,8 +447,8 @@ static struct regulator_init_data rx51_vaux3_mmc = {
| REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_MODE
| REGULATOR_CHANGE_STATUS, | REGULATOR_CHANGE_STATUS,
}, },
.num_consumer_supplies = 1, .num_consumer_supplies = ARRAY_SIZE(rx51_vaux3_supply),
.consumer_supplies = &rx51_vaux3_supply, .consumer_supplies = rx51_vaux3_supply,
}; };
static struct regulator_init_data rx51_vaux4 = { static struct regulator_init_data rx51_vaux4 = {
...@@ -479,8 +474,8 @@ static struct regulator_init_data rx51_vmmc1 = { ...@@ -479,8 +474,8 @@ static struct regulator_init_data rx51_vmmc1 = {
| REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_MODE
| REGULATOR_CHANGE_STATUS, | REGULATOR_CHANGE_STATUS,
}, },
.num_consumer_supplies = 1, .num_consumer_supplies = ARRAY_SIZE(rx51_vmmc1_supply),
.consumer_supplies = &rx51_vmmc1_supply, .consumer_supplies = rx51_vmmc1_supply,
}; };
static struct regulator_init_data rx51_vmmc2 = { static struct regulator_init_data rx51_vmmc2 = {
...@@ -511,23 +506,8 @@ static struct regulator_init_data rx51_vsim = { ...@@ -511,23 +506,8 @@ static struct regulator_init_data rx51_vsim = {
.valid_ops_mask = REGULATOR_CHANGE_MODE .valid_ops_mask = REGULATOR_CHANGE_MODE
| REGULATOR_CHANGE_STATUS, | REGULATOR_CHANGE_STATUS,
}, },
.num_consumer_supplies = 1, .num_consumer_supplies = ARRAY_SIZE(rx51_vsim_supply),
.consumer_supplies = &rx51_vsim_supply, .consumer_supplies = rx51_vsim_supply,
};
static struct regulator_init_data rx51_vdac = {
.constraints = {
.name = "VDAC",
.min_uV = 1800000,
.max_uV = 1800000,
.apply_uV = true,
.valid_modes_mask = REGULATOR_MODE_NORMAL
| REGULATOR_MODE_STANDBY,
.valid_ops_mask = REGULATOR_CHANGE_MODE
| REGULATOR_CHANGE_STATUS,
},
.num_consumer_supplies = 1,
.consumer_supplies = rx51_vdac_supply,
}; };
static struct regulator_init_data rx51_vio = { static struct regulator_init_data rx51_vio = {
...@@ -600,10 +580,6 @@ static struct twl4030_gpio_platform_data rx51_gpio_data = { ...@@ -600,10 +580,6 @@ static struct twl4030_gpio_platform_data rx51_gpio_data = {
.setup = rx51_twlgpio_setup, .setup = rx51_twlgpio_setup,
}; };
static struct twl4030_usb_data rx51_usb_data = {
.usb_mode = T2_USB_MODE_ULPI,
};
static struct twl4030_ins sleep_on_seq[] __initdata = { static struct twl4030_ins sleep_on_seq[] __initdata = {
/* /*
* Turn off everything * Turn off everything
...@@ -765,33 +741,27 @@ static struct twl4030_power_data rx51_t2scripts_data __initdata = { ...@@ -765,33 +741,27 @@ static struct twl4030_power_data rx51_t2scripts_data __initdata = {
.resource_config = twl4030_rconfig, .resource_config = twl4030_rconfig,
}; };
struct twl4030_codec_vibra_data rx51_vibra_data __initdata = { struct twl4030_vibra_data rx51_vibra_data __initdata = {
.coexist = 0, .coexist = 0,
}; };
struct twl4030_codec_data rx51_codec_data __initdata = { struct twl4030_audio_data rx51_audio_data __initdata = {
.audio_mclk = 26000000, .audio_mclk = 26000000,
.vibra = &rx51_vibra_data, .vibra = &rx51_vibra_data,
}; };
static struct twl4030_platform_data rx51_twldata __initdata = { static struct twl4030_platform_data rx51_twldata __initdata = {
.irq_base = TWL4030_IRQ_BASE,
.irq_end = TWL4030_IRQ_END,
/* platform_data for children goes here */ /* platform_data for children goes here */
.gpio = &rx51_gpio_data, .gpio = &rx51_gpio_data,
.keypad = &rx51_kp_data, .keypad = &rx51_kp_data,
.madc = &rx51_madc_data,
.usb = &rx51_usb_data,
.power = &rx51_t2scripts_data, .power = &rx51_t2scripts_data,
.codec = &rx51_codec_data, .audio = &rx51_audio_data,
.vaux1 = &rx51_vaux1, .vaux1 = &rx51_vaux1,
.vaux2 = &rx51_vaux2, .vaux2 = &rx51_vaux2,
.vaux4 = &rx51_vaux4, .vaux4 = &rx51_vaux4,
.vmmc1 = &rx51_vmmc1, .vmmc1 = &rx51_vmmc1,
.vsim = &rx51_vsim, .vsim = &rx51_vsim,
.vdac = &rx51_vdac,
.vio = &rx51_vio, .vio = &rx51_vio,
}; };
...@@ -847,6 +817,13 @@ static int __init rx51_i2c_init(void) ...@@ -847,6 +817,13 @@ static int __init rx51_i2c_init(void)
rx51_twldata.vaux3 = &rx51_vaux3_cam; rx51_twldata.vaux3 = &rx51_vaux3_cam;
} }
rx51_twldata.vmmc2 = &rx51_vmmc2; rx51_twldata.vmmc2 = &rx51_vmmc2;
omap3_pmic_get_config(&rx51_twldata,
TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_MADC,
TWL_COMMON_REGULATOR_VDAC);
rx51_twldata.vdac->constraints.apply_uV = true;
rx51_twldata.vdac->constraints.name = "VDAC";
omap_pmic_init(1, 2200, "twl5030", INT_34XX_SYS_NIRQ, &rx51_twldata); omap_pmic_init(1, 2200, "twl5030", INT_34XX_SYS_NIRQ, &rx51_twldata);
omap_register_i2c_bus(2, 100, rx51_peripherals_i2c_board_info_2, omap_register_i2c_bus(2, 100, rx51_peripherals_i2c_board_info_2,
ARRAY_SIZE(rx51_peripherals_i2c_board_info_2)); ARRAY_SIZE(rx51_peripherals_i2c_board_info_2));
......
...@@ -160,7 +160,7 @@ MACHINE_START(NOKIA_RX51, "Nokia RX-51 board") ...@@ -160,7 +160,7 @@ MACHINE_START(NOKIA_RX51, "Nokia RX-51 board")
.reserve = rx51_reserve, .reserve = rx51_reserve,
.map_io = rx51_map_io, .map_io = rx51_map_io,
.init_early = rx51_init_early, .init_early = rx51_init_early,
.init_irq = omap_init_irq, .init_irq = omap3_init_irq,
.init_machine = rx51_init, .init_machine = rx51_init,
.timer = &omap_timer, .timer = &omap3_timer,
MACHINE_END MACHINE_END
...@@ -33,11 +33,6 @@ static void __init ti8168_init_early(void) ...@@ -33,11 +33,6 @@ static void __init ti8168_init_early(void)
omap2_init_common_devices(NULL, NULL); omap2_init_common_devices(NULL, NULL);
} }
static void __init ti8168_evm_init_irq(void)
{
omap_init_irq();
}
static void __init ti8168_evm_init(void) static void __init ti8168_evm_init(void)
{ {
omap_serial_init(); omap_serial_init();
...@@ -56,7 +51,7 @@ MACHINE_START(TI8168EVM, "ti8168evm") ...@@ -56,7 +51,7 @@ MACHINE_START(TI8168EVM, "ti8168evm")
.boot_params = 0x80000100, .boot_params = 0x80000100,
.map_io = ti8168_evm_map_io, .map_io = ti8168_evm_map_io,
.init_early = ti8168_init_early, .init_early = ti8168_init_early,
.init_irq = ti8168_evm_init_irq, .init_irq = ti816x_init_irq,
.timer = &omap_timer, .timer = &omap3_timer,
.init_machine = ti8168_evm_init, .init_machine = ti8168_evm_init,
MACHINE_END MACHINE_END
...@@ -105,21 +105,20 @@ static struct twl4030_keypad_data zoom_kp_twl4030_data = { ...@@ -105,21 +105,20 @@ static struct twl4030_keypad_data zoom_kp_twl4030_data = {
.rep = 1, .rep = 1,
}; };
static struct regulator_consumer_supply zoom_vmmc1_supply = { static struct regulator_consumer_supply zoom_vmmc1_supply[] = {
.supply = "vmmc", REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
}; };
static struct regulator_consumer_supply zoom_vsim_supply = { static struct regulator_consumer_supply zoom_vsim_supply[] = {
.supply = "vmmc_aux", REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.0"),
}; };
static struct regulator_consumer_supply zoom_vmmc2_supply = { static struct regulator_consumer_supply zoom_vmmc2_supply[] = {
.supply = "vmmc", REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"),
}; };
static struct regulator_consumer_supply zoom_vmmc3_supply = { static struct regulator_consumer_supply zoom_vmmc3_supply[] = {
.supply = "vmmc", REGULATOR_SUPPLY("vmmc", "omap_hsmmc.2"),
.dev_name = "omap_hsmmc.2",
}; };
/* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */ /* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */
...@@ -133,8 +132,8 @@ static struct regulator_init_data zoom_vmmc1 = { ...@@ -133,8 +132,8 @@ static struct regulator_init_data zoom_vmmc1 = {
| REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_MODE
| REGULATOR_CHANGE_STATUS, | REGULATOR_CHANGE_STATUS,
}, },
.num_consumer_supplies = 1, .num_consumer_supplies = ARRAY_SIZE(zoom_vmmc1_supply),
.consumer_supplies = &zoom_vmmc1_supply, .consumer_supplies = zoom_vmmc1_supply,
}; };
/* VMMC2 for MMC2 card */ /* VMMC2 for MMC2 card */
...@@ -148,8 +147,8 @@ static struct regulator_init_data zoom_vmmc2 = { ...@@ -148,8 +147,8 @@ static struct regulator_init_data zoom_vmmc2 = {
.valid_ops_mask = REGULATOR_CHANGE_MODE .valid_ops_mask = REGULATOR_CHANGE_MODE
| REGULATOR_CHANGE_STATUS, | REGULATOR_CHANGE_STATUS,
}, },
.num_consumer_supplies = 1, .num_consumer_supplies = ARRAY_SIZE(zoom_vmmc2_supply),
.consumer_supplies = &zoom_vmmc2_supply, .consumer_supplies = zoom_vmmc2_supply,
}; };
/* VSIM for OMAP VDD_MMC1A (i/o for DAT4..DAT7) */ /* VSIM for OMAP VDD_MMC1A (i/o for DAT4..DAT7) */
...@@ -163,16 +162,16 @@ static struct regulator_init_data zoom_vsim = { ...@@ -163,16 +162,16 @@ static struct regulator_init_data zoom_vsim = {
| REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_MODE
| REGULATOR_CHANGE_STATUS, | REGULATOR_CHANGE_STATUS,
}, },
.num_consumer_supplies = 1, .num_consumer_supplies = ARRAY_SIZE(zoom_vsim_supply),
.consumer_supplies = &zoom_vsim_supply, .consumer_supplies = zoom_vsim_supply,
}; };
static struct regulator_init_data zoom_vmmc3 = { static struct regulator_init_data zoom_vmmc3 = {
.constraints = { .constraints = {
.valid_ops_mask = REGULATOR_CHANGE_STATUS, .valid_ops_mask = REGULATOR_CHANGE_STATUS,
}, },
.num_consumer_supplies = 1, .num_consumer_supplies = ARRAY_SIZE(zoom_vmmc3_supply),
.consumer_supplies = &zoom_vmmc3_supply, .consumer_supplies = zoom_vmmc3_supply,
}; };
static struct fixed_voltage_config zoom_vwlan = { static struct fixed_voltage_config zoom_vwlan = {
...@@ -227,40 +226,6 @@ static struct omap2_hsmmc_info mmc[] = { ...@@ -227,40 +226,6 @@ static struct omap2_hsmmc_info mmc[] = {
{} /* Terminator */ {} /* Terminator */
}; };
static struct regulator_consumer_supply zoom_vpll2_supplies[] = {
REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"),
};
static struct regulator_consumer_supply zoom_vdda_dac_supply =
REGULATOR_SUPPLY("vdda_dac", "omapdss_venc");
static struct regulator_init_data zoom_vpll2 = {
.constraints = {
.min_uV = 1800000,
.max_uV = 1800000,
.valid_modes_mask = REGULATOR_MODE_NORMAL
| REGULATOR_MODE_STANDBY,
.valid_ops_mask = REGULATOR_CHANGE_MODE
| REGULATOR_CHANGE_STATUS,
},
.num_consumer_supplies = ARRAY_SIZE(zoom_vpll2_supplies),
.consumer_supplies = zoom_vpll2_supplies,
};
static struct regulator_init_data zoom_vdac = {
.constraints = {
.min_uV = 1800000,
.max_uV = 1800000,
.valid_modes_mask = REGULATOR_MODE_NORMAL
| REGULATOR_MODE_STANDBY,
.valid_ops_mask = REGULATOR_CHANGE_MODE
| REGULATOR_CHANGE_STATUS,
},
.num_consumer_supplies = 1,
.consumer_supplies = &zoom_vdda_dac_supply,
};
static int zoom_twl_gpio_setup(struct device *dev, static int zoom_twl_gpio_setup(struct device *dev,
unsigned gpio, unsigned ngpio) unsigned gpio, unsigned ngpio)
{ {
...@@ -270,13 +235,6 @@ static int zoom_twl_gpio_setup(struct device *dev, ...@@ -270,13 +235,6 @@ static int zoom_twl_gpio_setup(struct device *dev,
mmc[0].gpio_cd = gpio + 0; mmc[0].gpio_cd = gpio + 0;
omap2_hsmmc_init(mmc); omap2_hsmmc_init(mmc);
/* link regulators to MMC adapters ... we "know" the
* regulators will be set up only *after* we return.
*/
zoom_vmmc1_supply.dev = mmc[0].dev;
zoom_vsim_supply.dev = mmc[0].dev;
zoom_vmmc2_supply.dev = mmc[1].dev;
ret = gpio_request_one(LCD_PANEL_ENABLE_GPIO, GPIOF_OUT_INIT_LOW, ret = gpio_request_one(LCD_PANEL_ENABLE_GPIO, GPIOF_OUT_INIT_LOW,
"lcd enable"); "lcd enable");
if (ret) if (ret)
...@@ -292,26 +250,6 @@ static void zoom2_set_hs_extmute(int mute) ...@@ -292,26 +250,6 @@ static void zoom2_set_hs_extmute(int mute)
gpio_set_value(ZOOM2_HEADSET_EXTMUTE_GPIO, mute); gpio_set_value(ZOOM2_HEADSET_EXTMUTE_GPIO, mute);
} }
static int zoom_batt_table[] = {
/* 0 C*/
30800, 29500, 28300, 27100,
26000, 24900, 23900, 22900, 22000, 21100, 20300, 19400, 18700, 17900,
17200, 16500, 15900, 15300, 14700, 14100, 13600, 13100, 12600, 12100,
11600, 11200, 10800, 10400, 10000, 9630, 9280, 8950, 8620, 8310,
8020, 7730, 7460, 7200, 6950, 6710, 6470, 6250, 6040, 5830,
5640, 5450, 5260, 5090, 4920, 4760, 4600, 4450, 4310, 4170,
4040, 3910, 3790, 3670, 3550
};
static struct twl4030_bci_platform_data zoom_bci_data = {
.battery_tmp_tbl = zoom_batt_table,
.tblsize = ARRAY_SIZE(zoom_batt_table),
};
static struct twl4030_usb_data zoom_usb_data = {
.usb_mode = T2_USB_MODE_ULPI,
};
static struct twl4030_gpio_platform_data zoom_gpio_data = { static struct twl4030_gpio_platform_data zoom_gpio_data = {
.gpio_base = OMAP_MAX_GPIO_LINES, .gpio_base = OMAP_MAX_GPIO_LINES,
.irq_base = TWL4030_GPIO_IRQ_BASE, .irq_base = TWL4030_GPIO_IRQ_BASE,
...@@ -319,41 +257,29 @@ static struct twl4030_gpio_platform_data zoom_gpio_data = { ...@@ -319,41 +257,29 @@ static struct twl4030_gpio_platform_data zoom_gpio_data = {
.setup = zoom_twl_gpio_setup, .setup = zoom_twl_gpio_setup,
}; };
static struct twl4030_madc_platform_data zoom_madc_data = {
.irq_line = 1,
};
static struct twl4030_codec_audio_data zoom_audio_data;
static struct twl4030_codec_data zoom_codec_data = {
.audio_mclk = 26000000,
.audio = &zoom_audio_data,
};
static struct twl4030_platform_data zoom_twldata = { static struct twl4030_platform_data zoom_twldata = {
.irq_base = TWL4030_IRQ_BASE,
.irq_end = TWL4030_IRQ_END,
/* platform_data for children goes here */ /* platform_data for children goes here */
.bci = &zoom_bci_data,
.madc = &zoom_madc_data,
.usb = &zoom_usb_data,
.gpio = &zoom_gpio_data, .gpio = &zoom_gpio_data,
.keypad = &zoom_kp_twl4030_data, .keypad = &zoom_kp_twl4030_data,
.codec = &zoom_codec_data,
.vmmc1 = &zoom_vmmc1, .vmmc1 = &zoom_vmmc1,
.vmmc2 = &zoom_vmmc2, .vmmc2 = &zoom_vmmc2,
.vsim = &zoom_vsim, .vsim = &zoom_vsim,
.vpll2 = &zoom_vpll2,
.vdac = &zoom_vdac,
}; };
static int __init omap_i2c_init(void) static int __init omap_i2c_init(void)
{ {
omap3_pmic_get_config(&zoom_twldata,
TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_BCI |
TWL_COMMON_PDATA_MADC | TWL_COMMON_PDATA_AUDIO,
TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2);
if (machine_is_omap_zoom2()) { if (machine_is_omap_zoom2()) {
zoom_audio_data.ramp_delay_value = 3; /* 161 ms */ struct twl4030_codec_data *codec_data;
zoom_audio_data.hs_extmute = 1; codec_data = zoom_twldata.audio->codec;
zoom_audio_data.set_hs_extmute = zoom2_set_hs_extmute;
codec_data->ramp_delay_value = 3; /* 161 ms */
codec_data->hs_extmute = 1;
codec_data->set_hs_extmute = zoom2_set_hs_extmute;
} }
omap_pmic_init(1, 2400, "twl5030", INT_34XX_SYS_NIRQ, &zoom_twldata); omap_pmic_init(1, 2400, "twl5030", INT_34XX_SYS_NIRQ, &zoom_twldata);
omap_register_i2c_bus(2, 400, NULL, 0); omap_register_i2c_bus(2, 400, NULL, 0);
......
...@@ -137,9 +137,9 @@ MACHINE_START(OMAP_ZOOM2, "OMAP Zoom2 board") ...@@ -137,9 +137,9 @@ MACHINE_START(OMAP_ZOOM2, "OMAP Zoom2 board")
.reserve = omap_reserve, .reserve = omap_reserve,
.map_io = omap3_map_io, .map_io = omap3_map_io,
.init_early = omap_zoom_init_early, .init_early = omap_zoom_init_early,
.init_irq = omap_init_irq, .init_irq = omap3_init_irq,
.init_machine = omap_zoom_init, .init_machine = omap_zoom_init,
.timer = &omap_timer, .timer = &omap3_timer,
MACHINE_END MACHINE_END
MACHINE_START(OMAP_ZOOM3, "OMAP Zoom3 board") MACHINE_START(OMAP_ZOOM3, "OMAP Zoom3 board")
...@@ -147,7 +147,7 @@ MACHINE_START(OMAP_ZOOM3, "OMAP Zoom3 board") ...@@ -147,7 +147,7 @@ MACHINE_START(OMAP_ZOOM3, "OMAP Zoom3 board")
.reserve = omap_reserve, .reserve = omap_reserve,
.map_io = omap3_map_io, .map_io = omap3_map_io,
.init_early = omap_zoom_init_early, .init_early = omap_zoom_init_early,
.init_irq = omap_init_irq, .init_irq = omap3_init_irq,
.init_machine = omap_zoom_init, .init_machine = omap_zoom_init,
.timer = &omap_timer, .timer = &omap3_timer,
MACHINE_END MACHINE_END
...@@ -37,6 +37,14 @@ ...@@ -37,6 +37,14 @@
u8 cpu_mask; u8 cpu_mask;
/*
* clkdm_control: if true, then when a clock is enabled in the
* hardware, its clockdomain will first be enabled; and when a clock
* is disabled in the hardware, its clockdomain will be disabled
* afterwards.
*/
static bool clkdm_control = true;
/* /*
* OMAP2+ specific clock functions * OMAP2+ specific clock functions
*/ */
...@@ -99,6 +107,19 @@ void omap2_init_clk_clkdm(struct clk *clk) ...@@ -99,6 +107,19 @@ void omap2_init_clk_clkdm(struct clk *clk)
} }
} }
/**
* omap2_clk_disable_clkdm_control - disable clkdm control on clk enable/disable
*
* Prevent the OMAP clock code from calling into the clockdomain code
* when a hardware clock in that clockdomain is enabled or disabled.
* Intended to be called at init time from omap*_clk_init(). No
* return value.
*/
void __init omap2_clk_disable_clkdm_control(void)
{
clkdm_control = false;
}
/** /**
* omap2_clk_dflt_find_companion - find companion clock to @clk * omap2_clk_dflt_find_companion - find companion clock to @clk
* @clk: struct clk * to find the companion clock of * @clk: struct clk * to find the companion clock of
...@@ -268,7 +289,7 @@ void omap2_clk_disable(struct clk *clk) ...@@ -268,7 +289,7 @@ void omap2_clk_disable(struct clk *clk)
clk->ops->disable(clk); clk->ops->disable(clk);
} }
if (clk->clkdm) if (clkdm_control && clk->clkdm)
clkdm_clk_disable(clk->clkdm, clk); clkdm_clk_disable(clk->clkdm, clk);
if (clk->parent) if (clk->parent)
...@@ -308,7 +329,7 @@ int omap2_clk_enable(struct clk *clk) ...@@ -308,7 +329,7 @@ int omap2_clk_enable(struct clk *clk)
} }
} }
if (clk->clkdm) { if (clkdm_control && clk->clkdm) {
ret = clkdm_clk_enable(clk->clkdm, clk); ret = clkdm_clk_enable(clk->clkdm, clk);
if (ret) { if (ret) {
WARN(1, "clock: %s: could not enable clockdomain %s: " WARN(1, "clock: %s: could not enable clockdomain %s: "
...@@ -330,7 +351,7 @@ int omap2_clk_enable(struct clk *clk) ...@@ -330,7 +351,7 @@ int omap2_clk_enable(struct clk *clk)
return 0; return 0;
oce_err3: oce_err3:
if (clk->clkdm) if (clkdm_control && clk->clkdm)
clkdm_clk_disable(clk->clkdm, clk); clkdm_clk_disable(clk->clkdm, clk);
oce_err2: oce_err2:
if (clk->parent) if (clk->parent)
......
...@@ -16,6 +16,8 @@ ...@@ -16,6 +16,8 @@
#ifndef __ARCH_ARM_MACH_OMAP2_CLOCK_H #ifndef __ARCH_ARM_MACH_OMAP2_CLOCK_H
#define __ARCH_ARM_MACH_OMAP2_CLOCK_H #define __ARCH_ARM_MACH_OMAP2_CLOCK_H
#include <linux/kernel.h>
#include <plat/clock.h> #include <plat/clock.h>
/* CM_CLKSEL2_PLL.CORE_CLK_SRC bits (2XXX) */ /* CM_CLKSEL2_PLL.CORE_CLK_SRC bits (2XXX) */
...@@ -72,6 +74,7 @@ void omap2_clk_disable_unused(struct clk *clk); ...@@ -72,6 +74,7 @@ void omap2_clk_disable_unused(struct clk *clk);
#endif #endif
void omap2_init_clk_clkdm(struct clk *clk); void omap2_init_clk_clkdm(struct clk *clk);
void __init omap2_clk_disable_clkdm_control(void);
/* clkt_clksel.c public functions */ /* clkt_clksel.c public functions */
u32 omap2_clksel_round_rate_div(struct clk *clk, unsigned long target_rate, u32 omap2_clksel_round_rate_div(struct clk *clk, unsigned long target_rate,
......
...@@ -1805,9 +1805,9 @@ static struct omap_clk omap2420_clks[] = { ...@@ -1805,9 +1805,9 @@ static struct omap_clk omap2420_clks[] = {
CLK(NULL, "gfx_ick", &gfx_ick, CK_242X), CLK(NULL, "gfx_ick", &gfx_ick, CK_242X),
/* DSS domain clocks */ /* DSS domain clocks */
CLK("omapdss_dss", "ick", &dss_ick, CK_242X), CLK("omapdss_dss", "ick", &dss_ick, CK_242X),
CLK("omapdss_dss", "fck", &dss1_fck, CK_242X), CLK(NULL, "dss1_fck", &dss1_fck, CK_242X),
CLK("omapdss_dss", "sys_clk", &dss2_fck, CK_242X), CLK(NULL, "dss2_fck", &dss2_fck, CK_242X),
CLK("omapdss_dss", "tv_clk", &dss_54m_fck, CK_242X), CLK(NULL, "dss_54m_fck", &dss_54m_fck, CK_242X),
/* L3 domain clocks */ /* L3 domain clocks */
CLK(NULL, "core_l3_ck", &core_l3_ck, CK_242X), CLK(NULL, "core_l3_ck", &core_l3_ck, CK_242X),
CLK(NULL, "ssi_fck", &ssi_ssr_sst_fck, CK_242X), CLK(NULL, "ssi_fck", &ssi_ssr_sst_fck, CK_242X),
...@@ -1844,13 +1844,13 @@ static struct omap_clk omap2420_clks[] = { ...@@ -1844,13 +1844,13 @@ static struct omap_clk omap2420_clks[] = {
CLK(NULL, "gpt12_ick", &gpt12_ick, CK_242X), CLK(NULL, "gpt12_ick", &gpt12_ick, CK_242X),
CLK(NULL, "gpt12_fck", &gpt12_fck, CK_242X), CLK(NULL, "gpt12_fck", &gpt12_fck, CK_242X),
CLK("omap-mcbsp.1", "ick", &mcbsp1_ick, CK_242X), CLK("omap-mcbsp.1", "ick", &mcbsp1_ick, CK_242X),
CLK("omap-mcbsp.1", "fck", &mcbsp1_fck, CK_242X), CLK(NULL, "mcbsp1_fck", &mcbsp1_fck, CK_242X),
CLK("omap-mcbsp.2", "ick", &mcbsp2_ick, CK_242X), CLK("omap-mcbsp.2", "ick", &mcbsp2_ick, CK_242X),
CLK("omap-mcbsp.2", "fck", &mcbsp2_fck, CK_242X), CLK(NULL, "mcbsp2_fck", &mcbsp2_fck, CK_242X),
CLK("omap2_mcspi.1", "ick", &mcspi1_ick, CK_242X), CLK("omap2_mcspi.1", "ick", &mcspi1_ick, CK_242X),
CLK("omap2_mcspi.1", "fck", &mcspi1_fck, CK_242X), CLK(NULL, "mcspi1_fck", &mcspi1_fck, CK_242X),
CLK("omap2_mcspi.2", "ick", &mcspi2_ick, CK_242X), CLK("omap2_mcspi.2", "ick", &mcspi2_ick, CK_242X),
CLK("omap2_mcspi.2", "fck", &mcspi2_fck, CK_242X), CLK(NULL, "mcspi2_fck", &mcspi2_fck, CK_242X),
CLK(NULL, "uart1_ick", &uart1_ick, CK_242X), CLK(NULL, "uart1_ick", &uart1_ick, CK_242X),
CLK(NULL, "uart1_fck", &uart1_fck, CK_242X), CLK(NULL, "uart1_fck", &uart1_fck, CK_242X),
CLK(NULL, "uart2_ick", &uart2_ick, CK_242X), CLK(NULL, "uart2_ick", &uart2_ick, CK_242X),
...@@ -1860,7 +1860,7 @@ static struct omap_clk omap2420_clks[] = { ...@@ -1860,7 +1860,7 @@ static struct omap_clk omap2420_clks[] = {
CLK(NULL, "gpios_ick", &gpios_ick, CK_242X), CLK(NULL, "gpios_ick", &gpios_ick, CK_242X),
CLK(NULL, "gpios_fck", &gpios_fck, CK_242X), CLK(NULL, "gpios_fck", &gpios_fck, CK_242X),
CLK("omap_wdt", "ick", &mpu_wdt_ick, CK_242X), CLK("omap_wdt", "ick", &mpu_wdt_ick, CK_242X),
CLK("omap_wdt", "fck", &mpu_wdt_fck, CK_242X), CLK(NULL, "mpu_wdt_fck", &mpu_wdt_fck, CK_242X),
CLK(NULL, "sync_32k_ick", &sync_32k_ick, CK_242X), CLK(NULL, "sync_32k_ick", &sync_32k_ick, CK_242X),
CLK(NULL, "wdt1_ick", &wdt1_ick, CK_242X), CLK(NULL, "wdt1_ick", &wdt1_ick, CK_242X),
CLK(NULL, "omapctrl_ick", &omapctrl_ick, CK_242X), CLK(NULL, "omapctrl_ick", &omapctrl_ick, CK_242X),
...@@ -1880,11 +1880,11 @@ static struct omap_clk omap2420_clks[] = { ...@@ -1880,11 +1880,11 @@ static struct omap_clk omap2420_clks[] = {
CLK(NULL, "eac_ick", &eac_ick, CK_242X), CLK(NULL, "eac_ick", &eac_ick, CK_242X),
CLK(NULL, "eac_fck", &eac_fck, CK_242X), CLK(NULL, "eac_fck", &eac_fck, CK_242X),
CLK("omap_hdq.0", "ick", &hdq_ick, CK_242X), CLK("omap_hdq.0", "ick", &hdq_ick, CK_242X),
CLK("omap_hdq.1", "fck", &hdq_fck, CK_242X), CLK("omap_hdq.0", "fck", &hdq_fck, CK_242X),
CLK("omap_i2c.1", "ick", &i2c1_ick, CK_242X), CLK("omap_i2c.1", "ick", &i2c1_ick, CK_242X),
CLK("omap_i2c.1", "fck", &i2c1_fck, CK_242X), CLK(NULL, "i2c1_fck", &i2c1_fck, CK_242X),
CLK("omap_i2c.2", "ick", &i2c2_ick, CK_242X), CLK("omap_i2c.2", "ick", &i2c2_ick, CK_242X),
CLK("omap_i2c.2", "fck", &i2c2_fck, CK_242X), CLK(NULL, "i2c2_fck", &i2c2_fck, CK_242X),
CLK(NULL, "gpmc_fck", &gpmc_fck, CK_242X), CLK(NULL, "gpmc_fck", &gpmc_fck, CK_242X),
CLK(NULL, "sdma_fck", &sdma_fck, CK_242X), CLK(NULL, "sdma_fck", &sdma_fck, CK_242X),
CLK(NULL, "sdma_ick", &sdma_ick, CK_242X), CLK(NULL, "sdma_ick", &sdma_ick, CK_242X),
......
...@@ -1895,9 +1895,9 @@ static struct omap_clk omap2430_clks[] = { ...@@ -1895,9 +1895,9 @@ static struct omap_clk omap2430_clks[] = {
CLK(NULL, "mdm_osc_ck", &mdm_osc_ck, CK_243X), CLK(NULL, "mdm_osc_ck", &mdm_osc_ck, CK_243X),
/* DSS domain clocks */ /* DSS domain clocks */
CLK("omapdss_dss", "ick", &dss_ick, CK_243X), CLK("omapdss_dss", "ick", &dss_ick, CK_243X),
CLK("omapdss_dss", "fck", &dss1_fck, CK_243X), CLK(NULL, "dss1_fck", &dss1_fck, CK_243X),
CLK("omapdss_dss", "sys_clk", &dss2_fck, CK_243X), CLK(NULL, "dss2_fck", &dss2_fck, CK_243X),
CLK("omapdss_dss", "tv_clk", &dss_54m_fck, CK_243X), CLK(NULL, "dss_54m_fck", &dss_54m_fck, CK_243X),
/* L3 domain clocks */ /* L3 domain clocks */
CLK(NULL, "core_l3_ck", &core_l3_ck, CK_243X), CLK(NULL, "core_l3_ck", &core_l3_ck, CK_243X),
CLK(NULL, "ssi_fck", &ssi_ssr_sst_fck, CK_243X), CLK(NULL, "ssi_fck", &ssi_ssr_sst_fck, CK_243X),
...@@ -1934,21 +1934,21 @@ static struct omap_clk omap2430_clks[] = { ...@@ -1934,21 +1934,21 @@ static struct omap_clk omap2430_clks[] = {
CLK(NULL, "gpt12_ick", &gpt12_ick, CK_243X), CLK(NULL, "gpt12_ick", &gpt12_ick, CK_243X),
CLK(NULL, "gpt12_fck", &gpt12_fck, CK_243X), CLK(NULL, "gpt12_fck", &gpt12_fck, CK_243X),
CLK("omap-mcbsp.1", "ick", &mcbsp1_ick, CK_243X), CLK("omap-mcbsp.1", "ick", &mcbsp1_ick, CK_243X),
CLK("omap-mcbsp.1", "fck", &mcbsp1_fck, CK_243X), CLK(NULL, "mcbsp1_fck", &mcbsp1_fck, CK_243X),
CLK("omap-mcbsp.2", "ick", &mcbsp2_ick, CK_243X), CLK("omap-mcbsp.2", "ick", &mcbsp2_ick, CK_243X),
CLK("omap-mcbsp.2", "fck", &mcbsp2_fck, CK_243X), CLK(NULL, "mcbsp2_fck", &mcbsp2_fck, CK_243X),
CLK("omap-mcbsp.3", "ick", &mcbsp3_ick, CK_243X), CLK("omap-mcbsp.3", "ick", &mcbsp3_ick, CK_243X),
CLK("omap-mcbsp.3", "fck", &mcbsp3_fck, CK_243X), CLK(NULL, "mcbsp3_fck", &mcbsp3_fck, CK_243X),
CLK("omap-mcbsp.4", "ick", &mcbsp4_ick, CK_243X), CLK("omap-mcbsp.4", "ick", &mcbsp4_ick, CK_243X),
CLK("omap-mcbsp.4", "fck", &mcbsp4_fck, CK_243X), CLK(NULL, "mcbsp4_fck", &mcbsp4_fck, CK_243X),
CLK("omap-mcbsp.5", "ick", &mcbsp5_ick, CK_243X), CLK("omap-mcbsp.5", "ick", &mcbsp5_ick, CK_243X),
CLK("omap-mcbsp.5", "fck", &mcbsp5_fck, CK_243X), CLK(NULL, "mcbsp5_fck", &mcbsp5_fck, CK_243X),
CLK("omap2_mcspi.1", "ick", &mcspi1_ick, CK_243X), CLK("omap2_mcspi.1", "ick", &mcspi1_ick, CK_243X),
CLK("omap2_mcspi.1", "fck", &mcspi1_fck, CK_243X), CLK(NULL, "mcspi1_fck", &mcspi1_fck, CK_243X),
CLK("omap2_mcspi.2", "ick", &mcspi2_ick, CK_243X), CLK("omap2_mcspi.2", "ick", &mcspi2_ick, CK_243X),
CLK("omap2_mcspi.2", "fck", &mcspi2_fck, CK_243X), CLK(NULL, "mcspi2_fck", &mcspi2_fck, CK_243X),
CLK("omap2_mcspi.3", "ick", &mcspi3_ick, CK_243X), CLK("omap2_mcspi.3", "ick", &mcspi3_ick, CK_243X),
CLK("omap2_mcspi.3", "fck", &mcspi3_fck, CK_243X), CLK(NULL, "mcspi3_fck", &mcspi3_fck, CK_243X),
CLK(NULL, "uart1_ick", &uart1_ick, CK_243X), CLK(NULL, "uart1_ick", &uart1_ick, CK_243X),
CLK(NULL, "uart1_fck", &uart1_fck, CK_243X), CLK(NULL, "uart1_fck", &uart1_fck, CK_243X),
CLK(NULL, "uart2_ick", &uart2_ick, CK_243X), CLK(NULL, "uart2_ick", &uart2_ick, CK_243X),
...@@ -1958,7 +1958,7 @@ static struct omap_clk omap2430_clks[] = { ...@@ -1958,7 +1958,7 @@ static struct omap_clk omap2430_clks[] = {
CLK(NULL, "gpios_ick", &gpios_ick, CK_243X), CLK(NULL, "gpios_ick", &gpios_ick, CK_243X),
CLK(NULL, "gpios_fck", &gpios_fck, CK_243X), CLK(NULL, "gpios_fck", &gpios_fck, CK_243X),
CLK("omap_wdt", "ick", &mpu_wdt_ick, CK_243X), CLK("omap_wdt", "ick", &mpu_wdt_ick, CK_243X),
CLK("omap_wdt", "fck", &mpu_wdt_fck, CK_243X), CLK(NULL, "mpu_wdt_fck", &mpu_wdt_fck, CK_243X),
CLK(NULL, "sync_32k_ick", &sync_32k_ick, CK_243X), CLK(NULL, "sync_32k_ick", &sync_32k_ick, CK_243X),
CLK(NULL, "wdt1_ick", &wdt1_ick, CK_243X), CLK(NULL, "wdt1_ick", &wdt1_ick, CK_243X),
CLK(NULL, "omapctrl_ick", &omapctrl_ick, CK_243X), CLK(NULL, "omapctrl_ick", &omapctrl_ick, CK_243X),
...@@ -1975,9 +1975,9 @@ static struct omap_clk omap2430_clks[] = { ...@@ -1975,9 +1975,9 @@ static struct omap_clk omap2430_clks[] = {
CLK("omap_hdq.0", "ick", &hdq_ick, CK_243X), CLK("omap_hdq.0", "ick", &hdq_ick, CK_243X),
CLK("omap_hdq.1", "fck", &hdq_fck, CK_243X), CLK("omap_hdq.1", "fck", &hdq_fck, CK_243X),
CLK("omap_i2c.1", "ick", &i2c1_ick, CK_243X), CLK("omap_i2c.1", "ick", &i2c1_ick, CK_243X),
CLK("omap_i2c.1", "fck", &i2chs1_fck, CK_243X), CLK(NULL, "i2chs1_fck", &i2chs1_fck, CK_243X),
CLK("omap_i2c.2", "ick", &i2c2_ick, CK_243X), CLK("omap_i2c.2", "ick", &i2c2_ick, CK_243X),
CLK("omap_i2c.2", "fck", &i2chs2_fck, CK_243X), CLK(NULL, "i2chs2_fck", &i2chs2_fck, CK_243X),
CLK(NULL, "gpmc_fck", &gpmc_fck, CK_243X), CLK(NULL, "gpmc_fck", &gpmc_fck, CK_243X),
CLK(NULL, "sdma_fck", &sdma_fck, CK_243X), CLK(NULL, "sdma_fck", &sdma_fck, CK_243X),
CLK(NULL, "sdma_ick", &sdma_ick, CK_243X), CLK(NULL, "sdma_ick", &sdma_ick, CK_243X),
...@@ -1990,9 +1990,9 @@ static struct omap_clk omap2430_clks[] = { ...@@ -1990,9 +1990,9 @@ static struct omap_clk omap2430_clks[] = {
CLK(NULL, "usb_fck", &usb_fck, CK_243X), CLK(NULL, "usb_fck", &usb_fck, CK_243X),
CLK("musb-omap2430", "ick", &usbhs_ick, CK_243X), CLK("musb-omap2430", "ick", &usbhs_ick, CK_243X),
CLK("omap_hsmmc.0", "ick", &mmchs1_ick, CK_243X), CLK("omap_hsmmc.0", "ick", &mmchs1_ick, CK_243X),
CLK("omap_hsmmc.0", "fck", &mmchs1_fck, CK_243X), CLK(NULL, "mmchs1_fck", &mmchs1_fck, CK_243X),
CLK("omap_hsmmc.1", "ick", &mmchs2_ick, CK_243X), CLK("omap_hsmmc.1", "ick", &mmchs2_ick, CK_243X),
CLK("omap_hsmmc.1", "fck", &mmchs2_fck, CK_243X), CLK(NULL, "mmchs2_fck", &mmchs2_fck, CK_243X),
CLK(NULL, "gpio5_ick", &gpio5_ick, CK_243X), CLK(NULL, "gpio5_ick", &gpio5_ick, CK_243X),
CLK(NULL, "gpio5_fck", &gpio5_fck, CK_243X), CLK(NULL, "gpio5_fck", &gpio5_fck, CK_243X),
CLK(NULL, "mdm_intc_ick", &mdm_intc_ick, CK_243X), CLK(NULL, "mdm_intc_ick", &mdm_intc_ick, CK_243X),
......
...@@ -3289,25 +3289,25 @@ static struct omap_clk omap3xxx_clks[] = { ...@@ -3289,25 +3289,25 @@ static struct omap_clk omap3xxx_clks[] = {
CLK("omap-mcbsp.1", "prcm_fck", &core_96m_fck, CK_3XXX), CLK("omap-mcbsp.1", "prcm_fck", &core_96m_fck, CK_3XXX),
CLK("omap-mcbsp.5", "prcm_fck", &core_96m_fck, CK_3XXX), CLK("omap-mcbsp.5", "prcm_fck", &core_96m_fck, CK_3XXX),
CLK(NULL, "core_96m_fck", &core_96m_fck, CK_3XXX), CLK(NULL, "core_96m_fck", &core_96m_fck, CK_3XXX),
CLK("omap_hsmmc.2", "fck", &mmchs3_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), CLK(NULL, "mmchs3_fck", &mmchs3_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
CLK("omap_hsmmc.1", "fck", &mmchs2_fck, CK_3XXX), CLK(NULL, "mmchs2_fck", &mmchs2_fck, CK_3XXX),
CLK(NULL, "mspro_fck", &mspro_fck, CK_34XX | CK_36XX), CLK(NULL, "mspro_fck", &mspro_fck, CK_34XX | CK_36XX),
CLK("omap_hsmmc.0", "fck", &mmchs1_fck, CK_3XXX), CLK(NULL, "mmchs1_fck", &mmchs1_fck, CK_3XXX),
CLK("omap_i2c.3", "fck", &i2c3_fck, CK_3XXX), CLK(NULL, "i2c3_fck", &i2c3_fck, CK_3XXX),
CLK("omap_i2c.2", "fck", &i2c2_fck, CK_3XXX), CLK(NULL, "i2c2_fck", &i2c2_fck, CK_3XXX),
CLK("omap_i2c.1", "fck", &i2c1_fck, CK_3XXX), CLK(NULL, "i2c1_fck", &i2c1_fck, CK_3XXX),
CLK("omap-mcbsp.5", "fck", &mcbsp5_fck, CK_3XXX), CLK(NULL, "mcbsp5_fck", &mcbsp5_fck, CK_3XXX),
CLK("omap-mcbsp.1", "fck", &mcbsp1_fck, CK_3XXX), CLK(NULL, "mcbsp1_fck", &mcbsp1_fck, CK_3XXX),
CLK(NULL, "core_48m_fck", &core_48m_fck, CK_3XXX), CLK(NULL, "core_48m_fck", &core_48m_fck, CK_3XXX),
CLK("omap2_mcspi.4", "fck", &mcspi4_fck, CK_3XXX), CLK(NULL, "mcspi4_fck", &mcspi4_fck, CK_3XXX),
CLK("omap2_mcspi.3", "fck", &mcspi3_fck, CK_3XXX), CLK(NULL, "mcspi3_fck", &mcspi3_fck, CK_3XXX),
CLK("omap2_mcspi.2", "fck", &mcspi2_fck, CK_3XXX), CLK(NULL, "mcspi2_fck", &mcspi2_fck, CK_3XXX),
CLK("omap2_mcspi.1", "fck", &mcspi1_fck, CK_3XXX), CLK(NULL, "mcspi1_fck", &mcspi1_fck, CK_3XXX),
CLK(NULL, "uart2_fck", &uart2_fck, CK_3XXX), CLK(NULL, "uart2_fck", &uart2_fck, CK_3XXX),
CLK(NULL, "uart1_fck", &uart1_fck, CK_3XXX), CLK(NULL, "uart1_fck", &uart1_fck, CK_3XXX),
CLK(NULL, "fshostusb_fck", &fshostusb_fck, CK_3430ES1), CLK(NULL, "fshostusb_fck", &fshostusb_fck, CK_3430ES1),
CLK(NULL, "core_12m_fck", &core_12m_fck, CK_3XXX), CLK(NULL, "core_12m_fck", &core_12m_fck, CK_3XXX),
CLK("omap_hdq.0", "fck", &hdq_fck, CK_3XXX), CLK("omap_hdq.0", "fck", &hdq_fck, CK_3XXX),
CLK(NULL, "ssi_ssr_fck", &ssi_ssr_fck_3430es1, CK_3430ES1), CLK(NULL, "ssi_ssr_fck", &ssi_ssr_fck_3430es1, CK_3430ES1),
CLK(NULL, "ssi_ssr_fck", &ssi_ssr_fck_3430es2, CK_3430ES2PLUS | CK_36XX), CLK(NULL, "ssi_ssr_fck", &ssi_ssr_fck_3430es2, CK_3430ES2PLUS | CK_36XX),
CLK(NULL, "ssi_sst_fck", &ssi_sst_fck_3430es1, CK_3430ES1), CLK(NULL, "ssi_sst_fck", &ssi_sst_fck_3430es1, CK_3430ES1),
...@@ -3356,11 +3356,11 @@ static struct omap_clk omap3xxx_clks[] = { ...@@ -3356,11 +3356,11 @@ static struct omap_clk omap3xxx_clks[] = {
CLK("omap_rng", "ick", &rng_ick, CK_34XX | CK_36XX), CLK("omap_rng", "ick", &rng_ick, CK_34XX | CK_36XX),
CLK(NULL, "sha11_ick", &sha11_ick, CK_34XX | CK_36XX), CLK(NULL, "sha11_ick", &sha11_ick, CK_34XX | CK_36XX),
CLK(NULL, "des1_ick", &des1_ick, CK_34XX | CK_36XX), CLK(NULL, "des1_ick", &des1_ick, CK_34XX | CK_36XX),
CLK("omapdss_dss", "fck", &dss1_alwon_fck_3430es1, CK_3430ES1), CLK(NULL, "dss1_alwon_fck", &dss1_alwon_fck_3430es1, CK_3430ES1),
CLK("omapdss_dss", "fck", &dss1_alwon_fck_3430es2, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), CLK(NULL, "dss1_alwon_fck", &dss1_alwon_fck_3430es2, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
CLK("omapdss_dss", "tv_clk", &dss_tv_fck, CK_3XXX), CLK(NULL, "dss_tv_fck", &dss_tv_fck, CK_3XXX),
CLK("omapdss_dss", "video_clk", &dss_96m_fck, CK_3XXX), CLK(NULL, "dss_96m_fck", &dss_96m_fck, CK_3XXX),
CLK("omapdss_dss", "sys_clk", &dss2_alwon_fck, CK_3XXX), CLK(NULL, "dss2_alwon_fck", &dss2_alwon_fck, CK_3XXX),
CLK("omapdss_dss", "ick", &dss_ick_3430es1, CK_3430ES1), CLK("omapdss_dss", "ick", &dss_ick_3430es1, CK_3430ES1),
CLK("omapdss_dss", "ick", &dss_ick_3430es2, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), CLK("omapdss_dss", "ick", &dss_ick_3430es2, CK_3430ES2PLUS | CK_AM35XX | CK_36XX),
CLK(NULL, "cam_mclk", &cam_mclk, CK_34XX | CK_36XX), CLK(NULL, "cam_mclk", &cam_mclk, CK_34XX | CK_36XX),
...@@ -3385,7 +3385,7 @@ static struct omap_clk omap3xxx_clks[] = { ...@@ -3385,7 +3385,7 @@ static struct omap_clk omap3xxx_clks[] = {
CLK(NULL, "gpt1_fck", &gpt1_fck, CK_3XXX), CLK(NULL, "gpt1_fck", &gpt1_fck, CK_3XXX),
CLK(NULL, "wkup_32k_fck", &wkup_32k_fck, CK_3XXX), CLK(NULL, "wkup_32k_fck", &wkup_32k_fck, CK_3XXX),
CLK(NULL, "gpio1_dbck", &gpio1_dbck, CK_3XXX), CLK(NULL, "gpio1_dbck", &gpio1_dbck, CK_3XXX),
CLK("omap_wdt", "fck", &wdt2_fck, CK_3XXX), CLK(NULL, "wdt2_fck", &wdt2_fck, CK_3XXX),
CLK(NULL, "wkup_l4_ick", &wkup_l4_ick, CK_34XX | CK_36XX), CLK(NULL, "wkup_l4_ick", &wkup_l4_ick, CK_34XX | CK_36XX),
CLK(NULL, "usim_ick", &usim_ick, CK_3430ES2PLUS | CK_36XX), CLK(NULL, "usim_ick", &usim_ick, CK_3430ES2PLUS | CK_36XX),
CLK("omap_wdt", "ick", &wdt2_ick, CK_3XXX), CLK("omap_wdt", "ick", &wdt2_ick, CK_3XXX),
...@@ -3436,9 +3436,9 @@ static struct omap_clk omap3xxx_clks[] = { ...@@ -3436,9 +3436,9 @@ static struct omap_clk omap3xxx_clks[] = {
CLK("omap-mcbsp.2", "ick", &mcbsp2_ick, CK_3XXX), CLK("omap-mcbsp.2", "ick", &mcbsp2_ick, CK_3XXX),
CLK("omap-mcbsp.3", "ick", &mcbsp3_ick, CK_3XXX), CLK("omap-mcbsp.3", "ick", &mcbsp3_ick, CK_3XXX),
CLK("omap-mcbsp.4", "ick", &mcbsp4_ick, CK_3XXX), CLK("omap-mcbsp.4", "ick", &mcbsp4_ick, CK_3XXX),
CLK("omap-mcbsp.2", "fck", &mcbsp2_fck, CK_3XXX), CLK(NULL, "mcbsp2_fck", &mcbsp2_fck, CK_3XXX),
CLK("omap-mcbsp.3", "fck", &mcbsp3_fck, CK_3XXX), CLK(NULL, "mcbsp3_fck", &mcbsp3_fck, CK_3XXX),
CLK("omap-mcbsp.4", "fck", &mcbsp4_fck, CK_3XXX), CLK(NULL, "mcbsp4_fck", &mcbsp4_fck, CK_3XXX),
CLK("etb", "emu_src_ck", &emu_src_ck, CK_3XXX), CLK("etb", "emu_src_ck", &emu_src_ck, CK_3XXX),
CLK(NULL, "pclk_fck", &pclk_fck, CK_3XXX), CLK(NULL, "pclk_fck", &pclk_fck, CK_3XXX),
CLK(NULL, "pclkx2_fck", &pclkx2_fck, CK_3XXX), CLK(NULL, "pclkx2_fck", &pclkx2_fck, CK_3XXX),
......
...@@ -8,13 +8,6 @@ ...@@ -8,13 +8,6 @@
#ifndef __ARCH_ARM_MACH_OMAP2_CLOCK44XX_H #ifndef __ARCH_ARM_MACH_OMAP2_CLOCK44XX_H
#define __ARCH_ARM_MACH_OMAP2_CLOCK44XX_H #define __ARCH_ARM_MACH_OMAP2_CLOCK44XX_H
/*
* XXX Missing values for the OMAP4 DPLL_USB
* XXX Missing min_multiplier values for all OMAP4 DPLLs
*/
#define OMAP4430_MAX_DPLL_MULT 2047
#define OMAP4430_MAX_DPLL_DIV 128
int omap4xxx_clk_init(void); int omap4xxx_clk_init(void);
#endif #endif
/* /*
* OMAP2/3/4 clockdomain framework functions * OMAP2/3/4 clockdomain framework functions
* *
* Copyright (C) 2008-2010 Texas Instruments, Inc. * Copyright (C) 2008-2011 Texas Instruments, Inc.
* Copyright (C) 2008-2010 Nokia Corporation * Copyright (C) 2008-2011 Nokia Corporation
* *
* Written by Paul Walmsley and Jouni Högander * Written by Paul Walmsley and Jouni Högander
* Added OMAP4 specific support by Abhijit Pagare <abhijitpagare@ti.com> * Added OMAP4 specific support by Abhijit Pagare <abhijitpagare@ti.com>
...@@ -92,6 +92,8 @@ static int _clkdm_register(struct clockdomain *clkdm) ...@@ -92,6 +92,8 @@ static int _clkdm_register(struct clockdomain *clkdm)
pwrdm_add_clkdm(pwrdm, clkdm); pwrdm_add_clkdm(pwrdm, clkdm);
spin_lock_init(&clkdm->lock);
pr_debug("clockdomain: registered %s\n", clkdm->name); pr_debug("clockdomain: registered %s\n", clkdm->name);
return 0; return 0;
...@@ -690,6 +692,9 @@ int clkdm_clear_all_sleepdeps(struct clockdomain *clkdm) ...@@ -690,6 +692,9 @@ int clkdm_clear_all_sleepdeps(struct clockdomain *clkdm)
*/ */
int clkdm_sleep(struct clockdomain *clkdm) int clkdm_sleep(struct clockdomain *clkdm)
{ {
int ret;
unsigned long flags;
if (!clkdm) if (!clkdm)
return -EINVAL; return -EINVAL;
...@@ -704,7 +709,11 @@ int clkdm_sleep(struct clockdomain *clkdm) ...@@ -704,7 +709,11 @@ int clkdm_sleep(struct clockdomain *clkdm)
pr_debug("clockdomain: forcing sleep on %s\n", clkdm->name); pr_debug("clockdomain: forcing sleep on %s\n", clkdm->name);
return arch_clkdm->clkdm_sleep(clkdm); spin_lock_irqsave(&clkdm->lock, flags);
clkdm->_flags &= ~_CLKDM_FLAG_HWSUP_ENABLED;
ret = arch_clkdm->clkdm_sleep(clkdm);
spin_unlock_irqrestore(&clkdm->lock, flags);
return ret;
} }
/** /**
...@@ -718,6 +727,9 @@ int clkdm_sleep(struct clockdomain *clkdm) ...@@ -718,6 +727,9 @@ int clkdm_sleep(struct clockdomain *clkdm)
*/ */
int clkdm_wakeup(struct clockdomain *clkdm) int clkdm_wakeup(struct clockdomain *clkdm)
{ {
int ret;
unsigned long flags;
if (!clkdm) if (!clkdm)
return -EINVAL; return -EINVAL;
...@@ -732,7 +744,11 @@ int clkdm_wakeup(struct clockdomain *clkdm) ...@@ -732,7 +744,11 @@ int clkdm_wakeup(struct clockdomain *clkdm)
pr_debug("clockdomain: forcing wakeup on %s\n", clkdm->name); pr_debug("clockdomain: forcing wakeup on %s\n", clkdm->name);
return arch_clkdm->clkdm_wakeup(clkdm); spin_lock_irqsave(&clkdm->lock, flags);
clkdm->_flags &= ~_CLKDM_FLAG_HWSUP_ENABLED;
ret = arch_clkdm->clkdm_wakeup(clkdm);
spin_unlock_irqrestore(&clkdm->lock, flags);
return ret;
} }
/** /**
...@@ -747,6 +763,8 @@ int clkdm_wakeup(struct clockdomain *clkdm) ...@@ -747,6 +763,8 @@ int clkdm_wakeup(struct clockdomain *clkdm)
*/ */
void clkdm_allow_idle(struct clockdomain *clkdm) void clkdm_allow_idle(struct clockdomain *clkdm)
{ {
unsigned long flags;
if (!clkdm) if (!clkdm)
return; return;
...@@ -762,8 +780,11 @@ void clkdm_allow_idle(struct clockdomain *clkdm) ...@@ -762,8 +780,11 @@ void clkdm_allow_idle(struct clockdomain *clkdm)
pr_debug("clockdomain: enabling automatic idle transitions for %s\n", pr_debug("clockdomain: enabling automatic idle transitions for %s\n",
clkdm->name); clkdm->name);
spin_lock_irqsave(&clkdm->lock, flags);
clkdm->_flags |= _CLKDM_FLAG_HWSUP_ENABLED;
arch_clkdm->clkdm_allow_idle(clkdm); arch_clkdm->clkdm_allow_idle(clkdm);
pwrdm_clkdm_state_switch(clkdm); pwrdm_clkdm_state_switch(clkdm);
spin_unlock_irqrestore(&clkdm->lock, flags);
} }
/** /**
...@@ -777,6 +798,8 @@ void clkdm_allow_idle(struct clockdomain *clkdm) ...@@ -777,6 +798,8 @@ void clkdm_allow_idle(struct clockdomain *clkdm)
*/ */
void clkdm_deny_idle(struct clockdomain *clkdm) void clkdm_deny_idle(struct clockdomain *clkdm)
{ {
unsigned long flags;
if (!clkdm) if (!clkdm)
return; return;
...@@ -792,11 +815,90 @@ void clkdm_deny_idle(struct clockdomain *clkdm) ...@@ -792,11 +815,90 @@ void clkdm_deny_idle(struct clockdomain *clkdm)
pr_debug("clockdomain: disabling automatic idle transitions for %s\n", pr_debug("clockdomain: disabling automatic idle transitions for %s\n",
clkdm->name); clkdm->name);
spin_lock_irqsave(&clkdm->lock, flags);
clkdm->_flags &= ~_CLKDM_FLAG_HWSUP_ENABLED;
arch_clkdm->clkdm_deny_idle(clkdm); arch_clkdm->clkdm_deny_idle(clkdm);
spin_unlock_irqrestore(&clkdm->lock, flags);
}
/**
* clkdm_in_hwsup - is clockdomain @clkdm have hardware-supervised idle enabled?
* @clkdm: struct clockdomain *
*
* Returns true if clockdomain @clkdm currently has
* hardware-supervised idle enabled, or false if it does not or if
* @clkdm is NULL. It is only valid to call this function after
* clkdm_init() has been called. This function does not actually read
* bits from the hardware; it instead tests an in-memory flag that is
* changed whenever the clockdomain code changes the auto-idle mode.
*/
bool clkdm_in_hwsup(struct clockdomain *clkdm)
{
bool ret;
unsigned long flags;
if (!clkdm)
return false;
spin_lock_irqsave(&clkdm->lock, flags);
ret = (clkdm->_flags & _CLKDM_FLAG_HWSUP_ENABLED) ? true : false;
spin_unlock_irqrestore(&clkdm->lock, flags);
return ret;
}
/* Clockdomain-to-clock/hwmod framework interface code */
static int _clkdm_clk_hwmod_enable(struct clockdomain *clkdm)
{
unsigned long flags;
if (!clkdm || !arch_clkdm || !arch_clkdm->clkdm_clk_enable)
return -EINVAL;
/*
* For arch's with no autodeps, clkcm_clk_enable
* should be called for every clock instance or hwmod that is
* enabled, so the clkdm can be force woken up.
*/
if ((atomic_inc_return(&clkdm->usecount) > 1) && autodeps)
return 0;
spin_lock_irqsave(&clkdm->lock, flags);
arch_clkdm->clkdm_clk_enable(clkdm);
pwrdm_wait_transition(clkdm->pwrdm.ptr);
pwrdm_clkdm_state_switch(clkdm);
spin_unlock_irqrestore(&clkdm->lock, flags);
pr_debug("clockdomain: clkdm %s: enabled\n", clkdm->name);
return 0;
} }
static int _clkdm_clk_hwmod_disable(struct clockdomain *clkdm)
{
unsigned long flags;
if (!clkdm || !arch_clkdm || !arch_clkdm->clkdm_clk_disable)
return -EINVAL;
if (atomic_read(&clkdm->usecount) == 0) {
WARN_ON(1); /* underflow */
return -ERANGE;
}
if (atomic_dec_return(&clkdm->usecount) > 0)
return 0;
spin_lock_irqsave(&clkdm->lock, flags);
arch_clkdm->clkdm_clk_disable(clkdm);
pwrdm_clkdm_state_switch(clkdm);
spin_unlock_irqrestore(&clkdm->lock, flags);
/* Clockdomain-to-clock framework interface code */ pr_debug("clockdomain: clkdm %s: disabled\n", clkdm->name);
return 0;
}
/** /**
* clkdm_clk_enable - add an enabled downstream clock to this clkdm * 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,25 +921,10 @@ int clkdm_clk_enable(struct clockdomain *clkdm, struct clk *clk)
* downstream clocks for debugging purposes? * downstream clocks for debugging purposes?
*/ */
if (!clkdm || !clk) if (!clk)
return -EINVAL; return -EINVAL;
if (!arch_clkdm || !arch_clkdm->clkdm_clk_enable) return _clkdm_clk_hwmod_enable(clkdm);
return -EINVAL;
if (atomic_inc_return(&clkdm->usecount) > 1)
return 0;
/* Clockdomain now has one enabled downstream clock */
pr_debug("clockdomain: clkdm %s: clk %s now enabled\n", clkdm->name,
clk->name);
arch_clkdm->clkdm_clk_enable(clkdm);
pwrdm_wait_transition(clkdm->pwrdm.ptr);
pwrdm_clkdm_state_switch(clkdm);
return 0;
} }
/** /**
...@@ -850,9 +937,8 @@ int clkdm_clk_enable(struct clockdomain *clkdm, struct clk *clk) ...@@ -850,9 +937,8 @@ int clkdm_clk_enable(struct clockdomain *clkdm, struct clk *clk)
* clockdomain usecount goes to 0, put the clockdomain to sleep * clockdomain usecount goes to 0, put the clockdomain to sleep
* (software-supervised mode) or remove the clkdm autodependencies * (software-supervised mode) or remove the clkdm autodependencies
* (hardware-supervised mode). Returns -EINVAL if passed null * (hardware-supervised mode). Returns -EINVAL if passed null
* pointers; -ERANGE if the @clkdm usecount underflows and debugging * pointers; -ERANGE if the @clkdm usecount underflows; or returns 0
* is enabled; or returns 0 upon success or if the clockdomain is in * upon success or if the clockdomain is in hwsup idle mode.
* hwsup idle mode.
*/ */
int clkdm_clk_disable(struct clockdomain *clkdm, struct clk *clk) int clkdm_clk_disable(struct clockdomain *clkdm, struct clk *clk)
{ {
...@@ -861,30 +947,72 @@ int clkdm_clk_disable(struct clockdomain *clkdm, struct clk *clk) ...@@ -861,30 +947,72 @@ int clkdm_clk_disable(struct clockdomain *clkdm, struct clk *clk)
* downstream clocks for debugging purposes? * downstream clocks for debugging purposes?
*/ */
if (!clkdm || !clk) if (!clk)
return -EINVAL; return -EINVAL;
if (!arch_clkdm || !arch_clkdm->clkdm_clk_disable) return _clkdm_clk_hwmod_disable(clkdm);
}
/**
* clkdm_hwmod_enable - add an enabled downstream hwmod to this clkdm
* @clkdm: struct clockdomain *
* @oh: struct omap_hwmod * of the enabled downstream hwmod
*
* Increment the usecount of the clockdomain @clkdm and ensure that it
* is awake before @oh is enabled. Intended to be called by
* module_enable() code.
* If the clockdomain is in software-supervised idle mode, force the
* clockdomain to wake. If the clockdomain is in hardware-supervised idle
* mode, add clkdm-pwrdm autodependencies, to ensure that devices in the
* clockdomain can be read from/written to by on-chip processors.
* Returns -EINVAL if passed null pointers;
* returns 0 upon success or if the clockdomain is in hwsup idle mode.
*/
int clkdm_hwmod_enable(struct clockdomain *clkdm, struct omap_hwmod *oh)
{
/* The clkdm attribute does not exist yet prior OMAP4 */
if (cpu_is_omap24xx() || cpu_is_omap34xx())
return 0;
/*
* XXX Rewrite this code to maintain a list of enabled
* downstream hwmods for debugging purposes?
*/
if (!oh)
return -EINVAL; return -EINVAL;
#ifdef DEBUG return _clkdm_clk_hwmod_enable(clkdm);
if (atomic_read(&clkdm->usecount) == 0) { }
WARN_ON(1); /* underflow */
return -ERANGE;
}
#endif
if (atomic_dec_return(&clkdm->usecount) > 0) /**
* clkdm_hwmod_disable - remove an enabled downstream hwmod from this clkdm
* @clkdm: struct clockdomain *
* @oh: struct omap_hwmod * of the disabled downstream hwmod
*
* Decrement the usecount of this clockdomain @clkdm when @oh is
* disabled. Intended to be called by module_disable() code.
* If the clockdomain usecount goes to 0, put the clockdomain to sleep
* (software-supervised mode) or remove the clkdm autodependencies
* (hardware-supervised mode).
* Returns -EINVAL if passed null pointers; -ERANGE if the @clkdm usecount
* underflows; or returns 0 upon success or if the clockdomain is in hwsup
* idle mode.
*/
int clkdm_hwmod_disable(struct clockdomain *clkdm, struct omap_hwmod *oh)
{
/* The clkdm attribute does not exist yet prior OMAP4 */
if (cpu_is_omap24xx() || cpu_is_omap34xx())
return 0; return 0;
/* All downstream clocks of this clockdomain are now disabled */ /*
* XXX Rewrite this code to maintain a list of enabled
pr_debug("clockdomain: clkdm %s: clk %s now disabled\n", clkdm->name, * downstream hwmods for debugging purposes?
clk->name); */
arch_clkdm->clkdm_clk_disable(clkdm); if (!oh)
pwrdm_clkdm_state_switch(clkdm); return -EINVAL;
return 0; return _clkdm_clk_hwmod_disable(clkdm);
} }
...@@ -17,9 +17,11 @@ ...@@ -17,9 +17,11 @@
#define __ARCH_ARM_MACH_OMAP2_CLOCKDOMAIN_H #define __ARCH_ARM_MACH_OMAP2_CLOCKDOMAIN_H
#include <linux/init.h> #include <linux/init.h>
#include <linux/spinlock.h>
#include "powerdomain.h" #include "powerdomain.h"
#include <plat/clock.h> #include <plat/clock.h>
#include <plat/omap_hwmod.h>
#include <plat/cpu.h> #include <plat/cpu.h>
/* /*
...@@ -82,6 +84,9 @@ struct clkdm_dep { ...@@ -82,6 +84,9 @@ struct clkdm_dep {
const struct omap_chip_id omap_chip; const struct omap_chip_id omap_chip;
}; };
/* Possible flags for struct clockdomain._flags */
#define _CLKDM_FLAG_HWSUP_ENABLED BIT(0)
/** /**
* struct clockdomain - OMAP clockdomain * struct clockdomain - OMAP clockdomain
* @name: clockdomain name * @name: clockdomain name
...@@ -89,6 +94,7 @@ struct clkdm_dep { ...@@ -89,6 +94,7 @@ struct clkdm_dep {
* @clktrctrl_reg: CLKSTCTRL reg for the given clock domain * @clktrctrl_reg: CLKSTCTRL reg for the given clock domain
* @clktrctrl_mask: CLKTRCTRL/AUTOSTATE field mask in CM_CLKSTCTRL reg * @clktrctrl_mask: CLKTRCTRL/AUTOSTATE field mask in CM_CLKSTCTRL reg
* @flags: Clockdomain capability flags * @flags: Clockdomain capability flags
* @_flags: Flags for use only by internal clockdomain code
* @dep_bit: Bit shift of this clockdomain's PM_WKDEP/CM_SLEEPDEP bit * @dep_bit: Bit shift of this clockdomain's PM_WKDEP/CM_SLEEPDEP bit
* @prcm_partition: (OMAP4 only) PRCM partition ID for this clkdm's registers * @prcm_partition: (OMAP4 only) PRCM partition ID for this clkdm's registers
* @cm_inst: (OMAP4 only) CM instance register offset * @cm_inst: (OMAP4 only) CM instance register offset
...@@ -113,6 +119,7 @@ struct clockdomain { ...@@ -113,6 +119,7 @@ struct clockdomain {
} pwrdm; } pwrdm;
const u16 clktrctrl_mask; const u16 clktrctrl_mask;
const u8 flags; const u8 flags;
u8 _flags;
const u8 dep_bit; const u8 dep_bit;
const u8 prcm_partition; const u8 prcm_partition;
const s16 cm_inst; const s16 cm_inst;
...@@ -122,6 +129,7 @@ struct clockdomain { ...@@ -122,6 +129,7 @@ struct clockdomain {
const struct omap_chip_id omap_chip; const struct omap_chip_id omap_chip;
atomic_t usecount; atomic_t usecount;
struct list_head node; struct list_head node;
spinlock_t lock;
}; };
/** /**
...@@ -177,12 +185,15 @@ int clkdm_clear_all_sleepdeps(struct clockdomain *clkdm); ...@@ -177,12 +185,15 @@ int clkdm_clear_all_sleepdeps(struct clockdomain *clkdm);
void clkdm_allow_idle(struct clockdomain *clkdm); void clkdm_allow_idle(struct clockdomain *clkdm);
void clkdm_deny_idle(struct clockdomain *clkdm); void clkdm_deny_idle(struct clockdomain *clkdm);
bool clkdm_in_hwsup(struct clockdomain *clkdm);
int clkdm_wakeup(struct clockdomain *clkdm); int clkdm_wakeup(struct clockdomain *clkdm);
int clkdm_sleep(struct clockdomain *clkdm); int clkdm_sleep(struct clockdomain *clkdm);
int clkdm_clk_enable(struct clockdomain *clkdm, struct clk *clk); int clkdm_clk_enable(struct clockdomain *clkdm, struct clk *clk);
int clkdm_clk_disable(struct clockdomain *clkdm, struct clk *clk); int clkdm_clk_disable(struct clockdomain *clkdm, struct clk *clk);
int clkdm_hwmod_enable(struct clockdomain *clkdm, struct omap_hwmod *oh);
int clkdm_hwmod_disable(struct clockdomain *clkdm, struct omap_hwmod *oh);
extern void __init omap2xxx_clockdomains_init(void); extern void __init omap2xxx_clockdomains_init(void);
extern void __init omap3xxx_clockdomains_init(void); extern void __init omap3xxx_clockdomains_init(void);
......
...@@ -183,7 +183,8 @@ static int omap2_clkdm_clk_enable(struct clockdomain *clkdm) ...@@ -183,7 +183,8 @@ static int omap2_clkdm_clk_enable(struct clockdomain *clkdm)
_clkdm_add_autodeps(clkdm); _clkdm_add_autodeps(clkdm);
_enable_hwsup(clkdm); _enable_hwsup(clkdm);
} else { } else {
clkdm_wakeup(clkdm); if (clkdm->flags & CLKDM_CAN_FORCE_WAKEUP)
omap2_clkdm_wakeup(clkdm);
} }
return 0; return 0;
...@@ -205,7 +206,8 @@ static int omap2_clkdm_clk_disable(struct clockdomain *clkdm) ...@@ -205,7 +206,8 @@ static int omap2_clkdm_clk_disable(struct clockdomain *clkdm)
_clkdm_del_autodeps(clkdm); _clkdm_del_autodeps(clkdm);
_enable_hwsup(clkdm); _enable_hwsup(clkdm);
} else { } else {
clkdm_sleep(clkdm); if (clkdm->flags & CLKDM_CAN_FORCE_SLEEP)
omap2_clkdm_sleep(clkdm);
} }
return 0; return 0;
......
...@@ -95,13 +95,8 @@ static void omap4_clkdm_deny_idle(struct clockdomain *clkdm) ...@@ -95,13 +95,8 @@ static void omap4_clkdm_deny_idle(struct clockdomain *clkdm)
static int omap4_clkdm_clk_enable(struct clockdomain *clkdm) static int omap4_clkdm_clk_enable(struct clockdomain *clkdm)
{ {
bool hwsup = false; if (clkdm->flags & CLKDM_CAN_FORCE_WAKEUP)
return omap4_clkdm_wakeup(clkdm);
hwsup = omap4_cminst_is_clkdm_in_hwsup(clkdm->prcm_partition,
clkdm->cm_inst, clkdm->clkdm_offs);
if (!hwsup)
clkdm_wakeup(clkdm);
return 0; return 0;
} }
...@@ -113,8 +108,8 @@ static int omap4_clkdm_clk_disable(struct clockdomain *clkdm) ...@@ -113,8 +108,8 @@ static int omap4_clkdm_clk_disable(struct clockdomain *clkdm)
hwsup = omap4_cminst_is_clkdm_in_hwsup(clkdm->prcm_partition, hwsup = omap4_cminst_is_clkdm_in_hwsup(clkdm->prcm_partition,
clkdm->cm_inst, clkdm->clkdm_offs); clkdm->cm_inst, clkdm->clkdm_offs);
if (!hwsup) if (!hwsup && (clkdm->flags & CLKDM_CAN_FORCE_SLEEP))
clkdm_sleep(clkdm); omap4_clkdm_sleep(clkdm);
return 0; return 0;
} }
......
/* /*
* OMAP4 Clock domains framework * OMAP4 Clock domains framework
* *
* Copyright (C) 2009 Texas Instruments, Inc. * Copyright (C) 2009-2011 Texas Instruments, Inc.
* Copyright (C) 2009 Nokia Corporation * Copyright (C) 2009-2011 Nokia Corporation
* *
* Abhijit Pagare (abhijitpagare@ti.com) * Abhijit Pagare (abhijitpagare@ti.com)
* Benoit Cousson (b-cousson@ti.com) * Benoit Cousson (b-cousson@ti.com)
* Paul Walmsley (paul@pwsan.com)
* *
* This file is automatically generated from the OMAP hardware databases. * This file is automatically generated from the OMAP hardware databases.
* We respectfully ask that any modifications to this file be coordinated * We respectfully ask that any modifications to this file be coordinated
...@@ -32,7 +33,7 @@ ...@@ -32,7 +33,7 @@
/* Static Dependencies for OMAP4 Clock Domains */ /* Static Dependencies for OMAP4 Clock Domains */
static struct clkdm_dep ducati_wkup_sleep_deps[] = { static struct clkdm_dep d2d_wkup_sleep_deps[] = {
{ {
.clkdm_name = "abe_clkdm", .clkdm_name = "abe_clkdm",
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
...@@ -50,103 +51,103 @@ static struct clkdm_dep ducati_wkup_sleep_deps[] = { ...@@ -50,103 +51,103 @@ static struct clkdm_dep ducati_wkup_sleep_deps[] = {
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
}, },
{ {
.clkdm_name = "l3_dss_clkdm", .clkdm_name = "l3_emif_clkdm",
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
}, },
{ {
.clkdm_name = "l3_emif_clkdm", .clkdm_name = "l3_init_clkdm",
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
}, },
{ {
.clkdm_name = "l3_gfx_clkdm", .clkdm_name = "l4_cfg_clkdm",
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
}, },
{ {
.clkdm_name = "l3_init_clkdm", .clkdm_name = "l4_per_clkdm",
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
}, },
{ NULL },
};
static struct clkdm_dep ducati_wkup_sleep_deps[] = {
{ {
.clkdm_name = "l4_cfg_clkdm", .clkdm_name = "abe_clkdm",
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
}, },
{ {
.clkdm_name = "l4_per_clkdm", .clkdm_name = "ivahd_clkdm",
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
}, },
{ {
.clkdm_name = "l4_secure_clkdm", .clkdm_name = "l3_1_clkdm",
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
}, },
{ {
.clkdm_name = "l4_wkup_clkdm", .clkdm_name = "l3_2_clkdm",
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
}, },
{ {
.clkdm_name = "tesla_clkdm", .clkdm_name = "l3_dss_clkdm",
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
}, },
{ NULL },
};
static struct clkdm_dep iss_wkup_sleep_deps[] = {
{ {
.clkdm_name = "ivahd_clkdm", .clkdm_name = "l3_emif_clkdm",
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
}, },
{ {
.clkdm_name = "l3_1_clkdm", .clkdm_name = "l3_gfx_clkdm",
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
}, },
{ {
.clkdm_name = "l3_emif_clkdm", .clkdm_name = "l3_init_clkdm",
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
}, },
{ NULL },
};
static struct clkdm_dep ivahd_wkup_sleep_deps[] = {
{ {
.clkdm_name = "l3_1_clkdm", .clkdm_name = "l4_cfg_clkdm",
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
}, },
{ {
.clkdm_name = "l3_emif_clkdm", .clkdm_name = "l4_per_clkdm",
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
}, },
{ NULL },
};
static struct clkdm_dep l3_d2d_wkup_sleep_deps[] = {
{ {
.clkdm_name = "abe_clkdm", .clkdm_name = "l4_secure_clkdm",
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
}, },
{ {
.clkdm_name = "ivahd_clkdm", .clkdm_name = "l4_wkup_clkdm",
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
}, },
{ {
.clkdm_name = "l3_1_clkdm", .clkdm_name = "tesla_clkdm",
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
}, },
{ NULL },
};
static struct clkdm_dep iss_wkup_sleep_deps[] = {
{ {
.clkdm_name = "l3_2_clkdm", .clkdm_name = "ivahd_clkdm",
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
}, },
{ {
.clkdm_name = "l3_emif_clkdm", .clkdm_name = "l3_1_clkdm",
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
}, },
{ {
.clkdm_name = "l3_init_clkdm", .clkdm_name = "l3_emif_clkdm",
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
}, },
{ NULL },
};
static struct clkdm_dep ivahd_wkup_sleep_deps[] = {
{ {
.clkdm_name = "l4_cfg_clkdm", .clkdm_name = "l3_1_clkdm",
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
}, },
{ {
.clkdm_name = "l4_per_clkdm", .clkdm_name = "l3_emif_clkdm",
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
}, },
{ NULL }, { NULL },
...@@ -280,7 +281,7 @@ static struct clkdm_dep l4_secure_wkup_sleep_deps[] = { ...@@ -280,7 +281,7 @@ static struct clkdm_dep l4_secure_wkup_sleep_deps[] = {
{ NULL }, { NULL },
}; };
static struct clkdm_dep mpuss_wkup_sleep_deps[] = { static struct clkdm_dep mpu_wkup_sleep_deps[] = {
{ {
.clkdm_name = "abe_clkdm", .clkdm_name = "abe_clkdm",
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430) .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430)
...@@ -497,14 +498,14 @@ static struct clockdomain l3_init_44xx_clkdm = { ...@@ -497,14 +498,14 @@ static struct clockdomain l3_init_44xx_clkdm = {
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
}; };
static struct clockdomain mpuss_44xx_clkdm = { static struct clockdomain d2d_44xx_clkdm = {
.name = "mpuss_clkdm", .name = "d2d_clkdm",
.pwrdm = { .name = "mpu_pwrdm" }, .pwrdm = { .name = "core_pwrdm" },
.prcm_partition = OMAP4430_CM1_PARTITION, .prcm_partition = OMAP4430_CM2_PARTITION,
.cm_inst = OMAP4430_CM1_MPU_INST, .cm_inst = OMAP4430_CM2_CORE_INST,
.clkdm_offs = OMAP4430_CM1_MPU_MPU_CDOFFS, .clkdm_offs = OMAP4430_CM2_CORE_D2D_CDOFFS,
.wkdep_srcs = mpuss_wkup_sleep_deps, .wkdep_srcs = d2d_wkup_sleep_deps,
.sleepdep_srcs = mpuss_wkup_sleep_deps, .sleepdep_srcs = d2d_wkup_sleep_deps,
.flags = CLKDM_CAN_FORCE_WAKEUP | CLKDM_CAN_HWSUP, .flags = CLKDM_CAN_FORCE_WAKEUP | CLKDM_CAN_HWSUP,
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
}; };
...@@ -563,6 +564,18 @@ static struct clockdomain ducati_44xx_clkdm = { ...@@ -563,6 +564,18 @@ static struct clockdomain ducati_44xx_clkdm = {
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
}; };
static struct clockdomain mpu_44xx_clkdm = {
.name = "mpuss_clkdm",
.pwrdm = { .name = "mpu_pwrdm" },
.prcm_partition = OMAP4430_CM1_PARTITION,
.cm_inst = OMAP4430_CM1_MPU_INST,
.clkdm_offs = OMAP4430_CM1_MPU_MPU_CDOFFS,
.wkdep_srcs = mpu_wkup_sleep_deps,
.sleepdep_srcs = mpu_wkup_sleep_deps,
.flags = CLKDM_CAN_FORCE_WAKEUP | CLKDM_CAN_HWSUP,
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
};
static struct clockdomain l3_2_44xx_clkdm = { static struct clockdomain l3_2_44xx_clkdm = {
.name = "l3_2_clkdm", .name = "l3_2_clkdm",
.pwrdm = { .name = "core_pwrdm" }, .pwrdm = { .name = "core_pwrdm" },
...@@ -585,18 +598,6 @@ static struct clockdomain l3_1_44xx_clkdm = { ...@@ -585,18 +598,6 @@ static struct clockdomain l3_1_44xx_clkdm = {
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
}; };
static struct clockdomain l3_d2d_44xx_clkdm = {
.name = "l3_d2d_clkdm",
.pwrdm = { .name = "core_pwrdm" },
.prcm_partition = OMAP4430_CM2_PARTITION,
.cm_inst = OMAP4430_CM2_CORE_INST,
.clkdm_offs = OMAP4430_CM2_CORE_D2D_CDOFFS,
.wkdep_srcs = l3_d2d_wkup_sleep_deps,
.sleepdep_srcs = l3_d2d_wkup_sleep_deps,
.flags = CLKDM_CAN_FORCE_WAKEUP | CLKDM_CAN_HWSUP,
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
};
static struct clockdomain iss_44xx_clkdm = { static struct clockdomain iss_44xx_clkdm = {
.name = "iss_clkdm", .name = "iss_clkdm",
.pwrdm = { .name = "cam_pwrdm" }, .pwrdm = { .name = "cam_pwrdm" },
...@@ -655,6 +656,7 @@ static struct clockdomain l3_dma_44xx_clkdm = { ...@@ -655,6 +656,7 @@ static struct clockdomain l3_dma_44xx_clkdm = {
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430), .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP4430),
}; };
/* As clockdomains are added or removed above, this list must also be changed */
static struct clockdomain *clockdomains_omap44xx[] __initdata = { static struct clockdomain *clockdomains_omap44xx[] __initdata = {
&l4_cefuse_44xx_clkdm, &l4_cefuse_44xx_clkdm,
&l4_cfg_44xx_clkdm, &l4_cfg_44xx_clkdm,
...@@ -666,21 +668,21 @@ static struct clockdomain *clockdomains_omap44xx[] __initdata = { ...@@ -666,21 +668,21 @@ static struct clockdomain *clockdomains_omap44xx[] __initdata = {
&abe_44xx_clkdm, &abe_44xx_clkdm,
&l3_instr_44xx_clkdm, &l3_instr_44xx_clkdm,
&l3_init_44xx_clkdm, &l3_init_44xx_clkdm,
&mpuss_44xx_clkdm, &d2d_44xx_clkdm,
&mpu0_44xx_clkdm, &mpu0_44xx_clkdm,
&mpu1_44xx_clkdm, &mpu1_44xx_clkdm,
&l3_emif_44xx_clkdm, &l3_emif_44xx_clkdm,
&l4_ao_44xx_clkdm, &l4_ao_44xx_clkdm,
&ducati_44xx_clkdm, &ducati_44xx_clkdm,
&mpu_44xx_clkdm,
&l3_2_44xx_clkdm, &l3_2_44xx_clkdm,
&l3_1_44xx_clkdm, &l3_1_44xx_clkdm,
&l3_d2d_44xx_clkdm,
&iss_44xx_clkdm, &iss_44xx_clkdm,
&l3_dss_44xx_clkdm, &l3_dss_44xx_clkdm,
&l4_wkup_44xx_clkdm, &l4_wkup_44xx_clkdm,
&emu_sys_44xx_clkdm, &emu_sys_44xx_clkdm,
&l3_dma_44xx_clkdm, &l3_dma_44xx_clkdm,
NULL, NULL
}; };
void __init omap44xx_clockdomains_init(void) void __init omap44xx_clockdomains_init(void)
......
/* /*
* OMAP44xx CM1 instance offset macros * OMAP44xx CM1 instance offset macros
* *
* Copyright (C) 2009-2010 Texas Instruments, Inc. * Copyright (C) 2009-2011 Texas Instruments, Inc.
* Copyright (C) 2009-2010 Nokia Corporation * Copyright (C) 2009-2010 Nokia Corporation
* *
* Paul Walmsley (paul@pwsan.com) * Paul Walmsley (paul@pwsan.com)
...@@ -41,9 +41,9 @@ ...@@ -41,9 +41,9 @@
#define OMAP4430_CM1_INSTR_INST 0x0f00 #define OMAP4430_CM1_INSTR_INST 0x0f00
/* CM1 clockdomain register offsets (from instance start) */ /* CM1 clockdomain register offsets (from instance start) */
#define OMAP4430_CM1_ABE_ABE_CDOFFS 0x0000 #define OMAP4430_CM1_MPU_MPU_CDOFFS 0x0000
#define OMAP4430_CM1_MPU_MPU_CDOFFS 0x0000 #define OMAP4430_CM1_TESLA_TESLA_CDOFFS 0x0000
#define OMAP4430_CM1_TESLA_TESLA_CDOFFS 0x0000 #define OMAP4430_CM1_ABE_ABE_CDOFFS 0x0000
/* CM1 */ /* CM1 */
...@@ -82,8 +82,8 @@ ...@@ -82,8 +82,8 @@
#define OMAP4430_CM_DIV_M7_DPLL_CORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x0044) #define OMAP4430_CM_DIV_M7_DPLL_CORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x0044)
#define OMAP4_CM_SSC_DELTAMSTEP_DPLL_CORE_OFFSET 0x0048 #define OMAP4_CM_SSC_DELTAMSTEP_DPLL_CORE_OFFSET 0x0048
#define OMAP4430_CM_SSC_DELTAMSTEP_DPLL_CORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x0048) #define OMAP4430_CM_SSC_DELTAMSTEP_DPLL_CORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x0048)
#define OMAP4_CM_SSC_INSTFREQDIV_DPLL_CORE_OFFSET 0x004c #define OMAP4_CM_SSC_MODFREQDIV_DPLL_CORE_OFFSET 0x004c
#define OMAP4430_CM_SSC_INSTFREQDIV_DPLL_CORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x004c) #define OMAP4430_CM_SSC_MODFREQDIV_DPLL_CORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x004c)
#define OMAP4_CM_EMU_OVERRIDE_DPLL_CORE_OFFSET 0x0050 #define OMAP4_CM_EMU_OVERRIDE_DPLL_CORE_OFFSET 0x0050
#define OMAP4430_CM_EMU_OVERRIDE_DPLL_CORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x0050) #define OMAP4430_CM_EMU_OVERRIDE_DPLL_CORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x0050)
#define OMAP4_CM_CLKMODE_DPLL_MPU_OFFSET 0x0060 #define OMAP4_CM_CLKMODE_DPLL_MPU_OFFSET 0x0060
...@@ -98,8 +98,8 @@ ...@@ -98,8 +98,8 @@
#define OMAP4430_CM_DIV_M2_DPLL_MPU OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x0070) #define OMAP4430_CM_DIV_M2_DPLL_MPU OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x0070)
#define OMAP4_CM_SSC_DELTAMSTEP_DPLL_MPU_OFFSET 0x0088 #define OMAP4_CM_SSC_DELTAMSTEP_DPLL_MPU_OFFSET 0x0088
#define OMAP4430_CM_SSC_DELTAMSTEP_DPLL_MPU OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x0088) #define OMAP4430_CM_SSC_DELTAMSTEP_DPLL_MPU OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x0088)
#define OMAP4_CM_SSC_INSTFREQDIV_DPLL_MPU_OFFSET 0x008c #define OMAP4_CM_SSC_MODFREQDIV_DPLL_MPU_OFFSET 0x008c
#define OMAP4430_CM_SSC_INSTFREQDIV_DPLL_MPU OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x008c) #define OMAP4430_CM_SSC_MODFREQDIV_DPLL_MPU OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x008c)
#define OMAP4_CM_BYPCLK_DPLL_MPU_OFFSET 0x009c #define OMAP4_CM_BYPCLK_DPLL_MPU_OFFSET 0x009c
#define OMAP4430_CM_BYPCLK_DPLL_MPU OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x009c) #define OMAP4430_CM_BYPCLK_DPLL_MPU OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x009c)
#define OMAP4_CM_CLKMODE_DPLL_IVA_OFFSET 0x00a0 #define OMAP4_CM_CLKMODE_DPLL_IVA_OFFSET 0x00a0
...@@ -116,8 +116,8 @@ ...@@ -116,8 +116,8 @@
#define OMAP4430_CM_DIV_M5_DPLL_IVA OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x00bc) #define OMAP4430_CM_DIV_M5_DPLL_IVA OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x00bc)
#define OMAP4_CM_SSC_DELTAMSTEP_DPLL_IVA_OFFSET 0x00c8 #define OMAP4_CM_SSC_DELTAMSTEP_DPLL_IVA_OFFSET 0x00c8
#define OMAP4430_CM_SSC_DELTAMSTEP_DPLL_IVA OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x00c8) #define OMAP4430_CM_SSC_DELTAMSTEP_DPLL_IVA OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x00c8)
#define OMAP4_CM_SSC_INSTFREQDIV_DPLL_IVA_OFFSET 0x00cc #define OMAP4_CM_SSC_MODFREQDIV_DPLL_IVA_OFFSET 0x00cc
#define OMAP4430_CM_SSC_INSTFREQDIV_DPLL_IVA OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x00cc) #define OMAP4430_CM_SSC_MODFREQDIV_DPLL_IVA OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x00cc)
#define OMAP4_CM_BYPCLK_DPLL_IVA_OFFSET 0x00dc #define OMAP4_CM_BYPCLK_DPLL_IVA_OFFSET 0x00dc
#define OMAP4430_CM_BYPCLK_DPLL_IVA OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x00dc) #define OMAP4430_CM_BYPCLK_DPLL_IVA OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x00dc)
#define OMAP4_CM_CLKMODE_DPLL_ABE_OFFSET 0x00e0 #define OMAP4_CM_CLKMODE_DPLL_ABE_OFFSET 0x00e0
...@@ -134,8 +134,8 @@ ...@@ -134,8 +134,8 @@
#define OMAP4430_CM_DIV_M3_DPLL_ABE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x00f4) #define OMAP4430_CM_DIV_M3_DPLL_ABE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x00f4)
#define OMAP4_CM_SSC_DELTAMSTEP_DPLL_ABE_OFFSET 0x0108 #define OMAP4_CM_SSC_DELTAMSTEP_DPLL_ABE_OFFSET 0x0108
#define OMAP4430_CM_SSC_DELTAMSTEP_DPLL_ABE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x0108) #define OMAP4430_CM_SSC_DELTAMSTEP_DPLL_ABE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x0108)
#define OMAP4_CM_SSC_INSTFREQDIV_DPLL_ABE_OFFSET 0x010c #define OMAP4_CM_SSC_MODFREQDIV_DPLL_ABE_OFFSET 0x010c
#define OMAP4430_CM_SSC_INSTFREQDIV_DPLL_ABE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x010c) #define OMAP4430_CM_SSC_MODFREQDIV_DPLL_ABE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x010c)
#define OMAP4_CM_CLKMODE_DPLL_DDRPHY_OFFSET 0x0120 #define OMAP4_CM_CLKMODE_DPLL_DDRPHY_OFFSET 0x0120
#define OMAP4430_CM_CLKMODE_DPLL_DDRPHY OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x0120) #define OMAP4430_CM_CLKMODE_DPLL_DDRPHY OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x0120)
#define OMAP4_CM_IDLEST_DPLL_DDRPHY_OFFSET 0x0124 #define OMAP4_CM_IDLEST_DPLL_DDRPHY_OFFSET 0x0124
...@@ -154,8 +154,8 @@ ...@@ -154,8 +154,8 @@
#define OMAP4430_CM_DIV_M6_DPLL_DDRPHY OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x0140) #define OMAP4430_CM_DIV_M6_DPLL_DDRPHY OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x0140)
#define OMAP4_CM_SSC_DELTAMSTEP_DPLL_DDRPHY_OFFSET 0x0148 #define OMAP4_CM_SSC_DELTAMSTEP_DPLL_DDRPHY_OFFSET 0x0148
#define OMAP4430_CM_SSC_DELTAMSTEP_DPLL_DDRPHY OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x0148) #define OMAP4430_CM_SSC_DELTAMSTEP_DPLL_DDRPHY OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x0148)
#define OMAP4_CM_SSC_INSTFREQDIV_DPLL_DDRPHY_OFFSET 0x014c #define OMAP4_CM_SSC_MODFREQDIV_DPLL_DDRPHY_OFFSET 0x014c
#define OMAP4430_CM_SSC_INSTFREQDIV_DPLL_DDRPHY OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x014c) #define OMAP4430_CM_SSC_MODFREQDIV_DPLL_DDRPHY OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x014c)
#define OMAP4_CM_SHADOW_FREQ_CONFIG1_OFFSET 0x0160 #define OMAP4_CM_SHADOW_FREQ_CONFIG1_OFFSET 0x0160
#define OMAP4430_CM_SHADOW_FREQ_CONFIG1 OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x0160) #define OMAP4430_CM_SHADOW_FREQ_CONFIG1 OMAP44XX_CM1_REGADDR(OMAP4430_CM1_CKGEN_INST, 0x0160)
#define OMAP4_CM_SHADOW_FREQ_CONFIG2_OFFSET 0x0164 #define OMAP4_CM_SHADOW_FREQ_CONFIG2_OFFSET 0x0164
...@@ -217,42 +217,6 @@ ...@@ -217,42 +217,6 @@
#define OMAP4_CM1_ABE_WDT3_CLKCTRL_OFFSET 0x0088 #define OMAP4_CM1_ABE_WDT3_CLKCTRL_OFFSET 0x0088
#define OMAP4430_CM1_ABE_WDT3_CLKCTRL OMAP44XX_CM1_REGADDR(OMAP4430_CM1_ABE_INST, 0x0088) #define OMAP4430_CM1_ABE_WDT3_CLKCTRL OMAP44XX_CM1_REGADDR(OMAP4430_CM1_ABE_INST, 0x0088)
/* CM1.RESTORE_CM1 register offsets */
#define OMAP4_CM_CLKSEL_CORE_RESTORE_OFFSET 0x0000
#define OMAP4430_CM_CLKSEL_CORE_RESTORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_INST, 0x0000)
#define OMAP4_CM_DIV_M2_DPLL_CORE_RESTORE_OFFSET 0x0004
#define OMAP4430_CM_DIV_M2_DPLL_CORE_RESTORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_INST, 0x0004)
#define OMAP4_CM_DIV_M3_DPLL_CORE_RESTORE_OFFSET 0x0008
#define OMAP4430_CM_DIV_M3_DPLL_CORE_RESTORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_INST, 0x0008)
#define OMAP4_CM_DIV_M4_DPLL_CORE_RESTORE_OFFSET 0x000c
#define OMAP4430_CM_DIV_M4_DPLL_CORE_RESTORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_INST, 0x000c)
#define OMAP4_CM_DIV_M5_DPLL_CORE_RESTORE_OFFSET 0x0010
#define OMAP4430_CM_DIV_M5_DPLL_CORE_RESTORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_INST, 0x0010)
#define OMAP4_CM_DIV_M6_DPLL_CORE_RESTORE_OFFSET 0x0014
#define OMAP4430_CM_DIV_M6_DPLL_CORE_RESTORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_INST, 0x0014)
#define OMAP4_CM_DIV_M7_DPLL_CORE_RESTORE_OFFSET 0x0018
#define OMAP4430_CM_DIV_M7_DPLL_CORE_RESTORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_INST, 0x0018)
#define OMAP4_CM_CLKSEL_DPLL_CORE_RESTORE_OFFSET 0x001c
#define OMAP4430_CM_CLKSEL_DPLL_CORE_RESTORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_INST, 0x001c)
#define OMAP4_CM_SSC_DELTAMSTEP_DPLL_CORE_RESTORE_OFFSET 0x0020
#define OMAP4430_CM_SSC_DELTAMSTEP_DPLL_CORE_RESTORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_INST, 0x0020)
#define OMAP4_CM_SSC_INSTFREQDIV_DPLL_CORE_RESTORE_OFFSET 0x0024
#define OMAP4430_CM_SSC_INSTFREQDIV_DPLL_CORE_RESTORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_INST, 0x0024)
#define OMAP4_CM_CLKMODE_DPLL_CORE_RESTORE_OFFSET 0x0028
#define OMAP4430_CM_CLKMODE_DPLL_CORE_RESTORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_INST, 0x0028)
#define OMAP4_CM_SHADOW_FREQ_CONFIG2_RESTORE_OFFSET 0x002c
#define OMAP4430_CM_SHADOW_FREQ_CONFIG2_RESTORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_INST, 0x002c)
#define OMAP4_CM_SHADOW_FREQ_CONFIG1_RESTORE_OFFSET 0x0030
#define OMAP4430_CM_SHADOW_FREQ_CONFIG1_RESTORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_INST, 0x0030)
#define OMAP4_CM_AUTOIDLE_DPLL_CORE_RESTORE_OFFSET 0x0034
#define OMAP4430_CM_AUTOIDLE_DPLL_CORE_RESTORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_INST, 0x0034)
#define OMAP4_CM_MPU_CLKSTCTRL_RESTORE_OFFSET 0x0038
#define OMAP4430_CM_MPU_CLKSTCTRL_RESTORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_INST, 0x0038)
#define OMAP4_CM_CM1_PROFILING_CLKCTRL_RESTORE_OFFSET 0x003c
#define OMAP4430_CM_CM1_PROFILING_CLKCTRL_RESTORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_INST, 0x003c)
#define OMAP4_CM_DYN_DEP_PRESCAL_RESTORE_OFFSET 0x0040
#define OMAP4430_CM_DYN_DEP_PRESCAL_RESTORE OMAP44XX_CM1_REGADDR(OMAP4430_CM1_RESTORE_INST, 0x0040)
/* Function prototypes */ /* Function prototypes */
extern u32 omap4_cm1_read_inst_reg(s16 inst, u16 idx); extern u32 omap4_cm1_read_inst_reg(s16 inst, u16 idx);
extern void omap4_cm1_write_inst_reg(u32 val, s16 inst, u16 idx); extern void omap4_cm1_write_inst_reg(u32 val, s16 inst, u16 idx);
......
/* /*
* OMAP44xx CM2 instance offset macros * OMAP44xx CM2 instance offset macros
* *
* Copyright (C) 2009-2010 Texas Instruments, Inc. * Copyright (C) 2009-2011 Texas Instruments, Inc.
* Copyright (C) 2009-2010 Nokia Corporation * Copyright (C) 2009-2010 Nokia Corporation
* *
* Paul Walmsley (paul@pwsan.com) * Paul Walmsley (paul@pwsan.com)
...@@ -40,9 +40,9 @@ ...@@ -40,9 +40,9 @@
#define OMAP4430_CM2_CAM_INST 0x1000 #define OMAP4430_CM2_CAM_INST 0x1000
#define OMAP4430_CM2_DSS_INST 0x1100 #define OMAP4430_CM2_DSS_INST 0x1100
#define OMAP4430_CM2_GFX_INST 0x1200 #define OMAP4430_CM2_GFX_INST 0x1200
#define OMAP4430_CM2_L3INIT_INST 0x1300 #define OMAP4430_CM2_L3INIT_INST 0x1300
#define OMAP4430_CM2_L4PER_INST 0x1400 #define OMAP4430_CM2_L4PER_INST 0x1400
#define OMAP4430_CM2_CEFUSE_INST 0x1600 #define OMAP4430_CM2_CEFUSE_INST 0x1600
#define OMAP4430_CM2_RESTORE_INST 0x1e00 #define OMAP4430_CM2_RESTORE_INST 0x1e00
#define OMAP4430_CM2_INSTR_INST 0x1f00 #define OMAP4430_CM2_INSTR_INST 0x1f00
...@@ -65,7 +65,6 @@ ...@@ -65,7 +65,6 @@
#define OMAP4430_CM2_L4PER_L4SEC_CDOFFS 0x0180 #define OMAP4430_CM2_L4PER_L4SEC_CDOFFS 0x0180
#define OMAP4430_CM2_CEFUSE_CEFUSE_CDOFFS 0x0000 #define OMAP4430_CM2_CEFUSE_CEFUSE_CDOFFS 0x0000
/* CM2 */ /* CM2 */
/* CM2.OCP_SOCKET_CM2 register offsets */ /* CM2.OCP_SOCKET_CM2 register offsets */
...@@ -121,8 +120,8 @@ ...@@ -121,8 +120,8 @@
#define OMAP4430_CM_DIV_M7_DPLL_PER OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_INST, 0x0064) #define OMAP4430_CM_DIV_M7_DPLL_PER OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_INST, 0x0064)
#define OMAP4_CM_SSC_DELTAMSTEP_DPLL_PER_OFFSET 0x0068 #define OMAP4_CM_SSC_DELTAMSTEP_DPLL_PER_OFFSET 0x0068
#define OMAP4430_CM_SSC_DELTAMSTEP_DPLL_PER OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_INST, 0x0068) #define OMAP4430_CM_SSC_DELTAMSTEP_DPLL_PER OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_INST, 0x0068)
#define OMAP4_CM_SSC_INSTFREQDIV_DPLL_PER_OFFSET 0x006c #define OMAP4_CM_SSC_MODFREQDIV_DPLL_PER_OFFSET 0x006c
#define OMAP4430_CM_SSC_INSTFREQDIV_DPLL_PER OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_INST, 0x006c) #define OMAP4430_CM_SSC_MODFREQDIV_DPLL_PER OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_INST, 0x006c)
#define OMAP4_CM_CLKMODE_DPLL_USB_OFFSET 0x0080 #define OMAP4_CM_CLKMODE_DPLL_USB_OFFSET 0x0080
#define OMAP4430_CM_CLKMODE_DPLL_USB OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_INST, 0x0080) #define OMAP4430_CM_CLKMODE_DPLL_USB OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_INST, 0x0080)
#define OMAP4_CM_IDLEST_DPLL_USB_OFFSET 0x0084 #define OMAP4_CM_IDLEST_DPLL_USB_OFFSET 0x0084
...@@ -135,8 +134,8 @@ ...@@ -135,8 +134,8 @@
#define OMAP4430_CM_DIV_M2_DPLL_USB OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_INST, 0x0090) #define OMAP4430_CM_DIV_M2_DPLL_USB OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_INST, 0x0090)
#define OMAP4_CM_SSC_DELTAMSTEP_DPLL_USB_OFFSET 0x00a8 #define OMAP4_CM_SSC_DELTAMSTEP_DPLL_USB_OFFSET 0x00a8
#define OMAP4430_CM_SSC_DELTAMSTEP_DPLL_USB OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_INST, 0x00a8) #define OMAP4430_CM_SSC_DELTAMSTEP_DPLL_USB OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_INST, 0x00a8)
#define OMAP4_CM_SSC_INSTFREQDIV_DPLL_USB_OFFSET 0x00ac #define OMAP4_CM_SSC_MODFREQDIV_DPLL_USB_OFFSET 0x00ac
#define OMAP4430_CM_SSC_INSTFREQDIV_DPLL_USB OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_INST, 0x00ac) #define OMAP4430_CM_SSC_MODFREQDIV_DPLL_USB OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_INST, 0x00ac)
#define OMAP4_CM_CLKDCOLDO_DPLL_USB_OFFSET 0x00b4 #define OMAP4_CM_CLKDCOLDO_DPLL_USB_OFFSET 0x00b4
#define OMAP4430_CM_CLKDCOLDO_DPLL_USB OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_INST, 0x00b4) #define OMAP4430_CM_CLKDCOLDO_DPLL_USB OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_INST, 0x00b4)
#define OMAP4_CM_CLKMODE_DPLL_UNIPRO_OFFSET 0x00c0 #define OMAP4_CM_CLKMODE_DPLL_UNIPRO_OFFSET 0x00c0
...@@ -151,8 +150,8 @@ ...@@ -151,8 +150,8 @@
#define OMAP4430_CM_DIV_M2_DPLL_UNIPRO OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_INST, 0x00d0) #define OMAP4430_CM_DIV_M2_DPLL_UNIPRO OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_INST, 0x00d0)
#define OMAP4_CM_SSC_DELTAMSTEP_DPLL_UNIPRO_OFFSET 0x00e8 #define OMAP4_CM_SSC_DELTAMSTEP_DPLL_UNIPRO_OFFSET 0x00e8
#define OMAP4430_CM_SSC_DELTAMSTEP_DPLL_UNIPRO OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_INST, 0x00e8) #define OMAP4430_CM_SSC_DELTAMSTEP_DPLL_UNIPRO OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_INST, 0x00e8)
#define OMAP4_CM_SSC_INSTFREQDIV_DPLL_UNIPRO_OFFSET 0x00ec #define OMAP4_CM_SSC_MODFREQDIV_DPLL_UNIPRO_OFFSET 0x00ec
#define OMAP4430_CM_SSC_INSTFREQDIV_DPLL_UNIPRO OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_INST, 0x00ec) #define OMAP4430_CM_SSC_MODFREQDIV_DPLL_UNIPRO OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CKGEN_INST, 0x00ec)
/* CM2.ALWAYS_ON_CM2 register offsets */ /* CM2.ALWAYS_ON_CM2 register offsets */
#define OMAP4_CM_ALWON_CLKSTCTRL_OFFSET 0x0000 #define OMAP4_CM_ALWON_CLKSTCTRL_OFFSET 0x0000
...@@ -227,8 +226,8 @@ ...@@ -227,8 +226,8 @@
#define OMAP4430_CM_D2D_DYNAMICDEP OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CORE_INST, 0x0508) #define OMAP4430_CM_D2D_DYNAMICDEP OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CORE_INST, 0x0508)
#define OMAP4_CM_D2D_SAD2D_CLKCTRL_OFFSET 0x0520 #define OMAP4_CM_D2D_SAD2D_CLKCTRL_OFFSET 0x0520
#define OMAP4430_CM_D2D_SAD2D_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CORE_INST, 0x0520) #define OMAP4430_CM_D2D_SAD2D_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CORE_INST, 0x0520)
#define OMAP4_CM_D2D_INSTEM_ICR_CLKCTRL_OFFSET 0x0528 #define OMAP4_CM_D2D_MODEM_ICR_CLKCTRL_OFFSET 0x0528
#define OMAP4430_CM_D2D_INSTEM_ICR_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CORE_INST, 0x0528) #define OMAP4430_CM_D2D_MODEM_ICR_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CORE_INST, 0x0528)
#define OMAP4_CM_D2D_SAD2D_FW_CLKCTRL_OFFSET 0x0530 #define OMAP4_CM_D2D_SAD2D_FW_CLKCTRL_OFFSET 0x0530
#define OMAP4430_CM_D2D_SAD2D_FW_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CORE_INST, 0x0530) #define OMAP4430_CM_D2D_SAD2D_FW_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CORE_INST, 0x0530)
#define OMAP4_CM_L4CFG_CLKSTCTRL_OFFSET 0x0600 #define OMAP4_CM_L4CFG_CLKSTCTRL_OFFSET 0x0600
...@@ -450,56 +449,6 @@ ...@@ -450,56 +449,6 @@
#define OMAP4_CM_CEFUSE_CEFUSE_CLKCTRL_OFFSET 0x0020 #define OMAP4_CM_CEFUSE_CEFUSE_CLKCTRL_OFFSET 0x0020
#define OMAP4430_CM_CEFUSE_CEFUSE_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CEFUSE_INST, 0x0020) #define OMAP4430_CM_CEFUSE_CEFUSE_CLKCTRL OMAP44XX_CM2_REGADDR(OMAP4430_CM2_CEFUSE_INST, 0x0020)
/* CM2.RESTORE_CM2 register offsets */
#define OMAP4_CM_L3_1_CLKSTCTRL_RESTORE_OFFSET 0x0000
#define OMAP4430_CM_L3_1_CLKSTCTRL_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x0000)
#define OMAP4_CM_L3_2_CLKSTCTRL_RESTORE_OFFSET 0x0004
#define OMAP4430_CM_L3_2_CLKSTCTRL_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x0004)
#define OMAP4_CM_L4CFG_CLKSTCTRL_RESTORE_OFFSET 0x0008
#define OMAP4430_CM_L4CFG_CLKSTCTRL_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x0008)
#define OMAP4_CM_MEMIF_CLKSTCTRL_RESTORE_OFFSET 0x000c
#define OMAP4430_CM_MEMIF_CLKSTCTRL_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x000c)
#define OMAP4_CM_L4PER_CLKSTCTRL_RESTORE_OFFSET 0x0010
#define OMAP4430_CM_L4PER_CLKSTCTRL_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x0010)
#define OMAP4_CM_L3INIT_CLKSTCTRL_RESTORE_OFFSET 0x0014
#define OMAP4430_CM_L3INIT_CLKSTCTRL_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x0014)
#define OMAP4_CM_L3INSTR_L3_3_CLKCTRL_RESTORE_OFFSET 0x0018
#define OMAP4430_CM_L3INSTR_L3_3_CLKCTRL_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x0018)
#define OMAP4_CM_L3INSTR_L3_INSTR_CLKCTRL_RESTORE_OFFSET 0x001c
#define OMAP4430_CM_L3INSTR_L3_INSTR_CLKCTRL_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x001c)
#define OMAP4_CM_L3INSTR_OCP_WP1_CLKCTRL_RESTORE_OFFSET 0x0020
#define OMAP4430_CM_L3INSTR_OCP_WP1_CLKCTRL_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x0020)
#define OMAP4_CM_CM2_PROFILING_CLKCTRL_RESTORE_OFFSET 0x0024
#define OMAP4430_CM_CM2_PROFILING_CLKCTRL_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x0024)
#define OMAP4_CM_D2D_STATICDEP_RESTORE_OFFSET 0x0028
#define OMAP4430_CM_D2D_STATICDEP_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x0028)
#define OMAP4_CM_L3_1_DYNAMICDEP_RESTORE_OFFSET 0x002c
#define OMAP4430_CM_L3_1_DYNAMICDEP_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x002c)
#define OMAP4_CM_L3_2_DYNAMICDEP_RESTORE_OFFSET 0x0030
#define OMAP4430_CM_L3_2_DYNAMICDEP_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x0030)
#define OMAP4_CM_D2D_DYNAMICDEP_RESTORE_OFFSET 0x0034
#define OMAP4430_CM_D2D_DYNAMICDEP_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x0034)
#define OMAP4_CM_L4CFG_DYNAMICDEP_RESTORE_OFFSET 0x0038
#define OMAP4430_CM_L4CFG_DYNAMICDEP_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x0038)
#define OMAP4_CM_L4PER_DYNAMICDEP_RESTORE_OFFSET 0x003c
#define OMAP4430_CM_L4PER_DYNAMICDEP_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x003c)
#define OMAP4_CM_L4PER_GPIO2_CLKCTRL_RESTORE_OFFSET 0x0040
#define OMAP4430_CM_L4PER_GPIO2_CLKCTRL_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x0040)
#define OMAP4_CM_L4PER_GPIO3_CLKCTRL_RESTORE_OFFSET 0x0044
#define OMAP4430_CM_L4PER_GPIO3_CLKCTRL_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x0044)
#define OMAP4_CM_L4PER_GPIO4_CLKCTRL_RESTORE_OFFSET 0x0048
#define OMAP4430_CM_L4PER_GPIO4_CLKCTRL_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x0048)
#define OMAP4_CM_L4PER_GPIO5_CLKCTRL_RESTORE_OFFSET 0x004c
#define OMAP4430_CM_L4PER_GPIO5_CLKCTRL_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x004c)
#define OMAP4_CM_L4PER_GPIO6_CLKCTRL_RESTORE_OFFSET 0x0050
#define OMAP4430_CM_L4PER_GPIO6_CLKCTRL_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x0050)
#define OMAP4_CM_L3INIT_USB_HOST_CLKCTRL_RESTORE_OFFSET 0x0054
#define OMAP4430_CM_L3INIT_USB_HOST_CLKCTRL_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x0054)
#define OMAP4_CM_L3INIT_USB_TLL_CLKCTRL_RESTORE_OFFSET 0x0058
#define OMAP4430_CM_L3INIT_USB_TLL_CLKCTRL_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x0058)
#define OMAP4_CM_SDMA_STATICDEP_RESTORE_OFFSET 0x005c
#define OMAP4430_CM_SDMA_STATICDEP_RESTORE OMAP44XX_CM2_REGADDR(OMAP4430_CM2_RESTORE_INST, 0x005c)
/* Function prototypes */ /* Function prototypes */
extern u32 omap4_cm2_read_inst_reg(s16 inst, u16 idx); extern u32 omap4_cm2_read_inst_reg(s16 inst, u16 idx);
extern void omap4_cm2_write_inst_reg(u32 val, s16 inst, u16 idx); extern void omap4_cm2_write_inst_reg(u32 val, s16 inst, u16 idx);
......
/* /*
* OMAP4 Clock Management (CM) definitions * OMAP4 Clock Management (CM) definitions
* *
* Copyright (C) 2007-2009 Texas Instruments, Inc. * Copyright (C) 2007-2011 Texas Instruments, Inc.
* Copyright (C) 2007-2009 Nokia Corporation * Copyright (C) 2007-2009 Nokia Corporation
* *
* Written by Paul Walmsley * Written by Paul Walmsley
...@@ -23,10 +23,4 @@ ...@@ -23,10 +23,4 @@
#define OMAP4_CM_CLKSTCTRL 0x0000 #define OMAP4_CM_CLKSTCTRL 0x0000
#define OMAP4_CM_STATICDEP 0x0004 #define OMAP4_CM_STATICDEP 0x0004
/* Function prototypes */
# ifndef __ASSEMBLER__
extern int omap4_cm_wait_module_ready(void __iomem *clkctrl_reg);
# endif
#endif #endif
此差异已折叠。
...@@ -17,6 +17,14 @@ extern void omap4_cminst_clkdm_disable_hwsup(u8 part, s16 inst, u16 cdoffs); ...@@ -17,6 +17,14 @@ extern void omap4_cminst_clkdm_disable_hwsup(u8 part, s16 inst, u16 cdoffs);
extern void omap4_cminst_clkdm_force_sleep(u8 part, s16 inst, u16 cdoffs); extern void omap4_cminst_clkdm_force_sleep(u8 part, s16 inst, u16 cdoffs);
extern void omap4_cminst_clkdm_force_wakeup(u8 part, s16 inst, u16 cdoffs); extern void omap4_cminst_clkdm_force_wakeup(u8 part, s16 inst, u16 cdoffs);
extern int omap4_cminst_wait_module_ready(u8 part, u16 inst, s16 cdoffs, u16 clkctrl_offs);
extern int omap4_cminst_wait_module_idle(u8 part, u16 inst, s16 cdoffs, u16 clkctrl_offs);
extern void omap4_cminst_module_enable(u8 mode, u8 part, u16 inst, s16 cdoffs,
u16 clkctrl_offs);
extern void omap4_cminst_module_disable(u8 part, u16 inst, s16 cdoffs,
u16 clkctrl_offs);
/* /*
* In an ideal world, we would not export these low-level functions, * In an ideal world, we would not export these low-level functions,
* but this will probably take some time to fix properly * 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, ...@@ -32,6 +40,4 @@ extern u32 omap4_cminst_clear_inst_reg_bits(u32 bits, u8 part, s16 inst,
extern u32 omap4_cminst_read_inst_reg_bits(u8 part, u16 inst, s16 idx, extern u32 omap4_cminst_read_inst_reg_bits(u8 part, u16 inst, s16 idx,
u32 mask); u32 mask);
extern int omap4_cm_wait_module_ready(void __iomem *clkctrl_reg);
#endif #endif
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
...@@ -70,7 +70,7 @@ static void omap_prcm_arch_reset(char mode, const char *cmd) ...@@ -70,7 +70,7 @@ static void omap_prcm_arch_reset(char mode, const char *cmd)
prcm_offs = OMAP3430_GR_MOD; prcm_offs = OMAP3430_GR_MOD;
omap3_ctrl_write_boot_mode((cmd ? (u8)*cmd : 0)); omap3_ctrl_write_boot_mode((cmd ? (u8)*cmd : 0));
} else if (cpu_is_omap44xx()) { } else if (cpu_is_omap44xx()) {
omap4_prm_global_warm_sw_reset(); /* never returns */ omap4_prminst_global_warm_sw_reset(); /* never returns */
} else { } else {
WARN_ON(1); WARN_ON(1);
} }
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册