ARM: OMAP3: hwmod data: some mainline backports
authorGrazvydas Ignotas <notasas@gmail.com>
Fri, 27 May 2016 23:32:29 +0000 (02:32 +0300)
committerGrazvydas Ignotas <notasas@gmail.com>
Sun, 3 Jul 2016 00:23:25 +0000 (03:23 +0300)
Mostly from 844a3b632b7, which had changes mixed with refactoring.
Note that it re-adds OCPIF_SWSUP_IDLE on venc, which was previously
removed by 1f5e6247ca99 - this is backported here too.

arch/arm/mach-omap2/omap_hwmod_3xxx_data.c

index 8859d47..34b2dfa 100644 (file)
@@ -66,7 +66,9 @@ static struct omap_hwmod omap3xxx_gpio4_hwmod;
 static struct omap_hwmod omap3xxx_gpio5_hwmod;
 static struct omap_hwmod omap3xxx_gpio6_hwmod;
 static struct omap_hwmod omap34xx_sr1_hwmod;
+static struct omap_hwmod omap36xx_sr1_hwmod;
 static struct omap_hwmod omap34xx_sr2_hwmod;
+static struct omap_hwmod omap36xx_sr2_hwmod;
 static struct omap_hwmod omap34xx_mcspi1;
 static struct omap_hwmod omap34xx_mcspi2;
 static struct omap_hwmod omap34xx_mcspi3;
@@ -164,7 +166,7 @@ static struct omap_hwmod omap3xxx_l4_wkup_hwmod;
 static struct omap_hwmod omap3xxx_uart1_hwmod;
 static struct omap_hwmod omap3xxx_uart2_hwmod;
 static struct omap_hwmod omap3xxx_uart3_hwmod;
-static struct omap_hwmod omap3xxx_uart4_hwmod;
+static struct omap_hwmod omap36xx_uart4_hwmod;
 static struct omap_hwmod omap3xxx_usbhsotg_hwmod;
 
 /* l3_core -> usbhsotg interface */
@@ -283,7 +285,7 @@ static struct omap_hwmod_ocp_if omap3_l4_per__uart3 = {
 };
 
 /* L4 PER -> UART4 interface */
-static struct omap_hwmod_addr_space omap3xxx_uart4_addr_space[] = {
+static struct omap_hwmod_addr_space omap36xx_uart4_addr_space[] = {
        {
                .pa_start       = OMAP3_UART4_BASE,
                .pa_end         = OMAP3_UART4_BASE + SZ_1K - 1,
@@ -292,11 +294,11 @@ static struct omap_hwmod_addr_space omap3xxx_uart4_addr_space[] = {
        { }
 };
 
-static struct omap_hwmod_ocp_if omap3_l4_per__uart4 = {
+static struct omap_hwmod_ocp_if omap36xx_l4_per__uart4 = {
        .master         = &omap3xxx_l4_per_hwmod,
-       .slave          = &omap3xxx_uart4_hwmod,
+       .slave          = &omap36xx_uart4_hwmod,
        .clk            = "uart4_ick",
-       .addr           = omap3xxx_uart4_addr_space,
+       .addr           = omap36xx_uart4_addr_space,
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -377,7 +379,7 @@ static struct omap_hwmod_addr_space omap3_sr1_addr_space[] = {
        { }
 };
 
-static struct omap_hwmod_ocp_if omap3_l4_core__sr1 = {
+static struct omap_hwmod_ocp_if omap34xx_l4_core__sr1 = {
        .master         = &omap3xxx_l4_core_hwmod,
        .slave          = &omap34xx_sr1_hwmod,
        .clk            = "sr_l4_ick",
@@ -385,6 +387,14 @@ static struct omap_hwmod_ocp_if omap3_l4_core__sr1 = {
        .user           = OCP_USER_MPU,
 };
 
+static struct omap_hwmod_ocp_if omap36xx_l4_core__sr1 = {
+       .master         = &omap3xxx_l4_core_hwmod,
+       .slave          = &omap36xx_sr1_hwmod,
+       .clk            = "sr_l4_ick",
+       .addr           = omap3_sr1_addr_space,
+       .user           = OCP_USER_MPU,
+};
+
 /* L4 CORE -> SR1 interface */
 static struct omap_hwmod_addr_space omap3_sr2_addr_space[] = {
        {
@@ -395,7 +405,7 @@ static struct omap_hwmod_addr_space omap3_sr2_addr_space[] = {
        { }
 };
 
-static struct omap_hwmod_ocp_if omap3_l4_core__sr2 = {
+static struct omap_hwmod_ocp_if omap34xx_l4_core__sr2 = {
        .master         = &omap3xxx_l4_core_hwmod,
        .slave          = &omap34xx_sr2_hwmod,
        .clk            = "sr_l4_ick",
@@ -403,6 +413,14 @@ static struct omap_hwmod_ocp_if omap3_l4_core__sr2 = {
        .user           = OCP_USER_MPU,
 };
 
+static struct omap_hwmod_ocp_if omap36xx_l4_core__sr2 = {
+       .master         = &omap3xxx_l4_core_hwmod,
+       .slave          = &omap36xx_sr2_hwmod,
+       .clk            = "sr_l4_ick",
+       .addr           = omap3_sr2_addr_space,
+       .user           = OCP_USER_MPU,
+};
+
 /*
 * usbhsotg interface data
 */
@@ -1298,14 +1316,15 @@ static struct omap_hwmod_dma_info uart4_sdma_reqs[] = {
 };
 
 static struct omap_hwmod_ocp_if *omap3xxx_uart4_slaves[] = {
-       &omap3_l4_per__uart4,
+       &omap36xx_l4_per__uart4,
 };
 
-static struct omap_hwmod omap3xxx_uart4_hwmod = {
+static struct omap_hwmod omap36xx_uart4_hwmod = {
        .name           = "uart4",
        .mpu_irqs       = uart4_mpu_irqs,
        .sdma_reqs      = uart4_sdma_reqs,
        .main_clk       = "uart4_fck",
+       .flags          = HWMOD_SWSUP_SIDLE,
        .prcm           = {
                .omap2 = {
                        .module_offs = OMAP3430_PER_MOD,
@@ -1622,6 +1641,7 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_core__dss_venc = {
                        .flags  = OMAP_FIREWALL_L4,
                }
        },
+       .flags          = OCPIF_SWSUP_IDLE,
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
@@ -2624,8 +2644,8 @@ static struct omap_smartreflex_dev_attr sr1_dev_attr = {
        .sensor_voltdm_name   = "mpu_iva",
 };
 
-static struct omap_hwmod_ocp_if *omap3_sr1_slaves[] = {
-       &omap3_l4_core__sr1,
+static struct omap_hwmod_ocp_if *omap34xx_sr1_slaves[] = {
+       &omap34xx_l4_core__sr1,
 };
 
 static struct omap_hwmod omap34xx_sr1_hwmod = {
@@ -2641,13 +2661,17 @@ static struct omap_hwmod omap34xx_sr1_hwmod = {
                        .idlest_idle_bit = OMAP3430_EN_SR1_SHIFT,
                },
        },
-       .slaves         = omap3_sr1_slaves,
-       .slaves_cnt     = ARRAY_SIZE(omap3_sr1_slaves),
+       .slaves         = omap34xx_sr1_slaves,
+       .slaves_cnt     = ARRAY_SIZE(omap34xx_sr1_slaves),
        .dev_attr       = &sr1_dev_attr,
        .mpu_irqs       = omap3_smartreflex_mpu_irqs,
        .flags          = HWMOD_SET_DEFAULT_CLOCKACT,
 };
 
+static struct omap_hwmod_ocp_if *omap36xx_sr1_slaves[] = {
+       &omap36xx_l4_core__sr1,
+};
+
 static struct omap_hwmod omap36xx_sr1_hwmod = {
        .name           = "sr1",
        .class          = &omap36xx_smartreflex_hwmod_class,
@@ -2661,8 +2685,8 @@ static struct omap_hwmod omap36xx_sr1_hwmod = {
                        .idlest_idle_bit = OMAP3430_EN_SR1_SHIFT,
                },
        },
-       .slaves         = omap3_sr1_slaves,
-       .slaves_cnt     = ARRAY_SIZE(omap3_sr1_slaves),
+       .slaves         = omap36xx_sr1_slaves,
+       .slaves_cnt     = ARRAY_SIZE(omap36xx_sr1_slaves),
        .dev_attr       = &sr1_dev_attr,
        .mpu_irqs       = omap3_smartreflex_mpu_irqs,
 };
@@ -2672,8 +2696,8 @@ static struct omap_smartreflex_dev_attr sr2_dev_attr = {
        .sensor_voltdm_name     = "core",
 };
 
-static struct omap_hwmod_ocp_if *omap3_sr2_slaves[] = {
-       &omap3_l4_core__sr2,
+static struct omap_hwmod_ocp_if *omap34xx_sr2_slaves[] = {
+       &omap34xx_l4_core__sr2,
 };
 
 static struct omap_hwmod omap34xx_sr2_hwmod = {
@@ -2689,13 +2713,17 @@ static struct omap_hwmod omap34xx_sr2_hwmod = {
                        .idlest_idle_bit = OMAP3430_EN_SR2_SHIFT,
                },
        },
-       .slaves         = omap3_sr2_slaves,
-       .slaves_cnt     = ARRAY_SIZE(omap3_sr2_slaves),
+       .slaves         = omap34xx_sr2_slaves,
+       .slaves_cnt     = ARRAY_SIZE(omap34xx_sr2_slaves),
        .dev_attr       = &sr2_dev_attr,
        .mpu_irqs       = omap3_smartreflex_core_irqs,
        .flags          = HWMOD_SET_DEFAULT_CLOCKACT,
 };
 
+static struct omap_hwmod_ocp_if *omap36xx_sr2_slaves[] = {
+       &omap36xx_l4_core__sr2,
+};
+
 static struct omap_hwmod omap36xx_sr2_hwmod = {
        .name           = "sr2",
        .class          = &omap36xx_smartreflex_hwmod_class,
@@ -2709,8 +2737,8 @@ static struct omap_hwmod omap36xx_sr2_hwmod = {
                        .idlest_idle_bit = OMAP3430_EN_SR2_SHIFT,
                },
        },
-       .slaves         = omap3_sr2_slaves,
-       .slaves_cnt     = ARRAY_SIZE(omap3_sr2_slaves),
+       .slaves         = omap36xx_sr2_slaves,
+       .slaves_cnt     = ARRAY_SIZE(omap36xx_sr2_slaves),
        .dev_attr       = &sr2_dev_attr,
        .mpu_irqs       = omap3_smartreflex_core_irqs,
 };
@@ -3426,7 +3454,7 @@ static __initdata struct omap_hwmod *omap34xx_hwmods[] = {
 /* 36xx-only hwmods (all ES revisions) */
 static __initdata struct omap_hwmod *omap36xx_hwmods[] = {
        &omap3xxx_iva_hwmod,
-       &omap3xxx_uart4_hwmod,
+       &omap36xx_uart4_hwmod,
        &omap3xxx_dss_core_hwmod,
        &omap36xx_sr1_hwmod,
        &omap36xx_sr2_hwmod,