Lines Matching refs:thc_dev
197 struct thc_device *thc_dev; in thc_dev_init() local
200 thc_dev = devm_kzalloc(device, sizeof(*thc_dev), GFP_KERNEL); in thc_dev_init()
201 if (!thc_dev) in thc_dev_init()
204 thc_dev->dev = device; in thc_dev_init()
205 thc_dev->mmio_addr = mem_addr; in thc_dev_init()
206 thc_dev->thc_regmap = devm_regmap_init(device, NULL, thc_dev, &thc_regmap_cfg); in thc_dev_init()
207 if (IS_ERR(thc_dev->thc_regmap)) { in thc_dev_init()
208 ret = PTR_ERR(thc_dev->thc_regmap); in thc_dev_init()
213 thc_clear_state(thc_dev); in thc_dev_init()
215 mutex_init(&thc_dev->thc_bus_lock); in thc_dev_init()
216 init_waitqueue_head(&thc_dev->write_complete_wait); in thc_dev_init()
217 init_waitqueue_head(&thc_dev->swdma_complete_wait); in thc_dev_init()
219 thc_dev->dma_ctx = thc_dma_init(thc_dev); in thc_dev_init()
220 if (!thc_dev->dma_ctx) { in thc_dev_init()
225 return thc_dev; in thc_dev_init()