All of lore.kernel.org
 help / color / mirror / Atom feed
From: York Sun <york.sun@nxp.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [u-boot-release] [PATCH 2/3] armv8: ls1088a: SPL size reduction
Date: Tue, 29 Aug 2017 15:55:08 +0000	[thread overview]
Message-ID: <VI1PR04MB20781EEB253C498C3DE9653D9A9F0@VI1PR04MB2078.eurprd04.prod.outlook.com> (raw)
In-Reply-To: 1503990107-28658-2-git-send-email-sumit.garg@nxp.com

On 08/29/2017 12:02 AM, Sumit Garg wrote:
> 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.
> 4. Enable CONFIG_SYS_DCACHE_OFF in case of SPL build as DCACHE is
>     not being enabled in case of SPL image but was compiled in to
>     add redundant code.
> 
> Signed-off-by: Sumit Garg <sumit.garg@nxp.com>
> ---
> 
> Dependent on ls1088 base SD boot target. Also dependent on ls1088
> QPSI secure boot target.
> 
>   board/freescale/ls1088a/Makefile  |  4 +++-
>   board/freescale/ls1088a/ls1088a.c | 14 ++++++++------
>   include/configs/ls1088a_common.h  | 20 ++++++++++++++++++++
>   include/configs/ls1088ardb.h      | 20 ++++++++++++++++++++
>   4 files changed, 51 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 1860f9c..1c28ab4 100644
> --- a/board/freescale/ls1088a/ls1088a.c
> +++ b/board/freescale/ls1088a/ls1088a.c
> @@ -24,6 +24,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;
> @@ -324,12 +331,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    ");
> @@ -404,3 +405,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 63b69f8..fb4c852 100644
> --- a/include/configs/ls1088a_common.h
> +++ b/include/configs/ls1088a_common.h
> @@ -7,6 +7,20 @@
>   #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
> +#define CONFIG_SYS_DCACHE_OFF

How much space can you save with data cache off? I prefer to leave the 
cache on. Cache is used if PPA is loaded in SPL stage for boost booting 
speed.

York

  reply	other threads:[~2017-08-29 15:55 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-29  7:01 [U-Boot] [PATCH 1/3] armv8: fsl-layerscape: SPL size reduction Sumit Garg
2017-08-29  7:01 ` [U-Boot] [PATCH 2/3] armv8: ls1088a: " Sumit Garg
2017-08-29 15:55   ` York Sun [this message]
2017-08-29 17:36     ` [U-Boot] [u-boot-release] " Sumit Garg
2017-08-29 17:49       ` York Sun
2017-08-30  8:53         ` Sumit Garg
2018-01-05 15:56           ` York Sun
2018-01-05 16:07             ` Sumit Garg
2018-01-05 16:09               ` York Sun
2018-01-05 16:22                 ` Sumit Garg
2018-01-05 16:24                   ` York Sun
2017-08-29  7:01 ` [U-Boot] [PATCH 3/3] ls1088ardb: Add SD Secure boot target support Sumit Garg
2017-09-14 20:38 ` [U-Boot] [PATCH 1/3] armv8: fsl-layerscape: SPL size reduction York Sun
2017-10-03 10:51   ` Sumit Garg
2017-10-04 18:41     ` York Sun
2017-10-05  7:55       ` Sumit Garg
2017-11-29 18:36         ` York Sun
2017-11-30 15:55           ` Sumit Garg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=VI1PR04MB20781EEB253C498C3DE9653D9A9F0@VI1PR04MB2078.eurprd04.prod.outlook.com \
    --to=york.sun@nxp.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.