diff mbox series

[v2,1/6] ARMv8/sec_firmware: Remove SEC_FIRMWARE_FIT_CNF_NAME

Message ID 20220422173840.2260582-2-sean.anderson@seco.com
State Superseded
Delegated to: Peng Fan
Headers show
Series net: fm: Verify Fman microcode | expand

Commit Message

Sean Anderson April 22, 2022, 5:38 p.m. UTC
The config to use for FIT images can be better specified by enabling
CONFIG_MULTI_DTB_FIT and implementing board_fit_config_name_match.

Signed-off-by: Sean Anderson <sean.anderson@seco.com>
---

(no changes since v1)

 arch/arm/cpu/armv8/sec_firmware.c | 17 ++++-------------
 1 file changed, 4 insertions(+), 13 deletions(-)

Comments

Peng Fan (OSS) Aug. 16, 2022, 8:22 a.m. UTC | #1
Hi Sean,

On 4/23/2022 1:38 AM, Sean Anderson wrote:
> The config to use for FIT images can be better specified by enabling
> CONFIG_MULTI_DTB_FIT and implementing board_fit_config_name_match.
> 
> Signed-off-by: Sean Anderson <sean.anderson@seco.com>
> ---

This patchset not able to apply, could you please repost?

Thanks,
Peng.

> 
> (no changes since v1)
> 
>   arch/arm/cpu/armv8/sec_firmware.c | 17 ++++-------------
>   1 file changed, 4 insertions(+), 13 deletions(-)
> 
> diff --git a/arch/arm/cpu/armv8/sec_firmware.c b/arch/arm/cpu/armv8/sec_firmware.c
> index 267894fbcb..41525a10d5 100644
> --- a/arch/arm/cpu/armv8/sec_firmware.c
> +++ b/arch/arm/cpu/armv8/sec_firmware.c
> @@ -35,9 +35,6 @@ phys_addr_t sec_firmware_addr;
>   #ifndef SEC_FIRMWARE_FIT_IMAGE
>   #define SEC_FIRMWARE_FIT_IMAGE		"firmware"
>   #endif
> -#ifndef SEC_FIRMWARE_FIT_CNF_NAME
> -#define SEC_FIRMWARE_FIT_CNF_NAME	"config-1"
> -#endif
>   #ifndef SEC_FIRMWARE_TARGET_EL
>   #define SEC_FIRMWARE_TARGET_EL		2
>   #endif
> @@ -46,15 +43,12 @@ static int sec_firmware_get_data(const void *sec_firmware_img,
>   				const void **data, size_t *size)
>   {
>   	int conf_node_off, fw_node_off;
> -	char *conf_node_name = NULL;
>   	char *desc;
>   	int ret;
>   
> -	conf_node_name = SEC_FIRMWARE_FIT_CNF_NAME;
> -
> -	conf_node_off = fit_conf_get_node(sec_firmware_img, conf_node_name);
> +	conf_node_off = fit_conf_get_node(sec_firmware_img, NULL);
>   	if (conf_node_off < 0) {
> -		printf("SEC Firmware: %s: no such config\n", conf_node_name);
> +		puts("SEC Firmware: no config\n");
>   		return -ENOENT;
>   	}
>   
> @@ -123,18 +117,15 @@ static int sec_firmware_check_copy_loadable(const void *sec_firmware_img,
>   {
>   	phys_addr_t sec_firmware_loadable_addr = 0;
>   	int conf_node_off, ld_node_off, images;
> -	char *conf_node_name = NULL;
>   	const void *data;
>   	size_t size;
>   	ulong load;
>   	const char *name, *str, *type;
>   	int len;
>   
> -	conf_node_name = SEC_FIRMWARE_FIT_CNF_NAME;
> -
> -	conf_node_off = fit_conf_get_node(sec_firmware_img, conf_node_name);
> +	conf_node_off = fit_conf_get_node(sec_firmware_img, NULL);
>   	if (conf_node_off < 0) {
> -		printf("SEC Firmware: %s: no such config\n", conf_node_name);
> +		puts("SEC Firmware: no config\n");
>   		return -ENOENT;
>   	}
>
Sean Anderson Aug. 16, 2022, 3:30 p.m. UTC | #2
Hi Peng,

On 8/16/22 4:22 AM, Peng Fan wrote:
> Hi Sean,
> 
> On 4/23/2022 1:38 AM, Sean Anderson wrote:
>> The config to use for FIT images can be better specified by enabling
>> CONFIG_MULTI_DTB_FIT and implementing board_fit_config_name_match.
>>
>> Signed-off-by: Sean Anderson <sean.anderson@seco.com>
>> ---
> 
> This patchset not able to apply, could you please repost?

I resent, but please note the following comment from the cover letter:

> This series depends on [1]. There is no logical dependency, but they
> modify adjacent #includes, so the last patch will not apply cleanly
> unless that series is applied.
> 
> [1] https://lore.kernel.org/u-boot/20220422173032.2259019-1-sean.anderson@seco.com/

I can rebase things either way, but there is an unavoidable conflict.

--Sean
diff mbox series

Patch

diff --git a/arch/arm/cpu/armv8/sec_firmware.c b/arch/arm/cpu/armv8/sec_firmware.c
index 267894fbcb..41525a10d5 100644
--- a/arch/arm/cpu/armv8/sec_firmware.c
+++ b/arch/arm/cpu/armv8/sec_firmware.c
@@ -35,9 +35,6 @@  phys_addr_t sec_firmware_addr;
 #ifndef SEC_FIRMWARE_FIT_IMAGE
 #define SEC_FIRMWARE_FIT_IMAGE		"firmware"
 #endif
-#ifndef SEC_FIRMWARE_FIT_CNF_NAME
-#define SEC_FIRMWARE_FIT_CNF_NAME	"config-1"
-#endif
 #ifndef SEC_FIRMWARE_TARGET_EL
 #define SEC_FIRMWARE_TARGET_EL		2
 #endif
@@ -46,15 +43,12 @@  static int sec_firmware_get_data(const void *sec_firmware_img,
 				const void **data, size_t *size)
 {
 	int conf_node_off, fw_node_off;
-	char *conf_node_name = NULL;
 	char *desc;
 	int ret;
 
-	conf_node_name = SEC_FIRMWARE_FIT_CNF_NAME;
-
-	conf_node_off = fit_conf_get_node(sec_firmware_img, conf_node_name);
+	conf_node_off = fit_conf_get_node(sec_firmware_img, NULL);
 	if (conf_node_off < 0) {
-		printf("SEC Firmware: %s: no such config\n", conf_node_name);
+		puts("SEC Firmware: no config\n");
 		return -ENOENT;
 	}
 
@@ -123,18 +117,15 @@  static int sec_firmware_check_copy_loadable(const void *sec_firmware_img,
 {
 	phys_addr_t sec_firmware_loadable_addr = 0;
 	int conf_node_off, ld_node_off, images;
-	char *conf_node_name = NULL;
 	const void *data;
 	size_t size;
 	ulong load;
 	const char *name, *str, *type;
 	int len;
 
-	conf_node_name = SEC_FIRMWARE_FIT_CNF_NAME;
-
-	conf_node_off = fit_conf_get_node(sec_firmware_img, conf_node_name);
+	conf_node_off = fit_conf_get_node(sec_firmware_img, NULL);
 	if (conf_node_off < 0) {
-		printf("SEC Firmware: %s: no such config\n", conf_node_name);
+		puts("SEC Firmware: no config\n");
 		return -ENOENT;
 	}