[U-Boot] dm-spi: spi_chip_select value

Jagan Teki jteki at openedev.com
Tue Jun 23 23:03:19 CEST 2015


Hi Simon,

I'm calling spi_chip_select(bus) from set_speed or claim_bus
to get the cs value from sf probe.

Seems like it returns the maximum number as 254, when I debug
further seems like slave_platdata returns NULL

int spi_chip_select(struct udevice *dev)
{
        struct dm_spi_slave_platdata *plat = dev_get_parent_platdata(dev);
        / * this plat data returns NULL */

        return plat ? plat->cs : -ENOENT;
}

log:
zynq-uboot> sf probe 1:0
zynq_spi_ofdata_to_platdata: regs=e0007000 max-frequency=166666700
zynq_spi_set_speed: cs 254
zynq_spi_set_speed: regs=e0007000, mode=1000000
zynq_spi_set_mode: regs=e0007000, mode=3
zynq_spi_claim_bus: cs 254
spi_xfer: bus:1 cs:254 bitlen:8 len:1 flags:1
spi_xfer: Timeout! TX FIFO not full
SF: Failed to get idcodes
Failed to initialize SPI flash at 1:0 (error -1)

Any help?

thanks!
-- 
Jagan | openedev.


More information about the U-Boot mailing list