From: Lukasz Majewski Date: Mon, 18 Apr 2016 12:59:00 +0200 Subject: [U-Boot] [PATCH] usb: gadget: Disable gadget options in SPL In-Reply-To: <1460731256-8940-1-git-send-email-semen.protsenko@linaro.org> References: <1460731256-8940-1-git-send-email-semen.protsenko@linaro.org> Message-ID: <20160418125900.0bac875c@amdc2363> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Sam, > During Kconfig migrating process we missed to check some gadget > options for SPL_BUILD. Do it now to properly disable gadget in SPL > build for those platforms that disabled it before migrating options > to Kconfig. > > Signed-off-by: Sam Protsenko > --- > include/configs/am43xx_evm.h | 1 + > include/configs/mx6sabre_common.h | 11 +++++++++++ > include/configs/siemens-am33x-common.h | 10 ++++++++++ > include/configs/smartweb.h | 9 +++++++++ > include/configs/tegra-common-usb-gadget.h | 11 +++++++++++ > 5 files changed, 42 insertions(+) > > diff --git a/include/configs/am43xx_evm.h > b/include/configs/am43xx_evm.h index 5d5ae5e..c8beacd 100644 > --- a/include/configs/am43xx_evm.h > +++ b/include/configs/am43xx_evm.h > @@ -127,6 +127,7 @@ > #undef CONFIG_USB_DWC3 > #undef CONFIG_USB_DWC3_GADGET > > +#undef CONFIG_USB_GADGET > #undef CONFIG_USB_GADGET_DOWNLOAD > #undef CONFIG_USB_GADGET_VBUS_DRAW > #undef CONFIG_G_DNL_MANUFACTURER > diff --git a/include/configs/mx6sabre_common.h > b/include/configs/mx6sabre_common.h index 87bbf2e..5ca0fda 100644 > --- a/include/configs/mx6sabre_common.h > +++ b/include/configs/mx6sabre_common.h > @@ -252,4 +252,15 @@ > #define CONFIG_DFU_SF > #endif > Would it be possible to use: #ifndef CONFIG_SPL_BUILD to guard (undef in this case) relevant parts of those config files (the old approach) > +#ifdef CONFIG_SPL_BUILD > +#undef CONFIG_CI_UDC > +#undef CONFIG_USB_GADGET > +#undef CONFIG_USB_GADGET_VBUS_DRAW > +#undef CONFIG_USB_GADGET_DUALSPEED > +#undef CONFIG_USB_GADGET_DOWNLOAD > +#undef CONFIG_G_DNL_MANUFACTURER > +#undef CONFIG_G_DNL_VENDOR_NUM > +#undef CONFIG_G_DNL_PRODUCT_NUM > +#endif For Kconfig's definition maybe we would be better off by using "depends on !SPL_BUILD" for those relevant boards? > + > #endif /* __MX6QSABRE_COMMON_CONFIG_H */ > diff --git a/include/configs/siemens-am33x-common.h > b/include/configs/siemens-am33x-common.h index 5b94fad..d11566e 100644 > --- a/include/configs/siemens-am33x-common.h > +++ b/include/configs/siemens-am33x-common.h > @@ -253,6 +253,16 @@ > > #endif /* CONFIG_SPL_BUILD */ > > +#ifdef CONFIG_SPL_BUILD > +#undef CONFIG_USB_MUSB_GADGET > +#undef CONFIG_USB_GADGET > +#undef CONFIG_USB_GADGET_VBUS_DRAW > +#undef CONFIG_USB_GADGET_DOWNLOAD > +#undef CONFIG_G_DNL_MANUFACTURER > +#undef CONFIG_G_DNL_VENDOR_NUM > +#undef CONFIG_G_DNL_PRODUCT_NUM > +#endif > + > /* > * Default to using SPI for environment, etc. We have multiple > copies > * of SPL as the ROM will check these locations. > diff --git a/include/configs/smartweb.h b/include/configs/smartweb.h > index 0352379..f2e9b90 100644 > --- a/include/configs/smartweb.h > +++ b/include/configs/smartweb.h > @@ -181,6 +181,15 @@ > #define CONFIG_SYS_CACHELINE_SIZE 0x2000 > #endif > > +#ifdef CONFIG_SPL_BUILD > +#undef CONFIG_USB_GADGET > +#undef CONFIG_USB_GADGET_VBUS_DRAW > +#undef CONFIG_USB_GADGET_DOWNLOAD > +#undef CONFIG_G_DNL_MANUFACTURER > +#undef CONFIG_G_DNL_VENDOR_NUM > +#undef CONFIG_G_DNL_PRODUCT_NUM > +#endif > + > /* General Boot Parameter */ > #define CONFIG_BOOTDELAY 3 > #define CONFIG_BOOTCOMMAND "run flashboot" > diff --git a/include/configs/tegra-common-usb-gadget.h > b/include/configs/tegra-common-usb-gadget.h index 18851ca..1d6b99e > 100644 --- a/include/configs/tegra-common-usb-gadget.h > +++ b/include/configs/tegra-common-usb-gadget.h > @@ -28,4 +28,15 @@ > #define CONFIG_DFU_RAM > #endif > > +#ifdef CONFIG_SPL_BUILD > +#undef CONFIG_CI_UDC > +#undef CONFIG_USB_GADGET > +#undef CONFIG_USB_GADGET_VBUS_DRAW > +#undef CONFIG_USB_GADGET_DUALSPEED > +#undef CONFIG_USB_GADGET_DOWNLOAD > +#undef CONFIG_G_DNL_MANUFACTURER > +#undef CONFIG_G_DNL_VENDOR_NUM > +#undef CONFIG_G_DNL_PRODUCT_NUM > +#endif > + > #endif /* _TEGRA_COMMON_USB_GADGET_H_ */ -- Best regards, Lukasz Majewski Samsung R&D Institute Poland (SRPOL) | Linux Platform Group