diff options
author | Paul Mundt <lethal@linux-sh.org> | 2009-04-20 06:39:57 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-04-20 06:39:57 -0400 |
commit | c563bf0965c86cc6087b09c34ca063fe96d6deca (patch) | |
tree | 59f19de457156a8ba9b68d227e2fa33d58985bd5 | |
parent | d556fcc101c4b0d57ac9742ab806a6bfed78eac1 (diff) |
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: Paul Mundt <lethal@linux-sh.org>
-rw-r--r-- | arch/sh/boards/mach-se/7751/io.c | 16 | ||||
-rw-r--r-- | arch/sh/boards/mach-snapgear/io.c | 16 | ||||
-rw-r--r-- | arch/sh/boards/mach-systemh/io.c | 16 | ||||
-rw-r--r-- | arch/sh/boards/mach-titan/io.c | 18 |
4 files changed, 0 insertions, 66 deletions
diff --git a/arch/sh/boards/mach-se/7751/io.c b/arch/sh/boards/mach-se/7751/io.c index 6287ae570319..6e75bd4459e5 100644 --- a/arch/sh/boards/mach-se/7751/io.c +++ b/arch/sh/boards/mach-se/7751/io.c | |||
@@ -34,8 +34,6 @@ unsigned char sh7751se_inb(unsigned long port) | |||
34 | { | 34 | { |
35 | if (PXSEG(port)) | 35 | if (PXSEG(port)) |
36 | return *(volatile unsigned char *)port; | 36 | return *(volatile unsigned char *)port; |
37 | else if (is_pci_ioaddr(port)) | ||
38 | return *(volatile unsigned char *)pci_ioaddr(port); | ||
39 | else | 37 | else |
40 | return (*port2adr(port)) & 0xff; | 38 | return (*port2adr(port)) & 0xff; |
41 | } | 39 | } |
@@ -46,8 +44,6 @@ unsigned char sh7751se_inb_p(unsigned long port) | |||
46 | 44 | ||
47 | if (PXSEG(port)) | 45 | if (PXSEG(port)) |
48 | v = *(volatile unsigned char *)port; | 46 | v = *(volatile unsigned char *)port; |
49 | else if (is_pci_ioaddr(port)) | ||
50 | v = *(volatile unsigned char *)pci_ioaddr(port); | ||
51 | else | 47 | else |
52 | v = (*port2adr(port)) & 0xff; | 48 | v = (*port2adr(port)) & 0xff; |
53 | ctrl_delay(); | 49 | ctrl_delay(); |
@@ -58,8 +54,6 @@ unsigned short sh7751se_inw(unsigned long port) | |||
58 | { | 54 | { |
59 | if (PXSEG(port)) | 55 | if (PXSEG(port)) |
60 | return *(volatile unsigned short *)port; | 56 | return *(volatile unsigned short *)port; |
61 | else if (is_pci_ioaddr(port)) | ||
62 | return *(volatile unsigned short *)pci_ioaddr(port); | ||
63 | else if (port >= 0x2000) | 57 | else if (port >= 0x2000) |
64 | return *port2adr(port); | 58 | return *port2adr(port); |
65 | else | 59 | else |
@@ -71,8 +65,6 @@ unsigned int sh7751se_inl(unsigned long port) | |||
71 | { | 65 | { |
72 | if (PXSEG(port)) | 66 | if (PXSEG(port)) |
73 | return *(volatile unsigned long *)port; | 67 | return *(volatile unsigned long *)port; |
74 | else if (is_pci_ioaddr(port)) | ||
75 | return *(volatile unsigned int *)pci_ioaddr(port); | ||
76 | else if (port >= 0x2000) | 68 | else if (port >= 0x2000) |
77 | return *port2adr(port); | 69 | return *port2adr(port); |
78 | else | 70 | else |
@@ -85,8 +77,6 @@ void sh7751se_outb(unsigned char value, unsigned long port) | |||
85 | 77 | ||
86 | if (PXSEG(port)) | 78 | if (PXSEG(port)) |
87 | *(volatile unsigned char *)port = value; | 79 | *(volatile unsigned char *)port = value; |
88 | else if (is_pci_ioaddr(port)) | ||
89 | *((unsigned char*)pci_ioaddr(port)) = value; | ||
90 | else | 80 | else |
91 | *(port2adr(port)) = value; | 81 | *(port2adr(port)) = value; |
92 | } | 82 | } |
@@ -95,8 +85,6 @@ void sh7751se_outb_p(unsigned char value, unsigned long port) | |||
95 | { | 85 | { |
96 | if (PXSEG(port)) | 86 | if (PXSEG(port)) |
97 | *(volatile unsigned char *)port = value; | 87 | *(volatile unsigned char *)port = value; |
98 | else if (is_pci_ioaddr(port)) | ||
99 | *((unsigned char*)pci_ioaddr(port)) = value; | ||
100 | else | 88 | else |
101 | *(port2adr(port)) = value; | 89 | *(port2adr(port)) = value; |
102 | ctrl_delay(); | 90 | ctrl_delay(); |
@@ -106,8 +94,6 @@ void sh7751se_outw(unsigned short value, unsigned long port) | |||
106 | { | 94 | { |
107 | if (PXSEG(port)) | 95 | if (PXSEG(port)) |
108 | *(volatile unsigned short *)port = value; | 96 | *(volatile unsigned short *)port = value; |
109 | else if (is_pci_ioaddr(port)) | ||
110 | *((unsigned short *)pci_ioaddr(port)) = value; | ||
111 | else if (port >= 0x2000) | 97 | else if (port >= 0x2000) |
112 | *port2adr(port) = value; | 98 | *port2adr(port) = value; |
113 | else | 99 | else |
@@ -118,8 +104,6 @@ void sh7751se_outl(unsigned int value, unsigned long port) | |||
118 | { | 104 | { |
119 | if (PXSEG(port)) | 105 | if (PXSEG(port)) |
120 | *(volatile unsigned long *)port = value; | 106 | *(volatile unsigned long *)port = value; |
121 | else if (is_pci_ioaddr(port)) | ||
122 | *((unsigned long*)pci_ioaddr(port)) = value; | ||
123 | else | 107 | else |
124 | maybebadio(port); | 108 | maybebadio(port); |
125 | } | 109 | } |
diff --git a/arch/sh/boards/mach-snapgear/io.c b/arch/sh/boards/mach-snapgear/io.c index 0f4824264557..476650e42dbc 100644 --- a/arch/sh/boards/mach-snapgear/io.c +++ b/arch/sh/boards/mach-snapgear/io.c | |||
@@ -36,8 +36,6 @@ unsigned char snapgear_inb(unsigned long port) | |||
36 | { | 36 | { |
37 | if (PXSEG(port)) | 37 | if (PXSEG(port)) |
38 | return *(volatile unsigned char *)port; | 38 | return *(volatile unsigned char *)port; |
39 | else if (is_pci_ioaddr(port)) | ||
40 | return *(volatile unsigned char *)pci_ioaddr(port); | ||
41 | else | 39 | else |
42 | return (*port2adr(port)) & 0xff; | 40 | return (*port2adr(port)) & 0xff; |
43 | } | 41 | } |
@@ -48,8 +46,6 @@ unsigned char snapgear_inb_p(unsigned long port) | |||
48 | 46 | ||
49 | if (PXSEG(port)) | 47 | if (PXSEG(port)) |
50 | v = *(volatile unsigned char *)port; | 48 | v = *(volatile unsigned char *)port; |
51 | else if (is_pci_ioaddr(port)) | ||
52 | v = *(volatile unsigned char *)pci_ioaddr(port); | ||
53 | else | 49 | else |
54 | v = (*port2adr(port))&0xff; | 50 | v = (*port2adr(port))&0xff; |
55 | ctrl_delay(); | 51 | ctrl_delay(); |
@@ -60,8 +56,6 @@ unsigned short snapgear_inw(unsigned long port) | |||
60 | { | 56 | { |
61 | if (PXSEG(port)) | 57 | if (PXSEG(port)) |
62 | return *(volatile unsigned short *)port; | 58 | return *(volatile unsigned short *)port; |
63 | else if (is_pci_ioaddr(port)) | ||
64 | return *(volatile unsigned short *)pci_ioaddr(port); | ||
65 | else if (port >= 0x2000) | 59 | else if (port >= 0x2000) |
66 | return *port2adr(port); | 60 | return *port2adr(port); |
67 | else | 61 | else |
@@ -73,8 +67,6 @@ unsigned int snapgear_inl(unsigned long port) | |||
73 | { | 67 | { |
74 | if (PXSEG(port)) | 68 | if (PXSEG(port)) |
75 | return *(volatile unsigned long *)port; | 69 | return *(volatile unsigned long *)port; |
76 | else if (is_pci_ioaddr(port)) | ||
77 | return *(volatile unsigned int *)pci_ioaddr(port); | ||
78 | else if (port >= 0x2000) | 70 | else if (port >= 0x2000) |
79 | return *port2adr(port); | 71 | return *port2adr(port); |
80 | else | 72 | else |
@@ -87,8 +79,6 @@ void snapgear_outb(unsigned char value, unsigned long port) | |||
87 | 79 | ||
88 | if (PXSEG(port)) | 80 | if (PXSEG(port)) |
89 | *(volatile unsigned char *)port = value; | 81 | *(volatile unsigned char *)port = value; |
90 | else if (is_pci_ioaddr(port)) | ||
91 | *((unsigned char*)pci_ioaddr(port)) = value; | ||
92 | else | 82 | else |
93 | *(port2adr(port)) = value; | 83 | *(port2adr(port)) = value; |
94 | } | 84 | } |
@@ -97,8 +87,6 @@ void snapgear_outb_p(unsigned char value, unsigned long port) | |||
97 | { | 87 | { |
98 | if (PXSEG(port)) | 88 | if (PXSEG(port)) |
99 | *(volatile unsigned char *)port = value; | 89 | *(volatile unsigned char *)port = value; |
100 | else if (is_pci_ioaddr(port)) | ||
101 | *((unsigned char*)pci_ioaddr(port)) = value; | ||
102 | else | 90 | else |
103 | *(port2adr(port)) = value; | 91 | *(port2adr(port)) = value; |
104 | ctrl_delay(); | 92 | ctrl_delay(); |
@@ -108,8 +96,6 @@ void snapgear_outw(unsigned short value, unsigned long port) | |||
108 | { | 96 | { |
109 | if (PXSEG(port)) | 97 | if (PXSEG(port)) |
110 | *(volatile unsigned short *)port = value; | 98 | *(volatile unsigned short *)port = value; |
111 | else if (is_pci_ioaddr(port)) | ||
112 | *((unsigned short *)pci_ioaddr(port)) = value; | ||
113 | else if (port >= 0x2000) | 99 | else if (port >= 0x2000) |
114 | *port2adr(port) = value; | 100 | *port2adr(port) = value; |
115 | else | 101 | else |
@@ -120,8 +106,6 @@ void snapgear_outl(unsigned int value, unsigned long port) | |||
120 | { | 106 | { |
121 | if (PXSEG(port)) | 107 | if (PXSEG(port)) |
122 | *(volatile unsigned long *)port = value; | 108 | *(volatile unsigned long *)port = value; |
123 | else if (is_pci_ioaddr(port)) | ||
124 | *((unsigned long*)pci_ioaddr(port)) = value; | ||
125 | else | 109 | else |
126 | maybebadio(port); | 110 | maybebadio(port); |
127 | } | 111 | } |
diff --git a/arch/sh/boards/mach-systemh/io.c b/arch/sh/boards/mach-systemh/io.c index dec3db0ee933..15577ff1f715 100644 --- a/arch/sh/boards/mach-systemh/io.c +++ b/arch/sh/boards/mach-systemh/io.c | |||
@@ -35,8 +35,6 @@ unsigned char sh7751systemh_inb(unsigned long port) | |||
35 | { | 35 | { |
36 | if (PXSEG(port)) | 36 | if (PXSEG(port)) |
37 | return *(volatile unsigned char *)port; | 37 | return *(volatile unsigned char *)port; |
38 | else if (is_pci_ioaddr(port)) | ||
39 | return *(volatile unsigned char *)pci_ioaddr(port); | ||
40 | else if (port <= 0x3F1) | 38 | else if (port <= 0x3F1) |
41 | return *(volatile unsigned char *)ETHER_IOMAP(port); | 39 | return *(volatile unsigned char *)ETHER_IOMAP(port); |
42 | else | 40 | else |
@@ -49,8 +47,6 @@ unsigned char sh7751systemh_inb_p(unsigned long port) | |||
49 | 47 | ||
50 | if (PXSEG(port)) | 48 | if (PXSEG(port)) |
51 | v = *(volatile unsigned char *)port; | 49 | v = *(volatile unsigned char *)port; |
52 | else if (is_pci_ioaddr(port)) | ||
53 | v = *(volatile unsigned char *)pci_ioaddr(port); | ||
54 | else if (port <= 0x3F1) | 50 | else if (port <= 0x3F1) |
55 | v = *(volatile unsigned char *)ETHER_IOMAP(port); | 51 | v = *(volatile unsigned char *)ETHER_IOMAP(port); |
56 | else | 52 | else |
@@ -63,8 +59,6 @@ unsigned short sh7751systemh_inw(unsigned long port) | |||
63 | { | 59 | { |
64 | if (PXSEG(port)) | 60 | if (PXSEG(port)) |
65 | return *(volatile unsigned short *)port; | 61 | return *(volatile unsigned short *)port; |
66 | else if (is_pci_ioaddr(port)) | ||
67 | return *(volatile unsigned short *)pci_ioaddr(port); | ||
68 | else if (port >= 0x2000) | 62 | else if (port >= 0x2000) |
69 | return *port2adr(port); | 63 | return *port2adr(port); |
70 | else if (port <= 0x3F1) | 64 | else if (port <= 0x3F1) |
@@ -78,8 +72,6 @@ unsigned int sh7751systemh_inl(unsigned long port) | |||
78 | { | 72 | { |
79 | if (PXSEG(port)) | 73 | if (PXSEG(port)) |
80 | return *(volatile unsigned long *)port; | 74 | return *(volatile unsigned long *)port; |
81 | else if (is_pci_ioaddr(port)) | ||
82 | return *(volatile unsigned int *)pci_ioaddr(port); | ||
83 | else if (port >= 0x2000) | 75 | else if (port >= 0x2000) |
84 | return *port2adr(port); | 76 | return *port2adr(port); |
85 | else if (port <= 0x3F1) | 77 | else if (port <= 0x3F1) |
@@ -94,8 +86,6 @@ void sh7751systemh_outb(unsigned char value, unsigned long port) | |||
94 | 86 | ||
95 | if (PXSEG(port)) | 87 | if (PXSEG(port)) |
96 | *(volatile unsigned char *)port = value; | 88 | *(volatile unsigned char *)port = value; |
97 | else if (is_pci_ioaddr(port)) | ||
98 | *((unsigned char*)pci_ioaddr(port)) = value; | ||
99 | else if (port <= 0x3F1) | 89 | else if (port <= 0x3F1) |
100 | *(volatile unsigned char *)ETHER_IOMAP(port) = value; | 90 | *(volatile unsigned char *)ETHER_IOMAP(port) = value; |
101 | else | 91 | else |
@@ -106,8 +96,6 @@ void sh7751systemh_outb_p(unsigned char value, unsigned long port) | |||
106 | { | 96 | { |
107 | if (PXSEG(port)) | 97 | if (PXSEG(port)) |
108 | *(volatile unsigned char *)port = value; | 98 | *(volatile unsigned char *)port = value; |
109 | else if (is_pci_ioaddr(port)) | ||
110 | *((unsigned char*)pci_ioaddr(port)) = value; | ||
111 | else if (port <= 0x3F1) | 99 | else if (port <= 0x3F1) |
112 | *(volatile unsigned char *)ETHER_IOMAP(port) = value; | 100 | *(volatile unsigned char *)ETHER_IOMAP(port) = value; |
113 | else | 101 | else |
@@ -119,8 +107,6 @@ void sh7751systemh_outw(unsigned short value, unsigned long port) | |||
119 | { | 107 | { |
120 | if (PXSEG(port)) | 108 | if (PXSEG(port)) |
121 | *(volatile unsigned short *)port = value; | 109 | *(volatile unsigned short *)port = value; |
122 | else if (is_pci_ioaddr(port)) | ||
123 | *((unsigned short *)pci_ioaddr(port)) = value; | ||
124 | else if (port >= 0x2000) | 110 | else if (port >= 0x2000) |
125 | *port2adr(port) = value; | 111 | *port2adr(port) = value; |
126 | else if (port <= 0x3F1) | 112 | else if (port <= 0x3F1) |
@@ -133,8 +119,6 @@ void sh7751systemh_outl(unsigned int value, unsigned long port) | |||
133 | { | 119 | { |
134 | if (PXSEG(port)) | 120 | if (PXSEG(port)) |
135 | *(volatile unsigned long *)port = value; | 121 | *(volatile unsigned long *)port = value; |
136 | else if (is_pci_ioaddr(port)) | ||
137 | *((unsigned long*)pci_ioaddr(port)) = value; | ||
138 | else | 122 | else |
139 | maybebadio(port); | 123 | maybebadio(port); |
140 | } | 124 | } |
diff --git a/arch/sh/boards/mach-titan/io.c b/arch/sh/boards/mach-titan/io.c index 053b3ed2ed8d..0130e9826aca 100644 --- a/arch/sh/boards/mach-titan/io.c +++ b/arch/sh/boards/mach-titan/io.c | |||
@@ -17,8 +17,6 @@ u8 titan_inb(unsigned long port) | |||
17 | { | 17 | { |
18 | if (PXSEG(port)) | 18 | if (PXSEG(port)) |
19 | return ctrl_inb(port); | 19 | return ctrl_inb(port); |
20 | else if (is_pci_ioaddr(port)) | ||
21 | return ctrl_inb(pci_ioaddr(port)); | ||
22 | return ctrl_inw(port2adr(port)) & 0xff; | 20 | return ctrl_inw(port2adr(port)) & 0xff; |
23 | } | 21 | } |
24 | 22 | ||
@@ -28,8 +26,6 @@ u8 titan_inb_p(unsigned long port) | |||
28 | 26 | ||
29 | if (PXSEG(port)) | 27 | if (PXSEG(port)) |
30 | v = ctrl_inb(port); | 28 | v = ctrl_inb(port); |
31 | else if (is_pci_ioaddr(port)) | ||
32 | v = ctrl_inb(pci_ioaddr(port)); | ||
33 | else | 29 | else |
34 | v = ctrl_inw(port2adr(port)) & 0xff; | 30 | v = ctrl_inw(port2adr(port)) & 0xff; |
35 | ctrl_delay(); | 31 | ctrl_delay(); |
@@ -40,8 +36,6 @@ u16 titan_inw(unsigned long port) | |||
40 | { | 36 | { |
41 | if (PXSEG(port)) | 37 | if (PXSEG(port)) |
42 | return ctrl_inw(port); | 38 | return ctrl_inw(port); |
43 | else if (is_pci_ioaddr(port)) | ||
44 | return ctrl_inw(pci_ioaddr(port)); | ||
45 | else if (port >= 0x2000) | 39 | else if (port >= 0x2000) |
46 | return ctrl_inw(port2adr(port)); | 40 | return ctrl_inw(port2adr(port)); |
47 | else | 41 | else |
@@ -53,8 +47,6 @@ u32 titan_inl(unsigned long port) | |||
53 | { | 47 | { |
54 | if (PXSEG(port)) | 48 | if (PXSEG(port)) |
55 | return ctrl_inl(port); | 49 | return ctrl_inl(port); |
56 | else if (is_pci_ioaddr(port)) | ||
57 | return ctrl_inl(pci_ioaddr(port)); | ||
58 | else if (port >= 0x2000) | 50 | else if (port >= 0x2000) |
59 | return ctrl_inw(port2adr(port)); | 51 | return ctrl_inw(port2adr(port)); |
60 | else | 52 | else |
@@ -66,8 +58,6 @@ void titan_outb(u8 value, unsigned long port) | |||
66 | { | 58 | { |
67 | if (PXSEG(port)) | 59 | if (PXSEG(port)) |
68 | ctrl_outb(value, port); | 60 | ctrl_outb(value, port); |
69 | else if (is_pci_ioaddr(port)) | ||
70 | ctrl_outb(value, pci_ioaddr(port)); | ||
71 | else | 61 | else |
72 | ctrl_outw(value, port2adr(port)); | 62 | ctrl_outw(value, port2adr(port)); |
73 | } | 63 | } |
@@ -76,8 +66,6 @@ void titan_outb_p(u8 value, unsigned long port) | |||
76 | { | 66 | { |
77 | if (PXSEG(port)) | 67 | if (PXSEG(port)) |
78 | ctrl_outb(value, port); | 68 | ctrl_outb(value, port); |
79 | else if (is_pci_ioaddr(port)) | ||
80 | ctrl_outb(value, pci_ioaddr(port)); | ||
81 | else | 69 | else |
82 | ctrl_outw(value, port2adr(port)); | 70 | ctrl_outw(value, port2adr(port)); |
83 | ctrl_delay(); | 71 | ctrl_delay(); |
@@ -87,8 +75,6 @@ void titan_outw(u16 value, unsigned long port) | |||
87 | { | 75 | { |
88 | if (PXSEG(port)) | 76 | if (PXSEG(port)) |
89 | ctrl_outw(value, port); | 77 | ctrl_outw(value, port); |
90 | else if (is_pci_ioaddr(port)) | ||
91 | ctrl_outw(value, pci_ioaddr(port)); | ||
92 | else if (port >= 0x2000) | 78 | else if (port >= 0x2000) |
93 | ctrl_outw(value, port2adr(port)); | 79 | ctrl_outw(value, port2adr(port)); |
94 | else | 80 | else |
@@ -99,8 +85,6 @@ void titan_outl(u32 value, unsigned long port) | |||
99 | { | 85 | { |
100 | if (PXSEG(port)) | 86 | if (PXSEG(port)) |
101 | ctrl_outl(value, port); | 87 | ctrl_outl(value, port); |
102 | else if (is_pci_ioaddr(port)) | ||
103 | ctrl_outl(value, pci_ioaddr(port)); | ||
104 | else | 88 | else |
105 | maybebadio(port); | 89 | maybebadio(port); |
106 | } | 90 | } |
@@ -119,8 +103,6 @@ void __iomem *titan_ioport_map(unsigned long port, unsigned int size) | |||
119 | { | 103 | { |
120 | if (PXSEG(port)) | 104 | if (PXSEG(port)) |
121 | return (void __iomem *)port; | 105 | return (void __iomem *)port; |
122 | else if (is_pci_ioaddr(port)) | ||
123 | return (void __iomem *)pci_ioaddr(port); | ||
124 | 106 | ||
125 | return (void __iomem *)port2adr(port); | 107 | return (void __iomem *)port2adr(port); |
126 | } | 108 | } |