Fix struct clk

Registered by Grant Likely

Every ARM sub-arch has a different, incompatible struct clk implementation. This session is to hammer out how to solve the mess

Blueprint information

Status:
Complete
Approver:
Paul McKenney
Priority:
Undefined
Drafter:
None
Direction:
Needs approval
Assignee:
tglx
Definition:
Obsolete
Series goal:
None
Implementation:
Unknown
Milestone target:
None
Completed by
Mounir Bsaibes

Related branches

Sprints

Whiteboard

Decisions from May 10 meeting at LDS.
1. Move parent handling to core clock code.
2. Driver/clock interface will need to change.
3. DVFS and QoS should be separate components, clock should handle only clock.
4. Use opaque struct clk.
5. Locking is in core code, where it is isolated to allow it to be changed easily.
6. Use per-tree spinlock/mutex combination as starting point.
6a. Clock enable/disable acquires only the spinlock.
6b. Prepare/unprepare acquires only the mutex.
6c. Setrate/setparent acquires the mutex first, then the spinlock following successful validation/preparation.

(?)

Work Items

Work items:
[tglx] Send out updated struct clk patches. TODO: TODO
[jk-ozlabs] Send out updated struct clk patches: DONE
[s-hauer] Apply struct clk patches to i.MX51, i.MX53, and i.MX27: TODO
[shawnguo] Apply struct clk patches to i.MX23 and i.MX28: TODO
[paul-pwsan] Apply struct clk patches to OMAP: TODO
[triad] Apply struct clk patches to ST-Ericsson target: TODO
[thomas-ab] Apply struct clk patches to Samsung target: TODO
[olof] Apply struct clk patches to Tegra (with help from Steven Warren): TODO
Apply struct clk patches to mobile ARM/SuperH (Magnus Damm and Paul Mundt): TODO
[benh-kernel] Apply struct clk patches to PowerPC: TODO
[broonie] Create PMIC hostile-clock version to stress the implementation: TODO