public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH-ARM] Add support for Embest SBC2440-II Board 2/7
Date: Wed, 8 Jul 2009 22:50:22 +0200	[thread overview]
Message-ID: <20090708205022.GC12394@game.jcrosoft.org> (raw)
In-Reply-To: <4A42C63C.7070907@fearnside-systems.co.uk>

On 01:35 Thu 25 Jun     , kevin.morfitt at fearnside-systems.co.uk wrote:
> 
> This patch re-formats the s3c24x0 header files in preparation for changes 
> to add support for the Embest SBC2440-II Board.
> 
> The changes are as follows:
> 
> - re-indent the code using Lindent
> - make sure register layouts are defined using a C struct, from a 
>   comment by Wolfgang on 03/06/2009
> - replace the upper-case typedef'ed C struct names with lower case 
>   non-typedef'ed ones, from a comment by Scott on 22/06/2009
> - make sure registers are accessed using the proper accessor 
>   functions, from a comment by Wolfgang on 03/06/2009
> - run checkpatch.pl and fix any error reports
> 
> Signed-off-by: Kevin Morfitt <kevin.morfitt@fearnside-systems.co.uk>
> ---
>  include/s3c2400.h |  493 ++++----------------------------------------
>  include/s3c2410.h |  158 ++++-----------
>  include/s3c24x0.h |  595 +++++------------------------------------------------
>  3 files changed, 130 insertions(+), 1116 deletions(-)
> 
> diff --git a/include/s3c2400.h b/include/s3c2400.h
> index 4fdc62e..89027fa 100644
> --- a/include/s3c2400.h
> +++ b/include/s3c2400.h
> @@ -35,12 +35,12 @@
>  #define S3C24X0_SPI_CHANNELS	1
>  #define PALETTE			(0x14A00400)	/* SJS */
>  
> -typedef enum {
> +enum s3c24x0_uarts_nr {
>  	S3C24X0_UART0,
>  	S3C24X0_UART1,
> -} S3C24X0_UARTS_NR;
> +};
>  
> -/* S3C2400 device base addresses */
> +/*S3C2400 device base addresses */
>  #define S3C24X0_MEMCTL_BASE		0x14000000
>  #define S3C24X0_USB_HOST_BASE		0x14200000
>  #define S3C24X0_INTERRUPT_BASE		0x14400000
> @@ -63,492 +63,73 @@ typedef enum {
>  #include <s3c24x0.h>
>  
>  
> -static inline S3C24X0_MEMCTL * S3C24X0_GetBase_MEMCTL(void)
> +static inline struct s3c24x0_memctl *S3C24X0_GetBase_MEMCTL(void)
please no uppercase in the function name
>  {
> -	return (S3C24X0_MEMCTL * const)S3C24X0_MEMCTL_BASE;
> +	return (struct s3c24x0_memctl *)S3C24X0_MEMCTL_BASE;
>  }

> diff --git a/include/s3c24x0.h b/include/s3c24x0.h
> index 71f35a5..b34c880 100644
> --- a/include/s3c24x0.h
> +++ b/include/s3c24x0.h
> @@ -36,18 +36,18 @@ typedef volatile u16	S3C24X0_REG16;
>  typedef volatile u32	S3C24X0_REG32;
>  
>  /* Memory controller (see manual chapter 5) */
> -typedef struct {
> +struct s3c24x0_memctl {
>  	S3C24X0_REG32	BWSCON;
please remove the S3C24X0_REG32
please use u32 or other proper type
please no uppercase in entry name too
>  	S3C24X0_REG32	BANKCON[8];
>  	S3C24X0_REG32	REFRESH;
>  	S3C24X0_REG32	BANKSIZE;
>  	S3C24X0_REG32	MRSRB6;
>  	S3C24X0_REG32	MRSRB7;

Best Regards,
J.

  reply	other threads:[~2009-07-08 20:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-25  0:34 [U-Boot] [PATCH-ARM] Add support for Embest SBC2440-II Board 1/7 kevin.morfitt at fearnside-systems.co.uk
2009-06-25  0:35 ` [U-Boot] [PATCH-ARM] Add support for Embest SBC2440-II Board 2/7 kevin.morfitt at fearnside-systems.co.uk
2009-07-08 20:50   ` Jean-Christophe PLAGNIOL-VILLARD [this message]
2009-06-26 17:29 ` [U-Boot] [PATCH-ARM] Add support for Embest SBC2440-II Board 1/7 Scott Wood
2009-07-08 20:19 ` Remy Bohmer
2009-07-09 18:38   ` kevin.morfitt at fearnside-systems.co.uk
2009-07-11 10:00     ` Remy Bohmer

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=20090708205022.GC12394@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