[U-Boot] [PATCH 05/16] Blackfin: Paraflash: add support for bf609-ezkit
Bob Liu
lliubbo at gmail.com
Tue Aug 7 10:07:44 CEST 2012
Add paraflash support for bf609-ezkit to board file.
Signed-off-by: Bob Liu <lliubbo at gmail.com>
---
arch/blackfin/include/asm/mach-bf609/portmux.h | 1 +
board/bf609-ezkit/bf609-ezkit.c | 8 +++---
include/configs/bf609-ezkit.h | 35 +++++++++++++++++++-----
include/configs/bfin_adi_common.h | 4 ++-
4 files changed, 36 insertions(+), 12 deletions(-)
diff --git a/arch/blackfin/include/asm/mach-bf609/portmux.h b/arch/blackfin/include/asm/mach-bf609/portmux.h
index 1cf6fd8..757570f 100644
--- a/arch/blackfin/include/asm/mach-bf609/portmux.h
+++ b/arch/blackfin/include/asm/mach-bf609/portmux.h
@@ -241,6 +241,7 @@
#define P_A23 (P_DEFINED | P_IDENT(GPIO_PB8) | P_FUNCT(0))
#define P_A24 (P_DEFINED | P_IDENT(GPIO_PB10) | P_FUNCT(0))
#define P_A25 (P_DEFINED | P_IDENT(GPIO_PB11) | P_FUNCT(0))
+#define P_NORCK (P_DEFINED | P_IDENT(GPIO_PB0) | P_FUNCT(0))
#define P_AMS1 (P_DEFINED | P_IDENT(GPIO_PB1) | P_FUNCT(0))
#define P_AMS2 (P_DEFINED | P_IDENT(GPIO_PB4) | P_FUNCT(0))
diff --git a/board/bf609-ezkit/bf609-ezkit.c b/board/bf609-ezkit/bf609-ezkit.c
index 398a6b0..d701c36 100644
--- a/board/bf609-ezkit/bf609-ezkit.c
+++ b/board/bf609-ezkit/bf609-ezkit.c
@@ -22,11 +22,11 @@ int checkboard(void)
int board_early_init_f(void)
{
static const unsigned short pins[] = {
- P_A4, P_A5, P_A6, P_A7, P_A8, P_A9, P_A10, P_A11, P_A12, P_A13,
- P_A14, P_A15, P_A16, P_A17, P_A18, P_A19, P_A20, P_A21, P_A22,
- P_A23, P_A24, P_A25, P_AMS1, P_ABE0, P_ABE1, 0,
+ P_A3, P_A4, P_A5, P_A6, P_A7, P_A8, P_A9, P_A10, P_A11, P_A12,
+ P_A13, P_A14, P_A15, P_A16, P_A17, P_A18, P_A19, P_A20, P_A21,
+ P_A22, P_A23, P_A24, P_A25, P_NORCK, 0,
};
- peripheral_request_list(pins, "smc");
+ peripheral_request_list(pins, "smc0");
return 0;
}
diff --git a/include/configs/bf609-ezkit.h b/include/configs/bf609-ezkit.h
index 4dcfeca..91b0cf3 100644
--- a/include/configs/bf609-ezkit.h
+++ b/include/configs/bf609-ezkit.h
@@ -68,9 +68,9 @@
#define CONFIG_MEM_SIZE 128
#define CONFIG_SMC_GCTL_VAL 0x00000010
-#define CONFIG_SMC_B1CTL_VAL 0x01002001
-#define CONFIG_SMC_B1TIM_VAL 0x08070977
-#define CONFIG_SMC_B1ETIM_VAL 0x00092231
+#define CONFIG_SMC_B0CTL_VAL 0x01007011
+#define CONFIG_SMC_B0TIM_VAL 0x08170977
+#define CONFIG_SMC_B0ETIM_VAL 0x00092231
#define CONFIG_SYS_MONITOR_LEN (512 * 1024)
#define CONFIG_SYS_MALLOC_LEN (256 * 1024)
@@ -107,14 +107,35 @@
#define CONFIG_SYS_FLASH_PROTECTION
#define CONFIG_SYS_MAX_FLASH_BANKS 1
#define CONFIG_SYS_MAX_FLASH_SECT 131
+#define CONFIG_CFI_FLASH_USE_WEAK_ACCESSORS
/*
* Env Storage Settings
*/
-#define CONFIG_ENV_IS_NOWHERE
-#define CONFIG_ENV_SIZE 0x600
-#undef CONFIG_CMD_EXPORTENV
-#undef CONFIG_CMD_IMPORTENV
+#if (CONFIG_BFIN_BOOT_MODE == BFIN_BOOT_SPI_MASTER)
+#define CONFIG_ENV_IS_IN_SPI_FLASH
+#define CONFIG_ENV_OFFSET 0x10000
+#define CONFIG_ENV_SIZE 0x2000
+#define CONFIG_ENV_SECT_SIZE 0x10000
+#define CONFIG_ENV_IS_EMBEDDED_IN_LDR
+#elif (CONFIG_BFIN_BOOT_MODE == BFIN_BOOT_NAND)
+#define CONFIG_ENV_IS_IN_NAND
+#define CONFIG_ENV_OFFSET 0x60000
+#define CONFIG_ENV_SIZE 0x20000
+#else
+#define CONFIG_ENV_IS_IN_FLASH
+#define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + CONFIG_ENV_OFFSET)
+#define CONFIG_ENV_OFFSET 0x8000
+#define CONFIG_ENV_SIZE 0x8000
+#define CONFIG_ENV_SECT_SIZE 0x8000
+#define CONFIG_ENV_IS_EMBEDDED_IN_LDR
+#define UBOOT_ENV_UPDATE \
+ "protect off 0xB0000000 +$(filesize);" \
+ "erase 0xB0000000 +$(filesize);" \
+ "cp.b $(loadaddr) 0xB0000000 $(filesize)"
+#endif
+
+#define FLASHBOOT_ENV_SETTINGS "flashboot=bootm 0xB0100000\0"
/*
* SDH Settings
diff --git a/include/configs/bfin_adi_common.h b/include/configs/bfin_adi_common.h
index 5cec778..164e8ca 100644
--- a/include/configs/bfin_adi_common.h
+++ b/include/configs/bfin_adi_common.h
@@ -195,10 +195,12 @@
"nand erase 0 0x40000;" \
"nand write $(loadaddr) 0 0x40000"
# else
-# define UBOOT_ENV_UPDATE \
+# ifndef UBOOT_ENV_UPDATE
+# define UBOOT_ENV_UPDATE \
"protect off 0x20000000 +$(filesize);" \
"erase 0x20000000 +$(filesize);" \
"cp.b $(loadaddr) 0x20000000 $(filesize)"
+# endif
# endif
# ifdef CONFIG_NETCONSOLE
# define NETCONSOLE_ENV \
--
1.7.9.5
More information about the U-Boot
mailing list