Eric Biederman | 8ca8d76 | 2003-04-22 19:02:15 +0000 | [diff] [blame] | 1 | void sdram_no_memory(void) |
| 2 | { |
| 3 | print_err("No memory!!\r\n"); |
| 4 | while(1) { |
| 5 | hlt(); |
| 6 | } |
| 7 | } |
| 8 | |
| 9 | /* Setup SDRAM */ |
Eric Biederman | 548593a | 2003-07-12 01:46:53 +0000 | [diff] [blame] | 10 | void sdram_initialize(const struct mem_controller *ctrl) |
Eric Biederman | 8ca8d76 | 2003-04-22 19:02:15 +0000 | [diff] [blame] | 11 | { |
| 12 | print_debug("Ram1\r\n"); |
| 13 | /* Set the registers we can set once to reasonable values */ |
Eric Biederman | 548593a | 2003-07-12 01:46:53 +0000 | [diff] [blame] | 14 | sdram_set_registers(ctrl); |
Eric Biederman | 8ca8d76 | 2003-04-22 19:02:15 +0000 | [diff] [blame] | 15 | |
| 16 | print_debug("Ram2\r\n"); |
| 17 | /* Now setup those things we can auto detect */ |
Eric Biederman | 548593a | 2003-07-12 01:46:53 +0000 | [diff] [blame] | 18 | sdram_set_spd_registers(ctrl); |
Eric Biederman | 8ca8d76 | 2003-04-22 19:02:15 +0000 | [diff] [blame] | 19 | |
| 20 | print_debug("Ram3\r\n"); |
| 21 | /* Now that everything is setup enable the SDRAM. |
| 22 | * Some chipsets do the work for use while on others |
| 23 | * we need to it by hand. |
| 24 | */ |
Eric Biederman | 548593a | 2003-07-12 01:46:53 +0000 | [diff] [blame] | 25 | sdram_enable(ctrl); |
Eric Biederman | 8ca8d76 | 2003-04-22 19:02:15 +0000 | [diff] [blame] | 26 | |
| 27 | print_debug("Ram4\r\n"); |
Eric Biederman | 8ca8d76 | 2003-04-22 19:02:15 +0000 | [diff] [blame] | 28 | } |