Joseph Smith | 0fd8ccd | 2008-05-16 15:43:35 +0000 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of the coreboot project. |
| 3 | * |
| 4 | * Copyright (C) 2008 Joseph Smith <joe@settoplinux.org> |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by |
| 8 | * the Free Software Foundation; either version 2 of the License, or |
| 9 | * (at your option) any later version. |
| 10 | * |
| 11 | * This program is distributed in the hope that it will be useful, |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | * GNU General Public License for more details. |
Joseph Smith | 0fd8ccd | 2008-05-16 15:43:35 +0000 | [diff] [blame] | 15 | */ |
| 16 | |
| 17 | #include <spd.h> |
| 18 | |
Joseph Smith | 7ae1163 | 2010-02-12 17:58:53 +0000 | [diff] [blame] | 19 | #if CONFIG_ONBOARD_MEMORY_64MB |
| 20 | |
| 21 | #define DENSITY 0x10 |
| 22 | |
| 23 | #elif CONFIG_ONBOARD_MEMORY_128MB |
| 24 | |
| 25 | #define DENSITY 0x20 |
| 26 | |
| 27 | #endif |
| 28 | |
Joseph Smith | 0fd8ccd | 2008-05-16 15:43:35 +0000 | [diff] [blame] | 29 | struct spd_entry { |
| 30 | unsigned int address; |
| 31 | unsigned int data; |
| 32 | }; |
| 33 | |
| 34 | /* |
| 35 | * The onboard 64MB PC133 memory does not have an SPD EEPROM so the values |
| 36 | * have to be set manually, the onboard memory is located in socket1 (0x51). |
| 37 | */ |
| 38 | const struct spd_entry spd_table [] = { |
| 39 | {SPD_MEMORY_TYPE, 0x04}, /* (Fundamental) memory type */ |
| 40 | {SPD_NUM_COLUMNS, 0x09}, /* Number of column address bits */ |
| 41 | {SPD_NUM_DIMM_BANKS, 0x01}, /* Number of module rows (banks) */ |
| 42 | {SPD_MODULE_DATA_WIDTH_LSB, 0x40}, /* Module data width (LSB) */ |
| 43 | {SPD_MIN_CYCLE_TIME_AT_CAS_MAX, 0x75}, /* SDRAM cycle time (highest CAS latency), RAS access time (tRAC) */ |
| 44 | {SPD_ACCESS_TIME_FROM_CLOCK, 0x54}, /* SDRAM access time from clock (highest CAS latency), CAS access time (Tac, tCAC) */ |
Joseph Smith | 7ae1163 | 2010-02-12 17:58:53 +0000 | [diff] [blame] | 45 | {SPD_DENSITY_OF_EACH_ROW_ON_MODULE, DENSITY}, /* Density of each row on module */ |
Joseph Smith | 0fd8ccd | 2008-05-16 15:43:35 +0000 | [diff] [blame] | 46 | }; |