diff options
author | Ben Dooks <ben-linux@fluff.org> | 2008-10-31 16:14:36 +0000 |
---|---|---|
committer | Ben Dooks <ben-linux@fluff.org> | 2008-12-15 23:36:29 +0000 |
commit | 3627379fc6b3e2b531b371af97d8ce0040fc3646 (patch) | |
tree | 7c48c02e4973fa6c1e521c62343fa397ff6c2824 /arch/arm/plat-s3c64xx/clock.c | |
parent | 1451325ced5f9b1a3e5da07521deb049e32cb15a (diff) | |
download | talos-op-linux-3627379fc6b3e2b531b371af97d8ce0040fc3646.tar.gz talos-op-linux-3627379fc6b3e2b531b371af97d8ce0040fc3646.zip |
[ARM] S3C6XX: Add enable for clk_48
Add apropriate enable call for clk_48m.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'arch/arm/plat-s3c64xx/clock.c')
-rw-r--r-- | arch/arm/plat-s3c64xx/clock.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/arch/arm/plat-s3c64xx/clock.c b/arch/arm/plat-s3c64xx/clock.c index 2d2e83a036c4..523da0cb55c5 100644 --- a/arch/arm/plat-s3c64xx/clock.c +++ b/arch/arm/plat-s3c64xx/clock.c @@ -22,6 +22,7 @@ #include <mach/hardware.h> #include <mach/map.h> +#include <plat/regs-sys.h> #include <plat/regs-clock.h> #include <plat/cpu.h> #include <plat/devs.h> @@ -33,10 +34,31 @@ struct clk clk_27m = { .rate = 27000000, }; +static int clk_48m_ctrl(struct clk *clk, int enable) +{ + unsigned long flags; + u32 val; + + /* can't rely on clock lock, this register has other usages */ + local_irq_save(flags); + + val = __raw_readl(S3C64XX_OTHERS); + if (enable) + val |= S3C64XX_OTHERS_USBMASK; + else + val &= ~S3C64XX_OTHERS_USBMASK; + + __raw_writel(val, S3C64XX_OTHERS); + local_irq_restore(flags); + + return 0; +} + struct clk clk_48m = { .name = "clk_48m", .id = -1, .rate = 48000000, + .enable = clk_48m_ctrl, }; static int inline s3c64xx_gate(void __iomem *reg, |