- Resort
 - Add Pm25LV512A and Pm25LV010A

Signed-off-by: Stefan Tauner <[email protected]>
---
 flashchips.c |  126 +++++++++++++++++++++++++++++++++++++++++++---------------
 flashchips.h |    4 +-
 2 files changed, 97 insertions(+), 33 deletions(-)

diff --git a/flashchips.c b/flashchips.c
index 16726ad..342fcea 100644
--- a/flashchips.c
+++ b/flashchips.c
@@ -6562,15 +6562,79 @@ const struct flashchip flashchips[] = {
 
        {
                .vendor         = "PMC",
-               .name           = "Pm25LV010",
+               .name           = "Pm25LV512",
+               .bustype        = BUS_SPI,
+               .manufacture_id = PMC_ID_NOPREFIX,
+               .model_id       = PMC_PM25LV512,
+               .total_size     = 64,
+               .page_size      = 256,
+               .feature_bits   = FEATURE_WRSR_WREN,
+               .tested         = TEST_UNTESTED,
+               .probe          = probe_spi_res1,
+               .probe_timing   = TIMING_ZERO,
+               .block_erasers  =
+               {
+                       {
+                               .eraseblocks = { {4 * 1024, 16} },
+                               .block_erase = spi_block_erase_d7,
+                       }, {
+                               .eraseblocks = { {32 * 1024, 2} },
+                               .block_erase = spi_block_erase_d8,
+                       }, {
+                               .eraseblocks = { {64 * 1024, 1} },
+                               .block_erase = spi_block_erase_c7,
+                       }
+               },
+               .printlock      = spi_prettyprint_status_register_default_bp1,
+               .unlock         = spi_disable_blockprotect,
+               .write          = spi_chip_write_256,
+               .read           = spi_chip_read, /* Fast read (0x0B) supported 
*/
+               .voltage        = {2700, 3600},
+       },
+
+       {
+               .vendor         = "PMC",
+               .name           = "Pm25LV512A",
                .bustype        = BUS_SPI,
                .manufacture_id = PMC_ID,
+               .model_id       = PMC_PM25LV512,
+               .total_size     = 64,
+               .page_size      = 256,
+               .feature_bits   = FEATURE_WRSR_WREN,
+               .tested         = TEST_BAD_PROBE,
+               .probe          = NULL, /* FIXME: WTF, just WTF */
+               .probe_timing   = TIMING_ZERO,
+               .block_erasers  =
+               {
+                       {
+                               .eraseblocks = { {4 * 1024, 16} },
+                               .block_erase = spi_block_erase_d7,
+                       }, {
+                               .eraseblocks = { {32 * 1024, 2} },
+                               .block_erase = spi_block_erase_d8,
+                       }, {
+                               .eraseblocks = { {64 * 1024, 1} },
+                               .block_erase = spi_block_erase_c7,
+                       }
+               },
+               .printlock      = spi_prettyprint_status_register_default_bp1,
+               .unlock         = spi_disable_blockprotect,
+               .write          = spi_chip_write_256,
+               .read           = spi_chip_read, /* Fast read (0x0B) supported 
*/
+               .voltage        = {2700, 3600},
+       },
+
+       {
+               .vendor         = "PMC",
+               .name           = "Pm25LV010",
+               .bustype        = BUS_SPI,
+               .manufacture_id = PMC_ID_NOPREFIX,
                .model_id       = PMC_PM25LV010,
                .total_size     = 128,
                .page_size      = 256,
                .feature_bits   = FEATURE_WRSR_WREN,
                .tested         = TEST_UNTESTED,
-               .probe          = probe_spi_rdid,
+               .probe          = probe_spi_res1,
                .probe_timing   = TIMING_ZERO,
                .block_erasers  =
                {
@@ -6585,20 +6649,20 @@ const struct flashchip flashchips[] = {
                                .block_erase = spi_block_erase_c7,
                        }
                },
-               .printlock      = spi_prettyprint_status_register_plain, /* 
TODO: improve */
+               .printlock      = spi_prettyprint_status_register_default_bp1,
                .unlock         = spi_disable_blockprotect,
                .write          = spi_chip_write_256,
-               .read           = spi_chip_read,
+               .read           = spi_chip_read, /* Fast read (0x0B) supported 
*/
                .voltage        = {2700, 3600},
        },
 
        {
                .vendor         = "PMC",
-               .name           = "Pm25LV016B",
+               .name           = "Pm25LV010A",
                .bustype        = BUS_SPI,
                .manufacture_id = PMC_ID,
-               .model_id       = PMC_PM25LV016B,
-               .total_size     = 2048,
+               .model_id       = PMC_PM25LV010,
+               .total_size     = 128,
                .page_size      = 256,
                .feature_bits   = FEATURE_WRSR_WREN,
                .tested         = TEST_UNTESTED,
@@ -6607,26 +6671,20 @@ const struct flashchip flashchips[] = {
                .block_erasers  =
                {
                        {
-                               .eraseblocks = { {4 * 1024, 512} },
+                               .eraseblocks = { {4 * 1024, 32} },
                                .block_erase = spi_block_erase_d7,
                        }, {
-                               .eraseblocks = { {4 * 1024, 512} },
-                               .block_erase = spi_block_erase_20,
-                       }, {
-                               .eraseblocks = { {64 * 1024, 32} },
+                               .eraseblocks = { {32 * 1024, 4} },
                                .block_erase = spi_block_erase_d8,
                        }, {
-                               .eraseblocks = { {2 * 1024 * 1024, 1} },
-                               .block_erase = spi_block_erase_60,
-                       }, {
-                               .eraseblocks = { {2 * 1024 * 1024, 1} },
+                               .eraseblocks = { {128 * 1024, 1} },
                                .block_erase = spi_block_erase_c7,
                        }
                },
-               .printlock      = spi_prettyprint_status_register_plain, /* 
TODO: improve */
+               .printlock      = spi_prettyprint_status_register_default_bp1,
                .unlock         = spi_disable_blockprotect,
                .write          = spi_chip_write_256,
-               .read           = spi_chip_read,
+               .read           = spi_chip_read, /* Fast read (0x0B) supported 
*/
                .voltage        = {2700, 3600},
        },
 
@@ -6655,7 +6713,7 @@ const struct flashchip flashchips[] = {
                                .block_erase = spi_block_erase_c7,
                        }
                },
-               .printlock      = spi_prettyprint_status_register_plain, /* 
TODO: improve */
+               .printlock      = spi_prettyprint_status_register_default_bp2,
                .unlock         = spi_disable_blockprotect,
                .write          = spi_chip_write_256,
                .read           = spi_chip_read,
@@ -6687,10 +6745,10 @@ const struct flashchip flashchips[] = {
                                .block_erase = spi_block_erase_c7,
                        }
                },
-               .printlock      = spi_prettyprint_status_register_plain, /* 
TODO: improve */
+               .printlock      = spi_prettyprint_status_register_default_bp2,
                .unlock         = spi_disable_blockprotect,
                .write          = spi_chip_write_256,
-               .read           = spi_chip_read,
+               .read           = spi_chip_read, /* Fast read (0x0B) supported 
*/
                .voltage        = {2700, 3600},
        },
 
@@ -6725,20 +6783,20 @@ const struct flashchip flashchips[] = {
                                .block_erase = spi_block_erase_c7,
                        }
                },
-               .printlock      = spi_prettyprint_status_register_plain, /* 
TODO: improve */
+               .printlock      = spi_prettyprint_status_register_default_bp2,
                .unlock         = spi_disable_blockprotect,
                .write          = spi_chip_write_256,
-               .read           = spi_chip_read,
+               .read           = spi_chip_read, /* Fast read (0x0B) supported 
*/
                .voltage        = {2700, 3600},
        },
 
        {
                .vendor         = "PMC",
-               .name           = "Pm25LV512",
+               .name           = "Pm25LV016B",
                .bustype        = BUS_SPI,
                .manufacture_id = PMC_ID,
-               .model_id       = PMC_PM25LV512,
-               .total_size     = 64,
+               .model_id       = PMC_PM25LV016B,
+               .total_size     = 2048,
                .page_size      = 256,
                .feature_bits   = FEATURE_WRSR_WREN,
                .tested         = TEST_UNTESTED,
@@ -6747,20 +6805,26 @@ const struct flashchip flashchips[] = {
                .block_erasers  =
                {
                        {
-                               .eraseblocks = { {4 * 1024, 16} },
+                               .eraseblocks = { {4 * 1024, 512} },
                                .block_erase = spi_block_erase_d7,
                        }, {
-                               .eraseblocks = { {32 * 1024, 2} },
+                               .eraseblocks = { {4 * 1024, 512} },
+                               .block_erase = spi_block_erase_20,
+                       }, {
+                               .eraseblocks = { {64 * 1024, 32} },
                                .block_erase = spi_block_erase_d8,
                        }, {
-                               .eraseblocks = { {64 * 1024, 1} },
+                               .eraseblocks = { {2 * 1024 * 1024, 1} },
+                               .block_erase = spi_block_erase_60,
+                       }, {
+                               .eraseblocks = { {2 * 1024 * 1024, 1} },
                                .block_erase = spi_block_erase_c7,
                        }
                },
-               .printlock      = spi_prettyprint_status_register_plain, /* 
TODO: improve */
+               .printlock      = spi_prettyprint_status_register_default_bp2,
                .unlock         = spi_disable_blockprotect,
                .write          = spi_chip_write_256,
-               .read           = spi_chip_read,
+               .read           = spi_chip_read, /* Fast read (0x0B) supported 
*/
                .voltage        = {2700, 3600},
        },
 
diff --git a/flashchips.h b/flashchips.h
index 4eebc95..bbad7ec 100644
--- a/flashchips.h
+++ b/flashchips.h
@@ -453,8 +453,8 @@
  */
 #define PMC_ID                 0x7F9D  /* PMC */
 #define PMC_ID_NOPREFIX                0x9D    /* PMC, missing 0x7F prefix */
-#define PMC_PM25LV512          0x7B
-#define PMC_PM25LV010          0x7C
+#define PMC_PM25LV512          0x7B    /* Same as Pm25LV512A, but the latter 
does not support any sane probing. */
+#define PMC_PM25LV010          0x7C    /* Same as Pm25LV010A, but the latter 
uses the continuation prefix. */
 #define PMC_PM25LV020          0x7D
 #define PMC_PM25LV040          0x7E
 #define PMC_PM25LV080B         0x13
-- 
Kind regards, Stefan Tauner


_______________________________________________
flashrom mailing list
[email protected]
http://www.flashrom.org/mailman/listinfo/flashrom

Reply via email to