Lines Matching refs:pt

117 static inline void pt_core_disable_queue_interrupts(struct pt_device *pt)  in pt_core_disable_queue_interrupts()  argument
119 iowrite32(0, pt->cmd_q.reg_control + 0x000C); in pt_core_disable_queue_interrupts()
122 static inline void pt_core_enable_queue_interrupts(struct pt_device *pt) in pt_core_enable_queue_interrupts() argument
124 iowrite32(SUPPORTED_INTERRUPTS, pt->cmd_q.reg_control + 0x000C); in pt_core_enable_queue_interrupts()
131 struct pt_cmd_queue *cmd_q = &cmd->pt->cmd_q; in pt_do_cmd_complete()
140 pt_log_error(cmd_q->pt, cmd_q->cmd_error); in pt_do_cmd_complete()
149 struct pt_device *pt = data; in pt_core_irq_handler() local
150 struct pt_cmd_queue *cmd_q = &pt->cmd_q; in pt_core_irq_handler()
153 pt_core_disable_queue_interrupts(pt); in pt_core_irq_handler()
154 pt->total_interrupts++; in pt_core_irq_handler()
167 pt_core_enable_queue_interrupts(pt); in pt_core_irq_handler()
168 pt_do_cmd_complete((ulong)&pt->tdata); in pt_core_irq_handler()
173 int pt_core_init(struct pt_device *pt) in pt_core_init() argument
176 struct pt_cmd_queue *cmd_q = &pt->cmd_q; in pt_core_init()
178 struct device *dev = pt->dev; in pt_core_init()
183 snprintf(dma_pool_name, sizeof(dma_pool_name), "%s_q", dev_name(pt->dev)); in pt_core_init()
192 iowrite32(CMD_CONFIG_VHB_EN, pt->io_regs + CMD_CONFIG_OFFSET); in pt_core_init()
193 iowrite32(CMD_QUEUE_PRIO, pt->io_regs + CMD_QUEUE_PRIO_OFFSET); in pt_core_init()
194 iowrite32(CMD_TIMEOUT_DISABLE, pt->io_regs + CMD_TIMEOUT_OFFSET); in pt_core_init()
195 iowrite32(CMD_CLK_GATE_CONFIG, pt->io_regs + CMD_CLK_GATE_CTL_OFFSET); in pt_core_init()
196 iowrite32(CMD_CONFIG_REQID, pt->io_regs + CMD_REQID_CONFIG_OFFSET); in pt_core_init()
198 cmd_q->pt = pt; in pt_core_init()
216 cmd_q->reg_control = pt->io_regs + CMD_Q_STATUS_INCR; in pt_core_init()
219 pt_core_disable_queue_interrupts(pt); in pt_core_init()
231 ret = request_irq(pt->pt_irq, pt_core_irq_handler, 0, dev_name(pt->dev), pt); in pt_core_init()
248 pt_core_enable_queue_interrupts(pt); in pt_core_init()
251 ret = pt_dmaengine_register(pt); in pt_core_init()
256 ptdma_debugfs_setup(pt); in pt_core_init()
261 free_irq(pt->pt_irq, pt); in pt_core_init()
268 dma_pool_destroy(pt->cmd_q.dma_pool); in pt_core_init()
273 void pt_core_destroy(struct pt_device *pt) in pt_core_destroy() argument
275 struct device *dev = pt->dev; in pt_core_destroy()
276 struct pt_cmd_queue *cmd_q = &pt->cmd_q; in pt_core_destroy()
280 pt_dmaengine_unregister(pt); in pt_core_destroy()
283 pt_core_disable_queue_interrupts(pt); in pt_core_destroy()
293 free_irq(pt->pt_irq, pt); in pt_core_destroy()
299 while (!list_empty(&pt->cmd)) { in pt_core_destroy()
301 cmd = list_first_entry(&pt->cmd, struct pt_cmd, entry); in pt_core_destroy()