summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2009-06-23 00:47:26 +0000
committerCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2009-06-23 00:47:26 +0000
commit2c7ba8ce706da91e31d53b3c4fdc43d91ce0a2cf (patch)
tree14b71fb60b594042acd47637b7e68f9043c901ff
parent452b3e37856b2bb984fabc09706a8ca8a954ef6c (diff)
downloadflashrom-2c7ba8ce706da91e31d53b3c4fdc43d91ce0a2cf.tar.gz
flashrom-2c7ba8ce706da91e31d53b3c4fdc43d91ce0a2cf.tar.bz2
flashrom-2c7ba8ce706da91e31d53b3c4fdc43d91ce0a2cf.zip
SB600 SPI: Kill unused variable
Make a few local functions in sb600spi.c static. Corresponding to flashrom svn r623. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Luc Verhaegen <libv@skynet.be>
-rw-r--r--sb600spi.c31
1 files changed, 15 insertions, 16 deletions
diff --git a/sb600spi.c b/sb600spi.c
index f4f3492ea..4ca905bec 100644
--- a/sb600spi.c
+++ b/sb600spi.c
@@ -25,18 +25,19 @@
#include "flash.h"
#include "spi.h"
-struct sb600_spi_controller {
- unsigned int spi_cntrl0; /* 00h */
- unsigned int restrictedcmd1; /* 04h */
- unsigned int restrictedcmd2; /* 08h */
- unsigned int spi_cntrl1; /* 0ch */
- unsigned int spi_cmdvalue0; /* 10h */
- unsigned int spi_cmdvalue1; /* 14h */
- unsigned int spi_cmdvalue2; /* 18h */
- unsigned int spi_fakeid; /* 1Ch */
-};
-
-struct sb600_spi_controller *spi_bar = NULL;
+/* This struct is unused, but helps visualize the SB600 SPI BAR layout.
+ *struct sb600_spi_controller {
+ * unsigned int spi_cntrl0; / * 00h * /
+ * unsigned int restrictedcmd1; / * 04h * /
+ * unsigned int restrictedcmd2; / * 08h * /
+ * unsigned int spi_cntrl1; / * 0ch * /
+ * unsigned int spi_cmdvalue0; / * 10h * /
+ * unsigned int spi_cmdvalue1; / * 14h * /
+ * unsigned int spi_cmdvalue2; / * 18h * /
+ * unsigned int spi_fakeid; / * 1Ch * /
+ *};
+ */
+
uint8_t *sb600_spibar;
int sb600_spi_read(struct flashchip *flash, uint8_t *buf, int start, int len)
@@ -86,7 +87,7 @@ int sb600_spi_write_1(struct flashchip *flash, uint8_t *buf)
return rc;
}
-void reset_internal_fifo_pointer(void)
+static void reset_internal_fifo_pointer(void)
{
mmio_writeb(mmio_readb(sb600_spibar + 2) | 0x10, sb600_spibar + 2);
@@ -94,7 +95,7 @@ void reset_internal_fifo_pointer(void)
printf("reset\n");
}
-void execute_command(void)
+static void execute_command(void)
{
mmio_writeb(mmio_readb(sb600_spibar + 2) | 1, sb600_spibar + 2);
@@ -111,8 +112,6 @@ int sb600_spi_command(unsigned int writecnt, unsigned int readcnt,
writecnt--;
- spi_bar = (struct sb600_spi_controller *) sb600_spibar;
-
printf_debug("%s, cmd=%x, writecnt=%x, readcnt=%x\n",
__func__, cmd, writecnt, readcnt);