[U-Boot-Users] [PATCH 4/5] [ARM] AT91CAP9 support - board/ files
Jean-Christophe PLAGNIOL-VILLARD
plagnioj at jcrosoft.com
Mon Jan 28 22:26:51 CET 2008
On 11:57 Mon 28 Jan , Stelian Pop wrote:
> AT91CAP9 support - board/ files
>
> Signed-off-by: Stelian Pop <stelian at popies.net>
>
> ---
> board/at91cap9adk/Makefile | 50 +++++++
> board/at91cap9adk/at91cap9adk.c | 295 +++++++++++++++++++++++++++++++++++++++
> board/at91cap9adk/config.mk | 1 +
> board/at91cap9adk/led.c | 80 +++++++++++
> board/at91cap9adk/nand.c | 71 ++++++++++
> board/at91cap9adk/u-boot.lds | 57 ++++++++
> include/configs/at91cap9adk.h | 231 ++++++++++++++++++++++++++++++
> 7 files changed, 785 insertions(+), 0 deletions(-)
> create mode 100644 board/at91cap9adk/Makefile
> create mode 100644 board/at91cap9adk/at91cap9adk.c
> create mode 100644 board/at91cap9adk/config.mk
> create mode 100644 board/at91cap9adk/led.c
> create mode 100644 board/at91cap9adk/nand.c
> create mode 100644 board/at91cap9adk/u-boot.lds
> create mode 100644 include/configs/at91cap9adk.h
>
> +#else
> +#error AT91CAP9A-DK works only in RMII mode
> +#endif
> +
> + /* Unlock EMAC, 3 0 2 1 sequence */
> +#define MP_BLOCK_3_BASE 0xFDF00000
> +#define MP_MAC_KEY0 0x5969cb2a
> +#define MP_MAC_KEY1 0xb4a1872e
> +#define MP_MAC_KEY2 0x05683fbc
> +#define MP_MAC_KEY3 0x3634fba4
> +#define UNLOCK_MAC 0x00000008
> + *((AT91_REG *)((AT91_REG) MP_BLOCK_3_BASE + 0x3c)) = MP_MAC_KEY3;
> + *((AT91_REG *)((AT91_REG) MP_BLOCK_3_BASE + 0x30)) = MP_MAC_KEY0;
> + *((AT91_REG *)((AT91_REG) MP_BLOCK_3_BASE + 0x38)) = MP_MAC_KEY2;
> + *((AT91_REG *)((AT91_REG) MP_BLOCK_3_BASE + 0x34)) = MP_MAC_KEY1;
> + *((AT91_REG *)((AT91_REG) MP_BLOCK_3_BASE + 0x40)) = UNLOCK_MAC;
> +#undef MP_BLOCK_3_BASE
> +#undef MP_MAC_KEY0
> +#undef MP_MAC_KEY1
> +#undef MP_MAC_KEY2
> +#undef MP_MAC_KEY3
> +#undef UNLOCK_MAC
> +}
> +#endif
> +
> +#ifdef CONFIG_USB_OHCI_NEW
> +static void at91cap9_uhp_hw_init(void)
> +{
> + /* Unlock USB OHCI, 3 2 0 1 sequence */
> +#define MP_BLOCK_3_BASE 0xFDF00000
> +#define MP_OHCI_KEY0 0x896c11ca
> +#define MP_OHCI_KEY1 0x68ebca21
> +#define MP_OHCI_KEY2 0x4823efbc
> +#define MP_OHCI_KEY3 0x8651aae4
> +#define UNLOCK_OHCI 0x00000010
> + *((AT91_REG *)((AT91_REG) MP_BLOCK_3_BASE + 0x3c)) = MP_OHCI_KEY3;
> + *((AT91_REG *)((AT91_REG) MP_BLOCK_3_BASE + 0x38)) = MP_OHCI_KEY2;
> + *((AT91_REG *)((AT91_REG) MP_BLOCK_3_BASE + 0x30)) = MP_OHCI_KEY0;
> + *((AT91_REG *)((AT91_REG) MP_BLOCK_3_BASE + 0x34)) = MP_OHCI_KEY1;
> + *((AT91_REG *)((AT91_REG) MP_BLOCK_3_BASE + 0x40)) = UNLOCK_OHCI;
> +#undef MP_BLOCK_3_BASE
> +#undef MP_OHCI_KEY0
> +#undef MP_OHCI_KEY1
> +#undef MP_OHCI_KEY2
> +#undef MP_OHCI_KEY3
> +#undef UNLOCK_OHCI
> +}
> +#endif
why did you defined and undefined value, specialy when you redefined the
same value?
> +
> +/*
> + * (C) Copyright 2007-2008
> + * Stelian Pop <stelian.pop at leadtechdesign.com>
> +#define __CONFIG_H
> +/* SDRAM: Careful: this supposes an AT91CAP-MEM33 expansion card */
> +#define CONFIG_NR_DRAM_BANKS 1
> +#define PHYS_SDRAM 0x70000000
> +#define PHYS_SDRAM_SIZE 0x04000000 /* 64 megs */
pls remove not needed space
> +
> +/* DataFlash */
> +#define CONFIG_HAS_DATAFLASH 1
> +#define CFG_SPI_WRITE_TOUT (5*CFG_HZ)
> +#define CFG_MAX_DATAFLASH_BANKS 1
pls remove not needed space
> +#define CFG_DATAFLASH_LOGIC_ADDR_CS0 0xC0000000 /* CS0 */
> +#define CONFIG_NEW_PARTITION 1
> +
> +/* NOR flash */
> +/* NAND flash */
> +#define NAND_MAX_CHIPS 1
> +#define CFG_MAX_NAND_DEVICE 1
> +#define CFG_NAND_BASE 0x40000000
pls remove not needed space
Best Regards,
J.
More information about the U-Boot
mailing list