diff options
| -rw-r--r-- | arch/mips/include/asm/mach-loongson1/platform.h | 2 | ||||
| -rw-r--r-- | arch/mips/loongson1/common/platform.c | 9 | ||||
| -rw-r--r-- | arch/mips/loongson1/ls1b/board.c | 5 |
3 files changed, 7 insertions, 9 deletions
diff --git a/arch/mips/include/asm/mach-loongson1/platform.h b/arch/mips/include/asm/mach-loongson1/platform.h index f584017eb8a..718a1228a4f 100644 --- a/arch/mips/include/asm/mach-loongson1/platform.h +++ b/arch/mips/include/asm/mach-loongson1/platform.h | |||
| @@ -19,6 +19,6 @@ extern struct platform_device ls1x_ehci_device; | |||
| 19 | extern struct platform_device ls1x_rtc_device; | 19 | extern struct platform_device ls1x_rtc_device; |
| 20 | 20 | ||
| 21 | extern void __init ls1x_clk_init(void); | 21 | extern void __init ls1x_clk_init(void); |
| 22 | void ls1x_serial_setup(void); | 22 | extern void __init ls1x_serial_setup(struct platform_device *pdev); |
| 23 | 23 | ||
| 24 | #endif /* __ASM_MACH_LOONGSON1_PLATFORM_H */ | 24 | #endif /* __ASM_MACH_LOONGSON1_PLATFORM_H */ |
diff --git a/arch/mips/loongson1/common/platform.c b/arch/mips/loongson1/common/platform.c index e92d59c4bd7..5ca38dc7708 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 = { | |||
| 42 | }, | 42 | }, |
| 43 | }; | 43 | }; |
| 44 | 44 | ||
| 45 | void __init ls1x_serial_setup(void) | 45 | void __init ls1x_serial_setup(struct platform_device *pdev) |
| 46 | { | 46 | { |
| 47 | struct clk *clk; | 47 | struct clk *clk; |
| 48 | struct plat_serial8250_port *p; | 48 | struct plat_serial8250_port *p; |
| 49 | 49 | ||
| 50 | clk = clk_get(NULL, "dc"); | 50 | clk = clk_get(NULL, pdev->name); |
| 51 | if (IS_ERR(clk)) | 51 | if (IS_ERR(clk)) |
| 52 | panic("unable to get dc clock, err=%ld", PTR_ERR(clk)); | 52 | panic("unable to get %s clock, err=%ld", |
| 53 | pdev->name, PTR_ERR(clk)); | ||
| 53 | 54 | ||
| 54 | for (p = ls1x_serial8250_port; p->flags != 0; ++p) | 55 | for (p = pdev->dev.platform_data; p->flags != 0; ++p) |
| 55 | p->uartclk = clk_get_rate(clk); | 56 | p->uartclk = clk_get_rate(clk); |
| 56 | } | 57 | } |
| 57 | 58 | ||
diff --git a/arch/mips/loongson1/ls1b/board.c b/arch/mips/loongson1/ls1b/board.c index 295b1be893e..1fbd5264f66 100644 --- a/arch/mips/loongson1/ls1b/board.c +++ b/arch/mips/loongson1/ls1b/board.c | |||
| @@ -9,9 +9,6 @@ | |||
| 9 | 9 | ||
| 10 | #include <platform.h> | 10 | #include <platform.h> |
| 11 | 11 | ||
| 12 | #include <linux/serial_8250.h> | ||
| 13 | #include <loongson1.h> | ||
| 14 | |||
| 15 | static struct platform_device *ls1b_platform_devices[] __initdata = { | 12 | static struct platform_device *ls1b_platform_devices[] __initdata = { |
| 16 | &ls1x_uart_device, | 13 | &ls1x_uart_device, |
| 17 | &ls1x_eth0_device, | 14 | &ls1x_eth0_device, |
| @@ -23,7 +20,7 @@ static int __init ls1b_platform_init(void) | |||
| 23 | { | 20 | { |
| 24 | int err; | 21 | int err; |
| 25 | 22 | ||
| 26 | ls1x_serial_setup(); | 23 | ls1x_serial_setup(&ls1x_uart_device); |
| 27 | 24 | ||
| 28 | err = platform_add_devices(ls1b_platform_devices, | 25 | err = platform_add_devices(ls1b_platform_devices, |
| 29 | ARRAY_SIZE(ls1b_platform_devices)); | 26 | ARRAY_SIZE(ls1b_platform_devices)); |
