[U-Boot] [PATCH][v3] PBL: add support for boot from SPI flash.

Wolfgang Denk wd at denx.de
Wed Jan 12 09:10:24 CET 2011


Dear Shaohui Xie,

In message <1294817626-4727-1-git-send-email-b21989 at freescale.com> you wrote:
> PBL(pre-boot loader): SPI flash used as RCW(Reset Configuration Word) and
> PBI(pre-boot initialization) source, CPC(CoreNet Platform Cache) used as 1M SRAM
> where PBL will copy whole U-BOOT image to, U-boot can boot from CPC after PBL
> completes RCW and PBI phases.
> 
> Signed-off-by: Chunhe Lan <b25806 at freescale.com>
> Signed-off-by: Mingkai Hu <Mingkai.hu at freescale.com>
> Signed-off-by: Shaohui Xie <b21989 at freescale.com>
> ---
> Use CONFIG_RAMBOOT_PBL instead of CONFIG_PBL_BOOT_INDIRECT according to Kumar's comment.

CONFIG_RAMBOOT_PBL needs to be documented in the README!

> diff --git a/board/freescale/corenet_ds/config.mk b/board/freescale/corenet_ds/config.mk
> index 15bbf20..918775d 100644
> --- a/board/freescale/corenet_ds/config.mk
> +++ b/board/freescale/corenet_ds/config.mk
> @@ -24,4 +24,10 @@
>  # P4080DS board
>  #
>  
> +ifeq ($(CONFIG_RAMBOOT_PBL), y)
> +RESET_VECTOR_ADDRESS = 0xfffffffc
> +endif
> +
> +ifndef RESET_VECTOR_ADDRESS
>  RESET_VECTOR_ADDRESS = 0xeffffffc
> +endif

Do we really need this? Can this not be moved into the board config
file, so we gan delete the config.mk ?

>  	/* TLB 1 */
>  	/* *I*** - Covers boot page */
> +#if defined(CONFIG_SYS_RAMBOOT) && defined(CONFIG_SYS_INIT_L3_ADDR)
> +	/* *I*G - L3SRAM. When L3 is used as 1M SRAM, the address of the
> +	 * SRAM is at 0xfff00000, it covered the 0xfffff000.
> +	 * */

Incorrect multiline comment style.  Please fix globally.

> --- a/include/configs/corenet_ds.h
> +++ b/include/configs/corenet_ds.h
> @@ -28,6 +28,10 @@
>  
>  #include "../board/freescale/common/ics307_clk.h"
>  
> +#ifdef CONFIG_RAMBOOT_PBL
> +#define CONFIG_RAMBOOT_TEXT_BASE        0xfff80000
> +#endif

Why is this needed? You already set SYS_TEXT_BASE to that value.

> @@ -62,11 +66,17 @@
>  #ifdef CONFIG_SYS_NO_FLASH
>  #define CONFIG_ENV_IS_NOWHERE
>  #else
> -#define CONFIG_ENV_IS_IN_FLASH

Why remove the CONFIG_ENV_IS_IN_FLASH here, but leave the
CONFIG_ENV_IS_NOWHERE above?

>  #define CONFIG_FLASH_CFI_DRIVER
>  #define CONFIG_SYS_FLASH_CFI
>  #endif
>  
> +#if defined(CONFIG_RAMBOOT_PBL)
> +	#define CONFIG_ENV_IS_NOWHERE	1	/* Store ENV in memory only */
> +#else
> +	#define CONFIG_ENV_IS_IN_FLASH
> +	#define CONFIG_ENV_ADDR		(CONFIG_SYS_MONITOR_BASE - CONFIG_ENV_SECT_SIZE)
> +#endif

See previous comment. This should be cleaned up. For example, move
this block up, and set CONFIG_SYS_NO_FLASH instead.

> +#define CONFIG_SYS_L3_SIZE		(1024 << 10)
> +#define CONFIG_SYS_INIT_L3_END (CONFIG_SYS_INIT_L3_ADDR + CONFIG_SYS_L3_SIZE)
> +
> +
> +/*

Drop one of the blank lines, please.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
A meeting is an event at which the minutes are kept and the hours are
lost.


More information about the U-Boot mailing list