From fecc3c75294371abe885e9eb3c72e49e3ee498c9 Mon Sep 17 00:00:00 2001 From: kardy Date: Fri, 12 Aug 2016 01:39:05 +0200 Subject: [PATCH 2/4] Modding the AT91RM9200EK config to match setup and PCB used with uboot v1.1.4 Removing unneeded USB cfg --- configs/at91rm9200ek_defconfig | 2 -- include/configs/at91rm9200ek.h | 48 ++++++++++++++++++++---------------------- 2 files changed, 23 insertions(+), 27 deletions(-) diff --git a/configs/at91rm9200ek_defconfig b/configs/at91rm9200ek_defconfig index f1303b3..a0499ae 100644 --- a/configs/at91rm9200ek_defconfig +++ b/configs/at91rm9200ek_defconfig @@ -5,11 +5,9 @@ CONFIG_BOOTDELAY=3 CONFIG_HUSH_PARSER=y CONFIG_SYS_PROMPT="U-Boot> " CONFIG_CMD_BOOTZ=y -CONFIG_CMD_USB=y # CONFIG_CMD_FPGA is not set # CONFIG_CMD_SETEXPR is not set CONFIG_CMD_DHCP=y CONFIG_CMD_MII=y CONFIG_CMD_PING=y CONFIG_CMD_FAT=y -CONFIG_OF_LIBFDT=y diff --git a/include/configs/at91rm9200ek.h b/include/configs/at91rm9200ek.h index c92ad85..89876d7 100644 --- a/include/configs/at91rm9200ek.h +++ b/include/configs/at91rm9200ek.h @@ -30,6 +30,8 @@ #define CONFIG_SYS_TEXT_BASE 0x10000000 #endif +#define CONFIG_SYS_GENERIC_BOARD + /* * AT91C_XTAL_CLOCK is the frequency of external xtal in hertz * AT91C_MAIN_CLOCK is the frequency of PLLA output @@ -54,20 +56,24 @@ #define CONFIG_CMDLINE_TAG #define CONFIG_SETUP_MEMORY_TAGS +#define CONFIG_DISPLAY_BOARDINFO #define CONFIG_INITRD_TAG #define CONFIG_BOARD_EARLY_INIT_F + + /* * Memory Configuration */ #define CONFIG_NR_DRAM_BANKS 1 #define CONFIG_SYS_SDRAM_BASE 0x20000000 -#define CONFIG_SYS_SDRAM_SIZE SZ_32M +#define CONFIG_SYS_SDRAM_SIZE SZ_64M + +#define CONFIG_SYS_MEMTEST_START CONFIG_SYS_SDRAM_BASE +#define CONFIG_SYS_MEMTEST_END \ + (CONFIG_SYS_MEMTEST_START + CONFIG_SYS_SDRAM_SIZE - SZ_512K) -#define CONFIG_SYS_MEMTEST_START CONFIG_SYS_SDRAM_BASE -#define CONFIG_SYS_MEMTEST_END \ - (CONFIG_SYS_MEMTEST_START + CONFIG_SYS_SDRAM_SIZE - SZ_256K) /* * LowLevel Init @@ -89,7 +95,7 @@ #define CONFIG_SYS_PIOC_BSR_VAL 0x00000000 #define CONFIG_SYS_PIOC_PDR_VAL 0xFFFF0000 #define CONFIG_SYS_EBI_CSA_VAL 0x00000002 /* CS1=CONFIG_SYS_SDRAM */ -#define CONFIG_SYS_SDRC_CR_VAL 0x2188c155 /* set up the CONFIG_SYS_SDRAM */ +#define CONFIG_SYS_SDRC_CR_VAL 0x2188c159 /* set up the CONFIG_SYS_SDRAM */ #define CONFIG_SYS_SDRAM CONFIG_SYS_SDRAM_BASE /* address of the SDRAM */ #define CONFIG_SYS_SDRAM1 (CONFIG_SYS_SDRAM_BASE+0x80) #define CONFIG_SYS_SDRAM_VAL 0x00000000 /* value written to CONFIG_SYS_SDRAM */ @@ -97,7 +103,7 @@ #define CONFIG_SYS_SDRC_MR_VAL1 0x00000004 /* refresh */ #define CONFIG_SYS_SDRC_MR_VAL2 0x00000003 /* Load Mode Register */ #define CONFIG_SYS_SDRC_MR_VAL3 0x00000000 /* Normal Mode */ -#define CONFIG_SYS_SDRC_TR_VAL 0x000002E0 /* Write refresh rate */ +#define CONFIG_SYS_SDRC_TR_VAL 0x00000186 /* Write refresh rate */ #endif /* CONFIG_SKIP_LOWLEVEL_INIT */ /* @@ -129,8 +135,14 @@ /* * NOR Flash */ -#define CONFIG_FLASH_CFI_DRIVER + + #define CONFIG_SYS_FLASH_CFI +#define CONFIG_FLASH_CFI_DRIVER +#define CONFIG_CMD_MTDPARTS +#define CONFIG_MTD_DEVICE /* needed for mtdparts commands */ +#define CONFIG_FLASH_CFI_MTD +#define CONFIG_SYS_FLASH_CFI_WIDTH FLASH_CFI_16BIT #define CONFIG_SYS_FLASH_BASE 0x10000000 #define PHYS_FLASH_1 CONFIG_SYS_FLASH_BASE #define PHYS_FLASH_SIZE SZ_8M @@ -139,21 +151,6 @@ #define CONFIG_SYS_FLASH_PROTECTION /* - * USB Config - */ -#define CONFIG_USB_ATMEL 1 -#define CONFIG_USB_ATMEL_CLK_SEL_PLLB -#define CONFIG_USB_OHCI_NEW 1 -#define CONFIG_USB_KEYBOARD 1 -#define CONFIG_USB_STORAGE 1 -#define CONFIG_DOS_PARTITION 1 - -#define CONFIG_SYS_USB_OHCI_CPU_INIT 1 -#define CONFIG_SYS_USB_OHCI_REGS_BASE ATMEL_USB_HOST_BASE -#define CONFIG_SYS_USB_OHCI_SLOT_NAME "at91rm9200" -#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 15 - -/* * Environment Settings */ #define CONFIG_ENV_IS_IN_FLASH @@ -161,12 +158,13 @@ /* * after u-boot.bin */ + +#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE +#define CONFIG_SYS_MONITOR_LEN SZ_512K #define CONFIG_ENV_ADDR \ (CONFIG_SYS_FLASH_BASE + CONFIG_SYS_MONITOR_LEN) #define CONFIG_ENV_SIZE SZ_64K /* sectors are 64K here */ /* The following #defines are needed to get flash environment right */ -#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE -#define CONFIG_SYS_MONITOR_LEN SZ_256K /* * Boot option @@ -186,7 +184,7 @@ #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ /* Print Buffer Size */ #define CONFIG_SYS_PBSIZE \ - (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16) + (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 64) /* * Size of malloc() pool -- 2.1.4