summaryrefslogtreecommitdiffstats
path: root/board/freescale/m54455evb/m54455evb.c
diff options
context:
space:
mode:
authorTsiChung Liew <Tsi-Chung.Liew@freescale.com>2008-07-23 17:37:10 -0500
committerJohn Rigby <jrigby@freescale.com>2008-08-14 12:30:10 -0600
commitb2d022d1ac3f59bffa9cec249341e77aea168abc (patch)
treedd54fcc50b31c2d0f0f7a0a1855502bfb68b52e7 /board/freescale/m54455evb/m54455evb.c
parent6d33c6acfa35b1144d46ffbff7e29ee7969290d0 (diff)
downloadtalos-obmc-uboot-b2d022d1ac3f59bffa9cec249341e77aea168abc.tar.gz
talos-obmc-uboot-b2d022d1ac3f59bffa9cec249341e77aea168abc.zip
ColdFire: Use CFI Flash driver for M54455EVB
Remove non-common flash driver in board/freescale/m54455evb/flash.c. The non-cfi flash will use CONFIG_FLASH_CFI_LEGACY to configure the flash attribute. Signed-off-by: TsiChung Liew <Tsi-Chung.Liew@freescale.com>
Diffstat (limited to 'board/freescale/m54455evb/m54455evb.c')
-rw-r--r--board/freescale/m54455evb/m54455evb.c50
1 files changed, 50 insertions, 0 deletions
diff --git a/board/freescale/m54455evb/m54455evb.c b/board/freescale/m54455evb/m54455evb.c
index 0480b54685..3c7b350aa9 100644
--- a/board/freescale/m54455evb/m54455evb.c
+++ b/board/freescale/m54455evb/m54455evb.c
@@ -162,3 +162,53 @@ void pci_init_board(void)
pci_mcf5445x_init(&hose);
}
#endif /* CONFIG_PCI */
+
+#if defined(CFG_FLASH_CFI)
+#include <flash.h>
+ulong board_flash_get_legacy (ulong base, int banknum, flash_info_t * info)
+{
+ int sect[] = CFG_ATMEL_SECT;
+ int sectsz[] = CFG_ATMEL_SECTSZ;
+ int i, j, k;
+
+ if (base != CFG_ATMEL_BASE)
+ return 0;
+
+ info->flash_id = 0x01000000;
+ info->portwidth = 1;
+ info->chipwidth = 1;
+ info->buffer_size = 32;
+ info->erase_blk_tout = 16384;
+ info->write_tout = 2;
+ info->buffer_write_tout = 5;
+ info->vendor = 2; /* CFI_CMDSET_AMD_STANDARD */
+ info->cmd_reset = 0x00F0;
+ info->interface = FLASH_CFI_X8;
+ info->legacy_unlock = 0;
+ info->manufacturer_id = (u16) ATM_MANUFACT;
+ info->device_id = ATM_ID_LV040;
+ info->device_id2 = 0;
+
+ info->ext_addr = 0;
+ info->cfi_version = 0x3133;
+ info->cfi_offset = 0x0055;
+ info->addr_unlock1 = 0x00000555;
+ info->addr_unlock2 = 0x000002AA;
+ info->name = "CFI conformant";
+
+
+ info->size = 0;
+ info->sector_count = CFG_ATMEL_TOTALSECT;
+ info->start[0] = base;
+ for (k = 0, i = 0; i < CFG_ATMEL_REGION; i++) {
+ info->size += sect[i] * sectsz[i];
+
+ for (j = 0; j < sect[i]; j++, k++) {
+ info->start[k + 1] = info->start[k] + sectsz[i];
+ info->protect[k] = 0;
+ }
+ }
+
+ return 1;
+}
+#endif /* CFG_FLASH_CFI */
OpenPOWER on IntegriCloud