summaryrefslogtreecommitdiff
path: root/arch/xtensa/include/asm/vectors.h
diff options
context:
space:
mode:
authorBaruch Siach <baruch@tkos.co.il>2013-12-29 13:03:30 +0400
committerMax Filippov <jcmvbkbc@gmail.com>2014-01-15 00:25:14 +0400
commit6cb971114f633a0bf240c20b681d989b45e3ec56 (patch)
tree15d3280cf733e2bda26252e1c01b53943b47bd68 /arch/xtensa/include/asm/vectors.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/vectors.h')
-rw-r--r--arch/xtensa/include/asm/vectors.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/xtensa/include/asm/vectors.h b/arch/xtensa/include/asm/vectors.h
index 221a60d804d5..5791b45d5a5d 100644
--- a/arch/xtensa/include/asm/vectors.h
+++ b/arch/xtensa/include/asm/vectors.h
@@ -22,9 +22,15 @@
#define XCHAL_KIO_CACHED_VADDR 0xe0000000
#define XCHAL_KIO_BYPASS_VADDR 0xf0000000
-#define XCHAL_KIO_PADDR 0xf0000000
+#define XCHAL_KIO_DEFAULT_PADDR 0xf0000000
#define XCHAL_KIO_SIZE 0x10000000
+#if XCHAL_HAVE_PTP_MMU && XCHAL_HAVE_SPANNING_WAY && CONFIG_OF
+#define XCHAL_KIO_PADDR xtensa_get_kio_paddr()
+#else
+#define XCHAL_KIO_PADDR XCHAL_KIO_DEFAULT_PADDR
+#endif
+
#if defined(CONFIG_MMU)
/* Will Become VECBASE */