aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/loongson1/common
diff options
context:
space:
mode:
authorKelvin Cheung <keguang.zhang@gmail.com>2012-10-23 05:17:01 +0000
committerJohn Crispin <blogic@openwrt.org>2012-11-09 11:37:20 +0100
commit446076459974ce00f02ce4954c2622fc70cb7597 (patch)
tree4d1a9c694030f82fdb3e153b642ebe28ce70456f /arch/mips/loongson1/common
parentMIPS: Loongson1B: use common clock infrastructure instead of private APIs (diff)
downloadlinux-dev-446076459974ce00f02ce4954c2622fc70cb7597.tar.xz
linux-dev-446076459974ce00f02ce4954c2622fc70cb7597.zip
MIPS: Loongson1B: improve ls1x_serial_setup()
Improve ls1x_serial_setup(). Signed-off-by: Kelvin Cheung <keguang.zhang@gmail.com> Patchwork: http://patchwork.linux-mips.org/patch/4432 Signed-off-by: John Crispin <blogic@openwrt.org>
Diffstat (limited to 'arch/mips/loongson1/common')
-rw-r--r--arch/mips/loongson1/common/platform.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/mips/loongson1/common/platform.c b/arch/mips/loongson1/common/platform.c
index e92d59c4bd78..5ca38dc77080 100644
--- a/arch/mips/loongson1/common/platform.c
+++ b/arch/mips/loongson1/common/platform.c
@@ -42,16 +42,17 @@ struct platform_device ls1x_uart_device = {
},
};
-void __init ls1x_serial_setup(void)
+void __init ls1x_serial_setup(struct platform_device *pdev)
{
struct clk *clk;
struct plat_serial8250_port *p;
- clk = clk_get(NULL, "dc");
+ clk = clk_get(NULL, pdev->name);
if (IS_ERR(clk))
- panic("unable to get dc clock, err=%ld", PTR_ERR(clk));
+ panic("unable to get %s clock, err=%ld",
+ pdev->name, PTR_ERR(clk));
- for (p = ls1x_serial8250_port; p->flags != 0; ++p)
+ for (p = pdev->dev.platform_data; p->flags != 0; ++p)
p->uartclk = clk_get_rate(clk);
}