Sorry, there's typo. Here's fixed patch.
diff --git a/onenand_ipl/onenand_read.c b/onenand_ipl/onenand_read.c index 8d0df81..47b60b3 100644 --- a/onenand_ipl/onenand_read.c +++ b/onenand_ipl/onenand_read.c @@ -110,6 +110,14 @@ static void onenand_generic_init(int *page_is_4KiB, int *page) *page_is_4KiB = 1; } +static int __onenand_board_init(int *page_is_4KiB, int *page) +{ + return 0; +} + +int onenand_board_init(int *page_is_4KiB, int *page) + __attribute__((weak, alias("__onenand_board_init"))); + /** * onenand_read_block - Read CONFIG_SYS_MONITOR_LEN from begining * of OneNAND, skipping bad blocks @@ -120,11 +128,13 @@ int onenand_read_block(unsigned char *buf) int block, nblocks; int page = CONFIG_ONENAND_START_PAGE, offset = 0; int pagesize, erasesize, erase_shift; - int page_is_4KiB = 0; + int page_is_4KiB = 0, ret; onenand_read_page = generic_onenand_read_page; - onenand_generic_init(&page_is_4KiB, &page); + ret = onenand_board_init(&page_is_4KiB, &page); + if (!ret) + onenand_generic_init(&page_is_4KiB, &page); if (page_is_4KiB) { pagesize = 4096; /* OneNAND has 4KiB pagesize */ On Wed, Oct 7, 2009 at 10:24 AM, Kyungmin Park <kmp...@infradead.org> wrote: > Some Samsung SoCs, s3c64xx, s5pc100 has own OneNAND controller > and different OneNAND access method. > To support this, each board has own init and set onenand_read_page for it. > > Signed-off-by: Kyungmin Park <kyungmin.p...@samsung.com> > --- > diff --git a/onenand_ipl/onenand_read.c b/onenand_ipl/onenand_read.c > index 8d0df81..47b60b3 100644 > --- a/onenand_ipl/onenand_read.c > +++ b/onenand_ipl/onenand_read.c > @@ -110,6 +110,14 @@ static void onenand_generic_init(int *page_is_4KiB, int > *page) > *page_is_4KiB = 1; > } > > +static int __onenand_board_init(int *page_is_4KiB, int *page) > +{ > + return 0; > +} > + > +int onenand_board_init(int *page_is_4KiB, int *page) > + __attribute__((weak, alias("__onenand_board_init"))); > + > /** > * onenand_read_block - Read CONFIG_SYS_MONITOR_LEN from begining > * of OneNAND, skipping bad blocks > @@ -120,11 +128,13 @@ int onenand_read_block(unsigned char *buf) > int block, nblocks; > int page = CONFIG_ONENAND_START_PAGE, offset = 0; > int pagesize, erasesize, erase_shift; > - int page_is_4KiB = 0; > + int page_is_4KiB = 0, ret; > > onenand_read_page = generic_onenand_read_page; > > - onenand_generic_init(&page_is_4KiB, &page); > + ret = onenand_board_init(&page_is_4KiB, &page); > + if (ret) > + onenand_generic_init(&page_is_4KiB, &page); > > if (page_is_4KiB) { > pagesize = 4096; /* OneNAND has 4KiB pagesize */ > _______________________________________________ > U-Boot mailing list > U-Boot@lists.denx.de > http://lists.denx.de/mailman/listinfo/u-boot > _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot