* [U-Boot] [PATCH] edminiv2: drop CONFIG_CFI_LEGACY
@ 2015-02-01 11:04 Albert ARIBAUD
2015-02-01 11:08 ` [U-Boot] [PATCH v2] " Albert ARIBAUD
0 siblings, 1 reply; 3+ messages in thread
From: Albert ARIBAUD @ 2015-02-01 11:04 UTC (permalink / raw)
To: u-boot
Nowadays generic CFI code properly detects the ED Mini V2's
Macronix MC29LV400CB flash chip, therefore we can drop the
CONFIG_FLASH_CFI_LEGACY option and associated settings and code.
Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
---
board/LaCie/edminiv2/edminiv2.c | 50 -----------------------------------------
include/configs/edminiv2.h | 4 ----
2 files changed, 54 deletions(-)
diff --git a/board/LaCie/edminiv2/edminiv2.c b/board/LaCie/edminiv2/edminiv2.c
index 80ec7fa..690038e 100644
--- a/board/LaCie/edminiv2/edminiv2.c
+++ b/board/LaCie/edminiv2/edminiv2.c
@@ -15,56 +15,6 @@
DECLARE_GLOBAL_DATA_PTR;
-/*
- * The ED Mini V2 is equipped with a Macronix MXLV400CB FLASH
- * which CFI does not properly detect, hence the LEGACY config.
- */
-#if defined(CONFIG_FLASH_CFI_LEGACY)
-#include <flash.h>
-ulong board_flash_get_legacy(ulong base, int banknum, flash_info_t *info)
-{
- int sectsz[] = CONFIG_SYS_FLASH_SECTSZ;
- int sect;
-
- if (base != CONFIG_SYS_FLASH_BASE)
- return 0;
-
- info->size = 0;
- info->sector_count = CONFIG_SYS_MAX_FLASH_SECT;
- /* set each sector's start address and size based */
- for (sect = 0; sect < CONFIG_SYS_MAX_FLASH_SECT; sect++) {
- info->start[sect] = base+info->size;
- info->size += sectsz[sect];
- }
- /* This flash must be accessed in 8-bits mode, no buffer. */
- info->flash_id = 0x01000000;
- info->portwidth = FLASH_CFI_8BIT;
- info->chipwidth = FLASH_CFI_BY8;
- info->buffer_size = 0;
- /* timings are derived from the Macronix datasheet. */
- info->erase_blk_tout = 1000;
- info->write_tout = 10;
- info->buffer_write_tout = 300;
- /* Commands and addresses are for AMD mode 8-bit access. */
- info->vendor = CFI_CMDSET_AMD_LEGACY;
- info->cmd_reset = 0xF0;
- info->interface = FLASH_CFI_X8;
- info->legacy_unlock = 0;
- info->ext_addr = 0;
- info->addr_unlock1 = 0x00000aaa;
- info->addr_unlock2 = 0x00000555;
- /* Manufacturer Macronix, device MX29LV400CB, CFI 1.3. */
- info->manufacturer_id = 0x22;
- info->device_id = 0xBA;
- info->device_id2 = 0;
- info->cfi_version = 0x3133;
- info->cfi_offset = 0x0000;
- info->name = "MX29LV400CB";
-
- return 1;
-}
-#endif /* CONFIG_SYS_FLASH_CFI */
-
int board_init(void)
{
/* arch number of board */
diff --git a/include/configs/edminiv2.h b/include/configs/edminiv2.h
index 70a698a..f1e8cb0 100644
--- a/include/configs/edminiv2.h
+++ b/include/configs/edminiv2.h
@@ -89,13 +89,9 @@
#define CONFIG_SYS_FLASH_CFI
#define CONFIG_FLASH_CFI_DRIVER
-#define CONFIG_FLASH_CFI_LEGACY
#define CONFIG_SYS_MAX_FLASH_BANKS 1 /* max num of flash banks */
#define CONFIG_SYS_MAX_FLASH_SECT 11 /* max num of sects on one chip */
#define CONFIG_SYS_FLASH_BASE 0xfff80000
-#define CONFIG_SYS_FLASH_SECTSZ \
- {16384, 8192, 8192, 32768, \
- 65536, 65536, 65536, 65536, 65536, 65536, 65536}
/* auto boot */
#define CONFIG_BOOTDELAY 3 /* default enable autoboot */
--
2.1.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* [U-Boot] [PATCH v2] edminiv2: drop CONFIG_CFI_LEGACY
2015-02-01 11:04 [U-Boot] [PATCH] edminiv2: drop CONFIG_CFI_LEGACY Albert ARIBAUD
@ 2015-02-01 11:08 ` Albert ARIBAUD
2015-02-25 8:07 ` Albert ARIBAUD
0 siblings, 1 reply; 3+ messages in thread
From: Albert ARIBAUD @ 2015-02-01 11:08 UTC (permalink / raw)
To: u-boot
Nowadays generic CFI code properly detects the ED Mini V2's
Macronix MX29LV400CB flash chip, therefore we can drop the
CONFIG_FLASH_CFI_LEGACY option and associated settings and code.
Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
---
Changes in v2:
- Fix typo in flash part name (MC29LV400CB... -> MX29LV400CB)
- Add Kconfig settings
board/LaCie/edminiv2/edminiv2.c | 50 -----------------------------------------
include/configs/edminiv2.h | 4 ----
2 files changed, 54 deletions(-)
diff --git a/board/LaCie/edminiv2/edminiv2.c b/board/LaCie/edminiv2/edminiv2.c
index 80ec7fa..690038e 100644
--- a/board/LaCie/edminiv2/edminiv2.c
+++ b/board/LaCie/edminiv2/edminiv2.c
@@ -15,56 +15,6 @@
DECLARE_GLOBAL_DATA_PTR;
-/*
- * The ED Mini V2 is equipped with a Macronix MXLV400CB FLASH
- * which CFI does not properly detect, hence the LEGACY config.
- */
-#if defined(CONFIG_FLASH_CFI_LEGACY)
-#include <flash.h>
-ulong board_flash_get_legacy(ulong base, int banknum, flash_info_t *info)
-{
- int sectsz[] = CONFIG_SYS_FLASH_SECTSZ;
- int sect;
-
- if (base != CONFIG_SYS_FLASH_BASE)
- return 0;
-
- info->size = 0;
- info->sector_count = CONFIG_SYS_MAX_FLASH_SECT;
- /* set each sector's start address and size based */
- for (sect = 0; sect < CONFIG_SYS_MAX_FLASH_SECT; sect++) {
- info->start[sect] = base+info->size;
- info->size += sectsz[sect];
- }
- /* This flash must be accessed in 8-bits mode, no buffer. */
- info->flash_id = 0x01000000;
- info->portwidth = FLASH_CFI_8BIT;
- info->chipwidth = FLASH_CFI_BY8;
- info->buffer_size = 0;
- /* timings are derived from the Macronix datasheet. */
- info->erase_blk_tout = 1000;
- info->write_tout = 10;
- info->buffer_write_tout = 300;
- /* Commands and addresses are for AMD mode 8-bit access. */
- info->vendor = CFI_CMDSET_AMD_LEGACY;
- info->cmd_reset = 0xF0;
- info->interface = FLASH_CFI_X8;
- info->legacy_unlock = 0;
- info->ext_addr = 0;
- info->addr_unlock1 = 0x00000aaa;
- info->addr_unlock2 = 0x00000555;
- /* Manufacturer Macronix, device MX29LV400CB, CFI 1.3. */
- info->manufacturer_id = 0x22;
- info->device_id = 0xBA;
- info->device_id2 = 0;
- info->cfi_version = 0x3133;
- info->cfi_offset = 0x0000;
- info->name = "MX29LV400CB";
-
- return 1;
-}
-#endif /* CONFIG_SYS_FLASH_CFI */
-
int board_init(void)
{
/* arch number of board */
diff --git a/include/configs/edminiv2.h b/include/configs/edminiv2.h
index 70a698a..f1e8cb0 100644
--- a/include/configs/edminiv2.h
+++ b/include/configs/edminiv2.h
@@ -89,13 +89,9 @@
#define CONFIG_SYS_FLASH_CFI
#define CONFIG_FLASH_CFI_DRIVER
-#define CONFIG_FLASH_CFI_LEGACY
#define CONFIG_SYS_MAX_FLASH_BANKS 1 /* max num of flash banks */
#define CONFIG_SYS_MAX_FLASH_SECT 11 /* max num of sects on one chip */
#define CONFIG_SYS_FLASH_BASE 0xfff80000
-#define CONFIG_SYS_FLASH_SECTSZ \
- {16384, 8192, 8192, 32768, \
- 65536, 65536, 65536, 65536, 65536, 65536, 65536}
/* auto boot */
#define CONFIG_BOOTDELAY 3 /* default enable autoboot */
--
2.1.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* [U-Boot] [PATCH v2] edminiv2: drop CONFIG_CFI_LEGACY
2015-02-01 11:08 ` [U-Boot] [PATCH v2] " Albert ARIBAUD
@ 2015-02-25 8:07 ` Albert ARIBAUD
0 siblings, 0 replies; 3+ messages in thread
From: Albert ARIBAUD @ 2015-02-25 8:07 UTC (permalink / raw)
To: u-boot
On Sun, 1 Feb 2015 12:08:06 +0100, Albert ARIBAUD <albert.u.boot@aribaud.net> wrote:
> Nowadays generic CFI code properly detects the ED Mini V2's
> Macronix MX29LV400CB flash chip, therefore we can drop the
> CONFIG_FLASH_CFI_LEGACY option and associated settings and code.
>
> Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
> ---
>
> Changes in v2:
> - Fix typo in flash part name (MC29LV400CB... -> MX29LV400CB)
> - Add Kconfig settings
>
> board/LaCie/edminiv2/edminiv2.c | 50 -----------------------------------------
> include/configs/edminiv2.h | 4 ----
> 2 files changed, 54 deletions(-)
>
> diff --git a/board/LaCie/edminiv2/edminiv2.c b/board/LaCie/edminiv2/edminiv2.c
> index 80ec7fa..690038e 100644
> --- a/board/LaCie/edminiv2/edminiv2.c
> +++ b/board/LaCie/edminiv2/edminiv2.c
> @@ -15,56 +15,6 @@
>
> DECLARE_GLOBAL_DATA_PTR;
>
> -/*
> - * The ED Mini V2 is equipped with a Macronix MXLV400CB FLASH
> - * which CFI does not properly detect, hence the LEGACY config.
> - */
> -#if defined(CONFIG_FLASH_CFI_LEGACY)
> -#include <flash.h>
> -ulong board_flash_get_legacy(ulong base, int banknum, flash_info_t *info)
> -{
> - int sectsz[] = CONFIG_SYS_FLASH_SECTSZ;
> - int sect;
> -
> - if (base != CONFIG_SYS_FLASH_BASE)
> - return 0;
> -
> - info->size = 0;
> - info->sector_count = CONFIG_SYS_MAX_FLASH_SECT;
> - /* set each sector's start address and size based */
> - for (sect = 0; sect < CONFIG_SYS_MAX_FLASH_SECT; sect++) {
> - info->start[sect] = base+info->size;
> - info->size += sectsz[sect];
> - }
> - /* This flash must be accessed in 8-bits mode, no buffer. */
> - info->flash_id = 0x01000000;
> - info->portwidth = FLASH_CFI_8BIT;
> - info->chipwidth = FLASH_CFI_BY8;
> - info->buffer_size = 0;
> - /* timings are derived from the Macronix datasheet. */
> - info->erase_blk_tout = 1000;
> - info->write_tout = 10;
> - info->buffer_write_tout = 300;
> - /* Commands and addresses are for AMD mode 8-bit access. */
> - info->vendor = CFI_CMDSET_AMD_LEGACY;
> - info->cmd_reset = 0xF0;
> - info->interface = FLASH_CFI_X8;
> - info->legacy_unlock = 0;
> - info->ext_addr = 0;
> - info->addr_unlock1 = 0x00000aaa;
> - info->addr_unlock2 = 0x00000555;
> - /* Manufacturer Macronix, device MX29LV400CB, CFI 1.3. */
> - info->manufacturer_id = 0x22;
> - info->device_id = 0xBA;
> - info->device_id2 = 0;
> - info->cfi_version = 0x3133;
> - info->cfi_offset = 0x0000;
> - info->name = "MX29LV400CB";
> -
> - return 1;
> -}
> -#endif /* CONFIG_SYS_FLASH_CFI */
> -
> int board_init(void)
> {
> /* arch number of board */
> diff --git a/include/configs/edminiv2.h b/include/configs/edminiv2.h
> index 70a698a..f1e8cb0 100644
> --- a/include/configs/edminiv2.h
> +++ b/include/configs/edminiv2.h
> @@ -89,13 +89,9 @@
>
> #define CONFIG_SYS_FLASH_CFI
> #define CONFIG_FLASH_CFI_DRIVER
> -#define CONFIG_FLASH_CFI_LEGACY
> #define CONFIG_SYS_MAX_FLASH_BANKS 1 /* max num of flash banks */
> #define CONFIG_SYS_MAX_FLASH_SECT 11 /* max num of sects on one chip */
> #define CONFIG_SYS_FLASH_BASE 0xfff80000
> -#define CONFIG_SYS_FLASH_SECTSZ \
> - {16384, 8192, 8192, 32768, \
> - 65536, 65536, 65536, 65536, 65536, 65536, 65536}
>
> /* auto boot */
> #define CONFIG_BOOTDELAY 3 /* default enable autoboot */
> --
> 2.1.0
>
Applied to u-boot-arm/master.
Amicalement,
--
Albert.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-02-25 8:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-01 11:04 [U-Boot] [PATCH] edminiv2: drop CONFIG_CFI_LEGACY Albert ARIBAUD
2015-02-01 11:08 ` [U-Boot] [PATCH v2] " Albert ARIBAUD
2015-02-25 8:07 ` Albert ARIBAUD
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox