bcm63xx: enable usb for bcm6328
[openwrt/svn-archive/archive.git] / target / linux / brcm63xx / patches-3.3 / 438-MIPS-BCM63XX-enable-USB-for-BCM6328.patch
1 From 38c3f8d21da90f0833578a157e22ddabf4d576bd Mon Sep 17 00:00:00 2001
2 From: Jonas Gorski <jonas.gorski@gmail.com>
3 Date: Sun, 12 Feb 2012 14:28:34 +0100
4 Subject: [PATCH 48/84] MIPS: BCM63XX: enable USB for BCM6328
5
6 The USB controller is the same as the one on BCM6368.
7
8 Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
9 ---
10 arch/mips/bcm63xx/dev-usb-ehci.c | 2 +-
11 arch/mips/bcm63xx/dev-usb-ohci.c | 3 ++-
12 drivers/usb/host/ehci-bcm63xx.c | 2 +-
13 drivers/usb/host/ohci-bcm63xx.c | 2 +-
14 4 files changed, 5 insertions(+), 4 deletions(-)
15
16 --- a/arch/mips/bcm63xx/dev-usb-ehci.c
17 +++ b/arch/mips/bcm63xx/dev-usb-ehci.c
18 @@ -39,7 +39,7 @@ static struct platform_device bcm63xx_eh
19
20 int __init bcm63xx_ehci_register(void)
21 {
22 - if (!BCMCPU_IS_6358() && !BCMCPU_IS_6368())
23 + if (!BCMCPU_IS_6328() && !BCMCPU_IS_6358() && !BCMCPU_IS_6368())
24 return 0;
25
26 ehci_resources[0].start = bcm63xx_regset_address(RSET_EHCI0);
27 --- a/arch/mips/bcm63xx/dev-usb-ohci.c
28 +++ b/arch/mips/bcm63xx/dev-usb-ohci.c
29 @@ -39,7 +39,8 @@ static struct platform_device bcm63xx_oh
30
31 int __init bcm63xx_ohci_register(void)
32 {
33 - if (!BCMCPU_IS_6348() && !BCMCPU_IS_6358() && !BCMCPU_IS_6368())
34 + if (!BCMCPU_IS_6328() && !BCMCPU_IS_6348() && !BCMCPU_IS_6358() &&
35 + !BCMCPU_IS_6368())
36 return 0;
37
38 ohci_resources[0].start = bcm63xx_regset_address(RSET_OHCI0);
39 --- a/drivers/usb/host/ehci-bcm63xx.c
40 +++ b/drivers/usb/host/ehci-bcm63xx.c
41 @@ -99,7 +99,7 @@ static int __devinit ehci_hcd_bcm63xx_dr
42 bcm_rset_writel(RSET_USBH_PRIV, 0x1c0020,
43 USBH_PRIV_TEST_6358_REG);
44
45 - } else if (BCMCPU_IS_6368()) {
46 + } else if (BCMCPU_IS_6328() || BCMCPU_IS_6368()) {
47
48 reg = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_SWAP_6368_REG);
49 reg &= ~USBH_PRIV_SWAP_EHCI_DATA_MASK;
50 --- a/drivers/usb/host/ohci-bcm63xx.c
51 +++ b/drivers/usb/host/ohci-bcm63xx.c
52 @@ -94,7 +94,7 @@ static int __devinit ohci_hcd_bcm63xx_dr
53 bcm_rset_writel(RSET_USBH_PRIV, 0x1c0020,
54 USBH_PRIV_TEST_6358_REG);
55
56 - } else if (BCMCPU_IS_6368()) {
57 + } else if (BCMCPU_IS_6328() || BCMCPU_IS_6368()) {
58 reg = bcm_rset_readl(RSET_USBH_PRIV, USBH_PRIV_SWAP_6368_REG);
59 reg &= ~USBH_PRIV_SWAP_OHCI_ENDN_MASK;
60 reg |= USBH_PRIV_SWAP_OHCI_DATA_MASK;