Skip to content

Commit 82c4684

Browse files
juhosgJohn Crispin
authored andcommitted
MIPS: ath79: add USB controller registration code for the QCA955X SoCs
Register platfom devices for the built-in USB controllers of the SoCs. Cc: Rodriguez, Luis <rodrigue@qca.qualcomm.com> Cc: Giori, Kathy <kgiori@qca.qualcomm.com> Cc: QCA Linux Team <qca-linux-team@qca.qualcomm.com> Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Patchwork: http://patchwork.linux-mips.org/patch/4952/ Signed-off-by: John Crispin <blogic@openwrt.org>
1 parent 0a5f3b1 commit 82c4684

2 files changed

Lines changed: 18 additions & 0 deletions

File tree

‎arch/mips/ath79/dev-usb.c‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,19 @@ static void __init ar934x_usb_setup(void)
208208
&ath79_ehci_pdata_v2, sizeof(ath79_ehci_pdata_v2));
209209
}
210210

211+
static void __init qca955x_usb_setup(void)
212+
{
213+
ath79_usb_register("ehci-platform", 0,
214+
QCA955X_EHCI0_BASE, QCA955X_EHCI_SIZE,
215+
ATH79_IP3_IRQ(0),
216+
&ath79_ehci_pdata_v2, sizeof(ath79_ehci_pdata_v2));
217+
218+
ath79_usb_register("ehci-platform", 1,
219+
QCA955X_EHCI1_BASE, QCA955X_EHCI_SIZE,
220+
ATH79_IP3_IRQ(1),
221+
&ath79_ehci_pdata_v2, sizeof(ath79_ehci_pdata_v2));
222+
}
223+
211224
void __init ath79_register_usb(void)
212225
{
213226
if (soc_is_ar71xx())
@@ -222,6 +235,8 @@ void __init ath79_register_usb(void)
222235
ar933x_usb_setup();
223236
else if (soc_is_ar934x())
224237
ar934x_usb_setup();
238+
else if (soc_is_qca955x())
239+
qca955x_usb_setup();
225240
else
226241
BUG();
227242
}

‎arch/mips/include/asm/mach-ath79/ar71xx_regs.h‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,9 @@
109109

110110
#define QCA955X_WMAC_BASE (AR71XX_APB_BASE + 0x00100000)
111111
#define QCA955X_WMAC_SIZE 0x20000
112+
#define QCA955X_EHCI0_BASE 0x1b000000
113+
#define QCA955X_EHCI1_BASE 0x1b400000
114+
#define QCA955X_EHCI_SIZE 0x1000
112115

113116
/*
114117
* DDR_CTRL block

0 commit comments

Comments
 (0)