summaryrefslogtreecommitdiffstats
path: root/nicintel_eeprom.c
diff options
context:
space:
mode:
authorStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>2015-01-10 09:33:06 +0000
committerStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>2015-01-10 09:33:06 +0000
commit8d21ff1d63e9ce1039fb1cba978e26ecbaec492d (patch)
tree26e086e92fa8e798bbbd660b5a8c0bc2ecb47209 /nicintel_eeprom.c
parent4c32af89998df9cae2a20d50e219c195070b012f (diff)
downloadast2050-flashrom-8d21ff1d63e9ce1039fb1cba978e26ecbaec492d.zip
ast2050-flashrom-8d21ff1d63e9ce1039fb1cba978e26ecbaec492d.tar.gz
Refinements for DragonflyBSD
- /usr/include/cpu/param.h defines PAGE_MASK already, hence use another name for the respective macro in nicintel_eeprom.c. - Since DragonflyBSD 3.6 DPorts is used as the default package manager. Therefore we should use /usr/local/ instead of /usr/pkg/ on default to fetch libraries. Corresponding to flashrom svn r1866. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Diffstat (limited to 'nicintel_eeprom.c')
-rw-r--r--nicintel_eeprom.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/nicintel_eeprom.c b/nicintel_eeprom.c
index 44bc773..7597cca 100644
--- a/nicintel_eeprom.c
+++ b/nicintel_eeprom.c
@@ -57,7 +57,7 @@
#define EERD_DATA 16
#define BIT(x) (1<<x)
-#define PAGE_MASK 0x3f
+#define EE_PAGE_MASK 0x3f
static uint8_t *nicintel_eebar;
static struct pci_dev *nicintel_pci;
@@ -94,11 +94,11 @@ static int nicintel_ee_probe(struct flashctx *flash)
}
}
- flash->chip->page_size = PAGE_MASK + 1;
+ flash->chip->page_size = EE_PAGE_MASK + 1;
flash->chip->tested = TEST_OK_PREW;
flash->chip->gran = write_gran_1byte_implicit_erase;
- flash->chip->block_erasers->eraseblocks[0].size = (PAGE_MASK + 1);
- flash->chip->block_erasers->eraseblocks[0].count = (flash->chip->total_size * 1024) / (PAGE_MASK + 1);
+ flash->chip->block_erasers->eraseblocks[0].size = (EE_PAGE_MASK + 1);
+ flash->chip->block_erasers->eraseblocks[0].count = (flash->chip->total_size * 1024) / (EE_PAGE_MASK + 1);
return 1;
}
@@ -249,7 +249,7 @@ static int nicintel_ee_write(struct flashctx *flash, const uint8_t *buf, unsigne
nicintel_ee_bitbang((buf) ? *buf++ : 0xff, NULL);
len--;
addr++;
- if (!(addr & PAGE_MASK))
+ if (!(addr & EE_PAGE_MASK))
break;
}
nicintel_ee_bitset(EEC, EE_CS, 1);
OpenPOWER on IntegriCloud