summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorNico Huber <nico.huber@secunet.com>2017-04-05 17:30:20 +0200
committerStefan Reinauer <stefan.reinauer@coreboot.org>2017-06-06 17:46:54 +0200
commitaf83db2659948ea39fa9fb1473cfca7f2d3f6cfd (patch)
treeb55086b17a18060c9056b30e5aae9e34426ef219 /util
parentc2692111495e30b347c4be5d4228f8e7b8cbfed4 (diff)
downloadcoreboot-af83db2659948ea39fa9fb1473cfca7f2d3f6cfd.tar.xz
inteltool: #include <commonlib/helpers.h>
Change-Id: I66a243486a347313103ffd2cb2ca0447228e4054 Signed-off-by: Nico Huber <nico.huber@secunet.com> Reviewed-on: https://review.coreboot.org/19586 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Philippe Mathieu-Daudé <philippe.mathieu.daude@gmail.com> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'util')
-rw-r--r--util/inteltool/Makefile4
-rw-r--r--util/inteltool/inteltool.h4
2 files changed, 5 insertions, 3 deletions
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 <commonlib/helpers.h>
+
#include <stdint.h>
#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