Alan Green has uploaded this change for review.

View Change

flashchips.c: format block_erasers members

To allow automated tools to manipulate flashchips.c, ensure all
.block_erasers definitions have consistent formatting:
- start with the opening brace on a new line.
- ensure end brace indented exactly two tabs.

SFDP-capable chip is the one exception to this rule as it has an empty
block instead.

Signed-off-by: Alan Green <avg@google.com>
Change-Id: Ib168bdbbef4cf097109805de15c97ecc1f7915b3
---
M flashchips.c
1 file changed, 106 insertions(+), 56 deletions(-)

git pull ssh://review.coreboot.org:29418/flashrom refs/changes/31/33831/1
diff --git a/flashchips.c b/flashchips.c
index 1796127..7f3d2a2 100644
--- a/flashchips.c
+++ b/flashchips.c
@@ -1253,7 +1253,8 @@
.tested = TEST_UNTESTED,
.probe = probe_spi_rdid,
.probe_timing = TIMING_ZERO,
- .block_erasers = {
+ .block_erasers =
+ {
{
.eraseblocks = { { 4 * 1024, 512 } },
.block_erase = spi_block_erase_20,
@@ -2510,7 +2511,8 @@
},

/*The AT26DF321 has the same ID as the AT25DF321. */
- /*{
+#if 0
+ {
.vendor = "Atmel",
.name = "AT26DF321",
.bustype = BUS_SPI,
@@ -2526,7 +2528,8 @@
.unlock = spi_disable_blockprotect,
.write = spi_chip_write_256,
.read = spi_chip_read,
- },*/
+ },
+#endif

{
.vendor = "Atmel",
@@ -4991,7 +4994,8 @@
.tested = TEST_OK_PREW,
.probe = probe_spi_rdid,
.probe_timing = TIMING_ZERO,
- .block_erasers = {
+ .block_erasers =
+ {
{
.eraseblocks = { {4 * 1024, 2048} },
.block_erase = spi_block_erase_20,
@@ -5028,7 +5032,8 @@
.tested = TEST_UNTESTED,
.probe = probe_spi_rdid,
.probe_timing = TIMING_ZERO,
- .block_erasers = {
+ .block_erasers =
+ {
{
.eraseblocks = { {4 * 1024, 4096} },
.block_erase = spi_block_erase_20,
@@ -5063,7 +5068,8 @@
.tested = TEST_UNTESTED,
.probe = probe_spi_rdid,
.probe_timing = TIMING_ZERO,
- .block_erasers = {
+ .block_erasers =
+ {
{
.eraseblocks = { {4 * 1024, 32} },
.block_erase = spi_block_erase_20,
@@ -5098,7 +5104,8 @@
.tested = TEST_UNTESTED,
.probe = probe_spi_rdid,
.probe_timing = TIMING_ZERO,
- .block_erasers = {
+ .block_erasers =
+ {
{
.eraseblocks = { {4 * 1024, 64} },
.block_erase = spi_block_erase_20,
@@ -5133,7 +5140,8 @@
.tested = TEST_OK_PREW,
.probe = probe_spi_rdid,
.probe_timing = TIMING_ZERO,
- .block_erasers = {
+ .block_erasers =
+ {
{
.eraseblocks = { {4 * 1024, 128} },
.block_erase = spi_block_erase_20,
@@ -5168,7 +5176,8 @@
.tested = TEST_UNTESTED,
.probe = probe_spi_rdid,
.probe_timing = TIMING_ZERO,
- .block_erasers = {
+ .block_erasers =
+ {
{
.eraseblocks = { {4 * 1024, 256} },
.block_erase = spi_block_erase_20,
@@ -5203,7 +5212,8 @@
.tested = TEST_UNTESTED,
.probe = probe_spi_rdid,
.probe_timing = TIMING_ZERO,
- .block_erasers = {
+ .block_erasers =
+ {
{
.eraseblocks = { {4 * 1024, 512} },
.block_erase = spi_block_erase_20,
@@ -5241,7 +5251,8 @@
.tested = TEST_UNTESTED,
.probe = probe_spi_rdid,
.probe_timing = TIMING_ZERO,
- .block_erasers = {
+ .block_erasers =
+ {
{
.eraseblocks = { {4 * 1024, 1024} },
.block_erase = spi_block_erase_20,
@@ -5279,7 +5290,8 @@
.tested = TEST_UNTESTED,
.probe = probe_spi_rdid,
.probe_timing = TIMING_ZERO,
- .block_erasers = {
+ .block_erasers =
+ {
{
.eraseblocks = { {4 * 1024, 2048} },
.block_erase = spi_block_erase_20,
@@ -6096,7 +6108,8 @@
.tested = TEST_OK_PREW,
.probe = probe_spi_rdid,
.probe_timing = TIMING_ZERO,
- .block_erasers = {
+ .block_erasers =
+ {
{
.eraseblocks = { {4 * 1024, 16} },
.block_erase = spi_block_erase_20,
@@ -6130,7 +6143,8 @@
.tested = TEST_UNTESTED,
.probe = probe_spi_rdid,
.probe_timing = TIMING_ZERO,
- .block_erasers = {
+ .block_erasers =
+ {
{
.eraseblocks = { {4 * 1024, 32} },
.block_erase = spi_block_erase_20,
@@ -6480,7 +6494,8 @@
.tested = TEST_UNTESTED,
.probe = probe_spi_rdid,
.probe_timing = TIMING_ZERO,
- .block_erasers = {
+ .block_erasers =
+ {
{
.eraseblocks = { {4 * 1024, 256} },
.block_erase = spi_block_erase_20,
@@ -9996,7 +10011,8 @@
.tested = TEST_OK_PREW,
.probe = probe_spi_rdid,
.probe_timing = TIMING_ZERO,
- .block_erasers = {
+ .block_erasers =
+ {
{
.eraseblocks = { { 4 * 1024, 256 } },
.block_erase = spi_block_erase_20,
@@ -10125,7 +10141,8 @@
.tested = TEST_UNTESTED,
.probe = probe_spi_rdid,
.probe_timing = TIMING_ZERO,
- .block_erasers = {
+ .block_erasers =
+ {
{
.eraseblocks = { {256, 512} },
.block_erase = spi_block_erase_db,
@@ -10152,7 +10169,8 @@
.tested = TEST_UNTESTED,
.probe = probe_spi_rdid,
.probe_timing = TIMING_ZERO,
- .block_erasers = {
+ .block_erasers =
+ {
{
.eraseblocks = { {256, 1024} },
.block_erase = spi_block_erase_db,
@@ -10179,7 +10197,8 @@
.tested = TEST_UNTESTED,
.probe = probe_spi_rdid,
.probe_timing = TIMING_ZERO,
- .block_erasers = {
+ .block_erasers =
+ {
{
.eraseblocks = { {256, 2048} },
.block_erase = spi_block_erase_db,
@@ -10206,7 +10225,8 @@
.tested = TEST_UNTESTED,
.probe = probe_spi_rdid,
.probe_timing = TIMING_ZERO,
- .block_erasers = {
+ .block_erasers =
+ {
{
.eraseblocks = { {256, 4096} },
.block_erase = spi_block_erase_db,
@@ -10233,7 +10253,8 @@
.tested = TEST_UNTESTED,
.probe = probe_spi_rdid,
.probe_timing = TIMING_ZERO,
- .block_erasers = {
+ .block_erasers =
+ {
{
.eraseblocks = { {256, 8192} },
.block_erase = spi_block_erase_db,
@@ -10436,7 +10457,8 @@
.tested = TEST_OK_PREW,
.probe = probe_spi_rdid,
.probe_timing = TIMING_ZERO,
- .block_erasers = {
+ .block_erasers =
+ {
{
.eraseblocks = { {4 * 1024, 4096 } },
.block_erase = spi_block_erase_20,
@@ -10469,7 +10491,8 @@
.tested = TEST_OK_PREW,
.probe = probe_spi_rdid,
.probe_timing = TIMING_ZERO,
- .block_erasers = {
+ .block_erasers =
+ {
{
.eraseblocks = { {4 * 1024, 4096 } },
.block_erase = spi_block_erase_20,
@@ -10502,7 +10525,8 @@
.tested = TEST_UNTESTED,
.probe = probe_spi_rdid,
.probe_timing = TIMING_ZERO,
- .block_erasers = {
+ .block_erasers =
+ {
{
.eraseblocks = { {4 * 1024, 8192} },
.block_erase = spi_block_erase_21,
@@ -10541,7 +10565,8 @@
.tested = TEST_OK_PREW,
.probe = probe_spi_rdid,
.probe_timing = TIMING_ZERO,
- .block_erasers = {
+ .block_erasers =
+ {
{
.eraseblocks = { {4 * 1024, 16384} },
.block_erase = spi_block_erase_21,
@@ -11830,7 +11855,8 @@
.tested = TEST_OK_PREW,
.probe = probe_spi_res2,
.probe_timing = TIMING_ZERO,
- .block_erasers = {
+ .block_erasers =
+ {
{
.eraseblocks = { {2 * 1024, 64} },
.block_erase = spi_block_erase_d7,
@@ -11861,7 +11887,8 @@
.tested = TEST_OK_PREW,
.probe = probe_spi_res2,
.probe_timing = TIMING_ZERO,
- .block_erasers = {
+ .block_erasers =
+ {
{
.eraseblocks = { {4 * 1024, 128} },
.block_erase = spi_block_erase_d7,
@@ -11871,8 +11898,8 @@
}, {
.eraseblocks = { {512 * 1024, 1} },
.block_erase = spi_block_erase_c7,
- }
- },
+ }
+ },
.printlock = spi_prettyprint_status_register_plain,
.unlock = spi_disable_blockprotect,
.write = spi_chip_write_256,
@@ -11892,7 +11919,8 @@
.tested = TEST_UNTESTED,
.probe = probe_spi_res2,
.probe_timing = TIMING_ZERO,
- .block_erasers = {
+ .block_erasers =
+ {
/* FIXME: Is this correct?
{
.eraseblocks = { {2 * 1024, 64} },
@@ -11925,7 +11953,8 @@
.tested = TEST_UNTESTED,
.probe = probe_spi_res2,
.probe_timing = TIMING_ZERO,
- .block_erasers = {
+ .block_erasers =
+ {
{
.eraseblocks = { {4 * 1024, 64} },
.block_erase = spi_block_erase_d7,
@@ -11955,7 +11984,8 @@
.tested = TEST_UNTESTED,
.probe = probe_spi_rdid,
.probe_timing = TIMING_ZERO,
- .block_erasers = {
+ .block_erasers =
+ {
{
.eraseblocks = { {4 * 1024, 64} },
.block_erase = spi_block_erase_20,
@@ -11992,7 +12022,8 @@
.tested = TEST_OK_PREW,
.probe = probe_spi_res2,
.probe_timing = TIMING_ZERO,
- .block_erasers = {
+ .block_erasers =
+ {
{
.eraseblocks = { {4 * 1024, 128} },
.block_erase = spi_block_erase_d7,
@@ -12003,7 +12034,7 @@
.eraseblocks = { {512 * 1024, 1} },
.block_erase = spi_block_erase_c7,
}
- },
+ },
.printlock = spi_prettyprint_status_register_bp2_srwd,
.unlock = spi_disable_blockprotect, /* #WP pin write-protects SRWP bit. */
.write = spi_chip_write_256,
@@ -12023,7 +12054,8 @@
.tested = TEST_OK_PREW,
.probe = probe_spi_rdid,
.probe_timing = TIMING_ZERO,
- .block_erasers = {
+ .block_erasers =
+ {
{
.eraseblocks = { {4 * 1024, 128} },
.block_erase = spi_block_erase_20,
@@ -12040,7 +12072,7 @@
.eraseblocks = { {512 * 1024, 1} },
.block_erase = spi_block_erase_c7,
}
- },
+ },
.printlock = spi_prettyprint_status_register_bp2_srwd,
.unlock = spi_disable_blockprotect_bp2_srwd,
.write = spi_chip_write_256,
@@ -12090,7 +12122,8 @@
.tested = TEST_UNTESTED,
.probe = probe_spi_rdid,
.probe_timing = TIMING_ZERO,
- .block_erasers = {
+ .block_erasers =
+ {
{
.eraseblocks = { {256, 2 * 1024} },
.block_erase = spi_block_erase_db,
@@ -12121,7 +12154,8 @@
.tested = TEST_UNTESTED,
.probe = probe_spi_res2,
.probe_timing = TIMING_ZERO,
- .block_erasers = {
+ .block_erasers =
+ {
{
.eraseblocks = { {4 * 1024, 128} },
.block_erase = spi_block_erase_d7,
@@ -12131,8 +12165,8 @@
}, {
.eraseblocks = { {512 * 1024, 1} },
.block_erase = spi_block_erase_c7,
- }
- },
+ }
+ },
.printlock = spi_prettyprint_status_register_bp2_srwd,
.unlock = spi_disable_blockprotect, /* #WP pin write-protects SRWP bit. */
.write = spi_chip_write_256,
@@ -12152,7 +12186,8 @@
.tested = TEST_UNTESTED,
.probe = probe_spi_res2,
.probe_timing = TIMING_ZERO,
- .block_erasers = {
+ .block_erasers =
+ {
{
.eraseblocks = { {4 * 1024, 256} },
.block_erase = spi_block_erase_20,
@@ -12186,7 +12221,8 @@
.tested = TEST_UNTESTED,
.probe = probe_spi_res2,
.probe_timing = TIMING_ZERO,
- .block_erasers = {
+ .block_erasers =
+ {
{
.eraseblocks = { {8 * 1024, 128} },
.block_erase = spi_block_erase_d7,
@@ -12425,7 +12461,8 @@
.tested = TEST_OK_PR,
.probe = probe_spi_rdid,
.probe_timing = TIMING_ZERO,
- .block_erasers = {
+ .block_erasers =
+ {
{
.eraseblocks = { {4 * 1024, 128} },
.block_erase = spi_block_erase_20,
@@ -12459,7 +12496,8 @@
.tested = TEST_OK_PREW,
.probe = probe_spi_rdid,
.probe_timing = TIMING_ZERO,
- .block_erasers = {
+ .block_erasers =
+ {
{
.eraseblocks = { {4 * 1024, 256} },
.block_erase = spi_block_erase_20,
@@ -12494,7 +12532,8 @@
.tested = TEST_UNTESTED,
.probe = probe_spi_rdid,
.probe_timing = TIMING_ZERO,
- .block_erasers = {
+ .block_erasers =
+ {
{
.eraseblocks = { {4 * 1024, 512} },
.block_erase = spi_block_erase_20,
@@ -12529,7 +12568,8 @@
.tested = TEST_UNTESTED,
.probe = probe_spi_rdid,
.probe_timing = TIMING_ZERO,
- .block_erasers = {
+ .block_erasers =
+ {
{
.eraseblocks = { {4 * 1024, 1024} },
.block_erase = spi_block_erase_20,
@@ -12564,7 +12604,8 @@
.tested = TEST_OK_PREW,
.probe = probe_spi_rdid,
.probe_timing = TIMING_ZERO,
- .block_erasers = {
+ .block_erasers =
+ {
{
.eraseblocks = { {4 * 1024, 2048} },
.block_erase = spi_block_erase_20,
@@ -12601,7 +12642,8 @@
/* FIXME: we should distinguish the configuration on probing time like we do for AT45DB chips */
.probe = probe_spi_rdid,
.probe_timing = TIMING_ZERO,
- .block_erasers = {
+ .block_erasers =
+ {
{
/* This chip supports erasing of 32 so-called "parameter sectors" with
* opcode 0x20 which may be configured to be on top or bottom of the address
@@ -12644,7 +12686,8 @@
.tested = TEST_UNTESTED,
.probe = probe_spi_rdid,
.probe_timing = TIMING_ZERO,
- .block_erasers = {
+ .block_erasers =
+ {
{
.eraseblocks = { {256 * 1024, 64} },
.block_erase = spi_block_erase_d8,
@@ -12675,7 +12718,8 @@
.tested = TEST_OK_PREW,
.probe = probe_spi_rdid,
.probe_timing = TIMING_ZERO,
- .block_erasers = {
+ .block_erasers =
+ {
{
.eraseblocks = { {64 * 1024, 256} },
.block_erase = spi_block_erase_20,
@@ -12709,7 +12753,8 @@
.tested = TEST_UNTESTED,
.probe = probe_spi_rdid,
.probe_timing = TIMING_ZERO,
- .block_erasers = {
+ .block_erasers =
+ {
{
.eraseblocks = { {256 * 1024, 64} },
.block_erase = spi_block_erase_d8,
@@ -12739,7 +12784,8 @@
.tested = TEST_OK_PREW,
.probe = probe_spi_rdid,
.probe_timing = TIMING_ZERO,
- .block_erasers = {
+ .block_erasers =
+ {
{
/* This chip supports erasing of the 32 so-called "parameter sectors" with
* opcode 0x20. Trying to access an address outside these 4kB blocks does
@@ -12781,7 +12827,8 @@
.tested = TEST_UNTESTED,
.probe = probe_spi_rdid,
.probe_timing = TIMING_ZERO,
- .block_erasers = {
+ .block_erasers =
+ {
{
.eraseblocks = { {256 * 1024, 64} },
.block_erase = spi_block_erase_d8,
@@ -12813,7 +12860,8 @@
.tested = TEST_OK_PREW,
.probe = probe_spi_rdid,
.probe_timing = TIMING_ZERO,
- .block_erasers = {
+ .block_erasers =
+ {
{
/* FIXME: This chip supports erasing of the 32 so-called "parameter sectors" with
* opcode 0x20. Trying to access an address outside these 4kB blocks does have no
@@ -12861,7 +12909,8 @@
.tested = TEST_UNTESTED,
.probe = probe_spi_rdid,
.probe_timing = TIMING_ZERO,
- .block_erasers = {
+ .block_erasers =
+ {
{
.eraseblocks = { {256 * 1024, 64} },
.block_erase = spi_block_erase_d8,
@@ -12893,7 +12942,8 @@
.tested = TEST_OK_PREW,
.probe = probe_spi_rdid,
.probe_timing = TIMING_ZERO,
- .block_erasers = {
+ .block_erasers =
+ {
{
/* This chip supports erasing of the 32 so-called "parameter sectors" with
* opcode 0x20. Trying to access an address outside these 4kB blocks does

To view, visit change 33831. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Ib168bdbbef4cf097109805de15c97ecc1f7915b3
Gerrit-Change-Number: 33831
Gerrit-PatchSet: 1
Gerrit-Owner: Alan Green <avg@google.com>
Gerrit-MessageType: newchange