spi: spi-uclass: Read chipselect and restrict capabilities
Read chipselect properties from DT which are populated using 'reg' property and save it in plat->cs[] array for later use. Also read multi chipselect capability which is used for parallel-memories and return errors if they are passed on using DT but driver is not capable of handling it. Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@amd.com> Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
This commit is contained in:

committed by
Tom Rini

parent
c480ec2c45
commit
34da258bb0
@@ -434,7 +434,7 @@ static int stm32_spi_xfer(struct udevice *slave, unsigned int bitlen,
|
||||
|
||||
slave_plat = dev_get_parent_plat(slave);
|
||||
if (flags & SPI_XFER_BEGIN)
|
||||
stm32_spi_set_cs(bus, slave_plat->cs, false);
|
||||
stm32_spi_set_cs(bus, slave_plat->cs[0], false);
|
||||
|
||||
/* Be sure to have data in fifo before starting data transfer */
|
||||
if (priv->tx_buf)
|
||||
@@ -485,7 +485,7 @@ static int stm32_spi_xfer(struct udevice *slave, unsigned int bitlen,
|
||||
stm32_spi_stopxfer(bus);
|
||||
|
||||
if (flags & SPI_XFER_END)
|
||||
stm32_spi_set_cs(bus, slave_plat->cs, true);
|
||||
stm32_spi_set_cs(bus, slave_plat->cs[0], true);
|
||||
|
||||
return xfer_status;
|
||||
}
|
||||
|
Reference in New Issue
Block a user