
30 Mar
2010
30 Mar
'10
10:59 p.m.
Hi Wolfgang,
You might want to define a macro to reduce the amount of repeated code here.
Will do in v2.
+void lpsc_control(unsigned int id, int state) +{
- __lpsc_control(1, -1, id, state);
+}
+int lpsc_status(unsigned int id) +{
- return psc_reg_read(PSC_MDSTAT(id)) & 0x1f;
+}
+void clk_enable(unsigned int id) +{
- lpsc_control(id, PSC_MDCTL_NEXT_ENABLE);
+}
+void clk_disable(unsigned int id) +{
- lpsc_control(id, PSC_MDCTL_NEXT_DISABLE);
+}
These should probably be inlined ?
Are you referring to lpsc_control(), or to clk_enable/clk_disable? The former can be eliminated, I think. The latter are used elsewhere. Are you recommending that I inline and move to a header?
Regards Cyril.