Skip to contentSkip to conversation

arm64: layerscape: Various small size reductions for SPL

PATCH Applied Sean Anderson 2 participants 10 messages Oct 11, 2022 – Oct 17, 2022 Arm (32-bit)

v1 of 2 Applied Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover 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(-)
Signature · 1 line
2.35.1.1320.gc452695387.dirty
#1 lore raw

PATCH 1/3 arm: layerscape: Don't select FSL_IFC when booting from SD card

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.

---

 arch/arm/cpu/armv8/fsl-layerscape/Kconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/cpu/armv8/fsl-layerscape/Kconfig +2 -2
index 80a1642447d..10eef84f8d9 100644
@@ -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
Signature · 1 line
2.35.1.1320.gc452695387.dirty
Reviewed-by on v1 1/3
#2 lore raw

Re: [PATCH 1/3] arm: layerscape: Don't select FSL_IFC when booting from SD card

Quoted 5 lines · Sean Anderson

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.

Quoted 27 lines

---

  arch/arm/cpu/armv8/fsl-layerscape/Kconfig | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/cpu/armv8/fsl-layerscape/Kconfig +2 -2
index 80a1642447d..10eef84f8d9 100644
@@ -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
#3 lore raw

PATCH 2/3 arm: layerscape: Disable unused parts of ICID tables

In reply to Sean Anderson

Several parts of the ICID table are only necessary for U-Boot proper. Disable them in SPL. This saves around 500 bytes.

---

 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(-)
arch/arm/cpu/armv8/fsl-layerscape/icid.c +2 -0
index 25cd82f16eb..2d87281ec21 100644
@@ -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
arch/arm/include/asm/arch-fsl-layerscape/fsl_icid.h +14 -2
index 3c06a55cb85..8af0d35d27b 100644
@@ -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
Signature · 1 line
2.35.1.1320.gc452695387.dirty
Reviewed-by on v1 2/3
#4 lore raw

Re: [PATCH 2/3] arm: layerscape: Disable unused parts of ICID tables

Quoted 4 lines · Sean Anderson

Several parts of the ICID table are only necessary for U-Boot proper. Disable them in SPL. This saves around 500 bytes.

Quoted 67 lines

---

  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(-)
arch/arm/cpu/armv8/fsl-layerscape/icid.c +2 -0
index 25cd82f16eb..2d87281ec21 100644
@@ -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
arch/arm/include/asm/arch-fsl-layerscape/fsl_icid.h +14 -2
index 3c06a55cb85..8af0d35d27b 100644
@@ -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
#5 lore raw

PATCH 3/3 arm: fsl: csu: Reduce size of ns_dev

In reply to Sean Anderson

None of the values in this struct are larger than 256, so we can reduce the members to u8s. This saves around 1K.

---

 include/fsl_csu.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
include/fsl_csu.h +2 -2
index 0e59ac3c324..40c29687979 100644
@@ -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);
Signature · 1 line
2.35.1.1320.gc452695387.dirty
Reviewed-by on v1 3/3
#6 lore raw

Re: [PATCH 3/3] arm: fsl: csu: Reduce size of ns_dev

Quoted 4 lines · Sean Anderson

None of the values in this struct are larger than 256, so we can reduce the members to u8s. This saves around 1K.

Quoted 20 lines

---

  include/fsl_csu.h | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
include/fsl_csu.h +2 -2
index 0e59ac3c324..40c29687979 100644
@@ -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);
#7 lore raw
In reply to Sean Anderson

Hi NXP Folks,

Quoted 9 lines · Sean Anderson

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

Quoted 6 lines
 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 "[email protected]"
board/freescale/ls1012afrdm/MAINTAINERS:M:      Rajesh Bhagat <[email protected]>
board/freescale/ls1012aqds/MAINTAINERS:M:       Rajesh Bhagat <[email protected]>
board/freescale/ls1012ardb/MAINTAINERS:M:       Rajesh Bhagat <[email protected]>
board/freescale/ls1028a/MAINTAINERS:M:  Rajesh Bhagat <[email protected]>
board/freescale/ls1028a/MAINTAINERS:M:  Rajesh Bhagat <[email protected]>
board/freescale/ls1043aqds/MAINTAINERS:M:       Rajesh Bhagat <[email protected]>
board/freescale/ls1043ardb/MAINTAINERS:M:       Rajesh Bhagat <[email protected]>
board/freescale/ls1046aqds/MAINTAINERS:M:       Rajesh Bhagat <[email protected]>
board/freescale/ls1046ardb/MAINTAINERS:M:       Rajesh Bhagat <[email protected]>
board/freescale/ls1088a/MAINTAINERS:M:  Rajesh Bhagat <[email protected]>
board/freescale/ls1088a/MAINTAINERS:M:  Rajesh Bhagat <[email protected]>
board/freescale/ls2080aqds/MAINTAINERS:M:       Rajesh Bhagat <[email protected]>
board/freescale/ls2080ardb/MAINTAINERS:M:       Rajesh Bhagat <[email protected]>

--Sean

Applied
#8 lore raw
In reply to Sean Anderson
Quoted 9 lines · Sean Anderson

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

Quoted 6 lines
  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.

#9 lore raw
In reply to Sean Anderson

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.

Quoted 15 lines · Sean Anderson

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(-)