All of lore.kernel.org
 help / color / mirror / Atom feed
From: Reinhard Meyer <u-boot@emk-elektronik.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2][ARM][AT91] Build fix/update of AFEB9260
Date: Thu, 09 Jun 2011 11:13:25 +0200	[thread overview]
Message-ID: <4DF08EB5.5020303@emk-elektronik.de> (raw)
In-Reply-To: <1307529648-27069-1-git-send-email-slapin@ossfans.org>

Dear Sergey Lapin,
> Make AFEB9260 build again.
> Based on fix for AT91SAM9260EK.
> 
> Signed-off-by: Sergey Lapin <slapin@ossfans.org>
> ---
> Cleaned-up a bit
> 
>  board/afeb9260/afeb9260.c  |  103 ++++++++++++++++++++++++-------------------
>  boards.cfg                 |    2 +-
>  include/configs/afeb9260.h |   28 +++++++++---
>  3 files changed, 79 insertions(+), 54 deletions(-)
> 
...
> diff --git a/boards.cfg b/boards.cfg
> index ac20c81..a187a9f 100644
> --- a/boards.cfg
> +++ b/boards.cfg
> @@ -72,7 +72,7 @@ netstar                      arm         arm925t
>  voiceblue                    arm         arm925t
>  omap1510inn                  arm         arm925t     -                   ti
>  aspenite                     arm         arm926ejs   -                   Marvell        armada100
> -afeb9260                     arm         arm926ejs   -                   -              at91
> +afeb9260                     arm         arm926ejs   -                   -              at91        afeb9260:AT91SAM9260
>  at91cap9adk                  arm         arm926ejs   -                   atmel          at91
>  at91sam9260ek_nandflash      arm         arm926ejs   at91sam9260ek       atmel          at91        at91sam9260ek:AT91SAM9260,SYS_USE_NANDFLASH
>  at91sam9260ek_dataflash_cs0  arm         arm926ejs   at91sam9260ek       atmel          at91        at91sam9260ek:AT91SAM9260,SYS_USE_DATAFLASH_CS0

Does not the afeb9260 have a manufacturer?
And if it is not planned to be available with other Atmel SoCs, it is not necessary
to have the "AT91SAM9260" in the boards.cfg file. See also below.

> diff --git a/include/configs/afeb9260.h b/include/configs/afeb9260.h
> index 36a2a46..9114a52 100644
> --- a/include/configs/afeb9260.h
> +++ b/include/configs/afeb9260.h
> @@ -25,12 +25,19 @@
>  
>  #ifndef __CONFIG_H
>  #define __CONFIG_H
> +#include <asm/arch/hardware.h>
>  
> -#define CONFIG_AT91_LEGACY
> +#define CONFIG_SYS_TEXT_BASE		0x21f00000
>  
>  /* ARM asynchronous clock */
>  #define CONFIG_SYS_AT91_MAIN_CLOCK		18429952	/* from 18.432 MHz crystal */
> -#define CONFIG_SYS_HZ		1000
> +#define CONFIG_SYS_AT91_SLOW_CLOCK		32768
> +#define CONFIG_SYS_HZ				1000
> +
> +#define CONFIG_BOARD_EARLY_INIT_F
> +#define CONFIG_DISPLAY_CPUINFO
> +
> +
>  
>  #define CONFIG_AT91SAM9260	1	/* It's an Atmel AT91SAM9260 SoC*/

This should lead to a double definition warning. See above.
Also, please do not use "1" if no numerical value is intended
for the define.
Important: if you define the SoC type in this file, it must be before
"hardware.h" is included.

>  #define CONFIG_AFEB9260		1	/* on an AFEB9260 Board	*/
Please remove the "1" here. Fix further down as well.
> @@ -46,8 +53,14 @@
>  /*
>   * Hardware drivers
>   */
> +#define CONFIG_ATMEL_LEGACY
>  #define CONFIG_AT91_GPIO	1
No "1" here.
> +#define CONFIG_AT91_PULLUP	1
This "1" is required. OK.
> +
> +
Avoid double empty lines.
>  #define CONFIG_ATMEL_USART	1
No "1" here.
> +#define CONFIG_USART_BASE	ATMEL_BASE_DBGU
> +#define CONFIG_USART_ID		ATMEL_ID_SYS
>  #undef CONFIG_USART0
>  #undef CONFIG_USART1
>  #undef CONFIG_USART2
Please, no #undef's. Fix further down as well.
> @@ -82,8 +95,8 @@
>  
>  /* SDRAM */
>  #define CONFIG_NR_DRAM_BANKS		1
> -#define PHYS_SDRAM			0x20000000
> -#define PHYS_SDRAM_SIZE			0x04000000	/* 64 megs */
> +#define CONFIG_SYS_SDRAM_BASE		ATMEL_BASE_CS1
> +#define CONFIG_SYS_SDRAM_SIZE		0x04000000	/* 64 megs */
>  
>  /* DataFlash */
>  #define CONFIG_ATMEL_DATAFLASH_SPI
> @@ -100,7 +113,7 @@
>  #ifdef CONFIG_CMD_NAND
>  #define CONFIG_NAND_ATMEL
>  #define CONFIG_SYS_MAX_NAND_DEVICE		1
> -#define CONFIG_SYS_NAND_BASE			0x40000000
> +#define CONFIG_SYS_NAND_BASE			ATMEL_BASE_CS3
>  #define CONFIG_SYS_NAND_DBW_8			1
>  /* our ALE is AD21 */
>  #define CONFIG_SYS_NAND_MASK_ALE		(1 << 21)
> @@ -134,12 +147,14 @@
>  
>  #define CONFIG_SYS_LOAD_ADDR			0x21000000	/* load address */
>  
> -#define CONFIG_SYS_MEMTEST_START		PHYS_SDRAM
> +#define CONFIG_SYS_MEMTEST_START		CONFIG_SYS_SDRAM_BASE
>  #define CONFIG_SYS_MEMTEST_END			0x21e00000
>  
>  #undef CONFIG_SYS_USE_DATAFLASH_CS0
>  #define CONFIG_SYS_USE_DATAFLASH_CS1		1
>  #undef CONFIG_SYS_USE_NANDFLASH
> +#define CONFIG_SYS_INIT_SP_ADDR		(ATMEL_BASE_SRAM1 + 0x1000 -\
> +					GENERATED_GBL_DATA_SIZE)
>  
>  /* bootstrap + u-boot + env + linux in dataflash on CS1 */
>  #define CONFIG_ENV_IS_IN_DATAFLASH	1

Best Regards,
Reinhard

  reply	other threads:[~2011-06-09  9:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-08 10:40 [U-Boot] [PATCH v2][ARM][AT91] Build fix/update of AFEB9260 Sergey Lapin
2011-06-09  9:13 ` Reinhard Meyer [this message]
2011-06-09 14:59   ` Sergey Lapin
2011-06-09 15:12   ` [U-Boot] [PATCH v3][AT91][ARM] " Sergey Lapin
2011-06-09 15:21     ` Sergey Lapin
2011-06-09 15:45   ` [U-Boot] [PATCH v4][AT91][ARM] " Sergey Lapin
2011-06-14 11:52     ` Sergey Lapin
2011-06-14 16:36     ` 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=4DF08EB5.5020303@emk-elektronik.de \
    --to=u-boot@emk-elektronik.de \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.