Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\irq\irqdomain.c Create Date:2022-07-28 10:14:03
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:irq_create_fwspec_mapping

Proto:unsigned int irq_create_fwspec_mapping(struct irq_fwspec *fwspec)

Type:unsigned int

Parameter:

TypeParameterName
struct irq_fwspec *fwspec
766  type = IRQ_TYPE_NONE
769  If fwnode Then
770  domain = q_find_matching_fwspec() - Locates a domain for a given fwspec*@fwspec: FW specifier for an interrupt*@bus_token: domain-specific data
771  If Not domain Then domain = q_find_matching_fwspec() - Locates a domain for a given fwspec*@fwspec: FW specifier for an interrupt*@bus_token: domain-specific data
773  Else
774  domain = irq_default_domain
777  If Not domain Then
778  pr_warn("no irq domain found for %s !\n", of_node_full_name(to_of_node(fwnode)))
780  Return 0
783  If irq_domain_translate(domain, fwspec, & hwirq, & type) Then Return 0
790  If WARN_ON(type & ~IRQ_TYPE_SENSE_MASK) Then type &= IRQ_TYPE_SENSE_MASK
797  virq = q_find_mapping() - Find a linux irq from a hw irq number.*@domain: domain owning this hardware interrupt*@hwirq: hardware irq number in that domain space
798  If virq Then
804  If type == IRQ_TYPE_NONE || type == irq_get_trigger_type(virq) Then Return virq
813  If Not irq_data Then Return 0
817  Return virq
820  pr_warn("type mismatch, failed to map hwirq-%lu for %s!\n", hwirq, of_node_full_name(to_of_node(fwnode)))
822  Return 0
825  If irq_domain_is_hierarchy(domain) Then
826  virq = irq_domain_alloc_irqs(domain, 1, NUMA_NO_NODE, fwspec)
827  If virq <= 0 Then Return 0
829  Else
831  virq = q_create_mapping() - Map a hardware interrupt into linux irq space*@domain: domain owning this hardware interrupt or NULL for default domain*@hwirq: hardware irq number in that domain space* Only one mapping per hardware interrupt is permitted
832  If Not virq Then Return virq
836  irq_data = irq_get_irq_data(virq)
837  If Not irq_data Then
838  If irq_domain_is_hierarchy(domain) Then irq_domain_free_irqs(virq, 1)
840  Else q_dispose_mapping() - Unmap an interrupt*@virq: linux irq number of the interrupt to unmap
842  Return 0
846  Must only be called inside irq_chip.irq_set_type() functions or* from the DT/ACPI setup code.
848  Return virq
Caller
NameDescribe
irq_create_of_mapping