summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2022-05-23 13:52:53 -0400
committerTom Rini <[email protected]>2022-05-23 13:52:53 -0400
commitc04a418d520005d2cbad5d5f9e3d52dfe58f0e00 (patch)
treefba72973e7f91d3375c42c5e854dc0c90cf1583f /include
parent004d30c786056d443d40428c4b1c11e2f8f0bc32 (diff)
parentfaa6ce6061a03617785310ccbc5436a56cce4ab4 (diff)
Merge branch '2022-05-23-regression-fixes'
- Fix PowerPC NOR booting, important SPI uclass fixes/updates, gic_v2 fix when CPU is not in EL3, fsl_esdhc_spl fix, and squashfs fix for linking on some architectures, and fix phy_string_for_interface
Diffstat (limited to 'include')
-rw-r--r--include/phy_interface.h2
-rw-r--r--include/spi.h19
-rw-r--r--include/spi_flash.h1
3 files changed, 19 insertions, 3 deletions
diff --git a/include/phy_interface.h b/include/phy_interface.h
index ce3b5004ec2..fed3357b9a2 100644
--- a/include/phy_interface.h
+++ b/include/phy_interface.h
@@ -85,7 +85,7 @@ static const char * const backplane_mode_strings[] = {
static inline const char *phy_string_for_interface(phy_interface_t i)
{
/* Default to unknown */
- if (i > PHY_INTERFACE_MODE_NA)
+ if (i >= PHY_INTERFACE_MODE_MAX)
i = PHY_INTERFACE_MODE_NA;
return phy_interface_strings[i];
diff --git a/include/spi.h b/include/spi.h
index fa9ab12dbef..9a8c1fb260e 100644
--- a/include/spi.h
+++ b/include/spi.h
@@ -572,6 +572,23 @@ int spi_find_bus_and_cs(int busnum, int cs, struct udevice **busp,
* Given a bus number and chip select, this finds the corresponding bus
* device and slave device.
*
+ * @busnum: SPI bus number
+ * @cs: Chip select to look for
+ * @busp: Returns bus device
+ * @devp: Return slave device
+ * @return 0 if found, -ve on error
+ */
+int spi_get_bus_and_cs(int busnum, int cs,
+ struct udevice **busp, struct spi_slave **devp);
+
+/**
+ * _spi_get_bus_and_cs() - Find and activate bus and slave devices by number
+ * As spi_flash_probe(), This is an old-style function. We should remove
+ * it when all SPI flash drivers use dm
+ *
+ * Given a bus number and chip select, this finds the corresponding bus
+ * device and slave device.
+ *
* If no such slave exists, and drv_name is not NULL, then a new slave device
* is automatically bound on this chip select with requested speed and mode.
*
@@ -588,7 +605,7 @@ int spi_find_bus_and_cs(int busnum, int cs, struct udevice **busp,
* @devp: Return slave device
* Return: 0 if found, -ve on error
*/
-int spi_get_bus_and_cs(int busnum, int cs, int speed, int mode,
+int _spi_get_bus_and_cs(int busnum, int cs, int speed, int mode,
const char *drv_name, const char *dev_name,
struct udevice **busp, struct spi_slave **devp);
diff --git a/include/spi_flash.h b/include/spi_flash.h
index d33d0dd46ad..10d19fd4b11 100644
--- a/include/spi_flash.h
+++ b/include/spi_flash.h
@@ -102,7 +102,6 @@ int spl_flash_get_sw_write_prot(struct udevice *dev);
int spi_flash_std_probe(struct udevice *dev);
int spi_flash_probe_bus_cs(unsigned int busnum, unsigned int cs,
- unsigned int max_hz, unsigned int spi_mode,
struct udevice **devp);
/* Compatibility function - this is the old U-Boot API */