Re: [PATCH 2/4] PCI: j721e: Add PCI legacy interrupt support for J721E

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'd promote J721E earlier in subject so it doesn't get truncated, e.g.,

  PCI: j721e: Add J721E PCI legacy interrupt support

On Thu, Mar 25, 2021 at 02:39:34PM +0530, Kishon Vijay Abraham I wrote:

> +static void j721e_pcie_legacy_irq_handler(struct irq_desc *desc)
> +{
> +	int i;
> +	u32 reg;
> +	int virq;
> +	struct j721e_pcie *pcie = irq_desc_get_handler_data(desc);
> +	struct irq_chip *chip = irq_desc_get_chip(desc);

The rest of this driver sorts locals in order of use, e.g.,

	struct j721e_pcie *pcie = irq_desc_get_handler_data(desc);
	struct irq_chip *chip = irq_desc_get_chip(desc);
	int i;
	u32 reg;
	int virq;

> +	chained_irq_enter(chip, desc);
> +
> +	for (i = 0; i < PCI_NUM_INTX; i++) {
> +		reg = j721e_pcie_intd_readl(pcie, STATUS_REG_SYS_0);
> +		if (!(reg & INTx_EN(i)))
> +			continue;
> +
> +	virq = irq_find_mapping(pcie->legacy_irq_domain, 3 - i);

Whitespace error (should be indented another tab, I think).

> +		generic_handle_irq(virq);
> +		j721e_pcie_intd_writel(pcie, STATUS_CLR_REG_SYS_0, INTx_EN(i));
> +		j721e_pcie_intd_writel(pcie, EOI_REG, 3 - i);
> +	}
> +
> +	chained_irq_exit(chip, desc);
> +}



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux