Vadim Bendebury | f3bc026 | 2014-12-01 18:34:37 -0800 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of the coreboot project. |
| 3 | * |
| 4 | * Copyright 2014 The Chromium OS Authors. |
| 5 | * |
| 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. |
| 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. |
Vadim Bendebury | f3bc026 | 2014-12-01 18:34:37 -0800 | [diff] [blame] | 14 | */ |
| 15 | |
| 16 | #include <console/console.h> |
| 17 | #include <device/device.h> |
| 18 | #include <symbols.h> |
| 19 | |
| 20 | static void soc_read_resources(device_t dev) |
| 21 | { |
| 22 | ram_resource(dev, 0, (uintptr_t)_dram / KiB, |
| 23 | (CONFIG_DRAM_SIZE_MB * MiB) / KiB); |
| 24 | } |
| 25 | |
| 26 | static void soc_init(device_t dev) |
| 27 | { |
| 28 | printk(BIOS_INFO, "CPU: Imgtec Pistachio\n"); |
| 29 | } |
| 30 | |
| 31 | static struct device_operations soc_ops = { |
| 32 | .read_resources = soc_read_resources, |
| 33 | .init = soc_init, |
| 34 | }; |
| 35 | |
| 36 | static void enable_soc_dev(device_t dev) |
| 37 | { |
| 38 | dev->ops = &soc_ops; |
| 39 | } |
| 40 | |
| 41 | struct chip_operations soc_imgtec_pistachio_ops = { |
| 42 | CHIP_NAME("SOC: Imgtec Pistachio") |
| 43 | .enable_dev = enable_soc_dev, |
| 44 | }; |