U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Sumit Garg <sumit.garg@kernel.org>
To: Caleb Connolly <caleb.connolly@linaro.org>
Cc: Simon Glass <sjg@chromium.org>, Tom Rini <trini@konsulko.com>,
	Neil Armstrong <neil.armstrong@linaro.org>,
	Lukasz Majewski <lukma@denx.de>,
	Sean Anderson <seanga2@gmail.com>,
	u-boot@lists.denx.de, u-boot-qcom@groups.io
Subject: Re: [PATCH 2/6] mach-snapdragon: use EVT_OF_LIVE_INIT to apply DT fixups
Date: Thu, 10 Apr 2025 14:20:07 +0530	[thread overview]
Message-ID: <Z_eGP_al3bd-BGKU@sumit-X1> (raw)
In-Reply-To: <20250409-livetree-fixup-v1-2-76dfea80b07f@linaro.org>

On Wed, Apr 09, 2025 at 07:17:25PM +0200, Caleb Connolly wrote:
> This will now apply fixups prior to devices being bound, which makes it
> possible to enable/disable devices and adjust more properties that might
> be read before devices probe.
> 
> Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
> ---
>  arch/arm/mach-snapdragon/board.c     |  1 -
>  arch/arm/mach-snapdragon/of_fixup.c  |  7 ++++++-
>  arch/arm/mach-snapdragon/qcom-priv.h | 14 --------------
>  3 files changed, 6 insertions(+), 16 deletions(-)
> 

Reviewed-by: Sumit Garg <sumit.garg@oss.qualcomm.com>

-Sumit

> diff --git a/arch/arm/mach-snapdragon/board.c b/arch/arm/mach-snapdragon/board.c
> index deae4d323789eab75d5fe735159b4cd820c02c45..3ab75f0fce02ecffd476ebe2aa606b1a9024bbec 100644
> --- a/arch/arm/mach-snapdragon/board.c
> +++ b/arch/arm/mach-snapdragon/board.c
> @@ -305,9 +305,8 @@ void __weak qcom_board_init(void)
>  
>  int board_init(void)
>  {
>  	show_psci_version();
> -	qcom_of_fixup_nodes();
>  	qcom_board_init();
>  	return 0;
>  }
>  
> diff --git a/arch/arm/mach-snapdragon/of_fixup.c b/arch/arm/mach-snapdragon/of_fixup.c
> index 1ea0c18c2f2789a8aa054cd95bb9e4308d6b3384..d4e24059212c552de7fa7555d2ab8a1ea4fc4cb2 100644
> --- a/arch/arm/mach-snapdragon/of_fixup.c
> +++ b/arch/arm/mach-snapdragon/of_fixup.c
> @@ -21,8 +21,9 @@
>  
>  #include <dt-bindings/input/linux-event-codes.h>
>  #include <dm/of_access.h>
>  #include <dm/of.h>
> +#include <event.h>
>  #include <fdt_support.h>
>  #include <linux/errno.h>
>  #include <stdlib.h>
>  #include <time.h>
> @@ -149,14 +150,18 @@ static void fixup_power_domains(void)
>  		func(__VA_ARGS__); \
>  		debug(#func " took %lluus\n", timer_get_us() - start); \
>  	} while (0)
>  
> -void qcom_of_fixup_nodes(void)
> +static int qcom_of_fixup_nodes(void)
>  {
>  	time_call(fixup_usb_nodes);
>  	time_call(fixup_power_domains);
> +
> +	return 0;
>  }
>  
> +EVENT_SPY_SIMPLE(EVT_OF_LIVE_INIT, qcom_of_fixup_nodes);
> +
>  int ft_board_setup(void *blob, struct bd_info __maybe_unused *bd)
>  {
>  	struct fdt_header *fdt = blob;
>  	int node;
> diff --git a/arch/arm/mach-snapdragon/qcom-priv.h b/arch/arm/mach-snapdragon/qcom-priv.h
> index 74d39197b89f4e769299b06214c26ee829ecdce0..4f398e2ba374f27811afd2ccf6e72037d0f9ee7f 100644
> --- a/arch/arm/mach-snapdragon/qcom-priv.h
> +++ b/arch/arm/mach-snapdragon/qcom-priv.h
> @@ -8,19 +8,5 @@ void qcom_configure_capsule_updates(void);
>  #else
>  void qcom_configure_capsule_updates(void) {}
>  #endif /* EFI_HAVE_CAPSULE_SUPPORT */
>  
> -#if CONFIG_IS_ENABLED(OF_LIVE)
> -/**
> - * qcom_of_fixup_nodes() - Fixup Qualcomm DT nodes
> - *
> - * Adjusts nodes in the live tree to improve compatibility with U-Boot.
> - */
> -void qcom_of_fixup_nodes(void);
> -#else
> -static inline void qcom_of_fixup_nodes(void)
> -{
> -	log_debug("Unable to dynamically fixup USB nodes, please enable CONFIG_OF_LIVE\n");
> -}
> -#endif /* OF_LIVE */
> -
>  #endif /* __QCOM_PRIV_H__ */
> 
> -- 
> 2.49.0
> 

  reply	other threads:[~2025-04-10  8:50 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-09 17:17 [PATCH 0/6] Qualcomm: cleanup OF_LIVE fixup and fix RB1/2 Caleb Connolly
2025-04-09 17:17 ` [PATCH 1/6] event: signal when livetree has been built Caleb Connolly
2025-04-10  8:44   ` Sumit Garg
2025-04-10  8:54   ` Neil Armstrong
2025-04-10 11:27   ` Simon Glass
2025-04-10 13:00     ` Caleb Connolly
2025-04-10 13:07       ` Simon Glass
2025-04-10 14:04         ` Caleb Connolly
2025-04-10 14:15           ` Simon Glass
2025-04-10 15:41             ` Caleb Connolly
2025-04-10 21:25               ` Simon Glass
2025-04-11 11:52                 ` Caleb Connolly
2025-04-11 18:30                   ` Simon Glass
2025-04-09 17:17 ` [PATCH 2/6] mach-snapdragon: use EVT_OF_LIVE_INIT to apply DT fixups Caleb Connolly
2025-04-10  8:50   ` Sumit Garg [this message]
2025-04-10  8:54   ` Neil Armstrong
2025-04-09 17:17 ` [PATCH 3/6] mach-snapdragon: of_fixup: skip disabled USB nodes Caleb Connolly
2025-04-10  7:45   ` Neil Armstrong
2025-04-10  8:51   ` Sumit Garg
2025-04-09 17:17 ` [PATCH 4/6] clk/qcom: qcm2290: show clock name in set_rate() Caleb Connolly
2025-04-10  7:45   ` Neil Armstrong
2025-04-10  8:51   ` Sumit Garg
2025-04-09 17:17 ` [PATCH 5/6] mach-snapdragon: of_fixup: set dr_mode for RB1/2 boards Caleb Connolly
2025-04-10  7:46   ` Neil Armstrong
2025-04-10  9:04   ` Sumit Garg
2025-04-09 17:17 ` [PATCH 6/6] pinctrl: qcom: qcm2290: fix off by 1 in pin_count Caleb Connolly
2025-04-10  7:46   ` Neil Armstrong
2025-04-10  9:05   ` Sumit Garg
2025-04-10  8:41 ` [PATCH 0/6] Qualcomm: cleanup OF_LIVE fixup and fix RB1/2 Sumit Garg
2025-04-10  9:54 ` Caleb Connolly

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=Z_eGP_al3bd-BGKU@sumit-X1 \
    --to=sumit.garg@kernel.org \
    --cc=caleb.connolly@linaro.org \
    --cc=lukma@denx.de \
    --cc=neil.armstrong@linaro.org \
    --cc=seanga2@gmail.com \
    --cc=sjg@chromium.org \
    --cc=trini@konsulko.com \
    --cc=u-boot-qcom@groups.io \
    --cc=u-boot@lists.denx.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