[PATCH u-boot v2016.07-aspeed-openbmc] Add optional MTD and UBI support to ast-g4 and ast-g5

Andrew Jeffery andrew at aj.id.au
Thu Aug 24 12:31:39 AEST 2017


On Wed, 2017-08-23 at 21:01 -0500, Adriana Kobylak wrote:
> Add MTD and UBI support conditioned to having MTDPARTS_DEFAULT defined.
> This allows platforms to enable this support if desired without
> adding it by default since it increases the size of u-boot by about 70kB.
> 
> > Signed-off-by: Adriana Kobylak <anoo at linux.vnet.ibm.com>
> ---
>  include/configs/ast-g4-ncsi.h | 10 ++++++++++
>  include/configs/ast-g4-phy.h  | 10 ++++++++++
>  include/configs/ast-g5-ncsi.h | 10 ++++++++++
>  include/configs/ast-g5-phy.h  | 10 ++++++++++
>  4 files changed, 40 insertions(+)

So my understanding is instead of duplicating the additions we can put
the them once in include/configs/ast-common.h:

    $ grep 'ast-common.h' include/configs/ast*
    include/configs/ast-g4-ncsi.h:#include <configs/ast-common.h>
    include/configs/ast-g4-phy.h:#include <configs/ast-common.h>
    include/configs/ast-g5-ncsi.h:#include <configs/ast-common.h>
    include/configs/ast-g5-phy.h:#include <configs/ast-common.h>

Sorry for the back-and-forth, but I think that would be a cleaner
solution.

Cheers,

Andrew

> 
> diff --git a/include/configs/ast-g4-ncsi.h b/include/configs/ast-g4-ncsi.h
> index 8191dfc..0ba5a43 100644
> --- a/include/configs/ast-g4-ncsi.h
> +++ b/include/configs/ast-g4-ncsi.h
> @@ -26,4 +26,14 @@
> >  #define CONFIG_CPU_420			1
> >  #define CONFIG_DRAM_528			1
>  
> +/* Optional MTD and UBI */
> +#ifdef MTDPARTS_DEFAULT
> +#define CONFIG_FLASH_CFI_MTD
> +#define CONFIG_CMD_UBI
> +#define CONFIG_RBTREE
> +#define CONFIG_MTD_DEVICE
> +#define CONFIG_MTD_PARTITIONS
> +#define CONFIG_CMD_MTDPARTS
> +#endif
> +
> >  #endif	/* __AST_G4_NCSI_CONFIG_H */
> diff --git a/include/configs/ast-g4-phy.h b/include/configs/ast-g4-phy.h
> index baa522f..8b26fa6 100644
> --- a/include/configs/ast-g4-phy.h
> +++ b/include/configs/ast-g4-phy.h
> @@ -28,4 +28,14 @@
> >  #define CONFIG_CPU_420			1
> >  #define CONFIG_DRAM_528			1
>  
> +/* Optional MTD and UBI */
> +#ifdef MTDPARTS_DEFAULT
> +#define CONFIG_FLASH_CFI_MTD
> +#define CONFIG_CMD_UBI
> +#define CONFIG_RBTREE
> +#define CONFIG_MTD_DEVICE
> +#define CONFIG_MTD_PARTITIONS
> +#define CONFIG_CMD_MTDPARTS
> +#endif
> +
> >  #endif	/* __AST_G4_NCSI_CONFIG_H */
> diff --git a/include/configs/ast-g5-ncsi.h b/include/configs/ast-g5-ncsi.h
> index 12d6684..167835f 100644
> --- a/include/configs/ast-g5-ncsi.h
> +++ b/include/configs/ast-g5-ncsi.h
> @@ -28,4 +28,14 @@
>  
>  #define CONFIG_HW_WATCHDOG
>  
> +/* Optional MTD and UBI */
> +#ifdef MTDPARTS_DEFAULT
> +#define CONFIG_FLASH_CFI_MTD
> +#define CONFIG_CMD_UBI
> +#define CONFIG_RBTREE
> +#define CONFIG_MTD_DEVICE
> +#define CONFIG_MTD_PARTITIONS
> +#define CONFIG_CMD_MTDPARTS
> +#endif
> +
> >  #endif	/* __AST_G5_NCSI_CONFIG_H */
> diff --git a/include/configs/ast-g5-phy.h b/include/configs/ast-g5-phy.h
> index 62ddb84..c3e2552 100644
> --- a/include/configs/ast-g5-phy.h
> +++ b/include/configs/ast-g5-phy.h
> @@ -30,4 +30,14 @@
>  /* platform.S */
> > >  #define	CONFIG_DRAM_ECC_SIZE		0x10000000
>  
> +/* Optional MTD and UBI */
> +#ifdef MTDPARTS_DEFAULT
> +#define CONFIG_FLASH_CFI_MTD
> +#define CONFIG_CMD_UBI
> +#define CONFIG_RBTREE
> +#define CONFIG_MTD_DEVICE
> +#define CONFIG_MTD_PARTITIONS
> +#define CONFIG_CMD_MTDPARTS
> +#endif
> +
> >  #endif	/* __AST_G5_PHY_CONFIG_H */
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: This is a digitally signed message part
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20170824/60480fde/attachment.sig>


More information about the openbmc mailing list