From df90d3a38fb926bad04a46835eafa00661c46cd8 Mon Sep 17 00:00:00 2001 From: Daniel Lenski Date: Thu, 22 Jul 2010 11:44:38 +0000 Subject: Add support for the following AMIC SPI chips http://www.amictechnology.com/pdf/A25L20P.pdf covers: AMIC A25L05PT AMIC A25L05PU AMIC A25L10PT AMIC A25L10PU AMIC A25L20PT AMIC A25L20PU http://www.amictechnology.com/pdf/A25L16P.pdf covers: AMIC A25L16PT AMIC A25L16PU Clarify the situation surrounding the A25L40PT and A25L40PU chips which share the same RDID values, despite the fact that their erase block layouts are different. Rudolf Marek tested and confirmed the distinct erase block layouts of these chips. Add a pretty-printer for the AMIC SPI chip status register Add a generic AMIC chip type. Corresponding to flashrom svn r1096. Signed-off-by: Daniel Lenski Acked-by: Carl-Daniel Hailfinger --- spi25.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'spi25.c') diff --git a/spi25.c b/spi25.c index 32bb73c..b8b26bd 100644 --- a/spi25.c +++ b/spi25.c @@ -328,6 +328,16 @@ void spi_prettyprint_status_register_common(uint8_t status) } /* Prettyprint the status register. Works for + * AMIC A25L series + */ +void spi_prettyprint_status_register_amic_a25l(uint8_t status) +{ + msg_cdbg("Chip status register: Status Register Write Disable " + "(SRWD) is %sset\n", (status & (1 << 7)) ? "" : "not "); + spi_prettyprint_status_register_common(status); +} + +/* Prettyprint the status register. Works for * ST M25P series * MX MX25L series */ @@ -389,6 +399,10 @@ void spi_prettyprint_status_register(struct flashchip *flash) status = spi_read_status_register(); msg_cdbg("Chip status register is %02x\n", status); switch (flash->manufacture_id) { + case AMIC_ID: + if ((flash->model_id & 0xff00) == 0x2000) + spi_prettyprint_status_register_amic_a25l(status); + break; case ST_ID: if (((flash->model_id & 0xff00) == 0x2000) || ((flash->model_id & 0xff00) == 0x2500)) -- cgit v1.1