spi: cadence-qspi: Use weak alias for finding ospi subnode
OSPI0 instance can have multiple flash nodes with same chip select and node name values. Create a weak alias to give option for adding custom flash node selection logic for different boards. Signed-off-by: Udit Kumar <u-kumar1@ti.com> Signed-off-by: Apurva Nandan <a-nandan@ti.com>
This commit is contained in:
parent
7c37b21c99
commit
4c83cf7017
|
|
@ -41,6 +41,11 @@ __weak int cadence_qspi_versal_flash_reset(struct udevice *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
__weak ofnode cadence_qspi_get_subnode(struct udevice *dev)
|
||||
{
|
||||
return dev_read_first_subnode(dev);
|
||||
}
|
||||
|
||||
static int cadence_spi_get_temp(int *temp)
|
||||
{
|
||||
struct udevice *dev;
|
||||
|
|
@ -992,7 +997,7 @@ static int cadence_spi_of_to_plat(struct udevice *bus)
|
|||
plat->is_dma = dev_read_bool(bus, "cdns,is-dma");
|
||||
|
||||
/* All other parameters are embedded in the child node */
|
||||
subnode = dev_read_first_subnode(bus);
|
||||
subnode = cadence_qspi_get_subnode(bus);
|
||||
if (!ofnode_valid(subnode)) {
|
||||
printf("Error: subnode with SPI flash config missing!\n");
|
||||
return -ENODEV;
|
||||
|
|
|
|||
Loading…
Reference in New Issue