| 1 |
|
| 2 |
|
| 3 |
#include <console/console.h> |
| 4 |
#include <gpio.h> |
| 5 |
#include <northbridge/intel/sandybridge/raminit.h> |
| 6 |
|
| 7 |
static unsigned int get_spd_index(void) |
| 8 |
{ |
| 9 |
const gpio_t spd_gpio_vector[] = {25, 45}; |
| 10 |
unsigned int spd_index = gpio_base2_value(spd_gpio_vector, |
| 11 |
ARRAY_SIZE(spd_gpio_vector)); |
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
if (spd_index == 3) |
| 32 |
die("Unsupported Memory. (detected 'reserved' memory configuration)."); |
| 33 |
|
| 34 |
return spd_index; |
| 35 |
} |
| 36 |
|
| 37 |
void mb_get_spd_map(struct spd_info *spdi) |
| 38 |
{ |
| 39 |
spdi->addresses[0] = SPD_MEMORY_DOWN; |
| 40 |
spdi->addresses[2] = SPD_MEMORY_DOWN; |
| 41 |
spdi->spd_index = get_spd_index(); |
| 42 |
} |