[U-Boot] Reg. CFI flash_init and hardware write protected devices
Stefan Roese
sr at denx.de
Wed Jun 1 17:34:29 CEST 2011
Hi Frank,
On Wednesday 01 June 2011 16:33:14 Frank Svendsbøe wrote:
> >> Simply because disabling write-protection is not impossible after
> >> installation. Our device will be located 3000m below sea level.
> >
> > I see.
>
> Hmm.. then you read my mind :) I meant to say "is not possible" and not "is
> not impossible" :)
Yep. I read so fast, that I didn't catch the misspelled words. ;)
> Thanks, this worked for me. Is it ok for you too?
>
> diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c
> index 6039e1f..99360af 100644
> --- a/drivers/mtd/cfi_flash.c
> +++ b/drivers/mtd/cfi_flash.c
> @@ -176,6 +176,7 @@ u64 flash_read64(void *addr)__attribute__((weak,
> alias("__flash_read64")));
> #define flash_read64 __flash_read64
> #endif
>
> +
Don't add this empty line.
> /*-----------------------------------------------------------------------
> */
> #if defined(CONFIG_ENV_IS_IN_FLASH) ||
> defined(CONFIG_ENV_ADDR_REDUND) || (CONFIG_SYS_MONITOR_BASE >=
> CONFIG_SYS_FLASH_BASE)
> @@ -2151,7 +2152,8 @@ void flash_protect_default(void)
> #endif
> }
>
> -unsigned long flash_init (void)
> +unsigned long flash_init(void) __attribute__((weak,
> alias("__flash_init"))); +unsigned long __flash_init (void)
> {
> unsigned long size = 0;
> int i;
Looks good. I have no objections. Please go ahead and send this as a "proper"
patch.
Best regards,
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: office at denx.de
More information about the U-Boot
mailing list