[U-Boot] [PATCH v2] ARM: zynq: Add missing i2c get_rate for fixing i2c SPL

The commit 'f48ef0d81aa837a33020f8d61abb3929ba613774' did break I2C support because requesting the clock for the I2C ip-block isn't supported during SPL.
To fixup this we add support requesting clocks for: - i2c0 - i2c1
Signed-off-by: Hannes Schmelzer hannes.schmelzer@br-automation.com
---
Changes in v2: - reword commit headline - cosmetic changes
drivers/clk/clk_zynq.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/drivers/clk/clk_zynq.c b/drivers/clk/clk_zynq.c index 482f093..b09c37d 100644 --- a/drivers/clk/clk_zynq.c +++ b/drivers/clk/clk_zynq.c @@ -434,6 +434,8 @@ static ulong zynq_clk_get_rate(struct clk *clk) case lqspi_clk ... pcap_clk: case sdio0_clk ... spi1_clk: return zynq_clk_get_peripheral_rate(priv, id, 0); + case i2c0_aper_clk ... i2c1_aper_clk: + return zynq_clk_get_cpu_rate(priv, cpu_1x_clk); default: return -ENXIO; }

Hello Hannes,
Am 14.02.2019 um 08:54 schrieb Hannes Schmelzer:
The commit 'f48ef0d81aa837a33020f8d61abb3929ba613774' did break I2C support because requesting the clock for the I2C ip-block isn't supported during SPL.
To fixup this we add support requesting clocks for:
- i2c0
- i2c1
Signed-off-by: Hannes Schmelzer hannes.schmelzer@br-automation.com
Changes in v2:
reword commit headline
cosmetic changes
drivers/clk/clk_zynq.c | 2 ++ 1 file changed, 2 insertions(+)
Reviewed-by: Heiko Schocher hs@denx.de
bye, Heiko

On 14. 02. 19 8:54, Hannes Schmelzer wrote:
The commit 'f48ef0d81aa837a33020f8d61abb3929ba613774' did break I2C support because requesting the clock for the I2C ip-block isn't supported during SPL.
To fixup this we add support requesting clocks for:
- i2c0
- i2c1
Signed-off-by: Hannes Schmelzer hannes.schmelzer@br-automation.com
Changes in v2:
- reword commit headline
- cosmetic changes
drivers/clk/clk_zynq.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/drivers/clk/clk_zynq.c b/drivers/clk/clk_zynq.c index 482f093..b09c37d 100644 --- a/drivers/clk/clk_zynq.c +++ b/drivers/clk/clk_zynq.c @@ -434,6 +434,8 @@ static ulong zynq_clk_get_rate(struct clk *clk) case lqspi_clk ... pcap_clk: case sdio0_clk ... spi1_clk: return zynq_clk_get_peripheral_rate(priv, id, 0);
- case i2c0_aper_clk ... i2c1_aper_clk:
default: return -ENXIO; }return zynq_clk_get_cpu_rate(priv, cpu_1x_clk);
Applied. M
participants (3)
-
Hannes Schmelzer
-
Heiko Schocher
-
Michal Simek