summaryrefslogtreecommitdiff
path: root/arch/xtensa/include/asm/initialize_mmu.h
diff options
context:
space:
mode:
authorBaruch Siach <baruch@tkos.co.il>2013-12-29 09:03:30 (GMT)
committerMax Filippov <jcmvbkbc@gmail.com>2014-01-14 20:25:14 (GMT)
commit6cb971114f633a0bf240c20b681d989b45e3ec56 (patch)
tree15d3280cf733e2bda26252e1c01b53943b47bd68 /arch/xtensa/include/asm/initialize_mmu.h
parentf8935f307fe46faa1a829a6b76ee95ca9ba67d20 (diff)
downloadlinux-6cb971114f633a0bf240c20b681d989b45e3ec56.tar.xz
xtensa: remap io area defined in device tree
Use the simple-bus node to discover the io area, and remap the cached and bypass io ranges. The parent-bus-address value of the first triplet in the "ranges" property is used. This value is rounded down to the nearest 256MB boundary. The length of the io area is fixed at 256MB; the "ranges" property length value is ignored. Other limitations: (1) only the first simple-bus node is considered, and (2) only the first triplet of the "ranges" property is considered. See ePAPR 1.1 §6.5 for the simple-bus node description, and §2.3.8 for the "ranges" property description. Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Diffstat (limited to 'arch/xtensa/include/asm/initialize_mmu.h')
-rw-r--r--arch/xtensa/include/asm/initialize_mmu.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/xtensa/include/asm/initialize_mmu.h b/arch/xtensa/include/asm/initialize_mmu.h
index a2078a2..600781e 100644
--- a/arch/xtensa/include/asm/initialize_mmu.h
+++ b/arch/xtensa/include/asm/initialize_mmu.h
@@ -26,6 +26,9 @@
#include <asm/pgtable.h>
#include <asm/vectors.h>
+#define CA_BYPASS (_PAGE_CA_BYPASS | _PAGE_HW_WRITE | _PAGE_HW_EXEC)
+#define CA_WRITEBACK (_PAGE_CA_WB | _PAGE_HW_WRITE | _PAGE_HW_EXEC)
+
#ifdef __ASSEMBLY__
#define XTENSA_HWVERSION_RC_2009_0 230000
@@ -80,8 +83,6 @@
/* Step 2: map 0x40000000..0x47FFFFFF to paddr containing this code
* and jump to the new mapping.
*/
-#define CA_BYPASS (_PAGE_CA_BYPASS | _PAGE_HW_WRITE | _PAGE_HW_EXEC)
-#define CA_WRITEBACK (_PAGE_CA_WB | _PAGE_HW_WRITE | _PAGE_HW_EXEC)
srli a3, a0, 27
slli a3, a3, 27
@@ -124,12 +125,12 @@
witlb a4, a5
movi a5, XCHAL_KIO_CACHED_VADDR + 6
- movi a4, XCHAL_KIO_PADDR + CA_WRITEBACK
+ movi a4, XCHAL_KIO_DEFAULT_PADDR + CA_WRITEBACK
wdtlb a4, a5
witlb a4, a5
movi a5, XCHAL_KIO_BYPASS_VADDR + 6
- movi a4, XCHAL_KIO_PADDR + CA_BYPASS
+ movi a4, XCHAL_KIO_DEFAULT_PADDR + CA_BYPASS
wdtlb a4, a5
witlb a4, a5