summaryrefslogtreecommitdiffstats
path: root/spi25.c
diff options
context:
space:
mode:
authorStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>2011-05-28 02:37:14 +0000
committerStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>2011-05-28 02:37:14 +0000
commit355cbfdbef1fbd41b635a5b92195689fd4d3c0b1 (patch)
treebf90deeafdc4ff48c7778e0f48e716befa48cf7c /spi25.c
parent0fbba98c27433c97f42936e9e16805089ce3a296 (diff)
downloadast2050-flashrom-355cbfdbef1fbd41b635a5b92195689fd4d3c0b1.zip
ast2050-flashrom-355cbfdbef1fbd41b635a5b92195689fd4d3c0b1.tar.gz
Small fixes
- missing spaces in code and output - improved documentation/naming/output - missing line breaks in spi probing functions Corresponding to flashrom svn r1321. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Diffstat (limited to 'spi25.c')
-rw-r--r--spi25.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/spi25.c b/spi25.c
index ab272c9..0ba1994 100644
--- a/spi25.c
+++ b/spi25.c
@@ -119,8 +119,10 @@ static int probe_spi_rdid_generic(struct flashchip *flash, int bytes)
uint32_t id1;
uint32_t id2;
- if (spi_rdid(readarr, bytes))
+ if (spi_rdid(readarr, bytes)) {
+ msg_cdbg("\n");
return 0;
+ }
if (!oddparity(readarr[0]))
msg_cdbg("RDID byte 0 parity violation. ");
@@ -198,8 +200,10 @@ int probe_spi_rems(struct flashchip *flash)
unsigned char readarr[JEDEC_REMS_INSIZE];
uint32_t id1, id2;
- if (spi_rems(readarr))
+ if (spi_rems(readarr)) {
+ msg_cdbg("\n");
return 0;
+ }
id1 = readarr[0];
id2 = readarr[1];
@@ -254,15 +258,19 @@ int probe_spi_res1(struct flashchip *flash)
return 0;
}
- if (spi_res(readarr, 1))
+ if (spi_res(readarr, 1)) {
+ msg_cdbg("\n");
return 0;
+ }
id2 = readarr[0];
msg_cdbg("%s: id 0x%x\n", __func__, id2);
- if (id2 != flash->model_id)
+ if (id2 != flash->model_id) {
+ msg_cdbg("\n");
return 0;
+ }
/* Print the status register to tell the
* user about possible write protection.
@@ -276,8 +284,10 @@ int probe_spi_res2(struct flashchip *flash)
unsigned char readarr[2];
uint32_t id1, id2;
- if (spi_res(readarr, 2))
+ if (spi_res(readarr, 2)) {
+ msg_cdbg("\n");
return 0;
+ }
id1 = readarr[0];
id2 = readarr[1];
OpenPOWER on IntegriCloud