summaryrefslogtreecommitdiff
path: root/arch/arm/cpu/armv8/zynqmp/cpu.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2017-11-29 08:26:07 -0500
committerTom Rini <trini@konsulko.com>2017-11-29 08:26:07 -0500
commitb06c46de632c55f4c39d404c6f0f65e414b31050 (patch)
treedea1702529c8d33c5e70eb5eb6ecf7d08eed23b9 /arch/arm/cpu/armv8/zynqmp/cpu.c
parentfcc8250c2f7c982f3593a8eecf737f8e2c95f222 (diff)
parenta04a5daae25a74ad2ac90b66667dac126242baa0 (diff)
Merge tag 'xilinx-for-v2018.01' of git://www.denx.de/git/u-boot-microblaze
Xilinx changes for v2018.1 Zynq: - Add support for Syzygy and cc108 boards - Add support for mini u-boot configurations (cse) - dts updates - config/defconfig updates in connection to Kconfig changes - Fix psu_init handling ZynqMP: - SPL fixes - Remove slcr.c - Fixing r5 startup sequence - Add support for external pmufw - Add support for new ZynqMP chips - dts updates - Add support for zcu102 rev1.0 board Drivers: - nand: Support external timing setting and board init - ahci: Fix wording - axi_emac: Wait for bit, non processor mode, readl/write conversion - zynq_gem: Fix SGMII/PCS support
Diffstat (limited to 'arch/arm/cpu/armv8/zynqmp/cpu.c')
-rw-r--r--arch/arm/cpu/armv8/zynqmp/cpu.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/arch/arm/cpu/armv8/zynqmp/cpu.c b/arch/arm/cpu/armv8/zynqmp/cpu.c
index 1b5066a826..f026cb4511 100644
--- a/arch/arm/cpu/armv8/zynqmp/cpu.c
+++ b/arch/arm/cpu/armv8/zynqmp/cpu.c
@@ -77,6 +77,18 @@ u64 get_page_table_size(void)
return 0x14000;
}
+#ifdef CONFIG_SYS_MEM_RSVD_FOR_MMU
+int reserve_mmu(void)
+{
+ initialize_tcm(TCM_LOCK);
+ memset((void *)ZYNQMP_TCM_BASE_ADDR, 0, ZYNQMP_TCM_SIZE);
+ gd->arch.tlb_size = PGTABLE_SIZE;
+ gd->arch.tlb_addr = ZYNQMP_TCM_BASE_ADDR;
+
+ return 0;
+}
+#endif
+
static unsigned int zynqmp_get_silicon_version_secure(void)
{
u32 ver;
@@ -198,7 +210,7 @@ int zynqmp_mmio_write(const u32 address,
{
if (IS_ENABLED(CONFIG_SPL_BUILD) || current_el() == 3)
return zynqmp_mmio_rawwrite(address, mask, value);
- else if (!IS_ENABLED(CONFIG_SPL_BUILD))
+ else
return invoke_smc(ZYNQMP_MMIO_WRITE, address, mask,
value, 0, NULL);
@@ -215,7 +227,7 @@ int zynqmp_mmio_read(const u32 address, u32 *value)
if (IS_ENABLED(CONFIG_SPL_BUILD) || current_el() == 3) {
ret = zynqmp_mmio_rawread(address, value);
- } else if (!IS_ENABLED(CONFIG_SPL_BUILD)) {
+ } else {
ret = invoke_smc(ZYNQMP_MMIO_READ, address, 0, 0,
0, ret_payload);
*value = ret_payload[1];