Release 4.14 arch/powerpc/kernel/iomap.c
// SPDX-License-Identifier: GPL-2.0
/*
* ppc64 "iomap" interface implementation.
*
* (C) Copyright 2004 Linus Torvalds
*/
#include <linux/pci.h>
#include <linux/mm.h>
#include <linux/export.h>
#include <asm/io.h>
#include <asm/pci-bridge.h>
#include <asm/isa-bridge.h>
/*
* Here comes the ppc64 implementation of the IOMAP
* interfaces.
*/
unsigned int ioread8(void __iomem *addr)
{
return readb(addr);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Benjamin Herrenschmidt | 17 | 100.00% | 1 | 100.00% |
Total | 17 | 100.00% | 1 | 100.00% |
unsigned int ioread16(void __iomem *addr)
{
return readw(addr);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Benjamin Herrenschmidt | 17 | 100.00% | 1 | 100.00% |
Total | 17 | 100.00% | 1 | 100.00% |
unsigned int ioread16be(void __iomem *addr)
{
return readw_be(addr);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Arthur Othieno | 16 | 94.12% | 1 | 50.00% |
Gavin Shan | 1 | 5.88% | 1 | 50.00% |
Total | 17 | 100.00% | 2 | 100.00% |
unsigned int ioread32(void __iomem *addr)
{
return readl(addr);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Benjamin Herrenschmidt | 17 | 100.00% | 1 | 100.00% |
Total | 17 | 100.00% | 1 | 100.00% |
unsigned int ioread32be(void __iomem *addr)
{
return readl_be(addr);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Arthur Othieno | 16 | 94.12% | 1 | 50.00% |
Gavin Shan | 1 | 5.88% | 1 | 50.00% |
Total | 17 | 100.00% | 2 | 100.00% |
EXPORT_SYMBOL(ioread8);
EXPORT_SYMBOL(ioread16);
EXPORT_SYMBOL(ioread16be);
EXPORT_SYMBOL(ioread32);
EXPORT_SYMBOL(ioread32be);
#ifdef __powerpc64__
u64 ioread64(void __iomem *addr)
{
return readq(addr);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Horia Geantă | 16 | 100.00% | 1 | 100.00% |
Total | 16 | 100.00% | 1 | 100.00% |
u64 ioread64be(void __iomem *addr)
{
return readq_be(addr);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Horia Geantă | 16 | 100.00% | 1 | 100.00% |
Total | 16 | 100.00% | 1 | 100.00% |
EXPORT_SYMBOL(ioread64);
EXPORT_SYMBOL(ioread64be);
#endif /* __powerpc64__ */
void iowrite8(u8 val, void __iomem *addr)
{
writeb(val, addr);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Benjamin Herrenschmidt | 20 | 100.00% | 1 | 100.00% |
Total | 20 | 100.00% | 1 | 100.00% |
void iowrite16(u16 val, void __iomem *addr)
{
writew(val, addr);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Benjamin Herrenschmidt | 20 | 100.00% | 1 | 100.00% |
Total | 20 | 100.00% | 1 | 100.00% |
void iowrite16be(u16 val, void __iomem *addr)
{
writew_be(val, addr);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Arthur Othieno | 17 | 85.00% | 1 | 50.00% |
Gavin Shan | 3 | 15.00% | 1 | 50.00% |
Total | 20 | 100.00% | 2 | 100.00% |
void iowrite32(u32 val, void __iomem *addr)
{
writel(val, addr);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Benjamin Herrenschmidt | 20 | 100.00% | 1 | 100.00% |
Total | 20 | 100.00% | 1 | 100.00% |
void iowrite32be(u32 val, void __iomem *addr)
{
writel_be(val, addr);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Arthur Othieno | 17 | 85.00% | 1 | 50.00% |
Gavin Shan | 3 | 15.00% | 1 | 50.00% |
Total | 20 | 100.00% | 2 | 100.00% |
EXPORT_SYMBOL(iowrite8);
EXPORT_SYMBOL(iowrite16);
EXPORT_SYMBOL(iowrite16be);
EXPORT_SYMBOL(iowrite32);
EXPORT_SYMBOL(iowrite32be);
#ifdef __powerpc64__
void iowrite64(u64 val, void __iomem *addr)
{
writeq(val, addr);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Horia Geantă | 20 | 100.00% | 1 | 100.00% |
Total | 20 | 100.00% | 1 | 100.00% |
void iowrite64be(u64 val, void __iomem *addr)
{
writeq_be(val, addr);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Horia Geantă | 20 | 100.00% | 1 | 100.00% |
Total | 20 | 100.00% | 1 | 100.00% |
EXPORT_SYMBOL(iowrite64);
EXPORT_SYMBOL(iowrite64be);
#endif /* __powerpc64__ */
/*
* These are the "repeat read/write" functions. Note the
* non-CPU byte order. We do things in "IO byteorder"
* here.
*
* FIXME! We could make these do EEH handling if we really
* wanted. Not clear if we do.
*/
void ioread8_rep(void __iomem *addr, void *dst, unsigned long count)
{
readsb(addr, dst, count);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Benjamin Herrenschmidt | 26 | 96.30% | 1 | 50.00% |
Gavin Shan | 1 | 3.70% | 1 | 50.00% |
Total | 27 | 100.00% | 2 | 100.00% |
void ioread16_rep(void __iomem *addr, void *dst, unsigned long count)
{
readsw(addr, dst, count);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Benjamin Herrenschmidt | 26 | 96.30% | 1 | 50.00% |
Gavin Shan | 1 | 3.70% | 1 | 50.00% |
Total | 27 | 100.00% | 2 | 100.00% |
void ioread32_rep(void __iomem *addr, void *dst, unsigned long count)
{
readsl(addr, dst, count);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Benjamin Herrenschmidt | 26 | 96.30% | 1 | 50.00% |
Gavin Shan | 1 | 3.70% | 1 | 50.00% |
Total | 27 | 100.00% | 2 | 100.00% |
EXPORT_SYMBOL(ioread8_rep);
EXPORT_SYMBOL(ioread16_rep);
EXPORT_SYMBOL(ioread32_rep);
void iowrite8_rep(void __iomem *addr, const void *src, unsigned long count)
{
writesb(addr, src, count);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Benjamin Herrenschmidt | 27 | 96.43% | 1 | 50.00% |
Gavin Shan | 1 | 3.57% | 1 | 50.00% |
Total | 28 | 100.00% | 2 | 100.00% |
void iowrite16_rep(void __iomem *addr, const void *src, unsigned long count)
{
writesw(addr, src, count);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Benjamin Herrenschmidt | 27 | 96.43% | 1 | 50.00% |
Gavin Shan | 1 | 3.57% | 1 | 50.00% |
Total | 28 | 100.00% | 2 | 100.00% |
void iowrite32_rep(void __iomem *addr, const void *src, unsigned long count)
{
writesl(addr, src, count);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Benjamin Herrenschmidt | 27 | 96.43% | 1 | 50.00% |
Gavin Shan | 1 | 3.57% | 1 | 50.00% |
Total | 28 | 100.00% | 2 | 100.00% |
EXPORT_SYMBOL(iowrite8_rep);
EXPORT_SYMBOL(iowrite16_rep);
EXPORT_SYMBOL(iowrite32_rep);
void __iomem *ioport_map(unsigned long port, unsigned int len)
{
return (void __iomem *) (port + _IO_BASE);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Benjamin Herrenschmidt | 27 | 100.00% | 2 | 100.00% |
Total | 27 | 100.00% | 2 | 100.00% |
void ioport_unmap(void __iomem *addr)
{
/* Nothing to do */
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Benjamin Herrenschmidt | 11 | 100.00% | 1 | 100.00% |
Total | 11 | 100.00% | 1 | 100.00% |
EXPORT_SYMBOL(ioport_map);
EXPORT_SYMBOL(ioport_unmap);
#ifdef CONFIG_PCI
void pci_iounmap(struct pci_dev *dev, void __iomem *addr)
{
if (isa_vaddr_is_ioport(addr))
return;
if (pcibios_vaddr_is_ioport(addr))
return;
iounmap(addr);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Benjamin Herrenschmidt | 36 | 100.00% | 2 | 100.00% |
Total | 36 | 100.00% | 2 | 100.00% |
EXPORT_SYMBOL(pci_iounmap);
#endif /* CONFIG_PCI */
Overall Contributors
Person | Tokens | Prop | Commits | CommitProp |
Benjamin Herrenschmidt | 442 | 67.90% | 6 | 50.00% |
Horia Geantă | 104 | 15.98% | 1 | 8.33% |
Arthur Othieno | 86 | 13.21% | 1 | 8.33% |
Gavin Shan | 14 | 2.15% | 1 | 8.33% |
Paul Gortmaker | 3 | 0.46% | 1 | 8.33% |
Jon Mason | 1 | 0.15% | 1 | 8.33% |
Greg Kroah-Hartman | 1 | 0.15% | 1 | 8.33% |
Total | 651 | 100.00% | 12 | 100.00% |
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.