blob: 2454f0462f55b8aeead1cd3224c7234e3f10a100 [file] [log] [blame]
Angel Pons585495e2020-04-03 01:21:38 +02001/* SPDX-License-Identifier: GPL-2.0-only */
Thaminda Edirisooriya8fad21d2015-07-29 17:43:20 -07002
3#include <console/console.h>
4#include <device/device.h>
Thaminda Edirisooriya8fad21d2015-07-29 17:43:20 -07005
Elyes HAOUAS5cb876c2018-06-08 18:31:43 +02006static void mainboard_enable(struct device *dev)
Thaminda Edirisooriya8fad21d2015-07-29 17:43:20 -07007{
Jonathan Neuschäferc98aac02016-07-07 20:53:29 +02008 /*
9 * Size of the emulated system RAM. On hardware, this would be external
10 * DDR memory.
11 *
12 * TODO: Get this size from the hardware-supplied configuration string.
13 */
14 const size_t ram_size = 1*GiB;
Thaminda Edirisooriya8fad21d2015-07-29 17:43:20 -070015
16 if (!dev) {
Jonathan Neuschäfer2af174a2016-10-12 00:18:00 +020017 die("No dev0; die\n");
Thaminda Edirisooriya8fad21d2015-07-29 17:43:20 -070018 }
19
Kyösti Mälkki27d62992022-05-24 20:25:58 +030020 ram_resource_kb(dev, 0, 0x80000000/KiB, ram_size/KiB);
Thaminda Edirisooriya8fad21d2015-07-29 17:43:20 -070021}
22
23struct chip_operations mainboard_ops = {
24 .enable_dev = mainboard_enable,
25};