aboutsummaryrefslogtreecommitdiffstats
path: root/src/drivers/net/etherfabric.c
diff options
context:
space:
mode:
authorMichael Brown <mcb30@etherboot.org>2006-12-04 15:36:51 +0000
committerMichael Brown <mcb30@etherboot.org>2006-12-04 15:36:51 +0000
commit931f94dca30b04f8303acdcfd08436e61a491a92 (patch)
treeb478b672436d696ce8d0a4d91c804d29a65db6a9 /src/drivers/net/etherfabric.c
parent2e41bfd268e161a45958a8371c321e6c706e0073 (diff)
downloadipxe-931f94dca30b04f8303acdcfd08436e61a491a92.tar.gz
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/drivers/net/etherfabric.c')
-rw-r--r--src/drivers/net/etherfabric.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/drivers/net/etherfabric.c b/src/drivers/net/etherfabric.c
index 1b5f29a7b..9afe65df1 100644
--- a/src/drivers/net/etherfabric.c
+++ b/src/drivers/net/etherfabric.c
@@ -1058,9 +1058,13 @@ static int ef1002_i2c_read_bit ( struct bit_basher *basher,
return ( EFAB_DWORD_FIELD ( reg, EF1_EEPROM ) & mask );
}
+static struct bit_basher_operations ef1002_basher_ops = {
+ .read = ef1002_i2c_read_bit,
+ .write = ef1002_i2c_write_bit,
+};
+
static void ef1002_init_eeprom ( struct efab_nic *efab ) {
- efab->ef1002_i2c.basher.write = ef1002_i2c_write_bit;
- efab->ef1002_i2c.basher.read = ef1002_i2c_read_bit;
+ efab->ef1002_i2c.basher.op = &ef1002_basher_ops;
init_i2c_bit_basher ( &efab->ef1002_i2c );
efab->ef1002_eeprom.address = EF1_EEPROM_I2C_ID;
}