Message ID | 254ed18dedfcc3615bcc2f77709acc114de0a737.1464608199.git.andrew.shadura@collabora.co.uk |
---|---|
State | Awaiting Upstream |
Delegated to: | Stefano Babic |
Headers | show |
On Mon, May 30, 2016 at 01:37:04PM +0200, Andrew Shadura wrote: > The USB support is only useful for development and shouldn't be enabled > in production, so it has to be disabled in U-boot by default. > > Signed-off-by: Andrew Shadura <andrew.shadura@collabora.co.uk> Acked-by: Martin Donnelly <martin.donnelly@ge.com> > --- > configs/ge_b450v3_defconfig | 2 -- > configs/ge_b650v3_defconfig | 2 -- > configs/ge_b850v3_defconfig | 2 -- > include/configs/ge_bx50v3.h | 24 +++++++++++++++++------- > 4 files changed, 17 insertions(+), 13 deletions(-) > > diff --git a/configs/ge_b450v3_defconfig b/configs/ge_b450v3_defconfig > index ffa0440..98bf52e 100644 > --- a/configs/ge_b450v3_defconfig > +++ b/configs/ge_b450v3_defconfig > @@ -8,8 +8,6 @@ CONFIG_CMD_BOOTZ=y > CONFIG_CMD_MMC=y > CONFIG_CMD_SF=y > CONFIG_CMD_I2C=y > -CONFIG_CMD_USB=y > -CONFIG_CMD_USB_MASS_STORAGE=y > CONFIG_CMD_GPIO=y > CONFIG_CMD_DHCP=y > CONFIG_CMD_MII=y > diff --git a/configs/ge_b650v3_defconfig b/configs/ge_b650v3_defconfig > index b039c24..b66c98b 100644 > --- a/configs/ge_b650v3_defconfig > +++ b/configs/ge_b650v3_defconfig > @@ -8,8 +8,6 @@ CONFIG_CMD_BOOTZ=y > CONFIG_CMD_MMC=y > CONFIG_CMD_SF=y > CONFIG_CMD_I2C=y > -CONFIG_CMD_USB=y > -CONFIG_CMD_USB_MASS_STORAGE=y > CONFIG_CMD_GPIO=y > CONFIG_CMD_DHCP=y > CONFIG_CMD_MII=y > diff --git a/configs/ge_b850v3_defconfig b/configs/ge_b850v3_defconfig > index d9c8acd..1cd126a 100644 > --- a/configs/ge_b850v3_defconfig > +++ b/configs/ge_b850v3_defconfig > @@ -8,8 +8,6 @@ CONFIG_CMD_BOOTZ=y > CONFIG_CMD_MMC=y > CONFIG_CMD_SF=y > CONFIG_CMD_I2C=y > -CONFIG_CMD_USB=y > -CONFIG_CMD_USB_MASS_STORAGE=y > CONFIG_CMD_GPIO=y > CONFIG_CMD_DHCP=y > CONFIG_CMD_MII=y > diff --git a/include/configs/ge_bx50v3.h b/include/configs/ge_bx50v3.h > index 53f8689..602763f 100644 > --- a/include/configs/ge_bx50v3.h > +++ b/include/configs/ge_bx50v3.h > @@ -78,6 +78,7 @@ > #define CONFIG_DOS_PARTITION > > /* USB Configs */ > +#ifdef CONFIG_USB > #define CONFIG_USB_EHCI > #define CONFIG_USB_EHCI_MX6 > #define CONFIG_USB_STORAGE > @@ -99,6 +100,7 @@ > #define CONFIG_G_DNL_VENDOR_NUM 0x0525 > #define CONFIG_G_DNL_PRODUCT_NUM 0xa4a5 > #define CONFIG_G_DNL_MANUFACTURER "Advantech" > +#endif > > /* Networking Configs */ > #define CONFIG_FEC_MXC > @@ -221,13 +223,7 @@ > "bootm; " \ > "fi;\0" \ > > -#define CONFIG_BOOTCOMMAND \ > - "usb start; " \ > - "setenv dev usb; " \ > - "setenv devnum 0; " \ > - "setenv rootdev sda1; " \ > - "run tryboot; " \ > - \ > +#define CONFIG_MMCBOOTCOMMAND \ > "setenv dev mmc; " \ > "setenv rootdev mmcblk0p1; " \ > \ > @@ -241,9 +237,23 @@ > "if mmc dev ${devnum}; then " \ > "run tryboot; " \ > "fi; " \ > + > +#define CONFIG_USBBOOTCOMMAND \ > + "usb start; " \ > + "setenv dev usb; " \ > + "setenv devnum 0; " \ > + "setenv rootdev sda1; " \ > + "run tryboot; " \ > \ > + CONFIG_MMCBOOTCOMMAND \ > "bmode usb; " \ > > +#ifdef CONFIG_CMD_USB > +#define CONFIG_BOOTCOMMAND CONFIG_USBBOOTCOMMAND > +#else > +#define CONFIG_BOOTCOMMAND CONFIG_MMCBOOTCOMMAND > +#endif > + > #define CONFIG_ARP_TIMEOUT 200UL > > /* Miscellaneous configurable options */ > -- > 2.7.4 >
diff --git a/configs/ge_b450v3_defconfig b/configs/ge_b450v3_defconfig index ffa0440..98bf52e 100644 --- a/configs/ge_b450v3_defconfig +++ b/configs/ge_b450v3_defconfig @@ -8,8 +8,6 @@ CONFIG_CMD_BOOTZ=y CONFIG_CMD_MMC=y CONFIG_CMD_SF=y CONFIG_CMD_I2C=y -CONFIG_CMD_USB=y -CONFIG_CMD_USB_MASS_STORAGE=y CONFIG_CMD_GPIO=y CONFIG_CMD_DHCP=y CONFIG_CMD_MII=y diff --git a/configs/ge_b650v3_defconfig b/configs/ge_b650v3_defconfig index b039c24..b66c98b 100644 --- a/configs/ge_b650v3_defconfig +++ b/configs/ge_b650v3_defconfig @@ -8,8 +8,6 @@ CONFIG_CMD_BOOTZ=y CONFIG_CMD_MMC=y CONFIG_CMD_SF=y CONFIG_CMD_I2C=y -CONFIG_CMD_USB=y -CONFIG_CMD_USB_MASS_STORAGE=y CONFIG_CMD_GPIO=y CONFIG_CMD_DHCP=y CONFIG_CMD_MII=y diff --git a/configs/ge_b850v3_defconfig b/configs/ge_b850v3_defconfig index d9c8acd..1cd126a 100644 --- a/configs/ge_b850v3_defconfig +++ b/configs/ge_b850v3_defconfig @@ -8,8 +8,6 @@ CONFIG_CMD_BOOTZ=y CONFIG_CMD_MMC=y CONFIG_CMD_SF=y CONFIG_CMD_I2C=y -CONFIG_CMD_USB=y -CONFIG_CMD_USB_MASS_STORAGE=y CONFIG_CMD_GPIO=y CONFIG_CMD_DHCP=y CONFIG_CMD_MII=y diff --git a/include/configs/ge_bx50v3.h b/include/configs/ge_bx50v3.h index 53f8689..602763f 100644 --- a/include/configs/ge_bx50v3.h +++ b/include/configs/ge_bx50v3.h @@ -78,6 +78,7 @@ #define CONFIG_DOS_PARTITION /* USB Configs */ +#ifdef CONFIG_USB #define CONFIG_USB_EHCI #define CONFIG_USB_EHCI_MX6 #define CONFIG_USB_STORAGE @@ -99,6 +100,7 @@ #define CONFIG_G_DNL_VENDOR_NUM 0x0525 #define CONFIG_G_DNL_PRODUCT_NUM 0xa4a5 #define CONFIG_G_DNL_MANUFACTURER "Advantech" +#endif /* Networking Configs */ #define CONFIG_FEC_MXC @@ -221,13 +223,7 @@ "bootm; " \ "fi;\0" \ -#define CONFIG_BOOTCOMMAND \ - "usb start; " \ - "setenv dev usb; " \ - "setenv devnum 0; " \ - "setenv rootdev sda1; " \ - "run tryboot; " \ - \ +#define CONFIG_MMCBOOTCOMMAND \ "setenv dev mmc; " \ "setenv rootdev mmcblk0p1; " \ \ @@ -241,9 +237,23 @@ "if mmc dev ${devnum}; then " \ "run tryboot; " \ "fi; " \ + +#define CONFIG_USBBOOTCOMMAND \ + "usb start; " \ + "setenv dev usb; " \ + "setenv devnum 0; " \ + "setenv rootdev sda1; " \ + "run tryboot; " \ \ + CONFIG_MMCBOOTCOMMAND \ "bmode usb; " \ +#ifdef CONFIG_CMD_USB +#define CONFIG_BOOTCOMMAND CONFIG_USBBOOTCOMMAND +#else +#define CONFIG_BOOTCOMMAND CONFIG_MMCBOOTCOMMAND +#endif + #define CONFIG_ARP_TIMEOUT 200UL /* Miscellaneous configurable options */
The USB support is only useful for development and shouldn't be enabled in production, so it has to be disabled in U-boot by default. Signed-off-by: Andrew Shadura <andrew.shadura@collabora.co.uk> --- configs/ge_b450v3_defconfig | 2 -- configs/ge_b650v3_defconfig | 2 -- configs/ge_b850v3_defconfig | 2 -- include/configs/ge_bx50v3.h | 24 +++++++++++++++++------- 4 files changed, 17 insertions(+), 13 deletions(-)