Re: [PATCH 4/7] ARM: i.MX93: add imx93_barebox_entry()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux