ARM: AM335X: Split hwmod data accessible only on GP devices
[sitara-epos/sitara-epos-kernel.git] / arch / arm / mach-omap2 / omap_hwmod_33xx_data.c
index 2f9982cc32ca3aab51308cc5bca492e617198741..a78ddb4358be09f3e68fed9efd5ea2c5bc4d3d99 100644 (file)
@@ -3463,6 +3463,9 @@ static struct omap_hwmod am33xx_pruss_hwmod = {
        .rst_lines_cnt  = ARRAY_SIZE(am33xx_pruss_resets),
 };
 
+/**
+ * HWMOD data for devices accessible across GP and HS/EMU devices.
+ */
 static __initdata struct omap_hwmod *am33xx_hwmods[] = {
        /* l3 class */
        &am33xx_l3_instr_hwmod,
@@ -3553,7 +3556,6 @@ static __initdata struct omap_hwmod *am33xx_hwmods[] = {
        &am33xx_uart5_hwmod,
        &am33xx_uart6_hwmod,
        /* timer class */
-       &am33xx_timer0_hwmod,
        &am33xx_timer1_hwmod,
        &am33xx_timer2_hwmod,
        &am33xx_timer3_hwmod,
@@ -3586,7 +3588,22 @@ static __initdata struct omap_hwmod *am33xx_hwmods[] = {
        NULL,
 };
 
+
+/**
+ * HWMOD data for devices common accessible only on GP devices.
+ */
+static __initdata struct omap_hwmod *am33xx_hwmods_gp[] = {
+       /* timer class */
+       &am33xx_timer0_hwmod,
+       NULL,
+};
+
 int __init am33xx_hwmod_init(void)
 {
-       return omap_hwmod_register(am33xx_hwmods);
+       int ret = omap_hwmod_register(am33xx_hwmods);
+
+       if (!ret && (OMAP2_DEVICE_TYPE_GP == omap_type()))
+               ret = omap_hwmod_register(am33xx_hwmods_gp);
+
+       return ret;
 }