tree: drop last paragraph of GPL copyright header
[coreboot.git] / src / mainboard / google / rush / sdram_configs.c
blobab1744a2d696392a15b57d53891e13410eadf32b
1 /*
2 * This file is part of the coreboot project.
4 * Copyright 2014 Google Inc.
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; version 2 of the License.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
16 #include <console/console.h>
17 #include <soc/sdram_configs.h>
19 static struct sdram_params sdram_configs[] = {
20 #include "bct/sdram-hynix-2GB-924.inc" /* ram_code = 0000 */
21 #include "bct/sdram-hynix-4GB-792.inc" /* ram_code = 0001 */
22 #include "bct/sdram-unused.inc" /* ram_code = 0010 */
23 #include "bct/sdram-unused.inc" /* ram_code = 0011 */
24 #include "bct/sdram-unused.inc" /* ram_code = 0100 */
25 #include "bct/sdram-unused.inc" /* ram_code = 0101 */
26 #include "bct/sdram-unused.inc" /* ram_code = 0110 */
27 #include "bct/sdram-unused.inc" /* ram_code = 0111 */
28 #include "bct/sdram-unused.inc" /* ram_code = 1000 */
29 #include "bct/sdram-unused.inc" /* ram_code = 1001 */
30 #include "bct/sdram-unused.inc" /* ram_code = 1010 */
31 #include "bct/sdram-unused.inc" /* ram_code = 1011 */
32 #include "bct/sdram-unused.inc" /* ram_code = 1100 */
33 #include "bct/sdram-unused.inc" /* ram_code = 1101 */
34 #include "bct/sdram-unused.inc" /* ram_code = 1110 */
35 #include "bct/sdram-unused.inc" /* ram_code = 1111 */
38 const struct sdram_params *get_sdram_config()
40 uint32_t ramcode = sdram_get_ram_code();
42 * If we need to apply some special hacks to RAMCODE mapping (ex, by
43 * board_id), do that now.
46 printk(BIOS_SPEW, "%s: RAMCODE=%d\n", __func__, ramcode);
47 if (ramcode >= sizeof(sdram_configs) / sizeof(sdram_configs[0]) ||
48 sdram_configs[ramcode].MemoryType == NvBootMemoryType_Unused)
49 die("Invalid RAMCODE.");
51 return &sdram_configs[ramcode];