summaryrefslogtreecommitdiffstats
path: root/src/drivers/bitbash
Commit message (Collapse)AuthorAgeFilesLines
* [i2c] Generalise i2c bit-bashing support to addressless devicesMichael Brown2008-10-011-39/+108
| | | | | | | | | | | | | | | | | | | | | | Some devices (e.g. the Atmel AT24C11) have no concept of a device address; they respond to every device address and use this value as the word address. Some other devices use part of the device address field to extend the word address field. Generalise the i2c bit-bashing support to handle this by defining the device address length and word address length as properties of an i2c device. The word address is assumed to overflow into the device address field if the address used exceeds the width of the word address field. Also add a bus reset mechanism. i2c chips don't usually have a reset line, so rebooting the host will not clear any bizarre state that the chip may be in. We reset the bus by clocking SCL until we see SDA high, at which point we know we can generate a start condition and have it seen by all devices. We then generate a stop condition to leave the bus in a known state prior to use. Finally, add some extra debugging messages to i2c_bit.c.
* Modify gPXE core and drivers to work with the new timer subsystemAlexey Zaytsev2008-03-023-3/+2Star
| | | | Signed-off-by: Alexey Zaytsev <alexey.zaytsev@gmail.com>
* Ensure clock line is in the idle state before asserting chip select.Michael Brown2007-07-281-0/+4
|
* Support cards such as natsemi which treat the data as little-endianMichael Brown2007-07-011-17/+24
| | | | | (i.e. LSB transmitted first on the wire), even though SPI commands and addresses always have to be big-endian.
* Abstracted out part of the concept of an SPI device to a generalised NVSMichael Brown2006-12-041-5/+4Star
| | | | | | | device. Separated the mechanisms of non-volatile storage access and non-volatile stored options.
* Changed length parameter in SPI methods to be a byte length, rather thanMichael Brown2006-12-041-5/+3Star
| | | | a word length.
* Generalised the SPI abstraction layer to also be able to handle interfacesMichael Brown2006-12-043-55/+78
| | | | | | that don't provide the full flexibility of a bit-bashing interface. Temporarily hacked rtl8139.c to use the new interface.
* We don't actually have a stdio.h header file. Our printf() functions areMichael Brown2006-09-272-2/+0Star
| | | | | | | | defined in vsprintf.h. (This may change, since vsprintf.h is a non-standard name, but for now it's the one to use.) There should be no need to include vsprintf.h just for DBG() statements, since include/compiler.h forces it in for a debug build anyway.
* added stdio.h to includes for DBG compilationMarty Connor2006-09-272-0/+3
|
* Generalise three-wire interface to generic SPI interface.Michael Brown2006-06-141-0/+165
| | | | | Update rtl8139 driver to instantiate an SPI interface with a three-wire device attached.
* Move per-transition delays from generic bit-bashing layer to i2c layerMichael Brown2006-06-142-8/+15
| | | | (since SPI bit-bashing will require different delay semantics).
* Change read_bit() to return 0 or -1UL, rather than 0 or 1.Michael Brown2006-06-122-3/+5
|
* Added bit-bashing i2c interface codeMichael Brown2006-06-111-0/+313
|
* Added sketch of bit-bashing interface common codeMichael Brown2006-06-081-0/+55