ARM: OMAP2+: dmtimer: convert to platform devices
Add routines to converts dmtimers to platform devices. The device data is obtained from hwmod database of respective platform and is registered to device model after successful binding to driver. In addition, capability attribute of each of the timers is added in hwmod database. Signed-off-by: Tarun Kanti DebBarma <tarun.kanti@ti.com> Signed-off-by: Thara Gopinath <thara@ti.com> Reviewed-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Acked-by: Cousson, Benoit <b-cousson@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
This commit is contained in:
committed by
Tony Lindgren
parent
97933d6ced
commit
c345c8b09d
@@ -343,6 +343,16 @@ static struct omap_hwmod omap2430_iva_hwmod = {
|
||||
.masters_cnt = ARRAY_SIZE(omap2430_iva_masters),
|
||||
};
|
||||
|
||||
/* always-on timers dev attribute */
|
||||
static struct omap_timer_capability_dev_attr capability_alwon_dev_attr = {
|
||||
.timer_capability = OMAP_TIMER_ALWON,
|
||||
};
|
||||
|
||||
/* pwm timers dev attribute */
|
||||
static struct omap_timer_capability_dev_attr capability_pwm_dev_attr = {
|
||||
.timer_capability = OMAP_TIMER_HAS_PWM,
|
||||
};
|
||||
|
||||
/* timer1 */
|
||||
static struct omap_hwmod omap2430_timer1_hwmod;
|
||||
|
||||
@@ -383,6 +393,7 @@ static struct omap_hwmod omap2430_timer1_hwmod = {
|
||||
.idlest_idle_bit = OMAP24XX_ST_GPT1_SHIFT,
|
||||
},
|
||||
},
|
||||
.dev_attr = &capability_alwon_dev_attr,
|
||||
.slaves = omap2430_timer1_slaves,
|
||||
.slaves_cnt = ARRAY_SIZE(omap2430_timer1_slaves),
|
||||
.class = &omap2xxx_timer_hwmod_class,
|
||||
@@ -419,6 +430,7 @@ static struct omap_hwmod omap2430_timer2_hwmod = {
|
||||
.idlest_idle_bit = OMAP24XX_ST_GPT2_SHIFT,
|
||||
},
|
||||
},
|
||||
.dev_attr = &capability_alwon_dev_attr,
|
||||
.slaves = omap2430_timer2_slaves,
|
||||
.slaves_cnt = ARRAY_SIZE(omap2430_timer2_slaves),
|
||||
.class = &omap2xxx_timer_hwmod_class,
|
||||
@@ -455,6 +467,7 @@ static struct omap_hwmod omap2430_timer3_hwmod = {
|
||||
.idlest_idle_bit = OMAP24XX_ST_GPT3_SHIFT,
|
||||
},
|
||||
},
|
||||
.dev_attr = &capability_alwon_dev_attr,
|
||||
.slaves = omap2430_timer3_slaves,
|
||||
.slaves_cnt = ARRAY_SIZE(omap2430_timer3_slaves),
|
||||
.class = &omap2xxx_timer_hwmod_class,
|
||||
@@ -491,6 +504,7 @@ static struct omap_hwmod omap2430_timer4_hwmod = {
|
||||
.idlest_idle_bit = OMAP24XX_ST_GPT4_SHIFT,
|
||||
},
|
||||
},
|
||||
.dev_attr = &capability_alwon_dev_attr,
|
||||
.slaves = omap2430_timer4_slaves,
|
||||
.slaves_cnt = ARRAY_SIZE(omap2430_timer4_slaves),
|
||||
.class = &omap2xxx_timer_hwmod_class,
|
||||
@@ -527,6 +541,7 @@ static struct omap_hwmod omap2430_timer5_hwmod = {
|
||||
.idlest_idle_bit = OMAP24XX_ST_GPT5_SHIFT,
|
||||
},
|
||||
},
|
||||
.dev_attr = &capability_alwon_dev_attr,
|
||||
.slaves = omap2430_timer5_slaves,
|
||||
.slaves_cnt = ARRAY_SIZE(omap2430_timer5_slaves),
|
||||
.class = &omap2xxx_timer_hwmod_class,
|
||||
@@ -563,6 +578,7 @@ static struct omap_hwmod omap2430_timer6_hwmod = {
|
||||
.idlest_idle_bit = OMAP24XX_ST_GPT6_SHIFT,
|
||||
},
|
||||
},
|
||||
.dev_attr = &capability_alwon_dev_attr,
|
||||
.slaves = omap2430_timer6_slaves,
|
||||
.slaves_cnt = ARRAY_SIZE(omap2430_timer6_slaves),
|
||||
.class = &omap2xxx_timer_hwmod_class,
|
||||
@@ -599,6 +615,7 @@ static struct omap_hwmod omap2430_timer7_hwmod = {
|
||||
.idlest_idle_bit = OMAP24XX_ST_GPT7_SHIFT,
|
||||
},
|
||||
},
|
||||
.dev_attr = &capability_alwon_dev_attr,
|
||||
.slaves = omap2430_timer7_slaves,
|
||||
.slaves_cnt = ARRAY_SIZE(omap2430_timer7_slaves),
|
||||
.class = &omap2xxx_timer_hwmod_class,
|
||||
@@ -635,6 +652,7 @@ static struct omap_hwmod omap2430_timer8_hwmod = {
|
||||
.idlest_idle_bit = OMAP24XX_ST_GPT8_SHIFT,
|
||||
},
|
||||
},
|
||||
.dev_attr = &capability_alwon_dev_attr,
|
||||
.slaves = omap2430_timer8_slaves,
|
||||
.slaves_cnt = ARRAY_SIZE(omap2430_timer8_slaves),
|
||||
.class = &omap2xxx_timer_hwmod_class,
|
||||
@@ -671,6 +689,7 @@ static struct omap_hwmod omap2430_timer9_hwmod = {
|
||||
.idlest_idle_bit = OMAP24XX_ST_GPT9_SHIFT,
|
||||
},
|
||||
},
|
||||
.dev_attr = &capability_pwm_dev_attr,
|
||||
.slaves = omap2430_timer9_slaves,
|
||||
.slaves_cnt = ARRAY_SIZE(omap2430_timer9_slaves),
|
||||
.class = &omap2xxx_timer_hwmod_class,
|
||||
@@ -707,6 +726,7 @@ static struct omap_hwmod omap2430_timer10_hwmod = {
|
||||
.idlest_idle_bit = OMAP24XX_ST_GPT10_SHIFT,
|
||||
},
|
||||
},
|
||||
.dev_attr = &capability_pwm_dev_attr,
|
||||
.slaves = omap2430_timer10_slaves,
|
||||
.slaves_cnt = ARRAY_SIZE(omap2430_timer10_slaves),
|
||||
.class = &omap2xxx_timer_hwmod_class,
|
||||
@@ -743,6 +763,7 @@ static struct omap_hwmod omap2430_timer11_hwmod = {
|
||||
.idlest_idle_bit = OMAP24XX_ST_GPT11_SHIFT,
|
||||
},
|
||||
},
|
||||
.dev_attr = &capability_pwm_dev_attr,
|
||||
.slaves = omap2430_timer11_slaves,
|
||||
.slaves_cnt = ARRAY_SIZE(omap2430_timer11_slaves),
|
||||
.class = &omap2xxx_timer_hwmod_class,
|
||||
@@ -779,6 +800,7 @@ static struct omap_hwmod omap2430_timer12_hwmod = {
|
||||
.idlest_idle_bit = OMAP24XX_ST_GPT12_SHIFT,
|
||||
},
|
||||
},
|
||||
.dev_attr = &capability_pwm_dev_attr,
|
||||
.slaves = omap2430_timer12_slaves,
|
||||
.slaves_cnt = ARRAY_SIZE(omap2430_timer12_slaves),
|
||||
.class = &omap2xxx_timer_hwmod_class,
|
||||
|
Reference in New Issue
Block a user