Release 4.14 arch/sparc/include/asm/io_32.h
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __SPARC_IO_H
#define __SPARC_IO_H
#include <linux/kernel.h>
#include <linux/ioport.h> /* struct resource */
#define IO_SPACE_LIMIT 0xffffffff
#define memset_io(d,c,sz) _memset_io(d,c,sz)
#define memcpy_fromio(d,s,sz) _memcpy_fromio(d,s,sz)
#define memcpy_toio(d,s,sz) _memcpy_toio(d,s,sz)
#include <asm-generic/io.h>
static inline void _memset_io(volatile void __iomem *dst,
int c, __kernel_size_t n)
{
volatile void __iomem *d = dst;
while (n--) {
writeb(c, d);
d++;
}
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
James Hogan | 28 | 63.64% | 1 | 33.33% |
Sam Ravnborg | 16 | 36.36% | 2 | 66.67% |
Total | 44 | 100.00% | 3 | 100.00% |
static inline void _memcpy_fromio(void *dst, const volatile void __iomem *src,
__kernel_size_t n)
{
char *d = dst;
while (n--) {
char tmp = readb(src);
*d++ = tmp;
src++;
}
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Sam Ravnborg | 48 | 94.12% | 1 | 50.00% |
James Hogan | 3 | 5.88% | 1 | 50.00% |
Total | 51 | 100.00% | 2 | 100.00% |
static inline void _memcpy_toio(volatile void __iomem *dst, const void *src,
__kernel_size_t n)
{
const char *s = src;
volatile void __iomem *d = dst;
while (n--) {
char tmp = *s++;
writeb(tmp, d);
d++;
}
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
James Hogan | 55 | 91.67% | 1 | 33.33% |
Sam Ravnborg | 5 | 8.33% | 2 | 66.67% |
Total | 60 | 100.00% | 3 | 100.00% |
/*
* SBus accessors.
*
* SBus has only one, memory mapped, I/O space.
* We do not need to flip bytes for SBus of course.
*/
static inline u8 sbus_readb(const volatile void __iomem *addr)
{
return *(__force volatile u8 *)addr;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Sam Ravnborg | 22 | 91.67% | 3 | 75.00% |
James Hogan | 2 | 8.33% | 1 | 25.00% |
Total | 24 | 100.00% | 4 | 100.00% |
static inline u16 sbus_readw(const volatile void __iomem *addr)
{
return *(__force volatile u16 *)addr;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Sam Ravnborg | 24 | 100.00% | 3 | 100.00% |
Total | 24 | 100.00% | 3 | 100.00% |
static inline u32 sbus_readl(const volatile void __iomem *addr)
{
return *(__force volatile u32 *)addr;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Sam Ravnborg | 24 | 100.00% | 3 | 100.00% |
Total | 24 | 100.00% | 3 | 100.00% |
static inline void sbus_writeb(u8 b, volatile void __iomem *addr)
{
*(__force volatile u8 *)addr = b;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Sam Ravnborg | 27 | 100.00% | 3 | 100.00% |
Total | 27 | 100.00% | 3 | 100.00% |
static inline void sbus_writew(u16 w, volatile void __iomem *addr)
{
*(__force volatile u16 *)addr = w;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Sam Ravnborg | 24 | 88.89% | 2 | 66.67% |
David S. Miller | 3 | 11.11% | 1 | 33.33% |
Total | 27 | 100.00% | 3 | 100.00% |
static inline void sbus_writel(u32 l, volatile void __iomem *addr)
{
*(__force volatile u32 *)addr = l;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Sam Ravnborg | 27 | 100.00% | 3 | 100.00% |
Total | 27 | 100.00% | 3 | 100.00% |
static inline void sbus_memset_io(volatile void __iomem *__dst, int c,
__kernel_size_t n)
{
while(n--) {
sbus_writeb(c, __dst);
__dst++;
}
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Sam Ravnborg | 36 | 100.00% | 2 | 100.00% |
Total | 36 | 100.00% | 2 | 100.00% |
static inline void sbus_memcpy_fromio(void *dst,
const volatile void __iomem *src,
__kernel_size_t n)
{
char *d = dst;
while (n--) {
char tmp = sbus_readb(src);
*d++ = tmp;
src++;
}
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Sam Ravnborg | 51 | 100.00% | 3 | 100.00% |
Total | 51 | 100.00% | 3 | 100.00% |
static inline void sbus_memcpy_toio(volatile void __iomem *dst,
const void *src,
__kernel_size_t n)
{
const char *s = src;
volatile void __iomem *d = dst;
while (n--) {
char tmp = *s++;
sbus_writeb(tmp, d);
d++;
}
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Sam Ravnborg | 60 | 100.00% | 3 | 100.00% |
Total | 60 | 100.00% | 3 | 100.00% |
#ifdef __KERNEL__
/*
* Bus number may be embedded in the higher bits of the physical address.
* This is why we have no bus number argument to ioremap().
*/
void __iomem *ioremap(unsigned long offset, unsigned long size);
#define ioremap_nocache(X,Y) ioremap((X),(Y))
#define ioremap_wc(X,Y) ioremap((X),(Y))
#define ioremap_wt(X,Y) ioremap((X),(Y))
void iounmap(volatile void __iomem *addr);
/* Create a virtual mapping cookie for an IO port range */
void __iomem *ioport_map(unsigned long port, unsigned int nr);
void ioport_unmap(void __iomem *);
/* Create a virtual mapping cookie for a PCI BAR (memory or IO) */
struct pci_dev;
void pci_iounmap(struct pci_dev *dev, void __iomem *);
static inline int sbus_can_dma_64bit(void)
{
return 0; /* actually, sparc_cpu_model==sun4d */
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
David S. Miller | 13 | 100.00% | 1 | 100.00% |
Total | 13 | 100.00% | 1 | 100.00% |
static inline int sbus_can_burst64(void)
{
return 0; /* actually, sparc_cpu_model==sun4d */
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
David S. Miller | 13 | 100.00% | 1 | 100.00% |
Total | 13 | 100.00% | 1 | 100.00% |
struct device;
void sbus_set_sbus64(struct device *, int);
#endif
#define __ARCH_HAS_NO_PAGE_ZERO_MAPPED 1
#endif /* !(__SPARC_IO_H) */
Overall Contributors
Person | Tokens | Prop | Commits | CommitProp |
Sam Ravnborg | 513 | 78.56% | 3 | 37.50% |
James Hogan | 88 | 13.48% | 1 | 12.50% |
David S. Miller | 42 | 6.43% | 2 | 25.00% |
Toshi Kani | 9 | 1.38% | 1 | 12.50% |
Greg Kroah-Hartman | 1 | 0.15% | 1 | 12.50% |
Total | 653 | 100.00% | 8 | 100.00% |
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.