From mboxrd@z Thu Jan 1 00:00:00 1970 From: Heiko Schocher Date: Tue, 10 Jun 2014 09:53:47 +0200 Subject: [U-Boot] [PATCH 2/5] sunxi: Add i2c support In-Reply-To: <5396B746.5050503@redhat.com> References: <1402326930-19246-1-git-send-email-hdegoede@redhat.com> <1402326930-19246-3-git-send-email-hdegoede@redhat.com> <5396A6C9.50706@denx.de> <5396B746.5050503@redhat.com> Message-ID: <5396B98B.2040707@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hello Hans, Am 10.06.2014 09:44, schrieb Hans de Goede: > Hi, > > On 06/10/2014 08:33 AM, Heiko Schocher wrote: >> Hello Hans, >> >> Am 09.06.2014 17:15, 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 >>> --- >> >> as this is a newer version, your commit subject should contain a "v2", >> and please add here a short info, what has changed ... look here for >> an explanation how this should look like: >> http://www.denx.de/wiki/view/U-Boot/Patches#Sending_updated_patch_versions > > Ok, will do. > >> >>> arch/arm/cpu/armv7/sunxi/board.c | 6 ++++++ >>> arch/arm/cpu/armv7/sunxi/u-boot-spl.lds | 5 +++++ >>> arch/arm/include/asm/arch-sunxi/i2c.h | 15 +++++++++++++++ >>> board/sunxi/board.c | 7 +++++++ >>> drivers/i2c/mvtwsi.c | 18 ++++++++++++++++++ >>> include/configs/sunxi-common.h | 8 ++++++++ >>> 6 files changed, 59 insertions(+) >>> create mode 100644 arch/arm/include/asm/arch-sunxi/i2c.h [...] >>> diff --git a/drivers/i2c/mvtwsi.c b/drivers/i2c/mvtwsi.c >>> index d3457b9..ad1ce8f 100644 >>> --- a/drivers/i2c/mvtwsi.c >>> +++ b/drivers/i2c/mvtwsi.c >>> @@ -22,6 +22,8 @@ >>> #include >>> #elif defined(CONFIG_KIRKWOOD) >>> #include >>> +#elif defined(CONFIG_SUNXI) >>> +#include >>> #else >>> #error Driver mvtwsi not supported by SoC or board >>> #endif >>> @@ -30,6 +32,20 @@ >>> * TWSI register structure >>> */ >>> >>> +#ifdef CONFIG_SUNXI >>> + >>> +struct mvtwsi_registers { >>> + u32 slave_address; >>> + u32 xtnd_slave_addr; >>> + u32 data; >>> + u32 control; >>> + u32 status; >>> + u32 baudrate; >>> + u32 soft_reset; >>> +}; >>> + >>> +#else >>> + >>> struct mvtwsi_registers { >>> u32 slave_address; >>> u32 data; >>> @@ -43,6 +59,8 @@ struct mvtwsi_registers { >>> u32 soft_reset; >>> }; >>> >>> +#endif >>> + >>> /* >>> * Control register fields >>> */ >> >> ? Thats all? I thought you convert this driver to the new i2c framework? > > I did a separate patch for that: > "[PATCH 1/5] mvtwsi: convert to CONFIG_SYS_I2C framework" > > http://lists.denx.de/pipermail/u-boot/2014-June/181352.html > > Which was also send directly to you. > >> At least, there should be a change from the i2c_xx() functions to static >> and a prefix add to them ... and a "U_BOOT_I2C_ADAP_COMPLETE" at the end ... > > Yes this is all done in the "[PATCH 1/5] mvtwsi: convert to CONFIG_SYS_I2C framework" > patch. Hups... Sorry ... I didn;t find it in my inbox ... so, this patch seems fine to me: Acked-by: Heiko Schocher bye, Heiko -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany