mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <sha@pengutronix.de>
To: Johannes Schneider <johannes.schneider@leica-geosystems.com>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH v4] ARM: i.MX8M: separate function call for clock_init
Date: Thu, 12 Jan 2023 16:01:18 +0100	[thread overview]
Message-ID: <20230112150118.GY24755@pengutronix.de> (raw)
In-Reply-To: <20230111113729.779283-1-johannes.schneider@leica-geosystems.com>

On Wed, Jan 11, 2023 at 12:37:29PM +0100, Johannes Schneider wrote:
> Add a separate function call for imx8mp_early_clock_init, to avoid
> confusion with imx8mm.
> 
> Signed-off-by: Johannes Schneider <johannes.schneider@leica-geosystems.com>
> ---
>  arch/arm/boards/nxp-imx8mp-evk/lowlevel.c       |  2 +-
>  arch/arm/boards/tqma8mpxl/lowlevel.c            |  2 +-
>  arch/arm/mach-imx/imx8m.c                       | 12 +++++++++---
>  arch/arm/mach-imx/include/mach/imx8m-ccm-regs.h |  1 +
>  4 files changed, 12 insertions(+), 5 deletions(-)

Applied, thanks

Sascha

> 
> diff --git a/arch/arm/boards/nxp-imx8mp-evk/lowlevel.c b/arch/arm/boards/nxp-imx8mp-evk/lowlevel.c
> index 4f24dd4cd4..3cb24df1ca 100644
> --- a/arch/arm/boards/nxp-imx8mp-evk/lowlevel.c
> +++ b/arch/arm/boards/nxp-imx8mp-evk/lowlevel.c
> @@ -72,7 +72,7 @@ static void power_init_board(void)
>  	imx8mp_setup_pad(MX8MP_PAD_I2C1_SCL__I2C1_SCL | I2C_PAD_CTRL);
>  	imx8mp_setup_pad(MX8MP_PAD_I2C1_SDA__I2C1_SDA | I2C_PAD_CTRL);
>  
> -	imx8mm_early_clock_init();
> +	imx8mp_early_clock_init();
>  	imx8m_ccgr_clock_enable(IMX8M_CCM_CCGR_I2C1);
>  
>  	i2c = imx8m_i2c_early_init(IOMEM(MX8MP_I2C1_BASE_ADDR));
> diff --git a/arch/arm/boards/tqma8mpxl/lowlevel.c b/arch/arm/boards/tqma8mpxl/lowlevel.c
> index 0ce0e7a73b..037c7abf4b 100644
> --- a/arch/arm/boards/tqma8mpxl/lowlevel.c
> +++ b/arch/arm/boards/tqma8mpxl/lowlevel.c
> @@ -73,7 +73,7 @@ static void power_init_board(void)
>  	imx8mp_setup_pad(MX8MP_PAD_I2C1_SCL__I2C1_SCL | I2C_PAD_CTRL);
>  	imx8mp_setup_pad(MX8MP_PAD_I2C1_SDA__I2C1_SDA | I2C_PAD_CTRL);
>  
> -	imx8mm_early_clock_init();
> +	imx8mp_early_clock_init();
>  	imx8m_ccgr_clock_enable(IMX8M_CCM_CCGR_I2C1);
>  
>  	i2c = imx8m_i2c_early_init(IOMEM(MX8MP_I2C1_BASE_ADDR));
> diff --git a/arch/arm/mach-imx/imx8m.c b/arch/arm/mach-imx/imx8m.c
> index 9758525b54..7f3856e545 100644
> --- a/arch/arm/mach-imx/imx8m.c
> +++ b/arch/arm/mach-imx/imx8m.c
> @@ -182,7 +182,7 @@ int imx8mq_init(void)
>  #define IMX8MM_CCM_ANALOG_SYS_PLL2_GEN_CTRL	0x104
>  #define IMX8MM_CCM_ANALOG_SYS_PLL3_GEN_CTRL	0x114
>  
> -static void __imx8mm_early_clock_init(unsigned long pll3_freq) /* and later */
> +static void __imx8m_early_clock_init(unsigned long pll3_freq) /* and later */
>  {
>  	void __iomem *ana = IOMEM(MX8M_ANATOP_BASE_ADDR);
>  	void __iomem *ccm = IOMEM(MX8M_CCM_BASE_ADDR);
> @@ -252,14 +252,20 @@ static void __imx8mm_early_clock_init(unsigned long pll3_freq) /* and later */
>  
>  void imx8mm_early_clock_init(void)
>  {
> -	__imx8mm_early_clock_init(750000000UL);
> +	__imx8m_early_clock_init(750000000UL);
>  }
>  
>  void imx8mn_early_clock_init(void)
>  {
> -	__imx8mm_early_clock_init(600000000UL);
> +	__imx8m_early_clock_init(600000000UL);
>  }
>  
> +void imx8mp_early_clock_init(void)
> +{
> +	__imx8m_early_clock_init(750000000UL);
> +}
> +
> +
>  #define KEEP_ALIVE			0x18
>  #define VER_L				0x1c
>  #define VER_H				0x20
> diff --git a/arch/arm/mach-imx/include/mach/imx8m-ccm-regs.h b/arch/arm/mach-imx/include/mach/imx8m-ccm-regs.h
> index eeb15f4dd0..659615e1cc 100644
> --- a/arch/arm/mach-imx/include/mach/imx8m-ccm-regs.h
> +++ b/arch/arm/mach-imx/include/mach/imx8m-ccm-regs.h
> @@ -53,6 +53,7 @@
>  void imx8m_early_setup_uart_clock(void);
>  void imx8mm_early_clock_init(void);
>  void imx8mn_early_clock_init(void);
> +void imx8mp_early_clock_init(void);
>  void imx8m_clock_set_target_val(int clock_id, u32 val);
>  void imx8m_ccgr_clock_enable(int index);
>  void imx8m_ccgr_clock_disable(int index);
> -- 
> 2.25.1
> 
> 
> 

-- 
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:[~2023-01-12 15:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-11 11:37 Johannes Schneider
2023-01-11 11:43 ` Ahmad Fatoum
2023-01-12 15:01 ` 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=20230112150118.GY24755@pengutronix.de \
    --to=sha@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=johannes.schneider@leica-geosystems.com \
    /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