summaryrefslogtreecommitdiff
path: root/arch/arm/lib
diff options
context:
space:
mode:
authorPatrice Chotard <patrice.chotard@st.com>2021-02-24 15:48:42 +0300
committerTom Rini <trini@konsulko.com>2021-07-09 18:36:12 +0300
commitee0fbf4ef766f8d6a5a2d35906dfa2e3987f6f66 (patch)
treeced410a99328c6e0c01e0fe0b9833835881db6fd /arch/arm/lib
parentbfb798461af42ac628e22cbf5a0576fa156e8787 (diff)
downloadu-boot-ee0fbf4ef766f8d6a5a2d35906dfa2e3987f6f66.tar.xz
arch: cache: cp15: Add mmu_set_region_dcache_behaviour() when SYS_DCACHE_OFF is enable
Fix following compilation issue when SYS_DCACHE_OFF is enable: drivers/misc/scmi_agent.c:128: undefined reference to `mmu_set_region_dcache_behaviour' when SYS_DCACHE_OFF is enable, mmu_set_region_dcache_behaviour() must be defined. Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Diffstat (limited to 'arch/arm/lib')
-rw-r--r--arch/arm/lib/cache-cp15.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/arch/arm/lib/cache-cp15.c b/arch/arm/lib/cache-cp15.c
index aab1bf4360..0893915b30 100644
--- a/arch/arm/lib/cache-cp15.c
+++ b/arch/arm/lib/cache-cp15.c
@@ -93,12 +93,6 @@ void mmu_set_region_dcache_behaviour_phys(phys_addr_t start, phys_addr_t phys,
mmu_page_table_flush(startpt, stoppt);
}
-void mmu_set_region_dcache_behaviour(phys_addr_t start, size_t size,
- enum dcache_option option)
-{
- mmu_set_region_dcache_behaviour_phys(start, start, size, option);
-}
-
__weak void dram_bank_mmu_setup(int bank)
{
struct bd_info *bd = gd->bd;
@@ -311,6 +305,12 @@ int dcache_status(void)
{
return 0; /* always off */
}
+
+void mmu_set_region_dcache_behaviour(phys_addr_t start, size_t size,
+ enum dcache_option option)
+{
+}
+
#else
void dcache_enable(void)
{
@@ -326,4 +326,10 @@ int dcache_status(void)
{
return (get_cr() & CR_C) != 0;
}
+
+void mmu_set_region_dcache_behaviour(phys_addr_t start, size_t size,
+ enum dcache_option option)
+{
+ mmu_set_region_dcache_behaviour_phys(start, start, size, option);
+}
#endif