summaryrefslogtreecommitdiffstats
path: root/src/include/gpxe/bitbash.h
diff options
context:
space:
mode:
authorMichael Brown2006-12-04 16:36:51 +0100
committerMichael Brown2006-12-04 16:36:51 +0100
commit931f94dca30b04f8303acdcfd08436e61a491a92 (patch)
treeb478b672436d696ce8d0a4d91c804d29a65db6a9 /src/include/gpxe/bitbash.h
parentForce syntax-checking on assertions even in non-asserting builds. (diff)
downloadipxe-931f94dca30b04f8303acdcfd08436e61a491a92.tar.gz
ipxe-931f94dca30b04f8303acdcfd08436e61a491a92.tar.xz
ipxe-931f94dca30b04f8303acdcfd08436e61a491a92.zip
Generalised the SPI abstraction layer to also be able to handle interfaces
that don't provide the full flexibility of a bit-bashing interface. Temporarily hacked rtl8139.c to use the new interface.
Diffstat (limited to 'src/include/gpxe/bitbash.h')
-rw-r--r--src/include/gpxe/bitbash.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/include/gpxe/bitbash.h b/src/include/gpxe/bitbash.h
index f479b5ad0..62bdce004 100644
--- a/src/include/gpxe/bitbash.h
+++ b/src/include/gpxe/bitbash.h
@@ -7,8 +7,10 @@
*
*/
-/** A bit-bashing interface */
-struct bit_basher {
+struct bit_basher;
+
+/** Bit-bashing operations */
+struct bit_basher_operations {
/**
* Set/clear output bit
*
@@ -35,6 +37,12 @@ struct bit_basher {
int ( * read ) ( struct bit_basher *basher, unsigned int bit_id );
};
+/** A bit-bashing interface */
+struct bit_basher {
+ /** Bit-bashing operations */
+ struct bit_basher_operations *op;
+};
+
extern void write_bit ( struct bit_basher *basher, unsigned int bit_id,
unsigned long data );
extern int read_bit ( struct bit_basher *basher, unsigned int bit_id );