From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Subject: Re: [PATCH v2 4/6] ARM: Rockchip: rk3568: use rk3568_barebox_entry()
Date: Wed, 5 Apr 2023 08:48:45 +0200 [thread overview]
Message-ID: <20230405064845.GJ15436@pengutronix.de> (raw)
In-Reply-To: <20230328074037.1202993-5-s.hauer@pengutronix.de>
On Tue, Mar 28, 2023 at 09:40:35AM +0200, Sascha Hauer wrote:
> There is a rk3568 specific entry function for barebox now, switch
> the existing boards over to use it.
>
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> ---
> arch/arm/boards/pine64-quartz64/lowlevel.c | 30 +++--------------
> arch/arm/boards/radxa-rock3/lowlevel.c | 31 +++---------------
> .../rockchip-rk3568-bpi-r2pro/lowlevel.c | 31 +++---------------
> .../arm/boards/rockchip-rk3568-evb/lowlevel.c | 32 +++----------------
> 4 files changed, 17 insertions(+), 107 deletions(-)
>
> diff --git a/arch/arm/boards/pine64-quartz64/lowlevel.c b/arch/arm/boards/pine64-quartz64/lowlevel.c
> index 1e63c0e698..975f8aa51c 100644
> --- a/arch/arm/boards/pine64-quartz64/lowlevel.c
> +++ b/arch/arm/boards/pine64-quartz64/lowlevel.c
> @@ -1,41 +1,19 @@
> // SPDX-License-Identifier: GPL-2.0-only
> +
> #include <common.h>
> -#include <linux/sizes.h>
> -#include <asm/barebox-arm-head.h>
> #include <asm/barebox-arm.h>
> #include <mach/rockchip/hardware.h>
> #include <mach/rockchip/atf.h>
> #include <debug_ll.h>
> -#include <mach/rockchip/rockchip.h>
>
> extern char __dtb_rk3566_quartz64_a_start[];
>
> -static noinline void start_quartz64(void)
> -{
> - void *fdt = __dtb_rk3566_quartz64_a_start;
> -
> - if (current_el() == 3) {
> - rk3568_lowlevel_init();
> - rk3568_atf_load_bl31(fdt);
> - /* not reached */
> - }
> -
> - barebox_arm_entry(RK3568_DRAM_BOTTOM, 0x80000000 - RK3568_DRAM_BOTTOM,
> - fdt);
> -}
> -
> ENTRY_FUNCTION(start_quartz64a, r0, r1, r2)
> {
> - /*
> - * Image execution starts at 0x0, but this is used for ATF and
> - * OP-TEE later, so move away from here.
> - */
> - if (current_el() == 3)
> - relocate_to_adr_full(RK3568_BAREBOX_LOAD_ADDRESS);
> - else
> - relocate_to_current_adr();
> + putc_ll('>');
>
> + relocate_to_adr_full(RK3568_BAREBOX_LOAD_ADDRESS);
This doesn't work when barebox is started from another barebox, because
it places the new barebox at an address near
RK3568_BAREBOX_LOAD_ADDRESS. Calling relocate_to_adr_full() will
partly overwrite the image. I'll revert this change to what has been
done before:
if (current_el() == 3)
relocate_to_adr_full(RK3568_BAREBOX_LOAD_ADDRESS);
else
relocate_to_current_adr();
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 |
next prev parent reply other threads:[~2023-04-05 6:50 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-28 7:40 [PATCH v2 0/6] ARM: Rockchip: Read amount of memory from DDR controller Sascha Hauer
2023-03-28 7:40 ` [PATCH v2 1/6] ARM: dts: rk356x: Add DMC controller node Sascha Hauer
2023-03-28 7:40 ` [PATCH v2 2/6] ARM: Rockchip: implement memory read out from controller Sascha Hauer
2023-03-28 8:18 ` Sascha Hauer
2023-04-03 19:43 ` Sascha Hauer
2023-04-04 6:25 ` Michael Riesch
2023-03-28 7:40 ` [PATCH v2 3/6] ARM: Rockchip: Add rk3568 specific barebox entry function Sascha Hauer
2023-03-28 7:40 ` [PATCH v2 4/6] ARM: Rockchip: rk3568: use rk3568_barebox_entry() Sascha Hauer
2023-04-05 6:48 ` Sascha Hauer [this message]
2023-03-28 7:40 ` [PATCH v2 5/6] ARM: Rockchip: make bootsource logic generic to all SoCs Sascha Hauer
2023-03-28 7:40 ` [PATCH v2 6/6] ARM: Rockchip: Do not pass device tree to TF-A Sascha Hauer
2023-03-31 15:42 ` [PATCH v2 0/6] ARM: Rockchip: Read amount of memory from DDR controller Michael Riesch
2023-04-03 7:32 ` Sascha Hauer
2023-04-03 10:04 ` Michael Riesch
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=20230405064845.GJ15436@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
/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