forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-10 10ebd8556b7990499c896a550e3d416b444211e6
kernel/arch/arm/include/asm/memory.h
....@@ -1,12 +1,9 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * arch/arm/include/asm/memory.h
34 *
45 * Copyright (C) 2000-2002 Russell King
56 * modification for nommu, Hyok S. Choi, 2004
6
- *
7
- * This program is free software; you can redistribute it and/or modify
8
- * it under the terms of the GNU General Public License version 2 as
9
- * published by the Free Software Foundation.
107 *
118 * Note: this file should not be included by non-asm/.h files
129 */
....@@ -70,6 +67,10 @@
7067 */
7168 #define XIP_VIRT_ADDR(physaddr) (MODULES_VADDR + ((physaddr) & 0x000fffff))
7269
70
+#define FDT_FIXED_BASE UL(0xff800000)
71
+#define FDT_FIXED_SIZE (2 * SECTION_SIZE)
72
+#define FDT_VIRT_BASE(physbase) ((void *)(FDT_FIXED_BASE | (physbase) % SECTION_SIZE))
73
+
7374 #if !defined(CONFIG_SMP) && !defined(CONFIG_ARM_LPAE)
7475 /*
7576 * Allow 16MB-aligned ioremap pages
....@@ -110,6 +111,7 @@
110111 #define MODULES_VADDR PAGE_OFFSET
111112
112113 #define XIP_VIRT_ADDR(physaddr) (physaddr)
114
+#define FDT_VIRT_BASE(physbase) ((void *)(physbase))
113115
114116 #endif /* !CONFIG_MMU */
115117