[PATCH] arm: exynos4: address a section mismatch w/ suspend issue.

2011-05-25 Thread MyungJoo Ham
The section mismatch in headsmp.S made hotplug stop working after the
first instance of suspend-to-RAM and its wakeup.

Signed-off-by: MyungJoo Ham 
Signed-off-by: Kyungmin Park 
---
 arch/arm/mach-exynos4/headsmp.S |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-exynos4/headsmp.S b/arch/arm/mach-exynos4/headsmp.S
index 6c6cfc5..3cdeb36 100644
--- a/arch/arm/mach-exynos4/headsmp.S
+++ b/arch/arm/mach-exynos4/headsmp.S
@@ -13,7 +13,7 @@
 #include 
 #include 
 
-   __INIT
+   __CPUINIT
 
 /*
  * exynos4 specific entry point for secondary CPUs.  This provides
-- 
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFC][PATCH 0/7] ARM: Add clkdev support for Samsung's platforms

2011-05-25 Thread Thomas Abraham
Hi Mr. Kukjin Kim,

On Thu, May 26, 2011 at 3:22 AM, Kukjin Kim  wrote:
> On 05/19/11 14:18, Thomas Abraham wrote:
>>
>> Thomas Abraham (7):
>>   ARM: SAMSUNG: Add clkdev infrastructure
>>   ARM: S3C24XX: Add clkdev support
>>   ARM: S3C64XX: Add clkdev support
>>   ARM: S5P64X0: Add clkdev support
>>   ARM: S5PC100: Add clkdev support
>>   ARM: S5PV210: Add clkdev support
>>   ARM: Exynos4: Add clkdev support
>>
>>  arch/arm/Kconfig                            |    6 ++
>>  arch/arm/mach-exynos4/clock.c               |   63 +++-
>>  arch/arm/mach-exynos4/include/mach/clkdev.h |    7 ++
>>  arch/arm/mach-exynos4/time.c                |    2 +
>>  arch/arm/mach-s3c2412/clock.c               |    3 +
>>  arch/arm/mach-s3c2416/clock.c               |    5 ++
>>  arch/arm/mach-s3c2443/clock.c               |    4 +
>>  arch/arm/mach-s3c64xx/clock.c               |   25 
>>  arch/arm/mach-s3c64xx/include/mach/clkdev.h |    7 ++
>>  arch/arm/mach-s5p64x0/clock-s5p6440.c       |   20 +++
>>  arch/arm/mach-s5p64x0/clock-s5p6450.c       |   19 ++
>>  arch/arm/mach-s5p64x0/include/mach/clkdev.h |    7 ++
>>  arch/arm/mach-s5pc100/clock.c               |   42 +-
>>  arch/arm/mach-s5pc100/include/mach/clkdev.h |    7 ++
>>  arch/arm/mach-s5pv210/clock.c               |   42 +-
>>  arch/arm/mach-s5pv210/include/mach/clkdev.h |    7 ++
>>  arch/arm/plat-s3c24xx/include/mach/clkdev.h |    7 ++
>>  arch/arm/plat-s3c24xx/s3c2410-clock.c       |    3 +
>>  arch/arm/plat-s3c24xx/s3c2443-clock.c       |    4 +
>>  arch/arm/plat-s5p/s5p-time.c                |    9 +++
>>  arch/arm/plat-samsung/clock.c               |   83
>> ++-
>>  arch/arm/plat-samsung/include/plat/clock.h  |    3 +
>>  arch/arm/plat-samsung/pwm-clock.c           |   10 +++
>>  arch/arm/plat-samsung/time.c                |    2 +
>>  24 files changed, 303 insertions(+), 84 deletions(-)
>>  create mode 100644 arch/arm/mach-exynos4/include/mach/clkdev.h
>>  create mode 100644 arch/arm/mach-s3c64xx/include/mach/clkdev.h
>>  create mode 100644 arch/arm/mach-s5p64x0/include/mach/clkdev.h
>>  create mode 100644 arch/arm/mach-s5pc100/include/mach/clkdev.h
>>  create mode 100644 arch/arm/mach-s5pv210/include/mach/clkdev.h
>>  create mode 100644 arch/arm/plat-s3c24xx/include/mach/clkdev.h
>>
> Hi Thomas,
>
> Thanks for this patches :)
>
> There are some comments in each patches and I need to check again about the
> devname like following.
>
> s5p-fimc vs. s5pv210-fimc
> sdhci-s3c vs. s3c-sdhci
> and so on...
>
> Since I'm out of office now, don't have all regarding materials. I will back
> this soon.

Thanks for reviewing the patches. I will rework the patches as per
your comments and submit again.

Thanks,
Thomas.

>
> Thanks.
>
> Best regards,
> Kgene.
> --
> Kukjin Kim , Senior Engineer,
> SW Solution Development Team, Samsung Electronics Co., Ltd.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc"
> in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 4/7] ARM: S5P64X0: Add clkdev support

2011-05-25 Thread Thomas Abraham
Hi Mr. Kukjin Kim,

On Thu, May 26, 2011 at 3:15 AM, Kukjin Kim  wrote:
> On 05/19/11 14:18, Thomas Abraham wrote:
>>
>> Add clkdev support for Samsung's s5p64x0 platforms.
>>
>> Signed-off-by: Thomas Abraham
>> ---
>>  arch/arm/Kconfig                            |    1 +
>>  arch/arm/mach-s5p64x0/clock-s5p6440.c       |   20 
>>  arch/arm/mach-s5p64x0/clock-s5p6450.c       |   19 +++
>>  arch/arm/mach-s5p64x0/include/mach/clkdev.h |    7 +++
>>  arch/arm/plat-s5p/s5p-time.c                |    9 +
>>  5 files changed, 56 insertions(+), 0 deletions(-)
>>  create mode 100644 arch/arm/mach-s5p64x0/include/mach/clkdev.h
>
> (snip)
>
> I wonder why following is included in this, "S5P64X0: Add clkdev support".

For clock lookups (using clk_get) based on clkdev, the platform
devices should be registered before calling the clk_get function. In
this case, the clk_get is called when platform devices
(s3c_device_timer[]) is not registered. So these platform devices can
be assigned a init_name which is then used by clk_dev to lookup the
clocks. So, that is the reason for modifying the clock lookup in
s5p-time.c file.

Thanks,
Thomas.

>
>> diff --git a/arch/arm/plat-s5p/s5p-time.c b/arch/arm/plat-s5p/s5p-time.c
>> index 8090403..d9efd29 100644
>> --- a/arch/arm/plat-s5p/s5p-time.c
>> +++ b/arch/arm/plat-s5p/s5p-time.c
>> @@ -408,6 +408,7 @@ static void __init s5p_timer_resources(void)
>>
>>        unsigned long event_id = timer_source.event_id;
>>        unsigned long source_id = timer_source.source_id;
>> +       char devname[15];
>>
>>        timerclk = clk_get(NULL, "timers");
>>        if (IS_ERR(timerclk))
>> @@ -415,6 +416,10 @@ static void __init s5p_timer_resources(void)
>>
>>        clk_enable(timerclk);
>>
>> +       sprintf(devname, "s3c24xx-pwm.%lu", event_id);
>> +       s3c_device_timer[event_id].id = event_id;
>> +       s3c_device_timer[event_id].dev.init_name = devname;
>> +
>>        tin_event = clk_get(&s3c_device_timer[event_id].dev, "pwm-tin");
>>        if (IS_ERR(tin_event))
>>                panic("failed to get pwm-tin clock for event timer");
>> @@ -425,6 +430,10 @@ static void __init s5p_timer_resources(void)
>>
>>        clk_enable(tin_event);
>>
>> +       sprintf(devname, "s3c24xx-pwm.%lu", source_id);
>> +       s3c_device_timer[source_id].id = source_id;
>> +       s3c_device_timer[source_id].dev.init_name = devname;
>> +
>>        tin_source = clk_get(&s3c_device_timer[source_id].dev, "pwm-tin");
>>        if (IS_ERR(tin_source))
>>                panic("failed to get pwm-tin clock for source timer");
>
>
> Thanks.
>
> Best regards,
> Kgene.
> --
> Kukjin Kim , Senior Engineer,
> SW Solution Development Team, Samsung Electronics Co., Ltd.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc"
> in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 7/7] ARM: Exynos4: Add clkdev support

2011-05-25 Thread Thomas Abraham
Hi Mr. Kukjin Kim,

On Thu, May 26, 2011 at 3:04 AM, Kukjin Kim  wrote:
> On 05/19/11 14:18, Thomas Abraham wrote:
>>
>> Add clkdev support for Samsung's Exynos4 platform.
>>
>> Signed-off-by: Thomas Abraham
>> ---
>>  arch/arm/Kconfig                            |    1 +
>>  arch/arm/mach-exynos4/clock.c               |   63
>> +--
>>  arch/arm/mach-exynos4/include/mach/clkdev.h |    7 +++
>>  arch/arm/mach-exynos4/time.c                |    2 +
>>  4 files changed, 69 insertions(+), 4 deletions(-)
>>  create mode 100644 arch/arm/mach-exynos4/include/mach/clkdev.h
>>
>
> (snip)
>
>> -               .name           = "hsmmc",
>> -               .id             = 4,
>> +               .name           = "dwmmc",
>> +               .id             = -1,
>
> This change should be split :)

Ok. I will move these changes to another patch.

Thanks,
Thomas.

>
> (snip)
>
>> @@ -1072,8 +1127,8 @@ static struct clksrc_clk clksrcs[] = {
>>                .reg_div = { .reg = S5P_CLKDIV_FSYS2, .shift = 24, .size =
>> 8 },
>>        }, {
>>                .clk            = {
>> -                       .name           = "sclk_mmc",
>> -                       .id             = 4,
>> +                       .name           = "sclk_dwmmc",
>> +                       .id             = -1,
>
> Same as above.
>
> Thanks.
>
> Best regards,
> Kgene.
> --
> Kukjin Kim , Senior Engineer,
> SW Solution Development Team, Samsung Electronics Co., Ltd.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc"
> in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFC][PATCH 0/7] ARM: Add clkdev support for Samsung's platforms

2011-05-25 Thread Kukjin Kim

On 05/19/11 14:18, Thomas Abraham wrote:

Thomas Abraham (7):
   ARM: SAMSUNG: Add clkdev infrastructure
   ARM: S3C24XX: Add clkdev support
   ARM: S3C64XX: Add clkdev support
   ARM: S5P64X0: Add clkdev support
   ARM: S5PC100: Add clkdev support
   ARM: S5PV210: Add clkdev support
   ARM: Exynos4: Add clkdev support

  arch/arm/Kconfig|6 ++
  arch/arm/mach-exynos4/clock.c   |   63 +++-
  arch/arm/mach-exynos4/include/mach/clkdev.h |7 ++
  arch/arm/mach-exynos4/time.c|2 +
  arch/arm/mach-s3c2412/clock.c   |3 +
  arch/arm/mach-s3c2416/clock.c   |5 ++
  arch/arm/mach-s3c2443/clock.c   |4 +
  arch/arm/mach-s3c64xx/clock.c   |   25 
  arch/arm/mach-s3c64xx/include/mach/clkdev.h |7 ++
  arch/arm/mach-s5p64x0/clock-s5p6440.c   |   20 +++
  arch/arm/mach-s5p64x0/clock-s5p6450.c   |   19 ++
  arch/arm/mach-s5p64x0/include/mach/clkdev.h |7 ++
  arch/arm/mach-s5pc100/clock.c   |   42 +-
  arch/arm/mach-s5pc100/include/mach/clkdev.h |7 ++
  arch/arm/mach-s5pv210/clock.c   |   42 +-
  arch/arm/mach-s5pv210/include/mach/clkdev.h |7 ++
  arch/arm/plat-s3c24xx/include/mach/clkdev.h |7 ++
  arch/arm/plat-s3c24xx/s3c2410-clock.c   |3 +
  arch/arm/plat-s3c24xx/s3c2443-clock.c   |4 +
  arch/arm/plat-s5p/s5p-time.c|9 +++
  arch/arm/plat-samsung/clock.c   |   83 ++-
  arch/arm/plat-samsung/include/plat/clock.h  |3 +
  arch/arm/plat-samsung/pwm-clock.c   |   10 +++
  arch/arm/plat-samsung/time.c|2 +
  24 files changed, 303 insertions(+), 84 deletions(-)
  create mode 100644 arch/arm/mach-exynos4/include/mach/clkdev.h
  create mode 100644 arch/arm/mach-s3c64xx/include/mach/clkdev.h
  create mode 100644 arch/arm/mach-s5p64x0/include/mach/clkdev.h
  create mode 100644 arch/arm/mach-s5pc100/include/mach/clkdev.h
  create mode 100644 arch/arm/mach-s5pv210/include/mach/clkdev.h
  create mode 100644 arch/arm/plat-s3c24xx/include/mach/clkdev.h


Hi Thomas,

Thanks for this patches :)

There are some comments in each patches and I need to check again about 
the devname like following.


s5p-fimc vs. s5pv210-fimc
sdhci-s3c vs. s3c-sdhci
and so on...

Since I'm out of office now, don't have all regarding materials. I will 
back this soon.


Thanks.

Best regards,
Kgene.
--
Kukjin Kim , Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 4/7] ARM: S5P64X0: Add clkdev support

2011-05-25 Thread Kukjin Kim

On 05/19/11 14:18, Thomas Abraham wrote:

Add clkdev support for Samsung's s5p64x0 platforms.

Signed-off-by: Thomas Abraham
---
  arch/arm/Kconfig|1 +
  arch/arm/mach-s5p64x0/clock-s5p6440.c   |   20 
  arch/arm/mach-s5p64x0/clock-s5p6450.c   |   19 +++
  arch/arm/mach-s5p64x0/include/mach/clkdev.h |7 +++
  arch/arm/plat-s5p/s5p-time.c|9 +
  5 files changed, 56 insertions(+), 0 deletions(-)
  create mode 100644 arch/arm/mach-s5p64x0/include/mach/clkdev.h


(snip)

I wonder why following is included in this, "S5P64X0: Add clkdev support".


diff --git a/arch/arm/plat-s5p/s5p-time.c b/arch/arm/plat-s5p/s5p-time.c
index 8090403..d9efd29 100644
--- a/arch/arm/plat-s5p/s5p-time.c
+++ b/arch/arm/plat-s5p/s5p-time.c
@@ -408,6 +408,7 @@ static void __init s5p_timer_resources(void)

unsigned long event_id = timer_source.event_id;
unsigned long source_id = timer_source.source_id;
+   char devname[15];

timerclk = clk_get(NULL, "timers");
if (IS_ERR(timerclk))
@@ -415,6 +416,10 @@ static void __init s5p_timer_resources(void)

clk_enable(timerclk);

+   sprintf(devname, "s3c24xx-pwm.%lu", event_id);
+   s3c_device_timer[event_id].id = event_id;
+   s3c_device_timer[event_id].dev.init_name = devname;
+
tin_event = clk_get(&s3c_device_timer[event_id].dev, "pwm-tin");
if (IS_ERR(tin_event))
panic("failed to get pwm-tin clock for event timer");
@@ -425,6 +430,10 @@ static void __init s5p_timer_resources(void)

clk_enable(tin_event);

+   sprintf(devname, "s3c24xx-pwm.%lu", source_id);
+   s3c_device_timer[source_id].id = source_id;
+   s3c_device_timer[source_id].dev.init_name = devname;
+
tin_source = clk_get(&s3c_device_timer[source_id].dev, "pwm-tin");
if (IS_ERR(tin_source))
panic("failed to get pwm-tin clock for source timer");



Thanks.

Best regards,
Kgene.
--
Kukjin Kim , Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 5/7] ARM: S5PC100: Add clkdev support

2011-05-25 Thread Kukjin Kim

On 05/19/11 14:18, Thomas Abraham wrote:

Add clkdev support for Samsung's s5pc100 platforms.

Signed-off-by: Thomas Abraham
---
  arch/arm/Kconfig|1 +
  arch/arm/mach-s5pc100/clock.c   |   42 ++-
  arch/arm/mach-s5pc100/include/mach/clkdev.h |7 
  3 files changed, 49 insertions(+), 1 deletions(-)
  create mode 100644 arch/arm/mach-s5pc100/include/mach/clkdev.h



(snip)


@@ -549,7 +557,7 @@ static struct clk init_clocks_off[] = {
.ctrlbit= (1 <<  7),
}, {
.name   = "g3d",
-   .id = 0,
+   .id = -1,


should be split

(snip)

Thanks.

Best regards,
Kgene.
--
Kukjin Kim , Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 6/7] ARM: S5PV210: Add clkdev support

2011-05-25 Thread Kukjin Kim

On 05/19/11 14:18, Thomas Abraham wrote:

Add clkdev support for Samsung's s5pv210 platform.

Signed-off-by: Thomas Abraham
---
  arch/arm/Kconfig|1 +
  arch/arm/mach-s5pv210/clock.c   |   42 ++-
  arch/arm/mach-s5pv210/include/mach/clkdev.h |7 
  3 files changed, 49 insertions(+), 1 deletions(-)
  create mode 100644 arch/arm/mach-s5pv210/include/mach/clkdev.h



(snip)


@@ -366,30 +371,34 @@ static struct clk init_clocks_off[] = {
.ctrlbit= (1<<0),
}, {
.name   = "cfcon",
-   .id = 0,
+   .id = -1,


Should be split.

--
Thanks.

Best regards,
Kgene.
--
Kukjin Kim , Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 7/7] ARM: Exynos4: Add clkdev support

2011-05-25 Thread Kukjin Kim

On 05/19/11 14:18, Thomas Abraham wrote:

Add clkdev support for Samsung's Exynos4 platform.

Signed-off-by: Thomas Abraham
---
  arch/arm/Kconfig|1 +
  arch/arm/mach-exynos4/clock.c   |   63 +--
  arch/arm/mach-exynos4/include/mach/clkdev.h |7 +++
  arch/arm/mach-exynos4/time.c|2 +
  4 files changed, 69 insertions(+), 4 deletions(-)
  create mode 100644 arch/arm/mach-exynos4/include/mach/clkdev.h



(snip)


-   .name   = "hsmmc",
-   .id = 4,
+   .name   = "dwmmc",
+   .id = -1,


This change should be split :)

(snip)


@@ -1072,8 +1127,8 @@ static struct clksrc_clk clksrcs[] = {
.reg_div = { .reg = S5P_CLKDIV_FSYS2, .shift = 24, .size = 8 },
}, {
.clk= {
-   .name   = "sclk_mmc",
-   .id = 4,
+   .name   = "sclk_dwmmc",
+   .id = -1,


Same as above.

Thanks.

Best regards,
Kgene.
--
Kukjin Kim , Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [GIT PULL] Samsung S5P for 2.6.40 merge window

2011-05-25 Thread Kukjin Kim

On 05/25/11 13:50, Russell King - ARM Linux wrote:

On Wed, May 25, 2011 at 11:11:37AM -0700, Kukjin Kim wrote:

These things are for 2.6.40 and it includes removing ARCH_S5P6442.
Actually there is no user now and if required will merge it into other
ARCH like ARCH_S5P64X0 later.


I have a merge conflict with this, and resolved it as below.  Please check
whether this is correct.


Hi Russell,

It's correct :)

Thanks.

Best regards,
Kgene.
--
Kukjin Kim , Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.


diff --cc arch/arm/Kconfig
index 3bc1a58,e81c72c..f7cce8b
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@@ -2028,7 -1998,7 +2016,7 @@@ menu "Power management options
   source "kernel/power/Kconfig"

   config ARCH_SUSPEND_POSSIBLE
-   depends on !ARCH_S5P64X0&&  !ARCH_S5P6442&&  !ARCH_S5PC100
  - depends on !ARCH_S5P64X0
++  depends on !ARCH_S5P64X0&&  !ARCH_S5PC100
depends on CPU_ARM920T || CPU_ARM926T || CPU_SA1100 || \
CPU_V6 || CPU_V6K || CPU_V7 || CPU_XSC3 || CPU_XSCALE
def_bool y
diff --cc arch/arm/mach-exynos4/Kconfig
index 8051962,11b57a4..b92c1e5
--- a/arch/arm/mach-exynos4/Kconfig
+++ b/arch/arm/mach-exynos4/Kconfig
@@@ -169,9 -169,10 +169,11 @@@ config MACH_NUR
select S3C_DEV_HSMMC2
select S3C_DEV_HSMMC3
select S3C_DEV_I2C1
+   select S3C_DEV_I2C3
select S3C_DEV_I2C5
  + select S5P_DEV_USB_EHCI
select EXYNOS4_SETUP_I2C1
+   select EXYNOS4_SETUP_I2C3
select EXYNOS4_SETUP_I2C5
select EXYNOS4_SETUP_SDHCI
select SAMSUNG_DEV_PWM
diff --cc arch/arm/mach-exynos4/mach-nuri.c
index bb5d12f,d13c5e8..642702b
--- a/arch/arm/mach-exynos4/mach-nuri.c
+++ b/arch/arm/mach-exynos4/mach-nuri.c
@@@ -30,8 -31,8 +31,10 @@@
   #include
   #include
   #include
  +#include
  +#include
+ #include
+ #include

   #include

@@@ -282,7 -355,7 +367,8 @@@ static struct platform_device *nuri_dev
&s3c_device_hsmmc3,
&s3c_device_wdt,
&s3c_device_timer[0],
  + &s5p_device_ehci,
+   &s3c_device_i2c3,

/* NURI Devices */
&nuri_gpio_keys,
@@@ -300,13 -373,13 +386,16 @@@ static void __init nuri_map_io(void
   static void __init nuri_machine_init(void)
   {
nuri_sdhci_init();
+   nuri_tsp_init();

i2c_register_board_info(1, i2c1_devs, ARRAY_SIZE(i2c1_devs));
+   s3c_i2c3_set_platdata(&i2c3_data);
+   i2c_register_board_info(3, i2c3_devs, ARRAY_SIZE(i2c3_devs));
i2c_register_board_info(5, i2c5_devs, ARRAY_SIZE(i2c5_devs));

  + nuri_ehci_init();
  + clk_xusbxti.rate = 2400;
  +
/* Last */
platform_add_devices(nuri_devices, ARRAY_SIZE(nuri_devices));
   }
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [GIT PULL] Samsung S5P for 2.6.40 merge window

2011-05-25 Thread Russell King - ARM Linux
On Wed, May 25, 2011 at 11:11:37AM -0700, Kukjin Kim wrote:
> These things are for 2.6.40 and it includes removing ARCH_S5P6442.  
> Actually there is no user now and if required will merge it into other  
> ARCH like ARCH_S5P64X0 later.

I have a merge conflict with this, and resolved it as below.  Please check
whether this is correct.

diff --cc arch/arm/Kconfig
index 3bc1a58,e81c72c..f7cce8b
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@@ -2028,7 -1998,7 +2016,7 @@@ menu "Power management options
  source "kernel/power/Kconfig"
  
  config ARCH_SUSPEND_POSSIBLE
-   depends on !ARCH_S5P64X0 && !ARCH_S5P6442 && !ARCH_S5PC100
 -  depends on !ARCH_S5P64X0
++  depends on !ARCH_S5P64X0 && !ARCH_S5PC100
depends on CPU_ARM920T || CPU_ARM926T || CPU_SA1100 || \
CPU_V6 || CPU_V6K || CPU_V7 || CPU_XSC3 || CPU_XSCALE
def_bool y
diff --cc arch/arm/mach-exynos4/Kconfig
index 8051962,11b57a4..b92c1e5
--- a/arch/arm/mach-exynos4/Kconfig
+++ b/arch/arm/mach-exynos4/Kconfig
@@@ -169,9 -169,10 +169,11 @@@ config MACH_NUR
select S3C_DEV_HSMMC2
select S3C_DEV_HSMMC3
select S3C_DEV_I2C1
+   select S3C_DEV_I2C3
select S3C_DEV_I2C5
 +  select S5P_DEV_USB_EHCI
select EXYNOS4_SETUP_I2C1
+   select EXYNOS4_SETUP_I2C3
select EXYNOS4_SETUP_I2C5
select EXYNOS4_SETUP_SDHCI
select SAMSUNG_DEV_PWM
diff --cc arch/arm/mach-exynos4/mach-nuri.c
index bb5d12f,d13c5e8..642702b
--- a/arch/arm/mach-exynos4/mach-nuri.c
+++ b/arch/arm/mach-exynos4/mach-nuri.c
@@@ -30,8 -31,8 +31,10 @@@
  #include 
  #include 
  #include 
 +#include 
 +#include 
+ #include 
+ #include 
  
  #include 
  
@@@ -282,7 -355,7 +367,8 @@@ static struct platform_device *nuri_dev
&s3c_device_hsmmc3,
&s3c_device_wdt,
&s3c_device_timer[0],
 +  &s5p_device_ehci,
+   &s3c_device_i2c3,
  
/* NURI Devices */
&nuri_gpio_keys,
@@@ -300,13 -373,13 +386,16 @@@ static void __init nuri_map_io(void
  static void __init nuri_machine_init(void)
  {
nuri_sdhci_init();
+   nuri_tsp_init();
  
i2c_register_board_info(1, i2c1_devs, ARRAY_SIZE(i2c1_devs));
+   s3c_i2c3_set_platdata(&i2c3_data);
+   i2c_register_board_info(3, i2c3_devs, ARRAY_SIZE(i2c3_devs));
i2c_register_board_info(5, i2c5_devs, ARRAY_SIZE(i2c5_devs));
  
 +  nuri_ehci_init();
 +  clk_xusbxti.rate = 2400;
 +
/* Last */
platform_add_devices(nuri_devices, ARRAY_SIZE(nuri_devices));
  }
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] ARM: exynos4: fix secondary CPU boot

2011-05-25 Thread Kukjin Kim

On 05/25/11 11:04, Marc Zyngier wrote:

On Wed, 2011-05-25 at 10:28 -0700, Kukjin Kim wrote:

On 05/20/11 06:46, Marc Zyngier wrote:


(snip)


So that address has changed between two SoC revisions? That's
unfortunate, to say the least. I'm most probably using an early revision
of the hardware (EVT0?), as it doesn't even support MCT.

I'm afraid :( and I agree secondary CPU should work on all of 
Exynos4210. But I'm still think about the method...



What about the following patch?


Uhm...this is really hack but I'd like to use another normal way...?


M.


From c27e75b86e1ee181987a9364286a888421e76205 Mon Sep 17 00:00:00 2001

From: Marc Zyngier
Date: Fri, 20 May 2011 14:38:25 +0100
Subject: [PATCH] ARM: exynos4: fix secondary CPU boot on early SoC revisions

It appears that the system-wide flags register that used to be at
0x02025000 on the first revision of Exynos4 has moved to 0x0202.

The kernel has been updated accordingly, but this unfortunately leaves
early boards without SMP support (the secondary CPU spins endlessly
in BL0 waiting for an address to be written at that memory location).

Try to solve the problem by poking both locations. This should be
safe as this is done early enough in the kernel boot process, and nobody
should be using the SRAM yet.

Tested on a vintage SMDK-v310.


vintage ;)



Cc: Kukjin Kim
Signed-off-by: Marc Zyngier
---
  arch/arm/mach-exynos4/include/mach/map.h |1 +
  arch/arm/mach-exynos4/platsmp.c  |   14 ++
  2 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-exynos4/include/mach/map.h 
b/arch/arm/mach-exynos4/include/mach/map.h
index 0009e77..781e149 100644
--- a/arch/arm/mach-exynos4/include/mach/map.h
+++ b/arch/arm/mach-exynos4/include/mach/map.h
@@ -24,6 +24,7 @@
  #include

  #define EXYNOS4_PA_SYSRAM 0x0202
+#define EXYNOS4_PA_SYSRAM_EVT0 0x02025000

  #define EXYNOS4_PA_FIMC0  0x1180
  #define EXYNOS4_PA_FIMC1  0x1181
diff --git a/arch/arm/mach-exynos4/platsmp.c b/arch/arm/mach-exynos4/platsmp.c
index c5e65a0..f261c34 100644
--- a/arch/arm/mach-exynos4/platsmp.c
+++ b/arch/arm/mach-exynos4/platsmp.c
@@ -155,6 +155,7 @@ void __init smp_init_cpus(void)
  void __init platform_smp_prepare_cpus(unsigned int max_cpus)
  {
int i;
+   void __iomem *sysram_evt0;

/*
 * Initialise the present map, which describes the set of CPUs
@@ -172,4 +173,17 @@ void __init platform_smp_prepare_cpus(unsigned int 
max_cpus)
 * secondary CPU branches to this address.
 */
__raw_writel(BSYM(virt_to_phys(exynos4_secondary_startup)), 
S5P_VA_SYSRAM);
+
+   /*
+* EVT0 has the system-wide flags register at a different address.
+* Poke it as well, in case we're running on an old SoC revision.
+*/
+   sysram_evt0 = ioremap(EXYNOS4_PA_SYSRAM_EVT0, SZ_4K);


Hmm...first of all, need to check whether can ioremap the area on newer 
one but I'm out off office now so will check it after backing.



+   if (!sysram_evt0) {
+   pr_err("Unable to remap EXYNOS4_PA_SYSRAM_EVT0\n");


Do we really need 'pr_err' here?...


+   return;
+   }
+
+   __raw_writel(BSYM(virt_to_phys(exynos4_secondary_startup)), 
sysram_evt0);
+   iounmap(sysram_evt0);
  }


--
Thanks.

Best regards,
Kgene.
--
Kukjin Kim , Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] ARM: EXYNOS4: Enable WM8994 MFD on I2S selection

2011-05-25 Thread Kukjin Kim

On 05/25/11 11:15, Jassi Brar wrote:

diff --git a/sound/soc/samsung/Kconfig b/sound/soc/samsung/Kconfig
index a3fdfb6..a80eeb1 100644
--- a/sound/soc/samsung/Kconfig
+++ b/sound/soc/samsung/Kconfig
@@ -65,6 +65,9 @@ config SND_SOC_SAMSUNG_SMDK_WM8994
tristate "SoC I2S Audio support for WM8994 on SMDK"
depends on SND_SOC_SAMSUNG&&(MACH_SMDKV310 || MACH_SMDKC210)
select SND_SOC_WM8994
+   select MFD_SUPPORT
+   select I2C_S3C2410
+   select MFD_WM8994


I'm not sure about MFD configs, but if "select I2C_S3C2410" is required, it
should be moved into regarding Kconfig of arch/arm, because it is related to
dependency of ARCH. Maybe in this case, arch/arm/mach-exynos4/Kconfig?


I2C here is a SMDK specific requirement and even if most devices need I2C,
selecting I2C for every EXYNOS4210 based device is not ideal. IMO it'd better
be tied to some SMDK specific config option.



Hi Jassi :)

How are you?

Hmm...need to think again because as you know, basically all of boards 
can be compiled with one exynos4_defconfig.


Ok, so you agreed it should be moved into some Kconfig of arch/arm/ :)
I will think again which one is more reasonable then let you know.

--
Thanks.

Best regards,
Kgene.
--
Kukjin Kim , Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] ARM: EXYNOS4: Enable WM8994 MFD on I2S selection

2011-05-25 Thread Jassi Brar
>> diff --git a/sound/soc/samsung/Kconfig b/sound/soc/samsung/Kconfig
>> index a3fdfb6..a80eeb1 100644
>> --- a/sound/soc/samsung/Kconfig
>> +++ b/sound/soc/samsung/Kconfig
>> @@ -65,6 +65,9 @@ config SND_SOC_SAMSUNG_SMDK_WM8994
>>        tristate "SoC I2S Audio support for WM8994 on SMDK"
>>        depends on SND_SOC_SAMSUNG&&  (MACH_SMDKV310 || MACH_SMDKC210)
>>        select SND_SOC_WM8994
>> +       select MFD_SUPPORT
>> +       select I2C_S3C2410
>> +       select MFD_WM8994
>
> I'm not sure about MFD configs, but if "select I2C_S3C2410" is required, it
> should be moved into regarding Kconfig of arch/arm, because it is related to
> dependency of ARCH. Maybe in this case, arch/arm/mach-exynos4/Kconfig?

I2C here is a SMDK specific requirement and even if most devices need I2C,
selecting I2C for every EXYNOS4210 based device is not ideal. IMO it'd better
be tied to some SMDK specific config option.

Cheer!
Jassi
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[GIT PULL] Samsung S5P for 2.6.40 merge window

2011-05-25 Thread Kukjin Kim


Hi Russell,

Please pull Samsung S5P updates from:

git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung.git
for-rmk

These things are for 2.6.40 and it includes removing ARCH_S5P6442. 
Actually there is no user now and if required will merge it into other 
ARCH like ARCH_S5P64X0 later.


As a note, I missed 'pull request' some fixes for s5p last -rc duration 
and I don't have it in my laptop. I'm out of office now :( so will send 
fixes after rc1.


If any problems, please let me know.

Thanks.

Best regards,
Kgene.
--
Kukjin Kim , Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.

The following changes since commit 693d92a1bbc9e42681c42ed190bd42b636ca876f

  Linux 2.6.39-rc7

are available in the git repository at:
   git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung.git
for-rmk

Jaecheol Lee (1):
  ARM: EXYNOS4: CPUIDLE Support

Joonyoung Shim (2):
  ARM: EXYNOS4: Add Atmel mXT touchscreen device to the NURI board
  ARM: S3C64XX: Remove gpio-bank-X header files

Kukjin Kim (4):
  ARM: exynos4_defconfig: Update for adding machines
  ARM: S5P6442: Removing ARCH_S5P6442
  ASoC: Remove to support sound for S5P6442
  Merge branch 'dev/removing-s5p6442' into for-next

 Documentation/arm/Samsung/Overview.txt   |2 -
 arch/arm/Kconfig |   16 +-
 arch/arm/Makefile|1 -
 arch/arm/common/Kconfig  |2 +-
 arch/arm/configs/exynos4_defconfig   |2 +
 arch/arm/configs/s5p6442_defconfig   |   65 
 arch/arm/mach-exynos4/Kconfig|2 +
 arch/arm/mach-exynos4/Makefile   |1 +
 arch/arm/mach-exynos4/cpuidle.c  |   86 +
 arch/arm/mach-exynos4/mach-nuri.c|   89 +
 arch/arm/mach-s3c64xx/dev-spi.c  |   20 +-
 arch/arm/mach-s3c64xx/include/mach/gpio-bank-a.h |   48 ---
 arch/arm/mach-s3c64xx/include/mach/gpio-bank-b.h |   60 ---
 arch/arm/mach-s3c64xx/include/mach/gpio-bank-c.h |   53 ---
 arch/arm/mach-s3c64xx/include/mach/gpio-bank-d.h |   49 ---
 arch/arm/mach-s3c64xx/include/mach/gpio-bank-e.h |   44 ---
 arch/arm/mach-s3c64xx/include/mach/gpio-bank-f.h |   71 
 arch/arm/mach-s3c64xx/include/mach/gpio-bank-g.h |   42 ---
 arch/arm/mach-s3c64xx/include/mach/gpio-bank-h.h |   74 
 arch/arm/mach-s3c64xx/include/mach/gpio-bank-i.h |   40 --
 arch/arm/mach-s3c64xx/include/mach/gpio-bank-j.h |   36 --
 arch/arm/mach-s3c64xx/include/mach/gpio-bank-n.h |   54 ---
 arch/arm/mach-s3c64xx/include/mach/gpio-bank-o.h |   70 
 arch/arm/mach-s3c64xx/include/mach/gpio-bank-p.h |   69 
 arch/arm/mach-s3c64xx/include/mach/gpio-bank-q.h |   46 ---
 arch/arm/mach-s3c64xx/mach-smdk6410.c|1 -
 arch/arm/mach-s3c64xx/pm.c   |   34 +-
 arch/arm/mach-s3c64xx/setup-i2c0.c   |7 +-
 arch/arm/mach-s3c64xx/setup-i2c1.c   |7 +-
 arch/arm/mach-s3c64xx/sleep.S|8 +-
 arch/arm/mach-s5p6442/Kconfig|   25 --
 arch/arm/mach-s5p6442/Makefile   |   24 --
 arch/arm/mach-s5p6442/Makefile.boot  |2 -
 arch/arm/mach-s5p6442/clock.c|  420 
--

 arch/arm/mach-s5p6442/cpu.c  |  143 
 arch/arm/mach-s5p6442/dev-audio.c|  217 ---
 arch/arm/mach-s5p6442/dev-spi.c  |  121 ---
 arch/arm/mach-s5p6442/clock.c|  420 
--

 arch/arm/mach-s5p6442/cpu.c  |  143 
 arch/arm/mach-s5p6442/dev-audio.c|  217 ---
 arch/arm/mach-s5p6442/dev-spi.c  |  121 ---
 arch/arm/mach-s5p6442/dma.c  |  105 --
 arch/arm/mach-s5p6442/include/mach/debug-macro.S |   35 --
 arch/arm/mach-s5p6442/include/mach/dma.h |   26 --
 arch/arm/mach-s5p6442/include/mach/entry-macro.S |   48 ---
 arch/arm/mach-s5p6442/include/mach/gpio.h|  123 ---
 arch/arm/mach-s5p6442/include/mach/hardware.h|   18 -
 arch/arm/mach-s5p6442/include/mach/io.h  |   17 -
 arch/arm/mach-s5p6442/include/mach/irqs.h|   87 -
 arch/arm/mach-s5p6442/include/mach/map.h |   76 
 arch/arm/mach-s5p6442/include/mach/memory.h  |   19 -
 arch/arm/mach-s5p6442/include/mach/pwm-clock.h   |   70 
 arch/arm/mach-s5p6442/include/mach/regs-clock.h  |  104 --
 arch/arm/mach-s5p6442/include/mach/regs-irq.h|   19 -
 arch/arm/mach-s5p6442/include/mach/spi-clocks.h  |   17 -
 arch/arm/mach-s5p6442/include/mach/system.h  |   23 --
 arch/arm/mach-s5p6442/include/mach/tick.h|   26 --
 arch/arm/mach-s5p6442/include/mach/timex.h   |   24 --
 arch/arm/mach-s5p6442/include/mach/uncompress.h  |   24 --
 arch/arm/mach-s5p6442/include/mach/vmalloc.h |   17 -
 arch/arm/mac

Re: [PATCH] ARM: exynos4: fix secondary CPU boot

2011-05-25 Thread Marc Zyngier
On Wed, 2011-05-25 at 10:28 -0700, Kukjin Kim wrote:
> On 05/20/11 06:46, Marc Zyngier wrote:
> > Patch 7d30e8b38 (ARM: EXYNOS4: Add EXYNOS4 CPU initialization support)
> > renamed the s5pv310 to exynos4, and also changed the value of
> > EXYNOS4_PA_SYSRAM, which is used to release the secondary CPU from
> > spinning in BL0. As a result, CPU1 can't be brought up anymore.
> >
> > This patch simply reverts EXYNOS4_PA_SYSRAM to its original value,
> > which results in a working CPU1.
> >
> > Tested on an SMDK-v310.
> >
> > Cc: Kukjin Kim
> > Signed-off-by: Marc Zyngier
> > ---
> >   arch/arm/mach-exynos4/include/mach/map.h |2 +-
> >   1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/arch/arm/mach-exynos4/include/mach/map.h 
> > b/arch/arm/mach-exynos4/include/mach/map.h
> > index 6330b73..862967f 100644
> > --- a/arch/arm/mach-exynos4/include/mach/map.h
> > +++ b/arch/arm/mach-exynos4/include/mach/map.h
> > @@ -23,7 +23,7 @@
> >
> >   #include
> >
> > -#define EXYNOS4_PA_SYSRAM  0x0202
> > +#define EXYNOS4_PA_SYSRAM  0x02025000
> >
> Hi Marc,
> 
> Hmm...the value, 0x0202 is correct on Exynos4210 now.
> 
> So can't apply this but I know, you're right on old version of 
> Exynos4210...let's think again about this.

So that address has changed between two SoC revisions? That's
unfortunate, to say the least. I'm most probably using an early revision
of the hardware (EVT0?), as it doesn't even support MCT.

What about the following patch?

M.

>From c27e75b86e1ee181987a9364286a888421e76205 Mon Sep 17 00:00:00 2001
From: Marc Zyngier 
Date: Fri, 20 May 2011 14:38:25 +0100
Subject: [PATCH] ARM: exynos4: fix secondary CPU boot on early SoC revisions

It appears that the system-wide flags register that used to be at
0x02025000 on the first revision of Exynos4 has moved to 0x0202.

The kernel has been updated accordingly, but this unfortunately leaves
early boards without SMP support (the secondary CPU spins endlessly
in BL0 waiting for an address to be written at that memory location).

Try to solve the problem by poking both locations. This should be
safe as this is done early enough in the kernel boot process, and nobody
should be using the SRAM yet.

Tested on a vintage SMDK-v310.

Cc: Kukjin Kim 
Signed-off-by: Marc Zyngier 
---
 arch/arm/mach-exynos4/include/mach/map.h |1 +
 arch/arm/mach-exynos4/platsmp.c  |   14 ++
 2 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-exynos4/include/mach/map.h 
b/arch/arm/mach-exynos4/include/mach/map.h
index 0009e77..781e149 100644
--- a/arch/arm/mach-exynos4/include/mach/map.h
+++ b/arch/arm/mach-exynos4/include/mach/map.h
@@ -24,6 +24,7 @@
 #include 
 
 #define EXYNOS4_PA_SYSRAM  0x0202
+#define EXYNOS4_PA_SYSRAM_EVT0 0x02025000
 
 #define EXYNOS4_PA_FIMC0   0x1180
 #define EXYNOS4_PA_FIMC1   0x1181
diff --git a/arch/arm/mach-exynos4/platsmp.c b/arch/arm/mach-exynos4/platsmp.c
index c5e65a0..f261c34 100644
--- a/arch/arm/mach-exynos4/platsmp.c
+++ b/arch/arm/mach-exynos4/platsmp.c
@@ -155,6 +155,7 @@ void __init smp_init_cpus(void)
 void __init platform_smp_prepare_cpus(unsigned int max_cpus)
 {
int i;
+   void __iomem *sysram_evt0;
 
/*
 * Initialise the present map, which describes the set of CPUs
@@ -172,4 +173,17 @@ void __init platform_smp_prepare_cpus(unsigned int 
max_cpus)
 * secondary CPU branches to this address.
 */
__raw_writel(BSYM(virt_to_phys(exynos4_secondary_startup)), 
S5P_VA_SYSRAM);
+
+   /*
+* EVT0 has the system-wide flags register at a different address.
+* Poke it as well, in case we're running on an old SoC revision.
+*/
+   sysram_evt0 = ioremap(EXYNOS4_PA_SYSRAM_EVT0, SZ_4K);
+   if (!sysram_evt0) {
+   pr_err("Unable to remap EXYNOS4_PA_SYSRAM_EVT0\n");
+   return;
+   }
+
+   __raw_writel(BSYM(virt_to_phys(exynos4_secondary_startup)), 
sysram_evt0);
+   iounmap(sysram_evt0);
 }
-- 
1.7.0.4



-- 
Reality is an implementation detail.


--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] ARM: EXYNOS4: Enable WM8994 MFD on I2S selection

2011-05-25 Thread Kukjin Kim

On 05/24/11 21:39, Angus Ainslie wrote:

From: Giridhar Maruthy

Whenever I2S is selected, select MFD for WM8994 and I2C
to avoid manual enabling of the codec and I2C.

Signed-off-by: Giridhar Maruthy
Signed-off-by: Angus Ainslie
---
  sound/soc/samsung/Kconfig |3 +++
  1 files changed, 3 insertions(+), 0 deletions(-)



Hi Angus :)

Hmm...first of all, should add proper maintainers in Cc. In this case, 
Jassi, Liam, and Mark should be added in Cc. (Cc'ed them)



diff --git a/sound/soc/samsung/Kconfig b/sound/soc/samsung/Kconfig
index a3fdfb6..a80eeb1 100644
--- a/sound/soc/samsung/Kconfig
+++ b/sound/soc/samsung/Kconfig
@@ -65,6 +65,9 @@ config SND_SOC_SAMSUNG_SMDK_WM8994
tristate "SoC I2S Audio support for WM8994 on SMDK"
depends on SND_SOC_SAMSUNG&&  (MACH_SMDKV310 || MACH_SMDKC210)
select SND_SOC_WM8994
+   select MFD_SUPPORT
+   select I2C_S3C2410
+   select MFD_WM8994


I'm not sure about MFD configs, but if "select I2C_S3C2410" is required, 
it should be moved into regarding Kconfig of arch/arm, because it is 
related to dependency of ARCH. Maybe in this case, 
arch/arm/mach-exynos4/Kconfig?


diff --git a/arch/arm/mach-exynos4/Kconfig b/arch/arm/mach-exynos4/Kconfig
index e849f67..30b716e 100644
--- a/arch/arm/mach-exynos4/Kconfig
+++ b/arch/arm/mach-exynos4/Kconfig
@@ -12,6 +12,7 @@ if ARCH_EXYNOS4
 config CPU_EXYNOS4210
bool
select S3C_PL330_DMA
+   select I2C_S3C2410
help
  Enable EXYNOS4210 CPU support


select SND_SAMSUNG_I2S
help
Say Y if you want to add support for SoC audio on the SMDKs.


--
Thanks.

Best regards,
Kgene.
--
Kukjin Kim , Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] ARM: exynos4: fix secondary CPU boot

2011-05-25 Thread Kukjin Kim

On 05/20/11 06:46, Marc Zyngier wrote:

Patch 7d30e8b38 (ARM: EXYNOS4: Add EXYNOS4 CPU initialization support)
renamed the s5pv310 to exynos4, and also changed the value of
EXYNOS4_PA_SYSRAM, which is used to release the secondary CPU from
spinning in BL0. As a result, CPU1 can't be brought up anymore.

This patch simply reverts EXYNOS4_PA_SYSRAM to its original value,
which results in a working CPU1.

Tested on an SMDK-v310.

Cc: Kukjin Kim
Signed-off-by: Marc Zyngier
---
  arch/arm/mach-exynos4/include/mach/map.h |2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-exynos4/include/mach/map.h 
b/arch/arm/mach-exynos4/include/mach/map.h
index 6330b73..862967f 100644
--- a/arch/arm/mach-exynos4/include/mach/map.h
+++ b/arch/arm/mach-exynos4/include/mach/map.h
@@ -23,7 +23,7 @@

  #include

-#define EXYNOS4_PA_SYSRAM  0x0202
+#define EXYNOS4_PA_SYSRAM  0x02025000


Hi Marc,

Hmm...the value, 0x0202 is correct on Exynos4210 now.

So can't apply this but I know, you're right on old version of 
Exynos4210...let's think again about this.


Maybe I missed its commit for changing when I submitted it...


  #define EXYNOS4_PA_FIMC0  0x1180
  #define EXYNOS4_PA_FIMC1  0x1181


--
Thanks.

Best regards,
Kgene.
--
Kukjin Kim , Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v4 9/9] arm: s5pv210: goni: add TV support

2011-05-25 Thread Tomasz Stanislawski
Add platform devices and regulator and for TV devices on
Samsung Goni board.

Signed-off-by: Tomasz Stanislawski 
---
 arch/arm/mach-s5pv210/Kconfig |1 +
 arch/arm/mach-s5pv210/mach-goni.c |9 +
 2 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-s5pv210/Kconfig b/arch/arm/mach-s5pv210/Kconfig
index 7e73ae8..9b93252 100644
--- a/arch/arm/mach-s5pv210/Kconfig
+++ b/arch/arm/mach-s5pv210/Kconfig
@@ -99,6 +99,7 @@ config MACH_GONI
select S3C_DEV_USB_HSOTG
select S5P_DEV_ONENAND
select SAMSUNG_DEV_KEYPAD
+   select S5P_DEV_TV
select S5PV210_SETUP_FB_24BPP
select S5PV210_SETUP_I2C1
select S5PV210_SETUP_I2C2
diff --git a/arch/arm/mach-s5pv210/mach-goni.c 
b/arch/arm/mach-s5pv210/mach-goni.c
index 31d5aa7..0c8af58 100644
--- a/arch/arm/mach-s5pv210/mach-goni.c
+++ b/arch/arm/mach-s5pv210/mach-goni.c
@@ -284,6 +284,7 @@ static struct regulator_consumer_supply 
goni_ldo5_consumers[] = {
 
 static struct regulator_consumer_supply goni_ldo8_consumers[] = {
REGULATOR_SUPPLY("vusb_d", "s3c-hsotg"),
+   REGULATOR_SUPPLY("vdd33a_dac", "s5p-sdo"),
 };
 
 static struct regulator_consumer_supply goni_ldo11_consumers[] = {
@@ -474,6 +475,10 @@ static struct regulator_consumer_supply buck1_consumer =
 static struct regulator_consumer_supply buck2_consumer =
REGULATOR_SUPPLY("vddint", NULL);
 
+static struct regulator_consumer_supply buck3_consumer =
+   REGULATOR_SUPPLY("vdet", "s5p-sdo");
+
+
 static struct regulator_init_data goni_buck1_data = {
.constraints= {
.name   = "VARM_1.2V",
@@ -510,6 +515,8 @@ static struct regulator_init_data goni_buck3_data = {
.enabled = 1,
},
},
+   .num_consumer_supplies  = 1,
+   .consumer_supplies  = &buck3_consumer,
 };
 
 static struct regulator_init_data goni_buck4_data = {
@@ -808,6 +815,8 @@ static struct platform_device *goni_devices[] __initdata = {
&goni_i2c_gpio5,
&mmc2_fixed_voltage,
&goni_device_gpiokeys,
+   &s5p_device_mixer,
+   &s5p_device_sdo,
&s3c_device_i2c0,
&s5p_device_fimc0,
&s5p_device_fimc1,
-- 
1.7.5.1

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v4 6/9] arm: exynos4: add TV support

2011-05-25 Thread Tomasz Stanislawski
Add clocks and definitions needed by TV driver infrastructure for Samsung 
Exynos4 machine.

Signed-off-by: Tomasz Stanislawski 
Signed-off-by: Kyungmin Park 
Reviewed-by: Marek Szyprowski 
---
 arch/arm/mach-exynos4/clock.c   |  217 ++-
 arch/arm/mach-exynos4/cpu.c |4 +
 arch/arm/mach-exynos4/include/mach/irqs.h   |4 +
 arch/arm/mach-exynos4/include/mach/map.h|   26 +++
 arch/arm/mach-exynos4/include/mach/regs-clock.h |1 +
 arch/arm/mach-exynos4/include/mach/regs-pmu.h   |6 +
 6 files changed, 257 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-exynos4/clock.c b/arch/arm/mach-exynos4/clock.c
index 035eacc..6ac2cbd 100644
--- a/arch/arm/mach-exynos4/clock.c
+++ b/arch/arm/mach-exynos4/clock.c
@@ -87,6 +87,11 @@ static int exynos4_clk_ip_mfc_ctrl(struct clk *clk, int 
enable)
return s5p_gatectrl(S5P_CLKGATE_IP_MFC, clk, enable);
 }
 
+static int exynos4_clksrc_mask_tv_ctrl(struct clk *clk, int enable)
+{
+   return s5p_gatectrl(S5P_CLKSRC_MASK_TV, clk, enable);
+}
+
 static int exynos4_clk_ip_cam_ctrl(struct clk *clk, int enable)
 {
return s5p_gatectrl(S5P_CLKGATE_IP_CAM, clk, enable);
@@ -127,6 +132,16 @@ static int exynos4_clk_ip_perir_ctrl(struct clk *clk, int 
enable)
return s5p_gatectrl(S5P_CLKGATE_IP_PERIR, clk, enable);
 }
 
+static int exynos4_clk_hdmiphy_ctrl(struct clk *clk, int enable)
+{
+   return s5p_gatectrl(S5P_HDMI_PHY_CONTROL, clk, enable);
+}
+
+static int exynos4_clk_dac_ctrl(struct clk *clk, int enable)
+{
+   return s5p_gatectrl(S5P_DAC_PHY_CONTROL, clk, enable);
+}
+
 /* Core list of CMU_CPU side */
 
 static struct clksrc_clk clk_mout_apll = {
@@ -473,6 +488,36 @@ static struct clk init_clocks_off[] = {
.enable = exynos4_clk_ip_fsys_ctrl,
.ctrlbit= (1 << 8),
}, {
+   .name   = "dac",
+   .id = -1,
+   .enable = exynos4_clk_ip_tv_ctrl,
+   .ctrlbit= (1 << 2),
+   }, {
+   .name   = "mixer",
+   .id = -1,
+   .enable = exynos4_clk_ip_tv_ctrl,
+   .ctrlbit= (1 << 1),
+   }, {
+   .name   = "vp",
+   .id = -1,
+   .enable = exynos4_clk_ip_tv_ctrl,
+   .ctrlbit= (1 << 0),
+   }, {
+   .name   = "hdmi",
+   .id = -1,
+   .enable = exynos4_clk_ip_tv_ctrl,
+   .ctrlbit= (1 << 3),
+   }, {
+   .name   = "hdmiphy",
+   .id = -1,
+   .enable = exynos4_clk_hdmiphy_ctrl,
+   .ctrlbit= (1 << 0),
+   }, {
+   .name   = "dacphy",
+   .id = -1,
+   .enable = exynos4_clk_dac_ctrl,
+   .ctrlbit= (1 << 0),
+   }, {
.name   = "hsmmc",
.id = 4,
.parent = &clk_aclk_133.clk,
@@ -791,6 +836,93 @@ static struct clksrc_sources clkset_mout_g2d = {
.nr_sources = ARRAY_SIZE(clkset_mout_g2d_list),
 };
 
+/* --
+ * TV subsystem CLOCKS
+ * --
+ */
+
+static struct clk *clkset_sclk_dac_list[] = {
+   [0] = &clk_sclk_vpll.clk,
+   [1] = &clk_sclk_hdmiphy,
+};
+
+static struct clksrc_sources clkset_sclk_dac = {
+   .sources= clkset_sclk_dac_list,
+   .nr_sources = ARRAY_SIZE(clkset_sclk_dac_list),
+};
+
+static struct clksrc_clk clk_sclk_dac = {
+   .clk= {
+   .name   = "sclk_dac",
+   .id = -1,
+   .enable = exynos4_clksrc_mask_tv_ctrl,
+   .ctrlbit= (1 << 8),
+   },
+   .sources = &clkset_sclk_dac,
+   .reg_src = { .reg = S5P_CLKSRC_TV, .shift = 8, .size = 1 },
+};
+
+static struct clksrc_clk clk_sclk_pixel  = {
+   .clk= {
+   .name   = "sclk_pixel",
+   .id = -1,
+   .parent = &clk_sclk_vpll.clk,
+   },
+   .reg_div = { .reg = S5P_CLKDIV_TV, .shift = 0, .size = 4 },
+};
+
+static struct clk *clkset_sclk_hdmi_list[] = {
+   [0] = &clk_sclk_pixel.clk,
+   [1] = &clk_sclk_hdmiphy,
+};
+
+static struct clksrc_sources clkset_sclk_hdmi = {
+   .sources= clkset_sclk_hdmi_list,
+   .nr_sources = ARRAY_SIZE(clkset_sclk_hdmi_list),
+};
+
+static struct clksrc_clk clk_sclk_hdmi = {
+   .clk= {
+   .name   = "sclk_hdmi",
+   .id = -1,
+   .enable = exynos4_clksrc_mask_tv_ctrl,
+   .ctrlbit= (1 << 0),
+   },
+   

[PATCH v4 7/9] arm: exynos4: universal_c210: add TV support

2011-05-25 Thread Tomasz Stanislawski
Add platform devices and regulator and for TV devices on Samsung
Universal C210 board.

Signed-off-by: Tomasz Stanislawski 
---
 arch/arm/mach-exynos4/Kconfig   |3 +
 arch/arm/mach-exynos4/mach-universal_c210.c |   80 +++
 2 files changed, 83 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-exynos4/Kconfig b/arch/arm/mach-exynos4/Kconfig
index e849f67..700967b 100644
--- a/arch/arm/mach-exynos4/Kconfig
+++ b/arch/arm/mach-exynos4/Kconfig
@@ -153,7 +153,10 @@ config MACH_UNIVERSAL_C210
select S3C_DEV_HSMMC3
select S3C_DEV_I2C1
select S3C_DEV_I2C5
+   select S3C_DEV_I2C8
select S5P_DEV_ONENAND
+   select S5P_DEV_TV
+   select EXYNOS4_DEV_PD
select EXYNOS4_SETUP_I2C1
select EXYNOS4_SETUP_I2C5
select EXYNOS4_SETUP_SDHCI
diff --git a/arch/arm/mach-exynos4/mach-universal_c210.c 
b/arch/arm/mach-exynos4/mach-universal_c210.c
index 97d329f..58a099c 100644
--- a/arch/arm/mach-exynos4/mach-universal_c210.c
+++ b/arch/arm/mach-exynos4/mach-universal_c210.c
@@ -26,7 +26,9 @@
 #include 
 #include 
 #include 
+#include 
 #include 
+#include 
 #include 
 
 #include 
@@ -136,6 +138,9 @@ static struct regulator_init_data lp3974_buck2_data = {
.consumer_supplies = &lp3974_buck2_consumer,
 };
 
+static struct regulator_consumer_supply lp3974_buck3_consumer =
+   REGULATOR_SUPPLY("vdet", "s5p-sdo");
+
 static struct regulator_init_data lp3974_buck3_data = {
.constraints= {
.name   = "VCC_1.8V",
@@ -147,6 +152,8 @@ static struct regulator_init_data lp3974_buck3_data = {
.enabled= 1,
},
},
+   .num_consumer_supplies = 1,
+   .consumer_supplies = &lp3974_buck3_consumer,
 };
 
 static struct regulator_init_data lp3974_buck4_data = {
@@ -175,6 +182,12 @@ static struct regulator_init_data lp3974_ldo2_data = {
},
 };
 
+static struct regulator_consumer_supply lp3974_ldo3_consumer[] = {
+   REGULATOR_SUPPLY("vusb_a", "s3c-hsotg"),
+   REGULATOR_SUPPLY("vdd", "exynos4-hdmi"),
+   REGULATOR_SUPPLY("vdd_pll", "exynos4-hdmi"),
+};
+
 static struct regulator_init_data lp3974_ldo3_data = {
.constraints= {
.name   = "VUSB+MIPI_1.1V",
@@ -186,6 +199,12 @@ static struct regulator_init_data lp3974_ldo3_data = {
.disabled   = 1,
},
},
+   .num_consumer_supplies = ARRAY_SIZE(lp3974_ldo3_consumer),
+   .consumer_supplies = lp3974_ldo3_consumer,
+};
+
+static struct regulator_consumer_supply lp3974_ldo4_consumer[] = {
+   REGULATOR_SUPPLY("vdd_osc", "exynos4-hdmi"),
 };
 
 static struct regulator_init_data lp3974_ldo4_data = {
@@ -199,6 +218,8 @@ static struct regulator_init_data lp3974_ldo4_data = {
.disabled   = 1,
},
},
+   .num_consumer_supplies = ARRAY_SIZE(lp3974_ldo4_consumer),
+   .consumer_supplies = lp3974_ldo4_consumer,
 };
 
 static struct regulator_init_data lp3974_ldo5_data = {
@@ -240,6 +261,11 @@ static struct regulator_init_data lp3974_ldo7_data = {
},
 };
 
+static struct regulator_consumer_supply lp3974_ldo8_consumer[] = {
+   REGULATOR_SUPPLY("vusb_d", "s3c-hsotg"),
+   REGULATOR_SUPPLY("vdd33a_dac", "s5p-sdo"),
+};
+
 static struct regulator_init_data lp3974_ldo8_data = {
.constraints= {
.name   = "VUSB+VDAC_3.3V",
@@ -251,6 +277,8 @@ static struct regulator_init_data lp3974_ldo8_data = {
.disabled   = 1,
},
},
+   .num_consumer_supplies = ARRAY_SIZE(lp3974_ldo8_consumer),
+   .consumer_supplies = lp3974_ldo8_consumer,
 };
 
 static struct regulator_init_data lp3974_ldo9_data = {
@@ -466,6 +494,34 @@ static struct max8998_platform_data universal_lp3974_pdata 
= {
.wakeup = true,
 };
 
+static struct regulator_consumer_supply hdmi_fixed_consumer =
+   REGULATOR_SUPPLY("hdmi-en", "exynos4-hdmi");
+
+static struct regulator_init_data hdmi_fixed_voltage_init_data = {
+   .constraints= {
+   .name   = "HDMI_5V",
+   .valid_ops_mask = REGULATOR_CHANGE_STATUS,
+   },
+   .num_consumer_supplies  = 1,
+   .consumer_supplies  = &hdmi_fixed_consumer,
+};
+
+static struct fixed_voltage_config hdmi_fixed_voltage_config = {
+   .supply_name= "HDMI_EN1",
+   .microvolts = 500,
+   .gpio   = EXYNOS4_GPE0(1),
+   .enable_high= true,
+   .init_data  = &hdmi_fixed_voltage_init_data,
+};
+
+static struct platform_device hdmi_fixed_voltage = {
+   .name   = "reg-fixed-voltage",
+   .id = 6,
+   .dev= {
+   .platform_data  = &hdmi_fixed_voltage_config,
+   },
+};
+
 /* GPIO I2C 

[PATCH v4 5/9] arm: plat-s5p: add TV support

2011-05-25 Thread Tomasz Stanislawski
This patch adds:
- resources for TV drivers and devices
- setters for names of TV devices

Signed-off-by: Tomasz Stanislawski 
---
 arch/arm/plat-s5p/Kconfig|5 ++
 arch/arm/plat-s5p/Makefile   |1 +
 arch/arm/plat-s5p/dev-tv.c   |  100 ++
 arch/arm/plat-samsung/include/plat/devs.h|5 ++
 arch/arm/plat-samsung/include/plat/tv-core.h |   45 
 5 files changed, 156 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/plat-s5p/dev-tv.c
 create mode 100644 arch/arm/plat-samsung/include/plat/tv-core.h

diff --git a/arch/arm/plat-s5p/Kconfig b/arch/arm/plat-s5p/Kconfig
index 8492297..585754b 100644
--- a/arch/arm/plat-s5p/Kconfig
+++ b/arch/arm/plat-s5p/Kconfig
@@ -85,6 +85,11 @@ config S5P_DEV_CSIS1
help
  Compile in platform device definitions for MIPI-CSIS channel 1
 
+config S5P_DEV_TV
+   bool
+   help
+ Compile in platform device definition for TV interface
+
 config S5P_SETUP_MIPIPHY
bool
help
diff --git a/arch/arm/plat-s5p/Makefile b/arch/arm/plat-s5p/Makefile
index 42afff7..073f363 100644
--- a/arch/arm/plat-s5p/Makefile
+++ b/arch/arm/plat-s5p/Makefile
@@ -33,4 +33,5 @@ obj-$(CONFIG_S5P_DEV_FIMC3)   += dev-fimc3.o
 obj-$(CONFIG_S5P_DEV_ONENAND)  += dev-onenand.o
 obj-$(CONFIG_S5P_DEV_CSIS0)+= dev-csis0.o
 obj-$(CONFIG_S5P_DEV_CSIS1)+= dev-csis1.o
+obj-$(CONFIG_S5P_DEV_TV)   += dev-tv.o
 obj-$(CONFIG_S5P_SETUP_MIPIPHY)+= setup-mipiphy.o
diff --git a/arch/arm/plat-s5p/dev-tv.c b/arch/arm/plat-s5p/dev-tv.c
new file mode 100644
index 000..28f43a2
--- /dev/null
+++ b/arch/arm/plat-s5p/dev-tv.c
@@ -0,0 +1,100 @@
+/* linux/arch/arm/plat-s5p/dev-tv.c
+ *
+ * Copyright 2011 Samsung Electronics
+ *  Tomasz Stanislawski 
+ *
+ * S5P series device definition for TV device
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+*/
+
+#include 
+
+#include 
+#include 
+
+#include 
+
+/* HDMI interface */
+static struct resource s5p_hdmi_resources[] = {
+   [0] = {
+   .start  = S5P_PA_HDMI,
+   .end= S5P_PA_HDMI + S5P_SZ_HDMI - 1,
+   .flags  = IORESOURCE_MEM,
+   },
+   [1] = {
+   .start  = IRQ_HDMI,
+   .end= IRQ_HDMI,
+   .flags  = IORESOURCE_IRQ,
+   },
+};
+
+struct platform_device s5p_device_hdmi = {
+   .name   = "s5p-hdmi",
+   .id = -1,
+   .num_resources  = ARRAY_SIZE(s5p_hdmi_resources),
+   .resource   = s5p_hdmi_resources,
+};
+EXPORT_SYMBOL(s5p_device_hdmi);
+
+/* MIXER */
+static struct resource s5p_mixer_resources[] = {
+   [0] = {
+   .start  = S5P_PA_MIXER,
+   .end= S5P_PA_MIXER + S5P_SZ_MIXER - 1,
+   .flags  = IORESOURCE_MEM,
+   .name   = "mxr"
+   },
+   [1] = {
+   .start  = S5P_PA_VP,
+   .end= S5P_PA_VP + S5P_SZ_VP - 1,
+   .flags  = IORESOURCE_MEM,
+   .name   = "vp"
+   },
+   [2] = {
+   .start  = IRQ_MIXER,
+   .end= IRQ_MIXER,
+   .flags  = IORESOURCE_IRQ,
+   .name   = "irq"
+   },
+};
+
+struct platform_device s5p_device_mixer = {
+   .name   = "s5p-mixer",
+   .id = -1,
+   .num_resources  = ARRAY_SIZE(s5p_mixer_resources),
+   .resource   = s5p_mixer_resources,
+   .dev= {
+   .coherent_dma_mask = DMA_BIT_MASK(32),
+   .dma_mask = &s5p_device_mixer.dev.coherent_dma_mask,
+   }
+};
+EXPORT_SYMBOL(s5p_device_mixer);
+
+/* HDMI interface */
+static struct resource s5p_sdo_resources[] = {
+   [0] = {
+   .start  = S5P_PA_SDO,
+   .end= S5P_PA_SDO + S5P_SZ_SDO - 1,
+   .flags  = IORESOURCE_MEM,
+   },
+   [1] = {
+   .start  = IRQ_SDO,
+   .end= IRQ_SDO,
+   .flags  = IORESOURCE_IRQ,
+   },
+};
+
+struct platform_device s5p_device_sdo = {
+   .name   = "s5p-sdo",
+   .id = -1,
+   .num_resources  = ARRAY_SIZE(s5p_sdo_resources),
+   .resource   = s5p_sdo_resources,
+   .dev= {
+   .coherent_dma_mask = DMA_BIT_MASK(32),
+   .dma_mask = &s5p_device_sdo.dev.coherent_dma_mask,
+   }
+};
+EXPORT_SYMBOL(s5p_device_sdo);
diff --git a/arch/arm/plat-samsung/include/plat/devs.h 
b/arch/arm/plat-samsung/include/plat/devs.h
index cd52d88..f3e88db 100644
--- a/arch/arm/plat-samsung/include/plat/devs.h
+++ b/arch/arm/plat-samsung/include/plat/devs.h
@@ -140,6 +140,11 @@ extern struct platform_device s5p_device_fimc1;
 extern struct platform_device s5p_device_fimc2;
 extern struct platform_device s5p_device_fimc3;
 

[PATCH v4 2/9] i2c-s3c2410: fix I2C dedicated for hdmiphy

2011-05-25 Thread Tomasz Stanislawski
The I2C HDMIPHY dedicated controller has different timeout
handling and reset conditions.

Signed-off-by: Tomasz Stanislawski 
Signed-off-by: Kyungmin Park 
---
 drivers/i2c/busses/i2c-s3c2410.c |   36 +++-
 1 files changed, 35 insertions(+), 1 deletions(-)

diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c
index 6c00c10..99cfe2f 100644
--- a/drivers/i2c/busses/i2c-s3c2410.c
+++ b/drivers/i2c/busses/i2c-s3c2410.c
@@ -54,6 +54,7 @@ enum s3c24xx_i2c_state {
 enum s3c24xx_i2c_type {
TYPE_S3C2410,
TYPE_S3C2440,
+   TYPE_S3C2440_HDMIPHY,
 };
 
 struct s3c24xx_i2c {
@@ -96,7 +97,21 @@ static inline int s3c24xx_i2c_is2440(struct s3c24xx_i2c *i2c)
enum s3c24xx_i2c_type type;
 
type = platform_get_device_id(pdev)->driver_data;
-   return type == TYPE_S3C2440;
+   return type == TYPE_S3C2440 || type == TYPE_S3C2440_HDMIPHY;
+}
+
+/* s3c24xx_i2c_is2440_hdmiphy()
+ *
+ * return true is this is an s3c2440 dedicated for HDMIPHY interface
+*/
+
+static inline int s3c24xx_i2c_is2440_hdmiphy(struct s3c24xx_i2c *i2c)
+{
+   struct platform_device *pdev = to_platform_device(i2c->dev);
+   enum s3c24xx_i2c_type type;
+
+   type = platform_get_device_id(pdev)->driver_data;
+   return type == TYPE_S3C2440_HDMIPHY;
 }
 
 /* s3c24xx_i2c_master_complete
@@ -461,6 +476,13 @@ static int s3c24xx_i2c_set_master(struct s3c24xx_i2c *i2c)
unsigned long iicstat;
int timeout = 400;
 
+   /* if hang-up of HDMIPHY occured reduce timeout
+* The controller will work after reset, so waiting
+* 400 ms will cause unneccessary system hangup
+*/
+   if (s3c24xx_i2c_is2440_hdmiphy(i2c))
+   timeout = 10;
+
while (timeout-- > 0) {
iicstat = readl(i2c->regs + S3C2410_IICSTAT);
 
@@ -470,6 +492,15 @@ static int s3c24xx_i2c_set_master(struct s3c24xx_i2c *i2c)
msleep(1);
}
 
+   /* hang-up of bus dedicated for HDMIPHY occured, resetting */
+   if (s3c24xx_i2c_is2440_hdmiphy(i2c)) {
+   writel(0, i2c->regs + S3C2410_IICCON);
+   writel(0, i2c->regs + S3C2410_IICSTAT);
+   writel(0, i2c->regs + S3C2410_IICDS);
+
+   return 0;
+   }
+
return -ETIMEDOUT;
 }
 
@@ -1009,6 +1040,9 @@ static struct platform_device_id s3c24xx_driver_ids[] = {
}, {
.name   = "s3c2440-i2c",
.driver_data= TYPE_S3C2440,
+   }, {
+   .name   = "s3c2440-hdmiphy-i2c",
+   .driver_data= TYPE_S3C2440_HDMIPHY,
}, { },
 };
 MODULE_DEVICE_TABLE(platform, s3c24xx_driver_ids);
-- 
1.7.5.1

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v4 1/9] arm: exynos4: pd: fixes block gating and code cleanup

2011-05-25 Thread Tomasz Stanislawski
This patch extends power domain driver with support for enabling and
disabling modules in S5P_CLKGATE_BLOCK register. It also performs a
little code cleanup to avoid confusion between exynos4_device_pd array
index and power domain id.

Signed-off-by: Tomasz Stanislawski 
Signed-off-by: Kyungmin Park 
Signed-off-by: Marek Szyprowski 
---
 arch/arm/mach-exynos4/dev-pd.c  |   93 +--
 arch/arm/mach-exynos4/include/mach/regs-clock.h |7 ++
 arch/arm/plat-samsung/include/plat/pd.h |1 +
 3 files changed, 79 insertions(+), 22 deletions(-)

diff --git a/arch/arm/mach-exynos4/dev-pd.c b/arch/arm/mach-exynos4/dev-pd.c
index 3273f25..44c6597 100644
--- a/arch/arm/mach-exynos4/dev-pd.c
+++ b/arch/arm/mach-exynos4/dev-pd.c
@@ -16,13 +16,17 @@
 #include 
 
 #include 
+#include 
 
 #include 
 
+static DEFINE_SPINLOCK(gate_block_slock);
+
 static int exynos4_pd_enable(struct device *dev)
 {
struct samsung_pd_info *pdata =  dev->platform_data;
u32 timeout;
+   int ret = 0;
 
__raw_writel(S5P_INT_LOCAL_PWR_EN, pdata->base);
 
@@ -31,21 +35,39 @@ static int exynos4_pd_enable(struct device *dev)
while ((__raw_readl(pdata->base + 0x4) & S5P_INT_LOCAL_PWR_EN)
!= S5P_INT_LOCAL_PWR_EN) {
if (timeout == 0) {
-   printk(KERN_ERR "Power domain %s enable failed.\n",
-   dev_name(dev));
-   return -ETIMEDOUT;
+   dev_err(dev, "enable failed\n");
+   ret = -ETIMEDOUT;
+   goto done;
}
timeout--;
udelay(100);
}
 
-   return 0;
+   /* configure clk gate mask if it is present */
+   if (pdata->gate_mask) {
+   unsigned long flags;
+   unsigned long value;
+
+   spin_lock_irqsave(&gate_block_slock, flags);
+
+   value  = __raw_readl(S5P_CLKGATE_BLOCK);
+   value |= pdata->gate_mask;
+   __raw_writel(value, S5P_CLKGATE_BLOCK);
+
+   spin_unlock_irqrestore(&gate_block_slock, flags);
+   }
+
+done:
+   dev_info(dev, "enable finished\n");
+
+   return ret;
 }
 
 static int exynos4_pd_disable(struct device *dev)
 {
struct samsung_pd_info *pdata =  dev->platform_data;
u32 timeout;
+   int ret = 0;
 
__raw_writel(0, pdata->base);
 
@@ -53,81 +75,108 @@ static int exynos4_pd_disable(struct device *dev)
timeout = 10;
while (__raw_readl(pdata->base + 0x4) & S5P_INT_LOCAL_PWR_EN) {
if (timeout == 0) {
-   printk(KERN_ERR "Power domain %s disable failed.\n",
-   dev_name(dev));
-   return -ETIMEDOUT;
+   dev_err(dev, "disable failed\n");
+   ret = -ETIMEDOUT;
+   goto done;
}
timeout--;
udelay(100);
}
 
-   return 0;
+   if (pdata->gate_mask) {
+   unsigned long flags;
+   unsigned long value;
+
+   spin_lock_irqsave(&gate_block_slock, flags);
+
+   value  = __raw_readl(S5P_CLKGATE_BLOCK);
+   value &= ~pdata->gate_mask;
+   __raw_writel(value, S5P_CLKGATE_BLOCK);
+
+   spin_unlock_irqrestore(&gate_block_slock, flags);
+   }
+done:
+   dev_info(dev, "disable finished\n");
+
+   return ret;
 }
 
 struct platform_device exynos4_device_pd[] = {
-   {
+   [PD_MFC] = {
.name   = "samsung-pd",
-   .id = 0,
+   .id = PD_MFC,
.dev = {
.platform_data = &(struct samsung_pd_info) {
.enable = exynos4_pd_enable,
.disable= exynos4_pd_disable,
.base   = S5P_PMU_MFC_CONF,
+   .gate_mask  = S5P_CLKGATE_BLOCK_MFC,
},
},
-   }, {
+   },
+   [PD_G3D] = {
.name   = "samsung-pd",
-   .id = 1,
+   .id = PD_G3D,
.dev = {
.platform_data = &(struct samsung_pd_info) {
.enable = exynos4_pd_enable,
.disable= exynos4_pd_disable,
.base   = S5P_PMU_G3D_CONF,
+   .gate_mask  = S5P_CLKGATE_BLOCK_G3D,
},
},
-   }, {
+   },
+   [PD_LCD0] = {
.name   = "samsung-pd",
-   .id = 2,
+   .id = PD_LCD0,
.dev = {

[PATCH v4 0/9] TV driver for Samsung S5P platform (platform-part)

2011-05-25 Thread Tomasz Stanislawski
Hello Everyone,
This patchset introduce TV devices to Samsung S5P platform. It includes Goni
(S5PV210 machine) and Universal (Exynos4 machine) boards. The patchset is
dedicated for 2.6.39 kernel. Moreover, the patchset adds following auxiliary
entities and features:
- I2C controllers for HDMI physical interface
- power regulators
- TV clocks, include ops for fout_vpll clock
- fixes to power domain driver (only for Exynos4)
- dependecies between TV and Power Domain devices (only for Exynos4)

Please refer to post 'TV driver for Samsung S5P platform (media part)' for
sources of the TV driver.

The most recent changes:
- TV becomes S5P platform device
- support for Universal-c210 and Goni boards
- code cleanup after Kukjin Kim's review

Tomasz Stanislawski (9):
  arm: exynos4: pd: fixes block gating and code cleanup
  i2c-s3c2410: fix I2C dedicated for hdmiphy
  arm: exynos4: i2c: add controller 8 (HDMIPHY)
  arm: s5pv210: i2c: add controller 3 (HDMIPHY)
  arm: plat-s5p: add TV support
  arm: exynos4: add TV support
  arm: exynos4: universal_c210: add TV support
  arm: s5pv210: add TV support
  arm: s5pv210: goni: add TV support

 arch/arm/mach-exynos4/Kconfig   |3 +
 arch/arm/mach-exynos4/clock.c   |  223 ++-
 arch/arm/mach-exynos4/cpu.c |7 +
 arch/arm/mach-exynos4/dev-pd.c  |   93 +++---
 arch/arm/mach-exynos4/include/mach/irqs.h   |8 +
 arch/arm/mach-exynos4/include/mach/map.h|   27 +++
 arch/arm/mach-exynos4/include/mach/regs-clock.h |8 +
 arch/arm/mach-exynos4/include/mach/regs-pmu.h   |6 +
 arch/arm/mach-exynos4/mach-universal_c210.c |   80 
 arch/arm/mach-s5pv210/Kconfig   |8 +
 arch/arm/mach-s5pv210/Makefile  |1 +
 arch/arm/mach-s5pv210/clock.c   |  169 --
 arch/arm/mach-s5pv210/cpu.c |6 +
 arch/arm/mach-s5pv210/include/mach/irqs.h   |2 +-
 arch/arm/mach-s5pv210/include/mach/map.h|   19 ++
 arch/arm/mach-s5pv210/include/mach/regs-clock.h |7 +-
 arch/arm/mach-s5pv210/mach-goni.c   |9 +
 arch/arm/mach-s5pv210/setup-i2c3.c  |   27 +++
 arch/arm/plat-s5p/Kconfig   |5 +
 arch/arm/plat-s5p/Makefile  |1 +
 arch/arm/plat-s5p/dev-tv.c  |  100 ++
 arch/arm/plat-samsung/Kconfig   |5 +
 arch/arm/plat-samsung/Makefile  |1 +
 arch/arm/plat-samsung/dev-i2c8.c|   68 +++
 arch/arm/plat-samsung/include/plat/devs.h   |6 +
 arch/arm/plat-samsung/include/plat/iic-core.h   |   14 ++
 arch/arm/plat-samsung/include/plat/iic.h|1 +
 arch/arm/plat-samsung/include/plat/pd.h |1 +
 arch/arm/plat-samsung/include/plat/tv-core.h|   45 +
 drivers/i2c/busses/i2c-s3c2410.c|   36 -
 30 files changed, 947 insertions(+), 39 deletions(-)
 create mode 100644 arch/arm/mach-s5pv210/setup-i2c3.c
 create mode 100644 arch/arm/plat-s5p/dev-tv.c
 create mode 100644 arch/arm/plat-samsung/dev-i2c8.c
 create mode 100644 arch/arm/plat-samsung/include/plat/tv-core.h

-- 
1.7.5.1

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v4 8/9] arm: s5pv210: add TV support

2011-05-25 Thread Tomasz Stanislawski
Add clocks and definitions needed by TV driver infrastructure
for Samsung S5PV210 machine.

Signed-off-by: Tomasz Stanislawski 
---
 arch/arm/mach-s5pv210/clock.c   |  163 +--
 arch/arm/mach-s5pv210/cpu.c |4 +
 arch/arm/mach-s5pv210/include/mach/irqs.h   |2 +-
 arch/arm/mach-s5pv210/include/mach/map.h|   17 +++
 arch/arm/mach-s5pv210/include/mach/regs-clock.h |7 +-
 5 files changed, 178 insertions(+), 15 deletions(-)

diff --git a/arch/arm/mach-s5pv210/clock.c b/arch/arm/mach-s5pv210/clock.c
index db4eee7..036228e 100644
--- a/arch/arm/mach-s5pv210/clock.c
+++ b/arch/arm/mach-s5pv210/clock.c
@@ -185,6 +185,17 @@ static int s5pv210_clk_mask1_ctrl(struct clk *clk, int 
enable)
return s5p_gatectrl(S5P_CLK_SRC_MASK1, clk, enable);
 }
 
+static int exynos4_clk_hdmiphy_ctrl(struct clk *clk, int enable)
+{
+   return s5p_gatectrl(S5P_HDMI_PHY_CONTROL, clk, enable);
+}
+
+static int exynos4_clk_dac_ctrl(struct clk *clk, int enable)
+{
+   return s5p_gatectrl(S5P_DAC_PHY_CONTROL, clk, enable);
+}
+
+
 static struct clk clk_sclk_hdmi27m = {
.name   = "sclk_hdmi27m",
.id = -1,
@@ -347,6 +358,40 @@ static struct clk init_clocks_off[] = {
.enable = s5pv210_clk_ip0_ctrl,
.ctrlbit= (1 << 26),
}, {
+   .name   = "dac",
+   .id = -1,
+   .parent = &clk_hclk_dsys.clk,
+   .enable = s5pv210_clk_ip1_ctrl,
+   .ctrlbit= (1 << 10),
+   }, {
+   .name   = "mixer",
+   .id = -1,
+   .parent = &clk_hclk_dsys.clk,
+   .enable = s5pv210_clk_ip1_ctrl,
+   .ctrlbit= (1 << 9),
+   }, {
+   .name   = "vp",
+   .id = -1,
+   .parent = &clk_hclk_dsys.clk,
+   .enable = s5pv210_clk_ip1_ctrl,
+   .ctrlbit= (1 << 8),
+   }, {
+   .name   = "hdmi",
+   .id = -1,
+   .parent = &clk_hclk_dsys.clk,
+   .enable = s5pv210_clk_ip1_ctrl,
+   .ctrlbit= (1 << 11),
+   }, {
+   .name   = "hdmiphy",
+   .id = -1,
+   .enable = exynos4_clk_hdmiphy_ctrl,
+   .ctrlbit= (1 << 0),
+   }, {
+   .name   = "dacphy",
+   .id = -1,
+   .enable = exynos4_clk_dac_ctrl,
+   .ctrlbit= (1 << 0),
+   }, {
.name   = "otg",
.id = -1,
.parent = &clk_hclk_psys.clk,
@@ -572,6 +617,11 @@ static struct clksrc_sources clkset_sclk_onenand = {
.nr_sources = ARRAY_SIZE(clkset_sclk_onenand_list),
 };
 
+/* --
+ * TV subsystem CLOCKS
+ * --
+ */
+
 static struct clk *clkset_sclk_dac_list[] = {
[0] = &clk_sclk_vpll.clk,
[1] = &clk_sclk_hdmiphy,
@@ -633,6 +683,27 @@ static struct clksrc_sources clkset_sclk_mixer = {
.nr_sources = ARRAY_SIZE(clkset_sclk_mixer_list),
 };
 
+static struct clksrc_clk clk_sclk_mixer = {
+   .clk= {
+   .name   = "sclk_mixer",
+   .id = -1,
+   .enable = s5pv210_clk_mask0_ctrl,
+   .ctrlbit= (1 << 1),
+   },
+   .sources = &clkset_sclk_mixer,
+   .reg_src = { .reg = S5P_CLK_SRC1, .shift = 4, .size = 1 },
+};
+
+static struct clksrc_clk *sclk_tv[] = {
+   &clk_sclk_dac,
+   &clk_sclk_pixel,
+   &clk_sclk_hdmi,
+   &clk_sclk_mixer,
+   NULL,
+};
+
+/*  */
+
 static struct clk *clkset_sclk_audio0_list[] = {
[0] = &clk_ext_xtal_mux,
[1] = &clk_pcmcdclk0,
@@ -854,15 +925,6 @@ static struct clksrc_clk clksrcs[] = {
.reg_div = { .reg = S5P_CLK_DIV4, .shift = 28, .size = 4 },
}, {
.clk= {
-   .name   = "sclk_mixer",
-   .id = -1,
-   .enable = s5pv210_clk_mask0_ctrl,
-   .ctrlbit= (1 << 1),
-   },
-   .sources = &clkset_sclk_mixer,
-   .reg_src = { .reg = S5P_CLK_SRC1, .shift = 4, .size = 1 },
-   }, {
-   .clk= {
.name   = "sclk_fimc",
.id = 0,
.enable = s5pv210_clk_mask1_ctrl,
@@ -1059,9 +1121,6 @@ static struct clksrc_clk *sysclks[] = {
&clk_pclk_psys,
&clk_vpllsrc,

[PATCH v4 3/9] arm: exynos4: i2c: add controller 8 (HDMIPHY)

2011-05-25 Thread Tomasz Stanislawski
Signed-off-by: Tomasz Stanislawski 
Signed-off-by: Kyungmin Park 
---
 arch/arm/mach-exynos4/clock.c |6 ++
 arch/arm/mach-exynos4/cpu.c   |3 +
 arch/arm/mach-exynos4/include/mach/irqs.h |4 ++
 arch/arm/mach-exynos4/include/mach/map.h  |1 +
 arch/arm/plat-samsung/Kconfig |5 ++
 arch/arm/plat-samsung/Makefile|1 +
 arch/arm/plat-samsung/dev-i2c8.c  |   68 +
 arch/arm/plat-samsung/include/plat/devs.h |1 +
 arch/arm/plat-samsung/include/plat/iic-core.h |7 +++
 arch/arm/plat-samsung/include/plat/iic.h  |1 +
 10 files changed, 97 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/plat-samsung/dev-i2c8.c

diff --git a/arch/arm/mach-exynos4/clock.c b/arch/arm/mach-exynos4/clock.c
index 871f9d5..035eacc 100644
--- a/arch/arm/mach-exynos4/clock.c
+++ b/arch/arm/mach-exynos4/clock.c
@@ -614,6 +614,12 @@ static struct clk init_clocks_off[] = {
.enable = exynos4_clk_ip_peril_ctrl,
.ctrlbit= (1 << 13),
}, {
+   .name   = "i2c",
+   .id = 8,
+   .parent = &clk_aclk_100.clk,
+   .enable = exynos4_clk_ip_peril_ctrl,
+   .ctrlbit= (1 << 14),
+   }, {
.name   = "SYSMMU_MDMA",
.id = -1,
.enable = exynos4_clk_ip_image_ctrl,
diff --git a/arch/arm/mach-exynos4/cpu.c b/arch/arm/mach-exynos4/cpu.c
index 7930113..52b145e 100644
--- a/arch/arm/mach-exynos4/cpu.c
+++ b/arch/arm/mach-exynos4/cpu.c
@@ -23,6 +23,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -123,6 +124,8 @@ void __init exynos4_map_io(void)
exynos4_default_sdhci2();
exynos4_default_sdhci3();
 
+   s3c_i2c8_setname("s3c2440-hdmiphy-i2c");
+
s3c_fimc_setname(0, "exynos4-fimc");
s3c_fimc_setname(1, "exynos4-fimc");
s3c_fimc_setname(2, "exynos4-fimc");
diff --git a/arch/arm/mach-exynos4/include/mach/irqs.h 
b/arch/arm/mach-exynos4/include/mach/irqs.h
index 5d03730..7e9eb1c 100644
--- a/arch/arm/mach-exynos4/include/mach/irqs.h
+++ b/arch/arm/mach-exynos4/include/mach/irqs.h
@@ -76,6 +76,9 @@
 #define IRQ_PDMA0  COMBINER_IRQ(21, 0)
 #define IRQ_PDMA1  COMBINER_IRQ(21, 1)
 
+#define IRQ_HDMI   COMBINER_IRQ(16, 0)
+#define IRQ_HDMI_I2C   COMBINER_IRQ(16, 1)
+
 #define IRQ_TIMER0_VIC COMBINER_IRQ(22, 0)
 #define IRQ_TIMER1_VIC COMBINER_IRQ(22, 1)
 #define IRQ_TIMER2_VIC COMBINER_IRQ(22, 2)
@@ -102,6 +105,7 @@
 #define IRQ_IIC5   COMBINER_IRQ(27, 5)
 #define IRQ_IIC6   COMBINER_IRQ(27, 6)
 #define IRQ_IIC7   COMBINER_IRQ(27, 7)
+#define IRQ_IIC8   IRQ_HDMI_I2C
 
 #define IRQ_HSMMC0 COMBINER_IRQ(29, 0)
 #define IRQ_HSMMC1 COMBINER_IRQ(29, 1)
diff --git a/arch/arm/mach-exynos4/include/mach/map.h 
b/arch/arm/mach-exynos4/include/mach/map.h
index 6330b73..263f38b 100644
--- a/arch/arm/mach-exynos4/include/mach/map.h
+++ b/arch/arm/mach-exynos4/include/mach/map.h
@@ -127,6 +127,7 @@
 #define S3C_PA_IIC5EXYNOS4_PA_IIC(5)
 #define S3C_PA_IIC6EXYNOS4_PA_IIC(6)
 #define S3C_PA_IIC7EXYNOS4_PA_IIC(7)
+#define S3C_PA_IIC8EXYNOS4_PA_IIC(8)
 #define S3C_PA_RTC EXYNOS4_PA_RTC
 #define S3C_PA_WDT EXYNOS4_PA_WATCHDOG
 
diff --git a/arch/arm/plat-samsung/Kconfig b/arch/arm/plat-samsung/Kconfig
index be72100..c764227 100644
--- a/arch/arm/plat-samsung/Kconfig
+++ b/arch/arm/plat-samsung/Kconfig
@@ -211,6 +211,11 @@ config S3C_DEV_I2C7
help
  Compile in platform device definition for I2C controller 7
 
+config S3C_DEV_I2C8
+   bool
+   help
+ Compile in platform device definitions for I2C channel 8 (HDMIPHY)
+
 config S3C_DEV_FB
bool
help
diff --git a/arch/arm/plat-samsung/Makefile b/arch/arm/plat-samsung/Makefile
index e9de58a..752df43 100644
--- a/arch/arm/plat-samsung/Makefile
+++ b/arch/arm/plat-samsung/Makefile
@@ -46,6 +46,7 @@ obj-$(CONFIG_S3C_DEV_I2C4)+= dev-i2c4.o
 obj-$(CONFIG_S3C_DEV_I2C5) += dev-i2c5.o
 obj-$(CONFIG_S3C_DEV_I2C6) += dev-i2c6.o
 obj-$(CONFIG_S3C_DEV_I2C7) += dev-i2c7.o
+obj-$(CONFIG_S3C_DEV_I2C8) += dev-i2c8.o
 obj-$(CONFIG_S3C_DEV_FB)   += dev-fb.o
 obj-y  += dev-uart.o
 obj-$(CONFIG_S3C_DEV_USB_HOST) += dev-usb.o
diff --git a/arch/arm/plat-samsung/dev-i2c8.c b/arch/arm/plat-samsung/dev-i2c8.c
new file mode 100644
index 000..1a4a4aa
--- /dev/null
+++ b/arch/arm/plat-samsung/dev-i2c8.c
@@ -0,0 +1,68 @@
+/* linux/arch/arm/plat-samsung/dev-i2c7.c
+ *
+ * Copyright (c) 2010 Samsung Electronics Co., Ltd.
+ * http://www.samsung.com/
+ *
+ * S3C series devic

[PATCH v4 4/9] arm: s5pv210: i2c: add controller 3 (HDMIPHY)

2011-05-25 Thread Tomasz Stanislawski
Signed-off-by: Tomasz Stanislawski 
Signed-off-by: Kyungmin Park 
---
 arch/arm/mach-s5pv210/Kconfig |7 ++
 arch/arm/mach-s5pv210/Makefile|1 +
 arch/arm/mach-s5pv210/clock.c |6 +
 arch/arm/mach-s5pv210/cpu.c   |2 +
 arch/arm/mach-s5pv210/include/mach/map.h  |2 +
 arch/arm/mach-s5pv210/setup-i2c3.c|   27 +
 arch/arm/plat-samsung/include/plat/iic-core.h |7 ++
 7 files changed, 52 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-s5pv210/setup-i2c3.c

diff --git a/arch/arm/mach-s5pv210/Kconfig b/arch/arm/mach-s5pv210/Kconfig
index 37b5a97..7e73ae8 100644
--- a/arch/arm/mach-s5pv210/Kconfig
+++ b/arch/arm/mach-s5pv210/Kconfig
@@ -28,6 +28,11 @@ config S5PV210_SETUP_I2C2
help
  Common setup code for i2c bus 2.
 
+config S5PV210_SETUP_I2C3
+   bool
+   help
+ Common setup code for i2c bus 3.
+
 config S5PV210_SETUP_IDE
bool
help
@@ -90,12 +95,14 @@ config MACH_GONI
select S3C_DEV_HSMMC2
select S3C_DEV_I2C1
select S3C_DEV_I2C2
+   select S3C_DEV_I2C3
select S3C_DEV_USB_HSOTG
select S5P_DEV_ONENAND
select SAMSUNG_DEV_KEYPAD
select S5PV210_SETUP_FB_24BPP
select S5PV210_SETUP_I2C1
select S5PV210_SETUP_I2C2
+   select S5PV210_SETUP_I2C3
select S5PV210_SETUP_KEYPAD
select S5PV210_SETUP_SDHCI
help
diff --git a/arch/arm/mach-s5pv210/Makefile b/arch/arm/mach-s5pv210/Makefile
index 11f1790..2bcf782 100644
--- a/arch/arm/mach-s5pv210/Makefile
+++ b/arch/arm/mach-s5pv210/Makefile
@@ -34,6 +34,7 @@ obj-$(CONFIG_S5PV210_SETUP_FB_24BPP)  += setup-fb-24bpp.o
 obj-$(CONFIG_S5PV210_SETUP_FIMC)   += setup-fimc.o
 obj-$(CONFIG_S5PV210_SETUP_I2C1)   += setup-i2c1.o
 obj-$(CONFIG_S5PV210_SETUP_I2C2)   += setup-i2c2.o
+obj-$(CONFIG_S5PV210_SETUP_I2C3)   += setup-i2c3.o
 obj-$(CONFIG_S5PV210_SETUP_IDE)+= setup-ide.o
 obj-$(CONFIG_S5PV210_SETUP_KEYPAD) += setup-keypad.o
 obj-$(CONFIG_S5PV210_SETUP_SDHCI)   += setup-sdhci.o
diff --git a/arch/arm/mach-s5pv210/clock.c b/arch/arm/mach-s5pv210/clock.c
index 2d59949..db4eee7 100644
--- a/arch/arm/mach-s5pv210/clock.c
+++ b/arch/arm/mach-s5pv210/clock.c
@@ -431,6 +431,12 @@ static struct clk init_clocks_off[] = {
.enable = s5pv210_clk_ip3_ctrl,
.ctrlbit= (1<<9),
}, {
+   .name   = "i2c",
+   .id = 3,
+   .parent = &clk_pclk_psys.clk,
+   .enable = s5pv210_clk_ip3_ctrl,
+   .ctrlbit= (1 << 11),
+   }, {
.name   = "spi",
.id = 0,
.parent = &clk_pclk_psys.clk,
diff --git a/arch/arm/mach-s5pv210/cpu.c b/arch/arm/mach-s5pv210/cpu.c
index 61e6c24..61ea36e 100644
--- a/arch/arm/mach-s5pv210/cpu.c
+++ b/arch/arm/mach-s5pv210/cpu.c
@@ -130,6 +130,8 @@ void __init s5pv210_map_io(void)
 
s3c_cfcon_setname("s5pv210-pata");
 
+   s3c_i2c3_setname("s3c2440-hdmiphy-i2c");
+
s3c_fimc_setname(0, "s5pv210-fimc");
s3c_fimc_setname(1, "s5pv210-fimc");
s3c_fimc_setname(2, "s5pv210-fimc");
diff --git a/arch/arm/mach-s5pv210/include/mach/map.h 
b/arch/arm/mach-s5pv210/include/mach/map.h
index 1dd5883..f6bb269 100644
--- a/arch/arm/mach-s5pv210/include/mach/map.h
+++ b/arch/arm/mach-s5pv210/include/mach/map.h
@@ -41,6 +41,7 @@
 #define S5PV210_PA_IIC00xE180
 #define S5PV210_PA_IIC10xFAB0
 #define S5PV210_PA_IIC20xE1A0
+#define S5PV210_PA_IIC30xFA90
 
 #define S5PV210_PA_AC970xE220
 
@@ -98,6 +99,7 @@
 #define S3C_PA_IIC S5PV210_PA_IIC0
 #define S3C_PA_IIC1S5PV210_PA_IIC1
 #define S3C_PA_IIC2S5PV210_PA_IIC2
+#define S3C_PA_IIC3S5PV210_PA_IIC3
 #define S3C_PA_RTC S5PV210_PA_RTC
 #define S3C_PA_USB_HSOTG   S5PV210_PA_HSOTG
 #define S3C_PA_WDT S5PV210_PA_WATCHDOG
diff --git a/arch/arm/mach-s5pv210/setup-i2c3.c 
b/arch/arm/mach-s5pv210/setup-i2c3.c
new file mode 100644
index 000..b77de7a
--- /dev/null
+++ b/arch/arm/mach-s5pv210/setup-i2c3.c
@@ -0,0 +1,27 @@
+/* linux/arch/arm/mach-s5pv210/setup-i2c3.c
+ *
+ * Copyright (c) 2009-2010 Samsung Electronics Co., Ltd.
+ * http://www.samsung.com/
+ *
+ * I2C3 GPIO configuration.
+ *
+ * based on linux/arch/arm/mach-s5pv210/setup-i2c2.c
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+*/
+
+#include 
+#include 
+#include 
+
+struct platform_de