public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: "Andreas Bießmann" <andreas.devel@googlemail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 06/15] AT91: fix related arch-at91 header files
Date: Fri, 18 Feb 2011 13:27:41 +0100	[thread overview]
Message-ID: <4D5E65BD.9000008@gmail.com> (raw)
In-Reply-To: <1298033414-11481-7-git-send-email-u-boot@emk-elektronik.de>

Am 18.02.2011 13:50, schrieb Reinhard Meyer:
> Signed-off-by: Reinhard Meyer <u-boot@emk-elektronik.de>
> ---
>  arch/arm/include/asm/arch-at91/at91_common.h |    3 +--
>  arch/arm/include/asm/arch-at91/at91_pio.h    |   19 +++----------------
>  arch/arm/include/asm/arch-at91/gpio.h        |   18 +++++++++---------
>  arch/arm/include/asm/arch-at91/io.h          |    4 ++--
>  4 files changed, 15 insertions(+), 29 deletions(-)
> 
> diff --git a/arch/arm/include/asm/arch-at91/at91_common.h b/arch/arm/include/asm/arch-at91/at91_common.h
> index 0067190..330edd8 100644
> --- a/arch/arm/include/asm/arch-at91/at91_common.h
> +++ b/arch/arm/include/asm/arch-at91/at91_common.h
> @@ -28,11 +28,10 @@
>  void at91_can_hw_init(void);
>  void at91_macb_hw_init(void);
>  void at91_mci_hw_init(void);
> -void at91_serial_hw_init(void);
>  void at91_serial0_hw_init(void);
>  void at91_serial1_hw_init(void);
>  void at91_serial2_hw_init(void);
> -void at91_serial3_hw_init(void);
> +void at91_seriald_hw_init(void);
>  void at91_spi0_hw_init(unsigned long cs_mask);
>  void at91_spi1_hw_init(unsigned long cs_mask);
>  void at91_uhp_hw_init(void);
> diff --git a/arch/arm/include/asm/arch-at91/at91_pio.h b/arch/arm/include/asm/arch-at91/at91_pio.h
> index f7915a3..0b5bd69 100644
> --- a/arch/arm/include/asm/arch-at91/at91_pio.h
> +++ b/arch/arm/include/asm/arch-at91/at91_pio.h
> @@ -76,32 +76,19 @@ typedef struct at91_port {
>  	u32	reserved6[85];
>  } at91_port_t;
>  
> -#if defined(CONFIG_AT91SAM9260) || defined(CONFIG_AT91SAM9261) || \
> -	defined(CONFIG_AT91SAM9G10) || defined(CONFIG_AT91SAM9G20)
> -#define AT91_PIO_PORTS	3
> -#elif defined(CONFIG_AT91SAM9263) || defined(CONFIG_AT91SAM9G45) || \
> -	defined(CONFIG_AT91SAM9M10G45)
> -#define AT91_PIO_PORTS	5
> -#elif defined(CONFIG_AT91RM9200) || defined(CONFIG_AT91CAP9) || \
> -	defined(CONFIG_AT91SAM9RL)
> -#define AT91_PIO_PORTS	4
> -#else
> -#error "Unsupported cpu. Please update at91_pio.h"
> -#endif
> -
>  typedef union at91_pio {
>  	struct {
>  		at91_port_t	pioa;
>  		at91_port_t	piob;
>  		at91_port_t	pioc;
> -	#if (AT91_PIO_PORTS > 3)
> +	#if (ATMEL_PIO_PORTS > 3)
>  		at91_port_t	piod;
>  	#endif
> -	#if (AT91_PIO_PORTS > 4)
> +	#if (ATMEL_PIO_PORTS > 4)
>  		at91_port_t	pioe;
>  	#endif
>  	} ;
> -	at91_port_t port[AT91_PIO_PORTS];
> +	at91_port_t port[ATMEL_PIO_PORTS];
>  } at91_pio_t;
>  
>  #ifdef CONFIG_AT91_GPIO
> diff --git a/arch/arm/include/asm/arch-at91/gpio.h b/arch/arm/include/asm/arch-at91/gpio.h
> index 716f81f..293d0bf 100644
> --- a/arch/arm/include/asm/arch-at91/gpio.h
> +++ b/arch/arm/include/asm/arch-at91/gpio.h
> @@ -18,7 +18,7 @@
>  #include <asm/arch/at91_pio.h>
>  #include <asm/arch/hardware.h>
>  
> -#ifdef CONFIG_AT91_LEGACY
> +#ifdef CONFIG_ATMEL_LEGACY

is this still necessary?

>  
>  #define PIN_BASE		32
>  
> @@ -192,13 +192,13 @@
>  #define	AT91_PIN_PE31	(PIN_BASE + 0x80 + 31)
>  
>  static unsigned long at91_pios[] = {
> -	AT91_PIOA,
> -	AT91_PIOB,
> -	AT91_PIOC,
> -#ifdef AT91_PIOD
> -	AT91_PIOD,
> -#ifdef AT91_PIOE
> -	AT91_PIOE
> +	ATMEL_BASE_PIOA,
> +	ATMEL_BASE_PIOB,
> +	ATMEL_BASE_PIOC,
> +#ifdef ATMEL_BASE_PIOD
> +	ATMEL_BASE_PIOD,
> +#ifdef ATMEL_BASE_PIOE
> +	ATMEL_BASE_PIOE
>  #endif
>  #endif
>  };
> @@ -207,7 +207,7 @@ static inline void *pin_to_controller(unsigned pin)
>  {
>  	pin -= PIN_BASE;
>  	pin /= 32;
> -	return (void *)(AT91_BASE_SYS + at91_pios[pin]);
> +	return (void *)(at91_pios[pin]);
>  }
>  
>  static inline unsigned pin_to_mask(unsigned pin)
> diff --git a/arch/arm/include/asm/arch-at91/io.h b/arch/arm/include/asm/arch-at91/io.h
> index 38d185e..d0daa4e 100644
> --- a/arch/arm/include/asm/arch-at91/io.h
> +++ b/arch/arm/include/asm/arch-at91/io.h
> @@ -27,14 +27,14 @@
>  
>  static inline unsigned int at91_sys_read(unsigned int reg_offset)
>  {
> -	void *addr = (void *)AT91_BASE_SYS;
> +	void *addr = (void *)ATMEL_BASE_SYS;
>  
>  	return __raw_readl(addr + reg_offset);
>  }
>  
>  static inline void at91_sys_write(unsigned int reg_offset, unsigned long value)
>  {
> -	void *addr = (void *)AT91_BASE_SYS;
> +	void *addr = (void *)ATMEL_BASE_SYS;
>  
>  	__raw_writel(value, addr + reg_offset);
>  }

  reply	other threads:[~2011-02-18 12:27 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-18 12:49 [U-Boot] [PATCH 0/15] ATMEL rework Reinhard Meyer
2011-02-18 12:49 ` [U-Boot] [PATCH 01/15] AT91: rework at91sam9260.h Reinhard Meyer
2011-02-18 12:50   ` [U-Boot] [PATCH 02/15] AT91: rework at91sam9261.h Reinhard Meyer
2011-02-18 12:50     ` [U-Boot] [PATCH 03/15] AT91: rework at91sam9263.h Reinhard Meyer
2011-02-18 12:50       ` [U-Boot] [PATCH 04/15] AT91: rework at91sam9g45.h Reinhard Meyer
2011-02-18 12:50         ` [U-Boot] [PATCH 05/15] AT91: cleanup hardware.h, remove memory-map.h Reinhard Meyer
2011-02-18 12:25           ` Andreas Bießmann
2011-02-18 12:50             ` Reinhard Meyer
2011-02-18 12:50           ` [U-Boot] [PATCH 06/15] AT91: fix related arch-at91 header files Reinhard Meyer
2011-02-18 12:27             ` Andreas Bießmann [this message]
2011-02-18 12:52               ` Reinhard Meyer
2011-02-18 12:50             ` [U-Boot] [PATCH 07/15] AT91: fix related at91 system/driver files Reinhard Meyer
2011-02-18 12:50               ` [U-Boot] [PATCH 08/15] AT91: fix related at91 driver files Reinhard Meyer
2011-02-18 12:50                 ` [U-Boot] [PATCH 09/15] ATMEL: fix related common atmel " Reinhard Meyer
2011-02-18 12:50                   ` [U-Boot] [PATCH 10/15] AT91: cleanup at91sam9260_matrix.h to struct SoC access Reinhard Meyer
2011-02-18 12:50                     ` [U-Boot] [PATCH 11/15] AT91: change includes from asm/arch/io.h to asm/io.h Reinhard Meyer
2011-02-18 12:50                       ` [U-Boot] [PATCH 12/15] ATMEL: fix dataflash (dirty) Reinhard Meyer
2011-02-18 12:33                         ` Andreas Bießmann
2011-02-18 12:56                           ` Reinhard Meyer
2011-02-18 12:50                         ` [U-Boot] [PATCH 13/15] AT91: remove LEGACY from at91_rstc.h Reinhard Meyer
2011-02-18 12:50                           ` [U-Boot] [PATCH 14/15] AT91: fix at91sam_wdt.c to reworked header files Reinhard Meyer
2011-02-18 12:50                             ` [U-Boot] [PATCH 15/15] AT91: fix timer.c - remove reset_timer() Reinhard Meyer
2011-04-17 15:25   ` [U-Boot] [PATCH 01/15] AT91: rework at91sam9260.h Andreas Bießmann
2011-02-19  9:08 ` [U-Boot] [PATCH 0/15] ATMEL rework Remy Bohmer
2011-04-11  9:13 ` Reinhard Meyer

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=4D5E65BD.9000008@gmail.com \
    --to=andreas.devel@googlemail.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