Commit be726817 authored by Carl-Daniel Hailfinger's avatar Carl-Daniel Hailfinger
Browse files

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: default avatarCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: default avatarStefan Reinauer <stepan@coresystems.de>
parent 5b2f52fa
...@@ -68,6 +68,8 @@ $(PROGRAM): $(OBJS) ...@@ -68,6 +68,8 @@ $(PROGRAM): $(OBJS)
$(CC) $(LDFLAGS) -o $(PROGRAM) $(OBJS) $(LIBS) $(FEATURE_LIBS) $(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'") 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") FEATURE_LIBS = $(shell LC_ALL=C grep -q "FTDISUPPORT := yes" .features && printf "%s" "-lftdi")
......
...@@ -22,11 +22,8 @@ ...@@ -22,11 +22,8 @@
*/ */
#include <stdlib.h> #include <stdlib.h>
#include <fcntl.h>
#include <sys/types.h> #include <sys/types.h>
#include <string.h> #include <string.h>
#include <errno.h>
#include <sys/mman.h>
#include "flash.h" #include "flash.h"
#include "coreboot_tables.h" #include "coreboot_tables.h"
......
...@@ -29,7 +29,6 @@ ...@@ -29,7 +29,6 @@
#include <string.h> #include <string.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/mman.h>
#include <fcntl.h> #include <fcntl.h>
#include "flash.h" #include "flash.h"
...@@ -968,7 +967,7 @@ static int get_flashbase_sc520(struct pci_dev *dev, const char *name) ...@@ -968,7 +967,7 @@ static int get_flashbase_sc520(struct pci_dev *dev, const char *name)
} }
/* 4. Clean up */ /* 4. Clean up */
munmap(mmcr, getpagesize()); physunmap(mmcr, getpagesize());
return 0; return 0;
} }
......
...@@ -21,10 +21,7 @@ ...@@ -21,10 +21,7 @@
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>
#include <ctype.h> #include <ctype.h>
#include <fcntl.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h>
#include <errno.h>
#include "flash.h" #include "flash.h"
char *dummytype = NULL; char *dummytype = NULL;
......
...@@ -33,7 +33,6 @@ ...@@ -33,7 +33,6 @@
*/ */
#include <string.h> #include <string.h>
#include <sys/mman.h>
#include "flash.h" #include "flash.h"
#include "spi.h" #include "spi.h"
......
...@@ -20,10 +20,7 @@ ...@@ -20,10 +20,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <fcntl.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h>
#include <errno.h>
#include "flash.h" #include "flash.h"
uint32_t io_base_addr; uint32_t io_base_addr;
......
...@@ -21,7 +21,6 @@ ...@@ -21,7 +21,6 @@
*/ */
#include <string.h> #include <string.h>
#include <sys/mman.h>
#include "flash.h" #include "flash.h"
#include "spi.h" #include "spi.h"
......
...@@ -39,8 +39,6 @@ ...@@ -39,8 +39,6 @@
char *serprog_param = NULL; char *serprog_param = NULL;
#define SERPROG_SUPPORT 1
#if SERPROG_SUPPORT == 1 #if SERPROG_SUPPORT == 1
#define MSGHEADER "serprog:" #define MSGHEADER "serprog:"
......
...@@ -19,9 +19,6 @@ ...@@ -19,9 +19,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * 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 <stdlib.h>
#include "flash.h" #include "flash.h"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment