summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVinitha V Pillai <vinitha.pillai@nxp.com>2018-01-04 07:20:37 (GMT)
committerPrabhakar Kushwaha <prabhakar.kushwaha@nxp.com>2018-01-10 04:04:10 (GMT)
commit582a8f96d0925f0f6cab07ee3897cdb129583def (patch)
treed88eaaf82b35eec77360ebd1e09907d021671b0c
parent0024d9b181e0ae902de73f9c51dc4c3385b2f5f9 (diff)
downloadu-boot-582a8f96d0925f0f6cab07ee3897cdb129583def.tar.xz
armv8: ls1088a: SPL size reduction
Using changes in this patch we were able to reduce approx 8k size of u-boot-spl.bin image. Following is breif description of changes to reduce SPL size: 1. Changes in board/freescale/ls1088a/Makefile to remove compilation of eth.c and cpld.c in case of SPL build. 2. Changes in board/freescale/ls1088a/ls1088a.c to keep board_early_init_f funcations in case of SPL build. 3. Changes in ls1088a_common.h & ls1088ardb.h to remove driver specific macros due to which static data was being compiled in case of SPL build. Signed-off-by: Sumit Garg <sumit.garg@nxp.com> Signed-off-by: Vinitha V Pillai <vinitha.pillai@nxp.com>
-rw-r--r--board/freescale/ls1088a/Makefile4
-rw-r--r--board/freescale/ls1088a/ls1088a.c14
-rw-r--r--include/configs/ls1088a_common.h19
-rw-r--r--include/configs/ls1088ardb.h20
4 files changed, 50 insertions, 7 deletions
diff --git a/board/freescale/ls1088a/Makefile b/board/freescale/ls1088a/Makefile
index bdcce9e..0e15031 100644
--- a/board/freescale/ls1088a/Makefile
+++ b/board/freescale/ls1088a/Makefile
@@ -5,6 +5,8 @@
#
obj-y += ls1088a.o
+obj-y += ddr.o
+ifndef CONFIG_SPL_BUILD
obj-$(CONFIG_TARGET_LS1088ARDB) += eth_ls1088ardb.o
obj-$(CONFIG_TARGET_LS1088AQDS) += eth_ls1088aqds.o
-obj-y += ddr.o
+endif
diff --git a/board/freescale/ls1088a/ls1088a.c b/board/freescale/ls1088a/ls1088a.c
index 96f183e..c0c425d 100644
--- a/board/freescale/ls1088a/ls1088a.c
+++ b/board/freescale/ls1088a/ls1088a.c
@@ -25,6 +25,13 @@
DECLARE_GLOBAL_DATA_PTR;
+int board_early_init_f(void)
+{
+ fsl_lsch3_early_init_f();
+ return 0;
+}
+
+#if !defined(CONFIG_SPL_BUILD)
unsigned long long get_qixis_addr(void)
{
unsigned long long addr;
@@ -342,12 +349,6 @@ int board_init(void)
return 0;
}
-int board_early_init_f(void)
-{
- fsl_lsch3_early_init_f();
- return 0;
-}
-
void detail_board_ddr_info(void)
{
puts("\nDDR ");
@@ -451,3 +452,4 @@ int ft_board_setup(void *blob, bd_t *bd)
return 0;
}
#endif
+#endif /* defined(CONFIG_SPL_BUILD) */
diff --git a/include/configs/ls1088a_common.h b/include/configs/ls1088a_common.h
index b99257e..0ce65ae 100644
--- a/include/configs/ls1088a_common.h
+++ b/include/configs/ls1088a_common.h
@@ -7,6 +7,19 @@
#ifndef __LS1088_COMMON_H
#define __LS1088_COMMON_H
+/* SPL build */
+#ifdef CONFIG_SPL_BUILD
+#define SPL_NO_BOARDINFO
+#define SPL_NO_QIXIS
+#define SPL_NO_PCI
+#define SPL_NO_ENV
+#define SPL_NO_RTC
+#define SPL_NO_USB
+#define SPL_NO_SATA
+#define SPL_NO_QSPI
+#define SPL_NO_IFC
+#undef CONFIG_DISPLAY_CPUINFO
+#endif
#define CONFIG_REMAKE_ELF
#define CONFIG_FSL_LAYERSCAPE
@@ -74,8 +87,10 @@
#define CONFIG_BAUDRATE 115200
#define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 }
+#ifndef SPL_NO_IFC
/* IFC */
#define CONFIG_FSL_IFC
+#endif
/*
* During booting, IFC is mapped at the region of 0x30000000.
@@ -174,6 +189,7 @@ unsigned long long get_qixis_addr(void);
/* #define CONFIG_DISPLAY_CPUINFO */
+#ifndef SPL_NO_ENV
/* Allow to overwrite serial and ethaddr */
#define CONFIG_ENV_OVERWRITE
@@ -213,6 +229,7 @@ unsigned long long get_qixis_addr(void);
" cp.b $kernel_start $kernel_load" \
" $kernel_size && bootm $kernel_load"
#endif
+#endif
/* Monitor Command Prompt */
#define CONFIG_SYS_CBSIZE 512 /* Console I/O Buffer Size */
@@ -221,7 +238,9 @@ unsigned long long get_qixis_addr(void);
#define CONFIG_SYS_PROMPT_HUSH_PS2 "> "
#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot args buffer */
#define CONFIG_SYS_LONGHELP
+#ifndef SPL_NO_ENV
#define CONFIG_CMDLINE_EDITING 1
+#endif
#define CONFIG_AUTO_COMPLETE
#define CONFIG_SYS_MAXARGS 64 /* max command args */
diff --git a/include/configs/ls1088ardb.h b/include/configs/ls1088ardb.h
index 1438bec..3c6c666 100644
--- a/include/configs/ls1088ardb.h
+++ b/include/configs/ls1088ardb.h
@@ -9,7 +9,9 @@
#include "ls1088a_common.h"
+#ifndef SPL_NO_BOARDINFO
#define CONFIG_DISPLAY_BOARDINFO_LATE
+#endif
#define CONFIG_MISC_INIT_R
@@ -29,7 +31,9 @@
#endif
#if defined(CONFIG_QSPI_BOOT) || defined(CONFIG_SD_BOOT_QSPI)
+#ifndef CONFIG_SPL_BUILD
#define CONFIG_QIXIS_I2C_ACCESS
+#endif
#define SYS_NO_FLASH
#undef CONFIG_CMD_IMLS
#endif
@@ -97,7 +101,11 @@
#define CONFIG_SYS_FLASH_BANKS_LIST { CONFIG_SYS_FLASH_BASE }
#endif
#endif
+
+#ifndef SPL_NO_IFC
#define CONFIG_NAND_FSL_IFC
+#endif
+
#define CONFIG_SYS_NAND_MAX_ECCPOS 256
#define CONFIG_SYS_NAND_MAX_OOBFREE 2
@@ -139,7 +147,10 @@
#define CONFIG_SYS_NAND_BLOCK_SIZE (128 * 1024)
+#ifndef SPL_NO_QIXIS
#define CONFIG_FSL_QIXIS
+#endif
+
#define CONFIG_SYS_I2C_FPGA_ADDR 0x66
#define QIXIS_LBMAP_SWITCH 2
#define QIXIS_QMAP_MASK 0xe0
@@ -223,6 +234,8 @@
#define I2C_RETIMER_ADDR 0x18
#define I2C_MUX_CH_DEFAULT 0x8
#define I2C_MUX_CH5 0xD
+
+#ifndef SPL_NO_RTC
/*
* RTC configuration
*/
@@ -230,6 +243,7 @@
#define CONFIG_RTC_PCF8563 1
#define CONFIG_SYS_I2C_RTC_ADDR 0x51 /* Channel 3*/
#define CONFIG_CMD_DATE
+#endif
/* EEPROM */
#define CONFIG_ID_EEPROM
@@ -240,12 +254,14 @@
#define CONFIG_SYS_EEPROM_PAGE_WRITE_BITS 3
#define CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS 5
+#ifndef SPL_NO_QSPI
/* QSPI device */
#if defined(CONFIG_QSPI_BOOT) || defined(CONFIG_SD_BOOT_QSPI)
#define CONFIG_FSL_QSPI
#define FSL_QSPI_FLASH_SIZE (1 << 26)
#define FSL_QSPI_FLASH_NUM 2
#endif
+#endif
#define CONFIG_CMD_MEMINFO
#define CONFIG_CMD_MEMTEST
@@ -260,6 +276,7 @@
#define CONFIG_FSL_MEMAC
+#ifndef SPL_NO_ENV
/* Initial environment variables */
#if defined(CONFIG_QSPI_BOOT)
#define MC_INIT_CMD \
@@ -408,6 +425,7 @@
#define CONFIG_ETHPRIME "DPMAC1@xgmii"
#define CONFIG_PHY_GIGE
#endif
+#endif
/* MMC */
#ifdef CONFIG_MMC
@@ -415,6 +433,7 @@
#define CONFIG_SYS_FSL_MMC_HAS_CAPBLT_VS33
#endif
+#ifndef SPL_NO_ENV
#undef CONFIG_CMDLINE_EDITING
#include <config_distro_defaults.h>
@@ -423,6 +442,7 @@
func(SCSI, scsi, 0) \
func(DHCP, dhcp, na)
#include <config_distro_bootcmd.h>
+#endif
#include <asm/fsl_secure_boot.h>