From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hans de Goede Date: Mon, 09 Jun 2014 16:48:18 +0200 Subject: [U-Boot] [PATCH v2 07/12] sunxi: Add i2c support In-Reply-To: <538EA1DE.8020407@denx.de> References: <1401824522-11353-1-git-send-email-hdegoede@redhat.com> <1401824522-11353-8-git-send-email-hdegoede@redhat.com> <538EA1DE.8020407@denx.de> Message-ID: <5395C932.10004@redhat.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi, On 06/04/2014 06:34 AM, Heiko Schocher wrote: > 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 >> Acked-by: Ian Campbell >> --- >> 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 > Date: Fri Nov 8 07:30:53 2013 +0100 > > i2c, zynq: convert zynq i2c driver to new multibus/multiadapter framework Ok, one patch converting the mvtwsi driver to CONFIG_SYS_I2C coming up. Note I've tested this on multiple sunxi boards / SoC generations, but I don't have any kirkwood or orion5x boards, so I cannot guarantee that this patch won't cause regressions there (I've compile tested the patch with kirkwood and orion5x board configs). Regards, Hans