diff mbox

[V7,10/10] EXYNOS5: I2C: Added FDT and non-FDT support for I2C

Message ID 1362489090-7745-11-git-send-email-amarendra.xt@samsung.com
State New
Headers show

Commit Message

Amar March 5, 2013, 1:11 p.m. UTC
This patch adds FDT and non-FDT support for I2C, and initialise
the I2C channels.

Signed-off-by: Amar <amarendra.xt@samsung.com>
---
Changes since V4:
	New patch.

Changes since V5:
	1)Removed the function call i2c_init() present inside the
	function board_i2c_init().

Changes since V6:
	No change.

 drivers/i2c/s3c24x0_i2c.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

Comments

Hung-ying Tyan March 6, 2013, 10:21 a.m. UTC | #1
On Tue, Mar 5, 2013 at 9:11 PM, Amar <amarendra.xt@samsung.com> wrote:

> This patch adds FDT and non-FDT support for I2C, and initialise
> the I2C channels.
>
> Signed-off-by: Amar <amarendra.xt@samsung.com>
>

Tested-by: Hung-ying Tyan <tyanh@chromium.org>
Minkyu Kang March 28, 2013, 8:29 a.m. UTC | #2
Dear Amar,

On 05/03/13 22:11, Amar wrote:
> This patch adds FDT and non-FDT support for I2C, and initialise
> the I2C channels.
> 
> Signed-off-by: Amar <amarendra.xt@samsung.com>
> ---
> Changes since V4:
> 	New patch.
> 
> Changes since V5:
> 	1)Removed the function call i2c_init() present inside the
> 	function board_i2c_init().
> 
> Changes since V6:
> 	No change.
> 
>  drivers/i2c/s3c24x0_i2c.c | 12 ++++++++++--
>  1 file changed, 10 insertions(+), 2 deletions(-)
> 

I think, this patch should separate from this patchset.
Why you this add this "i2c" patch to
"EXYNOS5: Enable DWMMC, add FDT support for DWMMC and enable EMMC boot"?

Thanks,
Minkyu Kang.
Amarendra Reddy April 1, 2013, 11:37 a.m. UTC | #3
Dear Minkyu,

While creating the separate file(exynos5-dt.c) to handle dts, I had to do
the changes for i2c also. And those changes became part of this patchset.

Ok, I will separate this from the dwmmc patchset.

Thanks & Regards
Amarendra


On 28 March 2013 13:59, Minkyu Kang <mk7.kang@samsung.com> wrote:

> Dear Amar,
>
> On 05/03/13 22:11, Amar wrote:
> > This patch adds FDT and non-FDT support for I2C, and initialise
> > the I2C channels.
> >
> > Signed-off-by: Amar <amarendra.xt@samsung.com>
> > ---
> > Changes since V4:
> >       New patch.
> >
> > Changes since V5:
> >       1)Removed the function call i2c_init() present inside the
> >       function board_i2c_init().
> >
> > Changes since V6:
> >       No change.
> >
> >  drivers/i2c/s3c24x0_i2c.c | 12 ++++++++++--
> >  1 file changed, 10 insertions(+), 2 deletions(-)
> >
>
> I think, this patch should separate from this patchset.
> Why you this add this "i2c" patch to
> "EXYNOS5: Enable DWMMC, add FDT support for DWMMC and enable EMMC boot"?
>
> Thanks,
> Minkyu Kang.
> _______________________________________________
> U-Boot mailing list
> U-Boot@lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
>
Minkyu Kang April 1, 2013, 11:46 a.m. UTC | #4
On 01/04/13 20:37, Amarendra Reddy wrote:
> Dear Minkyu,
> 
> While creating the separate file(exynos5-dt.c) to handle dts, I had to do the changes for i2c also. And those changes became part of this patchset.
> 
> Ok, I will separate this from the dwmmc patchset.

OK. thanks.

btw, I've requested to you so many times..
"please don't top posting when replying".

> 
> Thanks & Regards
> Amarendra
> 
> 
> On 28 March 2013 13:59, Minkyu Kang <mk7.kang@samsung.com <mailto:mk7.kang@samsung.com>> wrote:
> 
>     Dear Amar,
> 
>     On 05/03/13 22:11, Amar wrote:
>     > This patch adds FDT and non-FDT support for I2C, and initialise
>     > the I2C channels.
>     >
>     > Signed-off-by: Amar <amarendra.xt@samsung.com <mailto:amarendra.xt@samsung.com>>
>     > ---
>     > Changes since V4:
>     >       New patch.
>     >
>     > Changes since V5:
>     >       1)Removed the function call i2c_init() present inside the
>     >       function board_i2c_init().
>     >
>     > Changes since V6:
>     >       No change.
>     >
>     >  drivers/i2c/s3c24x0_i2c.c | 12 ++++++++++--
>     >  1 file changed, 10 insertions(+), 2 deletions(-)
>     >
> 
>     I think, this patch should separate from this patchset.
>     Why you this add this "i2c" patch to
>     "EXYNOS5: Enable DWMMC, add FDT support for DWMMC and enable EMMC boot"?
> 
>     Thanks,
>     Minkyu Kang.
>     _______________________________________________
>     U-Boot mailing list
>     U-Boot@lists.denx.de <mailto:U-Boot@lists.denx.de>
>     http://lists.denx.de/mailman/listinfo/u-boot
> 
> 


Thanks,
Minkyu Kang.
diff mbox

Patch

diff --git a/drivers/i2c/s3c24x0_i2c.c b/drivers/i2c/s3c24x0_i2c.c
index 769a2ba..5b4c3d2 100644
--- a/drivers/i2c/s3c24x0_i2c.c
+++ b/drivers/i2c/s3c24x0_i2c.c
@@ -524,11 +524,12 @@  int i2c_write(uchar chip, uint addr, int alen, uchar *buffer, int len)
 		 len) != 0);
 }
 
-#ifdef CONFIG_OF_CONTROL
 void board_i2c_init(const void *blob)
 {
+	int i;
+#ifdef CONFIG_OF_CONTROL
 	int node_list[CONFIG_MAX_I2C_NUM];
-	int count, i;
+	int count;
 
 	count = fdtdec_find_aliases_for_id(blob, "i2c",
 		COMPAT_SAMSUNG_S3C2440_I2C, node_list,
@@ -548,8 +549,15 @@  void board_i2c_init(const void *blob)
 		bus->bus_num = i2c_busses++;
 		exynos_pinmux_config(bus->id, 0);
 	}
+#else
+	for (i = 0; i < CONFIG_MAX_I2C_NUM; i++) {
+		exynos_pinmux_config((PERIPH_ID_I2C0 + i),
+					PINMUX_FLAG_NONE);
+	}
+#endif
 }
 
+#ifdef CONFIG_OF_CONTROL
 static struct s3c24x0_i2c_bus *get_bus(unsigned int bus_idx)
 {
 	if (bus_idx < i2c_busses)