[U-Boot-Users] [PATCH 4/5] OneNAND support
Kyungmin Park
kmpark at infradead.org
Mon Sep 10 09:28:06 CEST 2007
> -----Original Message-----
> From: wd at denx.de [mailto:wd at denx.de]
> Sent: Monday, September 10, 2007 4:09 PM
> To: kmpark at infradead.org
> Cc: u-boot-users at lists.sourceforge.net
> Subject: Re: [U-Boot-Users] [PATCH 4/5] OneNAND support
>
> In message <002601c7f348$ae36a480$e1ac580a at swcenter.sec.samsung.co.kr> you wrote:
> >
> > > > +static int check_short_pattern(uint8_t * buf, int len, int paglen,
> ...
> > > > + /* Compare the pattern */
> > > > + for (i = 0; i < td->len; i++) {
> > > > + if (p[i] != td->pattern[i])
> > > > + return -1;
> > > > + }
> ...
> > > This should probably be replaced by a call to memmem() ?
> ...
> > > > +static inline int onenand_memory_bbt(struct mtd_info *mtd,
> ...
> > This BBT code is not yet implemented.
> > It's only scan the full blocks at boot time and display the bad blocks.
> >
> > It's also next time work.
>
> I see. OK.
>
> What about using memmem() above?
>
It's also written in drivers/nand/nand_bbt.c.
Is there any reason to use it?
Maybe people are familiar with this code.
Thank you,
Kyungmin Park
--
static int check_pattern (uint8_t *buf, int len, int paglen, struct nand_bbt_descr *td)
{
int i, end;
uint8_t *p = buf;
...snip...
/* Compare the pattern */
for (i = 0; i < td->len; i++) {
if (p[i] != td->pattern[i])
return -1;
}
...snip...
}
More information about the U-Boot
mailing list