diff options
author | Wolfgang Denk <wd@denx.de> | 2011-01-17 20:31:46 +0100 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2011-01-17 20:31:46 +0100 |
commit | e1ccf97c5d7651664d37c0c5aa243874b8851b2d (patch) | |
tree | 666d8970fcb8744ddefb039fc49a7d1a5a1d09e7 /arch/powerpc/cpu/mpc8xxx/ddr/options.c | |
parent | aad813a342aca1a8127a283c64813e4ae4464d9c (diff) | |
parent | f133796da8ec87ccbafc9c492636def619d99401 (diff) |
Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx
Diffstat (limited to 'arch/powerpc/cpu/mpc8xxx/ddr/options.c')
-rw-r--r-- | arch/powerpc/cpu/mpc8xxx/ddr/options.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/arch/powerpc/cpu/mpc8xxx/ddr/options.c b/arch/powerpc/cpu/mpc8xxx/ddr/options.c index 774c0e4b42..c641e85068 100644 --- a/arch/powerpc/cpu/mpc8xxx/ddr/options.c +++ b/arch/powerpc/cpu/mpc8xxx/ddr/options.c @@ -1,5 +1,5 @@ /* - * Copyright 2008, 2010 Freescale Semiconductor, Inc. + * Copyright 2008, 2010-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 as published by the Free @@ -387,3 +387,23 @@ void check_interleaving_options(fsl_ddr_info_t *pinfo) "Memory controller interleaving disabled.\n"); } } + +int fsl_use_spd(void) +{ + int use_spd = 0; + +#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 + + return use_spd; +} |