summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Hermann <uwe@hermann-uwe.de>2009-06-28 23:26:37 +0000
committerUwe Hermann <uwe@hermann-uwe.de>2009-06-28 23:26:37 +0000
commit1432a60c85ca4ccaeaf56cfa779fa71059c41483 (patch)
treec488aa48d79f0051e1133693271fac3f41d63e30
parent9899cadcd8cb89fc675d38e59cad73641ddc565c (diff)
downloadast2050-flashrom-1432a60c85ca4ccaeaf56cfa779fa71059c41483.zip
ast2050-flashrom-1432a60c85ca4ccaeaf56cfa779fa71059c41483.tar.gz
Random minor flashrom fixes
- Properly escape '-' chars in manpage. - Fix typo in chipset_enable.c. - Drop useless 'return' in chip_readn(). - Random other whitespace or cosmetic fixes. Corresponding to flashrom svn r636. Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
-rw-r--r--board_enable.c16
-rw-r--r--chipset_enable.c2
-rw-r--r--flash.h3
-rw-r--r--flashrom.82
-rw-r--r--flashrom.c1
-rw-r--r--ft2232_spi.c2
-rw-r--r--print.c3
7 files changed, 15 insertions, 14 deletions
diff --git a/board_enable.c b/board_enable.c
index 39979c5..5db5c93 100644
--- a/board_enable.c
+++ b/board_enable.c
@@ -393,7 +393,7 @@ static int board_asus_p5a(const char *name)
static int board_ibm_x3455(const char *name)
{
/* Set GPIO lines in the Broadcom HT-1000 southbridge. */
- /* It's not a superio but it uses the same index/data port method. */
+ /* It's not a Super I/O but it uses the same index/data port method. */
sio_mask(0xcd6, 0x45, 0x20, 0x20);
return 0;
@@ -429,7 +429,7 @@ static int board_hp_dl145_g3_enable(const char *name)
/* Set GPIO lines in the Broadcom HT-1000 southbridge. */
/* GPIO 0 reg from PM regs */
/* Set GPIO 2 and 5 high, connected to flash WP# and TBL# pins. */
- /* It's not a superio but it uses the same index/data port method. */
+ /* It's not a Super I/O but it uses the same index/data port method. */
sio_mask(0xcd6, 0x44, 0x24, 0x24);
return 0;
@@ -750,9 +750,9 @@ static uint16_t smsc_find_runtime(uint16_t sio_port, uint16_t chip_id,
uint16_t rt_port = 0;
/* Verify the chip ID. */
- OUTB(0x55, sio_port); /* enable configuration */
+ OUTB(0x55, sio_port); /* Enable configuration. */
if (sio_read(sio_port, 0x20) != chip_id) {
- fprintf(stderr, "\nERROR: SMSC super I/O not found.\n");
+ fprintf(stderr, "\nERROR: SMSC Super I/O not found.\n");
goto out;
}
@@ -768,7 +768,7 @@ static uint16_t smsc_find_runtime(uint16_t sio_port, uint16_t chip_id,
"Super I/O runtime interface not available.\n");
}
out:
- OUTB(0xaa, sio_port); /* disable configuration */
+ OUTB(0xaa, sio_port); /* Disable configuration. */
return rt_port;
}
@@ -788,18 +788,18 @@ static int board_mitac_6513wu(const char *name)
return -1;
}
- rt_port = smsc_find_runtime(0x4e, 0x54, 0xa);
+ rt_port = smsc_find_runtime(0x4e, 0x54 /* LPC47U33x */, 0xa);
if (rt_port == 0)
return -1;
/* Configure the GPIO pin. */
val = INB(rt_port + 0x33); /* GP30 config */
- val &= ~0x87; /* output, non-inverted, GPIO, push/pull */
+ val &= ~0x87; /* Output, non-inverted, GPIO, push/pull */
OUTB(val, rt_port + 0x33);
/* Disable write protection. */
val = INB(rt_port + 0x4d); /* GP3 values */
- val |= 0x01; /* set GP30 high */
+ val |= 0x01; /* Set GP30 high. */
OUTB(val, rt_port + 0x4d);
return 0;
diff --git a/chipset_enable.c b/chipset_enable.c
index 3c1f7bd..6220e36 100644
--- a/chipset_enable.c
+++ b/chipset_enable.c
@@ -1059,7 +1059,7 @@ int chipset_flash_enable(void)
else
printf("OK.\n");
}
- printf("This chipset supports the following protcols: %s.\n",
+ printf("This chipset supports the following protocols: %s.\n",
flashbuses_to_text(buses_supported));
return ret;
diff --git a/flash.h b/flash.h
index 0f6b16d..4649bba 100644
--- a/flash.h
+++ b/flash.h
@@ -590,11 +590,12 @@ int erase_stm50flw0x0x(struct flashchip *flash);
int write_stm50flw0x0x(struct flashchip *flash, uint8_t *buf);
/* serprog.c */
-extern char* serprog_param;
+extern char *serprog_param;
int serprog_init(void);
int serprog_shutdown(void);
void serprog_chip_writeb(uint8_t val, chipaddr addr);
uint8_t serprog_chip_readb(const chipaddr addr);
void serprog_chip_readn(uint8_t *buf, const chipaddr addr, size_t len);
void serprog_delay(int delay);
+
#endif /* !__FLASH_H__ */
diff --git a/flashrom.8 b/flashrom.8
index 3dd76f7..446315e 100644
--- a/flashrom.8
+++ b/flashrom.8
@@ -24,7 +24,7 @@ Please note that the command line interface for flashrom will change before
flashrom 1.0. Do not use flashrom in scripts or other automated tools without
checking that your flashrom version won't interpret options in a different way.
.PP
-You can specify one of -E, -r, -w, -v or no operation.
+You can specify one of \-E, \-r, \-w, \-v or no operation.
If no operation is specified, then all that happens
is that flash info is dumped and the flash chip is set to writable.
.TP
diff --git a/flashrom.c b/flashrom.c
index a61bf2d..6822b4f 100644
--- a/flashrom.c
+++ b/flashrom.c
@@ -209,7 +209,6 @@ uint32_t chip_readl(const chipaddr addr)
void chip_readn(uint8_t *buf, chipaddr addr, size_t len)
{
programmer_table[programmer].chip_readn(buf, addr, len);
- return;
}
void programmer_delay(int usecs)
diff --git a/ft2232_spi.c b/ft2232_spi.c
index 1127dea..36b8969 100644
--- a/ft2232_spi.c
+++ b/ft2232_spi.c
@@ -211,7 +211,7 @@ int ft2232_spi_command(unsigned int writecnt, unsigned int readcnt,
}
- deassert_cs:
+deassert_cs:
printf_debug("De-assert CS#\n");
buf[i++] = SET_BITS_LOW;
buf[i++] = (port_val |= CS_BIT);
diff --git a/print.c b/print.c
index 2bd53e4..2834bc8 100644
--- a/print.c
+++ b/print.c
@@ -289,7 +289,7 @@ In general, flashing laptops is more difficult because laptops\n\n\
* often have special protection stuff which has to be handled by flashrom,\n\
* often use flash translation circuits which need drivers in flashrom.\n\n\
<div style=\"margin-top:0.5em; padding:0.5em 0.5em 0.5em 0.5em; \
-background-color:#ff9f9f; align:right; border:1px solid #aabbcc;\">\n\
+background-color:#ff6666; align:right; border:1px solid #000000;\">\n\
'''IMPORTANT:''' At this point we recommend to '''not''' use flashrom on \
untested laptops unless you have a means to recover from a flashing that goes \
wrong (a working backup flash chip and/or good soldering skills).\n</div>\n";
@@ -649,6 +649,7 @@ void print_supported_chips_wiki(void)
"| valign=\"top\"|\n\n%s", chipcount, chip_th);
for (f = flashchips; f->name != NULL; f++, i++) {
+ /* Don't print "unknown XXXX SPI chip" entries. */
if (!strncmp(f->name, "unknown", 7))
continue;
OpenPOWER on IntegriCloud