All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] i2c: mxc: allow executing the code that only applies to i.MX platforms
@ 2015-12-14 10:23 Gong Qianyu
  2015-12-14 10:37 ` York Sun
  0 siblings, 1 reply; 5+ messages in thread
From: Gong Qianyu @ 2015-12-14 10:23 UTC (permalink / raw)
  To: u-boot

The bus_i2c_init() is called before relocation and will assgin
value to a static variable. If U-Boot is then still running in a
flash device, it's theoretically not allowed to write data to flash
without an erasing operation. For i.MX platforms, the U-Boot is
always running in DDR.

Actually it causes asynchronous error when the ARM64 system error report
is enabled and the flash write protect is set.

Signed-off-by: Gong Qianyu <Qianyu.Gong@freescale.com>
---
 drivers/i2c/mxc_i2c.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/i2c/mxc_i2c.c b/drivers/i2c/mxc_i2c.c
index fa4c82f..4dddb83 100644
--- a/drivers/i2c/mxc_i2c.c
+++ b/drivers/i2c/mxc_i2c.c
@@ -581,8 +581,11 @@ void bus_i2c_init(int index, int speed, int unused,
 		return;
 	}
 
+#if defined(CONFIG_MX51) || defined(CONFIG_MX53) || \
+	defined(CONFIG_MX6) || defined(CONFIG_MX7)
 	mxc_i2c_buses[index].idle_bus_fn = idle_bus_fn;
 	mxc_i2c_buses[index].idle_bus_data = idle_bus_data;
+#endif
 
 	ret = enable_i2c_clk(1, index);
 	if (ret < 0) {
-- 
2.1.0.27.g96db324

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

end of thread, other threads:[~2015-12-14 13:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-14 10:23 [U-Boot] [PATCH] i2c: mxc: allow executing the code that only applies to i.MX platforms Gong Qianyu
2015-12-14 10:37 ` York Sun
2015-12-14 11:03   ` Gong Q.Y.
2015-12-14 11:14     ` York Sun
2015-12-14 13:15       ` Gong Q.Y.

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.