diff options
author | Tom Rini <trini@konsulko.com> | 2020-08-11 23:03:46 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-08-11 23:03:46 -0400 |
commit | c25344ff9ae1d764a8e85296736d6e150e34b4fd (patch) | |
tree | 3fa53ec91a805d19b4c4ab7a30f60d2bba2d5554 /arch/arm/mach-k3/common.c | |
parent | b298720900752967dd46a5b54a5a303eb11eed95 (diff) | |
parent | db6451ec0e8483f76f3364293d48e86249c52322 (diff) |
Merge tag 'ti-v2020.10-rc3' of https://gitlab.denx.de/u-boot/custodians/u-boot-ti
- Added support for J7200 evm
- DM_ETH and DM_USB migrations for omap3
- USB DFU and mass storage support for AM65x evm
- RTI watchdog support for K3 devices
- Fix an issue with L3 cache on K3 devices
Diffstat (limited to 'arch/arm/mach-k3/common.c')
-rw-r--r-- | arch/arm/mach-k3/common.c | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/arch/arm/mach-k3/common.c b/arch/arm/mach-k3/common.c index 4335f2877b8..8c903f14ff8 100644 --- a/arch/arm/mach-k3/common.c +++ b/arch/arm/mach-k3/common.c @@ -62,6 +62,24 @@ void k3_sysfw_print_ver(void) ti_sci->version.firmware_revision, fw_desc); } +void mmr_unlock(phys_addr_t base, u32 partition) +{ + /* Translate the base address */ + phys_addr_t part_base = base + partition * CTRL_MMR0_PARTITION_SIZE; + + /* Unlock the requested partition if locked using two-step sequence */ + writel(CTRLMMR_LOCK_KICK0_UNLOCK_VAL, part_base + CTRLMMR_LOCK_KICK0); + writel(CTRLMMR_LOCK_KICK1_UNLOCK_VAL, part_base + CTRLMMR_LOCK_KICK1); +} + +bool is_rom_loaded_sysfw(struct rom_extended_boot_data *data) +{ + if (strncmp(data->header, K3_ROM_BOOT_HEADER_MAGIC, 7)) + return false; + + return data->num_components > 1; +} + DECLARE_GLOBAL_DATA_PTR; #ifdef CONFIG_K3_EARLY_CONS @@ -335,6 +353,26 @@ int print_cpuinfo(void) } #endif +bool soc_is_j721e(void) +{ + u32 soc; + + soc = (readl(CTRLMMR_WKUP_JTAG_ID) & + JTAG_ID_PARTNO_MASK) >> JTAG_ID_PARTNO_SHIFT; + + return soc == J721E; +} + +bool soc_is_j7200(void) +{ + u32 soc; + + soc = (readl(CTRLMMR_WKUP_JTAG_ID) & + JTAG_ID_PARTNO_MASK) >> JTAG_ID_PARTNO_SHIFT; + + return soc == J7200; +} + #ifdef CONFIG_ARM64 void board_prep_linux(bootm_headers_t *images) { |