Lines Matching defs:port
19 port2adr(unsigned int port)
21 if (port >= 0x2000)
22 return (volatile __u16 *) (PA_MRSHPC + (port - 0x2000));
23 maybebadio((unsigned long)port);
24 return (volatile __u16*)port;
34 unsigned char sh7751systemh_inb(unsigned long port)
36 if (PXSEG(port))
37 return *(volatile unsigned char *)port;
38 else if (port <= 0x3F1)
39 return *(volatile unsigned char *)ETHER_IOMAP(port);
41 return (*port2adr(port))&0xff;
44 unsigned char sh7751systemh_inb_p(unsigned long port)
48 if (PXSEG(port))
49 v = *(volatile unsigned char *)port;
50 else if (port <= 0x3F1)
51 v = *(volatile unsigned char *)ETHER_IOMAP(port);
53 v = (*port2adr(port))&0xff;
58 unsigned short sh7751systemh_inw(unsigned long port)
60 if (PXSEG(port))
61 return *(volatile unsigned short *)port;
62 else if (port >= 0x2000)
63 return *port2adr(port);
64 else if (port <= 0x3F1)
65 return *(volatile unsigned int *)ETHER_IOMAP(port);
67 maybebadio(port);
71 unsigned int sh7751systemh_inl(unsigned long port)
73 if (PXSEG(port))
74 return *(volatile unsigned long *)port;
75 else if (port >= 0x2000)
76 return *port2adr(port);
77 else if (port <= 0x3F1)
78 return *(volatile unsigned int *)ETHER_IOMAP(port);
80 maybebadio(port);
84 void sh7751systemh_outb(unsigned char value, unsigned long port)
87 if (PXSEG(port))
88 *(volatile unsigned char *)port = value;
89 else if (port <= 0x3F1)
90 *(volatile unsigned char *)ETHER_IOMAP(port) = value;
92 *(port2adr(port)) = value;
95 void sh7751systemh_outb_p(unsigned char value, unsigned long port)
97 if (PXSEG(port))
98 *(volatile unsigned char *)port = value;
99 else if (port <= 0x3F1)
100 *(volatile unsigned char *)ETHER_IOMAP(port) = value;
102 *(port2adr(port)) = value;
106 void sh7751systemh_outw(unsigned short value, unsigned long port)
108 if (PXSEG(port))
109 *(volatile unsigned short *)port = value;
110 else if (port >= 0x2000)
111 *port2adr(port) = value;
112 else if (port <= 0x3F1)
113 *(volatile unsigned short *)ETHER_IOMAP(port) = value;
115 maybebadio(port);
118 void sh7751systemh_outl(unsigned int value, unsigned long port)
120 if (PXSEG(port))
121 *(volatile unsigned long *)port = value;
123 maybebadio(port);
126 void sh7751systemh_insb(unsigned long port, void *addr, unsigned long count)
129 while (count--) *p++ = sh7751systemh_inb(port);
132 void sh7751systemh_insw(unsigned long port, void *addr, unsigned long count)
135 while (count--) *p++ = sh7751systemh_inw(port);
138 void sh7751systemh_insl(unsigned long port, void *addr, unsigned long count)
140 maybebadio(port);
143 void sh7751systemh_outsb(unsigned long port, const void *addr, unsigned long count)
146 while (count--) sh7751systemh_outb(*p++, port);
149 void sh7751systemh_outsw(unsigned long port, const void *addr, unsigned long count)
152 while (count--) sh7751systemh_outw(*p++, port);
155 void sh7751systemh_outsl(unsigned long port, const void *addr, unsigned long count)
157 maybebadio(port);