Skip to content
Snippets Groups Projects
Commit f5577aae authored by Stefan Roese's avatar Stefan Roese
Browse files

Improve DIMM detection for AMCC Yucca 440SPe board

Improved the memory DIMM detection for the Yucca 440SPe board for
the case where a memory DIMM is falsely detected as present.

This issue is seen on some AMCC Yucca 440SPe validation boards if
only one 512MB memory DIMM is installed, i.e. DIMM slot 0 is
populated and DIMM slot 1 is empty.  In this case, U-Boot does
not correctly detect that there is only one DIMM memory module
installed and will falsely detect two DIMM memory modules are
present and therefore U-Boot will not calculate the correct amount
of total memory and u-boot will not booting up.

Patch by Adam Graham, 24 Aug 2006
parent 16850919
No related branches found
No related tags found
No related merge requests found
...@@ -2,6 +2,18 @@ ...@@ -2,6 +2,18 @@
Changes since U-Boot 1.1.4: Changes since U-Boot 1.1.4:
====================================================================== ======================================================================
* Improve DIMM detection for AMCC Yucca 440SPe board
Improved the memory DIMM detection for the Yucca 440SPe board for
the case where a memory DIMM is falsely detected as present.
This issue is seen on some AMCC Yucca 440SPe validation boards if
only one 512MB memory DIMM is installed, i.e. DIMM slot 0 is
populated and DIMM slot 1 is empty. In this case, U-Boot does
not correctly detect that there is only one DIMM memory module
installed and will falsely detect two DIMM memory modules are
present and therefore U-Boot will not calculate the correct amount
of total memory and u-boot will not booting up.
Patch by Adam Graham, 24 Aug 2006
* Code cleanup * Code cleanup
* Update for MCC200 / PRS200 boards: * Update for MCC200 / PRS200 boards:
......
...@@ -562,10 +562,11 @@ int checkboard (void) ...@@ -562,10 +562,11 @@ int checkboard (void)
static long int yucca_probe_for_dimms(void) static long int yucca_probe_for_dimms(void)
{ {
long int dimm_installed[MAXDIMMS]; int dimm_installed[MAXDIMMS];
long int dimm_num, probe_result; int dimm_num, result;
long int dimms_found = 0; int dimms_found = 0;
uchar dimm_addr = IIC0_DIMM0_ADDR; uchar dimm_addr = IIC0_DIMM0_ADDR;
uchar dimm_spd_data[MAX_SPD_BYTES];
for (dimm_num = 0; dimm_num < MAXDIMMS; dimm_num++) { for (dimm_num = 0; dimm_num < MAXDIMMS; dimm_num++) {
/* check if there is a chip at the dimm address */ /* check if there is a chip at the dimm address */
...@@ -577,12 +578,28 @@ static long int yucca_probe_for_dimms(void) ...@@ -577,12 +578,28 @@ static long int yucca_probe_for_dimms(void)
dimm_addr = IIC0_DIMM1_ADDR; dimm_addr = IIC0_DIMM1_ADDR;
break; break;
} }
probe_result = i2c_probe(dimm_addr);
if (probe_result == 0) { result = i2c_probe(dimm_addr);
memset(dimm_spd_data, 0, MAX_SPD_BYTES * sizeof(char));
if (result == 0) {
/* read first byte of SPD data, if there is any data */
result = i2c_read(dimm_addr, 0, 1, dimm_spd_data, 1);
if (result == 0) {
result = dimm_spd_data[0];
result = result > MAX_SPD_BYTES ?
MAX_SPD_BYTES : result;
result = i2c_read(dimm_addr, 0, 1,
dimm_spd_data, result);
}
}
if ((result == 0) &&
(dimm_spd_data[64] == MICRON_SPD_JEDEC_ID)) {
dimm_installed[dimm_num] = TRUE; dimm_installed[dimm_num] = TRUE;
dimms_found++; dimms_found++;
debug("DIMM slot %d: DDR2 SDRAM detected\n",dimm_num); debug("DIMM slot %d: DDR2 SDRAM detected\n", dimm_num);
} else { } else {
dimm_installed[dimm_num] = FALSE; dimm_installed[dimm_num] = FALSE;
debug("DIMM slot %d: Not populated or cannot sucessfully probe the DIMM\n", dimm_num); debug("DIMM slot %d: Not populated or cannot sucessfully probe the DIMM\n", dimm_num);
......
...@@ -60,6 +60,9 @@ extern "C" { ...@@ -60,6 +60,9 @@ extern "C" {
#define NUM_TLB_ENTRIES 64 #define NUM_TLB_ENTRIES 64
/* MICRON SPD JEDEC ID Code (first byte) - SPD data byte [64] */
#define MICRON_SPD_JEDEC_ID 0x2c
/*----------------------------------------------------------------------------+ /*----------------------------------------------------------------------------+
| TLB specific defines. | TLB specific defines.
+----------------------------------------------------------------------------*/ +----------------------------------------------------------------------------*/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment