public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Kumar Gala <galak@kernel.crashing.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/2] ppc: Move CONFIG_MAX_MEM_MAPPED to common config.h
Date: Thu,  5 Feb 2009 20:40:58 -0600	[thread overview]
Message-ID: <1233888058-21503-2-git-send-email-galak@kernel.crashing.org> (raw)
In-Reply-To: <1233888058-21503-1-git-send-email-galak@kernel.crashing.org>

Moved CONFIG_MAX_MEM_MAPPED to the asm/config.h so its kept consistent
between the two current users (lib_ppc/board.c, 44x SPD DDR2).

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
---
 cpu/ppc4xx/44x_spd_ddr2.c |    3 ---
 include/asm-ppc/config.h  |    8 ++++++++
 lib_ppc/board.c           |    3 ---
 3 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/cpu/ppc4xx/44x_spd_ddr2.c b/cpu/ppc4xx/44x_spd_ddr2.c
index b40e4b1..1e49571 100644
--- a/cpu/ppc4xx/44x_spd_ddr2.c
+++ b/cpu/ppc4xx/44x_spd_ddr2.c
@@ -160,9 +160,6 @@
  * SDRAM. This is because we only map the first 2GB on such systems, and therefore
  * the ECC parity byte of the remaining area can't be written.
  */
-#ifndef CONFIG_MAX_MEM_MAPPED
-#define CONFIG_MAX_MEM_MAPPED	((phys_size_t)2 << 30)
-#endif
 
 /*
  * Board-specific Platform code can reimplement spd_ddr_init_hang () if needed
diff --git a/include/asm-ppc/config.h b/include/asm-ppc/config.h
index 049c44e..6d27cb1 100644
--- a/include/asm-ppc/config.h
+++ b/include/asm-ppc/config.h
@@ -21,4 +21,12 @@
 #ifndef _ASM_CONFIG_H_
 #define _ASM_CONFIG_H_
 
+#ifndef CONFIG_MAX_MEM_MAPPED
+#if defined(CONFIG_SDRAM_PPC4xx_IBM_DDR2) && defined(CONFIG_SPD_EEPROM)
+#define CONFIG_MAX_MEM_MAPPED	((phys_size_t)2 << 30)
+#else
+#define CONFIG_MAX_MEM_MAPPED (256 << 20)
+#endif
+#endif
+
 #endif
diff --git a/lib_ppc/board.c b/lib_ppc/board.c
index df1cf13..c83eb00 100644
--- a/lib_ppc/board.c
+++ b/lib_ppc/board.c
@@ -352,9 +352,6 @@ init_fnc_t *init_sequence[] = {
 	NULL,			/* Terminate this list */
 };
 
-#ifndef CONFIG_MAX_MEM_MAPPED
-#define CONFIG_MAX_MEM_MAPPED (256 << 20)
-#endif
 ulong get_effective_memsize(void)
 {
 #ifndef	CONFIG_VERY_BIG_RAM
-- 
1.5.6.6

  reply	other threads:[~2009-02-06  2:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-06  2:40 [U-Boot] [PATCH 1/2] Add an architecture specific config.h for common defines Kumar Gala
2009-02-06  2:40 ` Kumar Gala [this message]
2009-02-09 15:28   ` [U-Boot] [PATCH 2/2] ppc: Move CONFIG_MAX_MEM_MAPPED to common config.h Stefan Roese
2009-02-09 23:44   ` Wolfgang Denk
2009-02-06  6:38 ` [U-Boot] [PATCH 1/2] Add an architecture specific config.h for common defines Jean-Christophe PLAGNIOL-VILLARD
2009-02-09 23:44 ` Wolfgang Denk

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=1233888058-21503-2-git-send-email-galak@kernel.crashing.org \
    --to=galak@kernel.crashing.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox