From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Marco Felsch <m.felsch@pengutronix.de>
Cc: barebox@lists.infradead.org, David Jander <david@protonic.nl>
Subject: Re: [PATCH] ARM: i.MX8MM: Consolidate common code to load image and jump to it via TF-A
Date: Wed, 6 Jul 2022 16:48:40 +0200 [thread overview]
Message-ID: <20220706144840.tef4xfgzop4pyb3z@pengutronix.de> (raw)
In-Reply-To: <20220706120135.2mbr6t6ri7yr5d3j@pengutronix.de>
[-- Attachment #1: Type: text/plain, Size: 1633 bytes --]
On Wed, Jul 06, 2022 at 02:01:35PM +0200, Marco Felsch wrote:
> Hi Uwe,
>
> thanks for the patch.
>
> On 22-07-06, Uwe Kleine-König wrote:
>
> ...
>
> > @@ -96,11 +92,6 @@ extern struct dram_timing_info imx8mm_evk_dram_timing;
> >
> > static void start_atf(void)
> > {
> > - size_t bl31_size;
> > - const u8 *bl31;
> > - enum bootsource src;
> > - int instance;
> > -
> > /*
> > * If we are in EL3 we are running for the first time and need to
> > * initialize the DRAM and run TF-A (BL31). The TF-A will then jump
> > @@ -112,35 +103,7 @@ static void start_atf(void)
> > power_init_board();
> > imx8mm_ddr_init(&imx8mm_evk_dram_timing);
>
> I would move the imx8mm_ddr_init() into your helper
> imx8mm_load_and_start_image_via_tfa() and pass the timing as argument.
I thought about that, but didn't find a nice function name for that.
imx8mm_ddr_init_load_and_start_image_via_tfa_prepare_coffee() is a bit
long ... :-) Also while these things are "normal" in this order in the
PBL board code, mixing too many things in a single function isn't only
advantageous. I like it to have memory initialisation and image loading
in separate steps---my subjective view.
> So your helper doesn't depend on the 'hopefully' intialized DRAM. Else I
> would add a comment above your helper, that the DRAM must be initialized
> before calling this function.
Several functions depend on initialized DRAM.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2022-07-06 14:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-06 8:12 Uwe Kleine-König
2022-07-06 12:01 ` Marco Felsch
2022-07-06 14:48 ` Uwe Kleine-König [this message]
2022-07-11 10:51 ` 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=20220706144840.tef4xfgzop4pyb3z@pengutronix.de \
--to=u.kleine-koenig@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=david@protonic.nl \
--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