public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] exynos: i2c: Use generic api to get i2c clk freq
@ 2013-03-25  9:02 Akshay Saraswat
  2013-03-25  9:02 ` [U-Boot] [PATCH] exynos: uart: Use generic api to the uart " Akshay Saraswat
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Akshay Saraswat @ 2013-03-25  9:02 UTC (permalink / raw)
  To: u-boot

From: Padmavathi Venna <padma.v@samsung.com>

Use generic api to get the i2c clock frequency.
Tested on smdk5250 with the help of following commands.
run
i2c dev 1
i2c dev 2
i2c speed

This patch depends on:
http://permalink.gmane.org/gmane.comp.boot-loaders.u-boot/154930

Signed-off-by: Padmavathi Venna <padma.v@samsung.com>
Signed-off-by: Akshay Saraswat <akshay.s@samsung.com>
---
 drivers/i2c/s3c24x0_i2c.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/i2c/s3c24x0_i2c.c b/drivers/i2c/s3c24x0_i2c.c
index 769a2ba..a9f19e7 100644
--- a/drivers/i2c/s3c24x0_i2c.c
+++ b/drivers/i2c/s3c24x0_i2c.c
@@ -151,7 +151,7 @@ static void i2c_ch_init(struct s3c24x0_i2c *i2c, int speed, int slaveadd)
 {
 	ulong freq, pres = 16, div;
 #if (defined CONFIG_EXYNOS4 || defined CONFIG_EXYNOS5)
-	freq = get_i2c_clk();
+	freq = clock_get_periph_rate(PERIPH_ID_I2C0);
 #else
 	freq = get_PCLK();
 #endif
-- 
1.8.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-06-04  8:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-25  9:02 [U-Boot] [PATCH] exynos: i2c: Use generic api to get i2c clk freq Akshay Saraswat
2013-03-25  9:02 ` [U-Boot] [PATCH] exynos: uart: Use generic api to the uart " Akshay Saraswat
2013-06-04  8:02   ` Minkyu Kang
2013-06-04  7:53 ` [U-Boot] [PATCH] exynos: i2c: Use generic api to get i2c " Minkyu Kang
2013-06-04  8:01 ` Minkyu Kang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox