summaryrefslogtreecommitdiffstats
path: root/spi25.c
diff options
context:
space:
mode:
authorCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2011-12-20 00:19:29 +0000
committerCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2011-12-20 00:19:29 +0000
commitc40cff7b86848f5b248d7fcf20f7d517b60c385d (patch)
tree7f9db61c7b4868e513c4702cfe57bb35ae695266 /spi25.c
parent8a3c60cdd0e5632173567923ae1927763e31e857 (diff)
downloadast2050-flashrom-c40cff7b86848f5b248d7fcf20f7d517b60c385d.zip
ast2050-flashrom-c40cff7b86848f5b248d7fcf20f7d517b60c385d.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. Corresponding to flashrom svn r1475. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Diffstat (limited to 'spi25.c')
-rw-r--r--spi25.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/spi25.c b/spi25.c
index 1e3bed9..3ce7f08 100644
--- a/spi25.c
+++ b/spi25.c
@@ -179,7 +179,7 @@ int probe_spi_rdid4(struct flashctx *flash)
/* Some SPI controllers do not support commands with writecnt=1 and
* readcnt=4.
*/
- switch (spi_programmer->type) {
+ switch (flash->pgm->spi.type) {
#if CONFIG_INTERNAL == 1
#if defined(__i386__) || defined(__x86_64__)
case SPI_CONTROLLER_IT87XX:
@@ -1120,7 +1120,7 @@ int spi_aai_write(struct flashctx *flash, uint8_t *buf, unsigned int start,
.readarr = NULL,
}};
- switch (spi_programmer->type) {
+ switch (flash->pgm->spi.type) {
#if CONFIG_INTERNAL == 1
#if defined(__i386__) || defined(__x86_64__)
case SPI_CONTROLLER_IT87XX:
OpenPOWER on IntegriCloud