mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-08-19 05:31:31 +02:00
Introduce the SoC-specific code and corresponding Kconfig entries for TH1520 SoC. Following features are implemented for TH1520, - Cache enable/disable through customized CSR - Invalidation of customized PMP entries - DRAM driver probing for SPL Signed-off-by: Yao Zi <ziyao@disroot.org> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
22 lines
553 B
C
22 lines
553 B
C
// SPDX-License-Identifier: GPL-2.0+
|
|
/*
|
|
* Copyright (c) 2025 Yao Zi <ziyao@disroot.org>
|
|
*
|
|
* TH1520 SoC has a set of undocumented customized PMP registers that are
|
|
* configured through MMIO operation. It must be disabled before entering
|
|
* the DRAM region, or an exception will be raised.
|
|
*/
|
|
|
|
#include <asm/io.h>
|
|
#include <cpu_func.h>
|
|
|
|
#define TH1520_PMP_BASE (void *)0xffdc020000
|
|
|
|
void th1520_invalidate_pmp(void)
|
|
{
|
|
/* Invalidate the PMP configuration as in vendor U-Boot code */
|
|
writel(0x0, TH1520_PMP_BASE + 0x0);
|
|
|
|
invalidate_icache_all();
|
|
}
|