diff options
author | John Crispin <blogic@openwrt.org> | 2015-02-09 12:13:55 +0000 |
---|---|---|
committer | John Crispin <blogic@openwrt.org> | 2015-02-09 12:13:55 +0000 |
commit | d7139c52f2d1321b3fd2cc8987ac77b3c795c5e2 (patch) | |
tree | 63e8d6df938cb1086ba2ccbbb2d0cfada198e539 /target/linux/ramips/patches-3.18/0023-MIPS-ralink-mt7620-fix-usb-issue-during-frequency-sc.patch | |
parent | d09e8adc85ecec168bc0e1eb926e7c160c9b906e (diff) | |
download | upstream-d7139c52f2d1321b3fd2cc8987ac77b3c795c5e2.tar.gz upstream-d7139c52f2d1321b3fd2cc8987ac77b3c795c5e2.tar.bz2 upstream-d7139c52f2d1321b3fd2cc8987ac77b3c795c5e2.zip |
ralink: add 3.18 support
keep default as 3.14, mt7621 gic need to be ported to 3.18
Signed-off-by: John Crispin <blogic@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44349 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ramips/patches-3.18/0023-MIPS-ralink-mt7620-fix-usb-issue-during-frequency-sc.patch')
-rw-r--r-- | target/linux/ramips/patches-3.18/0023-MIPS-ralink-mt7620-fix-usb-issue-during-frequency-sc.patch | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/target/linux/ramips/patches-3.18/0023-MIPS-ralink-mt7620-fix-usb-issue-during-frequency-sc.patch b/target/linux/ramips/patches-3.18/0023-MIPS-ralink-mt7620-fix-usb-issue-during-frequency-sc.patch new file mode 100644 index 0000000000..f3dead3859 --- /dev/null +++ b/target/linux/ramips/patches-3.18/0023-MIPS-ralink-mt7620-fix-usb-issue-during-frequency-sc.patch @@ -0,0 +1,52 @@ +From 1f1c12e85defba9459b41ec95b86f23b4791f1ab Mon Sep 17 00:00:00 2001 +From: John Crispin <blogic@openwrt.org> +Date: Mon, 4 Aug 2014 20:43:25 +0200 +Subject: [PATCH 23/57] MIPS: ralink: mt7620: fix usb issue during frequency + scaling + + If the USB HCD is running and the cpu is scaled too low, then the USB stops + working. Increase the idle speed of the core to fix this if the kernel is + built with USB support. + + The values are taken from the Ralink SDK Kernel. + + Signed-off-by: John Crispin <blogic@openwrt.org> +--- + arch/mips/ralink/mt7620.c | 19 +++++++++++++++++++ + 1 file changed, 19 insertions(+) + +--- a/arch/mips/ralink/mt7620.c ++++ b/arch/mips/ralink/mt7620.c +@@ -36,6 +36,12 @@ + #define PMU1_CFG 0x8C + #define DIG_SW_SEL BIT(25) + ++/* clock scaling */ ++#define CLKCFG_FDIV_MASK 0x1f00 ++#define CLKCFG_FDIV_USB_VAL 0x0300 ++#define CLKCFG_FFRAC_MASK 0x001f ++#define CLKCFG_FFRAC_USB_VAL 0x0003 ++ + /* does the board have sdram or ddram */ + static int dram_type; + +@@ -337,6 +343,19 @@ void __init ralink_clk_init(void) + ralink_clk_add("10000b00.spi", sys_rate); + ralink_clk_add("10000c00.uartlite", periph_rate); + ralink_clk_add("10180000.wmac", xtal_rate); ++ ++ if (IS_ENABLED(CONFIG_USB)) { ++ /* ++ * When the CPU goes into sleep mode, the BUS clock will be too low for ++ * USB to function properly ++ */ ++ u32 val = rt_sysc_r32(SYSC_REG_CPU_SYS_CLKCFG); ++ ++ val &= ~(CLKCFG_FDIV_MASK | CLKCFG_FFRAC_MASK); ++ val |= CLKCFG_FDIV_USB_VAL | CLKCFG_FFRAC_USB_VAL; ++ ++ rt_sysc_w32(val, SYSC_REG_CPU_SYS_CLKCFG); ++ } + } + + void __init ralink_of_remap(void) |