2005-04-17 06:20:36 +08:00
|
|
|
#ifndef _ASM_CRIS_IO_H
|
|
|
|
#define _ASM_CRIS_IO_H
|
|
|
|
|
|
|
|
#include <asm/page.h> /* for __va, __pa */
|
2015-08-04 02:19:24 +08:00
|
|
|
#ifdef CONFIG_ETRAX_ARCH_V10
|
2008-10-21 23:45:58 +08:00
|
|
|
#include <arch/io.h>
|
2015-08-04 02:19:24 +08:00
|
|
|
#endif
|
2013-11-13 07:06:49 +08:00
|
|
|
#include <asm-generic/iomap.h>
|
2005-07-28 02:44:40 +08:00
|
|
|
#include <linux/kernel.h>
|
|
|
|
|
|
|
|
extern void __iomem * __ioremap(unsigned long offset, unsigned long size, unsigned long flags);
|
|
|
|
extern void __iomem * __ioremap_prot(unsigned long phys_addr, unsigned long size, pgprot_t prot);
|
2005-04-17 06:20:36 +08:00
|
|
|
|
2005-11-07 16:58:44 +08:00
|
|
|
static inline void __iomem * ioremap (unsigned long offset, unsigned long size)
|
2005-04-17 06:20:36 +08:00
|
|
|
{
|
|
|
|
return __ioremap(offset, size, 0);
|
|
|
|
}
|
|
|
|
|
2005-07-28 02:44:40 +08:00
|
|
|
extern void iounmap(volatile void * __iomem addr);
|
|
|
|
|
|
|
|
extern void __iomem * ioremap_nocache(unsigned long offset, unsigned long size);
|
2005-04-17 06:20:36 +08:00
|
|
|
|
cris: use generic io.h
fixes the warning:
lib/iomap.c: In function ‘ioread8_rep’:
./arch/cris/include/asm/io.h:139:31: warning: statement with no effect [-Wunused-value]
#define insb(port,addr,count) (cris_iops ? cris_iops->read_io(port,addr,1,count) : 0)
^
lib/iomap.c:56:3: note: in definition of macro ‘IO_COND’
is_pio; \
^
lib/iomap.c:197:16: note: in expansion of macro ‘insb’
IO_COND(addr, insb(port,dst,count), mmio_insb(addr, dst, count));
^
cris_iops was previously set to NULL (no matter if CONFIG_PCI was set or
not), but was removed in commit ab28e96fd1cf ("CRIS v32: remove old GPIO
and LEDs code"). Before commit ab28e96fd1cf ("CRIS v32: remove old GPIO
and LEDs code"), cris_iops could have been set from an external module,
since it was exported, but as commit c24bf9b4cc6a ("CRIS: fix I/O
macros") noted, the macros using cris_iops have been broken since first
included, so they could never have worked.
Because of this, instead of readding cris_iops, remove all special
handling of cris_iops. By doing so, we can rely on the default
implementation of almost all functions previously defined in our arch
specific io.h.
Signed-off-by: Niklas Cassel <nks@flawful.org>
Signed-off-by: Jesper Nilsson <jespern@axis.com>
2016-09-22 22:44:57 +08:00
|
|
|
#include <asm-generic/io.h>
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
#endif
|