[U-Boot] [PATCH v4 05/29] dm: spi: Add a uclass for SPI
Stefan Roese
sr at denx.de
Wed Oct 29 17:16:25 CET 2014
Hi Jagan!
On 29.10.2014 16:39, Jagan Teki wrote:
>>> diff --git a/drivers/spi/spi-uclass.c b/drivers/spi/spi-uclass.c
>>
>> <snip>
>>
>>> +int spi_post_bind(struct udevice *dev)
>>> +{
>>> + /* Scan the bus for devices */
>>> + return dm_scan_fdt_node(dev, gd->fdt_blob, dev->of_offset, false);
>>> +}
>>
>>
>> SoCFPGA currently does not support CONFIG_OF_CONTROL (no dtb supplied). So
>> I'm planning to use platform_data to instantiate the device. Something like
>> this in the board file:
>>
>> static const struct dw_spi_platdata spi_platdata = {
>> .base = SOCFPGA_SPIM0_ADDRESS,
>> };
>>
>> U_BOOT_DEVICE(dw_spi) = {
>> .name = "dw_spi",
>> .platdata = &spi_platdata,
>> };
>>
>> What would the non-fdt method have to be to bind the device in
>> spi_post_bind() above?
>
> At present dm-spi support mostly devicetree driven
Yes, I noticed this.
> Will update you soon for non-devicetree base.
So you are working on this too? Do you have a schedule when you have
something ready for testing? If this is soon I might wait for you here.
If not, I'll have to dig deeper here myself.
Just checking.
Thanks,
Stefan
More information about the U-Boot
mailing list