Lines Matching refs:chn
88 #define EPB_LOC(chn, elt, reg) \ argument
89 (((elt & 0xf) | ((chn & 7) << 4) | ((reg & 0x3f) << 9)) << \
140 #define IB_CTRL2(chn) (EPB_LOC(chn, 7, 3) | EPB_IB_QUAD0_CS) argument
172 #define IB_PGUDP(chn) (EPB_LOC((chn), 2, 1) | EPB_IB_QUAD0_CS) argument
173 #define IB_CMUDONE(chn) (EPB_LOC((chn), 7, 0xF) | EPB_IB_QUAD0_CS) argument
177 int ret, pat, tries, chn; in qib_resync_ibepb() local
181 chn = 0; in qib_resync_ibepb()
183 loc = IB_PGUDP(chn); in qib_resync_ibepb()
206 loc = IB_CMUDONE(chn); in qib_resync_ibepb()
212 if ((ret & 0x70) != ((chn << 4) | 0x40)) { in qib_resync_ibepb()
214 ret, chn); in qib_resync_ibepb()
217 if (++chn == 4) in qib_resync_ibepb()
306 int ret, chn, baduns; in qib_sd_trimdone_monitor() local
341 for (chn = 3; chn >= 0; --chn) { in qib_sd_trimdone_monitor()
344 IB_CTRL2(chn), 0, 0); in qib_sd_trimdone_monitor()
348 chn, where); in qib_sd_trimdone_monitor()
353 baduns |= (1 << chn); in qib_sd_trimdone_monitor()
356 chn, ret, where); in qib_sd_trimdone_monitor()
362 IB_CTRL2(chn), 0, 0); in qib_sd_trimdone_monitor()
366 IB_CTRL2(chn), 0x10, 0x10); in qib_sd_trimdone_monitor()
372 for (chn = 3; chn >= 0; --chn) { in qib_sd_trimdone_monitor()
374 if (baduns & (1 << chn)) { in qib_sd_trimdone_monitor()
377 chn, where); in qib_sd_trimdone_monitor()
379 IB_CTRL2(chn), 0x10, 0x10); in qib_sd_trimdone_monitor()
383 chn, where); in qib_sd_trimdone_monitor()