[U-Boot] [PATCH] i2c:zynq: I2C multi-bus support on Zynq

Michael Burr michael.burr at logicpd.com
Mon Sep 23 17:07:20 CEST 2013


See below... (My replies are tagged with "[MRB:]".)

Michael Burr  //  Software Engineer II

Logic PD
T // 612.436.7273
NOTICE: Important disclaimers and limitations apply to this email.
Please see this web page for our disclaimers and limitations:
http://logicpd.com/email-disclaimer/

-----Original Message-----
From: Heiko Schocher [mailto:hs at denx.de] 
Sent: Sunday, September 22, 2013 2:33 AM
To: Michael Burr
Cc: u-boot at lists.denx.de; Michal Simek
Subject: Re: [PATCH] i2c:zynq: I2C multi-bus support on Zynq

Hello Michael,

Am 20.09.2013 22:40, schrieb Michael Burr:
> Changes:
> 'zynq_i2c.c':
> Adapted driver for compliance with "new" I2C driver model 
> (CONFIG_SYS_I2C).
> Support for 0-length register address in 'i2c_write', 'i2c_read'.
> 'i2c.h', 'i2c_core.c':
> Support for Texas Instruments PCA9548 bus multiplexer.

Your commit message implements, that your patch contains 3 independent changes ...  it would be better to seperate your patch in 3 pieces ... so if your patch introduces a problem, it is better to identify, which part it introduced ...

Can you do this easy?

[MRB:] I will give it a try...

Except of this, I have only one minor Codingstyle comment

> Tested:
> Xilinx ZC702 eval board (single bus master 'I2C0' with multiplexer 
> PCA9548).
> Write and read registers with addresses of length 0 and 1.
>
> Note:
> Mainline code does not work "out of the box" on ZC702 at this time; ad 
> hoc adaptations based on 'u-boot-xlnx' repository were needed in order 
> to test on this board. (Those adapatations are not included with this 
> patch.)

? Where can I find this repository?

[MRB:] At the following address. (I believe Michal Simek is the person who manages this.)

http://github.com/Xilinx/u-boot-xlnx/

> Signed-off-by: Michael Burr<michael.burr at logicpd.com>
> Cc: Heiko Schocher<hs at denx.de>
> Cc: Michal Simek<monstr at monstr.eu>
> ---
>   drivers/i2c/i2c_core.c |    5 ++
>   drivers/i2c/zynq_i2c.c |  148 +++++++++++++++++++++++++++++-------------------
>   include/i2c.h          |    3 +
>   3 files changed, 97 insertions(+), 59 deletions(-)
[...]
> diff --git a/include/i2c.h b/include/i2c.h index 8fd17d1..683affe 
> 100644
> --- a/include/i2c.h
> +++ b/include/i2c.h
> @@ -40,6 +40,7 @@
>   #define CONFIG_SYS_I2C_MAX_HOPS		0
>   #define CONFIG_SYS_NUM_I2C_BUSES	ll_entry_count(struct i2c_adapter, i2c)
>   #else
> +

Change not needed!

[MRB:] Oops. I'll get rid of that...

>   /* we use i2c muxes */
>   #undef CONFIG_SYS_I2C_DIRECT_BUS
>   #endif
> @@ -135,6 +136,8 @@ extern struct i2c_bus_hose	i2c_bus[];
>   #define I2C_MUX_PCA9544		{I2C_MUX_PCA9544_ID, "PCA9544A"}
>   #define I2C_MUX_PCA9547_ID	4
>   #define I2C_MUX_PCA9547		{I2C_MUX_PCA9547_ID, "PCA9547A"}
> +#define I2C_MUX_PCA9548_ID	5
> +#define I2C_MUX_PCA9548		{I2C_MUX_PCA9548_ID, "PCA9548"}
>   #endif
>
>   #ifndef I2C_SOFT_DECLARATIONS

bye,
Heiko
-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany


More information about the U-Boot mailing list