From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lokesh Vutla Date: Mon, 16 Nov 2020 09:53:11 +0530 Subject: [PATCH 20/26] arm: mach-k3: do board config for PM and RM only if supported In-Reply-To: <20201110090602.2255-21-t-kristo@ti.com> References: <20201110090602.2255-1-t-kristo@ti.com> <20201110090602.2255-21-t-kristo@ti.com> Message-ID: <2d1df8df-4769-be1a-b63c-16ec2adf97de@ti.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 10/11/20 2:35 pm, Tero Kristo wrote: > If the raw PM support is built in, we are operating in the split > firmware approach mode where RM and PM support is not available. In this > case, skip the board config for these two. > > Signed-off-by: Tero Kristo > --- > arch/arm/mach-k3/sysfw-loader.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/arch/arm/mach-k3/sysfw-loader.c b/arch/arm/mach-k3/sysfw-loader.c > index 78c158c63f..154d2df049 100644 > --- a/arch/arm/mach-k3/sysfw-loader.c > +++ b/arch/arm/mach-k3/sysfw-loader.c > @@ -158,11 +158,13 @@ static void k3_sysfw_configure_using_fit(void *fit, > ret); > > /* Apply power/clock (PM) specific configuration to SYSFW */ > +#ifdef CONFIG_CLK_TI_SCI IMHO, using CONFIG_CLK_TI_SCI is hack here. Can we showhow derive this information based on the images loaded in FIT? Thanks and regards, Lokesh > ret = board_ops->board_config_pm(ti_sci, > (u64)(u32)cfg_fragment_addr, > (u32)cfg_fragment_size); > if (ret) > panic("Failed to set board PM configuration (%d)\n", ret); > +#endif > > /* Extract resource management (RM) specific configuration from FIT */ > ret = fit_get_data_by_name(fit, images, SYSFW_CFG_RM, > @@ -171,12 +173,14 @@ static void k3_sysfw_configure_using_fit(void *fit, > panic("Error accessing %s node in FIT (%d)\n", SYSFW_CFG_RM, > ret); > > +#ifdef CONFIG_CLK_TI_SCI > /* Apply resource management (RM) configuration to SYSFW */ > ret = board_ops->board_config_rm(ti_sci, > (u64)(u32)cfg_fragment_addr, > (u32)cfg_fragment_size); > if (ret) > panic("Failed to set board RM configuration (%d)\n", ret); > +#endif > > /* Extract security specific configuration from FIT */ > ret = fit_get_data_by_name(fit, images, SYSFW_CFG_SEC, >