coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
soc.c
Go to the documentation of this file.
1
/* SPDX-License-Identifier: GPL-2.0-only */
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_resource
(dev, 0, (
uintptr_t
)
_dram
/
KiB
,
sdram_size
() /
KiB
);
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
CHIP_NAME
(
"SOC Mediatek MT8183"
)
37
.enable_dev =
enable_soc_dev
,
38
};
KiB
#define KiB
Definition:
helpers.h:75
sdram_size
size_t sdram_size(void)
Definition:
emi.c:117
device.h
CHIP_NAME
#define CHIP_NAME(X)
Definition:
device.h:32
noop_set_resources
static void noop_set_resources(struct device *dev)
Definition:
device.h:74
ram_resource
#define ram_resource(dev, idx, basek, sizek)
Definition:
device.h:321
_dram
u8 _dram[]
md_ctrl.h
mtk_md_early_init
void mtk_md_early_init(void)
Definition:
md_ctrl.c:23
mtk_mmu_disable_l2c_sram
void mtk_mmu_disable_l2c_sram(void)
Definition:
mmu_operations.c:42
enable_soc_dev
static void enable_soc_dev(struct device *dev)
Definition:
soc.c:30
soc_read_resources
static void soc_read_resources(struct device *dev)
Definition:
soc.c:11
soc_ops
static struct device_operations soc_ops
Definition:
soc.c:24
soc_mediatek_mt8183_ops
struct chip_operations soc_mediatek_mt8183_ops
Definition:
soc.c:35
soc_init
static void soc_init(struct device *dev)
Definition:
soc.c:16
mt6358_dcxo_disable_unused
void mt6358_dcxo_disable_unused(void)
Definition:
rtc.c:326
sspm.h
sspm_init
void sspm_init(void)
Definition:
sspm.c:19
uintptr_t
unsigned long uintptr_t
Definition:
stdint.h:21
chip_operations
Definition:
device.h:23
device_operations
Definition:
device.h:38
device_operations::read_resources
void(* read_resources)(struct device *dev)
Definition:
device.h:39
device
Definition:
device.h:107
device::ops
struct device_operations * ops
Definition:
device.h:143
src
soc
mediatek
mt8183
soc.c
Generated by
1.9.1