mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-04-11 17:01:34 +00:00
x86: spi: Add device tree support
As a temporary measure before the ICH driver moves over to driver model, add device tree support to the driver. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
fc4860c089
commit
8e899af059
2 changed files with 8 additions and 0 deletions
|
@ -153,6 +153,13 @@ struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs,
|
||||||
return &ich->slave;
|
return &ich->slave;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct spi_slave *spi_setup_slave_fdt(const void *blob, int slave_node,
|
||||||
|
int spi_node)
|
||||||
|
{
|
||||||
|
/* We only support a single SPI at present */
|
||||||
|
return spi_setup_slave(0, 0, 20000000, 0);
|
||||||
|
}
|
||||||
|
|
||||||
void spi_free_slave(struct spi_slave *slave)
|
void spi_free_slave(struct spi_slave *slave)
|
||||||
{
|
{
|
||||||
struct ich_spi_slave *ich = to_ich_spi(slave);
|
struct ich_spi_slave *ich = to_ich_spi(slave);
|
||||||
|
|
|
@ -211,6 +211,7 @@
|
||||||
#define CONFIG_CMD_SF_TEST
|
#define CONFIG_CMD_SF_TEST
|
||||||
#define CONFIG_CMD_SPI
|
#define CONFIG_CMD_SPI
|
||||||
#define CONFIG_SPI
|
#define CONFIG_SPI
|
||||||
|
#define CONFIG_OF_SPI_FLASH
|
||||||
|
|
||||||
/*-----------------------------------------------------------------------
|
/*-----------------------------------------------------------------------
|
||||||
* Environment configuration
|
* Environment configuration
|
||||||
|
|
Loading…
Add table
Reference in a new issue