Lines Matching defs:ca

30 static int mantis_hif_sbuf_opdone_wait(struct mantis_ca *ca)
32 struct mantis_pci *mantis = ca->ca_priv;
35 if (wait_event_timeout(ca->hif_opdone_wq,
36 ca->hif_event & MANTIS_SBUF_OPDONE,
43 ca->hif_event &= ~MANTIS_SBUF_OPDONE;
47 static int mantis_hif_write_wait(struct mantis_ca *ca)
49 struct mantis_pci *mantis = ca->ca_priv;
53 if (wait_event_timeout(ca->hif_write_wq,
77 int mantis_hif_read_mem(struct mantis_ca *ca, u32 addr)
79 struct mantis_pci *mantis = ca->ca_priv;
83 mutex_lock(&ca->ca_lock);
94 if (mantis_hif_sbuf_opdone_wait(ca) != 0) {
96 mutex_unlock(&ca->ca_lock);
100 mutex_unlock(&ca->ca_lock);
105 int mantis_hif_write_mem(struct mantis_ca *ca, u32 addr, u8 data)
107 struct mantis_slot *slot = ca->slot;
108 struct mantis_pci *mantis = ca->ca_priv;
112 mutex_lock(&ca->ca_lock);
123 if (mantis_hif_write_wait(ca) != 0) {
125 mutex_unlock(&ca->ca_lock);
129 mutex_unlock(&ca->ca_lock);
134 int mantis_hif_read_iom(struct mantis_ca *ca, u32 addr)
136 struct mantis_pci *mantis = ca->ca_priv;
140 mutex_lock(&ca->ca_lock);
151 if (mantis_hif_sbuf_opdone_wait(ca) != 0) {
153 mutex_unlock(&ca->ca_lock);
159 mutex_unlock(&ca->ca_lock);
164 int mantis_hif_write_iom(struct mantis_ca *ca, u32 addr, u8 data)
166 struct mantis_pci *mantis = ca->ca_priv;
170 mutex_lock(&ca->ca_lock);
180 if (mantis_hif_write_wait(ca) != 0) {
182 mutex_unlock(&ca->ca_lock);
186 mutex_unlock(&ca->ca_lock);
192 int mantis_hif_init(struct mantis_ca *ca)
194 struct mantis_slot *slot = ca->slot;
195 struct mantis_pci *mantis = ca->ca_priv;
201 mutex_lock(&ca->ca_lock);
211 mutex_unlock(&ca->ca_lock);
216 void mantis_hif_exit(struct mantis_ca *ca)
218 struct mantis_pci *mantis = ca->ca_priv;
222 mutex_lock(&ca->ca_lock);
226 mutex_unlock(&ca->ca_lock);