Hello Hans,

Am 03.06.2014 21:41, schrieb Hans de Goede:
Add support for the i2c controller found on all Allwinner sunxi SoCs,
this is the same controller as found on the Marvell orion5x and kirkwood
SoC families, with a slightly different register layout, so this patch uses
the existing mvtwsi code.

Signed-off-by: Hans de Goede<hdego...@redhat.com>
Acked-by: Ian Campbell<i...@hellion.org.uk>
---
  arch/arm/cpu/armv7/sunxi/board.c      |  6 ++++++
  arch/arm/include/asm/arch-sunxi/i2c.h | 15 +++++++++++++++
  board/sunxi/board.c                   |  7 +++++++
  drivers/i2c/Makefile                  |  1 +
  drivers/i2c/mvtwsi.c                  | 18 ++++++++++++++++++
  include/configs/sunxi-common.h        |  9 +++++++++
  6 files changed, 56 insertions(+)
  create mode 100644 arch/arm/include/asm/arch-sunxi/i2c.h
[...]
diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
index 1d1c87d..2db083c 100644
--- a/include/configs/sunxi-common.h
+++ b/include/configs/sunxi-common.h
@@ -161,6 +161,15 @@
  #undef CONFIG_CMD_NET
  #undef CONFIG_CMD_NFS

+/* I2C */
+#define CONFIG_SPL_I2C_SUPPORT
+/* No CONFIG_SYS_I2C as we use the non converted mvtwsi driver */
+#define CONFIG_HARD_I2C

NACK. Goal is to get rid of HARD_I2C define ... please convert this
driver to fit with CONFIG_SYS_I2C framework.
A fast look in this driver, this should not to be to hard, as this
driver does not support multi busses...

A good example for porting a i2c driver with no multibus support is:

commit 0bdffe71fddeaa46768a39305797e4512dee0f15
Author: Heiko Schocher <h...@denx.de>
Date:   Fri Nov 8 07:30:53 2013 +0100

    i2c, zynq: convert zynq i2c driver to new multibus/multiadapter framework

+#define CONFIG_SYS_I2C_SUNXI
+#define CONFIG_SYS_I2C_SPEED           400000
+#define CONFIG_SYS_I2C_SLAVE           0x7f
+#define CONFIG_CMD_I2C
+
  #ifndef CONFIG_CONS_INDEX
  #define CONFIG_CONS_INDEX              1       /* UART0 */
  #endif

bye,
Heiko
--
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to