]> git.karo-electronics.de Git - mv-sheeva.git/commit
OMAP3: clock: clarify usage of struct clksel_rate.flags and struct omap_clk.cpu
authorPaul Walmsley <paul@pwsan.com>
Wed, 22 Dec 2010 04:08:14 +0000 (21:08 -0700)
committerPaul Walmsley <paul@pwsan.com>
Wed, 22 Dec 2010 04:08:14 +0000 (21:08 -0700)
commit553d239aadc75bee70c7858ac4548d073cb3daff
treebf48a02f36751c00b17cbb4f1b40e2bb4cfd4ec9
parentd4521f6731756c82a76d3e791c3ec2d28b38f97e
OMAP3: clock: clarify usage of struct clksel_rate.flags and struct omap_clk.cpu

Clarify the usage of the struct omap_clk.cpu flags (e.g., CK_*) to use
bits only for individual SoC variants (e.g., CK_3430ES1, CK_3505,
etc.).  Superset flags, such as CK_3XXX or CK_AM35XX, are now defined
as disjunctions of individual SoC variant flags.  This simplifies the
definition and use of these flags.  struct omap_clk record definitions
can now simply specify the bitmask of actual SoCs that the records are
valid for.  The clock init code can simply set a single CPU type mask
bit for the SoC that is currently in use, and test against that,
rather than needing to set some combination of flags.

Similarly, clarify the use of struct clksel_rate.flags.  The bit
allocated for RATE_IN_3XXX has been reassigned, and RATE_IN_3XXX has
been defined as a disjunction of the 34xx and 36xx rate flags.  The
advantages are the same as the above.

Clarify the usage of struct omap_clk.cpu flags such as CK_34XX to only
apply to the SoCs that they name, e.g., OMAP34xx chips.  The previous
practice caused significantly different SoCs, such as OMAP36xx, to be
included in CK_34XX.  In my opinion, this is much more intuitive.

Similarly, clarify the use of struct clksel_rate.flags, such that
RATE_IN_3430ES2PLUS now only applies to 34xx chips with ES level >= 2
- it does not apply to OMAP36xx.

...

At some point, it probably makes sense to collapse the CK_* and
RATE_IN_* flags together into a single bitfield, and possibly use the
existing CHIP_IS_OMAP* flags for platform detection.

...

This all seems to work fine on OMAP34xx and OMAP36xx Beagle.  Not sure
if it works on Sitara or the TI816X, unfortunately I don't have any
here to test with.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
arch/arm/mach-omap2/clock3xxx_data.c
arch/arm/plat-omap/include/plat/clkdev_omap.h
arch/arm/plat-omap/include/plat/clock.h