diff options
author | Tom Rini <trini@konsulko.com> | 2022-12-05 08:33:19 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2022-12-05 08:33:19 -0500 |
commit | a50622d78c5c6babd1853ae913f339df54fe532c (patch) | |
tree | d9983965f00679f68b5a12cbc2dbc5dd64aafc4d /arch/arm/mach-zynqmp/mp.c | |
parent | bdaf047f51eda655f3d6bc9d076696f7733a57d8 (diff) | |
parent | 7ad3c09e7911e71c9a16a30aa052093a8f9b7e7c (diff) |
Merge tag 'xilinx-for-v2023.01-rc3-v2' of https://source.denx.de/u-boot/custodians/u-boot-microblaze
Xilinx changes for v2023.01-rc3-v2
xilinx:
- Fix MAC address selection for System Controller from FRU
- Cleanup Kconfig (ZYNQ_MAC_IN_EEPROM symbol)
versal:
- Create u-boot.elf for mini spi configurations
versal-net:
- Enable MT35XU flash
zynq:
- Add missing timer to DT for mini configurations
zynqmp:
- Do not include psu_init to U-Boot by default
- Do not enable IPI by default to mini U-Boot
- Update Luca's fragment
- Fix SPL_FS_LOAD_PAYLOAD_NAME usage
spi:
- gqspi: Fix tapdelay values
- gqspi: Fix 64bit address support
- cadence: Remove condition for calling enable linear mode
- nor-core: Invert logic to reflect sst26 flash unlocked
net:
- Add PCS/PMA phy support
Diffstat (limited to 'arch/arm/mach-zynqmp/mp.c')
-rw-r--r-- | arch/arm/mach-zynqmp/mp.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/arch/arm/mach-zynqmp/mp.c b/arch/arm/mach-zynqmp/mp.c index 949456d530..2891878973 100644 --- a/arch/arm/mach-zynqmp/mp.c +++ b/arch/arm/mach-zynqmp/mp.c @@ -42,6 +42,9 @@ #define ZYNQMP_MAX_CORES 6 +#define ZYNQMP_RPU0_USE_MASK BIT(1) +#define ZYNQMP_RPU1_USE_MASK BIT(2) + int is_core_valid(unsigned int core) { if (core < ZYNQMP_MAX_CORES) @@ -250,6 +253,27 @@ void initialize_tcm(bool mode) } } +static void mark_r5_used(u32 nr, u8 mode) +{ + u32 mask = 0; + + if (mode == LOCK) { + mask = ZYNQMP_RPU0_USE_MASK | ZYNQMP_RPU1_USE_MASK; + } else { + switch (nr) { + case ZYNQMP_CORE_RPU0: + mask = ZYNQMP_RPU0_USE_MASK; + break; + case ZYNQMP_CORE_RPU1: + mask = ZYNQMP_RPU1_USE_MASK; + break; + default: + return; + } + } + zynqmp_mmio_write((ulong)&pmu_base->gen_storage4, mask, mask); +} + int cpu_release(u32 nr, int argc, char *const argv[]) { if (nr <= ZYNQMP_CORE_APU3) { @@ -305,6 +329,7 @@ int cpu_release(u32 nr, int argc, char *const argv[]) write_tcm_boot_trampoline(boot_addr_uniq); dcache_enable(); set_r5_halt_mode(nr, RELEASE, LOCK); + mark_r5_used(nr, LOCK); } else if (!strncmp(argv[1], "split", 5)) { printf("R5 split mode\n"); set_r5_reset(nr, SPLIT); @@ -317,6 +342,7 @@ int cpu_release(u32 nr, int argc, char *const argv[]) write_tcm_boot_trampoline(boot_addr_uniq); dcache_enable(); set_r5_halt_mode(nr, RELEASE, SPLIT); + mark_r5_used(nr, SPLIT); } else { printf("Unsupported mode\n"); return 1; |