diff options
author | Geoff Levand <geoff@infradead.org> | 2011-11-22 21:33:45 -0500 |
---|---|---|
committer | Geoff Levand <geoff@infradead.org> | 2011-12-08 12:38:53 -0500 |
commit | 9187bef2fa395e85d5e22c4792b553d98410ccd6 (patch) | |
tree | 4b5c7bcecca9cabf00da1050a4bbe405352d4d70 /drivers/usb/host | |
parent | 876e0df902c726408c84b75dab673a90fd492e1d (diff) |
usb: PS3 EHCI HC reset work-around
PS3 EHCI HC errata fix 316 - The PS3 EHCI HC will reset its
internal INSNREGXX setup regs back to the chip default values
on Host Controller Reset (CMD_RESET) or Light Host Controller
Reset (CMD_LRESET). The work-around for this is for the HC
driver to re-initialise these regs when ever the HC is reset.
Adds a new helper routine ps3_ehci_setup_insnreg() which is
called from ps3_ehci_hc_reset().
Signed-off-by: Geoff Levand <geoff@infradead.org>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Diffstat (limited to 'drivers/usb/host')
-rw-r--r-- | drivers/usb/host/ehci-ps3.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/drivers/usb/host/ehci-ps3.c b/drivers/usb/host/ehci-ps3.c index 2dc32da75cfc..a20e496eb479 100644 --- a/drivers/usb/host/ehci-ps3.c +++ b/drivers/usb/host/ehci-ps3.c | |||
@@ -21,6 +21,34 @@ | |||
21 | #include <asm/firmware.h> | 21 | #include <asm/firmware.h> |
22 | #include <asm/ps3.h> | 22 | #include <asm/ps3.h> |
23 | 23 | ||
24 | static void ps3_ehci_setup_insnreg(struct ehci_hcd *ehci) | ||
25 | { | ||
26 | /* PS3 HC internal setup register offsets. */ | ||
27 | |||
28 | enum ps3_ehci_hc_insnreg { | ||
29 | ps3_ehci_hc_insnreg01 = 0x084, | ||
30 | ps3_ehci_hc_insnreg02 = 0x088, | ||
31 | ps3_ehci_hc_insnreg03 = 0x08c, | ||
32 | }; | ||
33 | |||
34 | /* PS3 EHCI HC errata fix 316 - The PS3 EHCI HC will reset its | ||
35 | * internal INSNREGXX setup regs back to the chip default values | ||
36 | * on Host Controller Reset (CMD_RESET) or Light Host Controller | ||
37 | * Reset (CMD_LRESET). The work-around for this is for the HC | ||
38 | * driver to re-initialise these regs when ever the HC is reset. | ||
39 | */ | ||
40 | |||
41 | /* Set burst transfer counts to 256 out, 32 in. */ | ||
42 | |||
43 | writel_be(0x01000020, (void __iomem *)ehci->regs + | ||
44 | ps3_ehci_hc_insnreg01); | ||
45 | |||
46 | /* Enable burst transfer counts. */ | ||
47 | |||
48 | writel_be(0x00000001, (void __iomem *)ehci->regs + | ||
49 | ps3_ehci_hc_insnreg03); | ||
50 | } | ||
51 | |||
24 | static int ps3_ehci_hc_reset(struct usb_hcd *hcd) | 52 | static int ps3_ehci_hc_reset(struct usb_hcd *hcd) |
25 | { | 53 | { |
26 | int result; | 54 | int result; |
@@ -49,6 +77,8 @@ static int ps3_ehci_hc_reset(struct usb_hcd *hcd) | |||
49 | 77 | ||
50 | ehci_reset(ehci); | 78 | ehci_reset(ehci); |
51 | 79 | ||
80 | ps3_ehci_setup_insnreg(ehci); | ||
81 | |||
52 | return result; | 82 | return result; |
53 | } | 83 | } |
54 | 84 | ||