Re: [U-Boot] [PATCH 05/17] ppc: Don't initialize write protected NOR flashes
Dear Peter Tyser, In message <1285787156-6005-5-git-send-email-pty...@xes-inc.com> you wrote: > From: John Schmoller > > If a NOR flash is write protected it can not be initialized/detected so > add the ability for boards to skip NOR initialization on bootup. A > board can skip NOR initialization by implementing the > board_flash_wp_on() function. > > Signed-off-by: John Schmoller > Signed-off-by: Peter Tyser > CC: s...@denx.de > --- > arch/powerpc/lib/board.c | 16 +++- > 1 files changed, 15 insertions(+), 1 deletions(-) Applied, thanks. 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: w...@denx.de No user-servicable parts inside. Refer to qualified service personnel. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 05/17] ppc: Don't initialize write protected NOR flashes
On Wednesday 20 October 2010 08:46:03 Kumar Gala wrote: > On Sep 29, 2010, at 2:05 PM, Peter Tyser wrote: > > From: John Schmoller > > > > If a NOR flash is write protected it can not be initialized/detected so > > add the ability for boards to skip NOR initialization on bootup. A > > board can skip NOR initialization by implementing the > > board_flash_wp_on() function. > > > > Signed-off-by: John Schmoller > > Signed-off-by: Peter Tyser > > CC: s...@denx.de > > --- > > arch/powerpc/lib/board.c | 16 +++- > > 1 files changed, 15 insertions(+), 1 deletions(-) > > Needs a Wolfgang or Stefan ack. Fine with me: Acked-by: Stefan Roese Cheers, Stefan -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: off...@denx.de ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH 05/17] ppc: Don't initialize write protected NOR flashes
On Sep 29, 2010, at 2:05 PM, Peter Tyser wrote: > From: John Schmoller > > If a NOR flash is write protected it can not be initialized/detected so > add the ability for boards to skip NOR initialization on bootup. A > board can skip NOR initialization by implementing the > board_flash_wp_on() function. > > Signed-off-by: John Schmoller > Signed-off-by: Peter Tyser > CC: s...@denx.de > --- > arch/powerpc/lib/board.c | 16 +++- > 1 files changed, 15 insertions(+), 1 deletions(-) Needs a Wolfgang or Stefan ack. - k ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH 05/17] ppc: Don't initialize write protected NOR flashes
From: John Schmoller If a NOR flash is write protected it can not be initialized/detected so add the ability for boards to skip NOR initialization on bootup. A board can skip NOR initialization by implementing the board_flash_wp_on() function. Signed-off-by: John Schmoller Signed-off-by: Peter Tyser CC: s...@denx.de --- 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 8f6a7c9..a105e1c 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) { @@ -703,7 +713,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, ""); /* -- 1.7.0.4 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot