diff options
author | Li Yang <leoli@freescale.com> | 2007-05-23 16:58:17 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-23 23:14:15 -0400 |
commit | 40acc095302aee380491df5f58d98945243468ec (patch) | |
tree | 51ca963c899f744f5b947b66ba76ba618b66ecb3 /drivers/usb | |
parent | 3d6ac9843175c1d29c075794519cb045b52e46c2 (diff) |
ehci-fsl: fix cache coherency problem on system with large memory
The patch fixes bug http://bugzilla.kernel.org/show_bug.cgi?id=7482.
It sets USB snooping on 4G space for PowerPC platforms without
CONFIG_NOT_COHERENT_CACHE defined.
Reported-by: Stefan Meyer <reyems@telkomsa.net>
Signed-off-by: Li Yang <leoli@freescale.com>
Cc: Greg KH <greg@kroah.com>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/host/ehci-fsl.c | 13 | ||||
-rw-r--r-- | drivers/usb/host/ehci-fsl.h | 1 |
2 files changed, 14 insertions, 0 deletions
diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c index a52480505f78..c7a7c590426f 100644 --- a/drivers/usb/host/ehci-fsl.c +++ b/drivers/usb/host/ehci-fsl.c | |||
@@ -193,6 +193,19 @@ static void mpc83xx_usb_setup(struct usb_hcd *hcd) | |||
193 | out_be32(non_ehci + FSL_SOC_USB_CTRL, 0x00000004); | 193 | out_be32(non_ehci + FSL_SOC_USB_CTRL, 0x00000004); |
194 | out_be32(non_ehci + FSL_SOC_USB_SNOOP1, 0x0000001b); | 194 | out_be32(non_ehci + FSL_SOC_USB_SNOOP1, 0x0000001b); |
195 | 195 | ||
196 | #if defined(CONFIG_PPC32) && !defined(CONFIG_NOT_COHERENT_CACHE) | ||
197 | /* | ||
198 | * Turn on cache snooping hardware, since some PowerPC platforms | ||
199 | * wholly rely on hardware to deal with cache coherent | ||
200 | */ | ||
201 | |||
202 | /* Setup Snooping for all the 4GB space */ | ||
203 | /* SNOOP1 starts from 0x0, size 2G */ | ||
204 | out_be32(non_ehci + FSL_SOC_USB_SNOOP1, 0x0 | SNOOP_SIZE_2GB); | ||
205 | /* SNOOP2 starts from 0x80000000, size 2G */ | ||
206 | out_be32(non_ehci + FSL_SOC_USB_SNOOP2, 0x80000000 | SNOOP_SIZE_2GB); | ||
207 | #endif | ||
208 | |||
196 | if (pdata->operating_mode == FSL_USB2_DR_HOST) | 209 | if (pdata->operating_mode == FSL_USB2_DR_HOST) |
197 | mpc83xx_setup_phy(ehci, pdata->phy_mode, 0); | 210 | mpc83xx_setup_phy(ehci, pdata->phy_mode, 0); |
198 | 211 | ||
diff --git a/drivers/usb/host/ehci-fsl.h b/drivers/usb/host/ehci-fsl.h index f28736a917e4..b5e59db53347 100644 --- a/drivers/usb/host/ehci-fsl.h +++ b/drivers/usb/host/ehci-fsl.h | |||
@@ -34,4 +34,5 @@ | |||
34 | #define FSL_SOC_USB_PRICTRL 0x40c /* NOTE: big-endian */ | 34 | #define FSL_SOC_USB_PRICTRL 0x40c /* NOTE: big-endian */ |
35 | #define FSL_SOC_USB_SICTRL 0x410 /* NOTE: big-endian */ | 35 | #define FSL_SOC_USB_SICTRL 0x410 /* NOTE: big-endian */ |
36 | #define FSL_SOC_USB_CTRL 0x500 /* NOTE: big-endian */ | 36 | #define FSL_SOC_USB_CTRL 0x500 /* NOTE: big-endian */ |
37 | #define SNOOP_SIZE_2GB 0x1e | ||
37 | #endif /* _EHCI_FSL_H */ | 38 | #endif /* _EHCI_FSL_H */ |