Minor misc. cleanups for TI K3 SoCs
Subsystems (3)
cover Minor misc. cleanups for TI K3 SoCs
Hi Lokesh,
The following are two minor cleanups/fixes that I ran into while doing some development work on a newer SoC due to different Kconfig symbols.
Following is the patch summary:
- Patch #1 makes the ti_sci_protocol.h self-contained when CONFIG_TI_SCI_PROTOCOL is not defined.
- Patch #2 defines a release_resources_for_core_shutdown() stub. This function is used in the common code, but yet is expected to be implemented in a SoC-specific source file.
regards
Suman
Suman Anna (2):
firmware: ti_sci: Include linux/err.h in ti_sci_protocol.h
arm: mach-k3: common: Add a release_resources_for_core_shutdown() stub
arch/arm/mach-k3/common.c | 5 +++++ include/linux/soc/ti/ti_sci_protocol.h | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-)
Signature · 1 line
2.32.0
PATCH 1/2 firmware: ti_sci: Include linux/err.h in ti_sci_protocol.h
The common TI SCI header file uses some macros from err.h and these get exercised when CONFIG_TI_SCI_PROTOCOL is not defined. Include the linux/err.h header file in this header file directly rather than relying on source files to include it to eliminate any potential build errors.
While at this, reorder the existing header file include to the beginning of the file.
--- include/linux/soc/ti/ti_sci_protocol.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
include/linux/soc/ti/ti_sci_protocol.h +3 -1
@@ -11,6 +11,9 @@#ifndef __TISCI_PROTOCOL_H#define __TISCI_PROTOCOL_H +#include <linux/bitops.h> +#include <linux/err.h> +/** * struct ti_sci_version_info - version information structure * @abi_major: Major ABI version. Change here implies risk of backward
@@ -20,7 +23,6 @@* @firmware_revision: Firmware revision (not usually used). * @firmware_description: Firmware description (not usually used). */ -#include <linux/bitops.h> struct ti_sci_version_info {u8 abi_major;u8 abi_minor;
Signature · 1 line
2.32.0
Re: [PATCH 1/2] firmware: ti_sci: Include linux/err.h in ti_sci_protocol.h
Quoted 29 lines · Suman Anna
The common TI SCI header file uses some macros from
err.hand these get exercised whenCONFIG_TI_SCI_PROTOCOLis not defined. Include thelinux/err.hheader file in this header file directly rather than relying on source files to include it to eliminate any potential build errors.While at this, reorder the existing header file include to the beginning of the file.
Signed-off-by Suman Anna <[email protected]>--- include/linux/soc/ti/ti_sci_protocol.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)include/linux/soc/ti/ti_sci_protocol.h +3
-0@@ -11,6 +11,9 @@#ifndef __TISCI_PROTOCOL_H#define __TISCI_PROTOCOL_H +#include <linux/bitops.h> +#include <linux/err.h> +/** * struct ti_sci_version_info - version information structure * @abi_major: Major ABI version. Change here implies risk of backward
include/linux/soc/ti/ti_sci_protocol.h line 28
Quoted 7 lines
include/linux/soc/ti/ti_sci_protocol.h +0
-1@@ -20,7 +23,6 @@* @firmware_revision: Firmware revision (not usually used). * @firmware_description: Firmware description (not usually used). */ -#include <linux/bitops.h> struct ti_sci_version_info {u8 abi_major;u8 abi_minor;
Signature · 3 lines
Regards, Nishanth Menon Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D
Re: [PATCH 1/2] firmware: ti_sci: Include linux/err.h in ti_sci_protocol.h
In reply to Suman AnnaQuoted 11 lines · Suman Anna
The common TI SCI header file uses some macros from
err.hand these get exercised whenCONFIG_TI_SCI_PROTOCOLis not defined. Include thelinux/err.hheader file in this header file directly rather than relying on source files to include it to eliminate any potential build errors.While at this, reorder the existing header file include to the beginning of the file.
Signed-off-by Suman Anna <[email protected]>Reviewed-by Nishanth Menon <[email protected]>
Applied to u-boot/master, thanks!
Signature · 1 line
Tom
PATCH 2/2 arm: mach-k3: common: Add a release_resources_for_core_shutdown() stub
In reply to Suman AnnaAdd a weak release_resources_for_core_shutdown() stub implementation that can be overridden by actual implementation if a SoC supports that function.
--- arch/arm/mach-k3/common.c | 5 +++++ 1 file changed, 5 insertions(+)
arch/arm/mach-k3/common.c +5 -0
@@ -193,6 +193,11 @@ int load_firmware(char *name_fw, char *name_loadaddr, u32 *loadaddr) }#endif +__weak void release_resources_for_core_shutdown (void ) +{ +debug ("%s not implemented...\n" , __func__); +} +void __noreturn jump_to_image_no_args (struct spl_image_info *spl_image) {typedef void __noreturn (*image_entry_noargs_t )(void );
Signature · 1 line
2.32.0
Re: [PATCH 2/2] arm: mach-k3: common: Add a release_resources_for_core_shutdown() stub
Quoted 15 lines · Suman Anna
Add a weak
release_resources_for_core_shutdown()stub implementation that can be overridden by actual implementation if a SoC supports that function.Signed-off-by Suman Anna <[email protected]>--- arch/arm/mach-k3/common.c | 5 +++++ 1 file changed, 5 insertions(+)arch/arm/mach-k3/common.c +0
-0@@ -193,6 +193,11 @@ int load_firmware(char *name_fw, char *name_loadaddr, u32 *loadaddr) }
arch/arm/mach-k3/common.c int load_firmware(char *name_fw, char *name_loadaddr, u32 *loadaddr) · line 203
Quoted 10 lines
arch/arm/mach-k3/common.c +5
-0#endif +__weak void release_resources_for_core_shutdown (void ) +{ +debug ("%s not implemented...\n" , __func__); +} +void __noreturn jump_to_image_no_args (struct spl_image_info *spl_image) {typedef void __noreturn (*image_entry_noargs_t )(void );
Signature · 3 lines
Regards, Nishanth Menon Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D
Re: [PATCH 2/2] arm: mach-k3: common: Add a release_resources_for_core_shutdown() stub
In reply to Suman AnnaQuoted 6 lines · Suman Anna
Add a weak
release_resources_for_core_shutdown()stub implementation that can be overridden by actual implementation if a SoC supports that function.Signed-off-by Suman Anna <[email protected]>Reviewed-by Nishanth Menon <[email protected]>
Applied to u-boot/master, thanks!
Signature · 1 line
Tom