Lines Matching refs:ip
17 #define gp_write(reg, data) writel(data, ip->iomem + reg)
18 #define gp_read(reg) readl(ip->iomem + reg)
22 struct lima_ip *ip = data; in lima_gp_irq_handler() local
23 struct lima_device *dev = ip->dev; in lima_gp_irq_handler()
68 static void lima_gp_soft_reset_async(struct lima_ip *ip) in lima_gp_soft_reset_async() argument
70 if (ip->data.async_reset) in lima_gp_soft_reset_async()
76 ip->data.async_reset = true; in lima_gp_soft_reset_async()
79 static int lima_gp_soft_reset_async_wait(struct lima_ip *ip) in lima_gp_soft_reset_async_wait() argument
81 struct lima_device *dev = ip->dev; in lima_gp_soft_reset_async_wait()
85 if (!ip->data.async_reset) in lima_gp_soft_reset_async_wait()
88 err = readl_poll_timeout(ip->iomem + LIMA_GP_INT_RAWSTAT, v, in lima_gp_soft_reset_async_wait()
99 ip->data.async_reset = false; in lima_gp_soft_reset_async_wait()
130 struct lima_ip *ip = pipe->processor[0]; in lima_gp_task_run() local
160 lima_gp_soft_reset_async_wait(ip); in lima_gp_task_run()
163 writel(f[i], ip->iomem + LIMA_GP_VSCL_START_ADDR + i * 4); in lima_gp_task_run()
169 static int lima_gp_hard_reset_poll(struct lima_ip *ip) in lima_gp_hard_reset_poll() argument
175 static int lima_gp_hard_reset(struct lima_ip *ip) in lima_gp_hard_reset() argument
177 struct lima_device *dev = ip->dev; in lima_gp_hard_reset()
183 ret = lima_poll_timeout(ip, lima_gp_hard_reset_poll, 10, 100); in lima_gp_hard_reset()
202 struct lima_ip *ip = pipe->processor[0]; in lima_gp_task_error() local
204 dev_err(ip->dev->dev, "gp task error int_state=%x status=%x\n", in lima_gp_task_error()
207 lima_gp_hard_reset(ip); in lima_gp_task_error()
217 struct lima_ip *ip = pipe->processor[0]; in lima_gp_task_recover() local
245 static void lima_gp_print_version(struct lima_ip *ip) in lima_gp_print_version() argument
270 dev_info(ip->dev->dev, "%s - %s version major %d minor %d\n", in lima_gp_print_version()
271 lima_ip_name(ip), name, major, minor); in lima_gp_print_version()
277 static int lima_gp_hw_init(struct lima_ip *ip) in lima_gp_hw_init() argument
279 ip->data.async_reset = false; in lima_gp_hw_init()
280 lima_gp_soft_reset_async(ip); in lima_gp_hw_init()
281 return lima_gp_soft_reset_async_wait(ip); in lima_gp_hw_init()
284 int lima_gp_resume(struct lima_ip *ip) in lima_gp_resume() argument
286 return lima_gp_hw_init(ip); in lima_gp_resume()
289 void lima_gp_suspend(struct lima_ip *ip) in lima_gp_suspend() argument
294 int lima_gp_init(struct lima_ip *ip) in lima_gp_init() argument
296 struct lima_device *dev = ip->dev; in lima_gp_init()
299 lima_gp_print_version(ip); in lima_gp_init()
301 err = lima_gp_hw_init(ip); in lima_gp_init()
305 err = devm_request_irq(dev->dev, ip->irq, lima_gp_irq_handler, in lima_gp_init()
306 IRQF_SHARED, lima_ip_name(ip), ip); in lima_gp_init()
309 lima_ip_name(ip)); in lima_gp_init()
318 void lima_gp_fini(struct lima_ip *ip) in lima_gp_fini() argument