mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <sha@pengutronix.de>
To: Marco Felsch <m.felsch@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH next 1/3] ARM: i.MX8MP: EVK: convert to board driver and enable deep-probe
Date: Tue, 18 Oct 2022 11:04:00 +0200	[thread overview]
Message-ID: <20221018090400.GO6702@pengutronix.de> (raw)
In-Reply-To: <20221017161818.333094-1-m.felsch@pengutronix.de>

On Mon, Oct 17, 2022 at 06:18:16PM +0200, Marco Felsch wrote:
> Convert the driver to the board driver mechanism. While on it enable the
> deep-probe support and add a comment about the ENET1_RGMII_EN bit
> setting.
> 
> Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
> ---
>  arch/arm/boards/nxp-imx8mp-evk/board.c | 21 ++++++++++++++++-----
>  1 file changed, 16 insertions(+), 5 deletions(-)

Applied, thanks

(contrary to what you said I applied it to master)

Sascha

> 
> diff --git a/arch/arm/boards/nxp-imx8mp-evk/board.c b/arch/arm/boards/nxp-imx8mp-evk/board.c
> index 8f1c247109..57c41aa8d8 100644
> --- a/arch/arm/boards/nxp-imx8mp-evk/board.c
> +++ b/arch/arm/boards/nxp-imx8mp-evk/board.c
> @@ -6,6 +6,7 @@
>  #include <asm/memory.h>
>  #include <bootsource.h>
>  #include <common.h>
> +#include <deep-probe.h>
>  #include <init.h>
>  #include <linux/phy.h>
>  #include <linux/sizes.h>
> @@ -14,15 +15,12 @@
>  #include <gpio.h>
>  #include <envfs.h>
>  
> -static int nxp_imx8mp_evk_init(void)
> +static int nxp_imx8mp_evk_probe(struct device_d *dev)
>  {
>  	int emmc_bbu_flag = 0;
>  	int sd_bbu_flag = 0;
>  	u32 val;
>  
> -	if (!of_machine_is_compatible("fsl,imx8mp-evk"))
> -		return 0;
> -
>  	if (bootsource_get() == BOOTSOURCE_MMC) {
>  		if (bootsource_get_instance() == 2) {
>  			of_device_enable_path("/chosen/environment-emmc");
> @@ -39,10 +37,23 @@ static int nxp_imx8mp_evk_init(void)
>  	imx8m_bbu_internal_mmc_register_handler("SD", "/dev/mmc1.barebox", sd_bbu_flag);
>  	imx8m_bbu_internal_mmcboot_register_handler("eMMC", "/dev/mmc2", emmc_bbu_flag);
>  
> +	/* Enable RGMII TX clk output */
>  	val = readl(MX8MP_IOMUXC_GPR_BASE_ADDR + MX8MP_IOMUXC_GPR1);
>  	val |= MX8MP_IOMUXC_GPR1_ENET1_RGMII_EN;
>  	writel(val, MX8MP_IOMUXC_GPR_BASE_ADDR + MX8MP_IOMUXC_GPR1);
>  
>  	return 0;
>  }
> -coredevice_initcall(nxp_imx8mp_evk_init);
> +
> +static const struct of_device_id nxp_imx8mp_evk_of_match[] = {
> +	{ .compatible = "fsl,imx8mp-evk" },
> +	{ /* Sentinel */ }
> +};
> +BAREBOX_DEEP_PROBE_ENABLE(nxp_imx8mp_evk_of_match);
> +
> +static struct driver_d nxp_imx8mp_evk_board_driver = {
> +	.name = "board-nxp-imx8mp-evk",
> +	.probe = nxp_imx8mp_evk_probe,
> +	.of_compatible = nxp_imx8mp_evk_of_match,
> +};
> +coredevice_platform_driver(nxp_imx8mp_evk_board_driver);
> -- 
> 2.30.2
> 
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



      parent reply	other threads:[~2022-10-18  9:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-17 16:18 Marco Felsch
2022-10-17 16:18 ` [PATCH next 2/3] ARM: dts: i.MX8MP: assume hsio power domain to be powered Marco Felsch
2022-10-17 16:39   ` Ahmad Fatoum
2022-10-17 16:18 ` [PATCH next 3/3] ARM: i.MX8M: align SIP_BUILDINFO with the tf-a define Marco Felsch
2022-10-17 16:39   ` Ahmad Fatoum
2022-10-17 16:38 ` [PATCH next 1/3] ARM: i.MX8MP: EVK: convert to board driver and enable deep-probe Ahmad Fatoum
2022-10-18  9:04 ` Sascha Hauer [this message]

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=20221018090400.GO6702@pengutronix.de \
    --to=sha@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=m.felsch@pengutronix.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