1 From 281db30007b5836ce8acf5a45160fde6b176eda4 Mon Sep 17 00:00:00 2001
2 From: Gabor Juhos <juhosg@openwrt.org>
3 Date: Fri, 15 Feb 2013 13:38:24 +0000
4 Subject: [PATCH] MIPS: ath79: add USB controller registration code for the
7 commit 82c46840ae6bd8a147c59cd51f636d913989324a upstream.
9 Register platfom devices for the built-in USB
10 controllers of the SoCs.
12 Cc: Rodriguez, Luis <rodrigue@qca.qualcomm.com>
13 Cc: Giori, Kathy <kgiori@qca.qualcomm.com>
14 Cc: QCA Linux Team <qca-linux-team@qca.qualcomm.com>
15 Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
16 Patchwork: http://patchwork.linux-mips.org/patch/4952/
17 Signed-off-by: John Crispin <blogic@openwrt.org>
19 arch/mips/ath79/dev-usb.c | 15 +++++++++++++++
20 arch/mips/include/asm/mach-ath79/ar71xx_regs.h | 3 +++
21 2 files changed, 18 insertions(+)
23 --- a/arch/mips/ath79/dev-usb.c
24 +++ b/arch/mips/ath79/dev-usb.c
25 @@ -208,6 +208,19 @@ static void __init ar934x_usb_setup(void
26 &ath79_ehci_pdata_v2, sizeof(ath79_ehci_pdata_v2));
29 +static void __init qca955x_usb_setup(void)
31 + ath79_usb_register("ehci-platform", 0,
32 + QCA955X_EHCI0_BASE, QCA955X_EHCI_SIZE,
34 + &ath79_ehci_pdata_v2, sizeof(ath79_ehci_pdata_v2));
36 + ath79_usb_register("ehci-platform", 1,
37 + QCA955X_EHCI1_BASE, QCA955X_EHCI_SIZE,
39 + &ath79_ehci_pdata_v2, sizeof(ath79_ehci_pdata_v2));
42 void __init ath79_register_usb(void)
45 @@ -222,6 +235,8 @@ void __init ath79_register_usb(void)
47 else if (soc_is_ar934x())
49 + else if (soc_is_qca955x())
50 + qca955x_usb_setup();
54 --- a/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
55 +++ b/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
58 #define QCA955X_WMAC_BASE (AR71XX_APB_BASE + 0x00100000)
59 #define QCA955X_WMAC_SIZE 0x20000
60 +#define QCA955X_EHCI0_BASE 0x1b000000
61 +#define QCA955X_EHCI1_BASE 0x1b400000
62 +#define QCA955X_EHCI_SIZE 0x1000