Lines Matching +full:host +full:- +full:id
1 // SPDX-License-Identifier: GPL-2.0-only
6 * Copyright (c) 2010-2013, NVIDIA Corporation.
18 struct host1x *host = dev_id; in syncpt_thresh_isr() local
20 unsigned int i, id; in syncpt_thresh_isr() local
22 for (i = 0; i < DIV_ROUND_UP(host->info->nb_pts, 32); i++) { in syncpt_thresh_isr()
23 reg = host1x_sync_readl(host, in syncpt_thresh_isr()
26 host1x_sync_writel(host, reg, in syncpt_thresh_isr()
28 host1x_sync_writel(host, reg, in syncpt_thresh_isr()
31 for_each_set_bit(id, ®, 32) in syncpt_thresh_isr()
32 host1x_intr_handle_interrupt(host, i * 32 + id); in syncpt_thresh_isr()
38 static void host1x_intr_disable_all_syncpt_intrs(struct host1x *host) in host1x_intr_disable_all_syncpt_intrs() argument
42 for (i = 0; i < DIV_ROUND_UP(host->info->nb_pts, 32); ++i) { in host1x_intr_disable_all_syncpt_intrs()
43 host1x_sync_writel(host, 0xffffffffu, in host1x_intr_disable_all_syncpt_intrs()
45 host1x_sync_writel(host, 0xffffffffu, in host1x_intr_disable_all_syncpt_intrs()
50 static void intr_hw_init(struct host1x *host, u32 cpm) in intr_hw_init() argument
54 host1x_sync_writel(host, 0, HOST1X_SYNC_IP_BUSY_TIMEOUT); in intr_hw_init()
57 * increase the auto-ack timout to the maximum value. 2d will hang in intr_hw_init()
60 host1x_sync_writel(host, 0xff, HOST1X_SYNC_CTXSW_TIMEOUT_CFG); in intr_hw_init()
62 /* update host clocks per usec */ in intr_hw_init()
63 host1x_sync_writel(host, cpm, HOST1X_SYNC_USEC_CLK); in intr_hw_init()
66 u32 id; in intr_hw_init() local
73 for (id = 0; id < host->info->nb_pts; id++) in intr_hw_init()
74 host1x_sync_writel(host, 0, HOST1X_SYNC_SYNCPT_INTR_DEST(id)); in intr_hw_init()
79 host1x_intr_init_host_sync(struct host1x *host, u32 cpm) in host1x_intr_init_host_sync() argument
83 host1x_hw_intr_disable_all_syncpt_intrs(host); in host1x_intr_init_host_sync()
85 err = devm_request_irq(host->dev, host->syncpt_irq, in host1x_intr_init_host_sync()
87 "host1x_syncpt", host); in host1x_intr_init_host_sync()
91 intr_hw_init(host, cpm); in host1x_intr_init_host_sync()
96 static void host1x_intr_set_syncpt_threshold(struct host1x *host, in host1x_intr_set_syncpt_threshold() argument
97 unsigned int id, in host1x_intr_set_syncpt_threshold() argument
100 host1x_sync_writel(host, thresh, HOST1X_SYNC_SYNCPT_INT_THRESH(id)); in host1x_intr_set_syncpt_threshold()
103 static void host1x_intr_enable_syncpt_intr(struct host1x *host, in host1x_intr_enable_syncpt_intr() argument
104 unsigned int id) in host1x_intr_enable_syncpt_intr() argument
106 host1x_sync_writel(host, BIT(id % 32), in host1x_intr_enable_syncpt_intr()
107 HOST1X_SYNC_SYNCPT_THRESH_INT_ENABLE_CPU0(id / 32)); in host1x_intr_enable_syncpt_intr()
110 static void host1x_intr_disable_syncpt_intr(struct host1x *host, in host1x_intr_disable_syncpt_intr() argument
111 unsigned int id) in host1x_intr_disable_syncpt_intr() argument
113 host1x_sync_writel(host, BIT(id % 32), in host1x_intr_disable_syncpt_intr()
114 HOST1X_SYNC_SYNCPT_THRESH_INT_DISABLE(id / 32)); in host1x_intr_disable_syncpt_intr()
115 host1x_sync_writel(host, BIT(id % 32), in host1x_intr_disable_syncpt_intr()
116 HOST1X_SYNC_SYNCPT_THRESH_CPU0_INT_STATUS(id / 32)); in host1x_intr_disable_syncpt_intr()