| 1 |
|
| 2 |
|
| 3 |
#include <console/console.h> |
| 4 |
#include <device/device.h> |
| 5 |
#include <symbols.h> |
| 6 |
#include <soc/ipq_uart.h> |
| 7 |
|
| 8 |
#define RESERVED_SIZE 0x01500000 |
| 9 |
|
| 10 |
static void soc_read_resources(struct device *dev) |
| 11 |
{ |
| 12 |
|
| 13 |
uintptr_t reserve_ram_end = (uintptr_t)_dram + RESERVED_SIZE; |
| 14 |
uint64_t ram_end = CONFIG_DRAM_SIZE_MB * (uint64_t)MiB; |
| 15 |
|
| 16 |
reserved_ram_from_to(dev, 0, (uintptr_t)_dram, reserve_ram_end); |
| 17 |
ram_from_to(dev, 1, reserve_ram_end, ram_end); |
| 18 |
} |
| 19 |
|
| 20 |
static void soc_init(struct device *dev) |
| 21 |
{ |
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
ipq806x_uart_init(); |
| 27 |
|
| 28 |
printk(BIOS_INFO, "CPU: Qualcomm 8064\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(struct device *dev) |
| 37 |
{ |
| 38 |
dev->ops = &soc_ops; |
| 39 |
} |
| 40 |
|
| 41 |
struct chip_operations soc_qualcomm_ipq806x_ops = { |
| 42 |
.name = "SOC Qualcomm 8064", |
| 43 |
.enable_dev = enable_soc_dev, |
| 44 |
}; |