Jonathan Neuschäfer | 1c09cfa | 2018-04-19 16:23:55 +0200 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of the coreboot project. |
| 3 | * |
| 4 | * Copyright (C) 2018 Jonathan Neuschäfer |
| 5 | * |
Martin Roth | b28f466 | 2018-05-26 17:58:47 -0600 | [diff] [blame] | 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. |
Jonathan Neuschäfer | 1c09cfa | 2018-04-19 16:23:55 +0200 | [diff] [blame] | 9 | * |
| 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. |
| 14 | */ |
| 15 | |
Elyes HAOUAS | 351e3e5 | 2019-04-05 18:11:19 +0200 | [diff] [blame^] | 16 | #include <device/device.h> |
Philipp Hug | 7c5acd4 | 2018-09-15 15:30:08 +0200 | [diff] [blame] | 17 | #include <soc/sdram.h> |
| 18 | #include <symbols.h> |
Jonathan Neuschäfer | 1c09cfa | 2018-04-19 16:23:55 +0200 | [diff] [blame] | 19 | |
Elyes HAOUAS | 66ea165 | 2018-05-04 22:01:42 +0200 | [diff] [blame] | 20 | static void mainboard_enable(struct device *dev) |
Jonathan Neuschäfer | 1c09cfa | 2018-04-19 16:23:55 +0200 | [diff] [blame] | 21 | { |
Philipp Hug | 7c5acd4 | 2018-09-15 15:30:08 +0200 | [diff] [blame] | 22 | ram_resource(dev, 0, (uintptr_t)_dram/KiB, sdram_size_mb()*KiB); |
Jonathan Neuschäfer | 1c09cfa | 2018-04-19 16:23:55 +0200 | [diff] [blame] | 23 | } |
| 24 | |
| 25 | struct chip_operations mainboard_ops = { |
| 26 | .name = CONFIG_MAINBOARD_PART_NUMBER, |
| 27 | .enable_dev = mainboard_enable, |
| 28 | }; |