Commit c563bf09 authored by Paul Mundt's avatar Paul Mundt

sh: pci: Kill off dead references to is_pci_ioaddr and friends.

Some old boards are still using this in their I/O routines, kill it off.
Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
parent d556fcc1
...@@ -34,8 +34,6 @@ unsigned char sh7751se_inb(unsigned long port) ...@@ -34,8 +34,6 @@ unsigned char sh7751se_inb(unsigned long port)
{ {
if (PXSEG(port)) if (PXSEG(port))
return *(volatile unsigned char *)port; return *(volatile unsigned char *)port;
else if (is_pci_ioaddr(port))
return *(volatile unsigned char *)pci_ioaddr(port);
else else
return (*port2adr(port)) & 0xff; return (*port2adr(port)) & 0xff;
} }
...@@ -46,8 +44,6 @@ unsigned char sh7751se_inb_p(unsigned long port) ...@@ -46,8 +44,6 @@ unsigned char sh7751se_inb_p(unsigned long port)
if (PXSEG(port)) if (PXSEG(port))
v = *(volatile unsigned char *)port; v = *(volatile unsigned char *)port;
else if (is_pci_ioaddr(port))
v = *(volatile unsigned char *)pci_ioaddr(port);
else else
v = (*port2adr(port)) & 0xff; v = (*port2adr(port)) & 0xff;
ctrl_delay(); ctrl_delay();
...@@ -58,8 +54,6 @@ unsigned short sh7751se_inw(unsigned long port) ...@@ -58,8 +54,6 @@ unsigned short sh7751se_inw(unsigned long port)
{ {
if (PXSEG(port)) if (PXSEG(port))
return *(volatile unsigned short *)port; return *(volatile unsigned short *)port;
else if (is_pci_ioaddr(port))
return *(volatile unsigned short *)pci_ioaddr(port);
else if (port >= 0x2000) else if (port >= 0x2000)
return *port2adr(port); return *port2adr(port);
else else
...@@ -71,8 +65,6 @@ unsigned int sh7751se_inl(unsigned long port) ...@@ -71,8 +65,6 @@ unsigned int sh7751se_inl(unsigned long port)
{ {
if (PXSEG(port)) if (PXSEG(port))
return *(volatile unsigned long *)port; return *(volatile unsigned long *)port;
else if (is_pci_ioaddr(port))
return *(volatile unsigned int *)pci_ioaddr(port);
else if (port >= 0x2000) else if (port >= 0x2000)
return *port2adr(port); return *port2adr(port);
else else
...@@ -85,8 +77,6 @@ void sh7751se_outb(unsigned char value, unsigned long port) ...@@ -85,8 +77,6 @@ void sh7751se_outb(unsigned char value, unsigned long port)
if (PXSEG(port)) if (PXSEG(port))
*(volatile unsigned char *)port = value; *(volatile unsigned char *)port = value;
else if (is_pci_ioaddr(port))
*((unsigned char*)pci_ioaddr(port)) = value;
else else
*(port2adr(port)) = value; *(port2adr(port)) = value;
} }
...@@ -95,8 +85,6 @@ void sh7751se_outb_p(unsigned char value, unsigned long port) ...@@ -95,8 +85,6 @@ void sh7751se_outb_p(unsigned char value, unsigned long port)
{ {
if (PXSEG(port)) if (PXSEG(port))
*(volatile unsigned char *)port = value; *(volatile unsigned char *)port = value;
else if (is_pci_ioaddr(port))
*((unsigned char*)pci_ioaddr(port)) = value;
else else
*(port2adr(port)) = value; *(port2adr(port)) = value;
ctrl_delay(); ctrl_delay();
...@@ -106,8 +94,6 @@ void sh7751se_outw(unsigned short value, unsigned long port) ...@@ -106,8 +94,6 @@ void sh7751se_outw(unsigned short value, unsigned long port)
{ {
if (PXSEG(port)) if (PXSEG(port))
*(volatile unsigned short *)port = value; *(volatile unsigned short *)port = value;
else if (is_pci_ioaddr(port))
*((unsigned short *)pci_ioaddr(port)) = value;
else if (port >= 0x2000) else if (port >= 0x2000)
*port2adr(port) = value; *port2adr(port) = value;
else else
...@@ -118,8 +104,6 @@ void sh7751se_outl(unsigned int value, unsigned long port) ...@@ -118,8 +104,6 @@ void sh7751se_outl(unsigned int value, unsigned long port)
{ {
if (PXSEG(port)) if (PXSEG(port))
*(volatile unsigned long *)port = value; *(volatile unsigned long *)port = value;
else if (is_pci_ioaddr(port))
*((unsigned long*)pci_ioaddr(port)) = value;
else else
maybebadio(port); maybebadio(port);
} }
......
...@@ -36,8 +36,6 @@ unsigned char snapgear_inb(unsigned long port) ...@@ -36,8 +36,6 @@ unsigned char snapgear_inb(unsigned long port)
{ {
if (PXSEG(port)) if (PXSEG(port))
return *(volatile unsigned char *)port; return *(volatile unsigned char *)port;
else if (is_pci_ioaddr(port))
return *(volatile unsigned char *)pci_ioaddr(port);
else else
return (*port2adr(port)) & 0xff; return (*port2adr(port)) & 0xff;
} }
...@@ -48,8 +46,6 @@ unsigned char snapgear_inb_p(unsigned long port) ...@@ -48,8 +46,6 @@ unsigned char snapgear_inb_p(unsigned long port)
if (PXSEG(port)) if (PXSEG(port))
v = *(volatile unsigned char *)port; v = *(volatile unsigned char *)port;
else if (is_pci_ioaddr(port))
v = *(volatile unsigned char *)pci_ioaddr(port);
else else
v = (*port2adr(port))&0xff; v = (*port2adr(port))&0xff;
ctrl_delay(); ctrl_delay();
...@@ -60,8 +56,6 @@ unsigned short snapgear_inw(unsigned long port) ...@@ -60,8 +56,6 @@ unsigned short snapgear_inw(unsigned long port)
{ {
if (PXSEG(port)) if (PXSEG(port))
return *(volatile unsigned short *)port; return *(volatile unsigned short *)port;
else if (is_pci_ioaddr(port))
return *(volatile unsigned short *)pci_ioaddr(port);
else if (port >= 0x2000) else if (port >= 0x2000)
return *port2adr(port); return *port2adr(port);
else else
...@@ -73,8 +67,6 @@ unsigned int snapgear_inl(unsigned long port) ...@@ -73,8 +67,6 @@ unsigned int snapgear_inl(unsigned long port)
{ {
if (PXSEG(port)) if (PXSEG(port))
return *(volatile unsigned long *)port; return *(volatile unsigned long *)port;
else if (is_pci_ioaddr(port))
return *(volatile unsigned int *)pci_ioaddr(port);
else if (port >= 0x2000) else if (port >= 0x2000)
return *port2adr(port); return *port2adr(port);
else else
...@@ -87,8 +79,6 @@ void snapgear_outb(unsigned char value, unsigned long port) ...@@ -87,8 +79,6 @@ void snapgear_outb(unsigned char value, unsigned long port)
if (PXSEG(port)) if (PXSEG(port))
*(volatile unsigned char *)port = value; *(volatile unsigned char *)port = value;
else if (is_pci_ioaddr(port))
*((unsigned char*)pci_ioaddr(port)) = value;
else else
*(port2adr(port)) = value; *(port2adr(port)) = value;
} }
...@@ -97,8 +87,6 @@ void snapgear_outb_p(unsigned char value, unsigned long port) ...@@ -97,8 +87,6 @@ void snapgear_outb_p(unsigned char value, unsigned long port)
{ {
if (PXSEG(port)) if (PXSEG(port))
*(volatile unsigned char *)port = value; *(volatile unsigned char *)port = value;
else if (is_pci_ioaddr(port))
*((unsigned char*)pci_ioaddr(port)) = value;
else else
*(port2adr(port)) = value; *(port2adr(port)) = value;
ctrl_delay(); ctrl_delay();
...@@ -108,8 +96,6 @@ void snapgear_outw(unsigned short value, unsigned long port) ...@@ -108,8 +96,6 @@ void snapgear_outw(unsigned short value, unsigned long port)
{ {
if (PXSEG(port)) if (PXSEG(port))
*(volatile unsigned short *)port = value; *(volatile unsigned short *)port = value;
else if (is_pci_ioaddr(port))
*((unsigned short *)pci_ioaddr(port)) = value;
else if (port >= 0x2000) else if (port >= 0x2000)
*port2adr(port) = value; *port2adr(port) = value;
else else
...@@ -120,8 +106,6 @@ void snapgear_outl(unsigned int value, unsigned long port) ...@@ -120,8 +106,6 @@ void snapgear_outl(unsigned int value, unsigned long port)
{ {
if (PXSEG(port)) if (PXSEG(port))
*(volatile unsigned long *)port = value; *(volatile unsigned long *)port = value;
else if (is_pci_ioaddr(port))
*((unsigned long*)pci_ioaddr(port)) = value;
else else
maybebadio(port); maybebadio(port);
} }
......
...@@ -35,8 +35,6 @@ unsigned char sh7751systemh_inb(unsigned long port) ...@@ -35,8 +35,6 @@ unsigned char sh7751systemh_inb(unsigned long port)
{ {
if (PXSEG(port)) if (PXSEG(port))
return *(volatile unsigned char *)port; return *(volatile unsigned char *)port;
else if (is_pci_ioaddr(port))
return *(volatile unsigned char *)pci_ioaddr(port);
else if (port <= 0x3F1) else if (port <= 0x3F1)
return *(volatile unsigned char *)ETHER_IOMAP(port); return *(volatile unsigned char *)ETHER_IOMAP(port);
else else
...@@ -49,8 +47,6 @@ unsigned char sh7751systemh_inb_p(unsigned long port) ...@@ -49,8 +47,6 @@ unsigned char sh7751systemh_inb_p(unsigned long port)
if (PXSEG(port)) if (PXSEG(port))
v = *(volatile unsigned char *)port; v = *(volatile unsigned char *)port;
else if (is_pci_ioaddr(port))
v = *(volatile unsigned char *)pci_ioaddr(port);
else if (port <= 0x3F1) else if (port <= 0x3F1)
v = *(volatile unsigned char *)ETHER_IOMAP(port); v = *(volatile unsigned char *)ETHER_IOMAP(port);
else else
...@@ -63,8 +59,6 @@ unsigned short sh7751systemh_inw(unsigned long port) ...@@ -63,8 +59,6 @@ unsigned short sh7751systemh_inw(unsigned long port)
{ {
if (PXSEG(port)) if (PXSEG(port))
return *(volatile unsigned short *)port; return *(volatile unsigned short *)port;
else if (is_pci_ioaddr(port))
return *(volatile unsigned short *)pci_ioaddr(port);
else if (port >= 0x2000) else if (port >= 0x2000)
return *port2adr(port); return *port2adr(port);
else if (port <= 0x3F1) else if (port <= 0x3F1)
...@@ -78,8 +72,6 @@ unsigned int sh7751systemh_inl(unsigned long port) ...@@ -78,8 +72,6 @@ unsigned int sh7751systemh_inl(unsigned long port)
{ {
if (PXSEG(port)) if (PXSEG(port))
return *(volatile unsigned long *)port; return *(volatile unsigned long *)port;
else if (is_pci_ioaddr(port))
return *(volatile unsigned int *)pci_ioaddr(port);
else if (port >= 0x2000) else if (port >= 0x2000)
return *port2adr(port); return *port2adr(port);
else if (port <= 0x3F1) else if (port <= 0x3F1)
...@@ -94,8 +86,6 @@ void sh7751systemh_outb(unsigned char value, unsigned long port) ...@@ -94,8 +86,6 @@ void sh7751systemh_outb(unsigned char value, unsigned long port)
if (PXSEG(port)) if (PXSEG(port))
*(volatile unsigned char *)port = value; *(volatile unsigned char *)port = value;
else if (is_pci_ioaddr(port))
*((unsigned char*)pci_ioaddr(port)) = value;
else if (port <= 0x3F1) else if (port <= 0x3F1)
*(volatile unsigned char *)ETHER_IOMAP(port) = value; *(volatile unsigned char *)ETHER_IOMAP(port) = value;
else else
...@@ -106,8 +96,6 @@ void sh7751systemh_outb_p(unsigned char value, unsigned long port) ...@@ -106,8 +96,6 @@ void sh7751systemh_outb_p(unsigned char value, unsigned long port)
{ {
if (PXSEG(port)) if (PXSEG(port))
*(volatile unsigned char *)port = value; *(volatile unsigned char *)port = value;
else if (is_pci_ioaddr(port))
*((unsigned char*)pci_ioaddr(port)) = value;
else if (port <= 0x3F1) else if (port <= 0x3F1)
*(volatile unsigned char *)ETHER_IOMAP(port) = value; *(volatile unsigned char *)ETHER_IOMAP(port) = value;
else else
...@@ -119,8 +107,6 @@ void sh7751systemh_outw(unsigned short value, unsigned long port) ...@@ -119,8 +107,6 @@ void sh7751systemh_outw(unsigned short value, unsigned long port)
{ {
if (PXSEG(port)) if (PXSEG(port))
*(volatile unsigned short *)port = value; *(volatile unsigned short *)port = value;
else if (is_pci_ioaddr(port))
*((unsigned short *)pci_ioaddr(port)) = value;
else if (port >= 0x2000) else if (port >= 0x2000)
*port2adr(port) = value; *port2adr(port) = value;
else if (port <= 0x3F1) else if (port <= 0x3F1)
...@@ -133,8 +119,6 @@ void sh7751systemh_outl(unsigned int value, unsigned long port) ...@@ -133,8 +119,6 @@ void sh7751systemh_outl(unsigned int value, unsigned long port)
{ {
if (PXSEG(port)) if (PXSEG(port))
*(volatile unsigned long *)port = value; *(volatile unsigned long *)port = value;
else if (is_pci_ioaddr(port))
*((unsigned long*)pci_ioaddr(port)) = value;
else else
maybebadio(port); maybebadio(port);
} }
......
...@@ -17,8 +17,6 @@ u8 titan_inb(unsigned long port) ...@@ -17,8 +17,6 @@ u8 titan_inb(unsigned long port)
{ {
if (PXSEG(port)) if (PXSEG(port))
return ctrl_inb(port); return ctrl_inb(port);
else if (is_pci_ioaddr(port))
return ctrl_inb(pci_ioaddr(port));
return ctrl_inw(port2adr(port)) & 0xff; return ctrl_inw(port2adr(port)) & 0xff;
} }
...@@ -28,8 +26,6 @@ u8 titan_inb_p(unsigned long port) ...@@ -28,8 +26,6 @@ u8 titan_inb_p(unsigned long port)
if (PXSEG(port)) if (PXSEG(port))
v = ctrl_inb(port); v = ctrl_inb(port);
else if (is_pci_ioaddr(port))
v = ctrl_inb(pci_ioaddr(port));
else else
v = ctrl_inw(port2adr(port)) & 0xff; v = ctrl_inw(port2adr(port)) & 0xff;
ctrl_delay(); ctrl_delay();
...@@ -40,8 +36,6 @@ u16 titan_inw(unsigned long port) ...@@ -40,8 +36,6 @@ u16 titan_inw(unsigned long port)
{ {
if (PXSEG(port)) if (PXSEG(port))
return ctrl_inw(port); return ctrl_inw(port);
else if (is_pci_ioaddr(port))
return ctrl_inw(pci_ioaddr(port));
else if (port >= 0x2000) else if (port >= 0x2000)
return ctrl_inw(port2adr(port)); return ctrl_inw(port2adr(port));
else else
...@@ -53,8 +47,6 @@ u32 titan_inl(unsigned long port) ...@@ -53,8 +47,6 @@ u32 titan_inl(unsigned long port)
{ {
if (PXSEG(port)) if (PXSEG(port))
return ctrl_inl(port); return ctrl_inl(port);
else if (is_pci_ioaddr(port))
return ctrl_inl(pci_ioaddr(port));
else if (port >= 0x2000) else if (port >= 0x2000)
return ctrl_inw(port2adr(port)); return ctrl_inw(port2adr(port));
else else
...@@ -66,8 +58,6 @@ void titan_outb(u8 value, unsigned long port) ...@@ -66,8 +58,6 @@ void titan_outb(u8 value, unsigned long port)
{ {
if (PXSEG(port)) if (PXSEG(port))
ctrl_outb(value, port); ctrl_outb(value, port);
else if (is_pci_ioaddr(port))
ctrl_outb(value, pci_ioaddr(port));
else else
ctrl_outw(value, port2adr(port)); ctrl_outw(value, port2adr(port));
} }
...@@ -76,8 +66,6 @@ void titan_outb_p(u8 value, unsigned long port) ...@@ -76,8 +66,6 @@ void titan_outb_p(u8 value, unsigned long port)
{ {
if (PXSEG(port)) if (PXSEG(port))
ctrl_outb(value, port); ctrl_outb(value, port);
else if (is_pci_ioaddr(port))
ctrl_outb(value, pci_ioaddr(port));
else else
ctrl_outw(value, port2adr(port)); ctrl_outw(value, port2adr(port));
ctrl_delay(); ctrl_delay();
...@@ -87,8 +75,6 @@ void titan_outw(u16 value, unsigned long port) ...@@ -87,8 +75,6 @@ void titan_outw(u16 value, unsigned long port)
{ {
if (PXSEG(port)) if (PXSEG(port))
ctrl_outw(value, port); ctrl_outw(value, port);
else if (is_pci_ioaddr(port))
ctrl_outw(value, pci_ioaddr(port));
else if (port >= 0x2000) else if (port >= 0x2000)
ctrl_outw(value, port2adr(port)); ctrl_outw(value, port2adr(port));
else else
...@@ -99,8 +85,6 @@ void titan_outl(u32 value, unsigned long port) ...@@ -99,8 +85,6 @@ void titan_outl(u32 value, unsigned long port)
{ {
if (PXSEG(port)) if (PXSEG(port))
ctrl_outl(value, port); ctrl_outl(value, port);
else if (is_pci_ioaddr(port))
ctrl_outl(value, pci_ioaddr(port));
else else
maybebadio(port); maybebadio(port);
} }
...@@ -119,8 +103,6 @@ void __iomem *titan_ioport_map(unsigned long port, unsigned int size) ...@@ -119,8 +103,6 @@ void __iomem *titan_ioport_map(unsigned long port, unsigned int size)
{ {
if (PXSEG(port)) if (PXSEG(port))
return (void __iomem *)port; return (void __iomem *)port;
else if (is_pci_ioaddr(port))
return (void __iomem *)pci_ioaddr(port);
return (void __iomem *)port2adr(port); return (void __iomem *)port2adr(port);
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment