]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
common: board_r: move init_addr_map() to init.h
authorOvidiu Panait <ovidiu.panait@windriver.com>
Sat, 1 Jan 2022 17:13:29 +0000 (19:13 +0200)
committerTom Rini <trini@konsulko.com>
Tue, 18 Jan 2022 13:31:02 +0000 (08:31 -0500)
asm/mmu.h include is currently guarded by CONFIG_ADDR_MAP ifdef because
the header is only present on arm and powerpc. In order to remove the
dependency on this header and the associated ifdef, move init_addr_map()
declaration to init.h, since it is only called during the common init
sequence.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
arch/arm/include/asm/mmu.h [deleted file]
arch/powerpc/cpu/mpc85xx/tlb.c
arch/powerpc/include/asm/mmu.h
board/freescale/common/fsl_chain_of_trust.c
common/board_r.c
include/init.h

diff --git a/arch/arm/include/asm/mmu.h b/arch/arm/include/asm/mmu.h
deleted file mode 100644 (file)
index 8449720..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
-
-#ifndef __ASM_ARM_MMU_H
-#define __ASM_ARM_MMU_H
-
-int init_addr_map(void);
-
-#endif
index aa9b59d4871170a7b6d25c0a06a85b64c0a1ba16..550d45da0efa961ac674d215e92bcc818bfd138a 100644 (file)
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <init.h>
 #include <asm/bitops.h>
 #include <asm/global_data.h>
 #include <asm/processor.h>
index cb5b26cd77bf6444220bcdb82beea11ee92c3527..2e6255f0d6068bc8badb7bac2ce4f2b1d10f59ea 100644 (file)
@@ -137,10 +137,6 @@ typedef struct _MMU_context {
 extern void _tlbie(unsigned long va);  /* invalidate a TLB entry */
 extern void _tlbia(void);              /* invalidate all TLB entries */
 
-#ifdef CONFIG_ADDR_MAP
-extern int init_addr_map(void);
-#endif
-
 typedef enum {
        IBAT0 = 0, IBAT1, IBAT2, IBAT3,
        DBAT0, DBAT1, DBAT2, DBAT3,
index cafb24971b217f470fbd8cf0a07a8420d4aafc21..7ffb315bc9352b2644c913323bfc890ffa2f12f5 100644 (file)
@@ -6,6 +6,7 @@
 #include <common.h>
 #include <dm.h>
 #include <env.h>
+#include <init.h>
 #include <fsl_validate.h>
 #include <fsl_secboot_err.h>
 #include <fsl_sfp.h>
 #include <spl.h>
 #endif
 
-#ifdef CONFIG_ADDR_MAP
-#include <asm/mmu.h>
-#endif
-
 #ifdef CONFIG_FSL_CORENET
 #include <asm/fsl_pamu.h>
 #endif
index de6a20b0b2cb21043375dd4013efb1a8d2e20c16..b891c844622364a5bf863f929696fb5208b3bbab 100644 (file)
@@ -59,9 +59,6 @@
 #ifdef CONFIG_XEN
 #include <xen.h>
 #endif
-#ifdef CONFIG_ADDR_MAP
-#include <asm/mmu.h>
-#endif
 #include <asm/sections.h>
 #include <dm/root.h>
 #include <dm/ofnode.h>
index dcd682c1bf6756fbee4901c8946117b04f94fd69..20c3976af09a717496aace4b5d76238fc7f5ec87 100644 (file)
@@ -310,6 +310,16 @@ int board_early_init_r(void);
  */
 int arch_initr_trap(void);
 
+/**
+ * init_addr_map()
+ *
+ * Initialize non-identity virtual-physical memory mappings for 32bit CPUs.
+ * It is called during the generic board init sequence, after relocation.
+ *
+ * Return: 0 if OK
+ */
+int init_addr_map(void);
+
 /**
  * main_loop() - Enter the main loop of U-Boot
  *