Lines Matching refs:thc_dev
196 struct thc_device *thc_dev; in thc_dev_init() local
199 thc_dev = devm_kzalloc(device, sizeof(*thc_dev), GFP_KERNEL); in thc_dev_init()
200 if (!thc_dev) in thc_dev_init()
203 thc_dev->dev = device; in thc_dev_init()
204 thc_dev->mmio_addr = mem_addr; in thc_dev_init()
205 thc_dev->thc_regmap = devm_regmap_init(device, NULL, thc_dev, &thc_regmap_cfg); in thc_dev_init()
206 if (IS_ERR(thc_dev->thc_regmap)) { in thc_dev_init()
207 ret = PTR_ERR(thc_dev->thc_regmap); in thc_dev_init()
212 thc_clear_state(thc_dev); in thc_dev_init()
214 mutex_init(&thc_dev->thc_bus_lock); in thc_dev_init()
215 init_waitqueue_head(&thc_dev->write_complete_wait); in thc_dev_init()
216 init_waitqueue_head(&thc_dev->swdma_complete_wait); in thc_dev_init()
218 thc_dev->dma_ctx = thc_dma_init(thc_dev); in thc_dev_init()
219 if (!thc_dev->dma_ctx) { in thc_dev_init()
224 return thc_dev; in thc_dev_init()