[U-Boot] [RFC PATCH v1] usb: spl: fix USB errata for FSL SPL targets
York Sun
york.sun at nxp.com
Tue Jun 28 01:02:35 CEST 2016
Commit 9262367 moved USB errata workaround to a C file but didn't
build it for SPL targets.
Signed-off-by: York Sun <york.sun at nxp.com>
CC: Sriram Dash <sriram.dash at nxp.com>
CC: Rajesh Bhagat <rajesh.bhagat at nxp.com>
---
Please review this patch. It fixed the compiling errors introduced by
9262367. Not sure if this is the way USB errata should be handled.
drivers/Makefile | 7 +++++++
drivers/usb/common/Makefile | 8 ++++++--
include/configs/km/kmp204x-common.h | 1 +
3 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/drivers/Makefile b/drivers/Makefile
index 1723958..88774ba 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -39,6 +39,13 @@ obj-$(CONFIG_OMAP_USB_PHY) += usb/phy/
obj-$(CONFIG_SPL_SATA_SUPPORT) += block/
obj-$(CONFIG_SPL_USB_HOST_SUPPORT) += block/
obj-$(CONFIG_SPL_MMC_SUPPORT) += block/
+ifdef CONFIG_USB_EHCI_FSL
+CONFIG_SPL_USB_ERRATA = y
+endif
+ifdef CONFIG_USB_XHCI_FSL
+CONFIG_SPL_USB_ERRATA = y
+endif
+obj-$(CONFIG_SPL_USB_ERRATA) += usb/common/
else
diff --git a/drivers/usb/common/Makefile b/drivers/usb/common/Makefile
index aee7e32..f073e1c 100644
--- a/drivers/usb/common/Makefile
+++ b/drivers/usb/common/Makefile
@@ -4,5 +4,9 @@
#
obj-$(CONFIG_DM_USB) += common.o
-obj-$(CONFIG_USB_EHCI_FSL) += fsl-dt-fixup.o fsl-errata.o
-obj-$(CONFIG_USB_XHCI_FSL) += fsl-dt-fixup.o fsl-errata.o
+obj-$(CONFIG_USB_EHCI_FSL) += fsl-errata.o
+obj-$(CONFIG_USB_XHCI_FSL) += fsl-errata.o
+ifndef CONFIG_SPL_BUILD
+obj-$(CONFIG_USB_EHCI_FSL) += fsl-dt-fixup.o
+obj-$(CONFIG_USB_XHCI_FSL) += fsl-dt-fixup.o
+endif
diff --git a/include/configs/km/kmp204x-common.h b/include/configs/km/kmp204x-common.h
index 028623d..5bdda22 100644
--- a/include/configs/km/kmp204x-common.h
+++ b/include/configs/km/kmp204x-common.h
@@ -406,6 +406,7 @@ int get_scl(void);
#endif
#define __USB_PHY_TYPE utmi
+#define CONFIG_USB_EHCI_FSL
/*
* Environment Configuration
--
2.7.4
More information about the U-Boot
mailing list