Allow compilation on all architectures if no direct hardware access is
needed.

There is no point in preventing compilation due to lack of direct
hardware access primitives if all you need is userspace access to the
serial port (serprog, buspirate) or no access at all (dummy).

This fixes dummy, serprog and buspirate compilation on SPARC.

Signed-off-by: Carl-Daniel Hailfinger <[email protected]>

Index: flashrom-all_arches_no_hwdeps/hwaccess.h
===================================================================
--- flashrom-all_arches_no_hwdeps/hwaccess.h    (Revision 1109)
+++ flashrom-all_arches_no_hwdeps/hwaccess.h    (Arbeitskopie)
@@ -160,6 +160,7 @@
 #define le_to_cpu32 cpu_to_le32
 #define le_to_cpu64 cpu_to_le64
 
+#if NEED_PCI == 1
 #if defined (__i386__) || defined (__x86_64__)
 
 #define __FLASHROM_HAVE_OUTB__ 1
@@ -320,5 +321,6 @@
 #error Unknown architecture, please check if it supports PCI port IO.
 
 #endif
+#endif
 
 #endif /* !__HWACCESS_H__ */


-- 
http://www.hailfinger.org/


_______________________________________________
flashrom mailing list
[email protected]
http://www.flashrom.org/mailman/listinfo/flashrom

Reply via email to