summaryrefslogtreecommitdiffstats
path: root/src/arch/arm/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/arm/include')
-rw-r--r--src/arch/arm/include/bits/pci_io.h2
-rw-r--r--src/arch/arm/include/ipxe/arm_io.h54
2 files changed, 5 insertions, 51 deletions
diff --git a/src/arch/arm/include/bits/pci_io.h b/src/arch/arm/include/bits/pci_io.h
index fba0eb97..91f507a4 100644
--- a/src/arch/arm/include/bits/pci_io.h
+++ b/src/arch/arm/include/bits/pci_io.h
@@ -9,6 +9,4 @@
FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
-#include <ipxe/io.h>
-
#endif /* _BITS_PCI_IO_H */
diff --git a/src/arch/arm/include/ipxe/arm_io.h b/src/arch/arm/include/ipxe/arm_io.h
index 046cbdb0..7ed38993 100644
--- a/src/arch/arm/include/ipxe/arm_io.h
+++ b/src/arch/arm/include/ipxe/arm_io.h
@@ -15,6 +15,8 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
#define IOAPI_PREFIX_arm __arm_
#endif
+#include <ipxe/dummy_pio.h>
+
/*
* Memory space mappings
*
@@ -78,55 +80,6 @@ ARM_WRITEX ( l, uint32_t, "", "" );
#endif
/*
- * Dummy PIO reads and writes up to 32 bits
- *
- * There is no common standard for I/O-space access for ARM, and
- * non-MMIO peripherals are vanishingly rare. Provide dummy
- * implementations that will allow code to link and should cause
- * drivers to simply fail to detect hardware at runtime.
- *
- */
-
-#define ARM_INX( _suffix, _type ) \
-static inline __always_inline _type \
-IOAPI_INLINE ( arm, in ## _suffix ) ( volatile _type *io_addr __unused) { \
- return ~( (_type) 0 ); \
-} \
-static inline __always_inline void \
-IOAPI_INLINE ( arm, ins ## _suffix ) ( volatile _type *io_addr __unused, \
- _type *data, unsigned int count ) { \
- memset ( data, 0xff, count * sizeof ( *data ) ); \
-}
-ARM_INX ( b, uint8_t );
-ARM_INX ( w, uint16_t );
-ARM_INX ( l, uint32_t );
-
-#define ARM_OUTX( _suffix, _type ) \
-static inline __always_inline void \
-IOAPI_INLINE ( arm, out ## _suffix ) ( _type data __unused, \
- volatile _type *io_addr __unused ) { \
- /* Do nothing */ \
-} \
-static inline __always_inline void \
-IOAPI_INLINE ( arm, outs ## _suffix ) ( volatile _type *io_addr __unused, \
- const _type *data __unused, \
- unsigned int count __unused ) { \
- /* Do nothing */ \
-}
-ARM_OUTX ( b, uint8_t );
-ARM_OUTX ( w, uint16_t );
-ARM_OUTX ( l, uint32_t );
-
-/*
- * Slow down I/O
- *
- */
-static inline __always_inline void
-IOAPI_INLINE ( arm, iodelay ) ( void ) {
- /* Nothing to do */
-}
-
-/*
* Memory barrier
*
*/
@@ -140,4 +93,7 @@ IOAPI_INLINE ( arm, mb ) ( void ) {
#endif
}
+/* Dummy PIO */
+DUMMY_PIO ( arm );
+
#endif /* _IPXE_ARM_IO_H */