Lines Matching refs:atp

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