summaryrefslogtreecommitdiffstats
path: root/hwaccess.h
diff options
context:
space:
mode:
authorCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2016-02-20 21:43:56 +0000
committerCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2016-02-20 21:43:56 +0000
commit16c0aecebe6543a72b47f52022038450bda7df00 (patch)
tree7f222799680877c7b790ef0b985b96569ce5e9d7 /hwaccess.h
parent74367bf31492af2cfcea9efe3ad67ca5d5d3eadc (diff)
downloadast2050-flashrom-16c0aecebe6543a72b47f52022038450bda7df00.zip
ast2050-flashrom-16c0aecebe6543a72b47f52022038450bda7df00.tar.gz
Do not require PCI code for RayeR SPI driver
CONFIG_RAYER_SPI only needs raw hardware access, but not libpci. Disable CONFIG_RAYER_SPI on Android because of missing inb/outb. Introduce NEED_RAW_ACCESS for raw memory access, PCI port I/O and MSR access. Corresponding to flashrom svn r1934. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Diffstat (limited to 'hwaccess.h')
-rw-r--r--hwaccess.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/hwaccess.h b/hwaccess.h
index f92b2af..b006d05 100644
--- a/hwaccess.h
+++ b/hwaccess.h
@@ -196,7 +196,7 @@ cpu_to_be(64)
#define le_to_cpu32 cpu_to_le32
#define le_to_cpu64 cpu_to_le64
-#if NEED_PCI == 1
+#if NEED_RAW_ACCESS == 1
#if IS_X86
/* sys/io.h provides iopl(2) and x86 I/O port access functions (inb, outb etc).
@@ -230,6 +230,7 @@ cpu_to_be(64)
* out[bwl] definitions in machine/cpufunc.h and sys/io.h at least in some
* versions. Use machine/cpufunc.h only for plain FreeBSD/DragonFlyBSD.
*/
+ #include <sys/types.h>
#include <machine/cpufunc.h>
#define OUTB(x, y) do { u_int outb_tmp = (y); outb(outb_tmp, (x)); } while (0)
#define OUTW(x, y) do { u_int outw_tmp = (y); outw(outw_tmp, (x)); } while (0)
@@ -382,6 +383,6 @@ int libpayload_wrmsr(int addr, msr_t msr);
#error Unknown architecture, please check if it supports PCI port IO.
#endif /* IS_* */
-#endif /* NEED_PCI == 1 */
+#endif /* NEED_RAW_ACCESS == 1 */
#endif /* !__HWACCESS_H__ */
OpenPOWER on IntegriCloud