[U-Boot] [PATCH ATMEL REWORK] update arm/at91rm9200 work with rework rework110202

Andreas Bießmann andreas.devel at googlemail.com
Fri Feb 11 09:11:18 CET 2011


Dear Jens Scharsig,

Am 10.02.2011 um 20:31 schrieb Jens Scharsig:

> * update arm920t/at91 to ATMEL_xxx name scheme
> * convert at91rm9200ek and eb_cpux9k2 board to ATMEL_xxx name scheme
> * update arm920t/at91 soc lib
> * update at91_emac driver
> 
> Signed-off-by: Jens Scharsig <js_at_ng at scharsoft.de>

Tested-by: Andreas Bießmann <andreas.devel at gmail.com>

But some changes

> ---
> 
> The eb_cpux9k2 board can compile and runs after patch changes
> The at91rm9200ek can compile, but i have no hardware to test it.

at91rm9200ek is working but the change for timer.c is needed
 Testet peripheral for at91rm9200ek is:
  - USB (fatls)
  - EMAC (tftp)

> arch/arm/cpu/arm920t/at91/reset.c           |    2 +-
> arch/arm/cpu/arm920t/at91/timer.c           |   10 +-
> arch/arm/include/asm/arch-at91/at91_mc.h    |   12 +-
> arch/arm/include/asm/arch-at91/at91_pmc.h   |   10 +-
> arch/arm/include/asm/arch-at91/at91rm9200.h |  209 ++++++++++++++-------------
> board/BuS/eb_cpux9k2/cpux9k2.c              |   52 ++++----
> board/atmel/at91rm9200ek/at91rm9200ek.c     |    4 +-
> board/atmel/at91rm9200ek/led.c              |   22 ++--
> drivers/net/at91_emac.c                     |   32 ++--
> include/configs/at91rm9200ek.h              |    2 +-
> include/configs/eb_cpux9k2.h                |   29 +++--
> 11 files changed, 201 insertions(+), 183 deletions(-)

[reset.c is OK]

Please add:

diff --git a/arch/arm/cpu/arm920t/at91/timer.c b/arch/arm/cpu/arm920t/at91/timer.c
index e2630b8..f0ad7d6 100644
--- a/arch/arm/cpu/arm920t/at91/timer.c
+++ b/arch/arm/cpu/arm920t/at91/timer.c
@@ -32,7 +32,7 @@
 
 #include <common.h>
 
-#include <asm/arch/io.h>
+#include <asm/io.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/at91_tc.h>
 #include <asm/arch/at91_pmc.h>

[other changes to timer.c are OK]
[at91_mc.h is OK]
[at91_pmc.h is OK]

> diff --git a/arch/arm/include/asm/arch-at91/at91rm9200.h b/arch/arm/include/asm/arch-at91/at91rm9200.h
> index 1bee6f2..58f0e39 100644
> --- a/arch/arm/include/asm/arch-at91/at91rm9200.h
> +++ b/arch/arm/include/asm/arch-at91/at91rm9200.h
> @@ -21,115 +21,126 @@
> #ifndef __AT91RM9200_H__
> #define __AT91RM9200_H__
> 
> +#define CONFIG_AT91FAMILY	/* it's a member of AT91 */
> +#define CONFIG_ARM920T		/* This is an ARM920T Core	*/
> +

These are defined in board header .. I saw they are defined also in other at91xxx.h files, we should discuss where to define these since all of the at91xx.h files are included by hardware.h

> /* Periperial Identifiers */

[snip changes to at91rm9200.h which are obviously OK]

> +#define ATMEL_PIO_PORTS		4	/* theese SoCs have 3 PIO */

3 or 4 PIO?

> +#define ATMEL_PMC_UHP		AT91RM9200_PMC_UHP
> +
> +#define CONFIG_SYS_ATMEL_CPU_NAME	"AT91RM9200"
> 
> #endif

[cpux9k2.c is OK]
[at91rm9200ek.c is OK]
[at91rm9200ek/led.c is OK]
[at91_emac.c is OK]
[at91rm9200ek.h is OK]

> --- a/include/configs/eb_cpux9k2.h
> +++ b/include/configs/eb_cpux9k2.h
> @@ -29,12 +29,13 @@
> 
> /*--------------------------------------------------------------------------*/
> 
> -#define CONFIG_ARM920T		1	/* This is an ARM920T Core	*/
> -#define CONFIG_AT91RM9200	1	/* It's an Atmel AT91RM9200 SoC	*/
> -#define CONFIG_EB_CPUX9K2	1	/* on an EP+CPUX9K2 Board	*/
> -#define USE_920T_MMU		1
> +#define CONFIG_ARM920T			/* This is an ARM920T Core	*/
> +#define CONFIG_AT91FAMILY
> +#define CONFIG_AT91RM9200		/* It's an Atmel AT91RM9200 SoC	*/
> +#define CONFIG_EB_CPUX9K2		/* on an EP+CPUX9K2 Board	*/
> +#define USE_920T_MMU
> 
> -#define CONFIG_VERSION_VARIABLE 1
> +#define CONFIG_VERSION_VARIABLE
> #define CONFIG_IDENT_STRING	" on EB+CPUx9K2"
> 
> #include <asm/arch/hardware.h>	/* needed for port definitions */
> @@ -186,8 +187,12 @@
> #define CONFIG_NET_RETRY_COUNT		10
> #define CONFIG_RESET_PHY_R		1
> 
> +

please remove this additional empty line

> #define CONFIG_DRIVER_AT91EMAC		1
> #define CONFIG_DRIVER_AT91EMAC_QUIET	1
> +/*
> +#define CONFIG_DRIVER_MACB		1
> +*/

why this? Either it is needed or not.

> #define CONFIG_SYS_RX_ETH_BUFFER	8
> #define CONFIG_MII			1
> 
> @@ -217,19 +222,19 @@
> #define CONFIG_SYS_I2C_INIT_BOARD
> 
> #define I2C_INIT	i2c_init_board();
> -#define I2C_ACTIVE	writel(AT91_PMX_AA_TWD, &pio->pioa.mddr);
> -#define I2C_TRISTATE	writel(AT91_PMX_AA_TWD, &pio->pioa.mder);
> -#define I2C_READ	((readl(&pio->pioa.pdsr) & AT91_PMX_AA_TWD) != 0)
> +#define I2C_ACTIVE	writel(ATMEL_PMX_AA_TWD, &pio->pioa.mddr);
> +#define I2C_TRISTATE	writel(ATMEL_PMX_AA_TWD, &pio->pioa.mder);
> +#define I2C_READ	((readl(&pio->pioa.pdsr) & ATMEL_PMX_AA_TWD) != 0)
> #define I2C_SDA(bit)						\
> 	if (bit)						\
> -		writel(AT91_PMX_AA_TWD, &pio->pioa.sodr);	\
> +		writel(ATMEL_PMX_AA_TWD, &pio->pioa.sodr);	\
> 	else							\
> -		writel(AT91_PMX_AA_TWD, &pio->pioa.codr);
> +		writel(ATMEL_PMX_AA_TWD, &pio->pioa.codr);
> #define I2C_SCL(bit)						\
> 	if (bit)						\
> -		writel(AT91_PMX_AA_TWCK, &pio->pioa.sodr);	\
> +		writel(ATMEL_PMX_AA_TWCK, &pio->pioa.sodr);	\
> 	else							\
> -		writel(AT91_PMX_AA_TWCK, &pio->pioa.codr);
> +		writel(ATMEL_PMX_AA_TWCK, &pio->pioa.codr);
> 
> #define I2C_DELAY	udelay(2500000/CONFIG_SYS_I2C_SPEED)
> 
> -- 
> 1.7.1
> 



More information about the U-Boot mailing list