summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2009-08-09 12:44:08 +0000
committerCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2009-08-09 12:44:08 +0000
commitbe726817f770572f4d950c7e572c308112a69e3b (patch)
treef6c67448c4b98b1f49e89826f451f51de027b1e5
parent5b2f52fa6caab4bda5aaf8b6128eb3044a930c47 (diff)
downloadast2050-flashrom-be726817f770572f4d950c7e572c308112a69e3b.zip
ast2050-flashrom-be726817f770572f4d950c7e572c308112a69e3b.tar.gz
Remove unnecessary #include files
Serprog compilation is now controlled by a Makefile variable. Replace munmap with physunmap where appropriate. Corresponding to flashrom svn r671. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Stefan Reinauer <stepan@coresystems.de>
-rw-r--r--Makefile2
-rw-r--r--cbtable.c3
-rw-r--r--chipset_enable.c3
-rw-r--r--dummyflasher.c3
-rw-r--r--ichspi.c1
-rw-r--r--pcidev.c3
-rw-r--r--sb600spi.c1
-rw-r--r--serprog.c2
-rw-r--r--sst49lfxxxc.c3
9 files changed, 3 insertions, 18 deletions
diff --git a/Makefile b/Makefile
index ee5e9ca..d7fb071 100644
--- a/Makefile
+++ b/Makefile
@@ -68,6 +68,8 @@ $(PROGRAM): $(OBJS)
$(CC) $(LDFLAGS) -o $(PROGRAM) $(OBJS) $(LIBS) $(FEATURE_LIBS)
FEATURE_CFLAGS = $(shell LC_ALL=C grep -q "FTDISUPPORT := yes" .features && printf "%s" "-D'FT2232_SPI_SUPPORT=1'")
+# Always enable serprog for now. Needs to be disabled on Windows.
+FEATURE_CFLAGS += -D'SERPROG_SUPPORT=1'
FEATURE_LIBS = $(shell LC_ALL=C grep -q "FTDISUPPORT := yes" .features && printf "%s" "-lftdi")
diff --git a/cbtable.c b/cbtable.c
index 10fe494..9d7e758 100644
--- a/cbtable.c
+++ b/cbtable.c
@@ -22,11 +22,8 @@
*/
#include <stdlib.h>
-#include <fcntl.h>
#include <sys/types.h>
#include <string.h>
-#include <errno.h>
-#include <sys/mman.h>
#include "flash.h"
#include "coreboot_tables.h"
diff --git a/chipset_enable.c b/chipset_enable.c
index 6452f82..b859be8 100644
--- a/chipset_enable.c
+++ b/chipset_enable.c
@@ -29,7 +29,6 @@
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
-#include <sys/mman.h>
#include <fcntl.h>
#include "flash.h"
@@ -968,7 +967,7 @@ static int get_flashbase_sc520(struct pci_dev *dev, const char *name)
}
/* 4. Clean up */
- munmap(mmcr, getpagesize());
+ physunmap(mmcr, getpagesize());
return 0;
}
diff --git a/dummyflasher.c b/dummyflasher.c
index 1b51032..4cd9658 100644
--- a/dummyflasher.c
+++ b/dummyflasher.c
@@ -21,10 +21,7 @@
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
-#include <fcntl.h>
#include <sys/types.h>
-#include <sys/stat.h>
-#include <errno.h>
#include "flash.h"
char *dummytype = NULL;
diff --git a/ichspi.c b/ichspi.c
index 5d2e40f..831dd9d 100644
--- a/ichspi.c
+++ b/ichspi.c
@@ -33,7 +33,6 @@
*/
#include <string.h>
-#include <sys/mman.h>
#include "flash.h"
#include "spi.h"
diff --git a/pcidev.c b/pcidev.c
index bc8dbc7..1de2bf5 100644
--- a/pcidev.c
+++ b/pcidev.c
@@ -20,10 +20,7 @@
#include <stdlib.h>
#include <string.h>
-#include <fcntl.h>
#include <sys/types.h>
-#include <sys/stat.h>
-#include <errno.h>
#include "flash.h"
uint32_t io_base_addr;
diff --git a/sb600spi.c b/sb600spi.c
index 2088b08..5f2cf98 100644
--- a/sb600spi.c
+++ b/sb600spi.c
@@ -21,7 +21,6 @@
*/
#include <string.h>
-#include <sys/mman.h>
#include "flash.h"
#include "spi.h"
diff --git a/serprog.c b/serprog.c
index 81ef130..04e15a8 100644
--- a/serprog.c
+++ b/serprog.c
@@ -39,8 +39,6 @@
char *serprog_param = NULL;
-#define SERPROG_SUPPORT 1
-
#if SERPROG_SUPPORT == 1
#define MSGHEADER "serprog:"
diff --git a/sst49lfxxxc.c b/sst49lfxxxc.c
index 3c4405d..848ccde 100644
--- a/sst49lfxxxc.c
+++ b/sst49lfxxxc.c
@@ -19,9 +19,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <errno.h>
-#include <fcntl.h>
-#include <sys/mman.h>
#include <stdlib.h>
#include "flash.h"
OpenPOWER on IntegriCloud