[U-Boot] [PATCH][Re-Submit-again] Custom AFEB9260 board support
Jean-Christophe PLAGNIOL-VILLARD
plagnioj at jcrosoft.com
Sun Oct 26 14:49:49 CET 2008
On 13:43 Sun 26 Oct , Sergey Lapin wrote:
> This patch provides support for AFEB9260 board, a product of
> OpenSource hardware and software. Some commertial projects
> are made with this design. A board is basically AT91SAM9260-EK
> with some modifications and different peripherals and different
> parts used. Main purpose of this project is to gain experience in
> hardware design.
> More info: http://groups.google.com/group/arm9fpga-evolution-board
> (In Russian only, sorry).
> Subversion repository: svn://194.85.238.22/home/users/george/svn/arm9eb
>
> Signed-off-by: Sergey Lapin <slapin at ossfans.org>
> ---
> All suggested changes handled (If I forgot something please remind me).
> Rebased against u-boot-arm.git
> Hope to get review.
> ---
> MAKEALL | 1 +
> Makefile | 3 +
> board/afeb9260/Makefile | 56 ++++++++++
> board/afeb9260/afeb9260.c | 243 ++++++++++++++++++++++++++++++++++++++++++++
> board/afeb9260/config.mk | 1 +
> board/afeb9260/nand.c | 78 ++++++++++++++
> board/afeb9260/partition.c | 37 +++++++
> include/configs/afeb9260.h | 169 ++++++++++++++++++++++++++++++
> 8 files changed, 588 insertions(+), 0 deletions(-)
> create mode 100644 board/afeb9260/Makefile
> create mode 100644 board/afeb9260/afeb9260.c
> create mode 100644 board/afeb9260/config.mk
> create mode 100644 board/afeb9260/nand.c
> create mode 100644 board/afeb9260/partition.c
> create mode 100644 include/configs/afeb9260.h
>
> diff --git a/MAKEALL b/MAKEALL
> index aa602b7..ba9aad1 100755
> --- a/MAKEALL
> +++ b/MAKEALL
> @@ -544,6 +544,7 @@ LIST_at91=" \
> kb9202 \
> mp2usb \
> m501sk \
> + afeb9260 \
please keep it sorted
> "
>
> #########################################################################
> diff --git a/Makefile b/Makefile
> index fceb8a2..db6d76c 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -2521,6 +2521,9 @@ mp2usb_config : unconfig
> ## Atmel ARM926EJ-S Systems
> #########################################################################
> +#ifdef CONFIG_USART2
> + at91_set_A_periph(AT91_PIN_PB8, 1); /* TXD2 */
> + at91_set_A_periph(AT91_PIN_PB9, 0); /* RXD2 */
> + at91_sys_write(AT91_PMC_PCER, 1 << AT91_ID_US2);
> +#endif
> +
> +#ifdef CONFIG_USART3 /* DBGU */
> + at91_set_A_periph(AT91_PIN_PB14, 0); /* DRXD */
> + at91_set_A_periph(AT91_PIN_PB15, 1); /* DTXD */
> + at91_sys_write(AT91_PMC_PCER, 1 << AT91_ID_SYS);
> +#endif
> +}
> +
...
> + if (ctrl & NAND_CLE)
> + IO_ADDR_W |= MASK_CLE;
> + if (ctrl & NAND_ALE)
> + IO_ADDR_W |= MASK_ALE;
> +
> + at91_set_gpio_value(AT91_PIN_PC14, !(ctrl & NAND_NCE));
> + this->IO_ADDR_W = (void *) IO_ADDR_W;
> + }
> +
> + if (cmd != NAND_CMD_NONE)
> + writeb(cmd, this->IO_ADDR_W);
> +}
> +
> +static int at91sam9260ek_nand_ready(struct mtd_info *mtd)
> +{
> + return at91_get_gpio_value(AT91_PIN_PC13);
> +}
> +
> +int board_nand_init(struct nand_chip *nand)
> +{
> + nand->ecc.mode = NAND_ECC_SOFT;
> +#ifdef CFG_NAND_DBW_16
please replace by CONFIG_SYS_
> + nand->options = NAND_BUSWIDTH_16;
> +#endif
> + nand->cmd_ctrl = at91sam9260ek_nand_hwcontrol;
> + nand->dev_ready = at91sam9260ek_nand_ready;
> + nand->chip_delay = 20;
> +
> + return 0;
> +}
> +#define DATAFLASH_TCHS (0x1 << 24)
> +
> +/* NAND flash */
> +#define NAND_MAX_CHIPS 1
> +#define CONFIG_SYS_MAX_NAND_DEVICE 1
> +#define CONFIG_SYS_NAND_BASE 0x40000000
> +#define CONFIG_SYS_NAND_DBW_8 1
> +
> +/* NOR flash - no real flash on this board */
> +#define CONFIG_SYS_NO_FLASH 1
> +
> +/* Ethernet */
> +#define CONFIG_MACB 1
> +#undef CONFIG_RMII /* We have full MII there */
> +#define CONFIG_RESET_PHY_R 1
> +
> +#define CONFIG_NET_MULTI 1
> +#define CONFIG_NET_RETRY_COUNT 20
> +
> +/* USB */
> +#define CONFIG_USB_OHCI_NEW 1
> +#define LITTLEENDIAN 1
> +#define CONFIG_DOS_PARTITION 1
> +#define CFG_USB_OHCI_CPU_INIT 1
please replace by CONFIG_SYS_
> +#define CONFIG_SYS_USB_OHCI_REGS_BASE 0x00500000 /* AT91SAM9260_UHP_BASE */
> +#define CONFIG_SYS_USB_OHCI_SLOT_NAME "at91sam9260"
> +#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 1
> +#define CONFIG_USB_STORAGE 1
> +
> +#define CONFIG_SYS_LOAD_ADDR 0x21000000 /* load address */
> +
> +#define CONFIG_SYS_MEMTEST_START PHYS_SDRAM
> +#define CONFIG_SYS_MEMTEST_END 0x21e00000
> +
> +#undef CONFIG_SYS_USE_DATAFLASH_CS0
> +#define CONFIG_SYS_USE_DATAFLASH_CS1 1
> +#undef CONFIG_SYS_USE_NANDFLASH
> +
> +/* bootstrap + u-boot + env + linux in dataflash on CS1 */
> +#define CONFIG_ENV_IS_IN_DATAFLASH 1
> +#define CFG_MONITOR_BASE (CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS1 + 0x8400)
please replace by CONFIG_SYS_
> +#define CONFIG_ENV_OFFSET 0x4200
> +#define CONFIG_ENV_ADDR (CONFIG_SYS_DATAFLASH_LOGIC_ADDR_CS1 + CONFIG_ENV_OFFSET)
> +#define CONFIG_ENV_SIZE 0x4200
> +#define CONFIG_BOOTCOMMAND "nand read 0x21000000 0xa0000 0x200000; bootm"
> +#define CONFIG_BOOTARGS "console=ttyS0,115200 " \
> + "root=/dev/mtdblock2 " \
> + "rw rootfstype=jffs2 panic=20"
> +
> +#define CONFIG_BAUDRATE 115200
> +#define CONFIG_SYS_BAUDRATE_TABLE {115200 , 19200, 38400, 57600, 9600 }
> +
> +#define CONFIG_SYS_PROMPT "U-Boot> "
> +#define CONFIG_SYS_CBSIZE 256
> +#define CONFIG_SYS_MAXARGS 16
> +#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
> +#define CFG_LONGHELP 1
please replace by CONFIG_SYS_
> +#define CONFIG_CMDLINE_EDITING 1
> +
> +#define ROUND(A, B) (((A) + (B)) & ~((B) - 1))
> +/*
> + * Size of malloc() pool
> + */
> +#define CONFIG_SYS_MALLOC_LEN ROUND(3 * CONFIG_ENV_SIZE + 128*1024, 0x1000)
> +#define CONFIG_SYS_GBL_DATA_SIZE 128 /* 128 bytes for initial data */
> +
> +#define CONFIG_STACKSIZE (32*1024) /* regular stack */
please add space between "*"
> +
> +#ifdef CONFIG_USE_IRQ
> +#error CONFIG_USE_IRQ not supported
> +#endif
> +
> +#endif
> +
Best Regards,
J.
More information about the U-Boot
mailing list