From: Kyungmin Park <kmpark@infradead.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] [OneNAND IPL] OneNAND board init support
Date: Wed, 07 Oct 2009 10:24:48 +0900 [thread overview]
Message-ID: <20091007012448.GA6520@july> (raw)
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.park@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 */
next reply other threads:[~2009-10-07 1:24 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-07 1:24 Kyungmin Park [this message]
2009-10-07 3:12 ` [U-Boot] [PATCH] [OneNAND IPL] OneNAND board init support Kyungmin Park
2009-10-19 19:51 ` Scott Wood
-- strict thread matches above, loose matches on Subject: below --
2009-08-29 4:00 Kyungmin Park
2009-09-18 19:26 ` Scott Wood
2009-09-19 1:32 ` Kyungmin Park
2009-09-21 16:15 ` Scott Wood
2009-09-21 23:52 ` Kyungmin Park
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=20091007012448.GA6520@july \
--to=kmpark@infradead.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.