Skip to contentSkip to conversation

ARM: OMAP2+: hwmod: Cleanup unused optional clock information

RFC New Rajendra Nayak 1 participant 1 message May 20, 2014

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

RFC 1/1 ARM: OMAP2+: hwmod: Cleanup unused optional clock information

Some modules need their optional clocks to be enabled in order to complete the ocp softreset. This is what hwmod uses optional clock information for. While these modules are limited (GPIO and DSS) there are others which have this data in hwmod but it seems to be completely unused. Get rid of all opt_clks for all such instances.

The modules (like GPIO and DSS) which do have this need to handle optional clocks during a ocp softreset are marked with a flag 'HWMOD_CONTROL_OPT_CLKS_IN_RESET' so its easy to identify the ones which don't have this requirement.

---
I have only sanity tested this on a couple boards. Need to test on all affected platforms.

 arch/arm/mach-omap2/omap_hwmod_2420_data.c         |    9 --
 arch/arm/mach-omap2/omap_hwmod_2430_data.c         |   15 ----
 arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c |    6 --
 arch/arm/mach-omap2/omap_hwmod_33xx_data.c         |    7 --
 arch/arm/mach-omap2/omap_hwmod_44xx_data.c         |   87 --------------------
 arch/arm/mach-omap2/omap_hwmod_54xx_data.c         |   39 ---------
 arch/arm/mach-omap2/omap_hwmod_7xx_data.c          |   55 -------------
 7 files changed, 218 deletions(-)
arch/arm/mach-omap2/omap_hwmod_2420_data.c +0 -9
index 2f15979..25e2266 100644
@@ -200,11 +200,6 @@ static struct omap_hwmod_class omap2420_mcbsp_hwmod_class = {
 	.name = "mcbsp",
 };
 
-static struct omap_hwmod_opt_clk mcbsp_opt_clks[] = {
-	{ .role = "pad_fck", .clk = "mcbsp_clks" },
-	{ .role = "prcm_fck", .clk = "func_96m_ck" },
-};
-
 /* mcbsp1 */
 static struct omap_hwmod omap2420_mcbsp1_hwmod = {
 	.name		= "mcbsp1",
@@ -219,8 +214,6 @@ static struct omap_hwmod omap2420_mcbsp1_hwmod = {
 			.idlest_idle_bit = OMAP24XX_ST_MCBSP1_SHIFT,
 		},
 	},
-	.opt_clks	= mcbsp_opt_clks,
-	.opt_clks_cnt	= ARRAY_SIZE(mcbsp_opt_clks),
 };
 
 /* mcbsp2 */
@@ -237,8 +230,6 @@ static struct omap_hwmod omap2420_mcbsp2_hwmod = {
 			.idlest_idle_bit = OMAP24XX_ST_MCBSP2_SHIFT,
 		},
 	},
-	.opt_clks	= mcbsp_opt_clks,
-	.opt_clks_cnt	= ARRAY_SIZE(mcbsp_opt_clks),
 };
 
 static struct omap_hwmod_class_sysconfig omap2420_msdi_sysc = {
arch/arm/mach-omap2/omap_hwmod_2430_data.c +0 -15
index 6d1b609..d755bf0 100644
@@ -268,11 +268,6 @@ static struct omap_hwmod_class omap2430_mcbsp_hwmod_class = {
 	.rev  = MCBSP_CONFIG_TYPE2,
 };
 
-static struct omap_hwmod_opt_clk mcbsp_opt_clks[] = {
-	{ .role = "pad_fck", .clk = "mcbsp_clks" },
-	{ .role = "prcm_fck", .clk = "func_96m_ck" },
-};
-
 /* mcbsp1 */
 static struct omap_hwmod omap2430_mcbsp1_hwmod = {
 	.name		= "mcbsp1",
@@ -287,8 +282,6 @@ static struct omap_hwmod omap2430_mcbsp1_hwmod = {
 			.idlest_idle_bit = OMAP24XX_ST_MCBSP1_SHIFT,
 		},
 	},
-	.opt_clks	= mcbsp_opt_clks,
-	.opt_clks_cnt	= ARRAY_SIZE(mcbsp_opt_clks),
 };
 
 /* mcbsp2 */
@@ -305,8 +298,6 @@ static struct omap_hwmod omap2430_mcbsp2_hwmod = {
 			.idlest_idle_bit = OMAP24XX_ST_MCBSP2_SHIFT,
 		},
 	},
-	.opt_clks	= mcbsp_opt_clks,
-	.opt_clks_cnt	= ARRAY_SIZE(mcbsp_opt_clks),
 };
 
 /* mcbsp3 */
@@ -323,8 +314,6 @@ static struct omap_hwmod omap2430_mcbsp3_hwmod = {
 			.idlest_idle_bit = OMAP2430_ST_MCBSP3_SHIFT,
 		},
 	},
-	.opt_clks	= mcbsp_opt_clks,
-	.opt_clks_cnt	= ARRAY_SIZE(mcbsp_opt_clks),
 };
 
 /* mcbsp4 */
@@ -341,8 +330,6 @@ static struct omap_hwmod omap2430_mcbsp4_hwmod = {
 			.idlest_idle_bit = OMAP2430_ST_MCBSP4_SHIFT,
 		},
 	},
-	.opt_clks	= mcbsp_opt_clks,
-	.opt_clks_cnt	= ARRAY_SIZE(mcbsp_opt_clks),
 };
 
 /* mcbsp5 */
@@ -359,8 +346,6 @@ static struct omap_hwmod omap2430_mcbsp5_hwmod = {
 			.idlest_idle_bit = OMAP2430_ST_MCBSP5_SHIFT,
 		},
 	},
-	.opt_clks	= mcbsp_opt_clks,
-	.opt_clks_cnt	= ARRAY_SIZE(mcbsp_opt_clks),
 };
 
 /* MMC/SD/SDIO common */
arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c +0 -6
index 8821b9d..a33a2d7 100644
@@ -584,10 +584,6 @@ struct omap_hwmod omap2xxx_dss_dispc_hwmod = {
 	.dev_attr	= &omap2_3_dss_dispc_dev_attr,
 };
 
-static struct omap_hwmod_opt_clk dss_rfbi_opt_clks[] = {
-	{ .role = "ick", .clk = "dss_ick" },
-};
-
 struct omap_hwmod omap2xxx_dss_rfbi_hwmod = {
 	.name		= "dss_rfbi",
 	.class		= &omap2_rfbi_hwmod_class,
@@ -599,8 +595,6 @@ struct omap_hwmod omap2xxx_dss_rfbi_hwmod = {
 			.module_offs = CORE_MOD,
 		},
 	},
-	.opt_clks	= dss_rfbi_opt_clks,
-	.opt_clks_cnt	= ARRAY_SIZE(dss_rfbi_opt_clks),
 	.flags		= HWMOD_NO_IDLEST,
 };
 
arch/arm/mach-omap2/omap_hwmod_33xx_data.c +0 -7
index 6b406ca..f36ef0b 100644
@@ -209,11 +209,6 @@ static struct omap_hwmod am33xx_ocpwp_hwmod = {
  * 'debugss' class
  * debug sub system
  */
-static struct omap_hwmod_opt_clk debugss_opt_clks[] = {
-	{ .role = "dbg_sysclk", .clk = "dbg_sysclk_ck" },
-	{ .role = "dbg_clka", .clk = "dbg_clka_ck" },
-};
-
 static struct omap_hwmod_class am33xx_debugss_hwmod_class = {
 	.name		= "debugss",
 };
@@ -229,8 +224,6 @@ static struct omap_hwmod am33xx_debugss_hwmod = {
 			.modulemode	= MODULEMODE_SWCTRL,
 		},
 	},
-	.opt_clks	= debugss_opt_clks,
-	.opt_clks_cnt	= ARRAY_SIZE(debugss_opt_clks),
 };
 
 static struct omap_hwmod am33xx_control_hwmod = {
arch/arm/mach-omap2/omap_hwmod_44xx_data.c +0 -87

231 lines not on this page · raw message

arch/arm/mach-omap2/omap_hwmod_54xx_data.c +0 -39
index 8923172..d4ca9ca 100644
@@ -409,10 +409,6 @@ static struct omap_gpio_dev_attr gpio_dev_attr = {
 };
 
 /* gpio1 */
-static struct omap_hwmod_opt_clk gpio1_opt_clks[] = {
-	{ .role = "dbclk", .clk = "gpio1_dbclk" },
-};
-
 static struct omap_hwmod omap54xx_gpio1_hwmod = {
 	.name		= "gpio1",
 	.class		= &omap54xx_gpio_hwmod_class,
@@ -425,8 +421,6 @@ static struct omap_hwmod omap54xx_gpio1_hwmod = {
 			.modulemode   = MODULEMODE_HWCTRL,
 		},
 	},
-	.opt_clks	= gpio1_opt_clks,
-	.opt_clks_cnt	= ARRAY_SIZE(gpio1_opt_clks),
 	.dev_attr	= &gpio_dev_attr,
 };
 
@@ -792,11 +786,6 @@ static struct omap_hwmod_class omap54xx_mcbsp_hwmod_class = {
 };
 
 /* mcbsp1 */
-static struct omap_hwmod_opt_clk mcbsp1_opt_clks[] = {
-	{ .role = "pad_fck", .clk = "pad_clks_ck" },
-	{ .role = "prcm_fck", .clk = "mcbsp1_sync_mux_ck" },
-};
-
 static struct omap_hwmod omap54xx_mcbsp1_hwmod = {
 	.name		= "mcbsp1",
 	.class		= &omap54xx_mcbsp_hwmod_class,
@@ -809,16 +798,9 @@ static struct omap_hwmod omap54xx_mcbsp1_hwmod = {
 			.modulemode   = MODULEMODE_SWCTRL,
 		},
 	},
-	.opt_clks	= mcbsp1_opt_clks,
-	.opt_clks_cnt	= ARRAY_SIZE(mcbsp1_opt_clks),
 };
 
 /* mcbsp2 */
-static struct omap_hwmod_opt_clk mcbsp2_opt_clks[] = {
-	{ .role = "pad_fck", .clk = "pad_clks_ck" },
-	{ .role = "prcm_fck", .clk = "mcbsp2_sync_mux_ck" },
-};
-
 static struct omap_hwmod omap54xx_mcbsp2_hwmod = {
 	.name		= "mcbsp2",
 	.class		= &omap54xx_mcbsp_hwmod_class,
@@ -831,16 +813,9 @@ static struct omap_hwmod omap54xx_mcbsp2_hwmod = {
 			.modulemode   = MODULEMODE_SWCTRL,
 		},
 	},
-	.opt_clks	= mcbsp2_opt_clks,
-	.opt_clks_cnt	= ARRAY_SIZE(mcbsp2_opt_clks),
 };
 
 /* mcbsp3 */
-static struct omap_hwmod_opt_clk mcbsp3_opt_clks[] = {
-	{ .role = "pad_fck", .clk = "pad_clks_ck" },
-	{ .role = "prcm_fck", .clk = "mcbsp3_sync_mux_ck" },
-};
-
 static struct omap_hwmod omap54xx_mcbsp3_hwmod = {
 	.name		= "mcbsp3",
 	.class		= &omap54xx_mcbsp_hwmod_class,
@@ -853,8 +828,6 @@ static struct omap_hwmod omap54xx_mcbsp3_hwmod = {
 			.modulemode   = MODULEMODE_SWCTRL,
 		},
 	},
-	.opt_clks	= mcbsp3_opt_clks,
-	.opt_clks_cnt	= ARRAY_SIZE(mcbsp3_opt_clks),
 };
 
 /*
@@ -1035,10 +1008,6 @@ static struct omap_hwmod_class omap54xx_mmc_hwmod_class = {
 };
 
 /* mmc1 */
-static struct omap_hwmod_opt_clk mmc1_opt_clks[] = {
-	{ .role = "32khz_clk", .clk = "mmc1_32khz_clk" },
-};
-
 /* mmc1 dev_attr */
 static struct omap_mmc_dev_attr mmc1_dev_attr = {
 	.flags	= OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
@@ -1056,8 +1025,6 @@ static struct omap_hwmod omap54xx_mmc1_hwmod = {
 			.modulemode   = MODULEMODE_SWCTRL,
 		},
 	},
-	.opt_clks	= mmc1_opt_clks,
-	.opt_clks_cnt	= ARRAY_SIZE(mmc1_opt_clks),
 	.dev_attr	= &mmc1_dev_attr,
 };
 
@@ -1732,10 +1699,6 @@ static struct omap_hwmod_class omap54xx_usb_otg_ss_hwmod_class = {
 };
 
 /* usb_otg_ss */
-static struct omap_hwmod_opt_clk usb_otg_ss_opt_clks[] = {
-	{ .role = "refclk960m", .clk = "usb_otg_ss_refclk960m" },
-};
-
 static struct omap_hwmod omap54xx_usb_otg_ss_hwmod = {
 	.name		= "usb_otg_ss",
 	.class		= &omap54xx_usb_otg_ss_hwmod_class,
@@ -1749,8 +1712,6 @@ static struct omap_hwmod omap54xx_usb_otg_ss_hwmod = {
 			.modulemode   = MODULEMODE_HWCTRL,
 		},
 	},
-	.opt_clks	= usb_otg_ss_opt_clks,
-	.opt_clks_cnt	= ARRAY_SIZE(usb_otg_ss_opt_clks),
 };
 
 /*
arch/arm/mach-omap2/omap_hwmod_7xx_data.c +0 -55

152 lines not on this page · raw message

Signature · 1 line
1.7.9.5