diff options
| author | Wolfgang Denk <wd@denx.de> | 2010-11-12 22:24:06 +0100 | 
|---|---|---|
| committer | Wolfgang Denk <wd@denx.de> | 2010-11-12 22:24:06 +0100 | 
| commit | d963e84c92a63b4e6c4f2f80482a5ecbe9b24fe0 (patch) | |
| tree | 07dd5889d73f4b66ad608815adcf6f2f953d9501 /arch/powerpc/lib/board.c | |
| parent | 66fca016057b1c6b697552cc7220ebada9d4f82d (diff) | |
| parent | 0c0892be0d93a5a892b93739c5eb3bf692fed4ff (diff) | |
| download | olio-uboot-2014.01-d963e84c92a63b4e6c4f2f80482a5ecbe9b24fe0.tar.xz olio-uboot-2014.01-d963e84c92a63b4e6c4f2f80482a5ecbe9b24fe0.zip | |
Merge branch 'master' of /home/wd/git/u-boot/master
Diffstat (limited to 'arch/powerpc/lib/board.c')
| -rw-r--r-- | arch/powerpc/lib/board.c | 16 | 
1 files changed, 15 insertions, 1 deletions
| diff --git a/arch/powerpc/lib/board.c b/arch/powerpc/lib/board.c index c0c7fd4f6..2e0749da0 100644 --- a/arch/powerpc/lib/board.c +++ b/arch/powerpc/lib/board.c @@ -175,6 +175,16 @@ void __board_add_ram_info(int use_default)  }  void board_add_ram_info(int) __attribute__((weak, alias("__board_add_ram_info"))); +int __board_flash_wp_on(void) +{ +	/* +	 * Most flashes can't be detected when write protection is enabled, +	 * so provide a way to let U-Boot gracefully ignore write protected +	 * devices. +	 */ +	return 0; +} +int board_flash_wp_on(void) __attribute__((weak, alias("__board_flash_wp_on")));  static int init_func_ram (void)  { @@ -698,7 +708,11 @@ void board_init_r (gd_t *id, ulong dest_addr)  #if !defined(CONFIG_SYS_NO_FLASH)  	puts ("FLASH: "); -	if ((flash_size = flash_init ()) > 0) { +	if (board_flash_wp_on()) { +		printf("Uninitialized - Write Protect On\n"); +		/* Since WP is on, we can't find real size.  Set to 0 */ +		flash_size = 0; +	} else if ((flash_size = flash_init ()) > 0) {  # ifdef CONFIG_SYS_FLASH_CHECKSUM  		print_size (flash_size, "");  		/* |