From af83db2659948ea39fa9fb1473cfca7f2d3f6cfd Mon Sep 17 00:00:00 2001 From: Nico Huber Date: Wed, 5 Apr 2017 17:30:20 +0200 Subject: inteltool: #include MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I66a243486a347313103ffd2cb2ca0447228e4054 Signed-off-by: Nico Huber Reviewed-on: https://review.coreboot.org/19586 Tested-by: build bot (Jenkins) Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Stefan Reinauer --- util/inteltool/Makefile | 4 +++- util/inteltool/inteltool.h | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'util/inteltool') diff --git a/util/inteltool/Makefile b/util/inteltool/Makefile index cb6d1467e0..b51f5a2ad8 100644 --- a/util/inteltool/Makefile +++ b/util/inteltool/Makefile @@ -17,10 +17,12 @@ PROGRAM = inteltool +top ?= $(abspath ../..) + CC ?= gcc INSTALL ?= /usr/bin/install PREFIX ?= /usr/local -CFLAGS ?= -O2 -g -Wall -W +CFLAGS ?= -O2 -g -Wall -W -I$(top)/src/commonlib/include LDFLAGS += -lpci -lz OBJS = inteltool.o cpu.o gpio.o rootcmplx.o powermgt.o memory.o pcie.o amb.o ivy_memory.o spi.o gfx.o ahci.o diff --git a/util/inteltool/inteltool.h b/util/inteltool/inteltool.h index 8fb6155898..54ddf84fe3 100644 --- a/util/inteltool/inteltool.h +++ b/util/inteltool/inteltool.h @@ -14,6 +14,8 @@ * GNU General Public License for more details. */ +#include + #include #if defined(__GLIBC__) @@ -208,8 +210,6 @@ static inline uint32_t inl(unsigned port) #define PCI_DEVICE_ID_INTEL_CORE_5TH_GEN_U 0x1604 /* Broadwell-ULT */ #define PCI_DEVICE_ID_INTEL_CORE_6TH_GEN_WST 0x1918 -#define ARRAY_SIZE(a) ((int)(sizeof(a) / sizeof((a)[0]))) - #if !defined(__DARWIN__) && !defined(__FreeBSD__) typedef struct { uint32_t hi, lo; } msr_t; #endif -- cgit v1.2.3