2005-04-17 05:20:36 +07:00
|
|
|
/*
|
|
|
|
* S390 version
|
2012-07-20 16:15:04 +07:00
|
|
|
* Copyright IBM Corp. 1999
|
2005-04-17 05:20:36 +07:00
|
|
|
* Author(s): Martin Schwidefsky (schwidefsky@de.ibm.com)
|
|
|
|
*
|
|
|
|
* Derived from "include/asm-i386/io.h"
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _S390_IO_H
|
|
|
|
#define _S390_IO_H
|
|
|
|
|
2012-11-29 18:50:30 +07:00
|
|
|
#include <linux/kernel.h>
|
2005-04-17 05:20:36 +07:00
|
|
|
#include <asm/page.h>
|
2012-11-29 18:50:30 +07:00
|
|
|
#include <asm/pci_io.h>
|
2005-04-17 05:20:36 +07:00
|
|
|
|
2013-05-21 21:08:22 +07:00
|
|
|
#define xlate_dev_mem_ptr xlate_dev_mem_ptr
|
2014-07-28 22:20:33 +07:00
|
|
|
void *xlate_dev_mem_ptr(phys_addr_t phys);
|
|
|
|
#define unxlate_dev_mem_ptr unxlate_dev_mem_ptr
|
|
|
|
void unxlate_dev_mem_ptr(phys_addr_t phys, void *addr);
|
2005-04-17 05:20:36 +07:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Convert a virtual cached pointer to an uncached pointer
|
|
|
|
*/
|
|
|
|
#define xlate_dev_kmem_ptr(p) p
|
|
|
|
|
2012-11-29 18:50:30 +07:00
|
|
|
#define IO_SPACE_LIMIT 0
|
|
|
|
|
|
|
|
#ifdef CONFIG_PCI
|
|
|
|
|
|
|
|
#define ioremap_nocache(addr, size) ioremap(addr, size)
|
|
|
|
#define ioremap_wc ioremap_nocache
|
2015-06-04 23:55:16 +07:00
|
|
|
#define ioremap_wt ioremap_nocache
|
2012-11-29 18:50:30 +07:00
|
|
|
|
|
|
|
static inline void __iomem *ioremap(unsigned long offset, unsigned long size)
|
|
|
|
{
|
|
|
|
return (void __iomem *) offset;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void iounmap(volatile void __iomem *addr)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2014-11-06 19:17:06 +07:00
|
|
|
static inline void __iomem *ioport_map(unsigned long port, unsigned int nr)
|
|
|
|
{
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void ioport_unmap(void __iomem *p)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2012-11-29 18:50:30 +07:00
|
|
|
/*
|
|
|
|
* s390 needs a private implementation of pci_iomap since ioremap with its
|
|
|
|
* offset parameter isn't sufficient. That's because BAR spaces are not
|
|
|
|
* disjunctive on s390 so we need the bar parameter of pci_iomap to find
|
|
|
|
* the corresponding device and create the mapping cookie.
|
|
|
|
*/
|
|
|
|
#define pci_iomap pci_iomap
|
|
|
|
#define pci_iounmap pci_iounmap
|
|
|
|
|
|
|
|
#define memcpy_fromio(dst, src, count) zpci_memcpy_fromio(dst, src, count)
|
|
|
|
#define memcpy_toio(dst, src, count) zpci_memcpy_toio(dst, src, count)
|
|
|
|
#define memset_io(dst, val, count) zpci_memset_io(dst, val, count)
|
|
|
|
|
|
|
|
#define __raw_readb zpci_read_u8
|
|
|
|
#define __raw_readw zpci_read_u16
|
|
|
|
#define __raw_readl zpci_read_u32
|
|
|
|
#define __raw_readq zpci_read_u64
|
|
|
|
#define __raw_writeb zpci_write_u8
|
|
|
|
#define __raw_writew zpci_write_u16
|
|
|
|
#define __raw_writel zpci_write_u32
|
|
|
|
#define __raw_writeq zpci_write_u64
|
|
|
|
|
|
|
|
#endif /* CONFIG_PCI */
|
|
|
|
|
|
|
|
#include <asm-generic/io.h>
|
|
|
|
|
2005-04-17 05:20:36 +07:00
|
|
|
#endif
|