Lines Matching refs:ptpirq

997 	struct ksz_irq *ptpirq = dev_id;  in ksz_ptp_irq_thread_fn()  local
1005 dev = ptpirq->dev; in ksz_ptp_irq_thread_fn()
1007 ret = ksz_read16(dev, ptpirq->reg_status, &data); in ksz_ptp_irq_thread_fn()
1012 ret = ksz_write16(dev, ptpirq->reg_status, data); in ksz_ptp_irq_thread_fn()
1016 for (n = 0; n < ptpirq->nirqs; ++n) { in ksz_ptp_irq_thread_fn()
1018 sub_irq = irq_find_mapping(ptpirq->domain, n); in ksz_ptp_irq_thread_fn()
1111 ptpmsg_irq->num = irq_find_mapping(port->ptpirq.domain, n); in ksz_ptp_msg_irq_setup()
1125 struct ksz_irq *ptpirq = &port->ptpirq; in ksz_ptp_irq_setup() local
1129 ptpirq->dev = dev; in ksz_ptp_irq_setup()
1130 ptpirq->masked = 0; in ksz_ptp_irq_setup()
1131 ptpirq->nirqs = 3; in ksz_ptp_irq_setup()
1132 ptpirq->reg_mask = ops->get_port_addr(p, REG_PTP_PORT_TX_INT_ENABLE__2); in ksz_ptp_irq_setup()
1133 ptpirq->reg_status = ops->get_port_addr(p, in ksz_ptp_irq_setup()
1135 snprintf(ptpirq->name, sizeof(ptpirq->name), "ptp-irq-%d", p); in ksz_ptp_irq_setup()
1139 ptpirq->domain = irq_domain_add_linear(dev->dev->of_node, ptpirq->nirqs, in ksz_ptp_irq_setup()
1140 &ksz_ptp_irq_domain_ops, ptpirq); in ksz_ptp_irq_setup()
1141 if (!ptpirq->domain) in ksz_ptp_irq_setup()
1144 for (irq = 0; irq < ptpirq->nirqs; irq++) in ksz_ptp_irq_setup()
1145 irq_create_mapping(ptpirq->domain, irq); in ksz_ptp_irq_setup()
1147 ptpirq->irq_num = irq_find_mapping(port->pirq.domain, PORT_SRC_PTP_INT); in ksz_ptp_irq_setup()
1148 if (ptpirq->irq_num < 0) { in ksz_ptp_irq_setup()
1149 ret = ptpirq->irq_num; in ksz_ptp_irq_setup()
1153 ret = request_threaded_irq(ptpirq->irq_num, NULL, ksz_ptp_irq_thread_fn, in ksz_ptp_irq_setup()
1154 IRQF_ONESHOT, ptpirq->name, ptpirq); in ksz_ptp_irq_setup()
1158 for (irq = 0; irq < ptpirq->nirqs; irq++) { in ksz_ptp_irq_setup()
1167 free_irq(ptpirq->irq_num, ptpirq); in ksz_ptp_irq_setup()
1171 for (irq = 0; irq < ptpirq->nirqs; irq++) in ksz_ptp_irq_setup()
1174 irq_domain_remove(ptpirq->domain); in ksz_ptp_irq_setup()
1183 struct ksz_irq *ptpirq = &port->ptpirq; in ksz_ptp_irq_free() local
1186 for (n = 0; n < ptpirq->nirqs; n++) in ksz_ptp_irq_free()
1189 free_irq(ptpirq->irq_num, ptpirq); in ksz_ptp_irq_free()
1190 irq_dispose_mapping(ptpirq->irq_num); in ksz_ptp_irq_free()
1192 irq_domain_remove(ptpirq->domain); in ksz_ptp_irq_free()