Skip to content

Commit 22d20cb

Browse files
sumanannaPaul Walmsley
authored andcommitted
ARM: DRA7: hwmod: Add data for GPTimer 12
Add the hwmod data for GPTimer 12. GPTimer 12 is present in WKUPAON power domain and is clocked from a secure 32K clock. GPTimer 12 serves as a secure timer on HS devices, but is available for kernel on regular GP devices. The hwmod link is registered only on GP devices. The hwmod data also reused the existing timer class instead of reintroducing the identical dra7xx_timer_secure_sysc class which was dropped in commit edec178 ("ARM: DRA7: hwmod: Fix the hwmod class for GPTimer4"). Cc: Paul Walmsley <[email protected]> Signed-off-by: Suman Anna <[email protected]> Signed-off-by: Paul Walmsley <[email protected]>
1 parent b5a553c commit 22d20cb

File tree

1 file changed

+34
-2
lines changed

1 file changed

+34
-2
lines changed

arch/arm/mach-omap2/omap_hwmod_7xx_data.c

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2285,6 +2285,20 @@ static struct omap_hwmod dra7xx_timer11_hwmod = {
22852285
},
22862286
};
22872287

2288+
/* timer12 */
2289+
static struct omap_hwmod dra7xx_timer12_hwmod = {
2290+
.name = "timer12",
2291+
.class = &dra7xx_timer_hwmod_class,
2292+
.clkdm_name = "wkupaon_clkdm",
2293+
.main_clk = "secure_32k_clk_src_ck",
2294+
.prcm = {
2295+
.omap4 = {
2296+
.clkctrl_offs = DRA7XX_CM_WKUPAON_TIMER12_CLKCTRL_OFFSET,
2297+
.context_offs = DRA7XX_RM_WKUPAON_TIMER12_CONTEXT_OFFSET,
2298+
},
2299+
},
2300+
};
2301+
22882302
/* timer13 */
22892303
static struct omap_hwmod dra7xx_timer13_hwmod = {
22902304
.name = "timer13",
@@ -3573,6 +3587,14 @@ static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer11 = {
35733587
.user = OCP_USER_MPU | OCP_USER_SDMA,
35743588
};
35753589

3590+
/* l4_wkup -> timer12 */
3591+
static struct omap_hwmod_ocp_if dra7xx_l4_wkup__timer12 = {
3592+
.master = &dra7xx_l4_wkup_hwmod,
3593+
.slave = &dra7xx_timer12_hwmod,
3594+
.clk = "wkupaon_iclk_mux",
3595+
.user = OCP_USER_MPU | OCP_USER_SDMA,
3596+
};
3597+
35763598
/* l4_per3 -> timer13 */
35773599
static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer13 = {
35783600
.master = &dra7xx_l4_per3_hwmod,
@@ -3908,6 +3930,13 @@ static struct omap_hwmod_ocp_if *dra7xx_hwmod_ocp_ifs[] __initdata = {
39083930
NULL,
39093931
};
39103932

3933+
/* GP-only hwmod links */
3934+
static struct omap_hwmod_ocp_if *dra7xx_gp_hwmod_ocp_ifs[] __initdata = {
3935+
&dra7xx_l4_wkup__timer12,
3936+
NULL,
3937+
};
3938+
3939+
/* SoC variant specific hwmod links */
39113940
static struct omap_hwmod_ocp_if *dra74x_hwmod_ocp_ifs[] __initdata = {
39123941
&dra7xx_l4_per3__usb_otg_ss4,
39133942
NULL,
@@ -3925,9 +3954,12 @@ int __init dra7xx_hwmod_init(void)
39253954
ret = omap_hwmod_register_links(dra7xx_hwmod_ocp_ifs);
39263955

39273956
if (!ret && soc_is_dra74x())
3928-
return omap_hwmod_register_links(dra74x_hwmod_ocp_ifs);
3957+
ret = omap_hwmod_register_links(dra74x_hwmod_ocp_ifs);
39293958
else if (!ret && soc_is_dra72x())
3930-
return omap_hwmod_register_links(dra72x_hwmod_ocp_ifs);
3959+
ret = omap_hwmod_register_links(dra72x_hwmod_ocp_ifs);
3960+
3961+
if (!ret && omap_type() == OMAP2_DEVICE_TYPE_GP)
3962+
ret = omap_hwmod_register_links(dra7xx_gp_hwmod_ocp_ifs);
39313963

39323964
return ret;
39333965
}

0 commit comments

Comments
 (0)