Lines Matching refs:desc
163 struct ismt_desc *desc; member
229 struct ismt_desc *desc; in ismt_alloc_desc() local
235 desc = &sc->desc[sc->head++]; in ismt_alloc_desc()
239 memset(desc, 0, sizeof(*desc)); in ismt_alloc_desc()
241 return (desc); in ismt_alloc_desc()
245 ismt_submit(struct ismt_softc *sc, struct ismt_desc *desc, uint8_t slave, in ismt_submit() argument
250 desc->control |= ISMT_DESC_FAIR; in ismt_submit()
252 desc->control |= ISMT_DESC_INT; in ismt_submit()
254 desc->tgtaddr_rw = ISMT_DESC_ADDR_RW(slave, is_read); in ismt_submit()
255 desc->dptr_low = (sc->dma_buffer_bus_addr & 0xFFFFFFFFLL); in ismt_submit()
256 desc->dptr_high = (sc->dma_buffer_bus_addr >> 32); in ismt_submit()
278 ISMT_DEBUG(sc->pcidev, "%s status=0x%x\n", __func__, desc->status); in ismt_submit()
280 if (desc->status & ISMT_DESC_SCS) in ismt_submit()
283 if (desc->status & ISMT_DESC_NAK) in ismt_submit()
286 if (desc->status & ISMT_DESC_CRC) in ismt_submit()
289 if (desc->status & ISMT_DESC_COL) in ismt_submit()
292 if (desc->status & ISMT_DESC_LPR) in ismt_submit()
295 if (desc->status & (ISMT_DESC_DLTO | ISMT_DESC_CLTO)) in ismt_submit()
305 struct ismt_desc *desc; in ismt_quick() local
316 desc = ismt_alloc_desc(sc); in ismt_quick()
318 return (ismt_submit(sc, desc, slave, is_read)); in ismt_quick()
324 struct ismt_desc *desc; in ismt_sendb() local
330 desc = ismt_alloc_desc(sc); in ismt_sendb()
331 desc->control = ISMT_DESC_CWRL; in ismt_sendb()
332 desc->wr_len_cmd = byte; in ismt_sendb()
334 return (ismt_submit(sc, desc, slave, 0)); in ismt_sendb()
340 struct ismt_desc *desc; in ismt_recvb() local
347 desc = ismt_alloc_desc(sc); in ismt_recvb()
348 desc->rd_len = 1; in ismt_recvb()
350 err = ismt_submit(sc, desc, slave, 1); in ismt_recvb()
363 struct ismt_desc *desc; in ismt_writeb() local
369 desc = ismt_alloc_desc(sc); in ismt_writeb()
370 desc->wr_len_cmd = 2; in ismt_writeb()
374 return (ismt_submit(sc, desc, slave, 0)); in ismt_writeb()
380 struct ismt_desc *desc; in ismt_writew() local
386 desc = ismt_alloc_desc(sc); in ismt_writew()
387 desc->wr_len_cmd = 3; in ismt_writew()
392 return (ismt_submit(sc, desc, slave, 0)); in ismt_writew()
398 struct ismt_desc *desc; in ismt_readb() local
405 desc = ismt_alloc_desc(sc); in ismt_readb()
406 desc->control = ISMT_DESC_CWRL; in ismt_readb()
407 desc->wr_len_cmd = cmd; in ismt_readb()
408 desc->rd_len = 1; in ismt_readb()
410 err = ismt_submit(sc, desc, slave, 1); in ismt_readb()
423 struct ismt_desc *desc; in ismt_readw() local
430 desc = ismt_alloc_desc(sc); in ismt_readw()
431 desc->control = ISMT_DESC_CWRL; in ismt_readw()
432 desc->wr_len_cmd = cmd; in ismt_readw()
433 desc->rd_len = 2; in ismt_readw()
435 err = ismt_submit(sc, desc, slave, 1); in ismt_readw()
448 struct ismt_desc *desc; in ismt_pcall() local
455 desc = ismt_alloc_desc(sc); in ismt_pcall()
456 desc->wr_len_cmd = 3; in ismt_pcall()
457 desc->rd_len = 2; in ismt_pcall()
462 err = ismt_submit(sc, desc, slave, 0); in ismt_pcall()
475 struct ismt_desc *desc; in ismt_bwrite() local
484 desc = ismt_alloc_desc(sc); in ismt_bwrite()
485 desc->control = ISMT_DESC_I2C; in ismt_bwrite()
486 desc->wr_len_cmd = count + 1; in ismt_bwrite()
490 return (ismt_submit(sc, desc, slave, 0)); in ismt_bwrite()
496 struct ismt_desc *desc; in ismt_bread() local
506 desc = ismt_alloc_desc(sc); in ismt_bread()
507 desc->control = ISMT_DESC_I2C | ISMT_DESC_CWRL; in ismt_bread()
508 desc->wr_len_cmd = cmd; in ismt_bread()
509 desc->rd_len = *count; in ismt_bread()
511 err = ismt_submit(sc, desc, slave, 0); in ismt_bread()
516 memcpy(buf, sc->dma_buffer, desc->rxbytes); in ismt_bread()
517 *count = desc->rxbytes; in ismt_bread()
558 bus_dmamem_free(sc->desc_dma_tag, sc->desc, in ismt_detach()
632 (void **)&sc->desc, BUS_DMA_WAITOK, in ismt_attach()
639 sc->desc_dma_map, sc->desc, DESC_SIZE, in ismt_attach()
722 const char *desc; in ismt_probe() local
726 desc = "Atom Processor S1200 SMBus 2.0 Controller 0"; in ismt_probe()
729 desc = "Atom Processor S1200 SMBus 2.0 Controller 1"; in ismt_probe()
732 desc = "Atom Processor C2000 SMBus 2.0"; in ismt_probe()
735 desc = "Atom Processor C3000 SMBus 2.0"; in ismt_probe()
741 device_set_desc(dev, desc); in ismt_probe()