From c40cff7b86848f5b248d7fcf20f7d517b60c385d Mon Sep 17 00:00:00 2001 From: Carl-Daniel Hailfinger Date: Tue, 20 Dec 2011 00:19:29 +0000 Subject: 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 Acked-by: Michael Karcher --- nicintel_spi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'nicintel_spi.c') diff --git a/nicintel_spi.c b/nicintel_spi.c index aacd68c..f9432ec 100644 --- a/nicintel_spi.c +++ b/nicintel_spi.c @@ -137,6 +137,7 @@ static const struct bitbang_spi_master bitbang_spi_master_nicintel = { .get_miso = nicintel_bitbang_get_miso, .request_bus = nicintel_request_spibus, .release_bus = nicintel_release_spibus, + .half_period = 1, }; static int nicintel_spi_shutdown(void *data) @@ -181,8 +182,7 @@ int nicintel_spi_init(void) if (register_shutdown(nicintel_spi_shutdown, NULL)) return 1; - /* 1 usec halfperiod delay for now. */ - if (bitbang_spi_init(&bitbang_spi_master_nicintel, 1)) + if (bitbang_spi_init(&bitbang_spi_master_nicintel)) return 1; return 0; -- cgit v1.1