From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jean-Christophe PLAGNIOL-VILLARD Date: Wed, 13 May 2009 00:59:26 +0200 Subject: [U-Boot] [PATCHv2 2/4] omap3: remove typedefs for configuration structs In-Reply-To: References: Message-ID: <20090512225926.GK479@game.jcrosoft.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de > #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 0xAAAA > @@ -280,7 +280,7 @@ typedef struct watchdog { > #define PRCM_BASE 0x48004000 > > #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_GFX 0x48004b40 > @@ -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.