devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: Alexandre Torgue <alexandre.torgue@foss.st.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Rob Herring <robh+dt@kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>,
	<linux-stm32@st-md-mailman.stormreply.com>,
	<devicetree@vger.kernel.org>
Subject: Re: [PATCH 2/3] irqchip/stm32-exti: add STM32MP13 support
Date: Wed, 08 Dec 2021 13:41:26 +0000	[thread overview]
Message-ID: <87fsr31aex.wl-maz@kernel.org> (raw)
In-Reply-To: <20211208130456.4002-3-alexandre.torgue@foss.st.com>

On Wed, 08 Dec 2021 13:04:55 +0000,
Alexandre Torgue <alexandre.torgue@foss.st.com> wrote:
> 
> Enhance stm32-exti driver to support STM32MP13 SoC. This SoC uses the same
> hardware version than STM32MP15. Only EXTI line mapping is changed and
> following EXTI lines are supported: GPIO, RTC, I2C[1-5], UxART[1-8],
> USBH_EHCI, USBH_OHCI, USB_OTG, LPTIM[1-5], ETH[1-2].
> 
> Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
> 
> diff --git a/drivers/irqchip/irq-stm32-exti.c b/drivers/irqchip/irq-stm32-exti.c
> index b7cb2da71888..9d18f47040eb 100644
> --- a/drivers/irqchip/irq-stm32-exti.c
> +++ b/drivers/irqchip/irq-stm32-exti.c
> @@ -214,6 +214,48 @@ static const struct stm32_desc_irq stm32mp1_desc_irq[] = {
>  	{ .exti = 73, .irq_parent = 129, .chip = &stm32_exti_h_chip },
>  };
>  
> +static const struct stm32_desc_irq stm32mp13_desc_irq[] = {
> +	{ .exti = 0, .irq_parent = 6, .chip = &stm32_exti_h_chip },
> +	{ .exti = 1, .irq_parent = 7, .chip = &stm32_exti_h_chip },
> +	{ .exti = 2, .irq_parent = 8, .chip = &stm32_exti_h_chip },
> +	{ .exti = 3, .irq_parent = 9, .chip = &stm32_exti_h_chip },
> +	{ .exti = 4, .irq_parent = 10, .chip = &stm32_exti_h_chip },
> +	{ .exti = 5, .irq_parent = 24, .chip = &stm32_exti_h_chip },
> +	{ .exti = 6, .irq_parent = 65, .chip = &stm32_exti_h_chip },
> +	{ .exti = 7, .irq_parent = 66, .chip = &stm32_exti_h_chip },
> +	{ .exti = 8, .irq_parent = 67, .chip = &stm32_exti_h_chip },
> +	{ .exti = 9, .irq_parent = 68, .chip = &stm32_exti_h_chip },
> +	{ .exti = 10, .irq_parent = 41, .chip = &stm32_exti_h_chip },
> +	{ .exti = 11, .irq_parent = 43, .chip = &stm32_exti_h_chip },
> +	{ .exti = 12, .irq_parent = 77, .chip = &stm32_exti_h_chip },
> +	{ .exti = 13, .irq_parent = 78, .chip = &stm32_exti_h_chip },
> +	{ .exti = 14, .irq_parent = 106, .chip = &stm32_exti_h_chip },
> +	{ .exti = 15, .irq_parent = 109, .chip = &stm32_exti_h_chip },
> +	{ .exti = 16, .irq_parent = 1, .chip = &stm32_exti_h_chip },
> +	{ .exti = 19, .irq_parent = 3, .chip = &stm32_exti_h_chip_direct },
> +	{ .exti = 21, .irq_parent = 32, .chip = &stm32_exti_h_chip_direct },
> +	{ .exti = 22, .irq_parent = 34, .chip = &stm32_exti_h_chip_direct },
> +	{ .exti = 23, .irq_parent = 73, .chip = &stm32_exti_h_chip_direct },
> +	{ .exti = 24, .irq_parent = 93, .chip = &stm32_exti_h_chip_direct },
> +	{ .exti = 25, .irq_parent = 114, .chip = &stm32_exti_h_chip_direct },
> +	{ .exti = 26, .irq_parent = 38, .chip = &stm32_exti_h_chip_direct },
> +	{ .exti = 27, .irq_parent = 39, .chip = &stm32_exti_h_chip_direct },
> +	{ .exti = 28, .irq_parent = 40, .chip = &stm32_exti_h_chip_direct },
> +	{ .exti = 29, .irq_parent = 72, .chip = &stm32_exti_h_chip_direct },
> +	{ .exti = 30, .irq_parent = 53, .chip = &stm32_exti_h_chip_direct },
> +	{ .exti = 31, .irq_parent = 54, .chip = &stm32_exti_h_chip_direct },
> +	{ .exti = 32, .irq_parent = 83, .chip = &stm32_exti_h_chip_direct },
> +	{ .exti = 33, .irq_parent = 84, .chip = &stm32_exti_h_chip_direct },
> +	{ .exti = 44, .irq_parent = 96, .chip = &stm32_exti_h_chip_direct },
> +	{ .exti = 47, .irq_parent = 92, .chip = &stm32_exti_h_chip_direct },
> +	{ .exti = 48, .irq_parent = 116, .chip = &stm32_exti_h_chip_direct },
> +	{ .exti = 50, .irq_parent = 117, .chip = &stm32_exti_h_chip_direct },
> +	{ .exti = 52, .irq_parent = 118, .chip = &stm32_exti_h_chip_direct },
> +	{ .exti = 53, .irq_parent = 119, .chip = &stm32_exti_h_chip_direct },
> +	{ .exti = 68, .irq_parent = 63, .chip = &stm32_exti_h_chip_direct },
> +	{ .exti = 70, .irq_parent = 98, .chip = &stm32_exti_h_chip_direct },
> +};

Why does the driver need to carry these tables? This sort of
information should really come from DT, instead of being hardcoded in
the driver and bloating it for no reason. This all has a funny taste
of the board files we used to have pre-DT.

	M.

-- 
Without deviation from the norm, progress is not possible.

  reply	other threads:[~2021-12-08 13:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-08 13:04 [PATCH 0/3] Add STM32MP13 EXTI support Alexandre Torgue
2021-12-08 13:04 ` [PATCH 1/3] dt-bindings: interrupt-controller: stm32-exti: document st,stm32mp13-exti Alexandre Torgue
2021-12-08 13:04 ` [PATCH 2/3] irqchip/stm32-exti: add STM32MP13 support Alexandre Torgue
2021-12-08 13:41   ` Marc Zyngier [this message]
2021-12-08 13:58     ` Alexandre TORGUE
2021-12-08 14:22       ` Marc Zyngier
2021-12-08 14:51         ` Alexandre TORGUE
2021-12-08 13:04 ` [PATCH 3/3] ARM: dts: stm32: Enable EXTI on stm32mp13 Alexandre Torgue

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87fsr31aex.wl-maz@kernel.org \
    --to=maz@kernel.org \
    --cc=alexandre.torgue@foss.st.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=robh+dt@kernel.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).