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>
This commit is contained in:

committed by
John Crispin

parent
17ded0a89b
commit
4460764599
@@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user