summaryrefslogtreecommitdiffstats
path: root/arch/xtensa/include/asm/io.h
Commit message (Collapse)AuthorAgeFilesLines
* arch: rely on asm-generic/io.h for default ioremap_* definitionsChristoph Hellwig2019-11-111-4/+0
| | | | | | | | | | | | | | Various architectures that use asm-generic/io.h still defined their own default versions of ioremap_nocache, ioremap_wt and ioremap_wc that point back to plain ioremap directly or indirectly. Remove these definitions and rely on asm-generic/io.h instead. For this to work the backup ioremap_* defintions needs to be changed to purely cpp macros instea of inlines to cover for architectures like openrisc that only define ioremap after including <asm-generic/io.h>. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Palmer Dabbelt <palmer@dabbelt.com>
* xtensa: clean up ioremapChristoph Hellwig2019-11-111-10/+4
| | | | | | | Use ioremap as the main implemented function, and defined ioremap_nocache to it as a deprecated alias. Signed-off-by: Christoph Hellwig <hch@lst.de>
* xtensa: virt: move PCI root complex to KIO rangeMax Filippov2019-09-021-0/+1
| | | | | | | | | | | Move PCI configuration space, MMIO and memory to the KIO range to free vmalloc area and use static TLB to access them. Move MMIO to the beginning of KIO and define PCI_IOBASE as XCHAL_KIO_BYPASS_VADDR to match it. Reduce number of supported PCI buses to 0x3f so that ECAM window fits into first 64MB of the KIO. Reduce size of the PCI memory window to 128MB so that it fits into KIO. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
* xtensa: drop ifdef __KERNEL__ from kernel-only headersMax Filippov2019-05-061-3/+0
| | | | | | | These headers are not exported to userspace, so they're never used without __KERNEL__ defined. Drop these ifdef statements. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
* xtensa: add ioremap_nocache declaration before include asm-generic/io.h.Greentime Hu2018-02-221-0/+1
| | | | | | | | | | A future commit for the nds32 architecture bootstrap("asm-generic/io.h: move ioremap_nocache/ioremap_uc/ioremap_wc/ioremap_wt out of ifndef CONFIG_MMU") will move the ioremap_nocache out of the CONFIG_MMU ifdef. This means that in order to suppress re-definition errors we need to setup #define's before importing asm-generic/io.h. Signed-off-by: Greentime Hu <greentime@andestech.com>
* xtensa: support ioremap for memory outside KIO regionMax Filippov2016-01-111-3/+13
| | | | | | | Map physical memory outside KIO region into the vmalloc area. Unmap it with vunmap. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
* xtensa: nommu: provide correct KIO addressesMax Filippov2015-11-021-9/+0
| | | | | | | | | | KIO region location is different for noMMU cores. Provide different default physical address and make KIO virtual address equal to physical. Move xtensa_get_kio_paddr function close to XCHAL_KIO_PADDR definition and define it not only for MMUv3, but for all MMU options except MMUv2. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
* arch: introduce memremap()Dan Williams2015-08-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Existing users of ioremap_cache() are mapping memory that is known in advance to not have i/o side effects. These users are forced to cast away the __iomem annotation, or otherwise neglect to fix the sparse errors thrown when dereferencing pointers to this memory. Provide memremap() as a non __iomem annotated ioremap_*() in the case when ioremap is otherwise a pointer to cacheable memory. Empirically, ioremap_<cacheable-type>() call sites are seeking memory-like semantics (e.g. speculative reads, and prefetching permitted). memremap() is a break from the ioremap implementation pattern of adding a new memremap_<type>() for each mapping type and having silent compatibility fall backs. Instead, the implementation defines flags that are passed to the central memremap() and if a mapping type is not supported by an arch memremap returns NULL. We introduce a memremap prototype as a trivial wrapper of ioremap_cache() and ioremap_wt(). Later, once all ioremap_cache() and ioremap_wt() usage has been removed from drivers we teach archs to implement arch_memremap() with the ability to strictly enforce the mapping type. Cc: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* arch/*/io.h: Add ioremap_wt() to all architecturesToshi Kani2015-06-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add ioremap_wt() to all arch-specific asm/io.h headers which define ioremap_wc() locally. These headers do not include <asm-generic/iomap.h>. Some of them include <asm-generic/io.h>, but ioremap_wt() is defined for consistency since they define all ioremap_xxx locally. In all architectures without Write-Through support, ioremap_wt() is defined indentical to ioremap_nocache(). frv and m68k already have ioremap_writethrough(). On those we add ioremap_wt() indetical to ioremap_writethrough() and defines ARCH_HAS_IOREMAP_WT in both architectures. The ioremap_wt() interface is exported to drivers. Signed-off-by: Toshi Kani <toshi.kani@hp.com> Signed-off-by: Borislav Petkov <bp@suse.de> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Elliott@hp.com Cc: H. Peter Anvin <hpa@zytor.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Luis R. Rodriguez <mcgrof@suse.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: arnd@arndb.de Cc: hch@lst.de Cc: hmh@hmh.eng.br Cc: jgross@suse.com Cc: konrad.wilk@oracle.com Cc: linux-mm <linux-mm@kvack.org> Cc: linux-nvdimm@lists.01.org Cc: stefan.bader@canonical.com Cc: yigal@plexistor.com Link: http://lkml.kernel.org/r/1433436928-31903-9-git-send-email-bp@alien8.de Signed-off-by: Ingo Molnar <mingo@kernel.org>
* xtensa: io: remove dummy relaxed accessor macros for readsWill Deacon2014-10-201-7/+0
| | | | | | | | | These are now defined by asm-generic/io.h, so we don't need the private definitions anymore. Cc: Chris Zankel <chris@zankel.net> Acked-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
* xtensa: fix warning '"CONFIG_OF" is not defined'Max Filippov2014-01-191-1/+1
| | | | | | | The warning only shows up when building MMUv3 configuration with OF support disabled. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
* xtensa: remap io area defined in device treeBaruch Siach2014-01-151-0/+10
| | | | | | | | | | | | | | | | | 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>
* xtensa: avoid duplicate of IO range definitionsBaruch Siach2014-01-151-5/+1
| | | | | | | | Define IO addresses in a single place, to make it easier to change for non-standard memory maps. Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
* xtensa: use physical addresses for bus addressesChris Zankel2012-10-251-0/+4
| | | | | | | Define virt_to_bus and bus_to_virt as virt_to_phys, and phys_to_virt, respectively. Signed-off-by: Chris Zankel <chris@zankel.net>
* xtensa: adopt generic io routinesMax Filippov2012-10-031-147/+9
| | | | | Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Chris Zankel <chris@zankel.net>
* xtensa: fix ioremapMax Filippov2012-10-031-6/+14
| | | | | | | | | - fix ioremap_nocache to actually return non-cacheable address - add explicit ioremap_cache - fix KIO aperture checking arithmetic Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Chris Zankel <chris@zankel.net>
* xtensa: fix build error in xtensa/include/asm/io.hPaul Gortmaker2012-04-231-0/+1
| | | | | | | | | | | Caused by commit 6c03438edeb5c359af35f060ea016ca65671c269 kernel.h: doesn't explicitly use bug.h, so don't include it. This header uses bug.h so explicitly include it now that the implicit presence was removed by 6c03438ed. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
* xtensa: nommu supportJohannes Weiner2009-04-021-1/+8
| | | | | | | Add support for !CONFIG_MMU setups. Signed-off-by: Johannes Weiner <jw@emlix.com> Signed-off-by: Chris Zankel <chris@zankel.net>
* xtensa: move headers files to arch/xtensa/includeChris Zankel2008-11-061-0/+200
Move all header files for xtensa to arch/xtensa/include and platform and variant header files to the appropriate arch/xtensa/platforms/ and arch/xtensa/variants/ directories. Moving the files gets also rid of all uses of symlinks in the Makefile. This has been completed already for the majority of the architectures and xtensa is one out of six missing. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Chris Zankel <chris@zankel.net>