Lines Matching refs:atp

48 static inline void atp_writeb_base(struct atp_unit *atp, u8 reg, u8 val)  in atp_writeb_base()  argument
50 outb(val, atp->baseport + reg); in atp_writeb_base()
53 static inline void atp_writew_base(struct atp_unit *atp, u8 reg, u16 val) in atp_writew_base() argument
55 outw(val, atp->baseport + reg); in atp_writew_base()
58 static inline void atp_writeb_io(struct atp_unit *atp, u8 channel, u8 reg, u8 val) in atp_writeb_io() argument
60 outb(val, atp->ioport[channel] + reg); in atp_writeb_io()
63 static inline void atp_writew_io(struct atp_unit *atp, u8 channel, u8 reg, u16 val) in atp_writew_io() argument
65 outw(val, atp->ioport[channel] + reg); in atp_writew_io()
68 static inline void atp_writeb_pci(struct atp_unit *atp, u8 channel, u8 reg, u8 val) in atp_writeb_pci() argument
70 outb(val, atp->pciport[channel] + reg); in atp_writeb_pci()
73 static inline void atp_writel_pci(struct atp_unit *atp, u8 channel, u8 reg, u32 val) in atp_writel_pci() argument
75 outl(val, atp->pciport[channel] + reg); in atp_writel_pci()
78 static inline u8 atp_readb_base(struct atp_unit *atp, u8 reg) in atp_readb_base() argument
80 return inb(atp->baseport + reg); in atp_readb_base()
83 static inline u16 atp_readw_base(struct atp_unit *atp, u8 reg) in atp_readw_base() argument
85 return inw(atp->baseport + reg); in atp_readw_base()
88 static inline u32 atp_readl_base(struct atp_unit *atp, u8 reg) in atp_readl_base() argument
90 return inl(atp->baseport + reg); in atp_readl_base()
93 static inline u8 atp_readb_io(struct atp_unit *atp, u8 channel, u8 reg) in atp_readb_io() argument
95 return inb(atp->ioport[channel] + reg); in atp_readb_io()
98 static inline u16 atp_readw_io(struct atp_unit *atp, u8 channel, u8 reg) in atp_readw_io() argument
100 return inw(atp->ioport[channel] + reg); in atp_readw_io()
103 static inline u8 atp_readb_pci(struct atp_unit *atp, u8 channel, u8 reg) in atp_readb_pci() argument
105 return inb(atp->pciport[channel] + reg); in atp_readb_pci()
108 static inline bool is880(struct atp_unit *atp) in is880() argument
110 return atp->pdev->device == ATP880_DEVID1 || in is880()
111 atp->pdev->device == ATP880_DEVID2; in is880()
114 static inline bool is885(struct atp_unit *atp) in is885() argument
116 return atp->pdev->device == ATP885_DEVID; in is885()
1293 static void atp_set_host_id(struct atp_unit *atp, u8 c, u8 host_id) in atp_set_host_id() argument
1295 atp_writeb_io(atp, c, 0, host_id | 0x08); in atp_set_host_id()
1296 atp_writeb_io(atp, c, 0x18, 0); in atp_set_host_id()
1297 while ((atp_readb_io(atp, c, 0x1f) & 0x80) == 0) in atp_set_host_id()
1299 atp_readb_io(atp, c, 0x17); in atp_set_host_id()
1300 atp_writeb_io(atp, c, 1, 8); in atp_set_host_id()
1301 atp_writeb_io(atp, c, 2, 0x7f); in atp_set_host_id()
1302 atp_writeb_io(atp, c, 0x11, 0x20); in atp_set_host_id()