mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Alexander Shiyan <eagle.alexander923@gmail.com>,
	barebox@lists.infradead.org
Subject: Re: [PATCH] ARM: clps711x: Switch to devicetree usage
Date: Fri, 20 May 2022 11:56:23 +0200	[thread overview]
Message-ID: <30d02935-d1c8-edb2-2117-3ac6f1e0f7d6@pengutronix.de> (raw)
In-Reply-To: <20220520082428.32385-1-eagle.alexander923@gmail.com>

Hello,

On 20.05.22 10:24, Alexander Shiyan wrote:
> This is a complex patch that switches the ARM CLPS711X architecture
> to work with the device tree. Includes changes to board initialization
> and any architecture drivers used.
> 
> Signed-off-by: Alexander Shiyan <eagle.alexander923@gmail.com>

> diff --git a/arch/arm/boards/clep7212/Makefile b/arch/arm/boards/clep7212/Makefile
> index 096120e567..85d92c8a7f 100644
> --- a/arch/arm/boards/clep7212/Makefile
> +++ b/arch/arm/boards/clep7212/Makefile

> +static __init int clep7212_fixup(void)
> +{
> +	if (of_machine_is_compatible("cirrus,ep7209"))
> +		of_register_fixup(clep7212_dt_fixup, NULL);
> +
> +	return 0;
> +}
> +postcore_initcall(clep7212_fixup);

You can replace this with the new barebox_set_serial_number(), see:
https://git.pengutronix.de/cgit/barebox/commit/?h=next&id=f6756e9ce6f26dc22506e25bd5cf1a4f6a173636

> -void __naked __bare_init barebox_arm_reset_vector(uint32_t r0, uint32_t r1, uint32_t r2)
> +ENTRY_FUNCTION(start_ep7212_clep7212, r0, r1, r2)
>  {
> +	void *fdt;
> +
>  	arm_cpu_lowlevel_init();
>  
> -	clps711x_barebox_entry(CLPS711X_CPU_PLL_MULT, NULL);
> +	/* Stack in SRAM */
> +	arm_setup_stack(CS6_BASE - 16);

please use ENTRY_FUNCTION_WITHSTACK instead to be a bit more
future-proof. Also - 16 is not necessary, see
6b3dc4abd884 ("ARM: Cleanup stack offset cargo cult").

> diff --git a/arch/arm/mach-clps711x/common.c b/arch/arm/mach-clps711x/common.c
> new file mode 100644
> index 0000000000..d9f702a9b1
> --- /dev/null
> +++ b/arch/arm/mach-clps711x/common.c

> +static void clps711x_bus_patch(struct device_node *node,
> +			       u32 compare, u32 change)
> +{

Could you add a comment why this is necessary?

Cheers,
Ahmad


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

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


  reply	other threads:[~2022-05-20 11:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-20  8:24 Alexander Shiyan
2022-05-20  9:56 ` Ahmad Fatoum [this message]
2022-05-20 11:31   ` Alexander Shiyan
2022-05-20 11:38     ` 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=30d02935-d1c8-edb2-2117-3ac6f1e0f7d6@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=eagle.alexander923@gmail.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