[flashrom] [commit] r1866 - trunk
repository service
svn at flashrom.org
Sat Jan 10 10:33:07 CET 2015
Author: stefanct
Date: Sat Jan 10 10:33:06 2015
New Revision: 1866
URL: http://flashrom.org/trac/flashrom/changeset/1866
Log:
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.
Signed-off-by: Stefan Tauner <stefan.tauner at alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner at alumni.tuwien.ac.at>
Modified:
trunk/Makefile
trunk/README
trunk/hwaccess.h
trunk/nicintel_eeprom.c
Modified: trunk/Makefile
==============================================================================
--- trunk/Makefile Sat Jan 10 10:33:00 2015 (r1865)
+++ trunk/Makefile Sat Jan 10 10:33:06 2015 (r1866)
@@ -111,8 +111,8 @@
endif
ifeq ($(TARGET_OS), DragonFlyBSD)
-CPPFLAGS += -I/usr/pkg/include
-LDFLAGS += -L/usr/pkg/lib
+CPPFLAGS += -I/usr/local/include
+LDFLAGS += -L/usr/local/lib
endif
ifeq ($(TARGET_OS), DOS)
@@ -815,7 +815,7 @@
define LIBPCI_TEST
/* Avoid a failing test due to libpci header symbol shadowing breakage */
#define index shadow_workaround_index
-#if !defined __NetBSD__ && !defined __DragonFly__
+#if !defined __NetBSD__
#include <pci/pci.h>
#else
#include <pciutils/pci.h>
Modified: trunk/README
==============================================================================
--- trunk/README Sat Jan 10 10:33:00 2015 (r1865)
+++ trunk/README Sat Jan 10 10:33:06 2015 (r1866)
@@ -68,7 +68,7 @@
make
-To compile on FreeBSD, use:
+To compile on FreeBSD, OpenBSD or DragonFly BSD, use:
gmake
@@ -80,11 +80,7 @@
gmake LDFLAGS="-L$pathtolibpci" CC="gcc -I$pathtopciheaders" CFLAGS=-O2
-To compile on NetBSD or DragonFly BSD (with pciutils, libftdi, libusb installed in /usr/pkg/), use:
-
- gmake
-
-To compile on OpenBSD, use:
+To compile on NetBSD (with pciutils, libftdi, libusb installed in /usr/pkg/), use:
gmake
Modified: trunk/hwaccess.h
==============================================================================
--- trunk/hwaccess.h Sat Jan 10 10:33:00 2015 (r1865)
+++ trunk/hwaccess.h Sat Jan 10 10:33:06 2015 (r1866)
@@ -40,7 +40,7 @@
*/
#define index shadow_workaround_index
-#if !defined (__NetBSD__) && !defined (__DragonFly__)
+#if !defined (__NetBSD__)
#include <pci/pci.h>
#else
#include <pciutils/pci.h>
Modified: trunk/nicintel_eeprom.c
==============================================================================
--- trunk/nicintel_eeprom.c Sat Jan 10 10:33:00 2015 (r1865)
+++ trunk/nicintel_eeprom.c Sat Jan 10 10:33:06 2015 (r1866)
@@ -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 @@
}
}
- 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 @@
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);
More information about the flashrom
mailing list