summaryrefslogtreecommitdiffstats
path: root/nicintel.c
diff options
context:
space:
mode:
authorCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2011-11-09 23:40:00 +0000
committerCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2011-11-09 23:40:00 +0000
commiteaacd2d4e7485d747e4e0bbd54b7bb44cf3fd179 (patch)
tree5e023363074cbe351bc6ded9f20c3f116e6c6f1c /nicintel.c
parentf382e352ac63108ec0f912ff52b538c99f46c340 (diff)
downloadflashrom-eaacd2d4e7485d747e4e0bbd54b7bb44cf3fd179.tar.gz
flashrom-eaacd2d4e7485d747e4e0bbd54b7bb44cf3fd179.tar.bz2
flashrom-eaacd2d4e7485d747e4e0bbd54b7bb44cf3fd179.zip
Register Parallel/LPC/FWH programmers the same way SPI programmers are registered
All programmers are now calling programmer registration functions and direct manipulations of buses_supported are not needed/possible anymore. Note: Programmers without parallel/LPC/FWH chip support should not call register_par_programmer(). Additional fixes: Set max_rom_decode.parallel for drkaiser. Remove abuse of programmer_map_flash_region in it85spi. Annotate several FIXMEs in it85spi. Corresponding to flashrom svn r1463. 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 'nicintel.c')
-rw-r--r--nicintel.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/nicintel.c b/nicintel.c
index f94cbc95f..b20f85637 100644
--- a/nicintel.c
+++ b/nicintel.c
@@ -43,6 +43,17 @@ const struct pcidev_status nics_intel[] = {
#define CSR_FCR 0x0c
+static const struct par_programmer par_programmer_nicintel = {
+ .chip_readb = nicintel_chip_readb,
+ .chip_readw = fallback_chip_readw,
+ .chip_readl = fallback_chip_readl,
+ .chip_readn = fallback_chip_readn,
+ .chip_writeb = nicintel_chip_writeb,
+ .chip_writew = fallback_chip_writew,
+ .chip_writel = fallback_chip_writel,
+ .chip_writen = fallback_chip_writen,
+};
+
static int nicintel_shutdown(void *data)
{
physunmap(nicintel_control_bar, NICINTEL_CONTROL_MEMMAP_SIZE);
@@ -93,9 +104,8 @@ int nicintel_init(void)
*/
pci_rmmio_writew(0x0001, nicintel_control_bar + CSR_FCR);
- buses_supported = BUS_PARALLEL;
-
max_rom_decode.parallel = NICINTEL_MEMMAP_SIZE;
+ register_par_programmer(&par_programmer_nicintel, BUS_PARALLEL);
return 0;