Author: stefanct Date: Sat Aug 25 04:07:20 2012 New Revision: 1580 URL: http://flashrom.org/trac/flashrom/changeset/1580
Log: Clean up satasii.c.
Signed-off-by: Stefan Tauner stefan.tauner@student.tuwien.ac.at Acked-by: Stefan Tauner stefan.tauner@student.tuwien.ac.at
Modified: trunk/satasii.c
Modified: trunk/satasii.c ============================================================================== --- trunk/satasii.c Sat Aug 25 03:17:58 2012 (r1579) +++ trunk/satasii.c Sat Aug 25 04:07:20 2012 (r1580) @@ -20,8 +20,6 @@
/* Datasheets can be found on http://www.siliconimage.com. Great thanks! */
-#include <stdlib.h> -#include "flash.h" #include "programmer.h" #include "hwaccess.h"
@@ -29,7 +27,7 @@
#define SATASII_MEMMAP_SIZE 0x100
-uint8_t *sii_bar; +static uint8_t *sii_bar; static uint16_t id;
const struct pcidev_status satas_sii[] = { @@ -43,10 +41,8 @@ {}, };
-static void satasii_chip_writeb(const struct flashctx *flash, uint8_t val, - chipaddr addr); -static uint8_t satasii_chip_readb(const struct flashctx *flash, - const chipaddr addr); +static void satasii_chip_writeb(const struct flashctx *flash, uint8_t val, chipaddr addr); +static uint8_t satasii_chip_readb(const struct flashctx *flash, const chipaddr addr); static const struct par_programmer par_programmer_satasii = { .chip_readb = satasii_chip_readb, .chip_readw = fallback_chip_readw, @@ -85,8 +81,7 @@ reg_offset = 0x50; }
- sii_bar = physmap("SATA SIL registers", addr, SATASII_MEMMAP_SIZE) + - reg_offset; + sii_bar = physmap("SATA SiI registers", addr, SATASII_MEMMAP_SIZE) + reg_offset;
/* Check if ROM cycle are OK. */ if ((id != 0x0680) && (!(pci_mmio_readl(sii_bar) & (1 << 26)))) @@ -100,8 +95,7 @@ return 0; }
-static void satasii_chip_writeb(const struct flashctx *flash, uint8_t val, - chipaddr addr) +static void satasii_chip_writeb(const struct flashctx *flash, uint8_t val, chipaddr addr) { uint32_t ctrl_reg, data_reg;
@@ -118,8 +112,7 @@ while (pci_mmio_readl(sii_bar) & (1 << 25)) ; }
-static uint8_t satasii_chip_readb(const struct flashctx *flash, - const chipaddr addr) +static uint8_t satasii_chip_readb(const struct flashctx *flash, const chipaddr addr) { uint32_t ctrl_reg;