[U-Boot] [PATCH 1/3] at91rm9200ek: convert to at91

Reinhard Meyer u-boot at emk-elektronik.de
Sun Oct 17 20:06:51 CEST 2010


Dear Andreas Bießmann,
> +Andreas Bie�mann<andreas.devel at gmail.com>

On my e-Mail client the sharp-s in the commit shows wrongly,
however it does show ok in the e-mail header itself.

>   int board_init (void)
>   {
> +	at91_pio_t *pio = (at91_pio_t *)AT91_PIO_BASE;
> +
>   	/* Enable Ctrlc */
> -	console_init_f ();
> +	console_init_f();

I think that console_init_f is done in the arm/board.c already,
please verify that.

> diff --git a/board/atmel/at91rm9200ek/config.mk b/board/atmel/at91rm9200ek/config.mk
> index 9ce161e..7b99e02 100644
> --- a/board/atmel/at91rm9200ek/config.mk
> +++ b/board/atmel/at91rm9200ek/config.mk
> @@ -1 +1,2 @@
> -TEXT_BASE = 0x21f00000
> +# currently only NOR flash booting is supported
> +TEXT_BASE = 0x10000000

Currently TEXT_BASE is being changed to CONFIG_ and moved to the <board>.h file,
thus removing the need for a <board>/config.mk.

I'm not sure when to pick up this patch and how it will merge. Wolfgang?

> diff --git a/include/configs/at91rm9200ek.h b/include/configs/at91rm9200ek.h
> index 145c3c3..8e9db92 100644
> --- a/include/configs/at91rm9200ek.h
> +++ b/include/configs/at91rm9200ek.h

...

>   /* ARM asynchronous clock */
>   /*
>    * from 18.432 MHz crystal
>    * (18432000 / 4 * 39)
>    */
> -#define AT91C_MAIN_CLOCK	179712000
> +#define AT91C_MAIN_CLOCK		179712000
>   /*
>    * peripheral clock
>    * (AT91C_MASTER_CLOCK / 3)
>    */
> -#define AT91C_MASTER_CLOCK	59904000
> +#define AT91C_MASTER_CLOCK		59904000

I wonder if it would be possible to do the calculations in the defines like
#define AT91C_MAIN_CLOCK ((AT91C_XTAL_CLOCK/4)*39).
You get the idea...

> -#define AT91_SLOW_CLOCK		32768	/* slow clock */
> +#define CONFIG_ARM920T			1 /* This is an ARM920T Core */
> +#define CONFIG_AT91RM9200		1 /* It's an Atmel AT91RM9200 SoC */
> +#define CONFIG_AT91RM9200EK		1 /* on an AT91RM9200EK Board */
> +#define CONFIG_CPUAT91			1 /* we use newer AT91 code */
> +#define USE_920T_MMU			1
>
> -#define CONFIG_ARM920T		1	/* This is an ARM920T Core	*/
> -#define CONFIG_AT91RM9200	1	/* It's an Atmel AT91RM9200 SoC	*/
> -#define CONFIG_AT91RM9200EK	1	/* on an AT91RM9200EK Board	*/
> -#undef  CONFIG_USE_IRQ			/* we don't need IRQ/FIQ stuff	*/
> -#define USE_920T_MMU		1
> +#define CONFIG_CMDLINE_TAG		1 /* enable passing of ATAGs */
> +#define CONFIG_SETUP_MEMORY_TAGS	1
> +#define CONFIG_INITRD_TAG		1
>
> -#define CONFIG_CMDLINE_TAG	1	/* enable passing of ATAGs	*/
> -#define CONFIG_SETUP_MEMORY_TAGS 1
> -#define CONFIG_INITRD_TAG	1

On all files we touch, we want to change "#define SOMETHING 1" into
"#define SOMETHING" when the value itself is not used.
Please try to fix that globally.

> @@ -113,10 +112,6 @@
>   #define CONFIG_DBGU
>   #undef CONFIG_USART0
>   #undef CONFIG_USART1

Don't #undef what has never been defined.

> +#include<asm/arch/hardware.h>	/* needed for port definitions */

Are you sure that is needed in the midst of <board>.h?

Best Regards,
Reinhard


More information about the U-Boot mailing list