From: Anders Berg <anders.b...@lsi.com> By defining arch_is_coherent() == 1, we can avoid unnecessary cache maintenance operations and the dma_alloc_coherent() will return normal memory.
Signed-off-by: Anders Berg <anders.b...@lsi.com> --- arch/arm/Kconfig | 1 + arch/arm/mach-axxia/include/mach/memory.h | 19 +++++++++++++++++++ drivers/usb/host/ehci-ci13612.c | 12 ++++++------ 3 files changed, 26 insertions(+), 6 deletions(-) create mode 100644 arch/arm/mach-axxia/include/mach/memory.h diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 370eca8..f763ad1 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -340,6 +340,7 @@ config ARCH_AXXIA select ARM_TIMER_SP804 select ICST select NEED_MACH_IO_H + select NEED_MACH_MEMORY_H select ZONE_DMA select PCI select PCI_DOMAINS if PCI diff --git a/arch/arm/mach-axxia/include/mach/memory.h b/arch/arm/mach-axxia/include/mach/memory.h new file mode 100644 index 0000000..9df2aaf --- /dev/null +++ b/arch/arm/mach-axxia/include/mach/memory.h @@ -0,0 +1,19 @@ +/* + * arch/arm/mach-axxia/include/mach/memory.h + * + * Copyright (c) 2013 LSI Corporation + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + */ + +#ifndef __ASM_ARCH_MEMORY_H +#define __ASM_ARCH_MEMORY_H + +#include <mach/hardware.h> + +#define arch_is_coherent() 1 + +#endif diff --git a/drivers/usb/host/ehci-ci13612.c b/drivers/usb/host/ehci-ci13612.c index 2a30dab..b995a32 100644 --- a/drivers/usb/host/ehci-ci13612.c +++ b/drivers/usb/host/ehci-ci13612.c @@ -138,8 +138,7 @@ ci13612_fixup_usbcmd_rs(struct ehci_hcd *ehci) port_status = ehci_readl(ehci, &ehci->regs->port_status[0]); pr_info("ehci-ci13612: port_status = 0x%x\n", port_status); if (port_status & 0x100) { - pr_err("ehci-ci13612: USB port is in reset status, " - "not able to change HC status to run\n"); + pr_err("ehci-ci13612: USB port is in reset status, not able to change HC status to run\n"); return -EFAULT; } return 0; @@ -171,7 +170,7 @@ ci13612_fixup_txpburst(struct ehci_hcd *ehci) ehci_writel(ehci, burst_size, &ehci->regs->reserved[1]); } #else -#define ci13612_fixup_txpburst(ehci) do { (void)ehci; } while(0) +#define ci13612_fixup_txpburst(ehci) do { (void)ehci; } while (0) #endif static int ci13612_ehci_run(struct usb_hcd *hcd) @@ -260,7 +259,8 @@ static int ci13612_ehci_probe(struct platform_device *pdev) pdev->dev.coherent_dma_mask = DMA_BIT_MASK(32); pdev->dev.dma_mask = &pdev->dev.coherent_dma_mask; - hcd = usb_create_hcd(&ci13612_hc_driver, &pdev->dev, dev_name(&pdev->dev)); + hcd = usb_create_hcd(&ci13612_hc_driver, &pdev->dev, + dev_name(&pdev->dev)); if (!hcd) { retval = -ENOMEM; goto fail_create_hcd; @@ -285,8 +285,8 @@ static int ci13612_ehci_probe(struct platform_device *pdev) /* Set address bits [39:32] to zero */ writel(0x0, gpreg_base + 0x8); #ifndef CONFIG_LSI_USB_SW_WORKAROUND - /* hprot pass-through (let the controller drive hprot[0:3] */ - writel(0x100, gpreg_base + 0x74); + /* hprot cachable and bufferable */ + writel(0xc, gpreg_base + 0x74); #endif iounmap(gpreg_base); } -- 1.7.9.5 -- _______________________________________________ linux-yocto mailing list linux-yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/linux-yocto