Commit Graph

961 Commits

Author SHA1 Message Date
Ben Dooks 9745626b65 ARM: SAMSUNG: Move pwm-clock code into plat-samsung
Move the code for the pwm-clock into plat-samsung, as it is common to
all Samsung SoCs.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-15 17:10:12 +09:00
Kukjin Kim ed276849bc ARM: SAMSUNG: Make clk_default_setrate and clk_ops_def_setrate visible
This patch makes clk_default_setrate and clk_ops_def_setrate available
to code outside plat-samsung clock code.

Signed-off-by: Thomas Abraham <thomas.ab@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-15 17:10:12 +09:00
Ben Dooks 14235696d4 ARM: SAMSUNG: Do not register set_parent call if no source
If there is no source register defined, do not register a clksrc
clock with a valid .set_parent in the ops.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-15 17:10:11 +09:00
Ben Dooks 1d9f13c49e ARM: SAMSUNG: Add call to register array of clocks
Add s3c_register_clocks() to register an array of clocks, printing
an error message if there is a problem. Replace all points in the code
where this could be used.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-15 17:10:11 +09:00
Ben Dooks fb6e76cd23 ARM: SAMSUNG: Do not allow get/set/round rate calls with no divider
If the reg_div field is not set, then do not register clk_ops with the
get/set/round rate calls as these will fail to work.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-15 17:10:11 +09:00
Ben Dooks 2c2f69b15d ARM: SAMSUNG: Move clock.c to arch/arm/plat-samsung
This is the core implementation of the clock code for all Samsung based
SoCs, so move it to arch/arm/plat-samsung (the clock.h file has already
been moved).

Since the file is built for every Samsung SoC, no changes are needed to the
Kconfig system.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-15 17:10:11 +09:00
Ben Dooks 682e2b7d45 ARM: S3C64XX: Avoid announcing clksrc clocks twice
The new code calls the clock setup code on registration which
can be before the clock system has been fully initialised. The
following code re-does this setup at the end of the clock
registration and thus we get two printings.

Update the calls to only print on the last pass or when doing
the necessary resume work.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-15 17:10:10 +09:00
Ben Dooks b3bf41be06 ARM: SAMSUNG: Reduce size of struct clk.
Reduce the size of struct clk by 12 bytes and make defining clocks with
common implementation functions easier by moving the set_rate, get_rate,
round_rate and set_parent calls into a new structure called 'struct clk_ops'
and using that instead.

This change does make a few clocks larger as they need their own clk_ops,
but this is outweighed by the number of clocks with either no ops or having
a common set of ops.

Update all the users of this.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-15 17:10:10 +09:00
Harald Welte aa9ad6ad9c ARM: SAMSUNG: Add core clock implementation for clksrc based clocks
Add a core for the clksrc clock implementation, which is found in many of
the newer Samsung SoCs into plat-samsung.

Signed-off-by: Harald Welte <laforge@gnumonks.org>
[ben-linux@fluff.org: split from original patch to make change smaller]
[ben-linux@fluff.org: split clk and clksrc changes]
[ben-linux@fluff.org: moved to plat-samsung from plat-s3c]
[ben-linux@fluff.org: re-wrote headers after splits]
[ben-linux@fluff.org: added better documentation to headers]
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-15 17:10:09 +09:00
Ben Dooks 70792bcfad ARM: SAMSUNG: Move <plat/clock.h> to plat-samsung
Move the <plat/clock.h> header to plat-samsung where it can be used by all
the platforms, and readies it for the next round of clock updates where
the clock code will be amalgamated.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2010-01-15 17:10:08 +09:00
Ben Dooks cf38367824 ARM: SAMSUNG: Add plat-samsung as starting point for plat-s3c* moves
We inted to re-organise the plat-s3c/plat-s3c24xx/plat-s3c64xx into a
more generic plat-samsung with less code in the other plat- directories
to make it easier to port new devices and try and clear up some of the
naming issues with newer devices.

Start by creating a small arch/arm/plat-samsung with no actuall code in
so we can move items in as we process them.

Add this to arch/arm to allow it to build things once support is added.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2009-12-01 01:28:37 +00:00