kernel: update 3.10 to 3.10.2
[openwrt/openwrt.git] / target / linux / ramips / patches-3.10 / 0017-USB-MIPS-ralink-fix-usb-issue-on-mt7620.patch
1 From 3f40514a51b44171d274ef6a7d66dce9ae7c349d Mon Sep 17 00:00:00 2001
2 From: John Crispin <blogic@openwrt.org>
3 Date: Fri, 24 May 2013 21:28:08 +0200
4 Subject: [PATCH 17/33] USB: MIPS: ralink: fix usb issue on mt7620
5
6 USB fails when frequency scaling is enabled. Increase the idle cpu speed when
7 scaled.
8
9 Signed-off-by: John Crispin <blogic@openwrt.org>
10 ---
11 arch/mips/include/asm/mach-ralink/mt7620.h | 1 +
12 arch/mips/ralink/mt7620.c | 8 ++++++++
13 2 files changed, 9 insertions(+)
14
15 --- a/arch/mips/include/asm/mach-ralink/mt7620.h
16 +++ b/arch/mips/include/asm/mach-ralink/mt7620.h
17 @@ -20,6 +20,7 @@
18 #define SYSC_REG_CHIP_REV 0x0c
19 #define SYSC_REG_SYSTEM_CONFIG0 0x10
20 #define SYSC_REG_SYSTEM_CONFIG1 0x14
21 +#define SYSC_REG_CPU_SYS_CLKCFG 0x3c
22 #define SYSC_REG_CPLL_CONFIG0 0x54
23 #define SYSC_REG_CPLL_CONFIG1 0x58
24
25 --- a/arch/mips/ralink/mt7620.c
26 +++ b/arch/mips/ralink/mt7620.c
27 @@ -185,6 +185,14 @@ void __init ralink_clk_init(void)
28 ralink_clk_add("10000500.uart", 40000000);
29 ralink_clk_add("10000b00.spi", 40000000);
30 ralink_clk_add("10000c00.uartlite", 40000000);
31 +
32 +#ifdef CONFIG_USB
33 + /*
34 + * When the CPU goes into sleep mode, the BUS clock will be too low for
35 + * USB to function properly
36 + */
37 + rt_sysc_m32(0x1f1f, 0x303, SYSC_REG_CPU_SYS_CLKCFG);
38 +#endif
39 }
40
41 void __init ralink_of_remap(void)