public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Heiko Schocher <hs@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/6] driver:i2c:s3c24x0: adapt driver to new i2c
Date: Mon, 18 Nov 2013 08:19:11 +0100	[thread overview]
Message-ID: <5289BF6F.7090409@denx.de> (raw)
In-Reply-To: <000601cee42d$48ad20d0$da076270$%wilczek@samsung.com>

Hello Piotr,

Am 18.11.2013 08:10, schrieb Piotr Wilczek:
> Hello Heiko,
>
>> -----Original Message-----
>> From: Heiko Schocher [mailto:hs at denx.de]
>> Sent: Monday, November 18, 2013 7:18 AM
>> To: Piotr Wilczek
>> Cc: u-boot at lists.denx.de; Minkyu Kang; Kyungmin Park
>> Subject: Re: [PATCH 1/6] driver:i2c:s3c24x0: adapt driver to new i2c
>>
>> Hello Piotr,
>>
>> Am 13.11.2013 15:31, schrieb Piotr Wilczek:
>>> The s3c24x0 i2c driver is adapted to new i2c framework.
>>>
>>> Signed-off-by: Piotr Wilczek<p.wilczek@samsung.com>
>>> Signed-off-by: Kyungmin Park<kyungmin.park@samsung.com>
>>> Cc: Minkyu Kang<mk7.kang@samsung.com>
>>> Cc: Heiko Schocher<hs@denx.de>
>>> ---
>>>    drivers/i2c/Makefile      |    2 +-
>>>    drivers/i2c/s3c24x0_i2c.c |  157 +++++++++++++++++++++++++++++-----
>> -----------
>>>    2 files changed, 101 insertions(+), 58 deletions(-)
>>
>> Thanks for your work! Ne real issues with your patch, but can you
>> squash your patchset in one patch, as we not want to lost "git bisect"
>> functionality.
> Ok.
>
>>
>> Beside of this, only minor comments:
>>
>> [...]
>>> diff --git a/drivers/i2c/s3c24x0_i2c.c b/drivers/i2c/s3c24x0_i2c.c
>>> index f77a9d1..0051cac 100644
>>> --- a/drivers/i2c/s3c24x0_i2c.c
>>> +++ b/drivers/i2c/s3c24x0_i2c.c
[...]
>>> @@ -254,17 +252,17 @@ static void ReadWriteByte(struct s3c24x0_i2c
>> *i2c)
>>>    	writel(readl(&i2c->iiccon)&   ~I2CCON_IRPND,&i2c->iiccon);
>>>    }
>>>
>>> -static struct s3c24x0_i2c *get_base_i2c(void)
>>> +static struct s3c24x0_i2c *get_base_i2c(int bus)
>>>    {
>>>    #ifdef CONFIG_EXYNOS4
>>>    	struct s3c24x0_i2c *i2c = (struct s3c24x0_i2c
>> *)(samsung_get_base_i2c()
>>>    							+
> (EXYNOS4_I2C_SPACING
>>> -							* g_current_bus));
>>> +							* bus));
>>>    	return i2c;
>>>    #elif defined CONFIG_EXYNOS5
>>>    	struct s3c24x0_i2c *i2c = (struct s3c24x0_i2c
>> *)(samsung_get_base_i2c()
>>>    							+
> (EXYNOS5_I2C_SPACING
>>> -							* g_current_bus));
>>> +							* bus));
>>>    	return i2c;
>>>    #else
>>>    	return s3c24x0_get_base_i2c();
>>> @@ -298,7 +296,6 @@ static void i2c_ch_init(struct s3c24x0_i2c *i2c,
>> int speed, int slaveadd)
>>>    	writel(I2C_MODE_MT | I2C_TXRX_ENA,&i2c->iicstat);
>>>    }
>>>
>>> -#ifdef CONFIG_I2C_MULTI_BUS
>>>    static int hsi2c_get_clk_details(struct s3c24x0_i2c_bus *i2c_bus)
>>>    {
>>>    	struct exynos5_hsi2c *hsregs = i2c_bus->hsregs; @@ -307,8 +304,10
>>> @@ static int hsi2c_get_clk_details(struct s3c24x0_i2c_bus *i2c_bus)
>>>    	unsigned int i = 0, utemp0 = 0, utemp1 = 0;
>>>    	unsigned int t_ftl_cycle;
>>>
>>> -#if defined CONFIG_EXYNOS5
>>> +#if (defined CONFIG_EXYNOS4 || defined CONFIG_EXYNOS5)
>>>    	clkin = get_i2c_clk();
>>> +#else
>>> +	clkin = get_PCLK();
>>>    #endif
>>
>> What has this change to do with the new i2c framework?
> Actually it is related to commit shaid: 296a461
> Without this change I get the uninitialized variable warning for Exynos 4.
> I can make a separate patch fix for this change if you prefer.

Yes, please.

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

  reply	other threads:[~2013-11-18  7:19 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-13 14:31 [U-Boot] [PATCH 0/6] adapt s3c24x0 driver to new i2c framework Piotr Wilczek
2013-11-13 14:31 ` [U-Boot] [PATCH 1/6] driver:i2c:s3c24x0: adapt driver to new i2c Piotr Wilczek
2013-11-18  6:17   ` Heiko Schocher
2013-11-18  7:10     ` Piotr Wilczek
2013-11-18  7:19       ` Heiko Schocher [this message]
2013-11-13 14:31 ` [U-Boot] [PATCH 2/6] board:arndale: switch to new i2c framework Piotr Wilczek
2013-11-13 14:31 ` [U-Boot] [PATCH 3/6] board:VCMA9 " Piotr Wilczek
2013-11-13 14:31 ` [U-Boot] [PATCH 4/6] board:smdk5250: " Piotr Wilczek
2013-11-13 14:31 ` [U-Boot] [PATCH 5/6] board:trats: " Piotr Wilczek
2013-11-13 14:31 ` [U-Boot] [PATCH 6/6] board:trats2: switch Trats2 " Piotr Wilczek
2013-11-20  9:43 ` [U-Boot] [PATCH V2 1/2] driver:i2c:s3c24x0: adapt driver to new i2c Piotr Wilczek
2013-11-20  9:43   ` [U-Boot] [PATCH 2/2] driver:i2c:s3c24x0: fix clock init for hsi2c Piotr Wilczek
2013-12-09  6:50     ` [U-Boot] [U-Boot, " Heiko Schocher
2013-11-20 12:08   ` [U-Boot] [PATCH V2 1/2] driver:i2c:s3c24x0: adapt driver to new i2c Naveen Krishna Ch
2013-11-20 14:15   ` Naveen Krishna Ch
2013-11-21  4:28     ` Heiko Schocher
2013-12-09  6:50   ` [U-Boot] [U-Boot, V2, " Heiko Schocher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5289BF6F.7090409@denx.de \
    --to=hs@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox