summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorUwe Hermann <uwe@hermann-uwe.de>2007-08-23 16:08:21 +0000
committerUwe Hermann <uwe@hermann-uwe.de>2007-08-23 16:08:21 +0000
commitba9ce9f7f986ba2a3f4d88b7cb53e0704b7d2708 (patch)
tree9ad9be681febfa96ecca8a7ee024f52f96d2b66f /util
parent0a6bb9106263eead0dd35d68be90ab52223488d5 (diff)
Cosmetic fixes (trivial).
Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Uwe Hermann <uwe@hermann-uwe.de> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@2748 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util')
-rw-r--r--util/flashrom/82802ab.c15
-rw-r--r--util/flashrom/am29f040b.c8
-rw-r--r--util/flashrom/board_enable.c62
-rw-r--r--util/flashrom/chipset_enable.c17
-rw-r--r--util/flashrom/flashchips.c2
-rw-r--r--util/flashrom/flashrom.c9
-rw-r--r--util/flashrom/jedec.c14
-rw-r--r--util/flashrom/layout.c2
-rw-r--r--util/flashrom/lbtable.c8
-rw-r--r--util/flashrom/m29f400bt.c8
-rw-r--r--util/flashrom/msys_doc.c31
-rw-r--r--util/flashrom/mx29f002.c4
-rw-r--r--util/flashrom/pm49fl004.c2
-rw-r--r--util/flashrom/sharplhf00l04.c15
-rw-r--r--util/flashrom/sst28sf040.c8
-rw-r--r--util/flashrom/sst39sf020.c4
-rw-r--r--util/flashrom/sst49lf040.c4
-rw-r--r--util/flashrom/sst49lfxxxc.c12
-rw-r--r--util/flashrom/sst_fwhub.c8
-rw-r--r--util/flashrom/w49f002u.c2
20 files changed, 120 insertions, 115 deletions
diff --git a/util/flashrom/82802ab.c b/util/flashrom/82802ab.c
index 1c98f5c076..2784d7ae59 100644
--- a/util/flashrom/82802ab.c
+++ b/util/flashrom/82802ab.c
@@ -77,7 +77,6 @@ int probe_82802ab(struct flashchip *flash)
uint8_t wait_82802ab(volatile uint8_t *bios)
{
-
uint8_t status;
uint8_t id1, id2;
@@ -100,9 +99,10 @@ uint8_t wait_82802ab(volatile uint8_t *bios)
*(volatile uint8_t *)(bios + 0x5555) = 0xAA;
*(volatile uint8_t *)(bios + 0x2AAA) = 0x55;
*(volatile uint8_t *)(bios + 0x5555) = 0xF0;
- return status;
+ return status;
}
+
int erase_82802ab_block(struct flashchip *flash, int offset)
{
volatile uint8_t *bios = flash->virtual_memory + offset;
@@ -126,8 +126,10 @@ int erase_82802ab_block(struct flashchip *flash, int offset)
status = wait_82802ab(flash->virtual_memory);
//print_82802ab_status(status);
printf("DONE BLOCK 0x%x\n", offset);
- return (0);
+
+ return 0;
}
+
int erase_82802ab(struct flashchip *flash)
{
int i;
@@ -138,7 +140,8 @@ int erase_82802ab(struct flashchip *flash)
for (i = 0; i < total_size; i += flash->page_size)
erase_82802ab_block(flash, i);
printf("DONE ERASE\n");
- return (0);
+
+ return 0;
}
void write_page_82802ab(volatile uint8_t *bios, uint8_t *src,
@@ -152,7 +155,6 @@ void write_page_82802ab(volatile uint8_t *bios, uint8_t *src,
*dst++ = *src++;
wait_82802ab(bios);
}
-
}
int write_82802ab(struct flashchip *flash, uint8_t *buf)
@@ -176,5 +178,6 @@ int write_82802ab(struct flashchip *flash, uint8_t *buf)
}
printf("\n");
protect_jedec(bios);
- return (0);
+
+ return 0;
}
diff --git a/util/flashrom/am29f040b.c b/util/flashrom/am29f040b.c
index e7f318bfb4..d1c1f223ae 100644
--- a/util/flashrom/am29f040b.c
+++ b/util/flashrom/am29f040b.c
@@ -41,7 +41,7 @@ static __inline__ int erase_sector_29f040b(volatile uint8_t *bios,
/* wait for Toggle bit ready */
toggle_ready_jedec(bios + address);
- return (0);
+ return 0;
}
static __inline__ int write_sector_29f040b(volatile uint8_t *bios,
@@ -68,7 +68,7 @@ static __inline__ int write_sector_29f040b(volatile uint8_t *bios,
printf("\b\b\b\b\b\b\b\b\b\b");
}
- return (0);
+ return 0;
}
int probe_29f040b(struct flashchip *flash)
@@ -108,7 +108,7 @@ int erase_29f040b(struct flashchip *flash)
myusec_delay(10);
toggle_ready_jedec(bios);
- return (0);
+ return 0;
}
int write_29f040b(struct flashchip *flash, uint8_t *buf)
@@ -131,5 +131,5 @@ int write_29f040b(struct flashchip *flash, uint8_t *buf)
}
printf("\n");
- return (0);
+ return 0;
}
diff --git a/util/flashrom/board_enable.c b/util/flashrom/board_enable.c
index 983fd18ec6..e9066de658 100644
--- a/util/flashrom/board_enable.c
+++ b/util/flashrom/board_enable.c
@@ -22,7 +22,7 @@
#include "flash.h"
/*
- * Helper functions for many Winbond superIOs of the w836xx range.
+ * Helper functions for many Winbond Super I/Os of the W836xx range.
*/
#define W836_INDEX 0x2E
#define W836_DATA 0x2F
@@ -40,7 +40,7 @@ static void w836xx_ext_leave(void)
outb(0xAA, W836_INDEX);
}
-/* General functions for read/writing WB SuperIOs */
+/* General functions for reading/writing Winbond Super I/Os. */
static unsigned char wbsio_read(unsigned char index)
{
outb(index, W836_INDEX);
@@ -53,8 +53,8 @@ static void wbsio_write(unsigned char index, unsigned char data)
outb(data, W836_DATA);
}
-static void
-wbsio_mask(unsigned char index, unsigned char data, unsigned char mask)
+static void wbsio_mask(unsigned char index, unsigned char data,
+ unsigned char mask)
{
unsigned char tmp;
@@ -63,14 +63,13 @@ wbsio_mask(unsigned char index, unsigned char data, unsigned char mask)
outb(tmp | (data & mask), W836_DATA);
}
-/*
- * WinBond w83627hf: raise GPIO24.
+/**
+ * Winbond W83627HF: Raise GPIO24.
*
* Suited for:
- * * Agami Aruma
- * * IWILL DK8-HTX
+ * - Agami Aruma
+ * - IWILL DK8-HTX
*/
-
static int w83627hf_gpio24_raise(const char *name)
{
w836xx_ext_enter();
@@ -101,12 +100,11 @@ static int w83627hf_gpio24_raise(const char *name)
return 0;
}
-/*
+/**
* Suited for VIAs EPIA M and MII, and maybe other CLE266 based EPIAs.
*
- * We don't need to do this when using linuxbios, GPIO15 is never lowered there.
+ * We don't need to do this when using LinuxBIOS, GPIO15 is never lowered there.
*/
-
static int board_via_epia_m(const char *name)
{
struct pci_dev *dev;
@@ -135,12 +133,11 @@ static int board_via_epia_m(const char *name)
return 0;
}
-/*
+/**
* Suited for:
- * ASUS A7V8X-MX SE and A7V400-MX: AMD K7 + VIA KM400A + VT8235
- * Tyan Tomcat K7M: AMD Geode NX + VIA KM400 + VT8237.
+ * - ASUS A7V8X-MX SE and A7V400-MX: AMD K7 + VIA KM400A + VT8235
+ * - Tyan Tomcat K7M: AMD Geode NX + VIA KM400 + VT8237.
*/
-
static int board_asus_a7v8x_mx(const char *name)
{
struct pci_dev *dev;
@@ -170,14 +167,13 @@ static int board_asus_a7v8x_mx(const char *name)
return 0;
}
-/*
+/**
* Suited for ASUS P5A.
*
* This is rather nasty code, but there's no way to do this cleanly.
* We're basically talking to some unknown device on SMBus, my guess
* is that it is the Winbond W83781D that lives near the DIP BIOS.
*/
-
static int board_asus_p5a(const char *name)
{
uint8_t tmp;
@@ -278,16 +274,14 @@ static int board_epox_ep_bx3(const char *name)
return 0;
}
-/*
- * We use 2 sets of ids here, you're free to choose which is which. This
- * to provide a very high degree of certainty when matching a board on
- * the basis of Subsystem/card ids. As not every vendor handles
- * subsystem/card ids in a sane manner.
- *
- * Keep the second set nulled if it should be ignored.
+/**
+ * We use 2 sets of IDs here, you're free to choose which is which. This
+ * is to provide a very high degree of certainty when matching a board on
+ * the basis of subsystem/card IDs. As not every vendor handles
+ * subsystem/card IDs in a sane manner.
*
+ * Keep the second set NULLed if it should be ignored.
*/
-
struct board_pciid_enable {
/* Any device, but make it sensible, like the isa bridge. */
uint16_t first_vendor;
@@ -331,10 +325,9 @@ struct board_pciid_enable board_pciid_enables[] = {
{0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL} /* Keep this */
};
-/*
- * Match boards on linuxbios table gathered vendor and part name.
- * Require main pci-ids to match too as extra safety.
- *
+/**
+ * Match boards on LinuxBIOS table gathered vendor and part name.
+ * Require main PCI IDs to match too as extra safety.
*/
static struct board_pciid_enable *board_match_linuxbios_name(char *vendor,
char *part)
@@ -359,9 +352,9 @@ static struct board_pciid_enable *board_match_linuxbios_name(char *vendor,
return NULL;
}
-/*
- * Match boards on pci ids and subsystem ids.
- * Second set of ids can be main only or missing completely.
+/**
+ * Match boards on PCI IDs and subsystem IDs.
+ * Second set of IDs can be main only or missing completely.
*/
static struct board_pciid_enable *board_match_pci_card_ids(void)
{
@@ -396,9 +389,6 @@ static struct board_pciid_enable *board_match_pci_card_ids(void)
return NULL;
}
-/*
- *
- */
int board_flash_enable(char *vendor, char *part)
{
struct board_pciid_enable *board = NULL;
diff --git a/util/flashrom/chipset_enable.c b/util/flashrom/chipset_enable.c
index e3b0250521..3b8014937d 100644
--- a/util/flashrom/chipset_enable.c
+++ b/util/flashrom/chipset_enable.c
@@ -112,6 +112,7 @@ static int enable_flash_piix4(struct pci_dev *dev, char *name)
printf("tried to set 0x%x to 0x%x on %s failed (WARNING ONLY)\n", xbcs, new, name);
return -1;
}
+
return 0;
}
@@ -145,6 +146,7 @@ static int enable_flash_ich(struct pci_dev *dev, char *name, int bios_cntl)
printf("tried to set 0x%x to 0x%x on %s failed (WARNING ONLY)\n", bios_cntl, new, name);
return -1;
}
+
return 0;
}
@@ -158,14 +160,11 @@ static int enable_flash_ich_dc(struct pci_dev *dev, char *name)
return enable_flash_ich(dev, name, 0xdc);
}
-/*
- *
- */
static int enable_flash_vt823x(struct pci_dev *dev, char *name)
{
uint8_t val;
- /* ROM Write enable */
+ /* ROM write enable */
val = pci_read_byte(dev, 0x40);
val |= 0x10;
pci_write_byte(dev, 0x40, val);
@@ -221,6 +220,7 @@ static int enable_flash_sc1100(struct pci_dev *dev, char *name)
printf("tried to set register 0x%x to 0x%x on %s failed (WARNING ONLY)\n", 0x52, new, name);
return -1;
}
+
return 0;
}
@@ -243,6 +243,7 @@ static int enable_flash_sis5595(struct pci_dev *dev, char *name)
printf("Stuck at 0x%x\n", newer);
return -1;
}
+
return 0;
}
@@ -275,6 +276,7 @@ static int enable_flash_amd8111(struct pci_dev *dev, char *name)
printf("tried to set 0x%x to 0x%x on %s failed (WARNING ONLY)\n", 0x40, new, name);
return -1;
}
+
return 0;
}
@@ -308,6 +310,7 @@ static int enable_flash_ck804(struct pci_dev *dev, char *name)
printf("tried to set 0x%x to 0x%x on %s failed (WARNING ONLY)\n", 0x6d, new, name);
return -1;
}
+
return 0;
}
@@ -393,7 +396,6 @@ static int enable_flash_mcp55(struct pci_dev *dev, char *name)
}
return 0;
-
}
static int enable_flash_ht1000(struct pci_dev *dev, char *name)
@@ -406,7 +408,7 @@ static int enable_flash_ht1000(struct pci_dev *dev, char *name)
pci_write_byte(dev, 0x41, byte);
byte = pci_read_byte(dev, 0x43);
- byte |= (1<<4);
+ byte |= (1 << 4);
pci_write_byte(dev, 0x43, byte);
return 0;
@@ -473,9 +475,6 @@ static FLASH_ENABLE enables[] = {
{0x1166, 0x0205, "Broadcom HT-1000", enable_flash_ht1000},
};
-/*
- *
- */
int chipset_flash_enable(void)
{
struct pci_dev *dev = 0;
diff --git a/util/flashrom/flashchips.c b/util/flashrom/flashchips.c
index 2b486bef01..0437677740 100644
--- a/util/flashrom/flashchips.c
+++ b/util/flashrom/flashchips.c
@@ -150,5 +150,3 @@ struct flashchip flashchips[] = {
probe_jedec, erase_chip_jedec, write_49f002},
{NULL,}
};
-
-
diff --git a/util/flashrom/flashrom.c b/util/flashrom/flashrom.c
index 8423523410..2aef991caf 100644
--- a/util/flashrom/flashrom.c
+++ b/util/flashrom/flashrom.c
@@ -49,12 +49,8 @@ char *chip_to_probe = NULL;
struct pci_access *pacc; /* For board and chipset_enable */
int exclude_start_page, exclude_end_page;
int force = 0, verbose = 0;
-
int fd_mem;
-/*
- *
- */
struct pci_dev *pci_dev_find(uint16_t vendor, uint16_t device)
{
struct pci_dev *temp;
@@ -71,9 +67,6 @@ struct pci_dev *pci_dev_find(uint16_t vendor, uint16_t device)
return NULL;
}
-/*
- *
- */
struct pci_dev *pci_card_find(uint16_t vendor, uint16_t device,
uint16_t card_vendor, uint16_t card_device)
{
@@ -163,6 +156,7 @@ struct flashchip *probe_flash(struct flashchip *flash)
flash++;
}
+
return NULL;
}
@@ -196,6 +190,7 @@ int verify_flash(struct flashchip *flash, uint8_t *buf)
printf("\b\b\b\b\b\b\b\b\b\b ");
printf("- VERIFIED \n");
+
return 0;
}
diff --git a/util/flashrom/jedec.c b/util/flashrom/jedec.c
index 0a27edad6a..62c9be0eaf 100644
--- a/util/flashrom/jedec.c
+++ b/util/flashrom/jedec.c
@@ -135,7 +135,7 @@ int erase_sector_jedec(volatile uint8_t *bios, unsigned int page)
/* wait for Toggle bit ready */
toggle_ready_jedec(bios);
- return (0);
+ return 0;
}
int erase_block_jedec(volatile uint8_t *bios, unsigned int block)
@@ -158,7 +158,7 @@ int erase_block_jedec(volatile uint8_t *bios, unsigned int block)
/* wait for Toggle bit ready */
toggle_ready_jedec(bios);
- return (0);
+ return 0;
}
int erase_chip_jedec(struct flashchip *flash)
@@ -182,7 +182,7 @@ int erase_chip_jedec(struct flashchip *flash)
toggle_ready_jedec(bios);
- return (0);
+ return 0;
}
int write_page_write_jedec(volatile uint8_t *bios, uint8_t *src,
@@ -229,7 +229,7 @@ retry:
fprintf(stderr, " page %d failed!\n",
(unsigned int)(d - bios) / page_size);
}
- return (!ok);
+ return !ok;
}
int write_byte_program_jedec(volatile uint8_t *bios, uint8_t *src,
@@ -259,7 +259,7 @@ retry:
if (tried >= MAX_REFLASH_TRIES)
ok = 0;
- return (!ok);
+ return !ok;
}
int write_sector_jedec(volatile uint8_t *bios, uint8_t *src,
@@ -272,7 +272,7 @@ int write_sector_jedec(volatile uint8_t *bios, uint8_t *src,
dst++, src++;
}
- return (0);
+ return 0;
}
int write_jedec(struct flashchip *flash, uint8_t *buf)
@@ -301,5 +301,5 @@ int write_jedec(struct flashchip *flash, uint8_t *buf)
printf("\n");
protect_jedec(bios);
- return (0);
+ return 0;
}
diff --git a/util/flashrom/layout.c b/util/flashrom/layout.c
index 62715bd3f9..6f87dd6fe1 100644
--- a/util/flashrom/layout.c
+++ b/util/flashrom/layout.c
@@ -134,6 +134,7 @@ int read_romlayout(char *name)
}
fclose(romlayout);
+
return 0;
}
@@ -155,6 +156,7 @@ int find_romentry(char *name)
}
printf("not found.\n");
// Not found. Error.
+
return -1;
}
diff --git a/util/flashrom/lbtable.c b/util/flashrom/lbtable.c
index 004e61cd9d..57cc766948 100644
--- a/util/flashrom/lbtable.c
+++ b/util/flashrom/lbtable.c
@@ -44,6 +44,7 @@ static unsigned long compute_checksum(void *addr, unsigned long length)
} value;
unsigned long sum;
unsigned long i;
+
/* In the most straight forward way possible,
* compute an ip style checksum.
*/
@@ -64,6 +65,7 @@ static unsigned long compute_checksum(void *addr, unsigned long length)
}
value.byte[0] = sum & 0xff;
value.byte[1] = (sum >> 8) & 0xff;
+
return (~value.word) & 0xFFFF;
}
@@ -78,10 +80,12 @@ static int count_lb_records(struct lb_header *head)
{
struct lb_record *rec;
int count;
+
count = 0;
for_each_lbrec(head, rec) {
count++;
}
+
return count;
}
@@ -89,6 +93,7 @@ static struct lb_header *find_lb_table(void *base, unsigned long start,
unsigned long end)
{
unsigned long addr;
+
/* For now be stupid.... */
for (addr = start; addr < end; addr += 16) {
struct lb_header *head =
@@ -123,6 +128,7 @@ static struct lb_header *find_lb_table(void *base, unsigned long start,
return head;
};
+
return 0;
}
@@ -131,6 +137,7 @@ static void find_mainboard(struct lb_record *ptr, unsigned long addr)
struct lb_mainboard *rec;
int max_size;
char vendor[256], part[256];
+
rec = (struct lb_mainboard *)ptr;
max_size = rec->size - sizeof(*rec);
printf("vendor id: %.*s part id: %.*s\n",
@@ -206,5 +213,6 @@ int linuxbios_init(void)
printf("No LinuxBIOS table found.\n");
return -1;
}
+
return 0;
}
diff --git a/util/flashrom/m29f400bt.c b/util/flashrom/m29f400bt.c
index eb97591868..f409fec591 100644
--- a/util/flashrom/m29f400bt.c
+++ b/util/flashrom/m29f400bt.c
@@ -100,7 +100,7 @@ int erase_m29f400bt(struct flashchip *flash)
myusec_delay(10);
toggle_ready_jedec(bios);
- return (0);
+ return 0;
}
int block_erase_m29f400bt(volatile uint8_t *bios, volatile uint8_t *dst)
@@ -118,7 +118,7 @@ int block_erase_m29f400bt(volatile uint8_t *bios, volatile uint8_t *dst)
myusec_delay(10);
toggle_ready_jedec(bios);
- return (0);
+ return 0;
}
int write_m29f400bt(struct flashchip *flash, uint8_t *buf)
@@ -173,7 +173,7 @@ int write_m29f400bt(struct flashchip *flash, uint8_t *buf)
printf("\n");
//protect_m29f400bt (bios);
- return (0);
+ return 0;
}
int write_linuxbios_m29f400bt(struct flashchip *flash, uint8_t *buf)
@@ -215,5 +215,5 @@ int write_linuxbios_m29f400bt(struct flashchip *flash, uint8_t *buf)
printf("\n");
//protect_m29f400bt (bios);
- return (0);
+ return 0;
}
diff --git a/util/flashrom/msys_doc.c b/util/flashrom/msys_doc.c
index b91c73a115..74301da9b2 100644
--- a/util/flashrom/msys_doc.c
+++ b/util/flashrom/msys_doc.c
@@ -134,23 +134,23 @@ int probe_md2802(struct flashchip *flash)
&& id_0x55 == 0x55 && id_0xAA == 0xaa
#endif /* !MSYSTEMS_DOC_NO_55AA_CHECKING */
) {
- return (1);
+ return 1;
}
- return (0);
-} /* int probe_md2802(struct flashchip *flash) */
+ return 0;
+}
int read_md2802(struct flashchip *flash, uint8_t *buf)
{
-
- return (0);
-} /* int read_md2802(struct flashchip *flash, uint8_t *buf) */
+ return 0;
+}
int erase_md2802(struct flashchip *flash)
{
volatile uint8_t *bios = flash->virtual_memory;
- return (1);
+ return 1;
+
*(volatile uint8_t *)(bios + 0x5555) = 0xAA;
*(volatile uint8_t *)(bios + 0x2AAA) = 0x55;
*(volatile uint8_t *)(bios + 0x5555) = 0x80;
@@ -158,7 +158,7 @@ int erase_md2802(struct flashchip *flash)
*(volatile uint8_t *)(bios + 0x5555) = 0xAA;
*(volatile uint8_t *)(bios + 0x2AAA) = 0x55;
*(volatile uint8_t *)(bios + 0x5555) = 0x10;
-} /* int erase_md2802(struct flashchip *flash) */
+}
int write_md2802(struct flashchip *flash, uint8_t *buf)
{
@@ -192,6 +192,7 @@ int write_md2802(struct flashchip *flash, uint8_t *buf)
0: ready
-1: timeout expired
*/
+
static int doc_wait(volatile uint8_t *bios, int timeout)
{
int i = 20;
@@ -210,8 +211,8 @@ static int doc_wait(volatile uint8_t *bios, int timeout)
return (-1);
}
- return (0);
-} /* static int doc_wait(volatile uint8_t *bios, int timeout) */
+ return 0;
+}
static uint8_t doc_read_docstatus(volatile uint8_t *bios)
{
@@ -219,7 +220,7 @@ static uint8_t doc_read_docstatus(volatile uint8_t *bios)
doc_read_2nop(bios);
return (doc_read(bios, _DOCStatus));
-} /* static uint8_t doc_read_docstatus(volatile uint8_t *bios) */
+}
static uint8_t doc_read_chipid(volatile uint8_t *bios)
{
@@ -227,7 +228,7 @@ static uint8_t doc_read_chipid(volatile uint8_t *bios)
doc_read_2nop(bios);
return (doc_read(bios, _ChipID));
-} /* static uint8_t doc_read_chipid(volatile uint8_t *bios) */
+}
static uint8_t doc_read_cdsncontrol(volatile uint8_t *bios)
{
@@ -240,11 +241,11 @@ static uint8_t doc_read_cdsncontrol(volatile uint8_t *bios)
value = doc_read(bios, _CDSNControl);
doc_read_2nop(bios);
- return (value);
-} /* static uint8_t doc_read_chipid(volatile char *bios) */
+ return value;
+}
static void doc_write_cdsncontrol(volatile uint8_t *bios, uint8_t data)
{
doc_write(data, bios, _CDSNControl);
doc_read_4nop(bios);
-} /* static void doc_write_chipid(volatile char *bios, uint8_t data) */
+}
diff --git a/util/flashrom/mx29f002.c b/util/flashrom/mx29f002.c
index 31e924adbd..ac363efd65 100644
--- a/util/flashrom/mx29f002.c
+++ b/util/flashrom/mx29f002.c
@@ -79,7 +79,7 @@ int erase_29f002(struct flashchip *flash)
*(bios + 0x3bfff) = 0x30;
#endif
- return (0);
+ return 0;
}
int write_29f002(struct flashchip *flash, uint8_t *buf)
@@ -113,5 +113,5 @@ int write_29f002(struct flashchip *flash, uint8_t *buf)
#endif
printf("\n");
- return (0);
+ return 0;
}
diff --git a/util/flashrom/pm49fl004.c b/util/flashrom/pm49fl004.c
index 42442cfdd2..a2e22b9fc7 100644
--- a/util/flashrom/pm49fl004.c
+++ b/util/flashrom/pm49fl004.c
@@ -51,5 +51,5 @@ int write_49fl004(struct flashchip *flash, uint8_t *buf)
}
printf("\n");
- return (0);
+ return 0;
}
diff --git a/util/flashrom/sharplhf00l04.c b/util/flashrom/sharplhf00l04.c
index 1c93cc6620..86d8799ad5 100644
--- a/util/flashrom/sharplhf00l04.c
+++ b/util/flashrom/sharplhf00l04.c
@@ -77,7 +77,6 @@ int probe_lhf00l04(struct flashchip *flash)
uint8_t wait_lhf00l04(volatile uint8_t *bios)
{
-
uint8_t status;
uint8_t id1, id2;
@@ -100,9 +99,10 @@ uint8_t wait_lhf00l04(volatile uint8_t *bios)
*(volatile uint8_t *)(bios + 0x5555) = 0xAA;
*(volatile uint8_t *)(bios + 0x2AAA) = 0x55;
*(volatile uint8_t *)(bios + 0x5555) = 0xF0;
- return status;
+ return status;
}
+
int erase_lhf00l04_block(struct flashchip *flash, int offset)
{
volatile uint8_t *bios = flash->virtual_memory + offset;
@@ -128,8 +128,10 @@ int erase_lhf00l04_block(struct flashchip *flash, int offset)
status = wait_lhf00l04(flash->virtual_memory);
print_lhf00l04_status(status);
printf("DONE BLOCK 0x%x\n", offset);
- return (0);
+
+ return 0;
}
+
int erase_lhf00l04(struct flashchip *flash)
{
int i;
@@ -140,7 +142,8 @@ int erase_lhf00l04(struct flashchip *flash)
for (i = 0; i < total_size; i += flash->page_size)
erase_lhf00l04_block(flash, i);
printf("DONE ERASE\n");
- return (0);
+
+ return 0;
}
void write_page_lhf00l04(volatile uint8_t *bios, uint8_t *src,
@@ -154,7 +157,6 @@ void write_page_lhf00l04(volatile uint8_t *bios, uint8_t *src,
*dst++ = *src++;
wait_lhf00l04(bios);
}
-
}
int write_lhf00l04(struct flashchip *flash, uint8_t *buf)
@@ -178,5 +180,6 @@ int write_lhf00l04(struct flashchip *flash, uint8_t *buf)
}
printf("\n");
protect_jedec(bios);
- return (0);
+
+ return 0;
}
diff --git a/util/flashrom/sst28sf040.c b/util/flashrom/sst28sf040.c
index 80412c5fd5..7f14f49cc5 100644
--- a/util/flashrom/sst28sf040.c
+++ b/util/flashrom/sst28sf040.c
@@ -73,7 +73,7 @@ static __inline__ int erase_sector_28sf040(volatile uint8_t *bios,
/* wait for Toggle bit ready */
toggle_ready_jedec(bios);
- return (0);
+ return 0;
}
static __inline__ int write_sector_28sf040(volatile uint8_t *bios,
@@ -98,7 +98,7 @@ static __inline__ int write_sector_28sf040(volatile uint8_t *bios,
toggle_ready_jedec(bios);
}
- return (0);
+ return 0;
}
int probe_28sf040(struct flashchip *flash)
@@ -137,7 +137,7 @@ int erase_28sf040(struct flashchip *flash)
myusec_delay(10);
toggle_ready_jedec(bios);
- return (0);
+ return 0;
}
int write_28sf040(struct flashchip *flash, uint8_t *buf)
@@ -164,5 +164,5 @@ int write_28sf040(struct flashchip *flash, uint8_t *buf)
protect_28sf040(bios);
- return (0);
+ return 0;
}
diff --git a/util/flashrom/sst39sf020.c b/util/flashrom/sst39sf020.c
index bfcead6c6c..197d61259a 100644
--- a/util/flashrom/sst39sf020.c
+++ b/util/flashrom/sst39sf020.c
@@ -42,7 +42,7 @@ static __inline__ int erase_sector_39sf020(volatile uint8_t *bios,
/* wait for Toggle bit ready */
toggle_ready_jedec(bios);
- return (0);
+ return 0;
}
int write_39sf020(struct flashchip *flash, uint8_t *buf)
@@ -65,5 +65,5 @@ int write_39sf020(struct flashchip *flash, uint8_t *buf)
}
printf("\n");
- return (0);
+ return 0;
}
diff --git a/util/flashrom/sst49lf040.c b/util/flashrom/sst49lf040.c
index 884895e383..e5af5459ce 100644
--- a/util/flashrom/sst49lf040.c
+++ b/util/flashrom/sst49lf040.c
@@ -24,6 +24,7 @@
* TODO: Consilidated to standard JEDEC code.
*
*/
+
#include <stdio.h>
#include "flash.h"
@@ -39,6 +40,7 @@ int erase_49lf040(struct flashchip *flash)
* for the 49lf040. Use sector-erase instead */
erase_sector_jedec(bios, i * page_size);
}
+
return 0;
}
@@ -67,5 +69,5 @@ int write_49lf040(struct flashchip *flash, uint8_t *buf)
}
printf("\n");
- return (0);
+ return 0;
}
diff --git a/util/flashrom/sst49lfxxxc.c b/util/flashrom/sst49lfxxxc.c
index 8480877105..2ca5842d85 100644
--- a/util/flashrom/sst49lfxxxc.c
+++ b/util/flashrom/sst49lfxxxc.c
@@ -71,7 +71,7 @@ static __inline__ int write_lockbits_49lfxxxc(volatile uint8_t *bios, int size,
//printf("lockbits at address=0x%08lx is 0x%01x\n", (unsigned long)0xFFc00000 - size + address + 2, *(bios + address + 2) );
*(bios + address + 2) = bits;
- return (0);
+ return 0;
}
static __inline__ int erase_sector_49lfxxxc(volatile uint8_t *bios,
@@ -91,7 +91,7 @@ static __inline__ int erase_sector_49lfxxxc(volatile uint8_t *bios,
}
} while (!(status & STATUS_WSMS));
- return (0);
+ return 0;
}
static __inline__ int write_sector_49lfxxxc(volatile uint8_t *bios,
@@ -124,7 +124,7 @@ static __inline__ int write_sector_49lfxxxc(volatile uint8_t *bios,
} while (!(status & STATUS_WSMS));
}
- return (0);
+ return 0;
}
int probe_49lfxxxc(struct flashchip *flash)
@@ -164,7 +164,8 @@ int erase_49lfxxxc(struct flashchip *flash)
return (-1);
*bios = RESET;
- return (0);
+
+ return 0;
}
int write_49lfxxxc(struct flashchip *flash, uint8_t *buf)
@@ -189,5 +190,6 @@ int write_49lfxxxc(struct flashchip *flash, uint8_t *buf)
printf("\n");
*bios = RESET;
- return (0);
+
+ return 0;
}
diff --git a/util/flashrom/sst_fwhub.c b/util/flashrom/sst_fwhub.c
index 9e4539bf53..c7266e8d6a 100644
--- a/util/flashrom/sst_fwhub.c
+++ b/util/flashrom/sst_fwhub.c
@@ -56,7 +56,7 @@ int erase_sst_fwhub_block(struct flashchip *flash, int offset)
erase_block_jedec(flash->virtual_memory, offset);
toggle_ready_jedec(flash->virtual_memory);
- return (0);
+ return 0;
}
int erase_sst_fwhub(struct flashchip *flash)
@@ -66,7 +66,8 @@ int erase_sst_fwhub(struct flashchip *flash)
for (i = 0; i < total_size; i += flash->page_size)
erase_sst_fwhub_block(flash, i);
- return (0);
+
+ return 0;
}
int write_sst_fwhub(struct flashchip *flash, uint8_t *buf)
@@ -95,5 +96,6 @@ int write_sst_fwhub(struct flashchip *flash, uint8_t *buf)
printf("\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b");
}
printf("\n");
- return (0);
+
+ return 0;
}
diff --git a/util/flashrom/w49f002u.c b/util/flashrom/w49f002u.c
index 66111fd0aa..9d4d5c1553 100644
--- a/util/flashrom/w49f002u.c
+++ b/util/flashrom/w49f002u.c
@@ -49,5 +49,5 @@ int write_49f002(struct flashchip *flash, uint8_t *buf)
}
printf("\n");
- return (0);
+ return 0;
}