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 <symbols.h>
4 #include <device/device.h>
5 #include <soc/mmu.h>
6 #include <soc/symbols.h>
7 
8 static void soc_read_resources(struct device *dev)
9 {
10  ram_resource(dev, 0, (uintptr_t)_dram / KiB, (1 * GiB) / KiB);
11  reserved_ram_resource(dev, 1, (uintptr_t)_dram_reserved / KiB,
12  REGION_SIZE(dram_reserved) / KiB);
13 }
14 
15 static void soc_init(struct device *dev)
16 {
17 
18 }
19 
20 static struct device_operations soc_ops = {
22  .init = soc_init,
23 };
24 
25 static void enable_soc_dev(struct device *dev)
26 {
27  dev->ops = &soc_ops;
28 }
29 
31  CHIP_NAME("SOC Qualcomm QCS405")
32  .enable_dev = enable_soc_dev,
33 };
#define KiB
Definition: helpers.h:75
#define GiB
Definition: helpers.h:77
#define CHIP_NAME(X)
Definition: device.h:32
#define ram_resource(dev, idx, basek, sizek)
Definition: device.h:321
#define reserved_ram_resource(dev, idx, basek, sizek)
Definition: device.h:324
u8 _dram[]
#define REGION_SIZE(name)
Definition: symbols.h:10
static void enable_soc_dev(struct device *dev)
Definition: soc.c:25
struct chip_operations soc_qualcomm_qcs405_ops
Definition: soc.c:30
static void soc_read_resources(struct device *dev)
Definition: soc.c:8
static struct device_operations soc_ops
Definition: soc.c:20
static void soc_init(struct device *dev)
Definition: soc.c:15
unsigned long uintptr_t
Definition: stdint.h:21
void(* read_resources)(struct device *dev)
Definition: device.h:39
Definition: device.h:107
struct device_operations * ops
Definition: device.h:143