示例#1
0
文件: io.c 项目: ivucica/linux
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);
}
示例#2
0
文件: io.c 项目: ivucica/linux
unsigned int rts7751r2d_inl(unsigned long port)
{
	if (CHECK_AX88796L_PORT(port))
		maybebadio(port);
        else if (PXSEG(port))
		return *(volatile unsigned long *)port;
	else if (is_pci_ioaddr(port) || shifted_port(port))
		return *(volatile unsigned long *)pci_ioaddr(port);
	else
		maybebadio(port);

	return 0;
}
示例#3
0
文件: io.c 项目: ivucica/linux
void rts7751r2d_outsl(unsigned long port, const void *addr, unsigned long count)
{
	if (CHECK_AX88796L_PORT(port))
		maybebadio(port);
	else if (is_pci_ioaddr(port) || shifted_port(port)) {
		unsigned long a = (unsigned long)addr;

		while (count--) {
			ctrl_outl(ctrl_inl(a), pci_ioaddr(port));
			a += 4;
		}
	} else
		maybebadio(port);
}
示例#4
0
void sh7751systemh_outl(unsigned int value, unsigned long port)
{
        if (PXSEG(port))
                *(volatile unsigned long *)port = value;
	else
		maybebadio(port);
}
示例#5
0
static inline volatile u16 *port2adr(unsigned int port)
{
	if (port >= 0x2000)
		return (volatile __u16 *) (PA_MRSHPC + (port - 0x2000));
	maybebadio((unsigned long)port);
	return (volatile __u16*)port;
}
示例#6
0
void snapgear_outl(unsigned int value, unsigned long port)
{
	if (PXSEG(port))
		*(volatile unsigned long *)port = value;
	else
		maybebadio(port);
}
示例#7
0
void titan_outl(u32 value, unsigned long port)
{
        if (PXSEG(port))
                ctrl_outl(value, port);
        else
                maybebadio(port);
}
示例#8
0
void sh7751se_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);
}
示例#9
0
void titan_outw(u16 value, unsigned long port)
{
        if (PXSEG(port))
                ctrl_outw(value, port);
        else if (port >= 0x2000)
                ctrl_outw(value, port2adr(port));
        else
                maybebadio(port);
}
示例#10
0
void snapgear_outw(unsigned short value, unsigned long port)
{
	if (PXSEG(port))
		*(volatile unsigned short *)port = value;
	else if (port >= 0x2000)
		*port2adr(port) = value;
	else
		maybebadio(port);
}
示例#11
0
void landisk_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);
}
示例#12
0
文件: io.c 项目: 3sOx/asuswrt-merlin
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);
}
示例#13
0
文件: io.c 项目: 3sOx/asuswrt-merlin
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;
}
示例#14
0
u32 titan_inl(unsigned long port)
{
        if (PXSEG(port))
                return ctrl_inl(port);
        else if (port >= 0x2000)
                return ctrl_inw(port2adr(port));
        else
                maybebadio(port);
        return 0;
}
示例#15
0
unsigned int snapgear_inl(unsigned long port)
{
	if (PXSEG(port))
		return *(volatile unsigned long *)port;
	else if (port >= 0x2000)
		return *port2adr(port);
	else
		maybebadio(port);
	return 0;
}
示例#16
0
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);
}
示例#17
0
void sh7751systemh_outw(unsigned short value, unsigned long port)
{
        if (PXSEG(port))
                *(volatile unsigned short *)port = value;
	else if (port >= 0x2000)
		*port2adr(port) = value;
	else if (port <= 0x3F1)
		*(volatile unsigned short *)ETHER_IOMAP(port) = value;
	else
		maybebadio(port);
}
示例#18
0
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;
}
示例#19
0
文件: io.c 项目: E-LLP/n900
/* Map the Ethernet addresses as if it is at 0x300 - 0x320 */
unsigned long sh_edosk7705_isa_port2addr(unsigned long port)
{
     if (port >= 0x300 && port < 0x320) {
	  /* SMC91C96 registers are 4 byte aligned rather than the
	   * usual 2 byte!
	   */
	  return SMC_IOADDR + ( (port - 0x300) * 2);
     }

     maybebadio(sh_edosk7705_isa_port2addr, port);
     return port;
}
示例#20
0
文件: io.c 项目: 3sOx/asuswrt-merlin
u16 titan_inw(unsigned long port)
{
        if (PXSEG(port))
                return ctrl_inw(port);
        else if (is_pci_ioaddr(port))
                return ctrl_inw(pci_ioaddr(port));
        else if (port >= 0x2000)
                return ctrl_inw(port2adr(port));
        else
                maybebadio(port);
        return 0;
}
示例#21
0
unsigned int sh7751systemh_inl(unsigned long port)
{
        if (PXSEG(port))
                return *(volatile unsigned long *)port;
	else if (port >= 0x2000)
		return *port2adr(port);
	else if (port <= 0x3F1)
		return *(volatile unsigned int *)ETHER_IOMAP(port);
	else
		maybebadio(port);
	return 0;
}
示例#22
0
文件: io.c 项目: ivucica/linux
static inline unsigned long port2adr(unsigned int port)
{
	if ((0x1f0 <= port && port < 0x1f8) || port == 0x3f6)
		if (port == 0x3f6)
			return (PA_AREA5_IO + 0x80c);
		else
			return (PA_AREA5_IO + 0x1000 + ((port-0x1f0) << 1));
	else
		maybebadio((unsigned long)port);

	return port;
}
示例#23
0
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;
}
示例#24
0
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);
}
示例#25
0
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);
}
示例#26
0
文件: io.c 项目: 3sOx/asuswrt-merlin
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);
}
示例#27
0
文件: io.c 项目: 3sOx/asuswrt-merlin
static inline unsigned long port2adr(unsigned int port)
{
	if ((0x1f0 <= port && port < 0x1f8) || port == 0x3f6)
		if (port == 0x3f6)
			return ((unsigned long)area5_io16_base + 0x0c);
		else
			return ((unsigned long)area5_io16_base + 0x800 +
				((port-0x1f0) << 1));
	else
		maybebadio((unsigned long)port);
	return port;
}
示例#28
0
文件: io.c 项目: 3sOx/asuswrt-merlin
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);
}
示例#29
0
static inline unsigned long port2adr(unsigned int port)
{
	if ((0x1f0 <= port && port < 0x1f8) || port == 0x3f6)
		if (port == 0x3f6)
			return ((unsigned long)area5_io_base + 0x2c);
		else
			return ((unsigned long)area5_io_base + PA_PIDE_OFFSET +
				((port - 0x1f0) << 1));
	else if ((0x170 <= port && port < 0x178) || port == 0x376)
		if (port == 0x376)
			return ((unsigned long)area6_io_base + 0x2c);
		else
			return ((unsigned long)area6_io_base + PA_SIDE_OFFSET +
				((port - 0x170) << 1));
	else
		maybebadio((unsigned long)port);

	return port;
}
示例#30
0
void sh7751systemh_outsl(unsigned long port, const void *addr, unsigned long count)
{
	maybebadio(port);
}