[U-Boot] [PATCH 2/4] omap3: remove typedef for struct gpmc

Dirk Behme dirk.behme at googlemail.com
Mon May 11 21:24:45 CEST 2009


Hi Matthias,

Matthias Ludwig wrote:
> Signed-off-by: Matthias Ludwig <mludwig at ultratronik.de>
> ---
>  board/omap3/evm/evm.c             |    2 +-
>  cpu/arm_cortexa8/omap3/mem.c      |    6 +++---
>  cpu/arm_cortexa8/omap3/sys_info.c |    2 +-
>  drivers/mtd/nand/omap_gpmc.c      |    2 +-
>  include/asm-arm/arch-omap3/cpu.h  |    4 ++--
>  include/configs/omap3_beagle.h    |    2 +-
>  include/configs/omap3_evm.h       |    2 +-
>  include/configs/omap3_overo.h     |    2 +-
>  include/configs/omap3_pandora.h   |    2 +-
>  include/configs/omap3_zoom1.h     |    2 +-
>  10 files changed, 13 insertions(+), 13 deletions(-)
...
> diff --git a/cpu/arm_cortexa8/omap3/sys_info.c b/cpu/arm_cortexa8/omap3/sys_info.c
> index 91ee2ff..b18fea0 100644
> --- a/cpu/arm_cortexa8/omap3/sys_info.c
> +++ b/cpu/arm_cortexa8/omap3/sys_info.c
> @@ -32,7 +32,7 @@
>  #include <i2c.h>
>  
>  extern omap3_sysinfo sysinfo;
> -static gpmc_t *gpmc_base = (gpmc_t *)GPMC_BASE;
> +static struct gpmc *gpmc_base = (struct gpmc *)GPMC_BASE;
>  static sdrc_t *sdrc_base = (sdrc_t *)OMAP34XX_SDRC_BASE;
>  static ctrl_t *ctrl_base = (ctrl_t *)OMAP34XX_CTRL_BASE;
>  static char *rev_s[CPU_3XX_MAX_REV] = {
...
> diff --git a/include/asm-arm/arch-omap3/cpu.h b/include/asm-arm/arch-omap3/cpu.h
> index 2d203d1..659c35d 100644
> --- a/include/asm-arm/arch-omap3/cpu.h
> +++ b/include/asm-arm/arch-omap3/cpu.h
> @@ -99,7 +99,7 @@ struct gpmc_cs {
>  	unsigned char res[8];		/* blow up to 0x30 byte */
>  };
>  
> -typedef struct gpmc {
> +struct gpmc {
>  	unsigned char res1[0x10];
>  	unsigned int sysconfig;		/* 0x10 */
>  	unsigned char res2[0x4];
> @@ -125,7 +125,7 @@ typedef struct gpmc {
>  	unsigned int ecc7_result;	/* 0x218 */
>  	unsigned int ecc8_result;	/* 0x21C */
>  	unsigned int ecc9_result;	/* 0x220 */
> -} gpmc_t;
> +};

I wonder if you have the resources and like to convert all register 
structs used by OMAP3 code and remove the typedef?

Else we would have a mixture of typedefs and struct usage (see e.g. 
above in sys_info.c). I would like to have it consistent, either the 
one or the other way ;) What do you think?

Best regards

Dirk


More information about the U-Boot mailing list