[PATCH 0/3] arm64: layerscape: Various small size reductions for SPL

This series groups a few small size reductions I found while trying to reduce my SPL size. They are all independent of each other.
Sean Anderson (3): arm: layerscape: Don't select FSL_IFC when booting from SD card arm: layerscape: Disable unused parts of ICID tables arm: fsl: csu: Reduce size of ns_dev
arch/arm/cpu/armv8/fsl-layerscape/Kconfig | 4 ++-- arch/arm/cpu/armv8/fsl-layerscape/icid.c | 2 ++ .../include/asm/arch-fsl-layerscape/fsl_icid.h | 16 ++++++++++++++-- include/fsl_csu.h | 4 ++-- 4 files changed, 20 insertions(+), 6 deletions(-)

FSL_IFC should only be selected when booting from NAND flash (or when NAND_FSL_IFC is enabled). The existing logic does this correctly when QSPI is also enabled, but not when just booting from SD.
Signed-off-by: Sean Anderson sean.anderson@seco.com ---
arch/arm/cpu/armv8/fsl-layerscape/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/Kconfig b/arch/arm/cpu/armv8/fsl-layerscape/Kconfig index 80a1642447d..10eef84f8d9 100644 --- a/arch/arm/cpu/armv8/fsl-layerscape/Kconfig +++ b/arch/arm/cpu/armv8/fsl-layerscape/Kconfig @@ -62,7 +62,7 @@ config ARCH_LS1043A bool select ARMV8_SET_SMPEN select ARM_ERRATA_855873 if !TFABOOT - select FSL_IFC if TFABOOT || (!QSPI_BOOT && !SD_BOOT_QSPI) + select FSL_IFC if TFABOOT || (!QSPI_BOOT && !SD_BOOT_QSPI || !SD_BOOT) select FSL_LAYERSCAPE select FSL_LSCH2 select GICV2 @@ -98,7 +98,7 @@ config ARCH_LS1043A config ARCH_LS1046A bool select ARMV8_SET_SMPEN - select FSL_IFC if TFABOOT || (!QSPI_BOOT && !SD_BOOT_QSPI) + select FSL_IFC if TFABOOT || (!QSPI_BOOT && !SD_BOOT_QSPI && !SD_BOOT) select FSL_LAYERSCAPE select FSL_LSCH2 select GICV2

On 10/12/2022 5:51 AM, Sean Anderson wrote:
FSL_IFC should only be selected when booting from NAND flash (or when NAND_FSL_IFC is enabled). The existing logic does this correctly when QSPI is also enabled, but not when just booting from SD.
Signed-off-by: Sean Anderson sean.anderson@seco.com
Reviewed-by: Peng Fan peng.fan@nxp.com
arch/arm/cpu/armv8/fsl-layerscape/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/Kconfig b/arch/arm/cpu/armv8/fsl-layerscape/Kconfig index 80a1642447d..10eef84f8d9 100644 --- a/arch/arm/cpu/armv8/fsl-layerscape/Kconfig +++ b/arch/arm/cpu/armv8/fsl-layerscape/Kconfig @@ -62,7 +62,7 @@ config ARCH_LS1043A bool select ARMV8_SET_SMPEN select ARM_ERRATA_855873 if !TFABOOT
- select FSL_IFC if TFABOOT || (!QSPI_BOOT && !SD_BOOT_QSPI)
- select FSL_IFC if TFABOOT || (!QSPI_BOOT && !SD_BOOT_QSPI || !SD_BOOT) select FSL_LAYERSCAPE select FSL_LSCH2 select GICV2
@@ -98,7 +98,7 @@ config ARCH_LS1043A config ARCH_LS1046A bool select ARMV8_SET_SMPEN
- select FSL_IFC if TFABOOT || (!QSPI_BOOT && !SD_BOOT_QSPI)
- select FSL_IFC if TFABOOT || (!QSPI_BOOT && !SD_BOOT_QSPI && !SD_BOOT) select FSL_LAYERSCAPE select FSL_LSCH2 select GICV2

Several parts of the ICID table are only necessary for U-Boot proper. Disable them in SPL. This saves around 500 bytes.
Signed-off-by: Sean Anderson sean.anderson@seco.com ---
arch/arm/cpu/armv8/fsl-layerscape/icid.c | 2 ++ .../include/asm/arch-fsl-layerscape/fsl_icid.h | 16 ++++++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/icid.c b/arch/arm/cpu/armv8/fsl-layerscape/icid.c index 25cd82f16eb..2d87281ec21 100644 --- a/arch/arm/cpu/armv8/fsl-layerscape/icid.c +++ b/arch/arm/cpu/armv8/fsl-layerscape/icid.c @@ -46,6 +46,7 @@ void set_icids(void) #endif }
+#ifndef CONFIG_SPL_BUILD int fdt_set_iommu_prop(void *blob, int off, int smmu_ph, u32 *ids, int num_ids) { int i, ret; @@ -190,3 +191,4 @@ void fdt_fixup_icid(void *blob) fdt_fixup_fman_icids(blob, smmu_ph); #endif } +#endif diff --git a/arch/arm/include/asm/arch-fsl-layerscape/fsl_icid.h b/arch/arm/include/asm/arch-fsl-layerscape/fsl_icid.h index 3c06a55cb85..8af0d35d27b 100644 --- a/arch/arm/include/asm/arch-fsl-layerscape/fsl_icid.h +++ b/arch/arm/include/asm/arch-fsl-layerscape/fsl_icid.h @@ -12,11 +12,15 @@ #include <asm/armv8/sec_firmware.h>
struct icid_id_table { +#ifndef CONFIG_SPL_BUILD const char *compat; - u32 id; - u32 reg; phys_addr_t compat_addr; +#endif phys_addr_t reg_addr; + u32 reg; +#ifndef CONFIG_SPL_BUILD + u32 id; +#endif bool le; };
@@ -31,6 +35,13 @@ int fdt_set_iommu_prop(void *blob, int off, int smmu_ph, u32 *ids, int num_ids); void set_icids(void); void fdt_fixup_icid(void *blob);
+#ifdef CONFIG_SPL_BUILD +#define SET_ICID_ENTRY(name, idA, regA, addr, compataddr, _le) \ + { .reg = regA, \ + .reg_addr = addr, \ + .le = _le \ + } +#else #define SET_ICID_ENTRY(name, idA, regA, addr, compataddr, _le) \ { .compat = name, \ .id = idA, \ @@ -39,6 +50,7 @@ void fdt_fixup_icid(void *blob); .reg_addr = addr, \ .le = _le \ } +#endif
#ifdef CONFIG_SYS_FSL_SEC_LE #define SEC_IS_LE true

On 10/12/2022 5:51 AM, Sean Anderson wrote:
Several parts of the ICID table are only necessary for U-Boot proper. Disable them in SPL. This saves around 500 bytes.
Signed-off-by: Sean Anderson sean.anderson@seco.com
Reviewed-by: Peng Fan peng.fan@nxp.com
arch/arm/cpu/armv8/fsl-layerscape/icid.c | 2 ++ .../include/asm/arch-fsl-layerscape/fsl_icid.h | 16 ++++++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/icid.c b/arch/arm/cpu/armv8/fsl-layerscape/icid.c index 25cd82f16eb..2d87281ec21 100644 --- a/arch/arm/cpu/armv8/fsl-layerscape/icid.c +++ b/arch/arm/cpu/armv8/fsl-layerscape/icid.c @@ -46,6 +46,7 @@ void set_icids(void) #endif }
+#ifndef CONFIG_SPL_BUILD int fdt_set_iommu_prop(void *blob, int off, int smmu_ph, u32 *ids, int num_ids) { int i, ret; @@ -190,3 +191,4 @@ void fdt_fixup_icid(void *blob) fdt_fixup_fman_icids(blob, smmu_ph); #endif } +#endif diff --git a/arch/arm/include/asm/arch-fsl-layerscape/fsl_icid.h b/arch/arm/include/asm/arch-fsl-layerscape/fsl_icid.h index 3c06a55cb85..8af0d35d27b 100644 --- a/arch/arm/include/asm/arch-fsl-layerscape/fsl_icid.h +++ b/arch/arm/include/asm/arch-fsl-layerscape/fsl_icid.h @@ -12,11 +12,15 @@ #include <asm/armv8/sec_firmware.h>
struct icid_id_table { +#ifndef CONFIG_SPL_BUILD const char *compat;
- u32 id;
- u32 reg; phys_addr_t compat_addr;
+#endif phys_addr_t reg_addr;
- u32 reg;
+#ifndef CONFIG_SPL_BUILD
- u32 id;
+#endif bool le; };
@@ -31,6 +35,13 @@ int fdt_set_iommu_prop(void *blob, int off, int smmu_ph, u32 *ids, int num_ids); void set_icids(void); void fdt_fixup_icid(void *blob);
+#ifdef CONFIG_SPL_BUILD +#define SET_ICID_ENTRY(name, idA, regA, addr, compataddr, _le) \
- { .reg = regA, \
.reg_addr = addr, \
.le = _le \
- }
+#else #define SET_ICID_ENTRY(name, idA, regA, addr, compataddr, _le) \ { .compat = name, \ .id = idA, \ @@ -39,6 +50,7 @@ void fdt_fixup_icid(void *blob); .reg_addr = addr, \ .le = _le \ } +#endif
#ifdef CONFIG_SYS_FSL_SEC_LE #define SEC_IS_LE true

None of the values in this struct are larger than 256, so we can reduce the members to u8s. This saves around 1K.
Signed-off-by: Sean Anderson sean.anderson@seco.com ---
include/fsl_csu.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/fsl_csu.h b/include/fsl_csu.h index 0e59ac3c324..40c29687979 100644 --- a/include/fsl_csu.h +++ b/include/fsl_csu.h @@ -24,8 +24,8 @@ enum csu_cslx_access { };
struct csu_ns_dev { - unsigned long ind; - uint32_t val; + u8 ind; + u8 val; };
void enable_layerscape_ns_access(void);

On 10/12/2022 5:51 AM, Sean Anderson wrote:
None of the values in this struct are larger than 256, so we can reduce the members to u8s. This saves around 1K.
Signed-off-by: Sean Anderson sean.anderson@seco.com
Reviewed-by: Peng Fan peng.fan@nxp.com
include/fsl_csu.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/fsl_csu.h b/include/fsl_csu.h index 0e59ac3c324..40c29687979 100644 --- a/include/fsl_csu.h +++ b/include/fsl_csu.h @@ -24,8 +24,8 @@ enum csu_cslx_access { };
struct csu_ns_dev {
- unsigned long ind;
- uint32_t val;
u8 ind;
u8 val; };
void enable_layerscape_ns_access(void);

Hi NXP Folks,
On 10/11/22 5:51 PM, Sean Anderson wrote:
This series groups a few small size reductions I found while trying to reduce my SPL size. They are all independent of each other.
Sean Anderson (3): arm: layerscape: Don't select FSL_IFC when booting from SD card arm: layerscape: Disable unused parts of ICID tables arm: fsl: csu: Reduce size of ns_dev
arch/arm/cpu/armv8/fsl-layerscape/Kconfig | 4 ++-- arch/arm/cpu/armv8/fsl-layerscape/icid.c | 2 ++ .../include/asm/arch-fsl-layerscape/fsl_icid.h | 16 ++++++++++++++-- include/fsl_csu.h | 4 ++-- 4 files changed, 20 insertions(+), 6 deletions(-)
I noticed when sending this series that Rajesh's email bounces. Does he still work at NXP? He seems to maintain a significant number of Layerscape boards.
$ git grep "rajesh.bhagat@nxp.com" board/freescale/ls1012afrdm/MAINTAINERS:M: Rajesh Bhagat rajesh.bhagat@nxp.com board/freescale/ls1012aqds/MAINTAINERS:M: Rajesh Bhagat rajesh.bhagat@nxp.com board/freescale/ls1012ardb/MAINTAINERS:M: Rajesh Bhagat rajesh.bhagat@nxp.com board/freescale/ls1028a/MAINTAINERS:M: Rajesh Bhagat rajesh.bhagat@nxp.com board/freescale/ls1028a/MAINTAINERS:M: Rajesh Bhagat rajesh.bhagat@nxp.com board/freescale/ls1043aqds/MAINTAINERS:M: Rajesh Bhagat rajesh.bhagat@nxp.com board/freescale/ls1043ardb/MAINTAINERS:M: Rajesh Bhagat rajesh.bhagat@nxp.com board/freescale/ls1046aqds/MAINTAINERS:M: Rajesh Bhagat rajesh.bhagat@nxp.com board/freescale/ls1046ardb/MAINTAINERS:M: Rajesh Bhagat rajesh.bhagat@nxp.com board/freescale/ls1088a/MAINTAINERS:M: Rajesh Bhagat rajesh.bhagat@nxp.com board/freescale/ls1088a/MAINTAINERS:M: Rajesh Bhagat rajesh.bhagat@nxp.com board/freescale/ls2080aqds/MAINTAINERS:M: Rajesh Bhagat rajesh.bhagat@nxp.com board/freescale/ls2080ardb/MAINTAINERS:M: Rajesh Bhagat rajesh.bhagat@nxp.com
--Sean

On 10/12/2022 5:51 AM, Sean Anderson wrote:
This series groups a few small size reductions I found while trying to reduce my SPL size. They are all independent of each other.
Sean Anderson (3): arm: layerscape: Don't select FSL_IFC when booting from SD card arm: layerscape: Disable unused parts of ICID tables arm: fsl: csu: Reduce size of ns_dev
arch/arm/cpu/armv8/fsl-layerscape/Kconfig | 4 ++-- arch/arm/cpu/armv8/fsl-layerscape/icid.c | 2 ++ .../include/asm/arch-fsl-layerscape/fsl_icid.h | 16 ++++++++++++++-- include/fsl_csu.h | 4 ++-- 4 files changed, 20 insertions(+), 6 deletions(-)
Applied.
Thanks, Peng.

Hi Sean,
I have applied your patchset, but met CI failure, could you please send me a fix?
./tools/buildman/buildman ls1043aqds_qspi Building current source for 1 boards (1 thread, 4 jobs per thread) aarch64: + ls1043aqds_qspi +===================== WARNING ====================== +This board does not use CONFIG_DM_SERIAL (Driver Model +for Serial drivers). Please update the board to use +CONFIG_DM_SERIAL before the v2023.04 release. Failure to +update by the deadline may result in board removal. +See doc/develop/driver-model/migration.rst for more info. +==================================================== +In file included from include/fsl_ifc.h:794, + from drivers/misc/fsl_ifc.c:8: +drivers/misc/fsl_ifc.c: In function 'init_early_memctl_regs': +include/configs/ls1043aqds.h:247:31: error: 'CONFIG_SYS_NOR_FTIM0' undeclared (first use in this function); did you mean 'CONFIG_SYS_CS2_FTIM0'? + 247 | #define CONFIG_SYS_CS0_FTIM0 CONFIG_SYS_NOR_FTIM0 + | ^~~~~~~~~~~~~~~~~~~~ +arch/arm/include/asm/io.h:31:61: note: in definition of macro '__arch_putl' + 31 | #define __arch_putl(v,a) (*(volatile unsigned int *)(a) = (v)) + | ^ +arch/arm/include/asm/io.h:153:35: note: in expansion of macro '__raw_writel' + 153 | #define out_arch(type,endian,a,v) __raw_write##type(cpu_to_##endian(v),a) + | ^~~~~~~~~~~ +include/linux/byteorder/little_endian.h:40:43: note: in expansion of macro '__swab32' + 40 | #define __cpu_to_be32(x) ((__force __be32)__swab32((x))) + | ^~~~~~~~ +include/linux/byteorder/generic.h:94:21: note: in expansion of macro '__cpu_to_be32' + 94 | #define cpu_to_be32 __cpu_to_be32 + | ^~~~~~~~~~~~~ +arch/arm/include/asm/io.h:165:23: note: in expansion of macro 'out_arch' + 165 | #define out_be32(a,v) out_arch(l,be32,a,v) + | ^~~~~~~~ +include/fsl_ifc.h:28:27: note: in expansion of macro 'out_be32' + 28 | #define ifc_out32(a, v) out_be32(a, v) + | ^~~~~~~~ +include/fsl_ifc.h:829:4: note: in expansion of macro 'ifc_out32' + 829 | (ifc_out32(&(IFC_FCM_BASE_ADDR)->ftim_cs[i].ftim[j], v)) + | ^~~~~~~~~ +drivers/misc/fsl_ifc.c:416:2: note: in expansion of macro 'set_ifc_ftim' + 416 | set_ifc_ftim(IFC_CS0, IFC_FTIM0, CONFIG_SYS_CS0_FTIM0); + | ^~~~~~~~~~~~ +drivers/misc/fsl_ifc.c:416:35: note: in expansion of macro 'CONFIG_SYS_CS0_FTIM0' + | ^~~~~~~~~~~~~~~~~~~~ +include/configs/ls1043aqds.h:247:31: note: each undeclared identifier is reported only once for each function it appears in +include/configs/ls1043aqds.h:248:31: error: 'CONFIG_SYS_NOR_FTIM1' undeclared (first use in this function); did you mean 'CONFIG_SYS_CS1_FTIM1'? + 248 | #define CONFIG_SYS_CS0_FTIM1 CONFIG_SYS_NOR_FTIM1 +drivers/misc/fsl_ifc.c:417:2: note: in expansion of macro 'set_ifc_ftim' + 417 | set_ifc_ftim(IFC_CS0, IFC_FTIM1, CONFIG_SYS_CS0_FTIM1); +drivers/misc/fsl_ifc.c:417:35: note: in expansion of macro 'CONFIG_SYS_CS0_FTIM1' +include/configs/ls1043aqds.h:249:31: error: 'CONFIG_SYS_NOR_FTIM2' undeclared (first use in this function); did you mean 'CONFIG_SYS_CS0_FTIM2'? + 249 | #define CONFIG_SYS_CS0_FTIM2 CONFIG_SYS_NOR_FTIM2 +drivers/misc/fsl_ifc.c:418:2: note: in expansion of macro 'set_ifc_ftim' + 418 | set_ifc_ftim(IFC_CS0, IFC_FTIM2, CONFIG_SYS_CS0_FTIM2); +drivers/misc/fsl_ifc.c:418:35: note: in expansion of macro 'CONFIG_SYS_CS0_FTIM2' +include/configs/ls1043aqds.h:250:31: error: 'CONFIG_SYS_NOR_FTIM3' undeclared (first use in this function); did you mean 'CONFIG_SYS_CS0_FTIM3'? + 250 | #define CONFIG_SYS_CS0_FTIM3 CONFIG_SYS_NOR_FTIM3 +drivers/misc/fsl_ifc.c:419:2: note: in expansion of macro 'set_ifc_ftim' + 419 | set_ifc_ftim(IFC_CS0, IFC_FTIM3, CONFIG_SYS_CS0_FTIM3); +drivers/misc/fsl_ifc.c:419:35: note: in expansion of macro 'CONFIG_SYS_CS0_FTIM3' +include/configs/ls1043aqds.h:243:31: error: 'CONFIG_SYS_NOR0_CSPR_EXT' undeclared (first use in this function); did you mean 'CONFIG_SYS_FPGA_CSPR_EXT'? + 243 | #define CONFIG_SYS_CSPR0_EXT CONFIG_SYS_NOR0_CSPR_EXT + | ^~~~~~~~~~~~~~~~~~~~~~~~ +include/fsl_ifc.h:819:4: note: in expansion of macro 'ifc_out32' + 819 | (ifc_out32(&(IFC_FCM_BASE_ADDR)->cspr_cs[i].cspr_ext, v)) +drivers/misc/fsl_ifc.c:423:2: note: in expansion of macro 'set_ifc_cspr_ext' + 423 | set_ifc_cspr_ext(IFC_CS0, CONFIG_SYS_CSPR0_EXT); + | ^~~~~~~~~~~~~~~~ +drivers/misc/fsl_ifc.c:423:28: note: in expansion of macro 'CONFIG_SYS_CSPR0_EXT' + | ^~~~~~~~~~~~~~~~~~~~ +include/configs/ls1043aqds.h:244:27: error: 'CONFIG_SYS_NOR0_CSPR' undeclared (first use in this function); did you mean 'CONFIG_SYS_FPGA_CSPR'? + 244 | #define CONFIG_SYS_CSPR0 CONFIG_SYS_NOR0_CSPR + | ^~~~~~~~~~~~~~~~~~~~ +include/fsl_ifc.h:821:4: note: in expansion of macro 'ifc_out32' + 821 | (ifc_out32(&(IFC_FCM_BASE_ADDR)->cspr_cs[i].cspr, v)) +drivers/misc/fsl_ifc.c:428:2: note: in expansion of macro 'set_ifc_cspr' + 428 | set_ifc_cspr(IFC_CS0, CONFIG_SYS_CSPR0); +drivers/misc/fsl_ifc.c:428:24: note: in expansion of macro 'CONFIG_SYS_CSPR0' + | ^~~~~~~~~~~~~~~~ +include/configs/ls1043aqds.h:245:28: error: 'CONFIG_SYS_NOR_AMASK' undeclared (first use in this function); did you mean 'CONFIG_SYS_FPGA_AMASK'? + 245 | #define CONFIG_SYS_AMASK0 CONFIG_SYS_NOR_AMASK +include/fsl_ifc.h:827:4: note: in expansion of macro 'ifc_out32' + 827 | (ifc_out32(&(IFC_FCM_BASE_ADDR)->amask_cs[i].amask, v)) +drivers/misc/fsl_ifc.c:429:2: note: in expansion of macro 'set_ifc_amask' + 429 | set_ifc_amask(IFC_CS0, CONFIG_SYS_AMASK0); + | ^~~~~~~~~~~~~ +drivers/misc/fsl_ifc.c:429:25: note: in expansion of macro 'CONFIG_SYS_AMASK0' + | ^~~~~~~~~~~~~~~~~ +include/configs/ls1043aqds.h:246:27: error: 'CONFIG_SYS_NOR_CSOR' undeclared (first use in this function); did you mean 'CONFIG_SYS_FPGA_CSOR'? + 246 | #define CONFIG_SYS_CSOR0 CONFIG_SYS_NOR_CSOR + | ^~~~~~~~~~~~~~~~~~~ +include/fsl_ifc.h:825:4: note: in expansion of macro 'ifc_out32' + 825 | (ifc_out32(&(IFC_FCM_BASE_ADDR)->csor_cs[i].csor, v)) +drivers/misc/fsl_ifc.c:430:2: note: in expansion of macro 'set_ifc_csor' + 430 | set_ifc_csor(IFC_CS0, CONFIG_SYS_CSOR0); +drivers/misc/fsl_ifc.c:430:24: note: in expansion of macro 'CONFIG_SYS_CSOR0' +include/configs/ls1043aqds.h:251:31: error: 'CONFIG_SYS_NOR1_CSPR_EXT' undeclared (first use in this function); did you mean 'CONFIG_SYS_FPGA_CSPR_EXT'? + 251 | #define CONFIG_SYS_CSPR1_EXT CONFIG_SYS_NOR1_CSPR_EXT +drivers/misc/fsl_ifc.c:435:2: note: in expansion of macro 'set_ifc_cspr_ext' + 435 | set_ifc_cspr_ext(IFC_CS1, CONFIG_SYS_CSPR1_EXT); +drivers/misc/fsl_ifc.c:435:28: note: in expansion of macro 'CONFIG_SYS_CSPR1_EXT' +include/configs/ls1043aqds.h:252:27: error: 'CONFIG_SYS_NOR1_CSPR' undeclared (first use in this function); did you mean 'CONFIG_SYS_FPGA_CSPR'? + 252 | #define CONFIG_SYS_CSPR1 CONFIG_SYS_NOR1_CSPR +drivers/misc/fsl_ifc.c:448:2: note: in expansion of macro 'set_ifc_cspr' + 448 | set_ifc_cspr(IFC_CS1, CONFIG_SYS_CSPR1); +drivers/misc/fsl_ifc.c:448:24: note: in expansion of macro 'CONFIG_SYS_CSPR1' +include/configs/ls1043aqds.h:259:31: error: 'CONFIG_SYS_NAND_CSPR_EXT' undeclared (first use in this function); did you mean 'CONFIG_SYS_FPGA_CSPR_EXT'? + 259 | #define CONFIG_SYS_CSPR2_EXT CONFIG_SYS_NAND_CSPR_EXT +drivers/misc/fsl_ifc.c:452:2: note: in expansion of macro 'set_ifc_cspr_ext' + 452 | set_ifc_cspr_ext(IFC_CS2, CONFIG_SYS_CSPR2_EXT); +drivers/misc/fsl_ifc.c:452:28: note: in expansion of macro 'CONFIG_SYS_CSPR2_EXT' +include/configs/ls1043aqds.h:263:31: error: 'CONFIG_SYS_NAND_FTIM0' undeclared (first use in this function); did you mean 'CONFIG_SYS_CS2_FTIM0'? + 263 | #define CONFIG_SYS_CS2_FTIM0 CONFIG_SYS_NAND_FTIM0 + | ^~~~~~~~~~~~~~~~~~~~~ +drivers/misc/fsl_ifc.c:458:2: note: in expansion of macro 'set_ifc_ftim' + 458 | set_ifc_ftim(IFC_CS2, IFC_FTIM0, CONFIG_SYS_CS2_FTIM0); +drivers/misc/fsl_ifc.c:458:35: note: in expansion of macro 'CONFIG_SYS_CS2_FTIM0' +include/configs/ls1043aqds.h:264:31: error: 'CONFIG_SYS_NAND_FTIM1' undeclared (first use in this function); did you mean 'CONFIG_SYS_CS1_FTIM1'? + 264 | #define CONFIG_SYS_CS2_FTIM1 CONFIG_SYS_NAND_FTIM1 +drivers/misc/fsl_ifc.c:459:2: note: in expansion of macro 'set_ifc_ftim' + 459 | set_ifc_ftim(IFC_CS2, IFC_FTIM1, CONFIG_SYS_CS2_FTIM1); +drivers/misc/fsl_ifc.c:459:35: note: in expansion of macro 'CONFIG_SYS_CS2_FTIM1' +include/configs/ls1043aqds.h:265:31: error: 'CONFIG_SYS_NAND_FTIM2' undeclared (first use in this function); did you mean 'CONFIG_SYS_CS0_FTIM2'? + 265 | #define CONFIG_SYS_CS2_FTIM2 CONFIG_SYS_NAND_FTIM2 +drivers/misc/fsl_ifc.c:460:2: note: in expansion of macro 'set_ifc_ftim' + 460 | set_ifc_ftim(IFC_CS2, IFC_FTIM2, CONFIG_SYS_CS2_FTIM2); +drivers/misc/fsl_ifc.c:460:35: note: in expansion of macro 'CONFIG_SYS_CS2_FTIM2' +include/configs/ls1043aqds.h:266:31: error: 'CONFIG_SYS_NAND_FTIM3' undeclared (first use in this function); did you mean 'CONFIG_SYS_FPGA_FTIM3'? + 266 | #define CONFIG_SYS_CS2_FTIM3 CONFIG_SYS_NAND_FTIM3 +drivers/misc/fsl_ifc.c:461:2: note: in expansion of macro 'set_ifc_ftim' + 461 | set_ifc_ftim(IFC_CS2, IFC_FTIM3, CONFIG_SYS_CS2_FTIM3); +drivers/misc/fsl_ifc.c:461:35: note: in expansion of macro 'CONFIG_SYS_CS2_FTIM3' +include/configs/ls1043aqds.h:262:27: error: 'CONFIG_SYS_NAND_CSOR' undeclared (first use in this function); did you mean 'CONFIG_SYS_FPGA_CSOR'? + 262 | #define CONFIG_SYS_CSOR2 CONFIG_SYS_NAND_CSOR +drivers/misc/fsl_ifc.c:463:2: note: in expansion of macro 'set_ifc_csor' + 463 | set_ifc_csor(IFC_CS2, CONFIG_SYS_CSOR2); +drivers/misc/fsl_ifc.c:463:24: note: in expansion of macro 'CONFIG_SYS_CSOR2' +include/configs/ls1043aqds.h:261:28: error: 'CONFIG_SYS_NAND_AMASK' undeclared (first use in this function); did you mean 'CONFIG_SYS_FPGA_AMASK'? + 261 | #define CONFIG_SYS_AMASK2 CONFIG_SYS_NAND_AMASK + | ^~~~~~~~~~~~~~~~~~~~~ +drivers/misc/fsl_ifc.c:464:2: note: in expansion of macro 'set_ifc_amask' + 464 | set_ifc_amask(IFC_CS2, CONFIG_SYS_AMASK2); +drivers/misc/fsl_ifc.c:464:25: note: in expansion of macro 'CONFIG_SYS_AMASK2' +include/configs/ls1043aqds.h:260:27: error: 'CONFIG_SYS_NAND_CSPR' undeclared (first use in this function); did you mean 'CONFIG_SYS_FPGA_CSPR'? + 260 | #define CONFIG_SYS_CSPR2 CONFIG_SYS_NAND_CSPR +drivers/misc/fsl_ifc.c:465:2: note: in expansion of macro 'set_ifc_cspr' + 465 | set_ifc_cspr(IFC_CS2, CONFIG_SYS_CSPR2); +drivers/misc/fsl_ifc.c:465:24: note: in expansion of macro 'CONFIG_SYS_CSPR2' +make[3]: *** [scripts/Makefile.build:258: drivers/misc/fsl_ifc.o] Error 1 +make[2]: *** [scripts/Makefile.build:398: drivers/misc] Error 2 +make[1]: *** [Makefile:1883: drivers] Error 2 +make: *** [Makefile:177: sub-make] Error 2 0 0 1 /1 ls1043aqds_qspi Completed: 1 total built, 1 newly), duration 0:00:04, rate 0.25
Thanks, Peng. On 10/12/2022 5:51 AM, Sean Anderson wrote:
This series groups a few small size reductions I found while trying to reduce my SPL size. They are all independent of each other.
Sean Anderson (3): arm: layerscape: Don't select FSL_IFC when booting from SD card arm: layerscape: Disable unused parts of ICID tables arm: fsl: csu: Reduce size of ns_dev
arch/arm/cpu/armv8/fsl-layerscape/Kconfig | 4 ++-- arch/arm/cpu/armv8/fsl-layerscape/icid.c | 2 ++ .../include/asm/arch-fsl-layerscape/fsl_icid.h | 16 ++++++++++++++-- include/fsl_csu.h | 4 ++-- 4 files changed, 20 insertions(+), 6 deletions(-)
participants (2)
-
Peng Fan
-
Sean Anderson