[PATCH 1/2] usb: ohci: Add header file for ARCH_DMA_MINALIGN

This is defined in the asm/cache.h header file. Update this header file to include it so it gets the same value consistently across U-Boot.
This fixes 'usb host' on omapl138_lcdk.
Fixes: 90526e9fbac ("common: Drop net.h from common header") Reported-by: Adam Ford aford173@gmail.com Signed-off-by: Simon Glass sjg@chromium.org ---
drivers/usb/host/ohci.h | 1 + 1 file changed, 1 insertion(+)
diff --git a/drivers/usb/host/ohci.h b/drivers/usb/host/ohci.h index 9b264bd92a..a38cd25eb8 100644 --- a/drivers/usb/host/ohci.h +++ b/drivers/usb/host/ohci.h @@ -11,6 +11,7 @@ * e.g. PCI controllers need this */
+#include <asm/cache.h> #include <asm/io.h>
#ifdef CONFIG_SYS_OHCI_SWAP_REG_ACCESS

This is defined in the asm/cache.h header file. Update this header file to include it.
Signed-off-by: Simon Glass sjg@chromium.org ---
include/linux/dma-mapping.h | 1 + 1 file changed, 1 insertion(+)
diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h index 20b6d60dd8..6a107d52e0 100644 --- a/include/linux/dma-mapping.h +++ b/include/linux/dma-mapping.h @@ -2,6 +2,7 @@ #ifndef _LINUX_DMA_MAPPING_H #define _LINUX_DMA_MAPPING_H
+#include <asm/cache.h> #include <linux/dma-direction.h> #include <linux/types.h> #include <asm/dma-mapping.h>

On Sat, May 30, 2020 at 10:29:04AM -0600, Simon Glass wrote:
This is defined in the asm/cache.h header file. Update this header file to include it.
Signed-off-by: Simon Glass sjg@chromium.org
Reviewed-by: Tom Rini trini@konsulko.com
There's also drivers/usb/host/ohci.h and lib/elf.c which also reference ARCH_DMA_MINALIGN without also logically pulling it in, I'll fix those.

On Sat, May 30, 2020 at 01:20:10PM -0400, Tom Rini wrote:
On Sat, May 30, 2020 at 10:29:04AM -0600, Simon Glass wrote:
This is defined in the asm/cache.h header file. Update this header file to include it.
Signed-off-by: Simon Glass sjg@chromium.org
Reviewed-by: Tom Rini trini@konsulko.com
There's also drivers/usb/host/ohci.h and lib/elf.c which also reference ARCH_DMA_MINALIGN without also logically pulling it in, I'll fix those.
Dunno how I missed that 1/2 is what fixed that one, sorry. And lib/elf.c is a problem in theory but would be a fail to build if not pulled in logically so I'll leave it be for now.

On Sat, May 30, 2020 at 12:27 PM Tom Rini trini@konsulko.com wrote:
On Sat, May 30, 2020 at 01:20:10PM -0400, Tom Rini wrote:
On Sat, May 30, 2020 at 10:29:04AM -0600, Simon Glass wrote:
This is defined in the asm/cache.h header file. Update this header file to include it.
Signed-off-by: Simon Glass sjg@chromium.org
Tested-by: Adam Ford aford173@gmail.com #da850-evm
Reviewed-by: Tom Rini trini@konsulko.com
There's also drivers/usb/host/ohci.h and lib/elf.c which also reference ARCH_DMA_MINALIGN without also logically pulling it in, I'll fix those.
Dunno how I missed that 1/2 is what fixed that one, sorry. And lib/elf.c is a problem in theory but would be a fail to build if not pulled in logically so I'll leave it be for now.
-- Tom

Hi Tom,
On Sat, 30 May 2020 at 11:27, Tom Rini trini@konsulko.com wrote:
On Sat, May 30, 2020 at 01:20:10PM -0400, Tom Rini wrote:
On Sat, May 30, 2020 at 10:29:04AM -0600, Simon Glass wrote:
This is defined in the asm/cache.h header file. Update this header file to include it.
Signed-off-by: Simon Glass sjg@chromium.org
Reviewed-by: Tom Rini trini@konsulko.com
There's also drivers/usb/host/ohci.h and lib/elf.c which also reference ARCH_DMA_MINALIGN without also logically pulling it in, I'll fix those.
Dunno how I missed that 1/2 is what fixed that one, sorry. And lib/elf.c is a problem in theory but would be a fail to build if not pulled in logically so I'll leave it be for now.
Yes I think the issue is the #ifdef default. Probably that should be removed at some point as it is quite risky to have that sort of thing.
Regards, Simon

On Sat, May 30, 2020 at 10:29:04AM -0600, Simon Glass wrote:
This is defined in the asm/cache.h header file. Update this header file to include it.
Signed-off-by: Simon Glass sjg@chromium.org Reviewed-by: Tom Rini trini@konsulko.com Tested-by: Adam Ford aford173@gmail.com #da850-evm
Applied to u-boot/master, thanks!

On Sat, May 30, 2020 at 11:29 AM Simon Glass sjg@chromium.org wrote:
This is defined in the asm/cache.h header file. Update this header file to include it so it gets the same value consistently across U-Boot.
This fixes 'usb host' on omapl138_lcdk.
Thank you. This series also fixes the da850-evm.
Fixes: 90526e9fbac ("common: Drop net.h from common header")
Tested-by: Adam Ford aford173@gmail.com
Reported-by: Adam Ford aford173@gmail.com Signed-off-by: Simon Glass sjg@chromium.org
drivers/usb/host/ohci.h | 1 + 1 file changed, 1 insertion(+)
diff --git a/drivers/usb/host/ohci.h b/drivers/usb/host/ohci.h index 9b264bd92a..a38cd25eb8 100644 --- a/drivers/usb/host/ohci.h +++ b/drivers/usb/host/ohci.h @@ -11,6 +11,7 @@
- e.g. PCI controllers need this
*/
+#include <asm/cache.h> #include <asm/io.h>
#ifdef CONFIG_SYS_OHCI_SWAP_REG_ACCESS
2.27.0.rc0.183.gde8f92d652-goog

On Sat, May 30, 2020 at 10:29:03AM -0600, Simon Glass wrote:
This is defined in the asm/cache.h header file. Update this header file to include it so it gets the same value consistently across U-Boot.
This fixes 'usb host' on omapl138_lcdk.
Fixes: 90526e9fbac ("common: Drop net.h from common header") Reported-by: Adam Ford aford173@gmail.com Signed-off-by: Simon Glass sjg@chromium.org
Reviewed-by: Tom Rini trini@konsulko.com

On Sat, May 30, 2020 at 10:29:03AM -0600, Simon Glass wrote:
This is defined in the asm/cache.h header file. Update this header file to include it so it gets the same value consistently across U-Boot.
This fixes 'usb host' on omapl138_lcdk.
Fixes: 90526e9fbac ("common: Drop net.h from common header") Reported-by: Adam Ford aford173@gmail.com Signed-off-by: Simon Glass sjg@chromium.org Tested-by: Adam Ford aford173@gmail.com Reviewed-by: Tom Rini trini@konsulko.com
Applied to u-boot/master, thanks!
participants (3)
-
Adam Ford
-
Simon Glass
-
Tom Rini