From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Tue, 28 Jun 2016 10:02:56 +0200 Subject: [U-Boot] [RFC PATCH v1] usb: spl: fix USB errata for FSL SPL targets In-Reply-To: References: <1467068555-12673-1-git-send-email-york.sun@nxp.com> <5771BC63.3020101@denx.de> Message-ID: <57722F30.7020402@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 06/28/2016 09:02 AM, Sriram Dash wrote: >> From: Marek Vasut [mailto:marex at denx.de] >> On 06/28/2016 01:02 AM, York Sun wrote: >>> Commit 9262367 moved USB errata workaround to a C file but didn't >>> build it for SPL targets. >>> >>> Signed-off-by: York Sun >>> CC: Sriram Dash >>> CC: Rajesh Bhagat >>> >>> --- >>> 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/ >> >> I really dislike the naming here, I'd say just do >> >> obj-$(CONFIG_USB_EHCI_FSL) += usb/common/ >> obj-$(CONFIG_USB_XHCI_FSL) += usb/common/ >> > > Hello York/Marek, > > IMO, the build for SPL is failing in PPC as the cmd_errata is not getting > the definition of the has_erratum_aNNNNNN functions. So, instead of EHCI > or XHCI flags, i think we can use CONFIG_CMD_ERRATA for SPL build for > the errata applicability. > > +obj-$(CONFIG_CMD_ERRATA) += usb/common/fsl-errata.o > > What is your opinion? I think naming macro which is NOT enabling a command CONFIG_CMD_ERRATA is horrible and needs renaming in near future. Otherwise, I'll just wait for York's opinion on the above. -- Best regards, Marek Vasut