[U-Boot] [PATCH 2/2] at91: fixed 'esd gmbh' meesc and otc570 boards
Reinhard Meyer
u-boot at emk-elektronik.de
Fri Jan 21 12:34:00 CET 2011
Dear Daniel Gorsulowski,
> Signed-off-by: Daniel Gorsulowski<Daniel.Gorsulowski at esd.eu>
> ---
>
> There is still a bug in USART config. This patch is for reviewing only!
I am really at a loss how that can be, since you correctly pass the DBGU
address to the driver.
>
> board/esd/meesc/config.mk | 1 -
> board/esd/meesc/meesc.c | 39 +++++-----
> board/esd/otc570/config.mk | 1 -
> board/esd/otc570/otc570.c | 51 +++++++------
> boards.cfg | 6 +-
> include/configs/meesc.h | 150 ++++++++++++++++++++++---------------
> include/configs/otc570.h | 179 +++++++++++++++++++++++++-------------------
> 7 files changed, 241 insertions(+), 186 deletions(-)
> delete mode 100644 board/esd/meesc/config.mk
> delete mode 100644 board/esd/otc570/config.mk
>
> diff --git a/board/esd/meesc/config.mk b/board/esd/meesc/config.mk
> deleted file mode 100644
OK
> diff --git a/board/esd/meesc/meesc.c b/board/esd/meesc/meesc.c
> index 41fa3e1..46cd33c 100644
> --- a/board/esd/meesc/meesc.c
> +++ b/board/esd/meesc/meesc.c
> ...
> - gd->bd->bi_dram[0].start = PHYS_SDRAM;
> - gd->bd->bi_dram[0].size = get_ram_size((long *) PHYS_SDRAM, (1<< 27));
> + gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE;
> + gd->bd->bi_dram[0].size = get_ram_size((long *) CONFIG_SYS_SDRAM_BASE,
> + (1<< 27));
Maybe there is a suitable SIZE_128MIB (didn't check) - would look more readable ;)
> diff --git a/board/esd/otc570/config.mk b/board/esd/otc570/config.mk
> deleted file mode 100644
OK
> diff --git a/board/esd/otc570/otc570.c b/board/esd/otc570/otc570.c
> index 410d8b4..c66f99e 100644
> --- a/board/esd/otc570/otc570.c
> +++ b/board/esd/otc570/otc570.c
> @@ -1,5 +1,5 @@
> /*
> - * (C) Copyright 2010
> + * (C) Copyright 2010-2011
> * Daniel Gorsulowski<daniel.gorsulowski at esd.eu>
> * esd electronic system design gmbh<www.esd.eu>
> *
> @@ -27,6 +27,7 @@
> */
>
> #include<common.h>
> +#include<asm/io.h>
> #include<asm/arch/at91sam9263.h>
including hardware.h does include above, don't include it directly.
> #include<asm/arch/at91sam9_smc.h>
> #include<asm/arch/at91_common.h>
> @@ -36,7 +37,6 @@
> #include<asm/arch/at91_pio.h>
> #include<asm/arch/clk.h>
> #include<asm/arch/hardware.h>
> -#include<asm/arch/io.h>
> #include<atmel_lcdc.h>
> #include<lcd.h>
> #include<netdev.h>
> - gd->bd->bi_dram[0].start = PHYS_SDRAM;
> - gd->bd->bi_dram[0].size = get_ram_size((long *) PHYS_SDRAM, (1<< 27));
> + gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE;
> + gd->bd->bi_dram[0].size = get_ram_size((long *) CONFIG_SYS_SDRAM_BASE,
> + (1<< 27));
Same as above (optional)
> diff --git a/boards.cfg b/boards.cfg
> index 9b15026..77f3fc4 100644
> --- a/boards.cfg
> +++ b/boards.cfg
> @@ -83,8 +83,10 @@ at91sam9xeek_dataflash_cs0 arm arm926ejs at91sam9260ek atmel
> at91sam9xeek_dataflash_cs1 arm arm926ejs at91sam9260ek atmel at91 at91sam9260ek:AT91SAM9XE,SYS_USE_DATAFLASH_CS1
> top9000eval_xe arm arm926ejs top9000 emk at91 top9000:EVAL9000
> top9000su_xe arm arm926ejs top9000 emk at91 top9000:SU9000
> -meesc arm arm926ejs - esd at91
> -otc570 arm arm926ejs - esd at91
> +meesc arm arm926ejs meesc esd at91 meesc:AT91SAM9263,SYS_USE_NANDFLASH
> +meesc_dataflash arm arm926ejs meesc esd at91 meesc:AT91SAM9263,SYS_USE_DATAFLASH
> +otc570 arm arm926ejs otc570 esd at91 otc570:AT91SAM9263,SYS_USE_NANDFLASH
> +otc570_dataflash arm arm926ejs otc570 esd at91 otc570:AT91SAM9263,SYS_USE_DATAFLASH
Apparently its always a sam9263, so please don't define it here. The defines in boards.cfg should only be used
for differences between variants.
> diff --git a/include/configs/meesc.h b/include/configs/meesc.h
> index a27b36b..dbb97ed 100644
> --- a/include/configs/meesc.h
> +++ b/include/configs/meesc.h
> @@ -3,7 +3,7 @@
> * Stelian Pop<stelian.pop at leadtechdesign.com>
> * Lead Tech Design<www.leadtechdesign.com>
> *
> - * (C) Copyright 2009-2010
> + * (C) Copyright 2009-2011
> * Daniel Gorsulowski<daniel.gorsulowski at esd.eu>
> * esd electronic system design gmbh<www.esd.eu>
> *
> @@ -31,49 +31,67 @@
> #ifndef __CONFIG_H
> #define __CONFIG_H
>
> -/* Common stuff */
> -#define CONFIG_MEESC 1 /* Board is esd MEESC */
> -#define CONFIG_ARM926EJS 1 /* This is an ARM926EJS Core */
> -#define CONFIG_AT91SAM9263 1 /* It's an AT91SAM9263 SoC */
> -#define CONFIG_SYS_AT91_MAIN_CLOCK 16000000/* 16.0 MHz crystal */
> +/*
> + * SoC must be defined first, before hardware.h is included.
> + * In this case SoC is defined in boards.cfg.
Please define SoC here.
> + */
> +#include<asm/hardware.h>
> +#define CONFIG_ATMEL_USART
> +#define CONFIG_USART_BASE ATMEL_BASE_DBGU
> +#define CONFIG_USART_ID ATMEL_ID_SYS
> +#define CONFIG_BAUDRATE 115200
> +#define CONFIG_SYS_BAUDRATE_TABLE {115200, 19200, 38400, 57600, 9600}
I can't see any error here...
> diff --git a/include/configs/otc570.h b/include/configs/otc570.h
> index ca3bf26..013c837 100644
> --- a/include/configs/otc570.h
> +++ b/include/configs/otc570.h
Same comments apply here.
I'll run it through checkpatch.pl later.
Best Regards,
Reinhard
More information about the U-Boot
mailing list