From: Marek Vasut <marek.vasut@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 4/4] OneNAND: Use generic_onenand_read_page in IPL
Date: Thu, 14 Oct 2010 23:15:38 +0200 [thread overview]
Message-ID: <201010142315.38408.marek.vasut@gmail.com> (raw)
In-Reply-To: <01f801cb6355$081f2560$185d7020$%park@samsung.com>
Dne Po 4. ??jna 2010 01:45:16 Kyungmin Park napsal(a):
> Hi,
>
> There's no OneNAND tree but all patches are mainlined by Scott Wood's tree.
>
> And related with patch. I wonder why it's problem with your board?
>
> As it's function pointer. It should be located the data section and it's
> assigned at runtime.
>
> Maybe your board runs the code at OneNAND directly. It's the reason do you
> need to fixup.
>
> I'll prepare the patches to fix this issue. So don't delete the codes.
Hi,
any update ?
Thanks
>
> Thank you,
> Kyungmin Park
>
> -----Original Message-----
> From: Marek Vasut [mailto:marek.vasut at gmail.com]
> Sent: Monday, October 04, 2010 8:34 AM
> To: Kyungmin Park
> Cc: u-boot at lists.denx.de
> Subject: Re: [U-Boot] [PATCH 4/4] OneNAND: Use generic_onenand_read_page in
> IPL
>
> Dne Ne 3. ??jna 2010 16:27:04 Marek Vasut napsal(a):
> > Dne Ne 3. ??jna 2010 08:40:19 Kyungmin Park napsal(a):
> > > Hi,
> > >
> > > No it's used another place. that's reason not static function pointer.
> > > I'll update it soon.
> >
> > Hey, my problem is this code hangs my CPU. If I apply this patch, it
> > doesn't happen anymore.
> >
> > Where is this used and what's your proposed change?
>
> btw. who's the OneNAND maintainer (aka. who's supposed to pick up these
> changes ?)
>
> > Thank you in advance
> >
> > > Thank you,
> > > Kyungmin Park
> > >
> > > On Sun, Oct 3, 2010 at 2:33 AM, Marek Vasut <marek.vasut@gmail.com> wrote:
> > > > There apparantly is no reason for having "onenand_read_page"
> > > > abstracted. Besides, it's static data which causes trouble.
> > > >
> > > > Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
> > > > ---
> > > >
> > > > onenand_ipl/onenand_read.c | 9 +++------
> > > > 1 files changed, 3 insertions(+), 6 deletions(-)
> > > >
> > > > diff --git a/onenand_ipl/onenand_read.c b/onenand_ipl/onenand_read.c
> > > > index 8d0df81..008d73a 100644
> > > > --- a/onenand_ipl/onenand_read.c
> > > > +++ b/onenand_ipl/onenand_read.c
> > > > @@ -37,8 +37,6 @@
> > > >
> > > > extern void *memcpy32(void *dest, void *src, int size);
> > > > #endif
> > > >
> > > > -int (*onenand_read_page)(ulong block, ulong page, u_char *buf, int
> > > > pagesize); -
> > > >
> > > > /* read a page with ECC */
> > > > static int generic_onenand_read_page(ulong block, ulong page,
> > > >
> > > > u_char * buf, int pagesize)
> > > >
> > > > @@ -122,8 +120,6 @@ int onenand_read_block(unsigned char *buf)
> > > >
> > > > int pagesize, erasesize, erase_shift;
> > > > int page_is_4KiB = 0;
> > > >
> > > > - onenand_read_page = generic_onenand_read_page;
> > > > -
> > > >
> > > > onenand_generic_init(&page_is_4KiB, &page);
> > > >
> > > > if (page_is_4KiB) {
> > > >
> > > > @@ -139,10 +135,11 @@ int onenand_read_block(unsigned char *buf)
> > > >
> > > > /* NOTE: you must read page from page 1 of block 0 */
> > > > /* read the block page by page */
> > > >
> > > > +
> > > >
> > > > for (block = 0; block < nblocks; block++) {
> > > >
> > > > for (; page < ONENAND_PAGES_PER_BLOCK; page++) {
> > > >
> > > > - if (onenand_read_page(block, page, buf +
> > > > offset, - pagesize)) {
> > > > + if (generic_onenand_read_page(block, page,
> > > > + buf + offset, pagesize)) {
> > > >
> > > > /* This block is bad. Skip it
> > > >
> > > > * and read next block */
> > > >
> > > > offset -= page * pagesize;
> > > >
> > > > --
> > > > 1.7.1
> > > >
> > > > _______________________________________________
> > > > U-Boot mailing list
> > > > U-Boot at lists.denx.de
> > > > http://lists.denx.de/mailman/listinfo/u-boot
next prev parent reply other threads:[~2010-10-14 21:15 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-02 17:33 [U-Boot] [PATCH 1/4] OneNAND: Move largepage_memorybased Marek Vasut
2010-10-02 17:33 ` [U-Boot] [PATCH 2/4] OneNAND: Fixup command table on reloc Marek Vasut
2010-10-02 18:28 ` Minkyu Kang
2010-10-02 18:59 ` Marek Vasut
2010-10-02 19:31 ` Minkyu Kang
2010-10-03 18:21 ` Wolfgang Denk
2010-10-03 19:24 ` Marek Vasut
2010-10-03 21:16 ` Wolfgang Denk
2010-10-03 11:19 ` Sergei Shtylyov
2010-10-03 14:25 ` Marek Vasut
2010-10-03 18:39 ` Wolfgang Denk
2010-10-02 17:33 ` [U-Boot] [PATCH 3/4] OneNAND: Introduce CONFIG_SYS_IPL_LOAD_ADDR Marek Vasut
2010-10-03 6:40 ` Kyungmin Park
2010-10-03 14:25 ` Marek Vasut
2010-10-02 17:33 ` [U-Boot] [PATCH 4/4] OneNAND: Use generic_onenand_read_page in IPL Marek Vasut
2010-10-03 6:40 ` Kyungmin Park
2010-10-03 14:27 ` Marek Vasut
2010-10-03 23:33 ` Marek Vasut
2010-10-03 23:45 ` Kyungmin Park
2010-10-04 0:24 ` Marek Vasut
2010-10-04 6:05 ` Wolfgang Denk
2010-10-14 21:15 ` Marek Vasut [this message]
2010-10-04 18:09 ` Scott Wood
2010-10-04 0:23 ` [U-Boot] [PATCH 1/4] OneNAND: Move largepage_memorybased Marek Vasut
2010-10-04 17:59 ` Scott Wood
2010-10-04 21:15 ` Marek Vasut
2010-10-04 21:18 ` Scott Wood
2010-10-04 22:31 ` Marek Vasut
2010-10-05 2:05 ` Kyungmin Park
2010-10-05 2:36 ` Marek Vasut
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201010142315.38408.marek.vasut@gmail.com \
--to=marek.vasut@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox