[U-Boot] [PATCH 04/10] x86: spi: Add device tree support

Simon Glass sjg at chromium.org
Wed Dec 31 00:18:42 CET 2014


Hi Jagan,

On 30 December 2014 at 02:00, Jagan Teki <jagannadh.teki at gmail.com> wrote:
> On 30 December 2014 at 06:42, Simon Glass <sjg at chromium.org> wrote:
>> 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 at chromium.org>
>> ---
>>
>>  drivers/spi/ich.c            | 7 +++++++
>>  include/configs/x86-common.h | 1 +
>>  2 files changed, 8 insertions(+)
>>
>> diff --git a/drivers/spi/ich.c b/drivers/spi/ich.c
>> index 0379444..fdff158 100644
>> --- a/drivers/spi/ich.c
>> +++ b/drivers/spi/ich.c
>> @@ -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);
>> +}
>> +
>
> This would call from spi_flash_probe_fdt(), who is the caller for this?

arch/x86/cpu/ivybridge/sdram.c:         *sfp =
spi_flash_probe_fdt(blob, node, spi_node);

>
>>  void spi_free_slave(struct spi_slave *slave)
>>  {
>>         struct ich_spi_slave *ich = to_ich_spi(slave);
>> diff --git a/include/configs/x86-common.h b/include/configs/x86-common.h
>> index 4f0a3c5..ecedfc3 100644
>> --- a/include/configs/x86-common.h
>> +++ b/include/configs/x86-common.h
>> @@ -211,6 +211,7 @@
>>  #define CONFIG_CMD_SF_TEST
>>  #define CONFIG_CMD_SPI
>>  #define CONFIG_SPI
>> +#define CONFIG_OF_SPI_FLASH
>>
>>  /*-----------------------------------------------------------------------
>>   * Environment configuration
>> --
>> 2.2.0.rc0.207.ga3a616c

Regards,
Simon


More information about the U-Boot mailing list