Commit c20b7761dba32bd9b63db706c762a8edd576778e

Authored by Ye Li
1 parent e0343ea466

MLK-21103 imx8: Fix build break on ARM2 SPL

Meet the build error below with ARM2 SPL defconfig
arch/arm/mach-imx/imx8/image.c: In function ‘spl_nor_get_uboot_base’:
arch/arm/mach-imx/imx8/image.c:224:13: error: ‘CONFIG_SYS_UBOOT_BASE’
undeclared (first use in this function)
if (end <= CONFIG_SYS_UBOOT_BASE)

The root cause is we did not add SPL NOR support for ARM2 SPL, but
the codes still use the CONFIG_SYS_UBOOT_BASE.

Fix the issue by adding SPL device support config for each device
relevant function.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit a96fd317601db7f21402e5f74fe24653e2af8ae7)

Showing 1 changed file with 8 additions and 0 deletions Side-by-side Diff

arch/arm/mach-imx/imx8/image.c
... ... @@ -175,6 +175,7 @@
175 175 return value_container[1] + offset2;
176 176 }
177 177  
  178 +#ifdef CONFIG_SPL_SPI_LOAD
178 179 unsigned long spl_spi_get_uboot_raw_sector(struct spi_flash *flash)
179 180 {
180 181 int end;
181 182  
... ... @@ -186,7 +187,9 @@
186 187  
187 188 return end;
188 189 }
  190 +#endif
189 191  
  192 +#ifdef CONFIG_SPL_MMC_SUPPORT
190 193 unsigned long spl_mmc_get_uboot_raw_sector(struct mmc *mmc)
191 194 {
192 195 int end;
193 196  
... ... @@ -198,7 +201,9 @@
198 201  
199 202 return end/mmc->read_bl_len;
200 203 }
  204 +#endif
201 205  
  206 +#ifdef CONFIG_SPL_NAND_SUPPORT
202 207 uint32_t spl_nand_get_uboot_raw_page(void)
203 208 {
204 209 int end;
205 210  
... ... @@ -210,7 +215,9 @@
210 215  
211 216 return end;
212 217 }
  218 +#endif
213 219  
  220 +#ifdef CONFIG_SPL_NOR_SUPPORT
214 221 unsigned long spl_nor_get_uboot_base(void)
215 222 {
216 223 int end;
... ... @@ -230,4 +237,5 @@
230 237  
231 238 return end;
232 239 }
  240 +#endif