summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorKumar Gala <galak@kernel.crashing.org>2011-01-09 14:06:28 -0600
committerKumar Gala <galak@kernel.crashing.org>2011-01-14 01:32:22 -0600
commit3dbd5d7d7e2c98380779a48a422afa239d3bbdf4 (patch)
tree2256dda3befc7dc4e153f7ae69d7e36aa35b6c71 /board
parentae026ffd1e1a3f98b13c121acf5a677a5925a0e1 (diff)
downloadu-boot-imx-3dbd5d7d7e2c98380779a48a422afa239d3bbdf4.zip
u-boot-imx-3dbd5d7d7e2c98380779a48a422afa239d3bbdf4.tar.gz
u-boot-imx-3dbd5d7d7e2c98380779a48a422afa239d3bbdf4.tar.bz2
powerpc/8xxx: Move fsl_is_spd() into generic 8xxx ddr code
Move the parsing of hwconfig to determine if to use spd into common code so we can share it across all boards instead of duplicating it everywhere. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'board')
-rw-r--r--board/freescale/corenet_ds/ddr.c18
1 files changed, 2 insertions, 16 deletions
diff --git a/board/freescale/corenet_ds/ddr.c b/board/freescale/corenet_ds/ddr.c
index 2ee0188..85b6c78 100644
--- a/board/freescale/corenet_ds/ddr.c
+++ b/board/freescale/corenet_ds/ddr.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2009-2010 Freescale Semiconductor, Inc.
+ * Copyright 2009-2011 Freescale Semiconductor, Inc.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -288,24 +288,10 @@ void fsl_ddr_board_options(memctl_options_t *popts,
phys_size_t initdram(int board_type)
{
phys_size_t dram_size;
- int use_spd = 0;
puts("Initializing....");
-#ifdef CONFIG_DDR_SPD
- /* if hwconfig is not enabled, or "sdram" is not defined, use spd */
- if (hwconfig_sub("fsl_ddr", "sdram")) {
- if (hwconfig_subarg_cmp("fsl_ddr", "sdram", "spd"))
- use_spd = 1;
- else if (hwconfig_subarg_cmp("fsl_ddr", "sdram", "fixed"))
- use_spd = 0;
- else
- use_spd = 1;
- } else
- use_spd = 1;
-#endif
-
- if (use_spd) {
+ if (fsl_use_spd()) {
puts("using SPD\n");
dram_size = fsl_ddr_sdram();
} else {