public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Suman Anna <s-anna@ti.com>
To: u-boot@lists.denx.de
Subject: [PATCH v2 11/18] arm: mach-k3: j7200: Detect if ROM has already loaded sysfw
Date: Mon, 27 Jul 2020 12:36:56 -0500	[thread overview]
Message-ID: <9e701c4d-d77b-c232-a30e-89decfc36312@ti.com> (raw)
In-Reply-To: <20200727094543.28484-12-lokeshvutla@ti.com>

On 7/27/20 4:45 AM, Lokesh Vutla wrote:
> Detect if sysfw is already loaded by ROM and pass this information to
> sysfw loader. Based on this information sysfw loader either loads the
> sysfw image from boot media or just received the boot notification

%s/received/receives/

Pending the discussion on the argument list on k3_sysfw_loader(),

Reviewed-by: Suman Anna <s-anna@ti.com>

regards
Suman

> message form sysfw.
> 
> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
> ---
>   arch/arm/mach-k3/common.c     | 8 ++++++++
>   arch/arm/mach-k3/common.h     | 2 ++
>   arch/arm/mach-k3/j721e_init.c | 3 ++-
>   3 files changed, 12 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm/mach-k3/common.c b/arch/arm/mach-k3/common.c
> index d065bdbc83..7b0369ffb0 100644
> --- a/arch/arm/mach-k3/common.c
> +++ b/arch/arm/mach-k3/common.c
> @@ -71,6 +71,14 @@ void mmr_unlock(phys_addr_t base, u32 partition)
>   	writel(CTRLMMR_LOCK_KICK1_UNLOCK_VAL, part_base + CTRLMMR_LOCK_KICK1);
>   }
>   
> +bool is_rom_loaded_sysfw(struct rom_extended_boot_data *data)
> +{
> +	if (strncmp(data->header, K3_ROM_BOOT_HEADER_MAGIC, 7))
> +		return false;
> +
> +	return data->num_components > 1;
> +}
> +
>   DECLARE_GLOBAL_DATA_PTR;
>   
>   #ifdef CONFIG_K3_EARLY_CONS
> diff --git a/arch/arm/mach-k3/common.h b/arch/arm/mach-k3/common.h
> index 8f5a5f323a..15a98fb653 100644
> --- a/arch/arm/mach-k3/common.h
> +++ b/arch/arm/mach-k3/common.h
> @@ -7,6 +7,7 @@
>    */
>   
>   #include <asm/armv7_mpu.h>
> +#include <asm/hardware.h>
>   
>   #define AM65X	0xbb5a
>   #define J721E	0xbb64
> @@ -30,3 +31,4 @@ int load_firmware(char *name_fw, char *name_loadaddr, u32 *loadaddr);
>   void k3_sysfw_print_ver(void);
>   void spl_enable_dcache(void);
>   void mmr_unlock(phys_addr_t base, u32 partition);
> +bool is_rom_loaded_sysfw(struct rom_extended_boot_data *data);
> diff --git a/arch/arm/mach-k3/j721e_init.c b/arch/arm/mach-k3/j721e_init.c
> index 6246de3a26..a36e4ed603 100644
> --- a/arch/arm/mach-k3/j721e_init.c
> +++ b/arch/arm/mach-k3/j721e_init.c
> @@ -177,7 +177,8 @@ void board_init_f(ulong dummy)
>   	 * callback hook, effectively switching on (or over) the console
>   	 * output.
>   	 */
> -	k3_sysfw_loader(false, k3_mmc_stop_clock, k3_mmc_restart_clock);
> +	k3_sysfw_loader(is_rom_loaded_sysfw(&bootdata),
> +			k3_mmc_stop_clock, k3_mmc_restart_clock);
>   
>   	/* Prepare console output */
>   	preloader_console_init();
> 

  reply	other threads:[~2020-07-27 17:36 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-27  9:45 [PATCH v2 00/18] arm: mach-k3: Initial support for Texas Instrument's J7200 Platform Lokesh Vutla
2020-07-27  9:45 ` [PATCH v2 01/18] board: ti: board_detect: Add stub functions for EEPROM detection apis Lokesh Vutla
2020-07-27  9:45 ` [PATCH v2 02/18] board: ti: j721e: Probe eeprom only when CONFIG_TI_I2C_BOARD_DETECT is defined Lokesh Vutla
2020-07-27  9:45 ` [PATCH v2 03/18] board: ti: j721e: Update fdt fixup logic for interconnect nodes Lokesh Vutla
2020-07-27  9:45 ` [PATCH v2 04/18] arm: mach-k3: Fix platform hang when SPL_MULTI_DTB_FIT is not enabled Lokesh Vutla
2020-07-27  9:45 ` [PATCH v2 05/18] arm: mach-k3: Move mmr_unlock to a common location Lokesh Vutla
2020-07-27 17:12   ` Suman Anna
2020-07-27  9:45 ` [PATCH v2 06/18] arm: mach-k3: sysfw-loader: Add support for rom loading sysfw image Lokesh Vutla
2020-07-27 17:17   ` Suman Anna
2020-07-29  2:35     ` Lokesh Vutla
2020-07-27  9:45 ` [PATCH v2 07/18] arm: mach-k3: j721e: Add detection for j721e Lokesh Vutla
2020-07-27  9:45 ` [PATCH v2 08/18] arm: mach-k3: j721e: Fix unlocking control module registers Lokesh Vutla
2020-07-27 17:19   ` Suman Anna
2020-07-27  9:45 ` [PATCH v2 09/18] arm: mach-k3: j7200: Add support for SOC detection Lokesh Vutla
2020-07-27  9:45 ` [PATCH v2 10/18] arm: mach-k3: j7200: Add support for storing extended boot info from ROM Lokesh Vutla
2020-07-27 17:34   ` Suman Anna
2020-07-27  9:45 ` [PATCH v2 11/18] arm: mach-k3: j7200: Detect if ROM has already loaded sysfw Lokesh Vutla
2020-07-27 17:36   ` Suman Anna [this message]
2020-07-27  9:45 ` [PATCH v2 12/18] board: ti: j7200: Introduce support for j7200 build targets Lokesh Vutla
2020-08-05  8:50   ` Vignesh Raghavendra
2020-08-05 14:00     ` Lokesh Vutla
2020-07-27  9:45 ` [PATCH v2 13/18] board: ti: j7200: Add board detection support for j7200 Lokesh Vutla
2020-07-27 17:38   ` Suman Anna
2020-07-27  9:45 ` [PATCH v2 14/18] ram: k3-j721e: Relax version checks for memory controller Lokesh Vutla
2020-07-27  9:45 ` [PATCH v2 15/18] arm: dts: k3-j7200: Add dts support Lokesh Vutla
2020-08-04 14:11   ` Vignesh Raghavendra
2020-07-27  9:45 ` [PATCH v2 16/18] arm: dts: k3-j7200: Add R5 specific " Lokesh Vutla
2020-07-27  9:45 ` [PATCH v2 17/18] configs: j7200_evm_r5: Add initial support Lokesh Vutla
2020-07-27  9:45 ` [PATCH v2 18/18] configs: j7200_evm_a72: Add Initial support Lokesh Vutla
2020-08-04 15:25   ` Vignesh Raghavendra

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=9e701c4d-d77b-c232-a30e-89decfc36312@ti.com \
    --to=s-anna@ti.com \
    --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