mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] i2c: omap: fix fclk_rate for ti,omap4-i2c
@ 2014-12-10  6:49 Jan Weitzel
  2014-12-11  7:59 ` Sascha Hauer
  0 siblings, 1 reply; 7+ messages in thread
From: Jan Weitzel @ 2014-12-10  6:49 UTC (permalink / raw)
  To: barebox

"ti,am33xx" and "ti,omap4" use "ti,omap4-i2c" with different fclk_rate.
By now set it according to the used cpu compatible.

Signed-off-by: Jan Weitzel <j.weitzel@phytec.de>
---
 drivers/i2c/busses/i2c-omap.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index 094f591..d2254d4 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -1015,6 +1015,13 @@ i2c_omap_probe(struct device_d *pdev)
 	i2c_omap->reg_shift = (i2c_data->flags >>
 					OMAP_I2C_FLAG_BUS_SHIFT__SHIFT) & 3;
 
+	if (!i2c_data->fclk_rate) {
+		if (of_machine_is_compatible("ti,am33xx"))
+			i2c_data->fclk_rate = am33xx_data.fclk_rate;
+		if (of_machine_is_compatible("ti,omap4"))
+			i2c_data->fclk_rate = omap4_data.fclk_rate;
+	}
+
 	if (pdev->platform_data != NULL) {
 		speed = *(u32 *)pdev->platform_data;
 	} else {
-- 
1.9.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

end of thread, other threads:[~2015-01-07 11:01 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-10  6:49 [PATCH] i2c: omap: fix fclk_rate for ti,omap4-i2c Jan Weitzel
2014-12-11  7:59 ` Sascha Hauer
2014-12-11  9:47   ` [PATCH v2] " Jan Weitzel
2015-01-05 12:22     ` Jan Weitzel
2015-01-06 13:47       ` Sascha Hauer
2015-01-07 11:00         ` Jan Weitzel
2014-12-17 13:59   ` [PATCH] " Jan Weitzel

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