diff options
author | hailfinger <hailfinger@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1> | 2009-08-12 13:32:56 +0000 |
---|---|---|
committer | hailfinger <hailfinger@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1> | 2009-08-12 13:32:56 +0000 |
commit | 3d303fd7d7c672976834b084c22cb52a99afb4d7 (patch) | |
tree | 07d03ad8b91541f09b13ac709ef85e93cbc339ca /it87spi.c | |
parent | 7c6fee75f5ada829230b1cb4570c6f35029ac49e (diff) | |
download | flashrom-3d303fd7d7c672976834b084c22cb52a99afb4d7.tar.gz |
Use a common parameter variable for all programmers. This allows us to
reduce #ifdef clauses a lot if we compile out some programmers
completely.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@679 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'it87spi.c')
-rw-r--r-- | it87spi.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -31,7 +31,6 @@ #define ITE_SUPERIO_PORT1 0x2e #define ITE_SUPERIO_PORT2 0x4e -char *it87opts = NULL; uint16_t it8716f_flashport = 0; /* use fast 33MHz SPI (<>0) or slow 16MHz (0) */ int fast_spi = 1; @@ -95,11 +94,11 @@ static uint16_t find_ite_spi_flash_port(uint16_t port) flashport = sio_read(port, 0x64) << 8; flashport |= sio_read(port, 0x65); printf("Serial flash port 0x%04x\n", flashport); - if (it87opts && !strlen(it87opts)) { - free(it87opts); - it87opts = NULL; + if (programmer_param && !strlen(programmer_param)) { + free(programmer_param); + programmer_param = NULL; } - if (it87opts && (portpos = strstr(it87opts, "port="))) { + if (programmer_param && (portpos = strstr(programmer_param, "port="))) { portpos += 5; flashport = strtol(portpos, (char **)NULL, 0); printf("Forcing serial flash port 0x%04x\n", flashport); |