|
@@ -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,
|