Hi,
This patch change the chipnames in flashchips.c to use bash style
brace expansion syntax for chip IDs where they correspond to several
chips with different names.
This is a bit ugly, but at least it is simple and a bit more
consistent to what we have now.
Maybe someone else has a better solution?
Thanks,
-mattias
Signed-off-by: Mattias Mattsson <vitplister(a)gmail.com>
--- flashrom/flashchips.c 2011-07-22 01:21:47.000000000 +0200
+++ flashrom_uniform_chipnames/flashchips.c 2011-07-21 14:21:37.000000000 +0200
@@ -59,7 +59,7 @@
{
.vendor = "AMD",
- .name = "Am29F010A/B",
+ .name = "Am29F010{,A,B}",
.bustype = CHIP_BUSTYPE_PARALLEL,
.manufacture_id = AMD_ID,
.model_id = AMD_AM29F010B, /* Same as Am29F010A */
@@ -86,7 +86,7 @@
{
.vendor = "AMD",
- .name = "Am29F002(N)BB",
+ .name = "Am29F002{,N}BB",
.bustype = CHIP_BUSTYPE_PARALLEL,
.manufacture_id = AMD_ID,
.model_id = AMD_AM29F002BB,
@@ -118,7 +118,7 @@
{
.vendor = "AMD",
- .name = "Am29F002(N)BT",
+ .name = "Am29F002{,N}BT",
.bustype = CHIP_BUSTYPE_PARALLEL,
.manufacture_id = AMD_ID,
.model_id = AMD_AM29F002BT,
@@ -2242,7 +2242,7 @@
{
.vendor = "Atmel",
- .name = "AT49F002(N)",
+ .name = "AT49F002{,N}",
.bustype = CHIP_BUSTYPE_PARALLEL,
.manufacture_id = ATMEL_ID,
.model_id = ATMEL_AT49F002N,
@@ -2274,7 +2274,7 @@
{
.vendor = "Atmel",
- .name = "AT49F002(N)T",
+ .name = "AT49F002{,N}T",
.bustype = CHIP_BUSTYPE_PARALLEL,
.manufacture_id = ATMEL_ID,
.model_id = ATMEL_AT49F002NT,
@@ -3234,7 +3234,7 @@
{
.vendor = "Eon",
- .name = "EN29F002(A)(N)B",
+ .name = "EN29F002{,N,A,AN}B",
.bustype = CHIP_BUSTYPE_PARALLEL,
.manufacture_id = EON_ID,
.model_id = EON_EN29F002B,
@@ -3266,7 +3266,7 @@
{
.vendor = "Eon",
- .name = "EN29F002(A)(N)T",
+ .name = "EN29F002{,N,A,AN}T",
.bustype = CHIP_BUSTYPE_PARALLEL,
.manufacture_id = EON_ID,
.model_id = EON_EN29F002T,
@@ -3518,7 +3518,7 @@
{
.vendor = "Intel",
- .name = "28F001BN/BX-B",
+ .name = "28F001{BN,BX}-B",
.bustype = CHIP_BUSTYPE_PARALLEL,
.manufacture_id = INTEL_ID,
.model_id = INTEL_28F001B,
@@ -3545,7 +3545,7 @@
{
.vendor = "Intel",
- .name = "28F001BN/BX-T",
+ .name = "28F001{BN,BX}-T",
.bustype = CHIP_BUSTYPE_PARALLEL,
.manufacture_id = INTEL_ID,
.model_id = INTEL_28F001T,
@@ -3572,7 +3572,7 @@
{
.vendor = "Intel",
- .name = "28F002BC/BL/BV/BX-T",
+ .name = "28F002{BC,BL,BV,BX}-T",
.bustype = CHIP_BUSTYPE_PARALLEL,
.manufacture_id = INTEL_ID,
.model_id = INTEL_28F002T,
@@ -3599,7 +3599,7 @@
{
.vendor = "Intel",
- .name = "28F008S3/S5/SC",
+ .name = "28F008{S3,S5,SC}",
.bustype = CHIP_BUSTYPE_PARALLEL,
.manufacture_id = INTEL_ID,
.model_id = INTEL_28F004S3,
@@ -3622,7 +3622,7 @@
{
.vendor = "Intel",
- .name = "28F004B5/BE/BV/BX-B",
+ .name = "28F004{B5,BE,BV,BX}-B",
.bustype = CHIP_BUSTYPE_PARALLEL,
.manufacture_id = INTEL_ID,
.model_id = INTEL_28F004B,
@@ -3649,7 +3649,7 @@
{
.vendor = "Intel",
- .name = "28F004B5/BE/BV/BX-T",
+ .name = "28F004{B5,BE,BV,BX}-T",
.bustype = CHIP_BUSTYPE_PARALLEL,
.manufacture_id = INTEL_ID,
.model_id = INTEL_28F004T,
@@ -3676,7 +3676,7 @@
{
.vendor = "Intel",
- .name = "28F400BV/BX/CE/CV-B",
+ .name = "28F400{BV,BX,CE,CV}-B",
.bustype = CHIP_BUSTYPE_PARALLEL,
.manufacture_id = INTEL_ID,
.model_id = INTEL_28F400B,
@@ -3704,7 +3704,7 @@
{
.vendor = "Intel",
- .name = "28F400BV/BX/CE/CV-T",
+ .name = "28F400{BV,BX,CE,CV}-T",
.bustype = CHIP_BUSTYPE_PARALLEL,
.manufacture_id = INTEL_ID,
.model_id = INTEL_28F400T,
@@ -6006,7 +6006,7 @@
{
.vendor = "SST",
- .name = "SST49LF002A/B",
+ .name = "SST49LF002{A,B}",
.bustype = CHIP_BUSTYPE_FWH, /* A/A Mux */
.manufacture_id = SST_ID,
.model_id = SST_SST49LF002A,
@@ -6038,7 +6038,7 @@
{
.vendor = "SST",
- .name = "SST49LF003A/B",
+ .name = "SST49LF003{A,B}",
.bustype = CHIP_BUSTYPE_FWH, /* A/A Mux */
.manufacture_id = SST_ID,
.model_id = SST_SST49LF003A,
@@ -6073,7 +6073,7 @@
* and is only honored for 64k block erase, but not 4k sector erase.
*/
.vendor = "SST",
- .name = "SST49LF004A/B",
+ .name = "SST49LF004{A,B}",
.bustype = CHIP_BUSTYPE_FWH, /* A/A Mux */
.manufacture_id = SST_ID,
.model_id = SST_SST49LF004A,
@@ -6869,7 +6869,7 @@
{
.vendor = "ST",
- .name = "M29F002T/NT",
+ .name = "M29F002{,N}T",
.bustype = CHIP_BUSTYPE_PARALLEL,
.manufacture_id = ST_ID,
.model_id = ST_M29F002T,
@@ -8035,7 +8035,7 @@
{
.vendor = "Winbond",
- .name = "W29C010(M)/W29C011A/W29EE011/W29EE012",
+ .name = "W29{C010,C010M,C011A,EE011,EE012}",
.bustype = CHIP_BUSTYPE_PARALLEL,
.manufacture_id = WINBOND_ID,
.model_id = WINBOND_W29C010,
@@ -8058,7 +8058,7 @@
{
.vendor = "Winbond",
- .name = "W29C020(C)/W29C022",
+ .name = "W29C0{20,20C,22}",
.bustype = CHIP_BUSTYPE_PARALLEL,
.manufacture_id = WINBOND_ID,
.model_id = WINBOND_W29C020,
@@ -8082,7 +8082,7 @@
{
.vendor = "Winbond",
- .name = "W29C040/P",
+ .name = "W29C040{,P}",
.bustype = CHIP_BUSTYPE_PARALLEL,
.manufacture_id = WINBOND_ID,
.model_id = WINBOND_W29C040,
@@ -8106,7 +8106,7 @@
{
.vendor = "Winbond",
- .name = "W29C010(M)/W29C011A/W29EE011/W29EE012",
+ .name = "W29{C010,C010M,C011A,EE011,EE012}",
.bustype = CHIP_BUSTYPE_PARALLEL,
.manufacture_id = WINBOND_ID,
.model_id = WINBOND_W29C010,
@@ -8361,7 +8361,7 @@
{
.vendor = "Winbond",
- .name = "W49F002U/N",
+ .name = "W49F002U{,N}",
.bustype = CHIP_BUSTYPE_PARALLEL,
.manufacture_id = WINBOND_ID,
.model_id = WINBOND_W49F002U,