-#define dprintk(x...)
-
-static int io_addr(int x) {
- if (x < 0x400) {
-#ifdef CONFIG_SH_CAYMAN
- return (x << 2) | smsc_superio_virt;
-#else
- panic ("Illegal access to I/O port 0x%04x\n", x);
- return 0;
-#endif
- } else {
-#ifdef CONFIG_PCI
- return (x + pciio_virt);
-#else
- panic ("Illegal access to I/O port 0x%04x\n", x);
- return 0;
-#endif
- }
-}
-
-unsigned long inb(unsigned long port)
-{
- unsigned long r;
-
- r = ctrl_inb(io_addr(port));
- dprintk("inb(0x%x)=0x%x (0x%x)\n", port, r, io_addr(port));
- return r;
-}
-
-unsigned long inw(unsigned long port)
-{
- unsigned long r;
-
- r = ctrl_inw(io_addr(port));
- dprintk("inw(0x%x)=0x%x (0x%x)\n", port, r, io_addr(port));
- return r;
-}
-
-unsigned long inl(unsigned long port)
-{
- unsigned long r;
-
- r = ctrl_inl(io_addr(port));
- dprintk("inl(0x%x)=0x%x (0x%x)\n", port, r, io_addr(port));
- return r;
-}
-
-void outb(unsigned long value, unsigned long port)
-{
- dprintk("outb(0x%x,0x%x) (0x%x)\n", value, port, io_addr(port));
- ctrl_outb(value, io_addr(port));
-}
-
-void outw(unsigned long value, unsigned long port)
-{
- dprintk("outw(0x%x,0x%x) (0x%x)\n", value, port, io_addr(port));
- ctrl_outw(value, io_addr(port));
-}
-
-void outl(unsigned long value, unsigned long port)
-{
- dprintk("outw(0x%x,0x%x) (0x%x)\n", value, port, io_addr(port));
- ctrl_outl(value, io_addr(port));
-}
-