[U-Boot] [PATCH 1/5] drivers: usb: musb: Fail if the ctrl mod register is missing

From: Sjoerd Simons sjoerd.simons@collabora.co.uk
If the trcl mode register address cannot be found error out rather then trying to continue (which cannot work)
Signed-off-by: Sjoerd Simons sjoerd.simons@collabora.co.uk --- drivers/usb/musb-new/ti-musb.c | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/drivers/usb/musb-new/ti-musb.c b/drivers/usb/musb-new/ti-musb.c index 20ca2731b49..725086928b3 100644 --- a/drivers/usb/musb-new/ti-musb.c +++ b/drivers/usb/musb-new/ti-musb.c @@ -90,6 +90,11 @@ static int ti_musb_ofdata_to_platdata(struct udevice *dev) phys = fdtdec_lookup_phandle(fdt, node, "phys"); ctrl_mod = fdtdec_lookup_phandle(fdt, phys, "ti,ctrl_mod"); platdata->ctrl_mod_base = (void *)fdtdec_get_addr(fdt, ctrl_mod, "reg"); + if (platdata->ctrl_mod_base == FDT_ADDR_T_NONE) { + pr_err("MUSB ctrl mod missing\n"); + return -ENOENT; + } + usb_index = ti_musb_get_usb_index(node); switch (usb_index) { case 1:

drivers/usb/musb-new/ti-musb.c: In function 'ti_musb_ofdata_to_platdata': drivers/usb/musb-new/ti-musb.c:93:30: warning: comparison between pointer and integer if (platdata->ctrl_mod_base == FDT_ADDR_T_NONE) {}
Signed-off-by: Adrian Ratiu adrian.ratiu@collabora.com --- drivers/usb/musb-new/ti-musb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/musb-new/ti-musb.c b/drivers/usb/musb-new/ti-musb.c index 725086928b3..3326c7e4702 100644 --- a/drivers/usb/musb-new/ti-musb.c +++ b/drivers/usb/musb-new/ti-musb.c @@ -90,7 +90,7 @@ static int ti_musb_ofdata_to_platdata(struct udevice *dev) phys = fdtdec_lookup_phandle(fdt, node, "phys"); ctrl_mod = fdtdec_lookup_phandle(fdt, phys, "ti,ctrl_mod"); platdata->ctrl_mod_base = (void *)fdtdec_get_addr(fdt, ctrl_mod, "reg"); - if (platdata->ctrl_mod_base == FDT_ADDR_T_NONE) { + if (platdata->ctrl_mod_base == (void *)FDT_ADDR_T_NONE) { pr_err("MUSB ctrl mod missing\n"); return -ENOENT; }

From: Sjoerd Simons sjoerd.simons@collabora.co.uk
spl_usb depends on FAT support, so don't try to build it if fat support is disabled for SPL.
Signed-off-by: Sjoerd Simons sjoerd.simons@collabora.co.uk --- common/spl/Makefile | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/common/spl/Makefile b/common/spl/Makefile index e1daabf1e9c..42db0441559 100644 --- a/common/spl/Makefile +++ b/common/spl/Makefile @@ -22,7 +22,9 @@ obj-$(CONFIG_$(SPL_TPL_)NET_SUPPORT) += spl_net.o obj-$(CONFIG_$(SPL_TPL_)MMC_SUPPORT) += spl_mmc.o obj-$(CONFIG_$(SPL_TPL_)ATF) += spl_atf.o obj-$(CONFIG_$(SPL_TPL_)OPTEE) += spl_optee.o +ifdef CONFIG_SPL_FS_FAT obj-$(CONFIG_$(SPL_TPL_)USB_SUPPORT) += spl_usb.o +endif obj-$(CONFIG_$(SPL_TPL_)FS_FAT) += spl_fat.o obj-$(CONFIG_$(SPL_TPL_)FS_EXT4) += spl_ext.o obj-$(CONFIG_$(SPL_TPL_)SATA_SUPPORT) += spl_sata.o

From: Sjoerd Simons sjoerd.simons@collabora.co.uk
If build into the SPL at least the MUSB USB driver needs the common usb functionality (e.g. parsing of the DR role dt property), so build this.
Signed-off-by: Sjoerd Simons sjoerd.simons@collabora.co.uk --- scripts/Makefile.spl | 1 + 1 file changed, 1 insertion(+)
diff --git a/scripts/Makefile.spl b/scripts/Makefile.spl index 9d5921606e1..52afe5bca8f 100644 --- a/scripts/Makefile.spl +++ b/scripts/Makefile.spl @@ -87,6 +87,7 @@ endif endif
libs-y += drivers/ +libs-$(CONFIG_SPL_USB_SUPPORT) += drivers/usb/common/ libs-$(CONFIG_SPL_USB_GADGET) += drivers/usb/dwc3/ libs-y += dts/ libs-y += fs/

From: Martyn Welch martyn.welch@collabora.co.uk
Despite the name it's also used for paths in distro configuration files (i.e. extlinux.conf). When using OSTree, it is very easy to reach the 127 character limit, thus increase to 256 bytes.
Signed-off-by: Martyn Welch martyn.welch@collabora.co.uk --- cmd/pxe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cmd/pxe.c b/cmd/pxe.c index 274555319ba..14022f13c69 100644 --- a/cmd/pxe.c +++ b/cmd/pxe.c @@ -18,7 +18,7 @@ #include "menu.h" #include "cli.h"
-#define MAX_TFTP_PATH_LEN 127 +#define MAX_TFTP_PATH_LEN 256
const char *pxe_default_paths[] = { #ifdef CONFIG_SYS_SOC
participants (1)
-
Adrian Ratiu