Lines Matching +full:host +full:- +full:id

1 // SPDX-License-Identifier: GPL-2.0-only
6 * Copyright (c) 2010-2013, NVIDIA Corporation.
17 struct host1x *host = irq_data->host; in syncpt_thresh_isr() local
19 unsigned int i, id; in syncpt_thresh_isr() local
21 for (i = irq_data->offset; i < DIV_ROUND_UP(host->info->nb_pts, 32); in syncpt_thresh_isr()
22 i += host->num_syncpt_irqs) { 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, &reg, 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()
51 host1x_intr_init_host_sync(struct host1x *host, u32 cpm) in host1x_intr_init_host_sync() argument
55 host1x_sync_writel(host, 0, HOST1X_SYNC_IP_BUSY_TIMEOUT); in host1x_intr_init_host_sync()
58 * increase the auto-ack timout to the maximum value. 2d will hang in host1x_intr_init_host_sync()
61 host1x_sync_writel(host, 0xff, HOST1X_SYNC_CTXSW_TIMEOUT_CFG); in host1x_intr_init_host_sync()
63 /* update host clocks per usec */ in host1x_intr_init_host_sync()
64 host1x_sync_writel(host, cpm, HOST1X_SYNC_USEC_CLK); in host1x_intr_init_host_sync()
67 u32 id; in host1x_intr_init_host_sync() local
75 for (id = 0; id < host->info->nb_pts; id++) { in host1x_intr_init_host_sync()
76 u32 reg_offset = id / 32; in host1x_intr_init_host_sync()
77 u32 irq_index = reg_offset % host->num_syncpt_irqs; in host1x_intr_init_host_sync()
79 host1x_sync_writel(host, irq_index, HOST1X_SYNC_SYNCPT_INTR_DEST(id)); in host1x_intr_init_host_sync()
86 static void host1x_intr_set_syncpt_threshold(struct host1x *host, in host1x_intr_set_syncpt_threshold() argument
87 unsigned int id, in host1x_intr_set_syncpt_threshold() argument
90 host1x_sync_writel(host, thresh, HOST1X_SYNC_SYNCPT_INT_THRESH(id)); in host1x_intr_set_syncpt_threshold()
93 static void host1x_intr_enable_syncpt_intr(struct host1x *host, in host1x_intr_enable_syncpt_intr() argument
94 unsigned int id) in host1x_intr_enable_syncpt_intr() argument
96 host1x_sync_writel(host, BIT(id % 32), in host1x_intr_enable_syncpt_intr()
97 HOST1X_SYNC_SYNCPT_THRESH_INT_ENABLE_CPU0(id / 32)); in host1x_intr_enable_syncpt_intr()
100 static void host1x_intr_disable_syncpt_intr(struct host1x *host, in host1x_intr_disable_syncpt_intr() argument
101 unsigned int id) in host1x_intr_disable_syncpt_intr() argument
103 host1x_sync_writel(host, BIT(id % 32), in host1x_intr_disable_syncpt_intr()
104 HOST1X_SYNC_SYNCPT_THRESH_INT_DISABLE(id / 32)); in host1x_intr_disable_syncpt_intr()
105 host1x_sync_writel(host, BIT(id % 32), in host1x_intr_disable_syncpt_intr()
106 HOST1X_SYNC_SYNCPT_THRESH_CPU0_INT_STATUS(id / 32)); in host1x_intr_disable_syncpt_intr()