]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
x86: spi: Add device tree support
authorSimon Glass <sjg@chromium.org>
Tue, 20 Jan 2015 05:16:11 +0000 (22:16 -0700)
committerSimon Glass <sjg@chromium.org>
Sat, 24 Jan 2015 13:13:45 +0000 (06:13 -0700)
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>
drivers/spi/ich.c
include/configs/x86-common.h

index 0379444872e73ed413cc03ff029b08dad30d1f37..fdff158637da063a9be9967c4ae13df5b5018e21 100644 (file)
@@ -153,6 +153,13 @@ struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs,
        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)
 {
        struct ich_spi_slave *ich = to_ich_spi(slave);
index 4f0a3c592890d95879ebc900dda2b00356850a9d..ecedfc3ab16ecc00d3f12af3118120ef255ee9c5 100644 (file)
 #define CONFIG_CMD_SF_TEST
 #define CONFIG_CMD_SPI
 #define CONFIG_SPI
+#define CONFIG_OF_SPI_FLASH
 
 /*-----------------------------------------------------------------------
  * Environment configuration