[U-Boot] [PATCH 3/5] spl: Add ability to disable SPL FAT
From: Sjoerd Simons 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 --- 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 -- 2.20.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 4/5] spl: Add common usb support in spl if needed
From: Sjoerd Simons 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 --- 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/ -- 2.20.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 1/5] drivers: usb: musb: Fail if the ctrl mod register is missing
From: Sjoerd Simons If the trcl mode register address cannot be found error out rather then trying to continue (which cannot work) Signed-off-by: Sjoerd Simons --- 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: -- 2.20.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 5/5] cmd: pxe: Increase MAX_TFTP_PATH_LEN to 256
From: Martyn Welch 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 --- 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 -- 2.20.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 2/5] drivers: usb: musb: Fix comparison between pointer and integer warn
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 --- 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; } -- 2.20.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH] fw_printenv: Don't bail out directly after one env read error
From: Joe Hershberger When using a redundant environment a read error should simply mean to not use that copy instead of giving up completely. The other copy may be just fine. Signed-off-by: Joe Hershberger Signed-off-by: Ioan-Adrian Ratiu --- tools/env/fw_env.c | 24 +++- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/tools/env/fw_env.c b/tools/env/fw_env.c index a5d75958e1..3a5ad026f0 100644 --- a/tools/env/fw_env.c +++ b/tools/env/fw_env.c @@ -1427,14 +1427,21 @@ int fw_env_open(struct env_opts *opts) } dev_current = 0; - if (flash_io(O_RDONLY)) { + + if (!flash_io(O_RDONLY)) { + crc0 = crc32(0, (uint8_t *)environment.data, ENV_SIZE); + crc0_ok = (crc0 == *environment.crc); + } else if (have_redund_env) { + /* +* to give the redundant env a chance, maybe it's good: +* mark env crc0 invalid then test below if crc1 is ok +*/ + crc0_ok = 0; + } else { ret = -EIO; goto open_cleanup; } - crc0 = crc32(0, (uint8_t *)environment.data, ENV_SIZE); - - crc0_ok = (crc0 == *environment.crc); if (!have_redund_env) { if (!crc0_ok) { fprintf(stderr, @@ -1462,8 +1469,10 @@ int fw_env_open(struct env_opts *opts) */ environment.image = addr1; if (flash_io(O_RDONLY)) { - ret = -EIO; - goto open_cleanup; + crc1_ok = 0; + } else { + crc1 = crc32(0, (uint8_t *)redundant->data, ENV_SIZE); + crc1_ok = (crc1 == redundant->crc); } /* Check flag scheme compatibility */ @@ -1489,9 +1498,6 @@ int fw_env_open(struct env_opts *opts) goto open_cleanup; } - crc1 = crc32(0, (uint8_t *)redundant->data, ENV_SIZE); - - crc1_ok = (crc1 == redundant->crc); flag1 = redundant->flags; if (crc0_ok && !crc1_ok) { -- 2.17.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot