From a6cd597a78dd9b7fcaba6fe4891f29e86646541b Mon Sep 17 00:00:00 2001 From: Michael Walle Date: Sun, 1 Dec 2019 17:45:18 +0100 Subject: [PATCH 01/11] drivers: pci: ignore disabled devices PCI devices may be disabled in the device tree. Devices which are probed by the device tree handle the "status" property and are skipped if disabled. Devices which are probed by the PCI enumeration don't check that property. Fix it. Signed-off-by: Michael Walle Reviewed-by: Alex Marginean Tested-by: Alex Marginean Reviewed-by: Bin Meng --- drivers/pci/pci-uclass.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/pci/pci-uclass.c b/drivers/pci/pci-uclass.c index 896cb6b23a..fab20fc60e 100644 --- a/drivers/pci/pci-uclass.c +++ b/drivers/pci/pci-uclass.c @@ -677,6 +677,11 @@ static int pci_find_and_bind_driver(struct udevice *parent, /* Determine optional OF node */ pci_dev_find_ofnode(parent, bdf, &node); + if (ofnode_valid(node) && !ofnode_is_available(node)) { + debug("%s: Ignoring disabled device\n", __func__); + return -EPERM; + } + start = ll_entry_start(struct pci_driver_entry, pci_driver_entry); n_ents = ll_entry_count(struct pci_driver_entry, pci_driver_entry); for (entry = start; entry != start + n_ents; entry++) { From d4d65e1125459c8e8286684c8e84fdc7df9da062 Mon Sep 17 00:00:00 2001 From: Lukasz Majewski Date: Mon, 2 Dec 2019 10:24:16 +0100 Subject: [PATCH 02/11] spl: Introduce SPL_DM_GPIO Kconfig define This define indicates if DM_GPIO shall be supported in SPL. This allows proper operation of DM converted GPIO drivers in SPL, which use boards. Signed-off-by: Lukasz Majewski --- common/spl/Kconfig | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/common/spl/Kconfig b/common/spl/Kconfig index e11faae9ee..c8cb715c3a 100644 --- a/common/spl/Kconfig +++ b/common/spl/Kconfig @@ -485,6 +485,12 @@ config SPL_DMA_SUPPORT the CPU moving the data. Enable this option to build the drivers in drivers/dma as part of an SPL build. +config SPL_DM_GPIO + bool "Support Driver Model GPIO drivers" + depends on SPL_GPIO_SUPPORT && DM_GPIO + help + Enable support for Driver Model based GPIO drivers in SPL. + config SPL_DRIVERS_MISC_SUPPORT bool "Support misc drivers" help From ae0d12f8df7b6fe6f04f567e1dc9d5b760a394d1 Mon Sep 17 00:00:00 2001 From: Philippe Reynes Date: Mon, 2 Dec 2019 15:45:50 +0100 Subject: [PATCH 03/11] iminfo: add missing map_sysmem The command iminfo fails on sandbox because the address is used directly. To fix this issue, we call the function map_sysmem to translate the address. Signed-off-by: Philippe Reynes --- cmd/bootm.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/cmd/bootm.c b/cmd/bootm.c index 8279f2b7cc..62ee7c4b8a 100644 --- a/cmd/bootm.c +++ b/cmd/bootm.c @@ -19,6 +19,7 @@ #include #include #include +#include DECLARE_GLOBAL_DATA_PTR; @@ -244,7 +245,7 @@ static int do_iminfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) static int image_info(ulong addr) { - void *hdr = (void *)addr; + void *hdr = (void *)map_sysmem(addr, 0); printf("\n## Checking Image at %08lx ...\n", addr); @@ -254,11 +255,13 @@ static int image_info(ulong addr) puts(" Legacy image found\n"); if (!image_check_magic(hdr)) { puts(" Bad Magic Number\n"); + unmap_sysmem(hdr); return 1; } if (!image_check_hcrc(hdr)) { puts(" Bad Header Checksum\n"); + unmap_sysmem(hdr); return 1; } @@ -267,15 +270,18 @@ static int image_info(ulong addr) puts(" Verifying Checksum ... "); if (!image_check_dcrc(hdr)) { puts(" Bad Data CRC\n"); + unmap_sysmem(hdr); return 1; } puts("OK\n"); + unmap_sysmem(hdr); return 0; #endif #if defined(CONFIG_ANDROID_BOOT_IMAGE) case IMAGE_FORMAT_ANDROID: puts(" Android image found\n"); android_print_contents(hdr); + unmap_sysmem(hdr); return 0; #endif #if defined(CONFIG_FIT) @@ -284,6 +290,7 @@ static int image_info(ulong addr) if (!fit_check_format(hdr)) { puts("Bad FIT image format!\n"); + unmap_sysmem(hdr); return 1; } @@ -291,9 +298,11 @@ static int image_info(ulong addr) if (!fit_all_image_verify(hdr)) { puts("Bad hash in FIT image!\n"); + unmap_sysmem(hdr); return 1; } + unmap_sysmem(hdr); return 0; #endif default: @@ -301,6 +310,7 @@ static int image_info(ulong addr) break; } + unmap_sysmem(hdr); return 1; } From 787f10a9d2553f89e382e7ed09c2cf6b3b1d70cf Mon Sep 17 00:00:00 2001 From: Philippe Reynes Date: Mon, 2 Dec 2019 17:33:22 +0100 Subject: [PATCH 04/11] cmd: cp: add missing map_sysmem The command cp fails on sandbox because the address is used directly. To fix this issue, we call the function map_sysmem to translate the address. Signed-off-by: Philippe Reynes --- cmd/mem.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/cmd/mem.c b/cmd/mem.c index 545534b1fc..4ec450b050 100644 --- a/cmd/mem.c +++ b/cmd/mem.c @@ -303,6 +303,7 @@ static int do_mem_cmp(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) static int do_mem_cp(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { ulong addr, dest, count; + void *src, *dst; int size; if (argc != 4) @@ -326,25 +327,34 @@ static int do_mem_cp(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) return 1; } + src = map_sysmem(addr, count * size); + dst = map_sysmem(dest, count * size); + #ifdef CONFIG_MTD_NOR_FLASH /* check if we are copying to Flash */ - if (addr2info(dest) != NULL) { + if (addr2info((ulong)dst)) { int rc; puts ("Copy to Flash... "); - rc = flash_write ((char *)addr, dest, count*size); + rc = flash_write((char *)src, (ulong)dst, count * size); if (rc != 0) { flash_perror (rc); + unmap_sysmem(src); + unmap_sysmem(dst); return (1); } puts ("done\n"); + unmap_sysmem(src); + unmap_sysmem(dst); return 0; } #endif - memcpy((void *)dest, (void *)addr, count * size); + memcpy(dst, src, count * size); + unmap_sysmem(src); + unmap_sysmem(dst); return 0; } From 2464b229b5ab281d8698aa0f4d4de6d4d3fabf7d Mon Sep 17 00:00:00 2001 From: Jorge Ramirez-Ortiz Date: Tue, 26 Nov 2019 17:19:34 +0100 Subject: [PATCH 05/11] drivers: optee: rpmb: fix returning CID to TEE The mmc CID value is one of the input parameters used to provision the RPMB key. The trusted execution environment expects this value to be specified in big endian format. Before this fix, on little endian systems, the value returned by the linux kernel mmc driver differed from the one returned by u-boot. This meant that if linux provisioned the RPMB key, u-boot would not have access to the partition (and the other way around). Signed-off-by: Jorge Ramirez-Ortiz Reviewed-by: Jens Wiklander --- drivers/tee/optee/rpmb.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/tee/optee/rpmb.c b/drivers/tee/optee/rpmb.c index 955155b3f8..cf1ce77e6e 100644 --- a/drivers/tee/optee/rpmb.c +++ b/drivers/tee/optee/rpmb.c @@ -98,6 +98,7 @@ static struct mmc *get_mmc(struct optee_private *priv, int dev_id) static u32 rpmb_get_dev_info(u16 dev_id, struct rpmb_dev_info *info) { struct mmc *mmc = find_mmc_device(dev_id); + int i; if (!mmc) return TEE_ERROR_ITEM_NOT_FOUND; @@ -105,7 +106,9 @@ static u32 rpmb_get_dev_info(u16 dev_id, struct rpmb_dev_info *info) if (!mmc->ext_csd) return TEE_ERROR_GENERIC; - memcpy(info->cid, mmc->cid, sizeof(info->cid)); + for (i = 0; i < ARRAY_SIZE(mmc->cid); i++) + ((u32 *) info->cid)[i] = cpu_to_be32(mmc->cid[i]); + info->rel_wr_sec_c = mmc->ext_csd[222]; info->rpmb_size_mult = mmc->ext_csd[168]; info->ret_code = RPMB_CMD_GET_DEV_INFO_RET_OK; From 39606d462c97408fa10c41206631e64225458636 Mon Sep 17 00:00:00 2001 From: AKASHI Takahiro Date: Tue, 26 Nov 2019 17:29:31 +0900 Subject: [PATCH 06/11] fs: fat: handle deleted directory entries correctly Unlink test for FAT file system seems to fail at test_unlink2. (When I added this test, I haven't seen any errors though.) for example, ===8<=== fs_obj_unlink = ['fat', '/home/akashi/tmp/uboot_sandbox_test/128MB.fat32.img'] def test_unlink2(self, u_boot_console, fs_obj_unlink): """ Test Case 2 - delete many files """ fs_type,fs_img = fs_obj_unlink with u_boot_console.log.section('Test Case 2 - unlink (many)'): output = u_boot_console.run_command('host bind 0 %s' % fs_img) for i in range(0, 20): output = u_boot_console.run_command_list([ '%srm host 0:0 dir2/0123456789abcdef%02x' % (fs_type, i), '%sls host 0:0 dir2/0123456789abcdef%02x' % (fs_type, i)]) assert('' == ''.join(output)) output = u_boot_console.run_command( '%sls host 0:0 dir2' % fs_type) > assert('0 file(s), 2 dir(s)' in output) E AssertionError: assert '0 file(s), 2 dir(s)' in ' ./\r\r\n ../\r\r\n 0 0123456789abcdef11\r\r\n\r\r\n1 file(s), 2 dir(s)' test/py/tests/test_fs/test_unlink.py:52: AssertionError ===>8=== This can happen when fat_itr_next() wrongly detects an already- deleted directory entry. File deletion, which was added in the commit f8240ce95d64 ("fs: fat: support unlink"), is implemented by marking its entry for a short name with DELETED_FLAG, but related entry slots for a long file name are kept unmodified. (So entries will never be actually deleted from media.) To handle this case correctly, an additional check for a directory slot will be needed in fat_itr_next(). In addition, I added extra comments about long file name and short file name format in FAT file system. Although they are not directly related to the issue, I hope it will be helpful for better understandings in general. Signed-off-by: AKASHI Takahiro --- fs/fat/fat.c | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/fs/fat/fat.c b/fs/fat/fat.c index 9e1b842dac..68ce658386 100644 --- a/fs/fat/fat.c +++ b/fs/fat/fat.c @@ -869,6 +869,14 @@ static dir_entry *extract_vfat_name(fat_itr *itr) return NULL; } + /* + * We are now at the short file name entry. + * If it is marked as deleted, just skip it. + */ + if (dent->name[0] == DELETED_FLAG || + dent->name[0] == aRING) + return NULL; + itr->l_name[n] = '\0'; chksum = mkcksum(dent->name, dent->ext); @@ -898,6 +906,16 @@ static int fat_itr_next(fat_itr *itr) itr->name = NULL; + /* + * One logical directory entry consist of following slots: + * name[0] Attributes + * dent[N - N]: LFN[N - 1] N|0x40 ATTR_VFAT + * ... + * dent[N - 2]: LFN[1] 2 ATTR_VFAT + * dent[N - 1]: LFN[0] 1 ATTR_VFAT + * dent[N]: SFN ATTR_ARCH + */ + while (1) { dent = next_dent(itr); if (!dent) @@ -910,7 +928,17 @@ static int fat_itr_next(fat_itr *itr) if (dent->attr & ATTR_VOLUME) { if ((dent->attr & ATTR_VFAT) == ATTR_VFAT && (dent->name[0] & LAST_LONG_ENTRY_MASK)) { + /* long file name */ dent = extract_vfat_name(itr); + /* + * If succeeded, dent has a valid short file + * name entry for the current entry. + * If failed, itr points to a current bogus + * entry. So after fetching a next one, + * it may have a short file name entry + * for this bogus entry so that we can still + * check for a short name. + */ if (!dent) continue; itr->name = itr->l_name; @@ -919,8 +947,11 @@ static int fat_itr_next(fat_itr *itr) /* Volume label or VFAT entry, skip */ continue; } - } + } else if (!(dent->attr & ATTR_ARCH) && + !(dent->attr & ATTR_DIR)) + continue; + /* short file name */ break; } From 995237b04921574c3922734005d1493d5ec8be97 Mon Sep 17 00:00:00 2001 From: AKASHI Takahiro Date: Tue, 26 Nov 2019 17:28:49 +0900 Subject: [PATCH 07/11] test/py: test_fs: add tests for creating/deleting many files # This is actually a resent patch of # [1] https://lists.denx.de/pipermail/u-boot/2019-May/369170.html Two test cases are added under test_fs_ext: test case 10: for root directory test case 11: for non-root directory Those will verify a behavior fixed by the commits related to root directory ("fs: fat: allocate a new cluster for root directory of fat32" and "fs: fat: flush a directory cluster properly"), and focus on handling long-file-name directory entries under a directory. Signed-off-by: AKASHI Takahiro --- test/py/tests/test_fs/test_ext.py | 84 +++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) diff --git a/test/py/tests/test_fs/test_ext.py b/test/py/tests/test_fs/test_ext.py index 2c47738b8d..6b7fc48701 100644 --- a/test/py/tests/test_fs/test_ext.py +++ b/test/py/tests/test_fs/test_ext.py @@ -233,3 +233,87 @@ class TestFsExt(object): % (fs_type, ADDR, MIN_FILE)]) assert('Unable to write "/dir1' in ''.join(output)) assert_fs_integrity(fs_type, fs_img) + + def test_fs_ext10(self, u_boot_console, fs_obj_ext): + """ + 'Test Case 10 - create/delete as many directories under root directory + as amount of directory entries goes beyond one cluster size)' + """ + fs_type,fs_img,md5val = fs_obj_ext + with u_boot_console.log.section('Test Case 10 - create/delete (many)'): + # Test Case 10a - Create many files + # Please note that the size of directory entry is 32 bytes. + # So one typical cluster may holds 64 (2048/32) entries. + output = u_boot_console.run_command( + 'host bind 0 %s' % fs_img) + + for i in range(0, 66): + output = u_boot_console.run_command( + '%swrite host 0:0 %x /FILE0123456789_%02x 100' + % (fs_type, ADDR, i)) + output = u_boot_console.run_command('%sls host 0:0 /' % fs_type) + assert('FILE0123456789_00' in output) + assert('FILE0123456789_41' in output) + + # Test Case 10b - Delete many files + for i in range(0, 66): + output = u_boot_console.run_command( + '%srm host 0:0 /FILE0123456789_%02x' + % (fs_type, i)) + output = u_boot_console.run_command('%sls host 0:0 /' % fs_type) + assert(not 'FILE0123456789_00' in output) + assert(not 'FILE0123456789_41' in output) + + # Test Case 10c - Create many files again + # Please note no.64 and 65 are intentionally re-created + for i in range(64, 128): + output = u_boot_console.run_command( + '%swrite host 0:0 %x /FILE0123456789_%02x 100' + % (fs_type, ADDR, i)) + output = u_boot_console.run_command('%sls host 0:0 /' % fs_type) + assert('FILE0123456789_40' in output) + assert('FILE0123456789_79' in output) + + assert_fs_integrity(fs_type, fs_img) + + def test_fs_ext11(self, u_boot_console, fs_obj_ext): + """ + 'Test Case 11 - create/delete as many directories under non-root + directory as amount of directory entries goes beyond one cluster size)' + """ + fs_type,fs_img,md5val = fs_obj_ext + with u_boot_console.log.section('Test Case 11 - create/delete (many)'): + # Test Case 11a - Create many files + # Please note that the size of directory entry is 32 bytes. + # So one typical cluster may holds 64 (2048/32) entries. + output = u_boot_console.run_command( + 'host bind 0 %s' % fs_img) + + for i in range(0, 66): + output = u_boot_console.run_command( + '%swrite host 0:0 %x /dir1/FILE0123456789_%02x 100' + % (fs_type, ADDR, i)) + output = u_boot_console.run_command('%sls host 0:0 /dir1' % fs_type) + assert('FILE0123456789_00' in output) + assert('FILE0123456789_41' in output) + + # Test Case 11b - Delete many files + for i in range(0, 66): + output = u_boot_console.run_command( + '%srm host 0:0 /dir1/FILE0123456789_%02x' + % (fs_type, i)) + output = u_boot_console.run_command('%sls host 0:0 /dir1' % fs_type) + assert(not 'FILE0123456789_00' in output) + assert(not 'FILE0123456789_41' in output) + + # Test Case 11c - Create many files again + # Please note no.64 and 65 are intentionally re-created + for i in range(64, 128): + output = u_boot_console.run_command( + '%swrite host 0:0 %x /dir1/FILE0123456789_%02x 100' + % (fs_type, ADDR, i)) + output = u_boot_console.run_command('%sls host 0:0 /dir1' % fs_type) + assert('FILE0123456789_40' in output) + assert('FILE0123456789_79' in output) + + assert_fs_integrity(fs_type, fs_img) From d3e97b53c1f2464f4898226de7d89abf242e4aa8 Mon Sep 17 00:00:00 2001 From: Giulio Benetti Date: Mon, 25 Nov 2019 17:18:20 +0100 Subject: [PATCH 08/11] spl: fix entry_point equal to load_addr At the moment entry_point is set to image_get_load(header) that sets it to "load address" instead of "entry point", assuming entry_point is equal to load_addr, but it's not true. Then load_addr is set to "entry_point - header_size", but this is wrong too since load_addr is not an entry point. So use image_get_ep() for entry_point assignment and image_get_load() for load_addr assignment. Signed-off-by: Giulio Benetti --- common/spl/spl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/spl/spl.c b/common/spl/spl.c index d51dbe9942..24da164b43 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -264,9 +264,9 @@ int spl_parse_image_header(struct spl_image_info *spl_image, spl_image->entry_point = image_get_ep(header); spl_image->size = image_get_data_size(header); } else { - spl_image->entry_point = image_get_load(header); + spl_image->entry_point = image_get_ep(header); /* Load including the header */ - spl_image->load_addr = spl_image->entry_point - + spl_image->load_addr = image_get_load(header) - header_size; spl_image->size = image_get_data_size(header) + header_size; From 81b564353dfbe1360649292b719c8099403e1b28 Mon Sep 17 00:00:00 2001 From: Adam Ford Date: Wed, 13 Nov 2019 07:42:00 -0600 Subject: [PATCH 09/11] ARM: da850-evm: Disable SYS_MMCSD_RAW_MODE_USE_SECTOR The da850-evm doesn't have the boot pins configured in a way to make MMC/SD booting an option, and MMC/SD support is not enabled in SPL. Therefore, there is no need to support raw mode mmc/sd support in SPL. This patch disables CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR Signed-off-by: Adam Ford --- configs/da850evm_defconfig | 1 + configs/da850evm_nand_defconfig | 1 + 2 files changed, 2 insertions(+) diff --git a/configs/da850evm_defconfig b/configs/da850evm_defconfig index 5ff2360a39..b07c4b0d6d 100644 --- a/configs/da850evm_defconfig +++ b/configs/da850evm_defconfig @@ -26,6 +26,7 @@ CONFIG_VERSION_VARIABLE=y CONFIG_BOARD_EARLY_INIT_F=y CONFIG_SPL_SYS_MALLOC_SIMPLE=y CONFIG_SPL_SEPARATE_BSS=y +# CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR is not set CONFIG_SPL_SPI_LOAD=y CONFIG_SYS_SPI_U_BOOT_OFFS=0x8000 CONFIG_HUSH_PARSER=y diff --git a/configs/da850evm_nand_defconfig b/configs/da850evm_nand_defconfig index 7d62e08d94..f787531944 100644 --- a/configs/da850evm_nand_defconfig +++ b/configs/da850evm_nand_defconfig @@ -23,6 +23,7 @@ CONFIG_VERSION_VARIABLE=y CONFIG_BOARD_EARLY_INIT_F=y CONFIG_SPL_SYS_MALLOC_SIMPLE=y CONFIG_SPL_SEPARATE_BSS=y +# CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR is not set CONFIG_SPL_NAND_SUPPORT=y CONFIG_SPL_SPI_LOAD=y CONFIG_SYS_SPI_U_BOOT_OFFS=0x8000 From 9f67b56772c2c25050fadf0766174c3c35a49995 Mon Sep 17 00:00:00 2001 From: Thomas Hebb Date: Sun, 10 Nov 2019 08:23:15 -0800 Subject: [PATCH 10/11] Fix typo in macros, "FIRMEWARE" -> "FIRMWARE" Signed-off-by: Thomas Hebb --- arch/arm/cpu/armv8/Kconfig | 2 +- arch/arm/cpu/armv8/sec_firmware.c | 8 ++++---- drivers/net/pfe_eth/pfe_firmware.c | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/arch/arm/cpu/armv8/Kconfig b/arch/arm/cpu/armv8/Kconfig index 92a2b58ed4..16c83e8614 100644 --- a/arch/arm/cpu/armv8/Kconfig +++ b/arch/arm/cpu/armv8/Kconfig @@ -65,7 +65,7 @@ config ARMV8_SEC_FIRMWARE_SUPPORT - Address of secure firmware. - Address to hold the return address from secure firmware. - Secure firmware FIT image related information. - Such as: SEC_FIRMWARE_FIT_IMAGE and SEC_FIRMEWARE_FIT_CNF_NAME + Such as: SEC_FIRMWARE_FIT_IMAGE and SEC_FIRMWARE_FIT_CNF_NAME - The target exception level that secure monitor firmware will return to. diff --git a/arch/arm/cpu/armv8/sec_firmware.c b/arch/arm/cpu/armv8/sec_firmware.c index 4dcda70b91..95ea57d571 100644 --- a/arch/arm/cpu/armv8/sec_firmware.c +++ b/arch/arm/cpu/armv8/sec_firmware.c @@ -29,8 +29,8 @@ phys_addr_t sec_firmware_addr; #ifndef SEC_FIRMWARE_FIT_IMAGE #define SEC_FIRMWARE_FIT_IMAGE "firmware" #endif -#ifndef SEC_FIRMEWARE_FIT_CNF_NAME -#define SEC_FIRMEWARE_FIT_CNF_NAME "config-1" +#ifndef SEC_FIRMWARE_FIT_CNF_NAME +#define SEC_FIRMWARE_FIT_CNF_NAME "config-1" #endif #ifndef SEC_FIRMWARE_TARGET_EL #define SEC_FIRMWARE_TARGET_EL 2 @@ -44,7 +44,7 @@ static int sec_firmware_get_data(const void *sec_firmware_img, char *desc; int ret; - conf_node_name = SEC_FIRMEWARE_FIT_CNF_NAME; + conf_node_name = SEC_FIRMWARE_FIT_CNF_NAME; conf_node_off = fit_conf_get_node(sec_firmware_img, conf_node_name); if (conf_node_off < 0) { @@ -124,7 +124,7 @@ static int sec_firmware_check_copy_loadable(const void *sec_firmware_img, const char *name, *str, *type; int len; - conf_node_name = SEC_FIRMEWARE_FIT_CNF_NAME; + conf_node_name = SEC_FIRMWARE_FIT_CNF_NAME; conf_node_off = fit_conf_get_node(sec_firmware_img, conf_node_name); if (conf_node_off < 0) { diff --git a/drivers/net/pfe_eth/pfe_firmware.c b/drivers/net/pfe_eth/pfe_firmware.c index adb2d06010..e4563f192b 100644 --- a/drivers/net/pfe_eth/pfe_firmware.c +++ b/drivers/net/pfe_eth/pfe_firmware.c @@ -16,7 +16,7 @@ #include #endif -#define PFE_FIRMEWARE_FIT_CNF_NAME "config@1" +#define PFE_FIRMWARE_FIT_CNF_NAME "config@1" static const void *pfe_fit_addr = (void *)CONFIG_SYS_LS_PFE_FW_ADDR; @@ -99,7 +99,7 @@ static int pfe_get_fw(const void **data, char *desc; int ret = 0; - conf_node_name = PFE_FIRMEWARE_FIT_CNF_NAME; + conf_node_name = PFE_FIRMWARE_FIT_CNF_NAME; conf_node_off = fit_conf_get_node(pfe_fit_addr, conf_node_name); if (conf_node_off < 0) { From 8cc738b9fcb5c1b140c721cb4f994ceb185c4c0c Mon Sep 17 00:00:00 2001 From: Adam Ford Date: Sun, 10 Nov 2019 06:33:40 -0600 Subject: [PATCH 11/11] ARM: omapl138_lcdk: Shrink code size by building with Thumb SPL has limited available resources, and the performance between ARM and Thumb isn't that significant. This patch builds using Thumb instruction set to reduce the code size by nearly 6K. Original: text data bss dec hex filename 26526 4004 1376 31906 7ca2 spl/u-boot-spl Thumb: text data bss dec hex filename 20232 4004 1376 25612 640c spl/u-boot-spl Signed-off-by: Adam Ford Tested-by: Bartosz Golaszewski Reviewed-by: Bartosz Golaszewski --- configs/omapl138_lcdk_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/omapl138_lcdk_defconfig b/configs/omapl138_lcdk_defconfig index 624195c7b6..c021e8f564 100644 --- a/configs/omapl138_lcdk_defconfig +++ b/configs/omapl138_lcdk_defconfig @@ -1,4 +1,5 @@ CONFIG_ARM=y +CONFIG_SYS_THUMB_BUILD=y CONFIG_ARCH_DAVINCI=y CONFIG_SYS_TEXT_BASE=0xc1080000 CONFIG_TARGET_OMAPL138_LCDK=y