Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 344149
b: refs/heads/master
c: 4460764
h: refs/heads/master
i:
  344147: f3300ec
v: v3
  • Loading branch information
Kelvin Cheung authored and John Crispin committed Nov 9, 2012
1 parent e984b0f commit 79f01b7
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 17ded0a89b3b0b6ac626d58d469ef899f21e2d42
refs/heads/master: 446076459974ce00f02ce4954c2622fc70cb7597
2 changes: 1 addition & 1 deletion trunk/arch/mips/include/asm/mach-loongson1/platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ extern struct platform_device ls1x_ehci_device;
extern struct platform_device ls1x_rtc_device;

extern void __init ls1x_clk_init(void);
void ls1x_serial_setup(void);
extern void __init ls1x_serial_setup(struct platform_device *pdev);

#endif /* __ASM_MACH_LOONGSON1_PLATFORM_H */
9 changes: 5 additions & 4 deletions trunk/arch/mips/loongson1/common/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
5 changes: 1 addition & 4 deletions trunk/arch/mips/loongson1/ls1b/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@

#include <platform.h>

#include <linux/serial_8250.h>
#include <loongson1.h>

static struct platform_device *ls1b_platform_devices[] __initdata = {
&ls1x_uart_device,
&ls1x_eth0_device,
Expand All @@ -23,7 +20,7 @@ static int __init ls1b_platform_init(void)
{
int err;

ls1x_serial_setup();
ls1x_serial_setup(&ls1x_uart_device);

err = platform_add_devices(ls1b_platform_devices,
ARRAY_SIZE(ls1b_platform_devices));
Expand Down

0 comments on commit 79f01b7

Please sign in to comment.