From: Tom Rini <trini@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 1/7] am33xx/omap3: Clean up gpmc_init slightly
Date: Mon, 13 May 2013 14:28:33 -0400 [thread overview]
Message-ID: <1368469719-22406-1-git-send-email-trini@ti.com> (raw)
We don't really need the gpmc_config, base and size variables and can
just call enable_gpmc_cs_config more directly, like the boards which
need to re-configure CS0 or CS1 do.
Signed-off-by: Tom Rini <trini@ti.com>
---
Changes in v2:
- New patch
---
arch/arm/cpu/armv7/am33xx/mem.c | 12 ++----------
arch/arm/cpu/armv7/omap3/mem.c | 18 ++++--------------
2 files changed, 6 insertions(+), 24 deletions(-)
diff --git a/arch/arm/cpu/armv7/am33xx/mem.c b/arch/arm/cpu/armv7/am33xx/mem.c
index b86b0de..45f5426 100644
--- a/arch/arm/cpu/armv7/am33xx/mem.c
+++ b/arch/arm/cpu/armv7/am33xx/mem.c
@@ -75,11 +75,6 @@ void gpmc_init(void)
/* putting a blanket check on GPMC based on ZeBu for now */
gpmc_cfg = (struct gpmc *)GPMC_BASE;
-#ifdef CONFIG_CMD_NAND
- const u32 *gpmc_config = NULL;
- u32 base = 0;
- u32 size = 0;
-#endif
/* global settings */
writel(0x00000008, &gpmc_cfg->sysconfig);
writel(0x00000100, &gpmc_cfg->irqstatus);
@@ -92,10 +87,7 @@ void gpmc_init(void)
sdelay(1000);
#ifdef CONFIG_CMD_NAND
- gpmc_config = gpmc_m_nand;
-
- base = PISMO1_NAND_BASE;
- size = PISMO1_NAND_SIZE;
- enable_gpmc_cs_config(gpmc_config, &gpmc_cfg->cs[0], base, size);
+ enable_gpmc_cs_config(gpmc_m_nand, &gpmc_cfg->cs[0],
+ CONFIG_SYS_NAND_BASE, GPMC_SIZE_256M);
#endif
}
diff --git a/arch/arm/cpu/armv7/omap3/mem.c b/arch/arm/cpu/armv7/omap3/mem.c
index d04a5a1..6f65a73 100644
--- a/arch/arm/cpu/armv7/omap3/mem.c
+++ b/arch/arm/cpu/armv7/omap3/mem.c
@@ -113,11 +113,6 @@ void gpmc_init(void)
{
/* putting a blanket check on GPMC based on ZeBu for now */
gpmc_cfg = (struct gpmc *)GPMC_BASE;
-#if defined(CONFIG_CMD_NAND) || defined(CONFIG_CMD_ONENAND)
- const u32 *gpmc_config = NULL;
- u32 base = 0;
- u32 size = 0;
-#endif
u32 config = 0;
/* global settings */
@@ -136,17 +131,12 @@ void gpmc_init(void)
sdelay(1000);
#if defined(CONFIG_CMD_NAND) /* CS 0 */
- gpmc_config = gpmc_m_nand;
-
- base = PISMO1_NAND_BASE;
- size = PISMO1_NAND_SIZE;
- enable_gpmc_cs_config(gpmc_config, &gpmc_cfg->cs[0], base, size);
+ enable_gpmc_cs_config(gpmc_m_nand, &gpmc_cfg->cs[0], PISMO1_NAND_BASE,
+ PISMO1_NAND_SIZE);
#endif
#if defined(CONFIG_CMD_ONENAND)
- gpmc_config = gpmc_onenand;
- base = PISMO1_ONEN_BASE;
- size = PISMO1_ONEN_SIZE;
- enable_gpmc_cs_config(gpmc_config, &gpmc_cfg->cs[0], base, size);
+ enable_gpmc_cs_config(gpmc_onenand, &gpmc_cfg->cs[0], PISMO1_ONEN_BASE,
+ PISMO1_ONEN_SIZE);
#endif
}
--
1.7.9.5
next reply other threads:[~2013-05-13 18:28 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-13 18:28 Tom Rini [this message]
2013-05-13 18:28 ` [U-Boot] [PATCH v2 2/7] am335x_evm: Drop useless CONFIG_ENV_IS_NOWHERE Tom Rini
2013-05-13 18:28 ` [U-Boot] [PATCH v2 3/7] am335x_evm: Update SPI_BOOT support, add MTDPARTS info Tom Rini
2013-05-15 20:41 ` Peter Korsgaard
2013-05-13 18:28 ` [U-Boot] [PATCH v2 4/7] am335x_evm: Only set CONFIG_NAND when !CONFIG_SPI_BOOT Tom Rini
2013-05-15 20:42 ` Peter Korsgaard
2013-05-13 18:28 ` [U-Boot] [PATCH v2 5/7] am335x_evm: Rework board_is_foo() checks Tom Rini
2013-05-15 20:43 ` Peter Korsgaard
2013-05-13 18:28 ` [U-Boot] [PATCH v2 6/7] am335x_evm: Add support for the NOR module on the memory cape Tom Rini
2013-05-16 14:32 ` Peter Korsgaard
2013-05-16 14:46 ` Tom Rini
2013-05-16 18:54 ` Peter Korsgaard
2013-05-16 19:27 ` Tom Rini
2013-05-16 19:32 ` Peter Korsgaard
2013-05-13 18:28 ` [U-Boot] [PATCH v2 7/7] am335x_evm: Add support to boot from NOR Tom Rini
2013-05-16 14:36 ` Peter Korsgaard
2013-05-16 14:49 ` Tom Rini
2013-05-16 18:55 ` Peter Korsgaard
2013-05-16 19:30 ` Tom Rini
2013-05-16 19:32 ` Peter Korsgaard
2013-06-17 14:43 ` Mark Jackson
2013-06-17 14:49 ` Tom Rini
2013-06-17 14:59 ` Mark Jackson
2013-06-17 15:01 ` Tom Rini
2013-06-17 15:23 ` Mark Jackson
2013-06-17 15:23 ` Mark Jackson
2013-06-17 15:29 ` Tom Rini
2013-06-17 16:01 ` Stefan Roese
2013-06-17 16:10 ` Mark Jackson
2013-06-17 17:04 ` Kipisz, Steven
2013-06-17 18:38 ` Mark Jackson
2013-06-18 12:11 ` Mark Jackson
2013-07-11 13:06 ` Mark Jackson
2013-07-11 13:28 ` Tom Rini
2013-07-11 13:45 ` Mark Jackson
2013-07-11 14:34 ` Albert ARIBAUD
2013-07-11 15:54 ` Tom Rini
2013-07-11 16:08 ` Albert ARIBAUD
2013-07-11 16:14 ` Albert ARIBAUD
2013-07-11 16:17 ` Tom Rini
2013-07-17 12:58 ` Mark Jackson
2013-07-17 13:32 ` Tom Rini
2013-05-15 20:39 ` [U-Boot] [PATCH v2 1/7] am33xx/omap3: Clean up gpmc_init slightly Peter Korsgaard
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=1368469719-22406-1-git-send-email-trini@ti.com \
--to=trini@ti.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