Lines Matching defs:irq_id
86 fbl::RefPtr<SharedLegacyIrqHandler> SharedLegacyIrqHandler::Create(uint irq_id) {
89 SharedLegacyIrqHandler* handler = new (&ac) SharedLegacyIrqHandler(irq_id);
91 TRACEF("Failed to create shared legacry IRQ handler for system IRQ ID %u\n", irq_id);
98 SharedLegacyIrqHandler::SharedLegacyIrqHandler(uint irq_id)
99 : irq_id_(irq_id) {
273 bool PcieDevice::MaskUnmaskMsiIrqLocked(uint irq_id, bool mask) {
275 DEBUG_ASSERT(irq_id < irq_.handler_count);
278 pcie_irq_handler_state_t& hstate = irq_.handlers[irq_id];
289 DEBUG_ASSERT(irq_id < PCIE_MAX_MSI_IRQS);
291 if (mask) val |= (static_cast<uint32_t>(1u) << irq_id);
292 else val &= ~(static_cast<uint32_t>(1u) << irq_id);
298 DEBUG_ASSERT(irq_id < irq_.msi->irq_block_.num_irq);
300 bus_drv_.platform().MaskUnmaskMsi(&irq_.msi->irq_block_, irq_id, mask);
307 zx_status_t PcieDevice::MaskUnmaskMsiIrq(uint irq_id, bool mask) {
308 if (irq_id >= irq_.handler_count)
320 AutoSpinLock handler_lock(&irq_.handlers[irq_id].lock);
321 MaskUnmaskMsiIrqLocked(irq_id, mask);
651 zx_status_t PcieDevice::RegisterIrqHandlerLocked(uint irq_id,
665 if (irq_id >= irq_.handler_count)
669 pcie_irq_handler_state_t& hstate = irq_.handlers[irq_id];
691 zx_status_t PcieDevice::MaskUnmaskIrqLocked(uint irq_id, bool mask) {
703 if (irq_id >= irq_.handler_count)
708 pcie_irq_handler_state_t& hstate = irq_.handlers[irq_id];
716 case PCIE_IRQ_MODE_MSI: return MaskUnmaskMsiIrq(irq_id, mask);
762 zx_status_t PcieDevice::RegisterIrqHandler(uint irq_id, pcie_irq_handler_fn_t handler, void* ctx) {
766 ? RegisterIrqHandlerLocked(irq_id, handler, ctx)
770 zx_status_t PcieDevice::MaskUnmaskIrq(uint irq_id, bool mask) {
774 ? MaskUnmaskIrqLocked(irq_id, mask)
879 return root->Swizzle(dev->dev_id(), dev->func_id(), pin, &irq_.legacy.irq_id);
904 irq_.legacy.shared_handler = bus_drv_.FindLegacyIrqHandler(irq_.legacy.irq_id);
907 "dev %02x:%02x.%01x (pin %u, irq_id %u)\n",
909 irq_.legacy.pin, irq_.legacy.irq_id);
923 fbl::RefPtr<SharedLegacyIrqHandler> PcieBusDriver::FindLegacyIrqHandler(uint irq_id) {
930 if (irq_id == iter->irq_id())
935 auto handler = SharedLegacyIrqHandler::Create(irq_id);