@@ -29,7 +29,7 @@ include $(TOPDIR)/config.mk
LIB = $(obj)lib$(BOARD).o
-COBJS-y := $(BOARD).o flash.o
+COBJS-y := $(BOARD).o
SRCS := $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c)
OBJS := $(addprefix $(obj),$(COBJS-y))
@@ -27,8 +27,8 @@
#include <common.h>
#include <netdev.h>
+#include <asm/io.h>
#include "psd4256.h"
-#include "flash-defines.h"
DECLARE_GLOBAL_DATA_PTR;
@@ -42,16 +42,24 @@ int checkboard(void)
/* miscellaneous platform dependent initialisations */
int misc_init_r(void)
{
- /* Set direction bits for Video en/decoder reset as output */
- *(volatile unsigned char *)(CONFIG_SYS_FLASH1_BASE + PSD_PORTA_DIR) =
- PSDA_VDEC_RST | PSDA_VENC_RST;
- /* Deactivate Video en/decoder reset lines */
- *(volatile unsigned char *)(CONFIG_SYS_FLASH1_BASE + PSD_PORTA_DOUT) =
- PSDA_VDEC_RST | PSDA_VENC_RST;
+ /* Set direction bits for Video en/decoder reset as output */
+ writeb(PSDA_VDEC_RST | PSDA_VENC_RST, 0x20200000 + PSD_PORTA_DIR);
+ /* Deactivate Video en/decoder reset lines */
+ writeb(PSDA_VDEC_RST | PSDA_VENC_RST, 0x20200000 + PSD_PORTA_DOUT);
return 0;
}
+#ifdef CONFIG_FLASH_CFI_LEGACY
+ulong board_flash_get_legacy(ulong base, int banknum, flash_info_t *info)
+{
+ info->portwidth = FLASH_CFI_16BIT;
+ info->chipwidth = 2;
+ info->interface = FLASH_CFI_X16;
+ return 1;
+}
+#endif
+
#ifdef CONFIG_SMC91111
int board_eth_init(bd_t *bis)
{
deleted file mode 100644
deleted file mode 100644
@@ -80,15 +80,21 @@
/*
- * Flash Settings
+ * Flash Settings (PSD4256)
*/
+#define CONFIG_FLASH_CFI_DRIVER
+#define CONFIG_FLASH_CFI_LEGACY
+#define CONFIG_SYS_FLASH_LEGACY_1Mx16
#define CONFIG_SYS_FLASH_BASE 0x20000000
-#define CONFIG_SYS_MAX_FLASH_BANKS 3
-#define CONFIG_SYS_MAX_FLASH_SECT 40
+#define CONFIG_SYS_FLASH_CFI
+#define CONFIG_SYS_FLASH_CFI_AMD_RESET
+#define CONFIG_SYS_MAX_FLASH_BANKS 2
+#define CONFIG_SYS_MAX_FLASH_SECT 20
+#define CONFIG_SYS_FLASH_BANKS_LIST { 0x20000000, 0x20100000 }
+
#define CONFIG_ENV_IS_IN_FLASH
#define CONFIG_ENV_ADDR 0x20030000
#define CONFIG_ENV_SECT_SIZE 0x10000
-#define FLASH_TOT_SECT 40
/*
Signed-off-by: Mike Frysinger <vapier@gentoo.org> --- board/bf533-ezkit/Makefile | 2 +- board/bf533-ezkit/bf533-ezkit.c | 22 +- board/bf533-ezkit/flash-defines.h | 124 ---------- board/bf533-ezkit/flash.c | 489 ------------------------------------- include/configs/bf533-ezkit.h | 14 +- 5 files changed, 26 insertions(+), 625 deletions(-) delete mode 100644 board/bf533-ezkit/flash-defines.h delete mode 100644 board/bf533-ezkit/flash.c