mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Marco Felsch <m.felsch@pengutronix.de>
Cc: Barebox List <barebox@lists.infradead.org>
Subject: Re: [PATCH 4/7] ARM: i.MX93: add imx93_barebox_entry()
Date: Mon, 22 Jan 2024 11:20:24 +0100	[thread overview]
Message-ID: <20240122102024.GT4700@pengutronix.de> (raw)
In-Reply-To: <20240119152103.4nhg4jtfctrfvl6v@pengutronix.de>

On Fri, Jan 19, 2024 at 04:21:03PM +0100, Marco Felsch wrote:
> On 24-01-19, Sascha Hauer wrote:
> > We already have support for detecting the DDR size automatically on
> > i.MX93. Create imx93_barebox_entry() from it and use it instead of
> > the hardcoded DDR size in the tqmba9xxxca board.
> > 
> > Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> > ---
> >  arch/arm/boards/tqmba9xxxca/lowlevel.c |  4 +++-
> >  arch/arm/mach-imx/esdctl.c             | 15 ++++++++++++---
> >  include/mach/imx/esdctl.h              |  1 +
> >  3 files changed, 16 insertions(+), 4 deletions(-)
> > 
> > diff --git a/arch/arm/boards/tqmba9xxxca/lowlevel.c b/arch/arm/boards/tqmba9xxxca/lowlevel.c
> > index 0a57d02451..64913b8de9 100644
> > --- a/arch/arm/boards/tqmba9xxxca/lowlevel.c
> > +++ b/arch/arm/boards/tqmba9xxxca/lowlevel.c
> > @@ -4,11 +4,13 @@
> >  #include <debug_ll.h>
> >  #include <mach/imx/debug_ll.h>
> >  #include <mach/imx/generic.h>
> > +#include <mach/imx/xload.h>
> >  #include <asm/barebox-arm.h>
> >  #include <soc/imx9/ddr.h>
> >  #include <mach/imx/atf.h>
> >  #include <mach/imx/xload.h>
> >  #include <mach/imx/romapi.h>
> > +#include <mach/imx/esdctl.h>
> >  
> >  extern char __dtb_z_imx93_tqma9352_mba93xxca_start[];
> >  extern struct dram_timing_info tqma93xxca_dram_timing;
> > @@ -29,7 +31,7 @@ static noinline void tqma9352_mba93xxca_continue(void)
> >  		imx93_load_and_start_image_via_tfa();
> >  	}
> >  
> > -	barebox_arm_entry(0x80000000, 0x40000000, __dtb_z_imx93_tqma9352_mba93xxca_start);
> > +	imx93_barebox_entry(__dtb_z_imx93_tqma9352_mba93xxca_start);
> >  }
> >  
> >  ENTRY_FUNCTION(start_imx93_tqma9352_mba93xxca, r0, r1, r2)
> > diff --git a/arch/arm/mach-imx/esdctl.c b/arch/arm/mach-imx/esdctl.c
> > index 1bd22cc6ef..2dc858c87f 100644
> > --- a/arch/arm/mach-imx/esdctl.c
> > +++ b/arch/arm/mach-imx/esdctl.c
> > @@ -563,7 +563,7 @@ static int imx8mn_ddrc_add_mem(void *mmdcbase, struct imx_esdctl_data *data)
> >  #define IMX9_DDRC_CS_COL_BITS	GENMASK(2, 0)
> >  #define IMX9_DDRC_CS_EN		BIT(31)
> >  
> > -static int imx9_ddrc_add_mem(void *mmdcbase, struct imx_esdctl_data *data)
> > +static resource_size_t imx9_ddrc_sdram_size(void __iomem *mmdcbase)
> >  {
> >  	int width = 2;
> >  	int banks = 8;
> > @@ -588,7 +588,12 @@ static int imx9_ddrc_add_mem(void *mmdcbase, struct imx_esdctl_data *data)
> >  		mem += memory_sdram_size(cols, rows, banks, width);
> >  	}
> >  
> > -	return arm_add_mem_device("ram0", data->base0, mem);
> > +	return mem;
> 
> Nit: make mem typeof resource_size_t?

Yes. Added an extra patch for this.

Sascha

-- 
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 |



  reply	other threads:[~2024-01-22 10:21 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-19 14:24 [PATCH 0/7] ARM: Add i.MX93 OP-TEE support Sascha Hauer
2024-01-19 14:24 ` [PATCH 1/7] firmware: add missing FIRMWARE_IMX8MQ_OPTEE symbol Sascha Hauer
2024-01-19 15:10   ` Marco Felsch
2024-01-19 14:24 ` [PATCH 2/7] firmware: add missing include Sascha Hauer
2024-01-19 15:11   ` Marco Felsch
2024-01-19 14:24 ` [PATCH 3/7] firmware: i.MX OP-TEE: Add some Kconfig help Sascha Hauer
2024-01-19 15:12   ` Marco Felsch
2024-01-19 14:24 ` [PATCH 4/7] ARM: i.MX93: add imx93_barebox_entry() Sascha Hauer
2024-01-19 15:21   ` Marco Felsch
2024-01-22 10:20     ` Sascha Hauer [this message]
2024-01-19 14:24 ` [PATCH 5/7] ARM: i.MX: export imx9_ddrc_sdram_size() Sascha Hauer
2024-01-19 15:21   ` Marco Felsch
2024-01-19 14:24 ` [PATCH 6/7] ARM: i.MX93: add scratch space support Sascha Hauer
2024-01-19 15:23   ` Marco Felsch
2024-01-19 14:24 ` [PATCH 7/7] ARM: i.MX93: Add OP-TEE support Sascha Hauer
2024-01-22 10:15 ` [PATCH 0/7] ARM: Add i.MX93 " Sascha Hauer

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=20240122102024.GT4700@pengutronix.de \
    --to=s.hauer@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