root/arch/arm/mach-ebsa110/include/mach/io.h

/* [<][>][^][v][top][bottom][index][help] */

INCLUDED FROM


   1 /* SPDX-License-Identifier: GPL-2.0-only */
   2 /*
   3  *  arch/arm/mach-ebsa110/include/mach/io.h
   4  *
   5  *  Copyright (C) 1997,1998 Russell King
   6  *
   7  * Modifications:
   8  *  06-Dec-1997 RMK     Created.
   9  */
  10 #ifndef __ASM_ARM_ARCH_IO_H
  11 #define __ASM_ARM_ARCH_IO_H
  12 
  13 u8 __inb8(unsigned int port);
  14 void __outb8(u8  val, unsigned int port);
  15 
  16 u8 __inb16(unsigned int port);
  17 void __outb16(u8  val, unsigned int port);
  18 
  19 u16 __inw(unsigned int port);
  20 void __outw(u16 val, unsigned int port);
  21 
  22 u32 __inl(unsigned int port);
  23 void __outl(u32 val, unsigned int port);
  24 
  25 u8  __readb(const volatile void __iomem *addr);
  26 u16 __readw(const volatile void __iomem *addr);
  27 u32 __readl(const volatile void __iomem *addr);
  28 
  29 void __writeb(u8  val, volatile void __iomem *addr);
  30 void __writew(u16 val, volatile void __iomem *addr);
  31 void __writel(u32 val, volatile void __iomem *addr);
  32 
  33 /*
  34  * Argh, someone forgot the IOCS16 line.  We therefore have to handle
  35  * the byte stearing by selecting the correct byte IO functions here.
  36  */
  37 #ifdef ISA_SIXTEEN_BIT_PERIPHERAL
  38 #define inb(p)                  __inb16(p)
  39 #define outb(v,p)               __outb16(v,p)
  40 #else
  41 #define inb(p)                  __inb8(p)
  42 #define outb(v,p)               __outb8(v,p)
  43 #endif
  44 
  45 #define inw(p)                  __inw(p)
  46 #define outw(v,p)               __outw(v,p)
  47 
  48 #define inl(p)                  __inl(p)
  49 #define outl(v,p)               __outl(v,p)
  50 
  51 #define readb(b)                __readb(b)
  52 #define readw(b)                __readw(b)
  53 #define readl(b)                __readl(b)
  54 #define readb_relaxed(addr)     readb(addr)
  55 #define readw_relaxed(addr)     readw(addr)
  56 #define readl_relaxed(addr)     readl(addr)
  57 
  58 #define writeb(v,b)             __writeb(v,b)
  59 #define writew(v,b)             __writew(v,b)
  60 #define writel(v,b)             __writel(v,b)
  61 
  62 #define insb insb
  63 extern void insb(unsigned int port, void *buf, int sz);
  64 #define insw insw
  65 extern void insw(unsigned int port, void *buf, int sz);
  66 #define insl insl
  67 extern void insl(unsigned int port, void *buf, int sz);
  68 
  69 #define outsb outsb
  70 extern void outsb(unsigned int port, const void *buf, int sz);
  71 #define outsw outsw
  72 extern void outsw(unsigned int port, const void *buf, int sz);
  73 #define outsl outsl
  74 extern void outsl(unsigned int port, const void *buf, int sz);
  75 
  76 /* can't support writesb atm */
  77 #define writesw writesw
  78 extern void writesw(volatile void __iomem *addr, const void *data, int wordlen);
  79 #define writesl writesl
  80 extern void writesl(volatile void __iomem *addr, const void *data, int longlen);
  81 
  82 /* can't support readsb atm */
  83 #define readsw readsw
  84 extern void readsw(const volatile void __iomem *addr, void *data, int wordlen);
  85 
  86 #define readsl readsl
  87 extern void readsl(const volatile void __iomem *addr, void *data, int longlen);
  88 
  89 #endif

/* [<][>][^][v][top][bottom][index][help] */