Lines Matching refs:cd
101 struct octeon_ciu_chip_data *cd; in octeon_irq_set_ciu_mapping() local
103 cd = kzalloc(sizeof(*cd), GFP_KERNEL); in octeon_irq_set_ciu_mapping()
104 if (!cd) in octeon_irq_set_ciu_mapping()
109 cd->line = line; in octeon_irq_set_ciu_mapping()
110 cd->bit = bit; in octeon_irq_set_ciu_mapping()
111 cd->gpio_line = gpio_line; in octeon_irq_set_ciu_mapping()
113 irq_set_chip_data(irq, cd); in octeon_irq_set_ciu_mapping()
121 struct octeon_ciu_chip_data *cd = irq_data_get_irq_chip_data(data); in octeon_irq_free_cd() local
124 kfree(cd); in octeon_irq_free_cd()
153 struct octeon_core_chip_data *cd = irq_data_get_irq_chip_data(data); in octeon_irq_core_ack() local
154 unsigned int bit = cd->bit; in octeon_irq_core_ack()
169 struct octeon_core_chip_data *cd = irq_data_get_irq_chip_data(data); in octeon_irq_core_eoi() local
176 set_c0_status(0x100 << cd->bit); in octeon_irq_core_eoi()
182 struct octeon_core_chip_data *cd = irq_data_get_irq_chip_data(data); in octeon_irq_core_set_enable_local() local
183 unsigned int mask = 0x100 << cd->bit; in octeon_irq_core_set_enable_local()
188 if (cd->desired_en) in octeon_irq_core_set_enable_local()
197 struct octeon_core_chip_data *cd = irq_data_get_irq_chip_data(data); in octeon_irq_core_disable() local
198 cd->desired_en = false; in octeon_irq_core_disable()
203 struct octeon_core_chip_data *cd = irq_data_get_irq_chip_data(data); in octeon_irq_core_enable() local
204 cd->desired_en = true; in octeon_irq_core_enable()
209 struct octeon_core_chip_data *cd = irq_data_get_irq_chip_data(data); in octeon_irq_core_bus_lock() local
211 mutex_lock(&cd->core_irq_mutex); in octeon_irq_core_bus_lock()
216 struct octeon_core_chip_data *cd = irq_data_get_irq_chip_data(data); in octeon_irq_core_bus_sync_unlock() local
218 if (cd->desired_en != cd->current_en) { in octeon_irq_core_bus_sync_unlock()
221 cd->current_en = cd->desired_en; in octeon_irq_core_bus_sync_unlock()
224 mutex_unlock(&cd->core_irq_mutex); in octeon_irq_core_bus_sync_unlock()
245 struct octeon_core_chip_data *cd; in octeon_irq_init_core() local
248 cd = &octeon_irq_core_chip_data[i]; in octeon_irq_init_core()
249 cd->current_en = false; in octeon_irq_init_core()
250 cd->desired_en = false; in octeon_irq_init_core()
251 cd->bit = i; in octeon_irq_init_core()
252 mutex_init(&cd->core_irq_mutex); in octeon_irq_init_core()
255 irq_set_chip_data(irq, cd); in octeon_irq_init_core()
268 struct octeon_ciu_chip_data *cd = irq_data_get_irq_chip_data(data); in next_cpu_for_irq() local
271 cpu = cd->current_cpu; in next_cpu_for_irq()
286 cd->current_cpu = cpu; in next_cpu_for_irq()
299 struct octeon_ciu_chip_data *cd; in octeon_irq_ciu_enable() local
302 cd = irq_data_get_irq_chip_data(data); in octeon_irq_ciu_enable()
305 if (cd->line == 0) { in octeon_irq_ciu_enable()
307 __set_bit(cd->bit, pen); in octeon_irq_ciu_enable()
316 __set_bit(cd->bit, pen); in octeon_irq_ciu_enable()
331 struct octeon_ciu_chip_data *cd; in octeon_irq_ciu_enable_local() local
334 cd = irq_data_get_irq_chip_data(data); in octeon_irq_ciu_enable_local()
337 if (cd->line == 0) { in octeon_irq_ciu_enable_local()
339 __set_bit(cd->bit, pen); in octeon_irq_ciu_enable_local()
348 __set_bit(cd->bit, pen); in octeon_irq_ciu_enable_local()
363 struct octeon_ciu_chip_data *cd; in octeon_irq_ciu_disable_local() local
366 cd = irq_data_get_irq_chip_data(data); in octeon_irq_ciu_disable_local()
369 if (cd->line == 0) { in octeon_irq_ciu_disable_local()
371 __clear_bit(cd->bit, pen); in octeon_irq_ciu_disable_local()
380 __clear_bit(cd->bit, pen); in octeon_irq_ciu_disable_local()
396 struct octeon_ciu_chip_data *cd; in octeon_irq_ciu_disable_all() local
399 cd = irq_data_get_irq_chip_data(data); in octeon_irq_ciu_disable_all()
404 if (cd->line == 0) in octeon_irq_ciu_disable_all()
410 __clear_bit(cd->bit, pen); in octeon_irq_ciu_disable_all()
416 if (cd->line == 0) in octeon_irq_ciu_disable_all()
429 struct octeon_ciu_chip_data *cd; in octeon_irq_ciu_enable_all() local
432 cd = irq_data_get_irq_chip_data(data); in octeon_irq_ciu_enable_all()
437 if (cd->line == 0) in octeon_irq_ciu_enable_all()
443 __set_bit(cd->bit, pen); in octeon_irq_ciu_enable_all()
449 if (cd->line == 0) in octeon_irq_ciu_enable_all()
465 struct octeon_ciu_chip_data *cd; in octeon_irq_ciu_enable_v2() local
467 cd = irq_data_get_irq_chip_data(data); in octeon_irq_ciu_enable_v2()
468 mask = 1ull << (cd->bit); in octeon_irq_ciu_enable_v2()
474 if (cd->line == 0) { in octeon_irq_ciu_enable_v2()
476 set_bit(cd->bit, &per_cpu(octeon_irq_ciu0_en_mirror, cpu)); in octeon_irq_ciu_enable_v2()
480 set_bit(cd->bit, &per_cpu(octeon_irq_ciu1_en_mirror, cpu)); in octeon_irq_ciu_enable_v2()
493 struct octeon_ciu_chip_data *cd; in octeon_irq_ciu_enable_sum2() local
495 cd = irq_data_get_irq_chip_data(data); in octeon_irq_ciu_enable_sum2()
496 mask = 1ull << (cd->bit); in octeon_irq_ciu_enable_sum2()
509 struct octeon_ciu_chip_data *cd; in octeon_irq_ciu_disable_local_sum2() local
511 cd = irq_data_get_irq_chip_data(data); in octeon_irq_ciu_disable_local_sum2()
512 mask = 1ull << (cd->bit); in octeon_irq_ciu_disable_local_sum2()
522 struct octeon_ciu_chip_data *cd; in octeon_irq_ciu_ack_sum2() local
524 cd = irq_data_get_irq_chip_data(data); in octeon_irq_ciu_ack_sum2()
525 mask = 1ull << (cd->bit); in octeon_irq_ciu_ack_sum2()
533 struct octeon_ciu_chip_data *cd; in octeon_irq_ciu_disable_all_sum2() local
536 cd = irq_data_get_irq_chip_data(data); in octeon_irq_ciu_disable_all_sum2()
537 mask = 1ull << (cd->bit); in octeon_irq_ciu_disable_all_sum2()
553 struct octeon_ciu_chip_data *cd; in octeon_irq_ciu_enable_local_v2() local
555 cd = irq_data_get_irq_chip_data(data); in octeon_irq_ciu_enable_local_v2()
556 mask = 1ull << (cd->bit); in octeon_irq_ciu_enable_local_v2()
558 if (cd->line == 0) { in octeon_irq_ciu_enable_local_v2()
560 set_bit(cd->bit, this_cpu_ptr(&octeon_irq_ciu0_en_mirror)); in octeon_irq_ciu_enable_local_v2()
564 set_bit(cd->bit, this_cpu_ptr(&octeon_irq_ciu1_en_mirror)); in octeon_irq_ciu_enable_local_v2()
572 struct octeon_ciu_chip_data *cd; in octeon_irq_ciu_disable_local_v2() local
574 cd = irq_data_get_irq_chip_data(data); in octeon_irq_ciu_disable_local_v2()
575 mask = 1ull << (cd->bit); in octeon_irq_ciu_disable_local_v2()
577 if (cd->line == 0) { in octeon_irq_ciu_disable_local_v2()
579 clear_bit(cd->bit, this_cpu_ptr(&octeon_irq_ciu0_en_mirror)); in octeon_irq_ciu_disable_local_v2()
583 clear_bit(cd->bit, this_cpu_ptr(&octeon_irq_ciu1_en_mirror)); in octeon_irq_ciu_disable_local_v2()
594 struct octeon_ciu_chip_data *cd; in octeon_irq_ciu_ack() local
596 cd = irq_data_get_irq_chip_data(data); in octeon_irq_ciu_ack()
597 mask = 1ull << (cd->bit); in octeon_irq_ciu_ack()
599 if (cd->line == 0) { in octeon_irq_ciu_ack()
615 struct octeon_ciu_chip_data *cd; in octeon_irq_ciu_disable_all_v2() local
617 cd = irq_data_get_irq_chip_data(data); in octeon_irq_ciu_disable_all_v2()
618 mask = 1ull << (cd->bit); in octeon_irq_ciu_disable_all_v2()
620 if (cd->line == 0) { in octeon_irq_ciu_disable_all_v2()
623 clear_bit(cd->bit, in octeon_irq_ciu_disable_all_v2()
630 clear_bit(cd->bit, in octeon_irq_ciu_disable_all_v2()
645 struct octeon_ciu_chip_data *cd; in octeon_irq_ciu_enable_all_v2() local
647 cd = irq_data_get_irq_chip_data(data); in octeon_irq_ciu_enable_all_v2()
648 mask = 1ull << (cd->bit); in octeon_irq_ciu_enable_all_v2()
650 if (cd->line == 0) { in octeon_irq_ciu_enable_all_v2()
653 set_bit(cd->bit, in octeon_irq_ciu_enable_all_v2()
660 set_bit(cd->bit, in octeon_irq_ciu_enable_all_v2()
682 struct octeon_ciu_chip_data *cd; in octeon_irq_gpio_setup() local
685 cd = irq_data_get_irq_chip_data(data); in octeon_irq_gpio_setup()
696 cvmx_write_csr(CVMX_GPIO_BIT_CFGX(cd->gpio_line), cfg.u64); in octeon_irq_gpio_setup()
726 struct octeon_ciu_chip_data *cd; in octeon_irq_ciu_disable_gpio_v2() local
728 cd = irq_data_get_irq_chip_data(data); in octeon_irq_ciu_disable_gpio_v2()
729 cvmx_write_csr(CVMX_GPIO_BIT_CFGX(cd->gpio_line), 0); in octeon_irq_ciu_disable_gpio_v2()
736 struct octeon_ciu_chip_data *cd; in octeon_irq_ciu_disable_gpio() local
738 cd = irq_data_get_irq_chip_data(data); in octeon_irq_ciu_disable_gpio()
739 cvmx_write_csr(CVMX_GPIO_BIT_CFGX(cd->gpio_line), 0); in octeon_irq_ciu_disable_gpio()
746 struct octeon_ciu_chip_data *cd; in octeon_irq_ciu_gpio_ack() local
749 cd = irq_data_get_irq_chip_data(data); in octeon_irq_ciu_gpio_ack()
750 mask = 1ull << (cd->gpio_line); in octeon_irq_ciu_gpio_ack()
787 struct octeon_ciu_chip_data *cd; in octeon_irq_ciu_set_affinity() local
791 cd = irq_data_get_irq_chip_data(data); in octeon_irq_ciu_set_affinity()
811 if (cd->line == 0) in octeon_irq_ciu_set_affinity()
818 __set_bit(cd->bit, pen); in octeon_irq_ciu_set_affinity()
820 __clear_bit(cd->bit, pen); in octeon_irq_ciu_set_affinity()
828 if (cd->line == 0) in octeon_irq_ciu_set_affinity()
849 struct octeon_ciu_chip_data *cd; in octeon_irq_ciu_set_affinity_v2() local
854 cd = irq_data_get_irq_chip_data(data); in octeon_irq_ciu_set_affinity_v2()
855 mask = 1ull << cd->bit; in octeon_irq_ciu_set_affinity_v2()
857 if (cd->line == 0) { in octeon_irq_ciu_set_affinity_v2()
863 set_bit(cd->bit, pen); in octeon_irq_ciu_set_affinity_v2()
866 clear_bit(cd->bit, pen); in octeon_irq_ciu_set_affinity_v2()
876 set_bit(cd->bit, pen); in octeon_irq_ciu_set_affinity_v2()
879 clear_bit(cd->bit, pen); in octeon_irq_ciu_set_affinity_v2()
894 struct octeon_ciu_chip_data *cd; in octeon_irq_ciu_set_affinity_sum2() local
899 cd = irq_data_get_irq_chip_data(data); in octeon_irq_ciu_set_affinity_sum2()
900 mask = 1ull << cd->bit; in octeon_irq_ciu_set_affinity_sum2()
1639 struct octeon_ciu_chip_data *cd; in octeon_irq_ciu2_wd_enable() local
1641 cd = irq_data_get_irq_chip_data(data); in octeon_irq_ciu2_wd_enable()
1642 mask = 1ull << (cd->bit); in octeon_irq_ciu2_wd_enable()
1645 (0x1000ull * cd->line); in octeon_irq_ciu2_wd_enable()
1656 struct octeon_ciu_chip_data *cd; in octeon_irq_ciu2_enable() local
1658 cd = irq_data_get_irq_chip_data(data); in octeon_irq_ciu2_enable()
1659 mask = 1ull << (cd->bit); in octeon_irq_ciu2_enable()
1662 (0x1000ull * cd->line); in octeon_irq_ciu2_enable()
1671 struct octeon_ciu_chip_data *cd; in octeon_irq_ciu2_enable_local() local
1673 cd = irq_data_get_irq_chip_data(data); in octeon_irq_ciu2_enable_local()
1674 mask = 1ull << (cd->bit); in octeon_irq_ciu2_enable_local()
1677 (0x1000ull * cd->line); in octeon_irq_ciu2_enable_local()
1687 struct octeon_ciu_chip_data *cd; in octeon_irq_ciu2_disable_local() local
1689 cd = irq_data_get_irq_chip_data(data); in octeon_irq_ciu2_disable_local()
1690 mask = 1ull << (cd->bit); in octeon_irq_ciu2_disable_local()
1693 (0x1000ull * cd->line); in octeon_irq_ciu2_disable_local()
1703 struct octeon_ciu_chip_data *cd; in octeon_irq_ciu2_ack() local
1705 cd = irq_data_get_irq_chip_data(data); in octeon_irq_ciu2_ack()
1706 mask = 1ull << (cd->bit); in octeon_irq_ciu2_ack()
1708 en_addr = CVMX_CIU2_RAW_PPX_IP2_WRKQ(coreid) + (0x1000ull * cd->line); in octeon_irq_ciu2_ack()
1717 struct octeon_ciu_chip_data *cd; in octeon_irq_ciu2_disable_all() local
1719 cd = irq_data_get_irq_chip_data(data); in octeon_irq_ciu2_disable_all()
1720 mask = 1ull << (cd->bit); in octeon_irq_ciu2_disable_all()
1724 octeon_coreid_for_cpu(cpu)) + (0x1000ull * cd->line); in octeon_irq_ciu2_disable_all()
1786 struct octeon_ciu_chip_data *cd; in octeon_irq_ciu2_set_affinity() local
1791 cd = irq_data_get_irq_chip_data(data); in octeon_irq_ciu2_set_affinity()
1792 mask = 1ull << cd->bit; in octeon_irq_ciu2_set_affinity()
1800 (0x1000ull * cd->line); in octeon_irq_ciu2_set_affinity()
1804 (0x1000ull * cd->line); in octeon_irq_ciu2_set_affinity()
1821 struct octeon_ciu_chip_data *cd; in octeon_irq_ciu2_disable_gpio() local
1823 cd = irq_data_get_irq_chip_data(data); in octeon_irq_ciu2_disable_gpio()
1825 cvmx_write_csr(CVMX_GPIO_BIT_CFGX(cd->gpio_line), 0); in octeon_irq_ciu2_disable_gpio()
2121 struct octeon_irq_cib_chip_data *cd = irq_data_get_irq_chip_data(data); in octeon_irq_cib_enable() local
2122 struct octeon_irq_cib_host_data *host_data = cd->host_data; in octeon_irq_cib_enable()
2126 en |= 1ull << cd->bit; in octeon_irq_cib_enable()
2135 struct octeon_irq_cib_chip_data *cd = irq_data_get_irq_chip_data(data); in octeon_irq_cib_disable() local
2136 struct octeon_irq_cib_host_data *host_data = cd->host_data; in octeon_irq_cib_disable()
2140 en &= ~(1ull << cd->bit); in octeon_irq_cib_disable()
2193 struct octeon_irq_cib_chip_data *cd; in octeon_irq_cib_map() local
2201 cd = kzalloc(sizeof(*cd), GFP_KERNEL); in octeon_irq_cib_map()
2202 cd->host_data = host_data; in octeon_irq_cib_map()
2203 cd->bit = hw; in octeon_irq_cib_map()
2207 irq_set_chip_data(virq, cd); in octeon_irq_cib_map()
2385 struct octeon_ciu_chip_data *cd; in octeon_irq_ciu3_enable() local
2389 cd = irq_data_get_irq_chip_data(data); in octeon_irq_ciu3_enable()
2393 cvmx_write_csr(cd->ciu3_addr + CIU3_ISC_W1C(cd->intsn), isc_w1c.u64); in octeon_irq_ciu3_enable()
2395 isc_ctl_addr = cd->ciu3_addr + CIU3_ISC_CTL(cd->intsn); in octeon_irq_ciu3_enable()
2408 struct octeon_ciu_chip_data *cd; in octeon_irq_ciu3_disable() local
2410 cd = irq_data_get_irq_chip_data(data); in octeon_irq_ciu3_disable()
2415 isc_ctl_addr = cd->ciu3_addr + CIU3_ISC_CTL(cd->intsn); in octeon_irq_ciu3_disable()
2416 cvmx_write_csr(cd->ciu3_addr + CIU3_ISC_W1C(cd->intsn), isc_w1c.u64); in octeon_irq_ciu3_disable()
2425 struct octeon_ciu_chip_data *cd; in octeon_irq_ciu3_ack() local
2435 cd = irq_data_get_irq_chip_data(data); in octeon_irq_ciu3_ack()
2440 isc_w1c_addr = cd->ciu3_addr + CIU3_ISC_W1C(cd->intsn); in octeon_irq_ciu3_ack()
2449 struct octeon_ciu_chip_data *cd; in octeon_irq_ciu3_mask() local
2451 cd = irq_data_get_irq_chip_data(data); in octeon_irq_ciu3_mask()
2456 isc_w1c_addr = cd->ciu3_addr + CIU3_ISC_W1C(cd->intsn); in octeon_irq_ciu3_mask()
2465 struct octeon_ciu_chip_data *cd; in octeon_irq_ciu3_mask_ack() local
2468 cd = irq_data_get_irq_chip_data(data); in octeon_irq_ciu3_mask_ack()
2480 isc_w1c_addr = cd->ciu3_addr + CIU3_ISC_W1C(cd->intsn); in octeon_irq_ciu3_mask_ack()
2494 struct octeon_ciu_chip_data *cd = irq_data_get_irq_chip_data(data); in octeon_irq_ciu3_set_affinity() local
2496 if (!cpumask_subset(dest, cpumask_of_node(cd->ciu_node))) in octeon_irq_ciu3_set_affinity()
2502 cd = irq_data_get_irq_chip_data(data); in octeon_irq_ciu3_set_affinity()
2506 cd->current_cpu = cpu; in octeon_irq_ciu3_set_affinity()
2510 cvmx_write_csr(cd->ciu3_addr + CIU3_ISC_W1C(cd->intsn), isc_w1c.u64); in octeon_irq_ciu3_set_affinity()
2512 isc_ctl_addr = cd->ciu3_addr + CIU3_ISC_CTL(cd->intsn); in octeon_irq_ciu3_set_affinity()
2543 struct octeon_ciu_chip_data *cd = kzalloc_node(sizeof(*cd), GFP_KERNEL, in octeon_irq_ciu3_mapx() local
2545 if (!cd) in octeon_irq_ciu3_mapx()
2547 cd->intsn = hw; in octeon_irq_ciu3_mapx()
2548 cd->current_cpu = -1; in octeon_irq_ciu3_mapx()
2549 cd->ciu3_addr = ciu3_info->ciu3_addr; in octeon_irq_ciu3_mapx()
2550 cd->ciu_node = ciu3_info->node; in octeon_irq_ciu3_mapx()
2552 irq_set_chip_data(virq, cd); in octeon_irq_ciu3_mapx()