All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Fabio Estevam <festevam@gmail.com>
Cc: Linux ARM <linux-arm-kernel@lists.infradead.org>,
	Shawn Guo <shawnguo@kernel.org>,
	NXP Linux Team <linux-imx@nxp.com>,
	Sascha Hauer <kernel@pengutronix.de>
Subject: Re: [PATCH 4/9] ARM: imx27: Retrieve AVIC base address from devicetree
Date: Fri, 11 Sep 2020 16:29:02 +0200	[thread overview]
Message-ID: <CAK8P3a2LiOUwHi7tOCnWm3Lo_51+xpAyVepKWpqdSsk8+bhJuw@mail.gmail.com> (raw)
In-Reply-To: <20200911124034.6792-5-festevam@gmail.com>

On Fri, Sep 11, 2020 at 2:41 PM Fabio Estevam <festevam@gmail.com> wrote:
>
> Now that imx27 has been converted to a devicetree-only platform,
> retrieve the AVIC base address from devicetree.
>
> Signed-off-by: Fabio Estevam <festevam@gmail.com>

>  static void __init mx27_init_irq(void)
>  {
> -       mxc_init_irq(MX27_IO_ADDRESS(MX27_AVIC_BASE_ADDR));
> +       void __iomem *avic_base;
> +       struct device_node *np;
> +
> +       np = of_find_compatible_node(NULL, NULL, "fsl,avic");
> +       avic_base = of_iomap(np, 0);
> +       BUG_ON(!avic_base);
> +       mxc_init_irq(avic_base);
>  }
>

I see this function is identical to mx25_init_irq(). Maybe just move the code
into mxc_init_irq() directly and pass NULL from mx27_init_irq()?

Are you able to completely eliminate MX27_IO_ADDRESS()? If not,
I probably wouldn't bother, but if you can, that sounds like a useful
cleanup.

      Arnd

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2020-09-11 14:30 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-11 12:40 [PATCH 0/9] ARM: imx: Remove more board related code Fabio Estevam
2020-09-11 12:40 ` [PATCH 1/9] ARM: imx27: Remove imx27_soc_init() Fabio Estevam
2020-09-11 12:40 ` [PATCH 2/9] ARM: imx27: Remove iomux-v1 board code Fabio Estevam
2020-09-11 12:40 ` [PATCH 3/9] ARM: imx27: Get rid of mm-imx27.c Fabio Estevam
2020-09-11 12:40 ` [PATCH 4/9] ARM: imx27: Retrieve AVIC base address from devicetree Fabio Estevam
2020-09-11 14:29   ` Arnd Bergmann [this message]
2020-09-11 15:38     ` Fabio Estevam
2020-09-11 12:40 ` [PATCH 5/9] ARM: imx31: Remove remaining i.MX31 board code Fabio Estevam
2020-09-11 12:40 ` [PATCH 6/9] ARM: imx3: Remove imx3 soc_init() Fabio Estevam
2020-09-11 12:40 ` [PATCH 7/9] ARM: imx: Remove iomux-v3 board code Fabio Estevam
2020-09-11 12:40 ` [PATCH 8/9] ARM: imx: Remove imx device directory Fabio Estevam
2020-09-11 14:30 ` [PATCH 0/9] ARM: imx: Remove more board related code Arnd Bergmann
2020-09-13  3:16 ` Shawn Guo

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=CAK8P3a2LiOUwHi7tOCnWm3Lo_51+xpAyVepKWpqdSsk8+bhJuw@mail.gmail.com \
    --to=arnd@arndb.de \
    --cc=festevam@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=shawnguo@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.