diff options
author | Wu, Josh <Josh.wu@atmel.com> | 2015-07-27 11:40:18 +0800 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2015-08-12 20:47:48 -0400 |
commit | e0266f4942f22d3111a5365f3b2c33ecd55730eb (patch) | |
tree | 06ed81a4bca1897d2fc3d04e05274ce630bde98d /drivers | |
parent | 633b6ccedf9d536fd93299b2207a5227dedd987c (diff) | |
download | talos-obmc-uboot-e0266f4942f22d3111a5365f3b2c33ecd55730eb.tar.gz talos-obmc-uboot-e0266f4942f22d3111a5365f3b2c33ecd55730eb.zip |
usb: ohci: enable cache support
Remove the CONFIG_DM_USB limitation to enable cache support functions.
Tested on SAMA5D3x-EK board.
Signed-off-by: Josh Wu <josh.wu@atmel.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/host/ohci-hcd.c | 12 | ||||
-rw-r--r-- | drivers/usb/host/ohci.h | 2 |
2 files changed, 2 insertions, 12 deletions
diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c index 691ed1c900..0ffd838db2 100644 --- a/drivers/usb/host/ohci-hcd.c +++ b/drivers/usb/host/ohci-hcd.c @@ -105,21 +105,13 @@ static struct pci_device_id ehci_pci_ids[] = { # define m32_swap(x) cpu_to_le32(x) #endif /* CONFIG_SYS_OHCI_BE_CONTROLLER */ -#ifdef CONFIG_DM_USB -/* - * We really should do proper cache flushing everywhere, but for now we only - * do it for new (driver-model) usb code to avoid regressions. - */ +/* We really should do proper cache flushing everywhere */ #define flush_dcache_buffer(addr, size) \ flush_dcache_range((unsigned long)(addr), \ ALIGN((unsigned long)(addr) + size, ARCH_DMA_MINALIGN)) #define invalidate_dcache_buffer(addr, size) \ invalidate_dcache_range((unsigned long)(addr), \ ALIGN((unsigned long)(addr) + size, ARCH_DMA_MINALIGN)) -#else -#define flush_dcache_buffer(addr, size) -#define invalidate_dcache_buffer(addr, size) -#endif /* Do not use sizeof(ed / td) as our ed / td structs contain extra members */ #define flush_dcache_ed(addr) flush_dcache_buffer(addr, 16) @@ -763,12 +755,10 @@ static void periodic_unlink(struct ohci *ohci, volatile struct ed *ed, if (((struct ed *) m32_swap((unsigned long)ed_p)) == ed) { *ed_p = ed->hwNextED; -#ifdef CONFIG_DM_USB aligned_ed_p = (unsigned long)ed_p; aligned_ed_p &= ~(ARCH_DMA_MINALIGN - 1); flush_dcache_range(aligned_ed_p, aligned_ed_p + ARCH_DMA_MINALIGN); -#endif break; } ed_p = &(((struct ed *) diff --git a/drivers/usb/host/ohci.h b/drivers/usb/host/ohci.h index f1526d4900..9b0c4a2bd9 100644 --- a/drivers/usb/host/ohci.h +++ b/drivers/usb/host/ohci.h @@ -18,7 +18,7 @@ # define ohci_writel(a, b) (*((volatile u32 *)(b)) = ((volatile u32)a)) #endif /* CONFIG_SYS_OHCI_SWAP_REG_ACCESS */ -#if defined CONFIG_DM_USB && ARCH_DMA_MINALIGN > 16 +#if ARCH_DMA_MINALIGN > 16 #define ED_ALIGNMENT ARCH_DMA_MINALIGN #else #define ED_ALIGNMENT 16 |