Linux Audio

Check our new training course

Loading...
v6.2
 1/* SPDX-License-Identifier: GPL-2.0 */
 2/*
 3 *  S390 version
 4 *    Copyright IBM Corp. 1999
 5 *    Author(s): Martin Schwidefsky (schwidefsky@de.ibm.com)
 6 *
 7 *  Derived from "include/asm-i386/io.h"
 8 */
 9
10#ifndef _S390_IO_H
11#define _S390_IO_H
12
13#include <linux/kernel.h>
14#include <asm/page.h>
15#include <asm/pgtable.h>
16#include <asm/pci_io.h>
17
18#define xlate_dev_mem_ptr xlate_dev_mem_ptr
19void *xlate_dev_mem_ptr(phys_addr_t phys);
20#define unxlate_dev_mem_ptr unxlate_dev_mem_ptr
21void unxlate_dev_mem_ptr(phys_addr_t phys, void *addr);
22
 
 
 
 
 
23#define IO_SPACE_LIMIT 0
24
25void __iomem *ioremap_prot(phys_addr_t addr, size_t size, unsigned long prot);
26void __iomem *ioremap(phys_addr_t addr, size_t size);
27void __iomem *ioremap_wc(phys_addr_t addr, size_t size);
28void __iomem *ioremap_wt(phys_addr_t addr, size_t size);
29void iounmap(volatile void __iomem *addr);
 
 
 
 
 
 
 
30
31static inline void __iomem *ioport_map(unsigned long port, unsigned int nr)
32{
33	return NULL;
34}
35
36static inline void ioport_unmap(void __iomem *p)
37{
38}
39
40#ifdef CONFIG_PCI
41
42/*
43 * s390 needs a private implementation of pci_iomap since ioremap with its
44 * offset parameter isn't sufficient. That's because BAR spaces are not
45 * disjunctive on s390 so we need the bar parameter of pci_iomap to find
46 * the corresponding device and create the mapping cookie.
47 */
48#define pci_iomap pci_iomap
49#define pci_iomap_range pci_iomap_range
50#define pci_iounmap pci_iounmap
51#define pci_iomap_wc pci_iomap_wc
52#define pci_iomap_wc_range pci_iomap_wc_range
53
54#define ioremap ioremap
55#define ioremap_wt ioremap_wt
56#define ioremap_wc ioremap_wc
57
58#define memcpy_fromio(dst, src, count)	zpci_memcpy_fromio(dst, src, count)
59#define memcpy_toio(dst, src, count)	zpci_memcpy_toio(dst, src, count)
60#define memset_io(dst, val, count)	zpci_memset_io(dst, val, count)
61
62#define mmiowb()	zpci_barrier()
63
64#define __raw_readb	zpci_read_u8
65#define __raw_readw	zpci_read_u16
66#define __raw_readl	zpci_read_u32
67#define __raw_readq	zpci_read_u64
68#define __raw_writeb	zpci_write_u8
69#define __raw_writew	zpci_write_u16
70#define __raw_writel	zpci_write_u32
71#define __raw_writeq	zpci_write_u64
72
73#endif /* CONFIG_PCI */
74
75#include <asm-generic/io.h>
76
77#endif
v4.17
 1/* SPDX-License-Identifier: GPL-2.0 */
 2/*
 3 *  S390 version
 4 *    Copyright IBM Corp. 1999
 5 *    Author(s): Martin Schwidefsky (schwidefsky@de.ibm.com)
 6 *
 7 *  Derived from "include/asm-i386/io.h"
 8 */
 9
10#ifndef _S390_IO_H
11#define _S390_IO_H
12
13#include <linux/kernel.h>
14#include <asm/page.h>
 
15#include <asm/pci_io.h>
16
17#define xlate_dev_mem_ptr xlate_dev_mem_ptr
18void *xlate_dev_mem_ptr(phys_addr_t phys);
19#define unxlate_dev_mem_ptr unxlate_dev_mem_ptr
20void unxlate_dev_mem_ptr(phys_addr_t phys, void *addr);
21
22/*
23 * Convert a virtual cached pointer to an uncached pointer
24 */
25#define xlate_dev_kmem_ptr(p)	p
26
27#define IO_SPACE_LIMIT 0
28
29#define ioremap_nocache(addr, size)	ioremap(addr, size)
30#define ioremap_wc			ioremap_nocache
31#define ioremap_wt			ioremap_nocache
32
33static inline void __iomem *ioremap(unsigned long offset, unsigned long size)
34{
35	return (void __iomem *) offset;
36}
37
38static inline void iounmap(volatile void __iomem *addr)
39{
40}
41
42static inline void __iomem *ioport_map(unsigned long port, unsigned int nr)
43{
44	return NULL;
45}
46
47static inline void ioport_unmap(void __iomem *p)
48{
49}
50
51#ifdef CONFIG_PCI
52
53/*
54 * s390 needs a private implementation of pci_iomap since ioremap with its
55 * offset parameter isn't sufficient. That's because BAR spaces are not
56 * disjunctive on s390 so we need the bar parameter of pci_iomap to find
57 * the corresponding device and create the mapping cookie.
58 */
59#define pci_iomap pci_iomap
 
60#define pci_iounmap pci_iounmap
61#define pci_iomap_wc pci_iomap
62#define pci_iomap_wc_range pci_iomap_range
 
 
 
 
63
64#define memcpy_fromio(dst, src, count)	zpci_memcpy_fromio(dst, src, count)
65#define memcpy_toio(dst, src, count)	zpci_memcpy_toio(dst, src, count)
66#define memset_io(dst, val, count)	zpci_memset_io(dst, val, count)
 
 
67
68#define __raw_readb	zpci_read_u8
69#define __raw_readw	zpci_read_u16
70#define __raw_readl	zpci_read_u32
71#define __raw_readq	zpci_read_u64
72#define __raw_writeb	zpci_write_u8
73#define __raw_writew	zpci_write_u16
74#define __raw_writel	zpci_write_u32
75#define __raw_writeq	zpci_write_u64
76
77#endif /* CONFIG_PCI */
78
79#include <asm-generic/io.h>
80
81#endif