| 1 |
|
| 2 |
|
| 3 |
#include <device/device.h> |
| 4 |
#include <soc/emi.h> |
| 5 |
#include <soc/md_ctrl.h> |
| 6 |
#include <soc/mmu_operations.h> |
| 7 |
#include <soc/rtc.h> |
| 8 |
#include <soc/sspm.h> |
| 9 |
#include <symbols.h> |
| 10 |
|
| 11 |
static void soc_read_resources(struct device *dev) |
| 12 |
{ |
| 13 |
ram_range(dev, 0, (uintptr_t)_dram, sdram_size()); |
| 14 |
} |
| 15 |
|
| 16 |
static void soc_init(struct device *dev) |
| 17 |
{ |
| 18 |
mtk_mmu_disable_l2c_sram(); |
| 19 |
mtk_md_early_init(); |
| 20 |
mt6358_dcxo_disable_unused(); |
| 21 |
sspm_init(); |
| 22 |
} |
| 23 |
|
| 24 |
static struct device_operations soc_ops = { |
| 25 |
.read_resources = soc_read_resources, |
| 26 |
.set_resources = noop_set_resources, |
| 27 |
.init = soc_init, |
| 28 |
}; |
| 29 |
|
| 30 |
static void enable_soc_dev(struct device *dev) |
| 31 |
{ |
| 32 |
dev->ops = &soc_ops; |
| 33 |
} |
| 34 |
|
| 35 |
struct chip_operations soc_mediatek_mt8183_ops = { |
| 36 |
.name = "SOC Mediatek MT8183", |
| 37 |
.enable_dev = enable_soc_dev, |
| 38 |
}; |