ARM: OMAP3: PM: remove access to PRM_VOLTCTRL register
[pandora-kernel.git] / arch / arm / mach-omap2 / omap_hwmod_2430_data.c
index 408193d..04a3885 100644 (file)
@@ -110,7 +110,6 @@ static struct omap_hwmod omap2430_l3_main_hwmod = {
        .masters_cnt    = ARRAY_SIZE(omap2430_l3_main_masters),
        .slaves         = omap2430_l3_main_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap2430_l3_main_slaves),
-       .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
        .flags          = HWMOD_NO_IDLEST,
 };
 
@@ -250,7 +249,6 @@ static struct omap_hwmod omap2430_l4_core_hwmod = {
        .masters_cnt    = ARRAY_SIZE(omap2430_l4_core_masters),
        .slaves         = omap2430_l4_core_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap2430_l4_core_slaves),
-       .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
        .flags          = HWMOD_NO_IDLEST,
 };
 
@@ -301,7 +299,6 @@ static struct omap_hwmod omap2430_l4_wkup_hwmod = {
        .masters_cnt    = ARRAY_SIZE(omap2430_l4_wkup_masters),
        .slaves         = omap2430_l4_wkup_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap2430_l4_wkup_slaves),
-       .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
        .flags          = HWMOD_NO_IDLEST,
 };
 
@@ -317,7 +314,6 @@ static struct omap_hwmod omap2430_mpu_hwmod = {
        .main_clk       = "mpu_ck",
        .masters        = omap2430_mpu_masters,
        .masters_cnt    = ARRAY_SIZE(omap2430_mpu_masters),
-       .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
 };
 
 /*
@@ -345,7 +341,16 @@ static struct omap_hwmod omap2430_iva_hwmod = {
        .class          = &iva_hwmod_class,
        .masters        = omap2430_iva_masters,
        .masters_cnt    = ARRAY_SIZE(omap2430_iva_masters),
-       .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
+};
+
+/* always-on timers dev attribute */
+static struct omap_timer_capability_dev_attr capability_alwon_dev_attr = {
+       .timer_capability       = OMAP_TIMER_ALWON,
+};
+
+/* pwm timers dev attribute */
+static struct omap_timer_capability_dev_attr capability_pwm_dev_attr = {
+       .timer_capability       = OMAP_TIMER_HAS_PWM,
 };
 
 /* timer1 */
@@ -388,10 +393,10 @@ static struct omap_hwmod omap2430_timer1_hwmod = {
                        .idlest_idle_bit = OMAP24XX_ST_GPT1_SHIFT,
                },
        },
+       .dev_attr       = &capability_alwon_dev_attr,
        .slaves         = omap2430_timer1_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap2430_timer1_slaves),
        .class          = &omap2xxx_timer_hwmod_class,
-       .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
 };
 
 /* timer2 */
@@ -425,10 +430,10 @@ static struct omap_hwmod omap2430_timer2_hwmod = {
                        .idlest_idle_bit = OMAP24XX_ST_GPT2_SHIFT,
                },
        },
+       .dev_attr       = &capability_alwon_dev_attr,
        .slaves         = omap2430_timer2_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap2430_timer2_slaves),
        .class          = &omap2xxx_timer_hwmod_class,
-       .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
 };
 
 /* timer3 */
@@ -462,10 +467,10 @@ static struct omap_hwmod omap2430_timer3_hwmod = {
                        .idlest_idle_bit = OMAP24XX_ST_GPT3_SHIFT,
                },
        },
+       .dev_attr       = &capability_alwon_dev_attr,
        .slaves         = omap2430_timer3_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap2430_timer3_slaves),
        .class          = &omap2xxx_timer_hwmod_class,
-       .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
 };
 
 /* timer4 */
@@ -499,10 +504,10 @@ static struct omap_hwmod omap2430_timer4_hwmod = {
                        .idlest_idle_bit = OMAP24XX_ST_GPT4_SHIFT,
                },
        },
+       .dev_attr       = &capability_alwon_dev_attr,
        .slaves         = omap2430_timer4_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap2430_timer4_slaves),
        .class          = &omap2xxx_timer_hwmod_class,
-       .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
 };
 
 /* timer5 */
@@ -536,10 +541,10 @@ static struct omap_hwmod omap2430_timer5_hwmod = {
                        .idlest_idle_bit = OMAP24XX_ST_GPT5_SHIFT,
                },
        },
+       .dev_attr       = &capability_alwon_dev_attr,
        .slaves         = omap2430_timer5_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap2430_timer5_slaves),
        .class          = &omap2xxx_timer_hwmod_class,
-       .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
 };
 
 /* timer6 */
@@ -573,10 +578,10 @@ static struct omap_hwmod omap2430_timer6_hwmod = {
                        .idlest_idle_bit = OMAP24XX_ST_GPT6_SHIFT,
                },
        },
+       .dev_attr       = &capability_alwon_dev_attr,
        .slaves         = omap2430_timer6_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap2430_timer6_slaves),
        .class          = &omap2xxx_timer_hwmod_class,
-       .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
 };
 
 /* timer7 */
@@ -610,10 +615,10 @@ static struct omap_hwmod omap2430_timer7_hwmod = {
                        .idlest_idle_bit = OMAP24XX_ST_GPT7_SHIFT,
                },
        },
+       .dev_attr       = &capability_alwon_dev_attr,
        .slaves         = omap2430_timer7_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap2430_timer7_slaves),
        .class          = &omap2xxx_timer_hwmod_class,
-       .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
 };
 
 /* timer8 */
@@ -647,10 +652,10 @@ static struct omap_hwmod omap2430_timer8_hwmod = {
                        .idlest_idle_bit = OMAP24XX_ST_GPT8_SHIFT,
                },
        },
+       .dev_attr       = &capability_alwon_dev_attr,
        .slaves         = omap2430_timer8_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap2430_timer8_slaves),
        .class          = &omap2xxx_timer_hwmod_class,
-       .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
 };
 
 /* timer9 */
@@ -684,10 +689,10 @@ static struct omap_hwmod omap2430_timer9_hwmod = {
                        .idlest_idle_bit = OMAP24XX_ST_GPT9_SHIFT,
                },
        },
+       .dev_attr       = &capability_pwm_dev_attr,
        .slaves         = omap2430_timer9_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap2430_timer9_slaves),
        .class          = &omap2xxx_timer_hwmod_class,
-       .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
 };
 
 /* timer10 */
@@ -721,10 +726,10 @@ static struct omap_hwmod omap2430_timer10_hwmod = {
                        .idlest_idle_bit = OMAP24XX_ST_GPT10_SHIFT,
                },
        },
+       .dev_attr       = &capability_pwm_dev_attr,
        .slaves         = omap2430_timer10_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap2430_timer10_slaves),
        .class          = &omap2xxx_timer_hwmod_class,
-       .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
 };
 
 /* timer11 */
@@ -758,10 +763,10 @@ static struct omap_hwmod omap2430_timer11_hwmod = {
                        .idlest_idle_bit = OMAP24XX_ST_GPT11_SHIFT,
                },
        },
+       .dev_attr       = &capability_pwm_dev_attr,
        .slaves         = omap2430_timer11_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap2430_timer11_slaves),
        .class          = &omap2xxx_timer_hwmod_class,
-       .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
 };
 
 /* timer12 */
@@ -795,10 +800,10 @@ static struct omap_hwmod omap2430_timer12_hwmod = {
                        .idlest_idle_bit = OMAP24XX_ST_GPT12_SHIFT,
                },
        },
+       .dev_attr       = &capability_pwm_dev_attr,
        .slaves         = omap2430_timer12_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap2430_timer12_slaves),
        .class          = &omap2xxx_timer_hwmod_class,
-       .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
 };
 
 /* l4_wkup -> wd_timer2 */
@@ -839,7 +844,6 @@ static struct omap_hwmod omap2430_wd_timer2_hwmod = {
        },
        .slaves         = omap2430_wd_timer2_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap2430_wd_timer2_slaves),
-       .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
 };
 
 /* UART1 */
@@ -865,7 +869,6 @@ static struct omap_hwmod omap2430_uart1_hwmod = {
        .slaves         = omap2430_uart1_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap2430_uart1_slaves),
        .class          = &omap2_uart_class,
-       .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
 };
 
 /* UART2 */
@@ -891,7 +894,6 @@ static struct omap_hwmod omap2430_uart2_hwmod = {
        .slaves         = omap2430_uart2_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap2430_uart2_slaves),
        .class          = &omap2_uart_class,
-       .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
 };
 
 /* UART3 */
@@ -917,7 +919,6 @@ static struct omap_hwmod omap2430_uart3_hwmod = {
        .slaves         = omap2430_uart3_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap2430_uart3_slaves),
        .class          = &omap2_uart_class,
-       .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
 };
 
 /* dss */
@@ -941,6 +942,10 @@ static struct omap_hwmod_ocp_if *omap2430_dss_slaves[] = {
 };
 
 static struct omap_hwmod_opt_clk dss_opt_clks[] = {
+       /*
+        * The DSS HW needs all DSS clocks enabled during reset. The dss_core
+        * driver does not use these clocks.
+        */
        { .role = "tv_clk", .clk = "dss_54m_fck" },
        { .role = "sys_clk", .clk = "dss2_fck" },
 };
@@ -965,8 +970,7 @@ static struct omap_hwmod omap2430_dss_core_hwmod = {
        .slaves_cnt     = ARRAY_SIZE(omap2430_dss_slaves),
        .masters        = omap2430_dss_masters,
        .masters_cnt    = ARRAY_SIZE(omap2430_dss_masters),
-       .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
-       .flags          = HWMOD_NO_IDLEST,
+       .flags          = HWMOD_NO_IDLEST | HWMOD_CONTROL_OPT_CLKS_IN_RESET,
 };
 
 /* l4_core -> dss_dispc */
@@ -999,8 +1003,8 @@ static struct omap_hwmod omap2430_dss_dispc_hwmod = {
        },
        .slaves         = omap2430_dss_dispc_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap2430_dss_dispc_slaves),
-       .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
        .flags          = HWMOD_NO_IDLEST,
+       .dev_attr       = &omap2_3_dss_dispc_dev_attr
 };
 
 /* l4_core -> dss_rfbi */
@@ -1017,6 +1021,10 @@ static struct omap_hwmod_ocp_if *omap2430_dss_rfbi_slaves[] = {
        &omap2430_l4_core__dss_rfbi,
 };
 
+static struct omap_hwmod_opt_clk dss_rfbi_opt_clks[] = {
+       { .role = "ick", .clk = "dss_ick" },
+};
+
 static struct omap_hwmod omap2430_dss_rfbi_hwmod = {
        .name           = "dss_rfbi",
        .class          = &omap2_rfbi_hwmod_class,
@@ -1028,9 +1036,10 @@ static struct omap_hwmod omap2430_dss_rfbi_hwmod = {
                        .module_offs = CORE_MOD,
                },
        },
+       .opt_clks       = dss_rfbi_opt_clks,
+       .opt_clks_cnt   = ARRAY_SIZE(dss_rfbi_opt_clks),
        .slaves         = omap2430_dss_rfbi_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap2430_dss_rfbi_slaves),
-       .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
        .flags          = HWMOD_NO_IDLEST,
 };
 
@@ -1038,9 +1047,8 @@ static struct omap_hwmod omap2430_dss_rfbi_hwmod = {
 static struct omap_hwmod_ocp_if omap2430_l4_core__dss_venc = {
        .master         = &omap2430_l4_core_hwmod,
        .slave          = &omap2430_dss_venc_hwmod,
-       .clk            = "dss_54m_fck",
+       .clk            = "dss_ick",
        .addr           = omap2_dss_venc_addrs,
-       .flags          = OCPIF_SWSUP_IDLE,
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -1052,7 +1060,7 @@ static struct omap_hwmod_ocp_if *omap2430_dss_venc_slaves[] = {
 static struct omap_hwmod omap2430_dss_venc_hwmod = {
        .name           = "dss_venc",
        .class          = &omap2_venc_hwmod_class,
-       .main_clk       = "dss1_fck",
+       .main_clk       = "dss_54m_fck",
        .prcm           = {
                .omap2 = {
                        .prcm_reg_id = 1,
@@ -1062,7 +1070,6 @@ static struct omap_hwmod omap2430_dss_venc_hwmod = {
        },
        .slaves         = omap2430_dss_venc_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap2430_dss_venc_slaves),
-       .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
        .flags          = HWMOD_NO_IDLEST,
 };
 
@@ -1123,7 +1130,6 @@ static struct omap_hwmod omap2430_i2c1_hwmod = {
        .slaves_cnt     = ARRAY_SIZE(omap2430_i2c1_slaves),
        .class          = &i2c_class,
        .dev_attr       = &i2c_dev_attr,
-       .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
 };
 
 /* I2C2 */
@@ -1151,7 +1157,6 @@ static struct omap_hwmod omap2430_i2c2_hwmod = {
        .slaves_cnt     = ARRAY_SIZE(omap2430_i2c2_slaves),
        .class          = &i2c_class,
        .dev_attr       = &i2c_dev_attr,
-       .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
 };
 
 /* l4_wkup -> gpio1 */
@@ -1273,7 +1278,6 @@ static struct omap_hwmod omap2430_gpio1_hwmod = {
        .slaves_cnt     = ARRAY_SIZE(omap2430_gpio1_slaves),
        .class          = &omap2xxx_gpio_hwmod_class,
        .dev_attr       = &gpio_dev_attr,
-       .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
 };
 
 /* gpio2 */
@@ -1299,7 +1303,6 @@ static struct omap_hwmod omap2430_gpio2_hwmod = {
        .slaves_cnt     = ARRAY_SIZE(omap2430_gpio2_slaves),
        .class          = &omap2xxx_gpio_hwmod_class,
        .dev_attr       = &gpio_dev_attr,
-       .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
 };
 
 /* gpio3 */
@@ -1325,7 +1328,6 @@ static struct omap_hwmod omap2430_gpio3_hwmod = {
        .slaves_cnt     = ARRAY_SIZE(omap2430_gpio3_slaves),
        .class          = &omap2xxx_gpio_hwmod_class,
        .dev_attr       = &gpio_dev_attr,
-       .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
 };
 
 /* gpio4 */
@@ -1351,7 +1353,6 @@ static struct omap_hwmod omap2430_gpio4_hwmod = {
        .slaves_cnt     = ARRAY_SIZE(omap2430_gpio4_slaves),
        .class          = &omap2xxx_gpio_hwmod_class,
        .dev_attr       = &gpio_dev_attr,
-       .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
 };
 
 /* gpio5 */
@@ -1382,7 +1383,6 @@ static struct omap_hwmod omap2430_gpio5_hwmod = {
        .slaves_cnt     = ARRAY_SIZE(omap2430_gpio5_slaves),
        .class          = &omap2xxx_gpio_hwmod_class,
        .dev_attr       = &gpio_dev_attr,
-       .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
 };
 
 /* dma attributes */
@@ -1429,7 +1429,6 @@ static struct omap_hwmod omap2430_dma_system_hwmod = {
        .masters        = omap2430_dma_system_masters,
        .masters_cnt    = ARRAY_SIZE(omap2430_dma_system_masters),
        .dev_attr       = &dma_dev_attr,
-       .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
        .flags          = HWMOD_NO_IDLEST,
 };
 
@@ -1469,7 +1468,6 @@ static struct omap_hwmod omap2430_mailbox_hwmod = {
        },
        .slaves         = omap2430_mailbox_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap2430_mailbox_slaves),
-       .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
 };
 
 /* mcspi1 */
@@ -1499,7 +1497,6 @@ static struct omap_hwmod omap2430_mcspi1_hwmod = {
        .slaves_cnt     = ARRAY_SIZE(omap2430_mcspi1_slaves),
        .class          = &omap2xxx_mcspi_class,
        .dev_attr       = &omap_mcspi1_dev_attr,
-       .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
 };
 
 /* mcspi2 */
@@ -1529,7 +1526,6 @@ static struct omap_hwmod omap2430_mcspi2_hwmod = {
        .slaves_cnt     = ARRAY_SIZE(omap2430_mcspi2_slaves),
        .class          = &omap2xxx_mcspi_class,
        .dev_attr       = &omap_mcspi2_dev_attr,
-       .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
 };
 
 /* mcspi3 */
@@ -1572,7 +1568,6 @@ static struct omap_hwmod omap2430_mcspi3_hwmod = {
        .slaves_cnt     = ARRAY_SIZE(omap2430_mcspi3_slaves),
        .class          = &omap2xxx_mcspi_class,
        .dev_attr       = &omap_mcspi3_dev_attr,
-       .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
 };
 
 /*
@@ -1628,7 +1623,6 @@ static struct omap_hwmod omap2430_usbhsotg_hwmod = {
         */
        .flags          = HWMOD_NO_OCP_AUTOIDLE | HWMOD_SWSUP_SIDLE
                                | HWMOD_SWSUP_MSTANDBY,
-       .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
 };
 
 /*
@@ -1689,7 +1683,6 @@ static struct omap_hwmod omap2430_mcbsp1_hwmod = {
        },
        .slaves         = omap2430_mcbsp1_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap2430_mcbsp1_slaves),
-       .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
 };
 
 /* mcbsp2 */
@@ -1731,7 +1724,6 @@ static struct omap_hwmod omap2430_mcbsp2_hwmod = {
        },
        .slaves         = omap2430_mcbsp2_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap2430_mcbsp2_slaves),
-       .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
 };
 
 /* mcbsp3 */
@@ -1783,7 +1775,6 @@ static struct omap_hwmod omap2430_mcbsp3_hwmod = {
        },
        .slaves         = omap2430_mcbsp3_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap2430_mcbsp3_slaves),
-       .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
 };
 
 /* mcbsp4 */
@@ -1841,7 +1832,6 @@ static struct omap_hwmod omap2430_mcbsp4_hwmod = {
        },
        .slaves         = omap2430_mcbsp4_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap2430_mcbsp4_slaves),
-       .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
 };
 
 /* mcbsp5 */
@@ -1899,7 +1889,6 @@ static struct omap_hwmod omap2430_mcbsp5_hwmod = {
        },
        .slaves         = omap2430_mcbsp5_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap2430_mcbsp5_slaves),
-       .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
 };
 
 /* MMC/SD/SDIO common */
@@ -1966,7 +1955,6 @@ static struct omap_hwmod omap2430_mmc1_hwmod = {
        .slaves         = omap2430_mmc1_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap2430_mmc1_slaves),
        .class          = &omap2430_mmc_class,
-       .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
 };
 
 /* MMC/SD/SDIO2 */
@@ -2010,7 +1998,6 @@ static struct omap_hwmod omap2430_mmc2_hwmod = {
        .slaves         = omap2430_mmc2_slaves,
        .slaves_cnt     = ARRAY_SIZE(omap2430_mmc2_slaves),
        .class          = &omap2430_mmc_class,
-       .omap_chip      = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
 };
 
 static __initdata struct omap_hwmod *omap2430_hwmods[] = {