Lines Matching full:ca

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