mirror of
https://review.coreboot.org/flashrom.git
synced 2025-07-01 22:21:16 +02:00
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>
This commit is contained in:
@ -98,6 +98,7 @@ static const struct bitbang_spi_master bitbang_spi_master_mcp6x = {
|
||||
.get_miso = mcp6x_bitbang_get_miso,
|
||||
.request_bus = mcp6x_request_spibus,
|
||||
.release_bus = mcp6x_release_spibus,
|
||||
.half_period = 0,
|
||||
};
|
||||
|
||||
int mcp6x_spi_init(int want_spi)
|
||||
@ -159,8 +160,7 @@ int mcp6x_spi_init(int want_spi)
|
||||
(status >> MCP6X_SPI_GRANT) & 0x1);
|
||||
mcp_gpiostate = status & 0xff;
|
||||
|
||||
/* Zero halfperiod delay. */
|
||||
if (bitbang_spi_init(&bitbang_spi_master_mcp6x, 0)) {
|
||||
if (bitbang_spi_init(&bitbang_spi_master_mcp6x)) {
|
||||
/* This should never happen. */
|
||||
msg_perr("MCP6X bitbang SPI master init failed!\n");
|
||||
return 1;
|
||||
|
Reference in New Issue
Block a user