Skip to contentSkip to conversation

ARM: zynq: Add missing i2c get_rate for fixing i2c SPL

PATCH New Hannes Schmelzer 3 participants 3 messages Feb 14, 2019 – Apr 2, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 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

---

Changes in v2:
- reword commit headline
- cosmetic changes

 drivers/clk/clk_zynq.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/clk/clk_zynq.c +2 -0
index 482f093..b09c37d 100644
@@ -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;
 	}
Signature · 1 line
2.7.4
#1 lore raw

PATCH v2 1/1 ARM: zynq: Add missing i2c get_rate for fixing i2c SPL

Hello Hannes,

Am 14.02.2019 um 08:54 schrieb Hannes Schmelzer:

Quoted 10 lines

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

Quoted 8 lines

---

Changes in v2:
- reword commit headline
- cosmetic changes

  drivers/clk/clk_zynq.c | 2 ++
  1 file changed, 2 insertions(+)

bye,
Heiko

Signature · 3 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52   Fax: +49-8142-66989-80   Email: hs at denx.de
Applied
#2 lore raw

PATCH v2 1/1 ARM: zynq: Add missing i2c get_rate for fixing i2c SPL

In reply to Hannes Schmelzer
Quoted 25 lines · 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

---

Changes in v2:
- reword commit headline
- cosmetic changes

 drivers/clk/clk_zynq.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/clk/clk_zynq.c +0 -0
index 482f093..b09c37d 100644

drivers/clk/clk_zynq.c static ulong zynq_clk_get_rate(struct clk *clk) · line 441

Quoted 8 lines
drivers/clk/clk_zynq.c +2 -0
@@ -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;
 	}

Applied.
M

Signature · 14 lines
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Xilinx Microblaze
Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP ARM64 SoCs
U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP/Versal SoCs


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190402/1e8fc702/attachment.sig>