summaryrefslogtreecommitdiff
path: root/rayer_spi.c
diff options
context:
space:
mode:
authorhailfinger <hailfinger@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1>2011-12-20 00:19:29 +0000
committerhailfinger <hailfinger@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1>2011-12-20 00:19:29 +0000
commitee3862fe86e592fd3eeae182a38cbdb3f42f7bd5 (patch)
tree7f9db61c7b4868e513c4702cfe57bb35ae695266 /rayer_spi.c
parente8c818e1cd78e69a3cb2ad9785a48a858f34415c (diff)
downloadflashrom-ee3862fe86e592fd3eeae182a38cbdb3f42f7bd5.tar.gz
Have all programmer init functions register bus masters/programmers
All programmer types (Parallel, SPI, Opaque) now register themselves into a generic programmer list and probing is now programmer-centric instead of chip-centric. Registering multiple SPI/... masters at the same time is now possible without any problems. Handling multiple flash chips is still unchanged, but now we have the infrastructure to deal with "dual BIOS" and "one flash behind southbridge and one flash behind EC" sanely. A nice side effect is that this patch kills quite a few global variables and improves the situation for libflashrom. Hint for developers: struct {spi,par,opaque}_programmer now have a void *data pointer to store any additional programmer-specific data, e.g. hardware configuration info. Note: flashrom -f -c FOO -r forced_read.bin does not work anymore. We have to find an architecturally clean way to solve this. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1475 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'rayer_spi.c')
-rw-r--r--rayer_spi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/rayer_spi.c b/rayer_spi.c
index 417fde9..0011bc0 100644
--- a/rayer_spi.c
+++ b/rayer_spi.c
@@ -92,6 +92,7 @@ static const struct bitbang_spi_master bitbang_spi_master_rayer = {
.set_sck = rayer_bitbang_set_sck,
.set_mosi = rayer_bitbang_set_mosi,
.get_miso = rayer_bitbang_get_miso,
+ .half_period = 0,
};
int rayer_spi_init(void)
@@ -171,8 +172,7 @@ int rayer_spi_init(void)
/* Get the initial value before writing to any line. */
lpt_outbyte = INB(lpt_iobase);
- /* Zero halfperiod delay. */
- if (bitbang_spi_init(&bitbang_spi_master_rayer, 0))
+ if (bitbang_spi_init(&bitbang_spi_master_rayer))
return 1;
return 0;