Re: [U-Boot] [PATCHv2 2/4] omap3: remove typedefs for configuration structs

2009-05-13 Thread Matthias Ludwig
   } sdrc_cs_t;
 please remove too

   } sdrc_actim_t;
 please remove too

this like i'm missen those :( will be fixed

   #ifndef __ASSEMBLY__
  -typedef enum {
  +enum {
  STACKED = 0,
  IP_DDR = 1,
  COMBO_DDR = 2,
  IP_SDR = 3,
  -} mem_t;
  +};
 it will be better to use the enum type so it will be check at the compiling
 time by gcc

ok

bst regards,
Matthias

-- 
Matthias Ludwig, Software Development
Ultratronik Entwicklungs GmbH, Gewerbestrasse 52, 82211 Herrsching, Germany
http://www.ultratronik.de  Tel: +49 8152 3709-356  Fax: +49 8152 5183
Registergericht Muenchen, HRB 55584
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCHv2 2/4] omap3: remove typedefs for configuration structs

2009-05-12 Thread Matthias Ludwig
Signed-off-by: Matthias Ludwig mlud...@ultratronik.de
---
 board/omap3/beagle/beagle.c |6 ++--
 board/omap3/evm/evm.c   |6 ++--
 board/omap3/pandora/pandora.c   |8 +++---
 cpu/arm_cortexa8/omap3/board.c  |   16 ++--
 cpu/arm_cortexa8/omap3/clock.c  |   14 +-
 cpu/arm_cortexa8/omap3/interrupts.c |2 +-
 cpu/arm_cortexa8/omap3/mem.c|   14 +-
 cpu/arm_cortexa8/omap3/sys_info.c   |   12 +-
 drivers/mtd/nand/omap_gpmc.c|2 +-
 include/asm-arm/arch-omap3/cpu.h|   42 +-
 include/asm-arm/arch-omap3/mem.h|4 +-
 include/asm-arm/arch-omap3/omap3.h  |8 +++---
 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 +-
 17 files changed, 72 insertions(+), 72 deletions(-)

diff --git a/board/omap3/beagle/beagle.c b/board/omap3/beagle/beagle.c
index 7eb70ee..2dc11dd 100644
--- a/board/omap3/beagle/beagle.c
+++ b/board/omap3/beagle/beagle.c
@@ -74,7 +74,7 @@ int beagle_get_revision(void)
  */
 void beagle_identify(void)
 {
-   gpio_t *gpio6_base = (gpio_t *)OMAP34XX_GPIO6_BASE;
+   struct gpio *gpio6_base = (struct gpio *)OMAP34XX_GPIO6_BASE;
 
/* Configure GPIO 171 as input */
writel(readl(gpio6_base-oe) | GPIO11, gpio6_base-oe);
@@ -98,8 +98,8 @@ void beagle_identify(void)
  */
 int misc_init_r(void)
 {
-   gpio_t *gpio5_base = (gpio_t *)OMAP34XX_GPIO5_BASE;
-   gpio_t *gpio6_base = (gpio_t *)OMAP34XX_GPIO6_BASE;
+   struct gpio *gpio5_base = (struct gpio *)OMAP34XX_GPIO5_BASE;
+   struct gpio *gpio6_base = (struct gpio *)OMAP34XX_GPIO6_BASE;
 
power_init_r();
 
diff --git a/board/omap3/evm/evm.c b/board/omap3/evm/evm.c
index 032c93a..7747986 100644
--- a/board/omap3/evm/evm.c
+++ b/board/omap3/evm/evm.c
@@ -91,9 +91,9 @@ void set_muxconf_regs(void)
  */
 static void setup_net_chip(void)
 {
-   gpio_t *gpio3_base = (gpio_t *)OMAP34XX_GPIO3_BASE;
-   gpmc_t *gpmc = (gpmc_t *)GPMC_BASE;
-   ctrl_t *ctrl_base = (ctrl_t *)OMAP34XX_CTRL_BASE;
+   struct gpio *gpio3_base = (struct gpio *)OMAP34XX_GPIO3_BASE;
+   struct gpmc *gpmc = (struct gpmc *)GPMC_BASE;
+   struct ctrl *ctrl_base = (struct ctrl *)OMAP34XX_CTRL_BASE;
 
/* Configure GPMC registers */
writel(NET_GPMC_CONFIG1, gpmc-cs[5].config1);
diff --git a/board/omap3/pandora/pandora.c b/board/omap3/pandora/pandora.c
index c2f98ea..e4b45f7 100644
--- a/board/omap3/pandora/pandora.c
+++ b/board/omap3/pandora/pandora.c
@@ -59,10 +59,10 @@ int board_init(void)
  */
 int misc_init_r(void)
 {
-   gpio_t *gpio1_base = (gpio_t *)OMAP34XX_GPIO1_BASE;
-   gpio_t *gpio4_base = (gpio_t *)OMAP34XX_GPIO4_BASE;
-   gpio_t *gpio5_base = (gpio_t *)OMAP34XX_GPIO5_BASE;
-   gpio_t *gpio6_base = (gpio_t *)OMAP34XX_GPIO6_BASE;
+   struct gpio *gpio1_base = (struct gpio *)OMAP34XX_GPIO1_BASE;
+   struct gpio *gpio4_base = (struct gpio *)OMAP34XX_GPIO4_BASE;
+   struct gpio *gpio5_base = (struct gpio *)OMAP34XX_GPIO5_BASE;
+   struct gpio *gpio6_base = (struct gpio *)OMAP34XX_GPIO6_BASE;
 
power_init_r();
 
diff --git a/cpu/arm_cortexa8/omap3/board.c b/cpu/arm_cortexa8/omap3/board.c
index 51d5cf6..8a79f53 100644
--- a/cpu/arm_cortexa8/omap3/board.c
+++ b/cpu/arm_cortexa8/omap3/board.c
@@ -58,11 +58,11 @@ static inline void delay(unsigned long loops)
  */
 void secure_unlock_mem(void)
 {
-   pm_t *pm_rt_ape_base = (pm_t *)PM_RT_APE_BASE_ADDR_ARM;
-   pm_t *pm_gpmc_base = (pm_t *)PM_GPMC_BASE_ADDR_ARM;
-   pm_t *pm_ocm_ram_base = (pm_t *)PM_OCM_RAM_BASE_ADDR_ARM;
-   pm_t *pm_iva2_base = (pm_t *)PM_IVA2_BASE_ADDR_ARM;
-   sms_t *sms_base = (sms_t *)OMAP34XX_SMS_BASE;
+   struct pm *pm_rt_ape_base = (struct pm *)PM_RT_APE_BASE_ADDR_ARM;
+   struct pm *pm_gpmc_base = (struct pm *)PM_GPMC_BASE_ADDR_ARM;
+   struct pm *pm_ocm_ram_base = (struct pm *)PM_OCM_RAM_BASE_ADDR_ARM;
+   struct pm *pm_iva2_base = (struct pm *)PM_IVA2_BASE_ADDR_ARM;
+   struct sms *sms_base = (struct sms *)OMAP34XX_SMS_BASE;
 
/* Protection Module Register Target APE (PM_RT) */
writel(UNLOCK_1, pm_rt_ape_base-req_info_permission_1);
@@ -233,7 +233,7 @@ void s_init(void)
  * Routine: wait_for_command_complete
  * Description: Wait for posting to finish on watchdog
  */
-void wait_for_command_complete(watchdog_t *wd_base)
+void wait_for_command_complete(struct watchdog *wd_base)
 {
int pending = 1;
do {
@@ -247,8 +247,8 @@ void wait_for_command_complete(watchdog_t *wd_base)
  */
 void 

Re: [U-Boot] [PATCHv2 2/4] omap3: remove typedefs for configuration structs

2009-05-12 Thread Jean-Christophe PLAGNIOL-VILLARD
  #define BURSTCOMPLETE_GROUP7 (0x1  31)
  
  /* SDRC */
  #ifndef __ASSEMBLY__
 -typedef struct sdrc_cs {
 +struct sdrc_cs {
   unsigned int mcfg;  /* 0x80 || 0xB0 */
   unsigned int mr;/* 0x84 || 0xB4 */
   unsigned char res1[0x4];
 @@ -176,12 +176,12 @@ typedef struct sdrc_cs {
   unsigned char res3[0x4];
  } sdrc_cs_t;
please remove too
  
 -typedef struct sdrc_actim {
 +struct sdrc_actim {
   unsigned int ctrla; /* 0x9C || 0xC4 */
   unsigned int ctrlb; /* 0xA0 || 0xC8 */
  } sdrc_actim_t;
please remove too
  
 -typedef struct sdrc {
 +struct sdrc {
   unsigned char res1[0x10];
   unsigned int sysconfig; /* 0x10 */
   unsigned int status;/* 0x14 */
 @@ -196,7 +196,7 @@ typedef struct sdrc {
   unsigned int power; /* 0x70 */
   unsigned char res4[0xC];
   sdrc_cs_t cs[2];/* 0x80 || 0xB0 */
 -} sdrc_t;
 +};
  #endif /* __ASSEMBLY__ */
  
  #define DLLPHASE_90  (0x1  1)
 @@ -240,7 +240,7 @@ typedef struct sdrc {
  /* timer regs offsets (32 bit regs) */
  
  #ifndef __ASSEMBLY__
 -typedef struct gptimer {
 +struct gptimer {
   unsigned int tidr;  /* 0x00 r */
   unsigned char res[0xc];
   unsigned int tiocp_cfg; /* 0x10 rw */
 @@ -257,7 +257,7 @@ typedef struct gptimer {
   unsigned int tcar1; /* 0x3c r */
   unsigned int tcicr; /* 0x40 rw */
   unsigned int tcar2; /* 0x44 r */
 -} gptimer_t;
 +};
  #endif /* __ASSEMBLY__ */
  
  /* enable sys_clk NO-prescale /1 */
 @@ -265,12 +265,12 @@ typedef struct gptimer {
  
  /* Watchdog */
  #ifndef __ASSEMBLY__
 -typedef struct watchdog {
 +struct watchdog {
   unsigned char res1[0x34];
   unsigned int wwps;  /* 0x34 r */
   unsigned char res2[0x10];
   unsigned int wspr;  /* 0x48 rw */
 -} watchdog_t;
 +};
  #endif /* __ASSEMBLY__ */
  
  #define WD_UNLOCK1   0x
 @@ -280,7 +280,7 @@ typedef struct watchdog {
  #define PRCM_BASE0x48004000
  
  #ifndef __ASSEMBLY__
 -typedef struct prcm {
 +struct prcm {
   unsigned int fclken_iva2;   /* 0x00 */
   unsigned int clken_pll_iva2;/* 0x04 */
   unsigned char res1[0x1c];
 @@ -344,7 +344,7 @@ typedef struct prcm {
   unsigned int clksel_per;/* 0x1040 */
   unsigned char res28[0xfc];
   unsigned int clksel1_emu;   /* 0x1140 */
 -} prcm_t;
 +};
  #else /* __ASSEMBLY__ */
  #define CM_CLKSEL_CORE   0x48004a40
  #define CM_CLKSEL_GFX0x48004b40
 @@ -357,14 +357,14 @@ typedef struct prcm {
  #define PRM_BASE 0x48306000
  
  #ifndef __ASSEMBLY__
 -typedef struct prm {
 +struct prm {
   unsigned char res1[0xd40];
   unsigned int clksel;/* 0xd40 */
   unsigned char res2[0x50c];
   unsigned int rstctrl;   /* 0x1250 */
   unsigned char res3[0x1c];
   unsigned int clksrc_ctrl;   /* 0x1270 */
 -} prm_t;
 +};
  #else /* __ASSEMBLY__ */
  #define PRM_RSTCTRL  0x48307250
  #endif /* __ASSEMBLY__ */
 @@ -400,7 +400,7 @@ typedef struct prm {
  #define PM_IVA2_BASE_ADDR_ARM(SMX_APE_BASE + 0x14000)
  
  #ifndef __ASSEMBLY__
 -typedef struct pm {
 +struct pm {
   unsigned char res1[0x48];
   unsigned int req_info_permission_0; /* 0x48 */
   unsigned char res2[0x4];
 @@ -413,7 +413,7 @@ typedef struct pm {
   unsigned int req_info_permission_1; /* 0x68 */
   unsigned char res6[0x14];
   unsigned int addr_match_2;  /* 0x80 */
 -} pm_t;
 +};
  #endif /*__ASSEMBLY__ */
  
  /* Permission values for registers -Full fledged permissions to all */
 diff --git a/include/asm-arm/arch-omap3/mem.h 
 b/include/asm-arm/arch-omap3/mem.h
 index 6f0f90b..5b9ac75 100644
 --- a/include/asm-arm/arch-omap3/mem.h
 +++ b/include/asm-arm/arch-omap3/mem.h
 @@ -29,12 +29,12 @@
  #define CS1  0x1 /* mirror CS1 regs appear offset 0x30 from CS0 */
  
  #ifndef __ASSEMBLY__
 -typedef enum {
 +enum {
   STACKED = 0,
   IP_DDR = 1,
   COMBO_DDR = 2,
   IP_SDR = 3,
 -} mem_t;
 +};
it will be better to use the enum type so it will be check at the compiling
time by gcc
  #endif /* __ASSEMBLY__ */
  
  #define EARLY_INIT   1
 diff --git a/include/asm-arm/arch-omap3/omap3.h 
 b/include/asm-arm/arch-omap3/omap3.h
 index 7c11019..d9d243f 100644
 --- a/include/asm-arm/arch-omap3/omap3.h
 +++ b/include/asm-arm/arch-omap3/omap3.h
 @@ -79,10 +79,10 @@
  

Best Regards,
J.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot