From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCHv2 2/4] omap3: remove typedefs for configuration structs
Date: Wed, 13 May 2009 00:59:26 +0200 [thread overview]
Message-ID: <20090512225926.GK479@game.jcrosoft.org> (raw)
In-Reply-To: <ad52297ca52a5998953774b9fe220323e329acdf.1242115589.git.mludwig@ultratronik.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.
next prev parent reply other threads:[~2009-05-12 22:59 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-11 10:09 [U-Boot] [PATCH 0/4] omap3: clean up gpmc config strut Matthias Ludwig
2009-05-11 10:09 ` [U-Boot] [PATCH 1/4] omap3: embedd gpmc_cs into gpmc config struct Matthias Ludwig
2009-05-11 10:09 ` [U-Boot] [PATCH 2/4] omap3: remove typedef for struct gpmc Matthias Ludwig
2009-05-11 10:09 ` [U-Boot] [PATCH 3/4] omap3: replace all instances of gpmc config struct by one global Matthias Ludwig
2009-05-11 10:09 ` [U-Boot] [PATCH 4/4] omap3: use only fixed-size types inside ctrl_structs Matthias Ludwig
2009-05-11 19:24 ` [U-Boot] [PATCH 2/4] omap3: remove typedef for struct gpmc Dirk Behme
2009-05-12 8:12 ` Matthias Ludwig
2009-05-12 8:12 ` [U-Boot] [PATCHv2 1/4] omap3: embedd gpmc_cs into gpmc config struct Matthias Ludwig
2009-05-12 8:12 ` [U-Boot] [PATCHv2 2/4] omap3: remove typedefs for configuration structs Matthias Ludwig
2009-05-12 8:12 ` [U-Boot] [PATCHv2 3/4] omap3: replace all instances of gpmc config struct by one global Matthias Ludwig
2009-05-12 8:12 ` [U-Boot] [PATCHv2 4/4] omap3: use only fixed-size types inside ctrl_structs Matthias Ludwig
2009-05-12 23:05 ` Jean-Christophe PLAGNIOL-VILLARD
2009-05-13 7:32 ` Matthias Ludwig
2009-05-24 15:51 ` Jean-Christophe PLAGNIOL-VILLARD
2009-05-12 23:02 ` [U-Boot] [PATCHv2 3/4] omap3: replace all instances of gpmc config struct by one global Jean-Christophe PLAGNIOL-VILLARD
2009-05-13 5:26 ` Wolfgang Denk
2009-05-13 7:04 ` Jean-Christophe PLAGNIOL-VILLARD
2009-05-15 20:08 ` Wolfgang Denk
2009-05-12 22:59 ` Jean-Christophe PLAGNIOL-VILLARD [this message]
2009-05-13 7:19 ` [U-Boot] [PATCHv2 2/4] omap3: remove typedefs for configuration structs Matthias Ludwig
2009-05-12 22:51 ` [U-Boot] [PATCHv2 1/4] omap3: embedd gpmc_cs into gpmc config struct Jean-Christophe PLAGNIOL-VILLARD
2009-05-13 7:16 ` Matthias Ludwig
2009-05-13 7:46 ` Jean-Christophe PLAGNIOL-VILLARD
2009-05-15 7:25 ` Matthias Ludwig
2009-05-18 21:53 ` Jean-Christophe PLAGNIOL-VILLARD
2009-05-12 15:29 ` [U-Boot] [PATCH 2/4] omap3: remove typedef for struct gpmc Dirk Behme
2009-05-12 22:38 ` Jean-Christophe PLAGNIOL-VILLARD
2009-05-11 10:27 ` [U-Boot] [PATCH 0/4] omap3: clean up gpmc config strut Nishanth Menon
2009-05-12 6:46 ` Matthias Ludwig
2009-05-11 19:46 ` Dirk Behme
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090512225926.GK479@game.jcrosoft.org \
--to=plagnioj@jcrosoft.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox