Lines Matching defs:atp

47 static inline void atp_writeb_base(struct atp_unit *atp, u8 reg, u8 val)
49 outb(val, atp->baseport + reg);
52 static inline void atp_writew_base(struct atp_unit *atp, u8 reg, u16 val)
54 outw(val, atp->baseport + reg);
57 static inline void atp_writeb_io(struct atp_unit *atp, u8 channel, u8 reg, u8 val)
59 outb(val, atp->ioport[channel] + reg);
62 static inline void atp_writew_io(struct atp_unit *atp, u8 channel, u8 reg, u16 val)
64 outw(val, atp->ioport[channel] + reg);
67 static inline void atp_writeb_pci(struct atp_unit *atp, u8 channel, u8 reg, u8 val)
69 outb(val, atp->pciport[channel] + reg);
72 static inline void atp_writel_pci(struct atp_unit *atp, u8 channel, u8 reg, u32 val)
74 outl(val, atp->pciport[channel] + reg);
77 static inline u8 atp_readb_base(struct atp_unit *atp, u8 reg)
79 return inb(atp->baseport + reg);
82 static inline u16 atp_readw_base(struct atp_unit *atp, u8 reg)
84 return inw(atp->baseport + reg);
87 static inline u32 atp_readl_base(struct atp_unit *atp, u8 reg)
89 return inl(atp->baseport + reg);
92 static inline u8 atp_readb_io(struct atp_unit *atp, u8 channel, u8 reg)
94 return inb(atp->ioport[channel] + reg);
97 static inline u16 atp_readw_io(struct atp_unit *atp, u8 channel, u8 reg)
99 return inw(atp->ioport[channel] + reg);
102 static inline u8 atp_readb_pci(struct atp_unit *atp, u8 channel, u8 reg)
104 return inb(atp->pciport[channel] + reg);
107 static inline bool is880(struct atp_unit *atp)
109 return atp->pdev->device == ATP880_DEVID1 ||
110 atp->pdev->device == ATP880_DEVID2;
113 static inline bool is885(struct atp_unit *atp)
115 return atp->pdev->device == ATP885_DEVID;
1240 static void atp_set_host_id(struct atp_unit *atp, u8 c, u8 host_id)
1242 atp_writeb_io(atp, c, 0, host_id | 0x08);
1243 atp_writeb_io(atp, c, 0x18, 0);
1244 while ((atp_readb_io(atp, c, 0x1f) & 0x80) == 0)
1246 atp_readb_io(atp, c, 0x17);
1247 atp_writeb_io(atp, c, 1, 8);
1248 atp_writeb_io(atp, c, 2, 0x7f);
1249 atp_writeb_io(atp, c, 0x11, 0x20);