ARM: OMAP3: hwmod data and setup code for band gap thermal driver
[pandora-kernel.git] / arch / arm / mach-omap2 / omap_hwmod_3xxx_data.c
index 363df25..2db400d 100644 (file)
@@ -1067,7 +1067,7 @@ static struct omap_hwmod omap3xxx_timer11_hwmod = {
        .class          = &omap3xxx_timer_hwmod_class,
 };
 
-/* timer12*/
+/* timer12 */
 static struct omap_hwmod omap3xxx_timer12_hwmod;
 static struct omap_hwmod_irq_info omap3xxx_timer12_mpu_irqs[] = {
        { .irq = 95, },
@@ -2614,7 +2614,7 @@ static struct omap_hwmod_ocp_if *omap3_sr1_slaves[] = {
 };
 
 static struct omap_hwmod omap34xx_sr1_hwmod = {
-       .name           = "sr1_hwmod",
+       .name           = "sr1",
        .class          = &omap34xx_smartreflex_hwmod_class,
        .main_clk       = "sr1_fck",
        .vdd_name       = "mpu_iva",
@@ -2633,7 +2633,7 @@ static struct omap_hwmod omap34xx_sr1_hwmod = {
 };
 
 static struct omap_hwmod omap36xx_sr1_hwmod = {
-       .name           = "sr1_hwmod",
+       .name           = "sr1",
        .class          = &omap36xx_smartreflex_hwmod_class,
        .main_clk       = "sr1_fck",
        .vdd_name       = "mpu_iva",
@@ -2656,7 +2656,7 @@ static struct omap_hwmod_ocp_if *omap3_sr2_slaves[] = {
 };
 
 static struct omap_hwmod omap34xx_sr2_hwmod = {
-       .name           = "sr2_hwmod",
+       .name           = "sr2",
        .class          = &omap34xx_smartreflex_hwmod_class,
        .main_clk       = "sr2_fck",
        .vdd_name       = "core",
@@ -2675,7 +2675,7 @@ static struct omap_hwmod omap34xx_sr2_hwmod = {
 };
 
 static struct omap_hwmod omap36xx_sr2_hwmod = {
-       .name           = "sr2_hwmod",
+       .name           = "sr2",
        .class          = &omap36xx_smartreflex_hwmod_class,
        .main_clk       = "sr2_fck",
        .vdd_name       = "core",
@@ -2967,6 +2967,44 @@ static struct omap_hwmod omap34xx_mcspi4 = {
        .dev_attr       = &omap_mcspi4_dev_attr,
 };
 
+/* temp. sensor */
+struct omap_hwmod_class omap34xx_bandgap_ts_class = {
+       .name   = "bandgap_ts",
+};
+
+static struct omap_hwmod_addr_space omap3xxx_bandgap_ts_addrs[] = {
+       {
+               .name           = "mpu",
+               .pa_start       = 0x48002524,
+               .pa_end         = 0x48002524 + 4,
+               .flags          = ADDR_TYPE_RT
+       },
+       { }
+};
+
+static struct omap_hwmod omap34xx_bandgap_ts;
+
+/* l4_core -> bandgap */
+static struct omap_hwmod_ocp_if omap3xxx_l4_core__bandgap_ts = {
+       .master         = &omap3xxx_l4_core_hwmod,
+       .slave          = &omap34xx_bandgap_ts,
+       .addr           = omap3xxx_bandgap_ts_addrs,
+       .user           = OCP_USER_MPU,
+};
+
+static struct omap_hwmod_ocp_if *omap3xxx_bandgap_ts_slaves[] = {
+       &omap3xxx_l4_core__bandgap_ts,
+};
+
+static struct omap_hwmod omap34xx_bandgap_ts = {
+       .name           = "bandgap_ts",
+       .main_clk       = "ts_fck",
+       .slaves         = omap3xxx_bandgap_ts_slaves,
+       .slaves_cnt     = ARRAY_SIZE(omap3xxx_bandgap_ts_slaves),
+       .class          = &omap34xx_bandgap_ts_class,
+       .flags          = HWMOD_NO_IDLEST,
+};
+
 /*
  * usbhsotg
  */
@@ -3018,9 +3056,14 @@ static struct omap_hwmod omap3xxx_usbhsotg_hwmod = {
         * Erratum ID: i479  idle_req / idle_ack mechanism potentially
         * broken when autoidle is enabled
         * workaround is to disable the autoidle bit at module level.
+        *
+        * Enabling the device in any other MIDLEMODE setting but force-idle
+        * causes core_pwrdm not enter idle states at least on OMAP3630.
+        * Note that musb has OTG_FORCESTDBY register that controls MSTANDBY
+        * signal when MIDLEMODE is set to force-idle.
         */
        .flags          = HWMOD_NO_OCP_AUTOIDLE | HWMOD_SWSUP_SIDLE
-                               | HWMOD_SWSUP_MSTANDBY,
+                               | HWMOD_FORCE_MSTANDBY,
 };
 
 /* usb_otg_hs */
@@ -3310,6 +3353,8 @@ static __initdata struct omap_hwmod *omap3xxx_hwmods[] = {
        &omap34xx_mcspi3,
        &omap34xx_mcspi4,
 
+       &omap34xx_bandgap_ts,
+
        NULL,
 };