mirror of
https://github.com/linux-sunxi/u-boot-sunxi.git
synced 2024-02-12 11:16:03 +08:00
dm: sf: sandbox: Convert SPI flash driver to driver model
Convert sandbox's spi flash emulation driver to use driver model. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
This commit is contained in:
@ -32,19 +32,6 @@ struct sandbox_spi_emu_ops {
|
||||
int (*xfer)(void *priv, const u8 *rx, u8 *tx, uint bytes);
|
||||
};
|
||||
|
||||
/*
|
||||
* There are times when the data lines are allowed to tristate. What
|
||||
* is actually sensed on the line depends on the hardware. It could
|
||||
* always be 0xFF/0x00 (if there are pull ups/downs), or things could
|
||||
* float and so we'd get garbage back. This func encapsulates that
|
||||
* scenario so we can worry about the details here.
|
||||
*/
|
||||
static inline void sandbox_spi_tristate(u8 *buf, uint len)
|
||||
{
|
||||
/* XXX: make this into a user config option ? */
|
||||
memset(buf, 0xff, len);
|
||||
}
|
||||
|
||||
/*
|
||||
* Extract the bus/cs from the spi spec and return the start of the spi
|
||||
* client spec. If the bus/cs are invalid for the current config, then
|
||||
|
@ -42,7 +42,6 @@ enum state_terminal_raw {
|
||||
|
||||
struct sandbox_spi_info {
|
||||
const char *spec;
|
||||
const struct sandbox_spi_emu_ops *ops;
|
||||
struct udevice *emul;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user