public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCHv2] onenand: Fix compile errors due to FlexOneNAND
@ 2009-12-18  9:25 Sanjeev Premi
  2009-12-18 14:04 ` Tom
  0 siblings, 1 reply; 3+ messages in thread
From: Sanjeev Premi @ 2009-12-18  9:25 UTC (permalink / raw)
  To: u-boot

This patch fixes the compile error while trying to
compile for omap3evm.

env_onenand.c: In function 'env_relocate_spec':
env_onenand.c:70: error: 'CONFIG_ENV_ADDR_FLEX' undeclared
 (first use in this function)
env_onenand.c:70: error: (Each undeclared identifier is re
ported only once
env_onenand.c:70: error: for each function it appears in.)
env_onenand.c: In function 'saveenv':
env_onenand.c:106: error: 'CONFIG_ENV_ADDR_FLEX' undeclare
d (first use in this function)
env_onenand.c:107: error: 'CONFIG_ENV_SIZE_FLEX' undeclare
d (first use in this function)

Signed-off-by: Sanjeev Premi <premi@ti.com>
---
 common/env_onenand.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/common/env_onenand.c b/common/env_onenand.c
index 23d2caa..cf997bf 100644
--- a/common/env_onenand.c
+++ b/common/env_onenand.c
@@ -60,15 +60,18 @@ uchar env_get_char_spec(int index)
 void env_relocate_spec(void)
 {
 	struct mtd_info *mtd = &onenand_mtd;
+#ifdef CONFIG_ENV_ADDR_FLEX
 	struct onenand_chip *this = &onenand_chip;
+#endif
 	loff_t env_addr;
 	int use_default = 0;
 	size_t retlen;
 
 	env_addr = CONFIG_ENV_ADDR;
+#ifdef CONFIG_ENV_ADDR_FLEX
 	if (FLEXONENAND(this))
 		env_addr = CONFIG_ENV_ADDR_FLEX;
-
+#endif
 	/* Check OneNAND exist */
 	if (mtd->writesize)
 		/* Ignore read fail */
@@ -94,7 +97,9 @@ void env_relocate_spec(void)
 int saveenv(void)
 {
 	struct mtd_info *mtd = &onenand_mtd;
+#ifdef CONFIG_ENV_ADDR_FLEX
 	struct onenand_chip *this = &onenand_chip;
+#endif
 	loff_t env_addr = CONFIG_ENV_ADDR;
 	struct erase_info instr = {
 		.callback	= NULL,
@@ -102,12 +107,14 @@ int saveenv(void)
 	size_t retlen;
 
 	instr.len = CONFIG_ENV_SIZE;
+#ifdef CONFIG_ENV_ADDR_FLEX
 	if (FLEXONENAND(this)) {
 		env_addr = CONFIG_ENV_ADDR_FLEX;
 		instr.len = CONFIG_ENV_SIZE_FLEX;
 		instr.len <<= onenand_mtd.eraseregions[0].numblocks == 1 ?
 				1 : 0;
 	}
+#endif
 	instr.addr = env_addr;
 	instr.mtd = mtd;
 	if (mtd->erase(mtd, &instr)) {
-- 
1.6.2.2

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [U-Boot] [PATCHv2] onenand: Fix compile errors due to FlexOneNAND
  2009-12-18  9:25 [U-Boot] [PATCHv2] onenand: Fix compile errors due to FlexOneNAND Sanjeev Premi
@ 2009-12-18 14:04 ` Tom
  2010-01-06 22:30   ` Scott Wood
  0 siblings, 1 reply; 3+ messages in thread
From: Tom @ 2009-12-18 14:04 UTC (permalink / raw)
  To: u-boot

Sanjeev Premi wrote:
> This patch fixes the compile error while trying to
> compile for omap3evm.
> 
> env_onenand.c: In function 'env_relocate_spec':
> env_onenand.c:70: error: 'CONFIG_ENV_ADDR_FLEX' undeclared
>  (first use in this function)
> env_onenand.c:70: error: (Each undeclared identifier is re
> ported only once
> env_onenand.c:70: error: for each function it appears in.)
> env_onenand.c: In function 'saveenv':
> env_onenand.c:106: error: 'CONFIG_ENV_ADDR_FLEX' undeclare
> d (first use in this function)
> env_onenand.c:107: error: 'CONFIG_ENV_SIZE_FLEX' undeclare
> d (first use in this function)
> 
> Signed-off-by: Sanjeev Premi <premi@ti.com>

Ack-ed
Thank you,
Tom

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot] [PATCHv2] onenand: Fix compile errors due to FlexOneNAND
  2009-12-18 14:04 ` Tom
@ 2010-01-06 22:30   ` Scott Wood
  0 siblings, 0 replies; 3+ messages in thread
From: Scott Wood @ 2010-01-06 22:30 UTC (permalink / raw)
  To: u-boot

On Fri, Dec 18, 2009 at 08:04:55AM -0600, Tom wrote:
> Sanjeev Premi wrote:
> > This patch fixes the compile error while trying to
> > compile for omap3evm.
> > 
> > env_onenand.c: In function 'env_relocate_spec':
> > env_onenand.c:70: error: 'CONFIG_ENV_ADDR_FLEX' undeclared
> >  (first use in this function)
> > env_onenand.c:70: error: (Each undeclared identifier is re
> > ported only once
> > env_onenand.c:70: error: for each function it appears in.)
> > env_onenand.c: In function 'saveenv':
> > env_onenand.c:106: error: 'CONFIG_ENV_ADDR_FLEX' undeclare
> > d (first use in this function)
> > env_onenand.c:107: error: 'CONFIG_ENV_SIZE_FLEX' undeclare
> > d (first use in this function)
> > 
> > Signed-off-by: Sanjeev Premi <premi@ti.com>
> 
> Ack-ed
> Thank you,
> Tom

Applied to u-boot-nand-flash.

-Scott

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-01-06 22:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-18  9:25 [U-Boot] [PATCHv2] onenand: Fix compile errors due to FlexOneNAND Sanjeev Premi
2009-12-18 14:04 ` Tom
2010-01-06 22:30   ` Scott Wood

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox