Alan Green has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/33834
Change subject: flashchips.c: SFDP-capable chip formatting
......................................................................
flashchips.c: SFDP-capable chip formatting
To allow automated tools to manipulate flashchips.c, make the definition
of SFDP-capable chip more consistent with other definitions. This
involves
- reordering fields to match both other entries and the definition of
struct flashchip.
- reformatting comments to make them consistent with other entries.
Signed-off-by: Alan Green <avg(a)google.com>
Change-Id: I8708a11993822085b3e8d8c80532dfb935d39876
---
M flashchips.c
1 file changed, 10 insertions(+), 10 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/34/33834/1
diff --git a/flashchips.c b/flashchips.c
index 8ea7043..f9ad764 100644
--- a/flashchips.c
+++ b/flashchips.c
@@ -16578,7 +16578,8 @@
.read = read_memmapped,
},
- {/* W29EE011, W29EE012, W29C010M, W29C011A do not support probe_jedec according to the datasheet, but it works for newer(?) steppings. */
+ /* W29EE011, W29EE012, W29C010M, W29C011A do not support probe_jedec according to the datasheet, but it works for newer(?) steppings. */
+ {
.vendor = "Winbond",
.name = "W29C010(M)/W29C011A/W29EE011/W29EE012",
.bustype = BUS_PARALLEL,
@@ -17428,21 +17429,20 @@
.bustype = BUS_SPI,
.manufacture_id = GENERIC_MANUF_ID,
.model_id = SFDP_DEVICE_ID,
- /* We present our own "report this" text hence we do not
- * want the default "This flash part has status UNTESTED..."
- * text to be printed. */
+ .total_size = 0, /* set by probing function */
+ .page_size = 0, /* set by probing function */
+ .feature_bits = 0, /* set by probing function */
+ /* We present our own "report this" text hence we do not */
+ /* want the default "This flash part has status UNTESTED..." */
+ /* text to be printed. */
.tested = TEST_OK_PREW,
.probe = probe_spi_sfdp,
+ .block_erasers = {}, /* set by probing function */
.unlock = spi_disable_blockprotect, /* is this safe? */
+ .write = NULL, /* set by probing function */
.read = spi_chip_read,
/* FIXME: some vendor extensions define this */
.voltage = {0},
- /* Everything below will be set by the probing function. */
- .write = NULL,
- .total_size = 0,
- .page_size = 0,
- .feature_bits = 0,
- .block_erasers = {},
},
{
--
To view, visit https://review.coreboot.org/c/flashrom/+/33834
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I8708a11993822085b3e8d8c80532dfb935d39876
Gerrit-Change-Number: 33834
Gerrit-PatchSet: 1
Gerrit-Owner: Alan Green <avg(a)google.com>
Gerrit-MessageType: newchange
Alan Green has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/33837
Change subject: flashchips.c: Make comment placement consistent
......................................................................
flashchips.c: Make comment placement consistent
For consistency, move a comment about an entry from inside the open
brace to outside it.
Signed-off-by: Alan Green <avg(a)google.com>
Change-Id: Ie9a745b7e7dc752cfd6fc14ebeb04754179893c6
---
M flashchips.c
1 file changed, 2 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/37/33837/1
diff --git a/flashchips.c b/flashchips.c
index 8ea7043..f35965f 100644
--- a/flashchips.c
+++ b/flashchips.c
@@ -16578,7 +16578,8 @@
.read = read_memmapped,
},
- {/* W29EE011, W29EE012, W29C010M, W29C011A do not support probe_jedec according to the datasheet, but it works for newer(?) steppings. */
+ /* W29EE011, W29EE012, W29C010M, W29C011A do not support probe_jedec according to the datasheet, but it works for newer(?) steppings. */
+ {
.vendor = "Winbond",
.name = "W29C010(M)/W29C011A/W29EE011/W29EE012",
.bustype = BUS_PARALLEL,
--
To view, visit https://review.coreboot.org/c/flashrom/+/33837
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Ie9a745b7e7dc752cfd6fc14ebeb04754179893c6
Gerrit-Change-Number: 33837
Gerrit-PatchSet: 1
Gerrit-Owner: Alan Green <avg(a)google.com>
Gerrit-MessageType: newchange
Alan Green has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/33832
Change subject: flashchips.c: comma after very .voltage attribute
......................................................................
flashchips.c: comma after very .voltage attribute
To allow automated tools to manipulate flashchips.c, ensure that every
voltage attribute ends with a comma, even if it is the last member in
the definition.
Signed-off-by: Alan Green <avg(a)google.com>
Change-Id: Ie609d11ab846361f375f7b024d6ca55f83b01682
---
M flashchips.c
1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/32/33832/1
diff --git a/flashchips.c b/flashchips.c
index 7f3d2a2..e73a4e3 100644
--- a/flashchips.c
+++ b/flashchips.c
@@ -525,7 +525,7 @@
},
.write = write_jedec_1,
.read = read_memmapped,
- .voltage = {3000, 3600} /* 3.0-3.6V for type -70R, others 2.7-3.6V */
+ .voltage = {3000, 3600}, /* 3.0-3.6V for type -70R, others 2.7-3.6V */
},
{
@@ -557,7 +557,7 @@
},
.write = write_jedec_1,
.read = read_memmapped,
- .voltage = {3000, 3600} /* 3.0-3.6V for type -70R, others 2.7-3.6V */
+ .voltage = {3000, 3600}, /* 3.0-3.6V for type -70R, others 2.7-3.6V */
},
{
--
To view, visit https://review.coreboot.org/c/flashrom/+/33832
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Ie609d11ab846361f375f7b024d6ca55f83b01682
Gerrit-Change-Number: 33832
Gerrit-PatchSet: 1
Gerrit-Owner: Alan Green <avg(a)google.com>
Gerrit-MessageType: newchange
Alan Green has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/33830
Change subject: flashchips.c: end of line comment consistency
......................................................................
flashchips.c: end of line comment consistency
To allow automated tools to manipulate flashchips.c, make end of line
comment formatting more consistent. Specifically this change moves the
comma from end of line to immediately after the field value, before the
commment.
Signed-off-by: Alan Green <avg(a)google.com>
Change-Id: Ic4f97454766eff640b26a6c6eca29dc56c34c444
---
M flashchips.c
1 file changed, 26 insertions(+), 26 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/30/33830/1
diff --git a/flashchips.c b/flashchips.c
index 88648ad..1796127 100644
--- a/flashchips.c
+++ b/flashchips.c
@@ -2560,7 +2560,7 @@
}
},
.printlock = spi_prettyprint_status_register_plain, /* TODO: improve */
- .write = NULL /* Incompatible Page write */,
+ .write = NULL, /* Incompatible Page write */
.read = spi_chip_read,
.voltage = {2700, 3600},
},
@@ -2667,8 +2667,8 @@
.bustype = BUS_SPI,
.manufacture_id = ATMEL_ID,
.model_id = ATMEL_AT45CS1282,
- .total_size = 16896 /* No power of two sizes */,
- .page_size = 1056 /* No power of two sizes */,
+ .total_size = 16896, /* No power of two sizes */
+ .page_size = 1056, /* No power of two sizes */
/* does not support EWSR nor WREN and has no writable status register bits whatsoever */
/* OTP: 128B total, 64B pre-programmed; read 0x77 (4 dummy bytes); write 0x9A (via buffer) */
.feature_bits = FEATURE_OTP,
@@ -2699,8 +2699,8 @@
.bustype = BUS_SPI,
.manufacture_id = ATMEL_ID,
.model_id = ATMEL_AT45DB011D,
- .total_size = 128 /* or 132, determined from status register */,
- .page_size = 256 /* or 264, determined from status register */,
+ .total_size = 128, /* or 132, determined from status register */
+ .page_size = 256, /* or 264, determined from status register */
/* does not support EWSR nor WREN and has no writable status register bits whatsoever */
/* OTP: 128B total, 64B pre-programmed; read 0x77; write 0x9B */
.feature_bits = FEATURE_OTP,
@@ -2727,8 +2727,8 @@
.block_erase = spi_erase_at45db_chip,
}
},
- .unlock = spi_disable_blockprotect_at45db, /* Impossible if locked down or #WP is low */
.printlock = spi_prettyprint_status_register_at45db,
+ .unlock = spi_disable_blockprotect_at45db, /* Impossible if locked down or #WP is low */
/* granularity will be set by the probing function. */
.write = spi_write_at45db,
.read = spi_read_at45db, /* Fast read (0x0B) supported */
@@ -2741,8 +2741,8 @@
.bustype = BUS_SPI,
.manufacture_id = ATMEL_ID,
.model_id = ATMEL_AT45DB021D,
- .total_size = 256 /* or 264, determined from status register */,
- .page_size = 256 /* or 264, determined from status register */,
+ .total_size = 256, /* or 264, determined from status register */
+ .page_size = 256, /* or 264, determined from status register */
/* does not support EWSR nor WREN and has no writable status register bits whatsoever */
/* OTP: 128B total, 64B pre-programmed; read 0x77; write 0x9B */
.feature_bits = FEATURE_OTP,
@@ -2769,8 +2769,8 @@
.block_erase = spi_erase_at45db_chip,
}
},
- .unlock = spi_disable_blockprotect_at45db, /* Impossible if locked down or #WP is low */
.printlock = spi_prettyprint_status_register_at45db,
+ .unlock = spi_disable_blockprotect_at45db, /* Impossible if locked down or #WP is low */
/* granularity will be set by the probing function. */
.write = spi_write_at45db,
.read = spi_read_at45db, /* Fast read (0x0B) supported */
@@ -2783,8 +2783,8 @@
.bustype = BUS_SPI,
.manufacture_id = ATMEL_ID,
.model_id = ATMEL_AT45DB041D,
- .total_size = 512 /* or 528, determined from status register */,
- .page_size = 256 /* or 264, determined from status register */,
+ .total_size = 512, /* or 528, determined from status register */
+ .page_size = 256, /* or 264, determined from status register */
/* does not support EWSR nor WREN and has no writable status register bits whatsoever */
/* OTP: 128B total, 64B pre-programmed; read 0x77; write 0x9B */
.feature_bits = FEATURE_OTP,
@@ -2811,8 +2811,8 @@
.block_erase = spi_erase_at45db_chip,
}
},
- .unlock = spi_disable_blockprotect_at45db, /* Impossible if locked down or #WP is low */
.printlock = spi_prettyprint_status_register_at45db,
+ .unlock = spi_disable_blockprotect_at45db, /* Impossible if locked down or #WP is low */
/* granularity will be set by the probing function. */
.write = spi_write_at45db,
.read = spi_read_at45db, /* Fast read (0x0B) supported */
@@ -2825,8 +2825,8 @@
.bustype = BUS_SPI,
.manufacture_id = ATMEL_ID,
.model_id = ATMEL_AT45DB081D,
- .total_size = 1024 /* or 1056, determined from status register */,
- .page_size = 256 /* or 264, determined from status register */,
+ .total_size = 1024, /* or 1056, determined from status register */
+ .page_size = 256, /* or 264, determined from status register */
/* does not support EWSR nor WREN and has no writable status register bits whatsoever */
/* OTP: 128B total, 64B pre-programmed; read 0x77; write 0x9B */
.feature_bits = FEATURE_OTP,
@@ -2853,8 +2853,8 @@
.block_erase = spi_erase_at45db_chip,
}
},
- .unlock = spi_disable_blockprotect_at45db, /* Impossible if locked down or #WP is low */
.printlock = spi_prettyprint_status_register_at45db,
+ .unlock = spi_disable_blockprotect_at45db, /* Impossible if locked down or #WP is low */
/* granularity will be set by the probing function. */
.write = spi_write_at45db,
.read = spi_read_at45db, /* Fast read (0x0B) supported */
@@ -2867,8 +2867,8 @@
.bustype = BUS_SPI,
.manufacture_id = ATMEL_ID,
.model_id = ATMEL_AT45DB161D,
- .total_size = 2048 /* or 2112, determined from status register */,
- .page_size = 512 /* or 528, determined from status register */,
+ .total_size = 2048, /* or 2112, determined from status register */
+ .page_size = 512, /* or 528, determined from status register */
/* does not support EWSR nor WREN and has no writable status register bits whatsoever */
/* OTP: 128B total, 64B pre-programmed; read 0x77; write 0x9B */
.feature_bits = FEATURE_OTP,
@@ -2895,8 +2895,8 @@
.block_erase = spi_erase_at45db_chip,
}
},
- .unlock = spi_disable_blockprotect_at45db, /* Impossible if locked down or #WP is low */
.printlock = spi_prettyprint_status_register_at45db,
+ .unlock = spi_disable_blockprotect_at45db, /* Impossible if locked down or #WP is low */
/* granularity will be set by the probing function. */
.write = spi_write_at45db,
.read = spi_read_at45db, /* Fast read (0x0B) supported */
@@ -2909,8 +2909,8 @@
.bustype = BUS_SPI,
.manufacture_id = ATMEL_ID,
.model_id = ATMEL_AT45DB321C,
- .total_size = 4224 /* No power of two sizes */,
- .page_size = 528 /* No power of two sizes */,
+ .total_size = 4224, /* No power of two sizes */
+ .page_size = 528, /* No power of two sizes */
/* does not support EWSR nor WREN and has no writable status register bits whatsoever */
/* OTP: 128B total, 64B pre-programmed; read 0x77 (4 dummy bytes); write 0x9A (via buffer) */
.feature_bits = FEATURE_OTP,
@@ -2952,8 +2952,8 @@
.bustype = BUS_SPI,
.manufacture_id = ATMEL_ID,
.model_id = ATMEL_AT45DB321D,
- .total_size = 4096 /* or 4224, determined from status register */,
- .page_size = 512 /* or 528, determined from status register */,
+ .total_size = 4096, /* or 4224, determined from status register */
+ .page_size = 512, /* or 528, determined from status register */
/* does not support EWSR nor WREN and has no writable status register bits whatsoever */
/* OTP: 128B total, 64B pre-programmed; read 0x77; write 0x9B */
.feature_bits = FEATURE_OTP,
@@ -2994,8 +2994,8 @@
.bustype = BUS_SPI,
.manufacture_id = ATMEL_ID,
.model_id = ATMEL_AT45DB321C,
- .total_size = 4096 /* or 4224, determined from status register */,
- .page_size = 512 /* or 528, determined from status register */,
+ .total_size = 4096, /* or 4224, determined from status register */
+ .page_size = 512, /* or 528, determined from status register */
/* does not support EWSR nor WREN and has no writable status register bits whatsoever */
/* OTP: 128B total, 64B pre-programmed; read 0x77; write 0x9B */
.feature_bits = FEATURE_OTP,
@@ -3036,8 +3036,8 @@
.bustype = BUS_SPI,
.manufacture_id = ATMEL_ID,
.model_id = ATMEL_AT45DB642D,
- .total_size = 8192 /* or 8448, determined from status register */,
- .page_size = 1024 /* or 1056, determined from status register */,
+ .total_size = 8192, /* or 8448, determined from status register */
+ .page_size = 1024, /* or 1056, determined from status register */
/* does not support EWSR nor WREN and has no writable status register bits whatsoever */
/* OTP: 128B total, 64B pre-programmed; read 0x77; write 0x9B */
.feature_bits = FEATURE_OTP,
--
To view, visit https://review.coreboot.org/c/flashrom/+/33830
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Ic4f97454766eff640b26a6c6eca29dc56c34c444
Gerrit-Change-Number: 33830
Gerrit-PatchSet: 1
Gerrit-Owner: Alan Green <avg(a)google.com>
Gerrit-MessageType: newchange