blob: b6eae46a81ad4673672eee2e4de56fe480010cc5 [file] [log] [blame]
David Hendricks6802dc82013-02-15 16:18:28 -08001#include <console/console.h>
2#include <device/device.h>
3
David Hendricks0f5a3fc2013-03-12 20:16:44 -07004#define RAM_BASE_KB (CONFIG_SYS_SDRAM_BASE >> 10)
5#define RAM_SIZE_KB (CONFIG_DRAM_SIZE_MB << 10UL)
David Hendricks6802dc82013-02-15 16:18:28 -08006
David Hendricks6802dc82013-02-15 16:18:28 -08007static void cpu_init(device_t dev)
8{
David Hendricks3cc0d1e2013-03-26 16:28:21 -07009 ram_resource(dev, 0, RAM_BASE_KB, RAM_SIZE_KB);
David Hendricks6802dc82013-02-15 16:18:28 -080010}
11
12static void cpu_noop(device_t dev)
13{
14}
15
16static struct device_operations cpu_ops = {
17 .read_resources = cpu_noop,
18 .set_resources = cpu_noop,
19 .enable_resources = cpu_noop,
20 .init = cpu_init,
21 .scan_bus = 0,
22};
23
David Hendricks01755872013-03-26 04:25:46 +010024static void enable_dev(device_t dev)
David Hendricks6802dc82013-02-15 16:18:28 -080025{
26 /* Set the operations if it is a special bus type */
David Hendricks3cc0d1e2013-03-26 16:28:21 -070027 if (dev->path.type == DEVICE_PATH_CPU_CLUSTER) {
David Hendricks6802dc82013-02-15 16:18:28 -080028 dev->ops = &cpu_ops;
29 }
30}
31
32struct chip_operations cpu_samsung_exynos5250_ops = {
33 CHIP_NAME("CPU Samsung Exynos 5250")
David Hendricks01755872013-03-26 04:25:46 +010034 .enable_dev = enable_dev,
David Hendricks6802dc82013-02-15 16:18:28 -080035};