提交 c796140f 编写于 作者: A Andrei Gherzan 提交者: Matthias Brugger

RPI: Add memory map for bcm2711

Define the memory map for the BCM2711 based on the dt configuration
available in the Raspberry Pi kernel fork.
Signed-off-by: NAndrei Gherzan <andrei@balena.io>
[mb: BCM2838 -> BCM2711]
Signed-off-by: NMatthias Brugger <mbrugger@suse.com>
上级 e0e3c7da
......@@ -249,7 +249,8 @@ static uint32_t rev_type;
static const struct rpi_model *model;
#ifdef CONFIG_ARM64
static struct mm_region bcm2837_mem_map[] = {
#ifndef CONFIG_BCM2711
static struct mm_region bcm283x_mem_map[] = {
{
.virt = 0x00000000UL,
.phys = 0x00000000UL,
......@@ -268,8 +269,28 @@ static struct mm_region bcm2837_mem_map[] = {
0,
}
};
struct mm_region *mem_map = bcm2837_mem_map;
#else
static struct mm_region bcm283x_mem_map[] = {
{
.virt = 0x00000000UL,
.phys = 0x00000000UL,
.size = 0xfe000000UL,
.attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) |
PTE_BLOCK_INNER_SHARE
}, {
.virt = 0xfe000000UL,
.phys = 0xfe000000UL,
.size = 0x01800000UL,
.attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
PTE_BLOCK_NON_SHARE |
PTE_BLOCK_PXN | PTE_BLOCK_UXN
}, {
/* List terminator */
0,
}
};
#endif
struct mm_region *mem_map = bcm283x_mem_map;
#endif
int dram_init(void)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册