From: "Pali Rohár" <pali@kernel.org>
To: u-boot@lists.denx.de
Subject: [PATCH 5/6] Nokia RX-51: Make onenand working
Date: Sat, 31 Oct 2020 17:32:49 +0100 [thread overview]
Message-ID: <20201031163250.14866-5-pali@kernel.org> (raw)
In-Reply-To: <20201031163250.14866-1-pali@kernel.org>
From: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
set_gpmc_cs0() sets wrong timings and size for Nokia N900 onenand flash.
Fix that by setting the correct timings and size from the board code
Signed-off-by: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
Tested-by: Pali Roh?r <pali@kernel.org>
---
board/nokia/rx51/rx51.c | 15 +++++++++++++++
board/nokia/rx51/rx51.h | 7 +++++++
2 files changed, 22 insertions(+)
diff --git a/board/nokia/rx51/rx51.c b/board/nokia/rx51/rx51.c
index 528c592441..3d62b5d9ad 100644
--- a/board/nokia/rx51/rx51.c
+++ b/board/nokia/rx51/rx51.c
@@ -200,8 +200,23 @@ static void reuse_atags(void)
*/
int board_init(void)
{
+#if defined(CONFIG_CMD_ONENAND)
+ const u32 gpmc_regs_onenandrx51[GPMC_MAX_REG] = {
+ ONENAND_GPMC_CONFIG1_RX51,
+ ONENAND_GPMC_CONFIG2_RX51,
+ ONENAND_GPMC_CONFIG3_RX51,
+ ONENAND_GPMC_CONFIG4_RX51,
+ ONENAND_GPMC_CONFIG5_RX51,
+ ONENAND_GPMC_CONFIG6_RX51,
+ 0
+ };
+#endif
/* in SRAM or SDRAM, finish GPMC */
gpmc_init();
+#if defined(CONFIG_CMD_ONENAND)
+ enable_gpmc_cs_config(gpmc_regs_onenandrx51, &gpmc_cfg->cs[0],
+ CONFIG_SYS_ONENAND_BASE, GPMC_SIZE_256M);
+#endif
/* Enable the clks & power */
per_clocks_enable();
/* boot param addr */
diff --git a/board/nokia/rx51/rx51.h b/board/nokia/rx51/rx51.h
index fa1b42bf21..4eff823a1b 100644
--- a/board/nokia/rx51/rx51.h
+++ b/board/nokia/rx51/rx51.h
@@ -367,4 +367,11 @@ struct emu_hal_params_rx51 {
MUX_VAL(CP(UART2_RTS), (IDIS | PTD | DIS | M0)) /*UART2_RTS*/\
MUX_VAL(CP(UART2_TX), (IDIS | PTD | DIS | M0)) /*UART2_TX*/
+#define ONENAND_GPMC_CONFIG1_RX51 0xfb001202
+#define ONENAND_GPMC_CONFIG2_RX51 0x00111100
+#define ONENAND_GPMC_CONFIG3_RX51 0x00020200
+#define ONENAND_GPMC_CONFIG4_RX51 0x11001102
+#define ONENAND_GPMC_CONFIG5_RX51 0x03101616
+#define ONENAND_GPMC_CONFIG6_RX51 0x90060000
+
#endif
--
2.20.1
next prev parent reply other threads:[~2020-10-31 16:32 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-31 16:32 [PATCH 1/6] Nokia RX-51: Remove old comments from configs/nokia_rx51.h file Pali Rohár
2020-10-31 16:32 ` [PATCH 2/6] Nokia RX-51: Fix crashing in U-Boot mmc function omap_hsmmc_stop_clock() Pali Rohár
2020-10-31 16:32 ` [PATCH 3/6] Nokia RX-51: During init disable lp5523 led instead of resetting it Pali Rohár
2020-10-31 16:32 ` [PATCH 4/6] Nokia RX-51: Update test script Pali Rohár
2020-10-31 16:32 ` Pali Rohár [this message]
2020-10-31 16:32 ` [PATCH 6/6] mtd: OneNAND: Set MTD type Pali Rohár
2020-11-15 10:05 ` [PATCH 1/6] Nokia RX-51: Remove old comments from configs/nokia_rx51.h file Lokesh Vutla
2020-11-15 12:06 ` Pali Rohár
2020-11-16 3:27 ` Lokesh Vutla
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=20201031163250.14866-5-pali@kernel.org \
--to=pali@kernel.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.