diff mbox series

[U-Boot,35/36] rockchip: declear boot_devices in bootrom.h

Message ID 1522142971-20739-36-git-send-email-kever.yang@rock-chips.com
State Changes Requested
Delegated to: Philipp Tomsich
Headers show
Series rockchip: clean up board file for rockchip SoCs | expand

Commit Message

Kever Yang March 27, 2018, 9:29 a.m. UTC
boot_devices may defined in soc file, and used in board file,
we need to delear it in header file.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
---

 arch/arm/include/asm/arch-rockchip/bootrom.h | 2 ++
 1 file changed, 2 insertions(+)

Comments

Philipp Tomsich April 1, 2018, 8:21 p.m. UTC | #1
> boot_devices may defined in soc file, and used in board file,
> we need to delear it in header file.
> 
> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
> ---
> 
>  arch/arm/include/asm/arch-rockchip/bootrom.h | 2 ++
>  1 file changed, 2 insertions(+)
> 

Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Philipp Tomsich April 1, 2018, 9:09 p.m. UTC | #2
On Tue, 27 Mar 2018, Kever Yang wrote:

> boot_devices may defined in soc file, and used in board file,
> we need to delear it in header file.

I think you meant to write 'declare'.
Again: a bit more context from the commit message might be useful (e.g. 
what is 'boot_devices'?

If 'boot_devices' suddenly becomes visible across multiple files, we may 
need to rethink its naming... 'boot_devices' is too similar to names used 
in SPL (e.g. 'boot_device') and could easily be confused.

>
> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>

See below for requested changes.

> ---
>
> arch/arm/include/asm/arch-rockchip/bootrom.h | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/arch/arm/include/asm/arch-rockchip/bootrom.h b/arch/arm/include/asm/arch-rockchip/bootrom.h
> index 103b799..ac2f370 100644
> --- a/arch/arm/include/asm/arch-rockchip/bootrom.h
> +++ b/arch/arm/include/asm/arch-rockchip/bootrom.h
> @@ -53,6 +53,8 @@ enum {
> 	BROM_LAST_BOOTSOURCE = BROM_BOOTSOURCE_USB
> };
>
> +extern const char * const boot_devices[BROM_LAST_BOOTSOURCE + 1];

If you make this visible outside of a single board file and move it to a 
header file, this needs some documentation (and naming will need to be 
rethought as well, as described above).

> +
> /**
>  * Locations of the boot-device identifier in SRAM
>  */
>
diff mbox series

Patch

diff --git a/arch/arm/include/asm/arch-rockchip/bootrom.h b/arch/arm/include/asm/arch-rockchip/bootrom.h
index 103b799..ac2f370 100644
--- a/arch/arm/include/asm/arch-rockchip/bootrom.h
+++ b/arch/arm/include/asm/arch-rockchip/bootrom.h
@@ -53,6 +53,8 @@  enum {
 	BROM_LAST_BOOTSOURCE = BROM_BOOTSOURCE_USB
 };
 
+extern const char * const boot_devices[BROM_LAST_BOOTSOURCE + 1];
+
 /**
  * Locations of the boot-device identifier in SRAM
  */