diff options
author | Baruch Siach <baruch@tkos.co.il> | 2013-12-29 10:03:30 +0100 |
---|---|---|
committer | Max Filippov <jcmvbkbc@gmail.com> | 2014-01-14 21:25:14 +0100 |
commit | 6cb971114f633a0bf240c20b681d989b45e3ec56 (patch) | |
tree | 15d3280cf733e2bda26252e1c01b53943b47bd68 /arch/xtensa/include/asm/io.h | |
parent | xtensa: support default device tree buses (diff) | |
download | linux-6cb971114f633a0bf240c20b681d989b45e3ec56.tar.xz linux-6cb971114f633a0bf240c20b681d989b45e3ec56.zip |
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/io.h')
-rw-r--r-- | arch/xtensa/include/asm/io.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/xtensa/include/asm/io.h b/arch/xtensa/include/asm/io.h index 1482a3636381..2a042d430c25 100644 --- a/arch/xtensa/include/asm/io.h +++ b/arch/xtensa/include/asm/io.h @@ -24,6 +24,16 @@ #define IO_SPACE_LIMIT ~0 #ifdef CONFIG_MMU + +#if XCHAL_HAVE_PTP_MMU && XCHAL_HAVE_SPANNING_WAY && CONFIG_OF +extern unsigned long xtensa_kio_paddr; + +static inline unsigned long xtensa_get_kio_paddr(void) +{ + return xtensa_kio_paddr; +} +#endif + /* * Return the virtual address for the specified bus memory. * Note that we currently don't support any address outside the KIO segment. |