Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 375140
b: refs/heads/master
c: 6ac8579
h: refs/heads/master
v: v3
  • Loading branch information
John Crispin authored and Ralf Baechle committed May 7, 2013
1 parent b3dff12 commit 16688af
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bb19fea238daead66ab3630ad09fba50aa563048
refs/heads/master: 6ac8579b96e3bc3581c3a42b326647594e5bbb03
12 changes: 12 additions & 0 deletions trunk/arch/mips/ralink/rt305x.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ struct ralink_pinmux gpio_pinmux = {
void __init ralink_clk_init(void)
{
unsigned long cpu_rate, sys_rate, wdt_rate, uart_rate;
unsigned long wmac_rate = 40000000;

u32 t = rt_sysc_r32(SYSC_REG_SYSTEM_CONFIG);

if (soc_is_rt305x() || soc_is_rt3350()) {
Expand Down Expand Up @@ -176,11 +178,21 @@ void __init ralink_clk_init(void)
BUG();
}

if (soc_is_rt3352() || soc_is_rt5350()) {
u32 val = rt_sysc_r32(RT3352_SYSC_REG_SYSCFG0);

if (!(val & RT3352_CLKCFG0_XTAL_SEL))
wmac_rate = 20000000;
}

ralink_clk_add("cpu", cpu_rate);
ralink_clk_add("10000b00.spi", sys_rate);
ralink_clk_add("10000100.timer", wdt_rate);
ralink_clk_add("10000120.watchdog", wdt_rate);
ralink_clk_add("10000500.uart", uart_rate);
ralink_clk_add("10000c00.uartlite", uart_rate);
ralink_clk_add("10100000.ethernet", sys_rate);
ralink_clk_add("10180000.wmac", wmac_rate);
}

void __init ralink_of_remap(void)
Expand Down

0 comments on commit 16688af

Please sign in to comment.