Пример #1
0
u8 titan_inb(unsigned long port)
{
        if (PXSEG(port))
                return ctrl_inb(port);
        else if (is_pci_ioaddr(port))
                return ctrl_inb(pci_ioaddr(port));
        return ctrl_inw(port2adr(port)) & 0xff;
}
Пример #2
0
void __iomem *titan_ioport_map(unsigned long port, unsigned int size)
{
	if (PXSEG(port) || is_pci_memaddr(port))
		return (void __iomem *)port;
	else if (is_pci_ioaddr(port))
		return (void __iomem *)pci_ioaddr(port);

	return (void __iomem *)port2adr(port);
}
Пример #3
0
void titan_outb(u8 value, unsigned long port)
{
        if (PXSEG(port))
                ctrl_outb(value, port);
        else if (is_pci_ioaddr(port))
                ctrl_outb(value, pci_ioaddr(port));
        else
                ctrl_outw(value, port2adr(port));
}
Пример #4
0
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);
}
Пример #5
0
void sh7751systemh_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);
}
Пример #6
0
void titan_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);
}
Пример #7
0
/*
 * General outline: remap really low stuff [eventually] to SuperIO,
 * stuff in PCI IO space (at or above window at pci.h:PCIBIOS_MIN_IO)
 * is mapped through the PCI IO window.  Stuff with high bits (PXSEG)
 * should be way beyond the window, and is used  w/o translation for
 * compatibility.
 */
unsigned char sh7751se_inb(unsigned long port)
{
	if (PXSEG(port))
		return *(volatile unsigned char *)port;
	else if (is_pci_ioaddr(port))
		return *(volatile unsigned char *)pci_ioaddr(port);
	else
		return (*port2adr(port)) & 0xff;
}
Пример #8
0
void landisk_outw(u16 value, unsigned long port)
{
	if (PXSEG(port))
		ctrl_outw(value, port);
	else if (is_pci_ioaddr(port))
		ctrl_outw(value, pci_ioaddr(port));
	else
		maybebadio(port);
}
Пример #9
0
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;
}
Пример #10
0
void sh7751se_outb_p(unsigned char value, unsigned long port)
{
        if (PXSEG(port))
                *(volatile unsigned char *)port = value;
	else if (is_pci_ioaddr(port))
		*((unsigned char*)pci_ioaddr(port)) = value;
	else
		*(port2adr(port)) = value;
	ctrl_delay();
}
Пример #11
0
void landisk_outb_p(u8 value, unsigned long port)
{
	if (PXSEG(port))
		ctrl_outb(value, port);
	else if (is_pci_ioaddr(port))
		ctrl_outb(value, pci_ioaddr(port));
	else
		ctrl_outw(value, port2adr(port));
	ctrl_delay();
}
Пример #12
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);
}
Пример #13
0
/*
 * General outline: remap really low stuff [eventually] to SuperIO,
 * stuff in PCI IO space (at or above window at pci.h:PCIBIOS_MIN_IO)
 * is mapped through the PCI IO window.  Stuff with high bits (PXSEG)
 * should be way beyond the window, and is used  w/o translation for
 * compatibility.
 */
unsigned char hs7751rvoip_inb(unsigned long port)
{
	if (PXSEG(port))
		return ctrl_inb(port);
	else if (codec_port(port))
		return ctrl_inb(CODEC_IOMAP(port));
	else if (is_pci_ioaddr(port) || shifted_port(port))
		return ctrl_inb(pci_ioaddr(port));
	else
		return ctrl_inw(port2adr(port)) & 0xff;
}
Пример #14
0
void __iomem *hs7751rvoip_ioport_map(unsigned long port, unsigned int size)
{
        if (PXSEG(port))
                return (void __iomem *)port;
	else if (unlikely(codec_port(port) && (size == 1)))
		return (void __iomem *)CODEC_IOMAP(port);
        else if (is_pci_ioaddr(port))
                return (void __iomem *)pci_ioaddr(port);

        return (void __iomem *)port2adr(port);
}
Пример #15
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);
}
Пример #16
0
Файл: io.c Проект: ivucica/linux
/*
 * General outline: remap really low stuff [eventually] to SuperIO,
 * stuff in PCI IO space (at or above window at pci.h:PCIBIOS_MIN_IO)
 * is mapped through the PCI IO window.  Stuff with high bits (PXSEG)
 * should be way beyond the window, and is used  w/o translation for
 * compatibility.
 */
unsigned char rts7751r2d_inb(unsigned long port)
{
	if (CHECK_AX88796L_PORT(port))
		return (*(volatile unsigned short *)port88796l(port, 0)) & 0xff;
	else if (PXSEG(port))
		return *(volatile unsigned char *)port;
	else if (is_pci_ioaddr(port) || shifted_port(port))
		return *(volatile unsigned char *)pci_ioaddr(port);
	else
		return (*(volatile unsigned short *)port2adr(port) & 0xff);
}
Пример #17
0
Файл: io.c Проект: ivucica/linux
void rts7751r2d_outb(unsigned char value, unsigned long port)
{
	if (CHECK_AX88796L_PORT(port))
		*((volatile unsigned short *)port88796l(port, 0)) = value;
        else if (PXSEG(port))
		*(volatile unsigned char *)port = value;
	else if (is_pci_ioaddr(port) || shifted_port(port))
		*(volatile unsigned char *)pci_ioaddr(port) = value;
	else
		*(volatile unsigned short *)port2adr(port) = value;
}
Пример #18
0
/*
 * General outline: remap really low stuff [eventually] to SuperIO,
 * stuff in PCI IO space (at or above window at pci.h:PCIBIOS_MIN_IO)
 * is mapped through the PCI IO window.  Stuff with high bits (PXSEG)
 * should be way beyond the window, and is used  w/o translation for
 * compatibility.
 */
unsigned char sh7751systemh_inb(unsigned long port)
{
	if (PXSEG(port))
		return *(volatile unsigned char *)port;
	else if (is_pci_ioaddr(port))
		return *(volatile unsigned char *)pci_ioaddr(port);
	else if (port <= 0x3F1)
		return *(volatile unsigned char *)ETHER_IOMAP(port);
	else
		return (*port2adr(port))&0xff;
}
Пример #19
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;
}
Пример #20
0
void titan_outw(u16 value, unsigned long port)
{
        if (PXSEG(port))
                ctrl_outw(value, port);
        else if (is_pci_ioaddr(port))
                ctrl_outw(value, pci_ioaddr(port));
        else if (port >= 0x2000)
                ctrl_outw(value, port2adr(port));
        else
                maybebadio(port);
}
Пример #21
0
void sh7751systemh_outb(unsigned char value, unsigned long port)
{

        if (PXSEG(port))
                *(volatile unsigned char *)port = value;
	else if (is_pci_ioaddr(port))
		*((unsigned char*)pci_ioaddr(port)) = value;
	else if (port <= 0x3F1)
		*(volatile unsigned char *)ETHER_IOMAP(port) = value;
	else
		*(port2adr(port)) = value;
}
Пример #22
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;
}
Пример #23
0
void hs7751rvoip_outb(unsigned char value, unsigned long port)
{

        if (PXSEG(port))
		ctrl_outb(value, port);
	else if (codec_port(port))
		ctrl_outb(value, CODEC_IOMAP(port));
	else if (is_pci_ioaddr(port) || shifted_port(port))
		ctrl_outb(value, pci_ioaddr(port));
	else
		ctrl_outb(value, port2adr(port));
}
Пример #24
0
u32 titan_inl(unsigned long port)
{
        if (PXSEG(port))
                return ctrl_inl(port);
        else if (is_pci_ioaddr(port))
                return ctrl_inl(pci_ioaddr(port));
        else if (port >= 0x2000)
                return ctrl_inw(port2adr(port));
        else
                maybebadio(port);
        return 0;
}
Пример #25
0
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);
}
Пример #26
0
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);
}
Пример #27
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);
}
Пример #28
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);
}
Пример #29
0
unsigned char sh7751se_inb_p(unsigned long port)
{
	unsigned char v;

        if (PXSEG(port))
                v = *(volatile unsigned char *)port;
	else if (is_pci_ioaddr(port))
                v = *(volatile unsigned char *)pci_ioaddr(port);
	else
		v = (*port2adr(port)) & 0xff;
	ctrl_delay();
	return v;
}
Пример #30
0
u8 titan_inb_p(unsigned long port)
{
        u8 v;

        if (PXSEG(port))
                v = ctrl_inb(port);
        else if (is_pci_ioaddr(port))
                v = ctrl_inb(pci_ioaddr(port));
        else
                v = ctrl_inw(port2adr(port)) & 0xff;
        ctrl_delay();
        return v;
}