Lines Matching full:cd
30 struct mst_intc_chip_data *cd = irq_data_get_irq_chip_data(d); in mst_set_irq() local
37 raw_spin_lock_irqsave(&cd->lock, flags); in mst_set_irq()
38 val = readw_relaxed(cd->base + offset) | mask; in mst_set_irq()
39 writew_relaxed(val, cd->base + offset); in mst_set_irq()
40 raw_spin_unlock_irqrestore(&cd->lock, flags); in mst_set_irq()
46 struct mst_intc_chip_data *cd = irq_data_get_irq_chip_data(d); in mst_clear_irq() local
53 raw_spin_lock_irqsave(&cd->lock, flags); in mst_clear_irq()
54 val = readw_relaxed(cd->base + offset) & ~mask; in mst_clear_irq()
55 writew_relaxed(val, cd->base + offset); in mst_clear_irq()
56 raw_spin_unlock_irqrestore(&cd->lock, flags); in mst_clear_irq()
73 struct mst_intc_chip_data *cd = irq_data_get_irq_chip_data(d); in mst_intc_eoi_irq() local
75 if (!cd->no_eoi) in mst_intc_eoi_irq()
102 struct mst_intc_chip_data *cd = d->host_data; in mst_intc_domain_translate() local
112 if (fwspec->param[1] >= cd->nr_irqs) in mst_intc_domain_translate()
129 struct mst_intc_chip_data *cd = domain->host_data; in mst_intc_domain_alloc() local
147 parent_fwspec.param[1] = cd->irq_start + hwirq; in mst_intc_domain_alloc()
161 struct mst_intc_chip_data *cd; in mst_intc_of_init() local
174 cd = kzalloc(sizeof(*cd), GFP_KERNEL); in mst_intc_of_init()
175 if (!cd) in mst_intc_of_init()
178 cd->base = of_iomap(dn, 0); in mst_intc_of_init()
179 if (!cd->base) { in mst_intc_of_init()
180 kfree(cd); in mst_intc_of_init()
184 cd->no_eoi = of_property_read_bool(dn, "mstar,intc-no-eoi"); in mst_intc_of_init()
185 raw_spin_lock_init(&cd->lock); in mst_intc_of_init()
186 cd->irq_start = irq_start; in mst_intc_of_init()
187 cd->nr_irqs = irq_end - irq_start + 1; in mst_intc_of_init()
188 domain = irq_domain_add_hierarchy(domain_parent, 0, cd->nr_irqs, dn, in mst_intc_of_init()
189 &mst_intc_domain_ops, cd); in mst_intc_of_init()
191 iounmap(cd->base); in mst_intc_of_init()
192 kfree(cd); in mst_intc_of_init()