From: Dragan Simic <dsimic@manjaro.org>
To: Quentin Schulz <foss+uboot@0leil.net>
Cc: Simon Glass <sjg@chromium.org>,
Philipp Tomsich <philipp.tomsich@vrull.eu>,
Kever Yang <kever.yang@rock-chips.com>,
Tom Rini <trini@konsulko.com>,
Alper Nebi Yasak <alpernebiyasak@gmail.com>,
Peter Robinson <pbrobinson@gmail.com>,
Jagan Teki <jagan@amarulasolutions.com>,
Klaus Goger <klaus.goger@theobroma-systems.com>,
Heiko Stuebner <heiko.stuebner@cherry.de>,
Otavio Salvador <otavio@ossystems.com.br>,
Andy Yan <andy.yan@rock-chips.com>,
Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>,
Lukasz Majewski <lukma@denx.de>,
Sean Anderson <seanga2@gmail.com>,
Joe Hershberger <joe.hershberger@ni.com>,
Ramon Fried <rfried.dev@gmail.com>,
Sughosh Ganu <sughosh.ganu@linaro.org>,
Heinrich Schuchardt <xypron.glpk@gmx.de>,
Anatolij Gustschin <agust@denx.de>,
heiko@sntech.de, u-boot@lists.denx.de,
Quentin Schulz <quentin.schulz@theobroma-systems.com>
Subject: Re: [PATCH 04/18] rockchip: add weak function symbol called at the beginning of misc_init_r
Date: Sat, 03 Feb 2024 14:16:30 +0100 [thread overview]
Message-ID: <d9c47caef288860c8a40e8b7eec609e3@manjaro.org> (raw)
In-Reply-To: <20240123-jaguar-v1-4-1eec1c34953c@theobroma-systems.com>
Hello Quentin,
This patch looks good to me, avoiding unnecessary code duplication
is always welcome. My "Reviewed-by" is included below.
However, I've got some more comments, which I'll send separately
for the other patches in this series.
On 2024-01-23 15:49, Quentin Schulz wrote:
> From: Quentin Schulz <quentin.schulz@theobroma-systems.com>
>
> Most Rockchip boards who override misc_init_r do it only to call
> another
> function and keep the rest unchanged. Therefore to allow for less
> duplication, let's just add a weak function symbol that is called
> inside
> misc_init_r.
>
> Cc: Quentin Schulz <foss+uboot@0leil.net>
> Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Reviewed-by: Dragan Simic <dsimic@manjaro.org>
> ---
> arch/arm/mach-rockchip/board.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/arch/arm/mach-rockchip/board.c
> b/arch/arm/mach-rockchip/board.c
> index 2620530e03f..d5cb59c10fa 100644
> --- a/arch/arm/mach-rockchip/board.c
> +++ b/arch/arm/mach-rockchip/board.c
> @@ -297,6 +297,11 @@ int fastboot_set_reboot_flag(enum
> fastboot_reboot_reason reason)
> #endif
>
> #ifdef CONFIG_MISC_INIT_R
> +__weak int rockchip_early_misc_init_r(void)
> +{
> + return 0;
> +}
> +
> __weak int misc_init_r(void)
> {
> const u32 cpuid_offset = CFG_CPUID_OFFSET;
> @@ -304,6 +309,10 @@ __weak int misc_init_r(void)
> u8 cpuid[cpuid_length];
> int ret;
>
> + ret = rockchip_early_misc_init_r();
> + if (ret)
> + return ret;
> +
> ret = rockchip_cpuid_from_efuse(cpuid_offset, cpuid_length, cpuid);
> if (ret)
> return ret;
next prev parent reply other threads:[~2024-02-03 13:16 UTC|newest]
Thread overview: 77+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-23 14:49 [PATCH 00/18] rockchip: add support for Theobroma JAGUAR SBC-RK3588-AMR Quentin Schulz
2024-01-23 14:49 ` [PATCH 01/18] rockchip: rk3588: use mainline pmu-grf compatible Quentin Schulz
2024-02-01 2:47 ` Kever Yang
2024-02-02 4:25 ` Weizhao Ouyang
2024-01-23 14:49 ` [PATCH 02/18] rockchip: rk3588: sync rk3588s dtsi from v6.8-rc1 Quentin Schulz
2024-02-01 2:47 ` Kever Yang
2024-01-23 14:49 ` [PATCH 03/18] rockchip: avoid out-of-bounds when computing cpuid Quentin Schulz
2024-02-01 2:48 ` Kever Yang
2024-01-23 14:49 ` [PATCH 04/18] rockchip: add weak function symbol called at the beginning of misc_init_r Quentin Schulz
2024-02-01 2:48 ` Kever Yang
2024-02-03 13:16 ` Dragan Simic [this message]
2024-01-23 14:49 ` [PATCH 05/18] rockchip: google: gru: migrate to rockchip_early_misc_init_r Quentin Schulz
2024-02-01 2:48 ` Kever Yang
2024-01-23 14:49 ` [PATCH 06/18] rockchip: pine64: pinebook: " Quentin Schulz
2024-02-01 2:48 ` Kever Yang
2024-02-01 4:02 ` Dragan Simic
2024-02-01 17:46 ` Quentin Schulz
2024-02-01 17:56 ` Dragan Simic
2024-02-03 13:18 ` Dragan Simic
2024-01-23 14:49 ` [PATCH 07/18] rockchip: pine64: pinephone: " Quentin Schulz
2024-02-01 2:48 ` Kever Yang
2024-02-03 13:18 ` Dragan Simic
2024-01-23 14:49 ` [PATCH 08/18] rockchip: pine64: rockpro64: " Quentin Schulz
2024-02-01 2:48 ` Kever Yang
2024-02-03 13:19 ` Dragan Simic
2024-02-03 14:18 ` Jonas Karlman
2024-02-03 15:18 ` Dragan Simic
2024-02-04 4:21 ` Dragan Simic
2024-02-04 9:46 ` Jonas Karlman
2024-02-04 10:39 ` Dragan Simic
2024-02-06 12:26 ` Quentin Schulz
2024-02-06 12:33 ` Dragan Simic
2024-02-06 12:37 ` Quentin Schulz
2024-02-06 12:42 ` Dragan Simic
2024-01-23 14:49 ` [PATCH 09/18] rockchip: theobroma-systems: puma: " Quentin Schulz
2024-02-01 2:49 ` Kever Yang
2024-01-23 14:49 ` [PATCH 10/18] rockchip: theobroma-systems: ringneck: " Quentin Schulz
2024-02-01 2:49 ` Kever Yang
2024-01-23 14:49 ` [PATCH 11/18] rockchip: merge misc.c into board.c Quentin Schulz
2024-02-01 2:49 ` Kever Yang
2024-01-23 14:49 ` [PATCH 12/18] rockchip: transform rockchip_capsule_update_board_setup into a weak function symbol Quentin Schulz
2024-02-01 2:49 ` Kever Yang
2024-01-23 14:49 ` [PATCH 13/18] rockchip: rk3588: fix non-working SD controller if booting from other media Quentin Schulz
2024-01-24 10:19 ` Kever Yang
2024-01-24 10:50 ` Quentin Schulz
2024-01-25 10:29 ` Kever Yang
2024-01-25 11:02 ` Quentin Schulz
2024-01-26 2:57 ` Kever Yang
2024-01-26 10:37 ` Quentin Schulz
2024-01-26 11:04 ` Dragan Simic
2024-01-26 11:09 ` Quentin Schulz
2024-01-26 11:24 ` Dragan Simic
2024-01-26 11:29 ` Quentin Schulz
2024-01-26 11:33 ` Dragan Simic
2024-01-26 13:46 ` Quentin Schulz
2024-01-26 19:42 ` Dragan Simic
2024-01-23 14:49 ` [PATCH 14/18] rockchip: rk3588: add constants for some register address spaces Quentin Schulz
2024-02-01 2:58 ` Kever Yang
2024-01-23 14:49 ` [PATCH 15/18] rockchip: migrate hardware.h inclusion into appropriate files Quentin Schulz
2024-01-24 10:46 ` Kever Yang
2024-01-24 11:12 ` Quentin Schulz
2024-01-29 9:55 ` Kever Yang
2024-01-23 14:49 ` [PATCH 16/18] rockchip: include asm/io.h directly in asm/arch-rockchip/hardware.h Quentin Schulz
2024-02-01 2:59 ` Kever Yang
2024-01-23 14:49 ` [PATCH 17/18] rockchip: rk3588: bind MMC controllers in U-Boot proper pre-reloc Quentin Schulz
2024-01-24 10:35 ` Kever Yang
2024-01-24 11:04 ` Quentin Schulz
2024-01-26 8:58 ` Kever Yang
2024-01-26 9:32 ` Quentin Schulz
2024-01-26 10:56 ` Kever Yang
2024-01-26 16:18 ` Quentin Schulz
2024-01-29 10:35 ` Kever Yang
2024-01-31 17:55 ` Quentin Schulz
2024-02-01 2:43 ` Kever Yang
2024-01-23 14:49 ` [PATCH 18/18] board: rockchip: add Theobroma-Systems RK3588 Jaguar SBC Quentin Schulz
2024-01-23 18:04 ` Quentin Schulz
2024-02-01 2:46 ` Kever Yang
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=d9c47caef288860c8a40e8b7eec609e3@manjaro.org \
--to=dsimic@manjaro.org \
--cc=agust@denx.de \
--cc=alpernebiyasak@gmail.com \
--cc=andy.yan@rock-chips.com \
--cc=foss+uboot@0leil.net \
--cc=heiko.stuebner@cherry.de \
--cc=heiko@sntech.de \
--cc=jagan@amarulasolutions.com \
--cc=joe.hershberger@ni.com \
--cc=kever.yang@rock-chips.com \
--cc=klaus.goger@theobroma-systems.com \
--cc=lukma@denx.de \
--cc=manivannan.sadhasivam@linaro.org \
--cc=otavio@ossystems.com.br \
--cc=pbrobinson@gmail.com \
--cc=philipp.tomsich@vrull.eu \
--cc=quentin.schulz@theobroma-systems.com \
--cc=rfried.dev@gmail.com \
--cc=seanga2@gmail.com \
--cc=sjg@chromium.org \
--cc=sughosh.ganu@linaro.org \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
--cc=xypron.glpk@gmx.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