u8 titan_inb(unsigned long port) { if (PXSEG(port)) return ctrl_inb(port); else if (is_pci_ioaddr(port)) return ctrl_inb(pci_ioaddr(port)); return ctrl_inw(port2adr(port)) & 0xff; }
void __iomem *titan_ioport_map(unsigned long port, unsigned int size) { if (PXSEG(port) || is_pci_memaddr(port)) return (void __iomem *)port; else if (is_pci_ioaddr(port)) return (void __iomem *)pci_ioaddr(port); return (void __iomem *)port2adr(port); }
void titan_outb(u8 value, unsigned long port) { if (PXSEG(port)) ctrl_outb(value, port); else if (is_pci_ioaddr(port)) ctrl_outb(value, pci_ioaddr(port)); else ctrl_outw(value, port2adr(port)); }
void hs7751rvoip_outl(unsigned int value, unsigned long port) { if (PXSEG(port)) ctrl_outl(value, port); else if (is_pci_ioaddr(port) || shifted_port(port)) ctrl_outl(value, pci_ioaddr(port)); else maybebadio(port); }
void sh7751systemh_outl(unsigned int value, unsigned long port) { if (PXSEG(port)) *(volatile unsigned long *)port = value; else if (is_pci_ioaddr(port)) *((unsigned long*)pci_ioaddr(port)) = value; else maybebadio(port); }
void titan_outl(u32 value, unsigned long port) { if (PXSEG(port)) ctrl_outl(value, port); else if (is_pci_ioaddr(port)) ctrl_outl(value, pci_ioaddr(port)); else maybebadio(port); }
/* * General outline: remap really low stuff [eventually] to SuperIO, * stuff in PCI IO space (at or above window at pci.h:PCIBIOS_MIN_IO) * is mapped through the PCI IO window. Stuff with high bits (PXSEG) * should be way beyond the window, and is used w/o translation for * compatibility. */ unsigned char sh7751se_inb(unsigned long port) { if (PXSEG(port)) return *(volatile unsigned char *)port; else if (is_pci_ioaddr(port)) return *(volatile unsigned char *)pci_ioaddr(port); else return (*port2adr(port)) & 0xff; }
void landisk_outw(u16 value, unsigned long port) { if (PXSEG(port)) ctrl_outw(value, port); else if (is_pci_ioaddr(port)) ctrl_outw(value, pci_ioaddr(port)); else maybebadio(port); }
unsigned int hs7751rvoip_inl(unsigned long port) { if (PXSEG(port)) return ctrl_inl(port); else if (is_pci_ioaddr(port) || shifted_port(port)) return ctrl_inl(pci_ioaddr(port)); else maybebadio(port); return 0; }
void sh7751se_outb_p(unsigned char value, unsigned long port) { if (PXSEG(port)) *(volatile unsigned char *)port = value; else if (is_pci_ioaddr(port)) *((unsigned char*)pci_ioaddr(port)) = value; else *(port2adr(port)) = value; ctrl_delay(); }
void landisk_outb_p(u8 value, unsigned long port) { if (PXSEG(port)) ctrl_outb(value, port); else if (is_pci_ioaddr(port)) ctrl_outb(value, pci_ioaddr(port)); else ctrl_outw(value, port2adr(port)); ctrl_delay(); }
void rts7751r2d_outl(unsigned int value, unsigned long port) { if (CHECK_AX88796L_PORT(port)) maybebadio(port); else if (PXSEG(port)) *(volatile unsigned long *)port = value; else if (is_pci_ioaddr(port) || shifted_port(port)) *(volatile unsigned long *)pci_ioaddr(port) = value; else maybebadio(port); }
/* * General outline: remap really low stuff [eventually] to SuperIO, * stuff in PCI IO space (at or above window at pci.h:PCIBIOS_MIN_IO) * is mapped through the PCI IO window. Stuff with high bits (PXSEG) * should be way beyond the window, and is used w/o translation for * compatibility. */ unsigned char hs7751rvoip_inb(unsigned long port) { if (PXSEG(port)) return ctrl_inb(port); else if (codec_port(port)) return ctrl_inb(CODEC_IOMAP(port)); else if (is_pci_ioaddr(port) || shifted_port(port)) return ctrl_inb(pci_ioaddr(port)); else return ctrl_inw(port2adr(port)) & 0xff; }
void __iomem *hs7751rvoip_ioport_map(unsigned long port, unsigned int size) { if (PXSEG(port)) return (void __iomem *)port; else if (unlikely(codec_port(port) && (size == 1))) return (void __iomem *)CODEC_IOMAP(port); else if (is_pci_ioaddr(port)) return (void __iomem *)pci_ioaddr(port); return (void __iomem *)port2adr(port); }
void sh7751se_outw(unsigned short value, unsigned long port) { if (PXSEG(port)) *(volatile unsigned short *)port = value; else if (is_pci_ioaddr(port)) *((unsigned short *)pci_ioaddr(port)) = value; else if (port >= 0x2000) *port2adr(port) = value; else maybebadio(port); }
/* * General outline: remap really low stuff [eventually] to SuperIO, * stuff in PCI IO space (at or above window at pci.h:PCIBIOS_MIN_IO) * is mapped through the PCI IO window. Stuff with high bits (PXSEG) * should be way beyond the window, and is used w/o translation for * compatibility. */ unsigned char rts7751r2d_inb(unsigned long port) { if (CHECK_AX88796L_PORT(port)) return (*(volatile unsigned short *)port88796l(port, 0)) & 0xff; else if (PXSEG(port)) return *(volatile unsigned char *)port; else if (is_pci_ioaddr(port) || shifted_port(port)) return *(volatile unsigned char *)pci_ioaddr(port); else return (*(volatile unsigned short *)port2adr(port) & 0xff); }
void rts7751r2d_outb(unsigned char value, unsigned long port) { if (CHECK_AX88796L_PORT(port)) *((volatile unsigned short *)port88796l(port, 0)) = value; else if (PXSEG(port)) *(volatile unsigned char *)port = value; else if (is_pci_ioaddr(port) || shifted_port(port)) *(volatile unsigned char *)pci_ioaddr(port) = value; else *(volatile unsigned short *)port2adr(port) = value; }
/* * General outline: remap really low stuff [eventually] to SuperIO, * stuff in PCI IO space (at or above window at pci.h:PCIBIOS_MIN_IO) * is mapped through the PCI IO window. Stuff with high bits (PXSEG) * should be way beyond the window, and is used w/o translation for * compatibility. */ unsigned char sh7751systemh_inb(unsigned long port) { if (PXSEG(port)) return *(volatile unsigned char *)port; else if (is_pci_ioaddr(port)) return *(volatile unsigned char *)pci_ioaddr(port); else if (port <= 0x3F1) return *(volatile unsigned char *)ETHER_IOMAP(port); else return (*port2adr(port))&0xff; }
u32 landisk_inl(unsigned long port) { if (PXSEG(port)) return ctrl_inl(port); else if (is_pci_ioaddr(port)) return ctrl_inl(pci_ioaddr(port)); else maybebadio(port); return 0; }
void titan_outw(u16 value, unsigned long port) { if (PXSEG(port)) ctrl_outw(value, port); else if (is_pci_ioaddr(port)) ctrl_outw(value, pci_ioaddr(port)); else if (port >= 0x2000) ctrl_outw(value, port2adr(port)); else maybebadio(port); }
void sh7751systemh_outb(unsigned char value, unsigned long port) { if (PXSEG(port)) *(volatile unsigned char *)port = value; else if (is_pci_ioaddr(port)) *((unsigned char*)pci_ioaddr(port)) = value; else if (port <= 0x3F1) *(volatile unsigned char *)ETHER_IOMAP(port) = value; else *(port2adr(port)) = value; }
unsigned int sh7751se_inl(unsigned long port) { if (PXSEG(port)) return *(volatile unsigned long *)port; else if (is_pci_ioaddr(port)) return *(volatile unsigned int *)pci_ioaddr(port); else if (port >= 0x2000) return *port2adr(port); else maybebadio(port); return 0; }
void hs7751rvoip_outb(unsigned char value, unsigned long port) { if (PXSEG(port)) ctrl_outb(value, port); else if (codec_port(port)) ctrl_outb(value, CODEC_IOMAP(port)); else if (is_pci_ioaddr(port) || shifted_port(port)) ctrl_outb(value, pci_ioaddr(port)); else ctrl_outb(value, port2adr(port)); }
u32 titan_inl(unsigned long port) { if (PXSEG(port)) return ctrl_inl(port); else if (is_pci_ioaddr(port)) return ctrl_inl(pci_ioaddr(port)); else if (port >= 0x2000) return ctrl_inw(port2adr(port)); else maybebadio(port); return 0; }
void hs7751rvoip_insl(unsigned long port, void *addr, unsigned long count) { if (is_pci_ioaddr(port) || shifted_port(port)) { volatile u32 *p = (volatile u32 *)pci_ioaddr(port); u32 *buf = addr; while (count--) *buf++ = *p; } else maybebadio(port); }
void hs7751rvoip_outsl(unsigned long port, const void *addr, unsigned long count) { const u32 *buf = addr; if (is_pci_ioaddr(port) || shifted_port(port)) { volatile u32 *p = (volatile u32 *)pci_ioaddr(port); while (count--) *p = *buf++; } else maybebadio(port); }
void landisk_outsl(unsigned long port, const void *src, unsigned long count) { const u32 *buf = src; if (is_pci_ioaddr(port)) { volatile u32 *p = (volatile u32 *)pci_ioaddr(port); while (count--) *p = *buf++; } else maybebadio(port); }
void landisk_insl(unsigned long port, void *dst, unsigned long count) { u32 *buf = dst; if (is_pci_ioaddr(port)) { volatile u32 *p = (volatile u32 *)pci_ioaddr(port); while (count--) *buf++ = *p; } else maybebadio(port); }
unsigned char sh7751se_inb_p(unsigned long port) { unsigned char v; if (PXSEG(port)) v = *(volatile unsigned char *)port; else if (is_pci_ioaddr(port)) v = *(volatile unsigned char *)pci_ioaddr(port); else v = (*port2adr(port)) & 0xff; ctrl_delay(); return v; }
u8 titan_inb_p(unsigned long port) { u8 v; if (PXSEG(port)) v = ctrl_inb(port); else if (is_pci_ioaddr(port)) v = ctrl_inb(pci_ioaddr(port)); else v = ctrl_inw(port2adr(port)) & 0xff; ctrl_delay(); return v; }