| // SPDX-License-Identifier: GPL-2.0+ |
| * Copyright (C) 2023, Phytium Technology Co., Ltd. |
| * lixinde <lixinde@phytium.com.cn> |
| * weichangzheng <weichangzheng@phytium.com.cn> |
| #include <asm/armv8/mmu.h> |
| #include <linux/arm-smccc.h> |
| int board_early_init_f(void) |
| debug("Phytium ddr init\n"); |
| gd->ram_size = PHYS_SDRAM_1_SIZE; |
| debug("PBF relocate done\n"); |
| int dram_init_banksize(void) |
| gd->bd->bi_dram[0].start = PHYS_SDRAM_1; |
| gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE; |
| struct arm_smccc_res res; |
| debug("run in reset cpu\n"); |
| arm_smccc_smc(0x84000009, 0, 0, 0, 0, 0, 0, 0, &res); |
| panic("reset cpu error, %lx\n", res.a0); |
| static struct mm_region pe2201_mem_map[] = { |
| .attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) | PTE_BLOCK_NON_SHARE | PTE_BLOCK_PXN |
| .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) | PTE_BLOCK_NS | PTE_BLOCK_INNER_SHARE |
| struct mm_region *mem_map = pe2201_mem_map; |
| int last_stage_init(void) |