提交 513846f8 编写于 作者: B Ben Dooks 提交者: Russell King

[ARM] 3637/1: S3C24XX: Add mpll clock, and set as fclk parent

Patch from Ben Dooks

Update the clocks with the MPLL clock, and
use it as the parent. Also export these to
the rest of arch/arm/mach-s3c2410
Signed-off-by: NBen Dooks <ben-linux@fluff.org>
Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
上级 3434d9d9
...@@ -213,7 +213,7 @@ EXPORT_SYMBOL(clk_set_parent); ...@@ -213,7 +213,7 @@ EXPORT_SYMBOL(clk_set_parent);
/* base clocks */ /* base clocks */
static struct clk clk_xtal = { struct clk clk_xtal = {
.name = "xtal", .name = "xtal",
.id = -1, .id = -1,
.rate = 0, .rate = 0,
...@@ -221,6 +221,11 @@ static struct clk clk_xtal = { ...@@ -221,6 +221,11 @@ static struct clk clk_xtal = {
.ctrlbit = 0, .ctrlbit = 0,
}; };
struct clk clk_mpll = {
.name = "mpll",
.id = -1,
};
struct clk clk_upll = { struct clk clk_upll = {
.name = "upll", .name = "upll",
.id = -1, .id = -1,
...@@ -232,7 +237,7 @@ struct clk clk_f = { ...@@ -232,7 +237,7 @@ struct clk clk_f = {
.name = "fclk", .name = "fclk",
.id = -1, .id = -1,
.rate = 0, .rate = 0,
.parent = NULL, .parent = &clk_mpll,
.ctrlbit = 0, .ctrlbit = 0,
}; };
...@@ -413,6 +418,7 @@ int __init s3c24xx_setup_clocks(unsigned long xtal, ...@@ -413,6 +418,7 @@ int __init s3c24xx_setup_clocks(unsigned long xtal,
clk_xtal.rate = xtal; clk_xtal.rate = xtal;
clk_upll.rate = s3c2410_get_pll(__raw_readl(S3C2410_UPLLCON), xtal); clk_upll.rate = s3c2410_get_pll(__raw_readl(S3C2410_UPLLCON), xtal);
clk_mpll.rate = fclk;
clk_h.rate = hclk; clk_h.rate = hclk;
clk_p.rate = pclk; clk_p.rate = pclk;
clk_f.rate = fclk; clk_f.rate = fclk;
...@@ -424,6 +430,9 @@ int __init s3c24xx_setup_clocks(unsigned long xtal, ...@@ -424,6 +430,9 @@ int __init s3c24xx_setup_clocks(unsigned long xtal,
if (s3c24xx_register_clock(&clk_xtal) < 0) if (s3c24xx_register_clock(&clk_xtal) < 0)
printk(KERN_ERR "failed to register master xtal\n"); printk(KERN_ERR "failed to register master xtal\n");
if (s3c24xx_register_clock(&clk_mpll) < 0)
printk(KERN_ERR "failed to register mpll clock\n");
if (s3c24xx_register_clock(&clk_upll) < 0) if (s3c24xx_register_clock(&clk_upll) < 0)
printk(KERN_ERR "failed to register upll clock\n"); printk(KERN_ERR "failed to register upll clock\n");
......
...@@ -42,7 +42,9 @@ extern struct clk clk_usb_bus; ...@@ -42,7 +42,9 @@ extern struct clk clk_usb_bus;
extern struct clk clk_f; extern struct clk clk_f;
extern struct clk clk_h; extern struct clk clk_h;
extern struct clk clk_p; extern struct clk clk_p;
extern struct clk clk_mpll;
extern struct clk clk_upll; extern struct clk clk_upll;
extern struct clk clk_xtal;
/* exports for arch/arm/mach-s3c2410 /* exports for arch/arm/mach-s3c2410
* *
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册