[U-Boot-Users] [PATCH] cfi-flash: Add CFG_FLASH_AUTOPROTECT_LIST

Matthias Fuchs matthias.fuchs at esd-electronics.com
Sat Apr 19 13:30:04 CEST 2008


Hi Jean-Christophe,

is it possible to use weak structures? Or do you mean
a weak function that initializes my autoprotect list?

Please give me an idea and I will implement it.

Matthias

On Friday 18 April 2008 18:01:57 Jean-Christophe PLAGNIOL-VILLARD wrote:
> > diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c
> > index e3cfb8a..68ab55f 100644
> > --- a/drivers/mtd/cfi_flash.c
> > +++ b/drivers/mtd/cfi_flash.c
> > @@ -1873,6 +1873,12 @@ unsigned long flash_init (void)
> >  {
> >  	unsigned long size = 0;
> >  	int i;
> > +#if defined(CFG_FLASH_AUTOPROTECT_LIST)
> > +	struct apl_s {
> > +		ulong start;
> > +		ulong size;
> > +	} apl[] = CFG_FLASH_AUTOPROTECT_LIST;
> > +#endif
>
> I think it will be better to create a weak structure.
>
> Best Regards,
> J.




More information about the U-Boot mailing list