[U-Boot] [PATCH 2/5] EXYNOS: Add Exynos4 I2C spacing

Minkyu Kang promsoft at gmail.com
Fri Oct 12 07:26:09 CEST 2012


Dear Joonyoung,

On 12 October 2012 12:29, Joonyoung Shim <dofmind at gmail.com> wrote:
> Hi,
>
> 2012/10/12 Minkyu Kang <promsoft at gmail.com>:
>> Dear Piotr and Joonyoung,
>>
>> On 11 October 2012 17:14, Piotr Wilczek <p.wilczek at samsung.com> wrote:
>>> Hi Joonyoung,
>>>
>>>> -----Original Message-----
>>>> From: Joonyoung Shim [mailto:dofmind at gmail.com]
>>>> Sent: Thursday, October 11, 2012 3:11 AM
>>>> To: Piotr Wilczek
>>>> Cc: u-boot at lists.denx.de; Kyungmin Park
>>>> Subject: Re: [U-Boot] [PATCH 2/5] EXYNOS: Add Exynos4 I2C spacing
>>>>
>>>> Hi, Protr.
>>>>
>>>> 2012/9/24 Piotr Wilczek <p.wilczek at samsung.com>:
>>>> > This patch add the spacing for i2c for Exynos4
>>>> >
>>>> > Signed-off-by: Piotr Wilczek <p.wilczek at samsung.com>
>>>> > Signed-off-by: Kyungmin Park <kyungmin.park at samsung.com>
>>>> > CC: Minkyu Kang <mk7.kang at samsung.com>
>>>> > ---
>>>> >  arch/arm/include/asm/arch-exynos/cpu.h |    2 ++
>>>> >  1 files changed, 2 insertions(+), 0 deletions(-)
>>>> >
>>>> > diff --git a/arch/arm/include/asm/arch-exynos/cpu.h
>>>> > b/arch/arm/include/asm/arch-exynos/cpu.h
>>>> > index 5056b37..b70273c 100644
>>>> > --- a/arch/arm/include/asm/arch-exynos/cpu.h
>>>> > +++ b/arch/arm/include/asm/arch-exynos/cpu.h
>>>> > @@ -28,6 +28,8 @@
>>>> >  #define EXYNOS4_ADDR_BASE              0x10000000
>>>> >
>>>> >  /* EXYNOS4 */
>>>> > +#define EXYNOS4_I2C_SPACING            0x10000
>>>> > +
>>>>
>>>> Also EXYNOS5_I2C_SPACING is 0x10000, so how about define just
>>>> EXYNOS_I2C_SPACING for both EXYNOS4 and EXYNOS5?
>>> I agree it would simplify the code (s3c24x0_i2c driver). On the other hand,
>>> for code readability, maybe it is better to keep them separate as we do so
>>> with all defines for each Exynos.
>>>
>
> OK, but already s3c24x0_i2c driver has too many #ifdef statements, so i
> just concern it. We may need to use cpu_is_xxx to remove #ifdef.
>

Right.
We should do cleanup.
Actually, I don't want to use such a define and ifdefs.. like other devices.
I think, we can solve this problem by separate i2c driver from s3c24x0.
How you think?

-- 
from. prom.
www.promsoft.net


More information about the U-Boot mailing list