Root/target/linux/brcm63xx/patches-3.3/441-MIPS-BCM63XX-enable-USB-for-BCM6362.patch

1From fb9e98936590637c26b66d60137a7b44b329a254 Mon Sep 17 00:00:00 2001
2From: Jonas Gorski <jonas.gorski@gmail.com>
3Date: Sun, 12 Feb 2012 14:40:56 +0100
4Subject: [PATCH 59/84] MIPS: BCM63XX: enable USB for BCM6362
5
6BCM6362 has the same USB controller as BCM6368.
7
8Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
9---
10 arch/mips/bcm63xx/Kconfig | 2 ++
11 arch/mips/bcm63xx/clk.c | 4 ++++
12 arch/mips/bcm63xx/dev-usb-ehci.c | 3 ++-
13 arch/mips/bcm63xx/dev-usb-ohci.c | 2 +-
14 drivers/usb/host/ehci-bcm63xx.c | 2 +-
15 drivers/usb/host/ohci-bcm63xx.c | 2 +-
16 6 files changed, 11 insertions(+), 4 deletions(-)
17
18--- a/arch/mips/bcm63xx/Kconfig
19+++ b/arch/mips/bcm63xx/Kconfig
20@@ -27,6 +27,8 @@ config BCM63XX_CPU_6358
21 config BCM63XX_CPU_6362
22     bool "support 6362 CPU"
23     select HW_HAS_PCI
24+ select USB_ARCH_HAS_OHCI if USB_SUPPORT
25+ select USB_ARCH_HAS_EHCI if USB_SUPPORT
26 
27 config BCM63XX_CPU_6368
28     bool "support 6368 CPU"
29--- a/arch/mips/bcm63xx/clk.c
30+++ b/arch/mips/bcm63xx/clk.c
31@@ -178,6 +178,8 @@ static void usbh_set(struct clk *clk, in
32 {
33     if (BCMCPU_IS_6348())
34         bcm_hwclock_set(CKCTL_6348_USBH_EN, enable);
35+ else if (BCMCPU_IS_6362())
36+ bcm_hwclock_set(CKCTL_6362_USBH_EN, enable);
37     else if (BCMCPU_IS_6368())
38         bcm_hwclock_set(CKCTL_6368_USBH_EN, enable);
39 }
40--- a/arch/mips/bcm63xx/dev-usb-ehci.c
41+++ b/arch/mips/bcm63xx/dev-usb-ehci.c
42@@ -39,7 +39,8 @@ static struct platform_device bcm63xx_eh
43 
44 int __init bcm63xx_ehci_register(void)
45 {
46- if (!BCMCPU_IS_6328() && !BCMCPU_IS_6358() && !BCMCPU_IS_6368())
47+ if (!BCMCPU_IS_6328() && !BCMCPU_IS_6358() && !BCMCPU_IS_6362() &&
48+ !BCMCPU_IS_6368())
49         return 0;
50 
51     ehci_resources[0].start = bcm63xx_regset_address(RSET_EHCI0);
52--- a/arch/mips/bcm63xx/dev-usb-ohci.c
53+++ b/arch/mips/bcm63xx/dev-usb-ohci.c
54@@ -40,7 +40,7 @@ static struct platform_device bcm63xx_oh
55 int __init bcm63xx_ohci_register(void)
56 {
57     if (!BCMCPU_IS_6328() && !BCMCPU_IS_6348() && !BCMCPU_IS_6358() &&
58- !BCMCPU_IS_6368())
59+ !BCMCPU_IS_6362() && !BCMCPU_IS_6368())
60         return 0;
61 
62     ohci_resources[0].start = bcm63xx_regset_address(RSET_OHCI0);
63--- a/drivers/usb/host/ehci-bcm63xx.c
64+++ b/drivers/usb/host/ehci-bcm63xx.c
65@@ -99,7 +99,7 @@ static int __devinit ehci_hcd_bcm63xx_dr
66         bcm_rset_writel(RSET_USBH_PRIV, 0x1c0020,
67                 USBH_PRIV_TEST_6358_REG);
68 
69- } else if (BCMCPU_IS_6328() || BCMCPU_IS_6368()) {
70+ } else if (BCMCPU_IS_6328() || BCMCPU_IS_6362() || BCMCPU_IS_6368()) {
71 
72         reg = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_SWAP_6368_REG);
73         reg &= ~USBH_PRIV_SWAP_EHCI_DATA_MASK;
74--- a/drivers/usb/host/ohci-bcm63xx.c
75+++ b/drivers/usb/host/ohci-bcm63xx.c
76@@ -94,7 +94,7 @@ static int __devinit ohci_hcd_bcm63xx_dr
77         bcm_rset_writel(RSET_USBH_PRIV, 0x1c0020,
78                 USBH_PRIV_TEST_6358_REG);
79 
80- } else if (BCMCPU_IS_6328() || BCMCPU_IS_6368()) {
81+ } else if (BCMCPU_IS_6328() || BCMCPU_IS_6362() || BCMCPU_IS_6368()) {
82         reg = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_SWAP_6368_REG);
83         reg &= ~USBH_PRIV_SWAP_OHCI_ENDN_MASK;
84         reg |= USBH_PRIV_SWAP_OHCI_DATA_MASK;
85

Archive Download this file



interactive