Edward O'Callaghan has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/72782 )
Change subject: migrate register_par_master() ......................................................................
migrate register_par_master()
Change-Id: I3781dda4cbd7d07c350a1de47a7a8186ca3912f0 Signed-off-by: Edward O'Callaghan quasisec@google.com --- M atahpt.c M atapromise.c M atavia.c M drkaiser.c M dummyflasher.c M gfxnvidia.c M include/programmer.h M internal.c M it8212.c M nic3com.c M nicintel.c M nicnatsemi.c M nicrealtek.c M parallel.c M satamv.c M satasii.c M serprog.c 17 files changed, 27 insertions(+), 17 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/82/72782/1
diff --git a/atahpt.c b/atahpt.c index 990338f..8283c40 100644 --- a/atahpt.c +++ b/atahpt.c @@ -106,7 +106,7 @@ data->flash_access = pci_read_long(dev, REG_FLASH_ACCESS); pci_write_long(dev, REG_FLASH_ACCESS, data->flash_access | BIT_FLASH_ACCESS);
- return register_par_master(&par_master_atahpt, BUS_PARALLEL, data); + return register_par_master(flashprog, &par_master_atahpt, BUS_PARALLEL, data); }
const struct programmer_entry programmer_atahpt = { diff --git a/atapromise.c b/atapromise.c index 5218f62..fe97b69 100644 --- a/atapromise.c +++ b/atapromise.c @@ -170,7 +170,7 @@ data->rom_size = rom_size;
max_rom_decode.parallel = rom_size; - return register_par_master(&par_master_atapromise, BUS_PARALLEL, data); + return register_par_master(flashprog, &par_master_atapromise, BUS_PARALLEL, data); }
const struct programmer_entry programmer_atapromise = { diff --git a/atavia.c b/atavia.c index 460f1a1..bc38cc0 100644 --- a/atavia.c +++ b/atavia.c @@ -176,7 +176,7 @@ return 1; }
- return register_par_master(&lpc_master_atavia, BUS_LPC, NULL); + return register_par_master(flashprog, &lpc_master_atavia, BUS_LPC, NULL); }
const struct programmer_entry programmer_atavia = { diff --git a/drkaiser.c b/drkaiser.c index 28684d2..96178fc 100644 --- a/drkaiser.c +++ b/drkaiser.c @@ -108,7 +108,7 @@
max_rom_decode.parallel = 128 * 1024;
- return register_par_master(&par_master_drkaiser, BUS_PARALLEL, data); + return register_par_master(flashprog, &par_master_drkaiser, BUS_PARALLEL, data); }
const struct programmer_entry programmer_drkaiser = { diff --git a/dummyflasher.c b/dummyflasher.c index 8e97e4a..bd4b94a 100644 --- a/dummyflasher.c +++ b/dummyflasher.c @@ -1420,7 +1420,7 @@ if (dummy_buses_supported & BUS_PROG) ret |= register_opaque_master(flashprog, &opaque_master_dummyflasher, data); if (dummy_buses_supported & BUS_NONSPI) - ret |= register_par_master(&par_master_dummyflasher, + ret |= register_par_master(flashprog, &par_master_dummyflasher, dummy_buses_supported & BUS_NONSPI, data); if (dummy_buses_supported & BUS_SPI) diff --git a/gfxnvidia.c b/gfxnvidia.c index 8ea76cc..24063d4 100644 --- a/gfxnvidia.c +++ b/gfxnvidia.c @@ -136,7 +136,7 @@
/* Write/erase doesn't work. */ programmer_may_write = false; - return register_par_master(&par_master_gfxnvidia, BUS_PARALLEL, data); + return register_par_master(flashprog, &par_master_gfxnvidia, BUS_PARALLEL, data); }
const struct programmer_entry programmer_gfxnvidia = { diff --git a/include/programmer.h b/include/programmer.h index eb8eae9..4821689 100644 --- a/include/programmer.h +++ b/include/programmer.h @@ -440,7 +440,7 @@ void (*delay) (const struct flashctx *flash, unsigned int usecs); void *data; }; -int register_par_master(const struct par_master *mst, const enum chipbustype buses, void *data); +int register_par_master(struct flashrom_programmer *flashprog, const struct par_master *mst, const enum chipbustype buses, void *data);
/* programmer.c */ struct registered_master { diff --git a/internal.c b/internal.c index 4dd8559..654f696 100644 --- a/internal.c +++ b/internal.c @@ -280,7 +280,7 @@ #endif
if (internal_buses_supported & BUS_NONSPI) - register_par_master(&par_master_internal, internal_buses_supported, NULL); + register_par_master(flashprog, &par_master_internal, internal_buses_supported, NULL);
/* Report if a non-whitelisted laptop is detected that likely uses a legacy bus. */ if (is_laptop && !laptop_ok) { diff --git a/it8212.c b/it8212.c index 00688b6..9e1a9c4 100644 --- a/it8212.c +++ b/it8212.c @@ -98,7 +98,7 @@ pci_write_long(dev, PCI_ROM_ADDRESS, io_base_addr | 0x01);
max_rom_decode.parallel = IT8212_MEMMAP_SIZE; - return register_par_master(&par_master_it8212, BUS_PARALLEL, data); + return register_par_master(flashprog, &par_master_it8212, BUS_PARALLEL, data); } const struct programmer_entry programmer_it8212 = { .name = "it8212", diff --git a/nic3com.c b/nic3com.c index 4703073..9c24f3c 100644 --- a/nic3com.c +++ b/nic3com.c @@ -144,7 +144,7 @@
max_rom_decode.parallel = 128 * 1024;
- return register_par_master(&par_master_nic3com, BUS_PARALLEL, data); + return register_par_master(flashprog, &par_master_nic3com, BUS_PARALLEL, data);
init_err_cleanup_exit: /* 3COM 3C90xB cards need a special fixup. */ diff --git a/nicintel.c b/nicintel.c index fed3cfb..0940d39 100644 --- a/nicintel.c +++ b/nicintel.c @@ -119,7 +119,7 @@ data->nicintel_control_bar = control_bar;
max_rom_decode.parallel = NICINTEL_MEMMAP_SIZE; - return register_par_master(&par_master_nicintel, BUS_PARALLEL, data); + return register_par_master(flashprog, &par_master_nicintel, BUS_PARALLEL, data); }
const struct programmer_entry programmer_nicintel = { diff --git a/nicnatsemi.c b/nicnatsemi.c index 46e28ea..3455ee5 100644 --- a/nicnatsemi.c +++ b/nicnatsemi.c @@ -112,7 +112,7 @@ * functions below wants to be 0x0000FFFF. */ max_rom_decode.parallel = 131072; - return register_par_master(&par_master_nicnatsemi, BUS_PARALLEL, data); + return register_par_master(flashprog, &par_master_nicnatsemi, BUS_PARALLEL, data); }
diff --git a/nicrealtek.c b/nicrealtek.c index fdda5ad..25f0fa0 100644 --- a/nicrealtek.c +++ b/nicrealtek.c @@ -132,7 +132,7 @@ data->bios_rom_addr = bios_rom_addr; data->bios_rom_data = bios_rom_data;
- return register_par_master(&par_master_nicrealtek, BUS_PARALLEL, data); + return register_par_master(flashprog, &par_master_nicrealtek, BUS_PARALLEL, data); }
const struct programmer_entry programmer_nicrealtek = { diff --git a/parallel.c b/parallel.c index b193723..ce0749d 100644 --- a/parallel.c +++ b/parallel.c @@ -126,7 +126,7 @@ fallback_chip_readn(flash, buf, addr, len); }
-int register_par_master(const struct par_master *mst, +int register_par_master(struct flashrom_programmer *flashprog, const struct par_master *mst, const enum chipbustype buses, void *data) { diff --git a/satamv.c b/satamv.c index 53edb8a..8bb92ee 100644 --- a/satamv.c +++ b/satamv.c @@ -197,7 +197,7 @@ /* 512 kByte with two 8-bit latches, and * 4 MByte with additional 3-bit latch. */ max_rom_decode.parallel = 4 * 1024 * 1024; - return register_par_master(&par_master_satamv, BUS_PARALLEL, data); + return register_par_master(flashprog, &par_master_satamv, BUS_PARALLEL, data); }
const struct programmer_entry programmer_satamv = { diff --git a/satasii.c b/satasii.c index f982281..214d4c9 100644 --- a/satasii.c +++ b/satasii.c @@ -140,7 +140,7 @@ } data->bar = bar;
- return register_par_master(&par_master_satasii, BUS_PARALLEL, data); + return register_par_master(flashprog, &par_master_satasii, BUS_PARALLEL, data); } const struct programmer_entry programmer_satasii = { .name = "satasii", diff --git a/serprog.c b/serprog.c index 2b1b7f1..8f9e09d 100644 --- a/serprog.c +++ b/serprog.c @@ -952,7 +952,7 @@ if (serprog_buses_supported & BUS_SPI) register_spi_master(&spi_master_serprog, NULL); if (serprog_buses_supported & BUS_NONSPI) - register_par_master(&par_master_serprog, serprog_buses_supported & BUS_NONSPI, NULL); + register_par_master(flashprog, &par_master_serprog, serprog_buses_supported & BUS_NONSPI, NULL); return 0;
init_err_cleanup_exit: