* [U-Boot] [PATCH] usb: ohci: enable cache support
2015-05-19 10:44 [U-Boot] [PATCH] usb: ohci: enable cache support Josh Wu
@ 2015-05-19 10:43 ` Hans de Goede
2015-05-22 1:30 ` Marek Vasut
2015-05-19 17:58 ` Marek Vasut
1 sibling, 1 reply; 4+ messages in thread
From: Hans de Goede @ 2015-05-19 10:43 UTC (permalink / raw)
To: u-boot
Hi,
On 19-05-15 12:44, Josh Wu wrote:
> 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>
Looks good to me:
Acked-by: Hans de Goede <hdegoede@redhat.com>
Regards,
Hans
> ---
>
> drivers/usb/host/ohci-hcd.c | 10 +---------
> drivers/usb/host/ohci.h | 2 +-
> 2 files changed, 2 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c
> index 494b760..8920b0f 100644
> --- a/drivers/usb/host/ohci-hcd.c
> +++ b/drivers/usb/host/ohci-hcd.c
> @@ -103,21 +103,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)
> diff --git a/drivers/usb/host/ohci.h b/drivers/usb/host/ohci.h
> index f52b4c1..47bd85b 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
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH] usb: ohci: enable cache support
@ 2015-05-19 10:44 Josh Wu
2015-05-19 10:43 ` Hans de Goede
2015-05-19 17:58 ` Marek Vasut
0 siblings, 2 replies; 4+ messages in thread
From: Josh Wu @ 2015-05-19 10:44 UTC (permalink / raw)
To: u-boot
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>
---
drivers/usb/host/ohci-hcd.c | 10 +---------
drivers/usb/host/ohci.h | 2 +-
2 files changed, 2 insertions(+), 10 deletions(-)
diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c
index 494b760..8920b0f 100644
--- a/drivers/usb/host/ohci-hcd.c
+++ b/drivers/usb/host/ohci-hcd.c
@@ -103,21 +103,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)
diff --git a/drivers/usb/host/ohci.h b/drivers/usb/host/ohci.h
index f52b4c1..47bd85b 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
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH] usb: ohci: enable cache support
2015-05-19 10:44 [U-Boot] [PATCH] usb: ohci: enable cache support Josh Wu
2015-05-19 10:43 ` Hans de Goede
@ 2015-05-19 17:58 ` Marek Vasut
1 sibling, 0 replies; 4+ messages in thread
From: Marek Vasut @ 2015-05-19 17:58 UTC (permalink / raw)
To: u-boot
On Tuesday, May 19, 2015 at 12:44:24 PM, Josh Wu wrote:
> 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>
Applied, thanks!
Best regards,
Marek Vasut
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH] usb: ohci: enable cache support
2015-05-19 10:43 ` Hans de Goede
@ 2015-05-22 1:30 ` Marek Vasut
0 siblings, 0 replies; 4+ messages in thread
From: Marek Vasut @ 2015-05-22 1:30 UTC (permalink / raw)
To: u-boot
On Tuesday, May 19, 2015 at 12:43:43 PM, Hans de Goede wrote:
> Hi,
>
> On 19-05-15 12:44, Josh Wu wrote:
> > 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>
>
> Looks good to me:
>
> Acked-by: Hans de Goede <hdegoede@redhat.com>
>
> Regards,
Hi!
This breaks at least colibri_pxa270, I'm dropping it from u-boot-usb/master .
Please fix the patch and resubmit.
Thanks!
Best regards,
Marek Vasut
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-05-22 1:30 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-19 10:44 [U-Boot] [PATCH] usb: ohci: enable cache support Josh Wu
2015-05-19 10:43 ` Hans de Goede
2015-05-22 1:30 ` Marek Vasut
2015-05-19 17:58 ` Marek Vasut
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox