Re: [PATCH] ARM: S3C24XX: Fix restart on S3C2442

2012-02-15 Thread Heiko Stübner
Hi Kgene,

Am Sonntag, 12. Februar 2012, 14:59:54 schrieb Heiko Stübner:
> Commit b27b072791dc (ARM: 7265/1: restart: S3C24XX: use new restart hook)
> introduced the new restart hook also for the S3C244x cpus, but it
> was only defined in the S3C2440 scope, i.e. when CPU_S3C2440 was
> selected. Devices using the S3C2442 like the GTA02 normally don't select
> this CPU which leads to compilation errors like:
> LD  .tmp_vmlinux1
>   arch/arm/mach-s3c2440/built-in.o:(.arch.info.init+0x3c): undefined
> reference to `s3c2440_restart' make: *** [.tmp_vmlinux1] Error 1
> 
> Therefore move the s3c2440_restart function to s3c244x.c which is
> common to both cpus and also fix the naming to reflect this.
> 
> Reported-by: Denis 'GNUtoo' Carikli 
> Signed-off-by: Heiko Stuebner 
could you take a look at this patch and possibly pick it up as fix for the 
current -rcs.


Thanks
Heiko
--
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: SAMSUNG: Correct MIPI-CSIS io memory resource definition

2012-02-15 Thread Kukjin Kim
Sylwester Nawrocki wrote:
> 
> The resources size is increased to 16KB to also include the non-image
> packet
> data buffers (CSIS_PKTDATAn). The 4KiB region is only sufficient when the
> driver is not using the packet data buffers.
> 
> Signed-off-by: Sylwester Nawrocki 
> Signed-off-by: Kyungmin Park 
> 
> ---
> Hi Kgene,
> 
Hi
 
> This patch is a fix, but it should be needed starting from v3.4,
> when the MIPI-CSIS driver is updated.
> 
OK, will apply.

But it's time to replace static definition for resource and as a note, I'm
going to prepare it :)

If any updates, 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 v2 03/11] ARM: EXYNOS: add clock part for EXYNOS5250 SoC

2012-02-15 Thread Arnd Bergmann
On Thursday 16 February 2012, Turquette, Mike wrote:
> >
> >> Ah, one more, would be better to us if arm-soc tree could provide
> >> the topic branch for 'common struct clk' working as a base.
> >
> > Good point. Mike, can you send a pull request for whatever you have
> > now as another staging branch for arm-soc?
> 
> Arnd, we discussed linux-next as the target for the common clk core
> code at Linaro Connect.  Are you now asking for that code in arm-soc?
> If so, I think it would be better to keep things simple only target
> linux-next once V5 has hit the lists after ELC.

I guess waiting for you to send out v5 is a good idea, but as Kgene
mentioned it would be nice to have the series in arm-soc in order
to base other branches on top of it, and we have now made it possible
to update branches like this one by declaring them "staging".

The main advantage that I see of putting your series into arm-soc
is that I can handle the dependencies: If you want to update the
series based to v6 after more review and send me a replacement pull
request, I can rebase the exynos5 patches (and other conversions)
on top of that. If you have a different tree in linux-next and plan
to rebase it, I cannot take any other patches into arm-soc that depend
on yours.

The alternative would be that I take the exynos5 patches in their
current shape into arm-soc and you put your patches into linux-next
based on the branch that I have, and with a patch to convert exynos5
to it on top.

> If you are instead referring to OMAP platform support for common clk,
> that code is very infantile and not yet ready for arm-soc, especially
> as it breaks OMAP2+ multi-boot.

I did not mean the omap specific parts.

Arnd
--
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] EXYNOS4X12: Add support cpufreq for EXYNOS4X12

2012-02-15 Thread Kukjin Kim
Sylwester Nawrocki wrote:
> 
> Hello,
> 
Hi Sylwester,

> I have a few comments below, it's mainly coding style nit picks though.
> 
Thank you for your comments and as I know, Jaecheol Lee will address
comments from you.

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: S3C64XX: Supply platform data for SPI on Cragganmore

2012-02-15 Thread Kukjin Kim
Mark Brown wrote:
> 
> Having to specify the platform data explicitly like this even though it

Yes.

> is provided as a default doesn't feel entirely elegant but there we are.
> 
Hmm...OK, I see. Will apply.

And let me check about similar case in samsung stuff whether it would be
changed or not.

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 v2 03/11] ARM: EXYNOS: add clock part for EXYNOS5250 SoC

2012-02-15 Thread Kukjin Kim
Kukjin Kim wrote:
> 
> This patch adds clock-exynos5.c for EXYNOS5250 now
> and that can be used for other EXYNOS5 SoCs later.

[...]

> +static int exynos5_clk_ip_acp_ctrl(struct clk *clk, int enable)
> +{
> + return s5p_gatectrl(EXYNOS5_CLKGATE_IP_ACP, clk, enable);
> +}

This is not used yet. So I removed this function.

[...]

> +static struct clksrc_clk exynos5_clk_sclk_hdmi = {
> + .clk= {
> + .name   = "sclk_hdmi",
 ^^^
I fixed to use tab at above mark ^

[...]

> +static struct clk exynos5_clk_pdma0 = {
> + .name   = "dma",
> + .devname= "dma-pl330.0",
> + .enable = exynos5_clk_ip_gen_ctrl,
> + .ctrlbit= (1 << 4),

I fixed like following.

.enable = exynos5_clk_ip_fsys_ctrl,
.ctrlbit= (1 << 1),

[...]

> +static struct clk exynos5_clk_pdma2 = {
> + .name   = "dma",
> + .devname= "dma-pl330.2",
> + .enable = exynos5_clk_ip_fsys_ctrl,
> + .ctrlbit= (1 << 1),

static struct clk exynos5_clk_mdma1 = {
.name   = "dma",
.devname= "dma-pl330.2",
.enable = exynos5_clk_ip_gen_ctrl,
.ctrlbit= (1 << 4),

[...]

> +static struct clksrc_clk exynos5_clk_sclk_mmc1 = {
> + .clk= {
> + .name   = "sclk_mmc",
> + .devname= "s3c-sdhci.1",
> + .parent = &exynos5_clk_dout_mmc1.clk,
   ^
same as above

[...]

> +static struct clksrc_clk exynos5_clk_sclk_mmc2 = {
> + .clk= {
> + .name   = "sclk_mmc",
> + .devname= "s3c-sdhci.2",
> + .parent = &exynos5_clk_dout_mmc2.clk,
   ^

[...]

> +static struct clksrc_clk exynos5_clk_sclk_mmc3 = {
> + .reg_div = { .reg = EXYNOS5_CLKDIV_FSYS2, .shift = 8, .size = 8 },

Ooops, this should be moved in above 'exynos5_clk_sclk_mmc2' :(

> + .clk= {
> + .name   = "sclk_mmc",
> + .devname= "s3c-sdhci.3",
> + .parent = &exynos5_clk_dout_mmc3.clk,
   ^

[...]

> +static struct clksrc_clk exynos5_clksrcs[] = {
> + {
> + .clk= {
> + .name   = "sclk_dwmci",
> + .parent = &exynos5_clk_dout_mmc4.clk,
   ^

[...]

> +static struct clk *exynos5_clk_cdev[] = {
> + &exynos5_clk_pdma0,
> + &exynos5_clk_pdma1,
> + &exynos5_clk_pdma2,

according to above changes,

&exynos5_clk_mdma1,

[...]

> + CLKDEV_INIT("dma-pl330.0", "apb_pclk", &exynos5_clk_pdma0),
> + CLKDEV_INIT("dma-pl330.1", "apb_pclk", &exynos5_clk_pdma1),
> + CLKDEV_INIT("dma-pl330.2", "apb_pclk", &exynos5_clk_pdma2),

CLKDEV_INIT("dma-pl330.2", "apb_pclk", &exynos5_clk_mdma1),

[...]

> +struct syscore_ops exynos5_clock_syscore_ops = {
> + .suspend= exynos5_clock_suspend,

> + .resume = exynos5_clock_resume,
   ^
Tab

[...]

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 v2 03/11] ARM: EXYNOS: add clock part for EXYNOS5250 SoC

2012-02-15 Thread Turquette, Mike
On Wed, Feb 15, 2012 at 9:22 PM, Arnd Bergmann  wrote:
> On Thursday 16 February 2012, Kukjin Kim wrote:
>> Thanks for your sharing.
>>
>> OK, I and my team will follow up 'common struct clk' for exynos5250
>> and it will be done maybe next week. And since I need to
>> implement other features for exynos5250 now, firstly let me use this
>> and test this series in linux-next in a day.
>
> Ok, sounds good to me.
>
> If you like, you could also send the patches that you expect to stay
> stable for inclusion into arm-soc, or send the entire series as a
> preliminary branch that I will put into arm-soc now and then
> replace when you are done with the remaining changes.
>
> As we discussed last week at Linaro Connect, we will start taking
> both stable and unstable branches into arm-soc now, whereas we used
> to take only stable branches. Anything that is not considered stable
> yet will be marked as a staging branch, e.g. staging/samsung/soc instead
> of samsung/soc.
>
>> Ah, one more, would be better to us if arm-soc tree could provide
>> the topic branch for 'common struct clk' working as a base.
>
> Good point. Mike, can you send a pull request for whatever you have
> now as another staging branch for arm-soc?

Arnd, we discussed linux-next as the target for the common clk core
code at Linaro Connect.  Are you now asking for that code in arm-soc?
If so, I think it would be better to keep things simple only target
linux-next once V5 has hit the lists after ELC.

If you are instead referring to OMAP platform support for common clk,
that code is very infantile and not yet ready for arm-soc, especially
as it breaks OMAP2+ multi-boot.

Regards,
Mike
--
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 v2 04/11] ARM: EXYNOS: add interrupt definitions for EXYNOS5250

2012-02-15 Thread Kukjin Kim
Kukjin Kim wrote:
>
> This patch adds the interrupt definitions for EXYNOS5250 at
>  file. Basically, now it is needed for EXYNOS5250
> interrupt and will be updated for single zImage next time.

[...]

> +#define JOP_IRQ_NUMBER   IRQ_SPI(118)

Typo :( Should be 'JOB_IRQ_...'

And I need to update every IRQ definitions...

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 v2 06/11] ARM: EXYNOS: add support uart for EXYNOS4 and EXYNOS5

2012-02-15 Thread Kukjin Kim
Kukjin Kim wrote:

[...]

> +struct s3c24xx_uart_resources exynos4_uart_resources[] __initdata = {
> + [0] = {
> + .resources  = exynos4_uart0_resource,
> + .nr_resources   = ARRAY_SIZE(exynos4_uart0_resource),
> + },
> + [1] = {
> + .resources  = exynos4_uart1_resource,
> + .nr_resources   = ARRAY_SIZE(exynos4_uart0_resource),

Ooops, should be...

.nr_resources   = ARRAY_SIZE(exynos4_uart1_resource),


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 v2 08/11] ARM: EXYNOS: add support for ARCH_EXYNOS5 and EXYNOS5250

2012-02-15 Thread Kukjin Kim
Kyungmin Park wrote:
> 
> Hi,
> 

[...]

> >
> > +config ARCH_EXYNOS5
> > +   bool "SAMSUNG EXYNOS5"
> > +   select HAVE_SMP
> > +   help
> > + Samsung EXYNOS5 (Cortex-A15) SoC based systems
> This config is located at choice. It means it can't build the exynos4
> and exynos5 simultaneously. I'm not sure it's acceptable for mainline.

See Arnd's comments.

[...]

> > +obj-$(CONFIG_ARCH_EXYNOS5) += clock-exynos5.o
> Where's clock-exynos5.c file in this patch?. maybe it's another patch.

See 3rd patch.

[...]

> > +void exynos5_restart(char mode, const char *cmd)
> > +{
> > +   __raw_writel(0x1, EXYNOS_SWRESET);
> > +}
> Why new restart is required? it's same S5P_SWRESET and EXYNOS_SWRESET.
> see below.

It will be updated for exynos5.

[...]

> >
> >  #define S5P_SWRESETS5P_PMUREG(0x0400)
> > +#define EXYNOS_SWRESET S5P_PMUREG(0x0400)
> Please use just one.
> 
See 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: [PATCH v2 03/11] ARM: EXYNOS: add clock part for EXYNOS5250 SoC

2012-02-15 Thread Arnd Bergmann
On Thursday 16 February 2012, Kukjin Kim wrote:
> Thanks for your sharing.
> 
> OK, I and my team will follow up 'common struct clk' for exynos5250
> and it will be done maybe next week. And since I need to
> implement other features for exynos5250 now, firstly let me use this
> and test this series in linux-next in a day.

Ok, sounds good to me.

If you like, you could also send the patches that you expect to stay
stable for inclusion into arm-soc, or send the entire series as a
preliminary branch that I will put into arm-soc now and then
replace when you are done with the remaining changes.

As we discussed last week at Linaro Connect, we will start taking
both stable and unstable branches into arm-soc now, whereas we used
to take only stable branches. Anything that is not considered stable
yet will be marked as a staging branch, e.g. staging/samsung/soc instead
of samsung/soc.

> Ah, one more, would be better to us if arm-soc tree could provide
> the topic branch for 'common struct clk' working as a base.

Good point. Mike, can you send a pull request for whatever you have
now as another staging branch for arm-soc?

Arnd
--
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 v2 08/11] ARM: EXYNOS: add support for ARCH_EXYNOS5 and EXYNOS5250

2012-02-15 Thread Kukjin Kim
Arnd Bergmann wrote:
> 
> On Thursday 16 February 2012, Kyungmin Park wrote:
> > >
> > > +config ARCH_EXYNOS5
> > > + bool "SAMSUNG EXYNOS5"
> > > + select HAVE_SMP
> > > + help
> > > +   Samsung EXYNOS5 (Cortex-A15) SoC based systems
> > This config is located at choice. It means it can't build the exynos4
> > and exynos5 simultaneously. I'm not sure it's acceptable for mainline.
> 
> If we use the new common struct clk on exynos5 but not exynos4, it should
> stay a "choice" for the time being and get turned into a nonexclusive
> selection as soon as exynos4 moves over.
> 
Yes, right.

> If exynos4 and exynos5 end up using the same struct clk in 3.4, I would
> indeed ask to do this change now.
> 
If possible, yes. But I'm going to move common struct clk for exynos4 and 
exynos5 next time.

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 v2 08/11] ARM: EXYNOS: add support for ARCH_EXYNOS5 and EXYNOS5250

2012-02-15 Thread Arnd Bergmann
On Thursday 16 February 2012, Kyungmin Park wrote:
> >
> > +config ARCH_EXYNOS5
> > + bool "SAMSUNG EXYNOS5"
> > + select HAVE_SMP
> > + help
> > +   Samsung EXYNOS5 (Cortex-A15) SoC based systems
> This config is located at choice. It means it can't build the exynos4
> and exynos5 simultaneously. I'm not sure it's acceptable for mainline.

If we use the new common struct clk on exynos5 but not exynos4, it should
stay a "choice" for the time being and get turned into a nonexclusive
selection as soon as exynos4 moves over.

If exynos4 and exynos5 end up using the same struct clk in 3.4, I would
indeed ask to do this change now.

Arnd
--
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 v2 08/11] ARM: EXYNOS: add support for ARCH_EXYNOS5 and EXYNOS5250

2012-02-15 Thread Kyungmin Park
Hi,

On 2/12/12, Kukjin Kim  wrote:
> This patch add the CONFIG_ARCH_EXYNOS5 and CONFIG_SOC_EXYNOS5250
> support for EXYNOS5250 SoC has two Cortex-A15 cores. Since actually,
> most codes in mach-exynos/ are used commonly for EXYNOS4 and EXYNOS5
> the EXYNOS5/EXYNOS5250 has been implemented in mach-exynos/.
>
> Signed-off-by: Kukjin Kim 
> ---
>  arch/arm/Makefile|1 +
>  arch/arm/mach-exynos/Kconfig |   13 ++
>  arch/arm/mach-exynos/Makefile|1 +
>  arch/arm/mach-exynos/common.c|  165
> --
>  arch/arm/mach-exynos/common.h|   11 ++
>  arch/arm/mach-exynos/include/mach/map.h  |   21 +++-
>  arch/arm/mach-exynos/include/mach/regs-pmu.h |1 +
>  arch/arm/plat-s5p/Kconfig|4 +-
>  arch/arm/plat-samsung/include/plat/cpu.h |   10 ++
>  9 files changed, 211 insertions(+), 16 deletions(-)
>
> diff --git a/arch/arm/Makefile b/arch/arm/Makefile
> index 1683bfb..a826ffc 100644
> --- a/arch/arm/Makefile
> +++ b/arch/arm/Makefile
> @@ -180,6 +180,7 @@ machine-$(CONFIG_ARCH_S5P64X0):= s5p64x0
>  machine-$(CONFIG_ARCH_S5PC100)   := s5pc100
>  machine-$(CONFIG_ARCH_S5PV210)   := s5pv210
>  machine-$(CONFIG_ARCH_EXYNOS4)   := exynos
> +machine-$(CONFIG_ARCH_EXYNOS5)   := exynos
>  machine-$(CONFIG_ARCH_SA1100):= sa1100
>  machine-$(CONFIG_ARCH_SHARK) := shark
>  machine-$(CONFIG_ARCH_SHMOBILE)  := shmobile
> diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
> index 5d602f6..14b3460 100644
> --- a/arch/arm/mach-exynos/Kconfig
> +++ b/arch/arm/mach-exynos/Kconfig
> @@ -22,6 +22,12 @@ config ARCH_EXYNOS4
>   help
> Samsung EXYNOS4 SoCs based systems
>
> +config ARCH_EXYNOS5
> + bool "SAMSUNG EXYNOS5"
> + select HAVE_SMP
> + help
> +   Samsung EXYNOS5 (Cortex-A15) SoC based systems
This config is located at choice. It means it can't build the exynos4
and exynos5 simultaneously. I'm not sure it's acceptable for mainline.
> +
>  endchoice
>
>  comment "EXYNOS SoCs"
> @@ -53,6 +59,13 @@ config SOC_EXYNOS4412
>   help
> Enable EXYNOS4412 SoC support
>
> +config SOC_EXYNOS5250
> + bool "SAMSUNG EXYNOS5250"
> + default y
> + depends on ARCH_EXYNOS5
> + help
> +   Enable EXYNOS5250 SoC support
> +
>  config EXYNOS4_MCT
>   bool
>   default y
> diff --git a/arch/arm/mach-exynos/Makefile b/arch/arm/mach-exynos/Makefile
> index f8a3770..7214092 100644
> --- a/arch/arm/mach-exynos/Makefile
> +++ b/arch/arm/mach-exynos/Makefile
> @@ -14,6 +14,7 @@ obj-:=
>
>  obj-$(CONFIG_ARCH_EXYNOS)+= common.o
>  obj-$(CONFIG_ARCH_EXYNOS4)   += clock-exynos4.o
> +obj-$(CONFIG_ARCH_EXYNOS5)   += clock-exynos5.o
Where's clock-exynos5.c file in this patch?. maybe it's another patch.
>  obj-$(CONFIG_CPU_EXYNOS4210) += clock-exynos4210.o
>  obj-$(CONFIG_SOC_EXYNOS4212) += clock-exynos4212.o
>
> diff --git a/arch/arm/mach-exynos/common.c b/arch/arm/mach-exynos/common.c
> index 8db2627..cff7313 100644
> --- a/arch/arm/mach-exynos/common.c
> +++ b/arch/arm/mach-exynos/common.c
> @@ -49,9 +49,12 @@
>  static const char name_exynos4210[] = "EXYNOS4210";
>  static const char name_exynos4212[] = "EXYNOS4212";
>  static const char name_exynos4412[] = "EXYNOS4412";
> +static const char name_exynos5250[] = "EXYNOS5250";
>
>  static void exynos4_map_io(void);
> +static void exynos5_map_io(void);
>  static void exynos4_init_clocks(int xtal);
> +static void exynos5_init_clocks(int xtal);
>  static void exynos_init_uarts(struct s3c2410_uartcfg *cfg, int no);
>  static int exynos_init(void);
>
> @@ -80,6 +83,14 @@ static struct cpu_table cpu_ids[] __initdata = {
>   .init_uarts = exynos_init_uarts,
>   .init   = exynos_init,
>   .name   = name_exynos4412,
> + }, {
> + .idcode = EXYNOS5250_SOC_ID,
> + .idmask = EXYNOS5_SOC_MASK,
> + .map_io = exynos5_map_io,
> + .init_clocks= exynos5_init_clocks,
> + .init_uarts = exynos_init_uarts,
> + .init   = exynos_init,
> + .name   = name_exynos5250,
>   },
>  };
>
> @@ -88,10 +99,14 @@ static struct cpu_table cpu_ids[] __initdata = {
>  static struct map_desc exynos_iodesc[] __initdata = {
>   {
>   .virtual= (unsigned long)S5P_VA_CHIPID,
> - .pfn= __phys_to_pfn(EXYNOS4_PA_CHIPID),
> + .pfn= __phys_to_pfn(EXYNOS_PA_CHIPID),
>   .length = SZ_4K,
>   .type   = MT_DEVICE,
> - }, {
> + },
> +};
> +
> +static struct map_desc exynos4_iodesc[] __initdata = {
> + {
>   .virtual= (unsigned long)S3C_VA_SYS,
>   .pfn= __phys

RE: [PATCH v2 03/11] ARM: EXYNOS: add clock part for EXYNOS5250 SoC

2012-02-15 Thread Kukjin Kim
Grant Likely wrote:
> 
> On Mon, Feb 13, 2012 at 11:04:53AM +, Russell King - ARM Linux wrote:
> > On Mon, Feb 13, 2012 at 05:47:48AM +, Arnd Bergmann wrote:
> > > On Saturday 11 February 2012, Mark Brown wrote:
> > > > On Sat, Feb 11, 2012 at 08:07:08PM +, Arnd Bergmann wrote:
> > > > > what the risk is in changing exynos4 at the same time. It would
> > > > > be great if we can have all exynos use the common struct clk in 3.4,
> > > > > but I'm also happy if we just get exynos5 to do it that way from the
> > > > > beginning and move exynos4 over in 3.5 after you have had a chance
> > > > > to make sure everything still works.
> > > >
> > > > Are we likely to get the common struct clk in 3.4?  It's all been
> > > > extremely quiet on that front except for complaints about the lack of
> > > > progress.
> > >
> > > Yes, we discussed it during the subarch maintainers meeting at Linaro
> > > Connect last week and it looks like we're finally going forward on
> > > this now. Maybe Grant or Mike are better at explaining the current
> > > status regarding the clk implementation and bindings.
> >
> > That would be good for those who weren't there to be updated with what
> > was discussed.
> 
> The decision was essentially Mike would repost his series ASAP with a view
> to getting it queued up for v3.4.  I think he is also going to get it into
> linux-next so at least it gets testing, even if the ultimate decision is to
> wait for v3.5.
> 
Hmm...so I'm not sure if some exynos5250 products use v3.4, it can use common 
struct clk for mass production?

If not, I think, this should be kept on v3.4 then it can be changed to use 
common struct clk from v3.5.

> I'm going to rebase my clk series on top of his patches rather that trying

OK, sounds good to me.

> to merge my temporary versatile-only code.  If his series isn't ready to go
> in, I can still probably merge parts of the DT clock bindings anyway, but I'll
> need to do some cherry picking to do so.
> 
If any branch is ready for it, please let me know.

> The rough notes can be found here:
> 
> https://blueprints.launchpad.net/linux-linaro/+spec/linaro-kernel-q112-maintainer-summit-1
> 
Thanks for your sharing.

OK, I and my team will follow up 'common struct clk' for exynos5250 and it will 
be done maybe next week. And since I need to
implement other features for exynos5250 now, firstly let me use this and test 
this series in linux-next in a day.

Of course, if any updates, let you know.

Ah, one more, would be better to us if arm-soc tree could provide the topic 
branch for 'common struct clk' working as a base.

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 11/12] ARM: S3C2443: move mach-s3c2443/* into mach-s3c24xx/

2012-02-15 Thread Kukjin Kim
This patch moves S3C2443 stuff into mach-s3c24xx/ directory
so that we can merge the s3c24 series' directories to the
just one mach-s3c24xx/ directory.

Cc: Ben Dooks 
Cc: Russell King 
Signed-off-by: Kukjin Kim 
---
 arch/arm/Kconfig   |1 -
 arch/arm/Makefile  |2 +-
 arch/arm/mach-s3c2443/Kconfig  |   32 
 arch/arm/mach-s3c2443/Makefile |   20 
 arch/arm/mach-s3c24xx/Kconfig  |   29 ++
 arch/arm/mach-s3c24xx/Makefile |5 +++
 .../clock.c => mach-s3c24xx/clock-s3c2443.c}   |0
 .../dma.c => mach-s3c24xx/dma-s3c2443.c}   |0
 .../irq.c => mach-s3c24xx/irq-s3c2443.c}   |0
 .../{mach-s3c2443 => mach-s3c24xx}/mach-smdk2443.c |0
 arch/arm/{mach-s3c2443 => mach-s3c24xx}/s3c2443.c  |0
 11 files changed, 35 insertions(+), 54 deletions(-)
 delete mode 100644 arch/arm/mach-s3c2443/Kconfig
 delete mode 100644 arch/arm/mach-s3c2443/Makefile
 rename arch/arm/{mach-s3c2443/clock.c => mach-s3c24xx/clock-s3c2443.c} (100%)
 rename arch/arm/{mach-s3c2443/dma.c => mach-s3c24xx/dma-s3c2443.c} (100%)
 rename arch/arm/{mach-s3c2443/irq.c => mach-s3c24xx/irq-s3c2443.c} (100%)
 rename arch/arm/{mach-s3c2443 => mach-s3c24xx}/mach-smdk2443.c (100%)
 rename arch/arm/{mach-s3c2443 => mach-s3c24xx}/s3c2443.c (100%)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index f8044e9..22d6db3 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1072,7 +1072,6 @@ if ARCH_S3C24XX
 source "arch/arm/mach-s3c2412/Kconfig"
 source "arch/arm/mach-s3c2416/Kconfig"
 source "arch/arm/mach-s3c2440/Kconfig"
-source "arch/arm/mach-s3c2443/Kconfig"
 endif
 
 if ARCH_S3C64XX
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 59d9df4..f3f6d97 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -175,7 +175,7 @@ machine-$(CONFIG_ARCH_PRIMA2)   := prima2
 machine-$(CONFIG_ARCH_PXA) := pxa
 machine-$(CONFIG_ARCH_REALVIEW):= realview
 machine-$(CONFIG_ARCH_RPC) := rpc
-machine-$(CONFIG_ARCH_S3C24XX) := s3c24xx s3c2412 s3c2416 s3c2440 
s3c2443
+machine-$(CONFIG_ARCH_S3C24XX) := s3c24xx s3c2412 s3c2416 s3c2440
 machine-$(CONFIG_ARCH_S3C64XX) := s3c64xx
 machine-$(CONFIG_ARCH_S5P64X0) := s5p64x0
 machine-$(CONFIG_ARCH_S5PC100) := s5pc100
diff --git a/arch/arm/mach-s3c2443/Kconfig b/arch/arm/mach-s3c2443/Kconfig
deleted file mode 100644
index 793a0fe..000
--- a/arch/arm/mach-s3c2443/Kconfig
+++ /dev/null
@@ -1,32 +0,0 @@
-# Copyright 2007 Simtec Electronics
-#
-# Licensed under GPLv2
-
-config CPU_S3C2443
-   bool
-   depends on ARCH_S3C24XX
-   select CPU_ARM920T
-   select S3C2443_DMA if S3C2410_DMA
-   select CPU_LLSERIAL_S3C2440
-   select SAMSUNG_CLKSRC
-   select S3C2443_CLOCK
-   help
- Support for the S3C2443 SoC from the S3C24XX line
-
-config S3C2443_DMA
-   bool
-   depends on CPU_S3C2443
-   help
- Internal config node for S3C2443 DMA support
-
-menu "S3C2443 Machines"
-
-config MACH_SMDK2443
-   bool "SMDK2443"
-   select CPU_S3C2443
-   select MACH_SMDK
-   select S3C_DEV_HSMMC1
-   help
- Say Y here if you are using an SMDK2443
-
-endmenu
diff --git a/arch/arm/mach-s3c2443/Makefile b/arch/arm/mach-s3c2443/Makefile
deleted file mode 100644
index d1843c9..000
--- a/arch/arm/mach-s3c2443/Makefile
+++ /dev/null
@@ -1,20 +0,0 @@
-# arch/arm/mach-s3c2443/Makefile
-#
-# Copyright 2007 Simtec Electronics
-#
-# Licensed under GPLv2
-
-obj-y  :=
-obj-m  :=
-obj-n  :=
-obj-   :=
-
-obj-$(CONFIG_CPU_S3C2443)  += s3c2443.o
-obj-$(CONFIG_CPU_S3C2443)  += irq.o
-obj-$(CONFIG_CPU_S3C2443)  += clock.o
-
-obj-$(CONFIG_S3C2443_DMA)  += dma.o
-
-# Machine support
-
-obj-$(CONFIG_MACH_SMDK2443)+= mach-smdk2443.o
diff --git a/arch/arm/mach-s3c24xx/Kconfig b/arch/arm/mach-s3c24xx/Kconfig
index aa295f8..e537577 100644
--- a/arch/arm/mach-s3c24xx/Kconfig
+++ b/arch/arm/mach-s3c24xx/Kconfig
@@ -70,6 +70,17 @@ config CPU_S3C244X
def_bool y
depends on CPU_S3C2440 || CPU_S3C2442
 
+config CPU_S3C2443
+   bool "SAMSUNG S3C2443"
+   depends on ARCH_S3C24XX
+   select CPU_ARM920T
+   select CPU_LLSERIAL_S3C2440
+   select SAMSUNG_CLKSRC
+   select S3C2443_CLOCK
+   select S3C2443_DMA if S3C24XX_DMA
+   help
+ Support for the S3C2443 SoC from the S3C24XX line
+
 if CPU_S3C2410
 
 config S3C2410_DMA
@@ -459,6 +470,24 @@ config SMDK2440_CPU2442
 
 endif  # CPU_S3C2440
 
+if CPU_S3C2443
+
+config S3C2443_DMA
+   bool
+   help
+ Internal config node for S3C2443 DMA support
+
+comment "S3C2443 Boards"
+
+config MACH_SMDK2443
+   bool "SMDK2443"
+   select MAC

[PATCH 10/12] ARM: S3C2440: move mach-s3c2440/* into mach-s3c24xx/

2012-02-15 Thread Kukjin Kim
This patch moves S3C2440 stuff into mach-s3c24xx/ directory
so that we can merge the s3c24 series' directories to the
just one mach-s3c24xx/ directory.

And this patch is including following.
- re-ordered alphabetically by option text at Kconfig and Makefile

Cc: Ben Dooks 
Signed-off-by: Kukjin Kim 
---
 arch/arm/mach-s3c2440/Kconfig  |  165 ---
 arch/arm/mach-s3c2440/Makefile |   26 +---
 arch/arm/mach-s3c2440/common.h |   17 --
 arch/arm/mach-s3c24xx/Kconfig  |  169 +++-
 arch/arm/mach-s3c24xx/Makefile |   17 ++
 .../clock.c => mach-s3c24xx/clock-s3c2440.c}   |0
 .../clock-s3c244x.c}   |0
 arch/arm/mach-s3c24xx/common.h |6 +
 .../dma.c => mach-s3c24xx/dma-s3c2440.c}   |0
 .../include/mach/gta02.h   |0
 .../irq.c => mach-s3c24xx/irq-s3c2440.c}   |0
 .../s3c244x-irq.c => mach-s3c24xx/irq-s3c244x.c}   |0
 .../{mach-s3c2440 => mach-s3c24xx}/mach-anubis.c   |0
 .../mach-at2440evb.c   |0
 .../{mach-s3c2440 => mach-s3c24xx}/mach-gta02.c|0
 .../{mach-s3c2440 => mach-s3c24xx}/mach-mini2440.c |0
 .../{mach-s3c2440 => mach-s3c24xx}/mach-nexcoder.c |0
 .../mach-osiris-dvs.c  |0
 .../{mach-s3c2440 => mach-s3c24xx}/mach-osiris.c   |0
 .../{mach-s3c2440 => mach-s3c24xx}/mach-rx1950.c   |0
 .../{mach-s3c2440 => mach-s3c24xx}/mach-rx3715.c   |0
 .../{mach-s3c2440 => mach-s3c24xx}/mach-smdk2440.c |0
 arch/arm/{mach-s3c2440 => mach-s3c24xx}/s3c2440.c  |0
 arch/arm/{mach-s3c2440 => mach-s3c24xx}/s3c2442.c  |0
 arch/arm/{mach-s3c2440 => mach-s3c24xx}/s3c244x.c  |0
 25 files changed, 191 insertions(+), 209 deletions(-)
 delete mode 100644 arch/arm/mach-s3c2440/common.h
 rename arch/arm/{mach-s3c2440/clock.c => mach-s3c24xx/clock-s3c2440.c} (100%)
 rename arch/arm/{mach-s3c2440/s3c244x-clock.c => mach-s3c24xx/clock-s3c244x.c} 
(100%)
 rename arch/arm/{mach-s3c2440/dma.c => mach-s3c24xx/dma-s3c2440.c} (100%)
 rename arch/arm/{mach-s3c2440 => mach-s3c24xx}/include/mach/gta02.h (100%)
 rename arch/arm/{mach-s3c2440/irq.c => mach-s3c24xx/irq-s3c2440.c} (100%)
 rename arch/arm/{mach-s3c2440/s3c244x-irq.c => mach-s3c24xx/irq-s3c244x.c} 
(100%)
 rename arch/arm/{mach-s3c2440 => mach-s3c24xx}/mach-anubis.c (100%)
 rename arch/arm/{mach-s3c2440 => mach-s3c24xx}/mach-at2440evb.c (100%)
 rename arch/arm/{mach-s3c2440 => mach-s3c24xx}/mach-gta02.c (100%)
 rename arch/arm/{mach-s3c2440 => mach-s3c24xx}/mach-mini2440.c (100%)
 rename arch/arm/{mach-s3c2440 => mach-s3c24xx}/mach-nexcoder.c (100%)
 rename arch/arm/{mach-s3c2440 => mach-s3c24xx}/mach-osiris-dvs.c (100%)
 rename arch/arm/{mach-s3c2440 => mach-s3c24xx}/mach-osiris.c (100%)
 rename arch/arm/{mach-s3c2440 => mach-s3c24xx}/mach-rx1950.c (100%)
 rename arch/arm/{mach-s3c2440 => mach-s3c24xx}/mach-rx3715.c (100%)
 rename arch/arm/{mach-s3c2440 => mach-s3c24xx}/mach-smdk2440.c (100%)
 rename arch/arm/{mach-s3c2440 => mach-s3c24xx}/s3c2440.c (100%)
 rename arch/arm/{mach-s3c2440 => mach-s3c24xx}/s3c2442.c (100%)
 rename arch/arm/{mach-s3c2440 => mach-s3c24xx}/s3c244x.c (100%)

diff --git a/arch/arm/mach-s3c2440/Kconfig b/arch/arm/mach-s3c2440/Kconfig
index 914e620..ece7a10 100644
--- a/arch/arm/mach-s3c2440/Kconfig
+++ b/arch/arm/mach-s3c2440/Kconfig
@@ -2,35 +2,6 @@
 #
 # Licensed under GPLv2
 
-config CPU_S3C2440
-   bool
-   select CPU_ARM920T
-   select S3C2410_CLOCK
-   select S3C2410_PM if PM
-   select S3C2440_DMA if S3C2410_DMA
-   select CPU_S3C244X
-   select CPU_LLSERIAL_S3C2440
-   help
- Support for S3C2440 Samsung Mobile CPU based systems.
-
-config CPU_S3C2442
-   bool
-   select CPU_ARM920T
-   select S3C2410_CLOCK
-   select S3C2410_PM if PM
-   select CPU_S3C244X
-   select CPU_LLSERIAL_S3C2440
-   help
- Support for S3C2442 Samsung Mobile CPU based systems.
-
-config CPU_S3C244X
-   bool
-   depends on CPU_S3C2440 || CPU_S3C2442
-   help
- Support for S3C2440 and S3C2442 Samsung Mobile CPU based systems.
-
-
-
 config S3C2440_CPUFREQ
bool "S3C2440/S3C2442 CPU Frequency scaling support"
depends on CPU_FREQ_S3C24XX && (CPU_S3C2440 || CPU_S3C2442)
@@ -64,139 +35,3 @@ config S3C2440_PLL_16934400
default y if CPU_FREQ_S3C24XX_PLL
help
  PLL tables for S3C2440 or S3C2442 CPUs with 16.934MHz crystals.
-
-config S3C2440_DMA
-   bool
-   depends on CPU_S3C2440
-   help
- Support for S3C2440 specific DMA code5A
-
-menu "S3C2440 and S3C2442 Machines"
-
-config MACH_ANUBIS
-   bool "Simtec Electronics ANUBIS"
-   select CPU_S3C2440
-   select S3C24XX_DCLK
-   select PM_SIMTEC if PM
-   select HAVE_PATA_PLATFORM
-   select S3C24XX_GPIO_EXTRA64
-

[PATCH 09/12] ARM: S3C2416: move mach-s3c2416/* into mach-s3c24xx/

2012-02-15 Thread Kukjin Kim
This patch moves S3C2416 stuff into mach-s3c24xx/ directory
so that we can merge the s3c24 series' directories to the
just one mach-s3c24xx/ directory.

Cc: Ben Dooks 
Signed-off-by: Kukjin Kim 
---
 arch/arm/mach-s3c2416/Kconfig  |   46 ---
 arch/arm/mach-s3c2416/Makefile |   10 
 arch/arm/mach-s3c24xx/Kconfig  |   47 
 arch/arm/mach-s3c24xx/Makefile |9 
 .../clock.c => mach-s3c24xx/clock-s3c2416.c}   |0
 .../irq.c => mach-s3c24xx/irq-s3c2416.c}   |0
 .../{mach-s3c2416 => mach-s3c24xx}/mach-smdk2416.c |0
 .../pm.c => mach-s3c24xx/pm-s3c2416.c} |0
 arch/arm/{mach-s3c2416 => mach-s3c24xx}/s3c2416.c  |0
 .../setup-sdhci-gpio.c |0
 10 files changed, 56 insertions(+), 56 deletions(-)
 rename arch/arm/{mach-s3c2416/clock.c => mach-s3c24xx/clock-s3c2416.c} (100%)
 rename arch/arm/{mach-s3c2416/irq.c => mach-s3c24xx/irq-s3c2416.c} (100%)
 rename arch/arm/{mach-s3c2416 => mach-s3c24xx}/mach-smdk2416.c (100%)
 rename arch/arm/{mach-s3c2416/pm.c => mach-s3c24xx/pm-s3c2416.c} (100%)
 rename arch/arm/{mach-s3c2416 => mach-s3c24xx}/s3c2416.c (100%)
 rename arch/arm/{mach-s3c2416 => mach-s3c24xx}/setup-sdhci-gpio.c (100%)

diff --git a/arch/arm/mach-s3c2416/Kconfig b/arch/arm/mach-s3c2416/Kconfig
index 53d5c2b..faaa289 100644
--- a/arch/arm/mach-s3c2416/Kconfig
+++ b/arch/arm/mach-s3c2416/Kconfig
@@ -7,54 +7,8 @@
 # note, this also supports the S3C2450 which is so similar it has the same
 # ID code as the S3C2416.
 
-config CPU_S3C2416
-   bool
-   depends on ARCH_S3C24XX
-   select CPU_ARM926T
-   select S3C2416_DMA if S3C2410_DMA
-   select CPU_LLSERIAL_S3C2440
-   select SAMSUNG_CLKSRC
-   select S3C2443_CLOCK
-   help
- Support for the S3C2416 SoC from the S3C24XX line
-
 config S3C2416_DMA
bool
depends on CPU_S3C2416
help
  Internal config node for S3C2416 DMA support
-
-config S3C2416_PM
-   bool
-   select S3C2412_PM_SLEEP
-   help
- Internal config node to apply S3C2416 power management
-
-config S3C2416_SETUP_SDHCI
-   bool
-   select S3C2416_SETUP_SDHCI_GPIO
-   help
- Internal helper functions for S3C2416 based SDHCI systems
-
-config S3C2416_SETUP_SDHCI_GPIO
-   bool
-   help
- Common setup code for SDHCI gpio.
-
-menu "S3C2416 Machines"
-
-config MACH_SMDK2416
-   bool "SMDK2416"
-   select CPU_S3C2416
-   select MACH_SMDK
-   select S3C_DEV_FB
-   select S3C_DEV_HSMMC
-   select S3C_DEV_HSMMC1
-   select S3C_DEV_NAND
-   select S3C_DEV_USB_HOST
-   select S3C2416_SETUP_SDHCI
-   select S3C2416_PM if PM
-   help
- Say Y here if you are using an SMDK2416
-
-endmenu
diff --git a/arch/arm/mach-s3c2416/Makefile b/arch/arm/mach-s3c2416/Makefile
index ca0cd22..3299f19 100644
--- a/arch/arm/mach-s3c2416/Makefile
+++ b/arch/arm/mach-s3c2416/Makefile
@@ -9,14 +9,4 @@ obj-m  :=
 obj-n  :=
 obj-   :=
 
-obj-$(CONFIG_CPU_S3C2416)  += s3c2416.o clock.o
-obj-$(CONFIG_CPU_S3C2416)  += irq.o
-obj-$(CONFIG_S3C2416_PM)   += pm.o
 #obj-$(CONFIG_S3C2416_DMA) += dma.o
-
-# Device setup
-obj-$(CONFIG_S3C2416_SETUP_SDHCI_GPIO) += setup-sdhci-gpio.o
-
-# Machine support
-
-obj-$(CONFIG_MACH_SMDK2416)+= mach-smdk2416.o
diff --git a/arch/arm/mach-s3c24xx/Kconfig b/arch/arm/mach-s3c24xx/Kconfig
index c130d5f..69529dd 100644
--- a/arch/arm/mach-s3c24xx/Kconfig
+++ b/arch/arm/mach-s3c24xx/Kconfig
@@ -35,6 +35,18 @@ config CPU_S3C2412
help
  Support for the S3C2412 and S3C2413 SoCs from the S3C24XX line
 
+config CPU_S3C2416
+   bool "SAMSUNG S3C2416/S3C2450"
+   depends on ARCH_S3C24XX
+   select CPU_ARM926T
+   select CPU_LLSERIAL_S3C2440
+   select SAMSUNG_CLKSRC
+   select S3C2443_CLOCK
+   select S3C2416_DMA if S3C24XX_DMA
+   select S3C2416_PM if PM
+   help
+ Support for the S3C2416 SoC from the S3C24XX line
+
 if CPU_S3C2410
 
 config S3C2410_DMA
@@ -247,6 +259,41 @@ config MACH_VSTMS
 
 endif  # CPU_S3C2412
 
+if CPU_S3C2416
+
+config S3C2416_PM
+   bool
+   select S3C2412_PM_SLEEP
+   help
+ Internal config node to apply S3C2416 power management
+
+config S3C2416_SETUP_SDHCI
+   bool
+   select S3C2416_SETUP_SDHCI_GPIO
+   help
+ Internal helper functions for S3C2416 based SDHCI systems
+
+config S3C2416_SETUP_SDHCI_GPIO
+   bool
+   help
+ Common setup code for SDHCI gpio.
+
+comment "S3C2416 Boards"
+
+config MACH_SMDK2416
+   bool "SMDK2416"
+   select MACH_SMDK
+   select S3C_DEV_FB
+   select S3C_DEV_HSMMC
+   select S3C_DEV_HSMMC1
+   select S3C_DEV_NAND
+   select S3C_DEV_USB_HOST
+   select S3C2416_SETUP_SD

[PATCH 08/12] ARM: S3C2412: move mach-s3c2412/* into mach/s3c24xx/

2012-02-15 Thread Kukjin Kim
This patch moves S3C2412 stuff into mach-s3c24xx/ directory
so that we can merge the s3c24 series' directories to the
just one mach-s3c24xx/ directory.

And this patch is including following.
- re-ordered alphabetically by option text at Kconfig and Makefile

Cc: Ben Dooks 
Signed-off-by: Kukjin Kim 
---
 arch/arm/mach-s3c2412/Kconfig  |   85 ---
 arch/arm/mach-s3c2412/Makefile |   12 ---
 arch/arm/mach-s3c24xx/Kconfig  |   89 +++-
 arch/arm/mach-s3c24xx/Makefile |9 ++
 .../clock.c => mach-s3c24xx/clock-s3c2412.c}   |0
 .../dma.c => mach-s3c24xx/dma-s3c2412.c}   |0
 .../irq.c => mach-s3c24xx/irq-s3c2412.c}   |0
 .../arm/{mach-s3c2412 => mach-s3c24xx}/mach-jive.c |0
 .../{mach-s3c2412 => mach-s3c24xx}/mach-smdk2413.c |0
 .../{mach-s3c2412 => mach-s3c24xx}/mach-vstms.c|0
 .../pm.c => mach-s3c24xx/pm-s3c2412.c} |0
 arch/arm/{mach-s3c2412 => mach-s3c24xx}/s3c2412.c  |0
 .../sleep.S => mach-s3c24xx/sleep-s3c2412.S}   |0
 13 files changed, 97 insertions(+), 98 deletions(-)
 rename arch/arm/{mach-s3c2412/clock.c => mach-s3c24xx/clock-s3c2412.c} (100%)
 rename arch/arm/{mach-s3c2412/dma.c => mach-s3c24xx/dma-s3c2412.c} (100%)
 rename arch/arm/{mach-s3c2412/irq.c => mach-s3c24xx/irq-s3c2412.c} (100%)
 rename arch/arm/{mach-s3c2412 => mach-s3c24xx}/mach-jive.c (100%)
 rename arch/arm/{mach-s3c2412 => mach-s3c24xx}/mach-smdk2413.c (100%)
 rename arch/arm/{mach-s3c2412 => mach-s3c24xx}/mach-vstms.c (100%)
 rename arch/arm/{mach-s3c2412/pm.c => mach-s3c24xx/pm-s3c2412.c} (100%)
 rename arch/arm/{mach-s3c2412 => mach-s3c24xx}/s3c2412.c (100%)
 rename arch/arm/{mach-s3c2412/sleep.S => mach-s3c24xx/sleep-s3c2412.S} (100%)

diff --git a/arch/arm/mach-s3c2412/Kconfig b/arch/arm/mach-s3c2412/Kconfig
index 41f3327..c5256f4 100644
--- a/arch/arm/mach-s3c2412/Kconfig
+++ b/arch/arm/mach-s3c2412/Kconfig
@@ -2,41 +2,6 @@
 #
 # Licensed under GPLv2
 
-config CPU_S3C2412
-   bool
-   depends on ARCH_S3C24XX
-   select CPU_ARM926T
-   select CPU_LLSERIAL_S3C2440
-   select S3C2412_PM if PM
-   select S3C2412_DMA if S3C2410_DMA
-   help
- Support for the S3C2412 and S3C2413 SoCs from the S3C24XX line
-
-config CPU_S3C2412_ONLY
-   bool
-   depends on ARCH_S3C24XX && !CPU_S3C2410 && \
-  !CPU_S3C2416 && !CPU_S3C2440 && !CPU_S3C2442 && \
-  !CPU_S3C2443 && CPU_S3C2412
-   default y if CPU_S3C2412
-
-config S3C2412_DMA
-   bool
-   depends on CPU_S3C2412
-   help
- Internal config node for S3C2412 DMA support
-
-config S3C2412_PM
-   bool
-   select S3C2412_PM_SLEEP
-   help
- Internal config node to apply S3C2412 power management
-
-config S3C2412_PM_SLEEP
-   bool
-   help
- Internal config node to apply sleep for S3C2412 power management.
- Can be selected by another SoCs with similar sleep procedure.
-
 # Note, the S3C2412 IOtiming support is in plat-s3c24xx
 
 config S3C2412_CPUFREQ
@@ -46,53 +11,3 @@ config S3C2412_CPUFREQ
default y
help
  CPU Frequency scaling support for S3C2412 and S3C2413 SoC CPUs.
-
-menu "S3C2412 Machines"
-
-config MACH_JIVE
-   bool "Logitech Jive"
-   select CPU_S3C2412
-   select S3C_DEV_USB_HOST
-   select S3C_DEV_NAND
-   help
- Say Y here if you are using the Logitech Jive.
-
-config MACH_JIVE_SHOW_BOOTLOADER
-   bool "Allow access to bootloader partitions in MTD (EXPERIMENTAL)"
-   depends on MACH_JIVE && EXPERIMENTAL
-
-config MACH_SMDK2413
-   bool "SMDK2413"
-   select CPU_S3C2412
-   select MACH_S3C2413
-   select MACH_SMDK
-   select S3C_DEV_USB_HOST
-   select S3C_DEV_NAND
-   help
- Say Y here if you are using an SMDK2413
-
-config MACH_S3C2413
-   bool
-   help
- Internal node for S3C2413 version of SMDK2413, so that
- machine_is_s3c2413() will work when MACH_SMDK2413 is
- selected
-
-config MACH_SMDK2412
-   bool "SMDK2412"
-   select MACH_SMDK2413
-   help
- Say Y here if you are using an SMDK2412
-
- Note, this shares support with SMDK2413, so will automatically
- select MACH_SMDK2413.
-
-config MACH_VSTMS
-   bool "VMSTMS"
-   select CPU_S3C2412
-   select S3C_DEV_USB_HOST
-   select S3C_DEV_NAND
-   help
- Say Y here if you are using an VSTMS board
-
-endmenu
diff --git a/arch/arm/mach-s3c2412/Makefile b/arch/arm/mach-s3c2412/Makefile
index 7e4d95f..41a6c27 100644
--- a/arch/arm/mach-s3c2412/Makefile
+++ b/arch/arm/mach-s3c2412/Makefile
@@ -9,16 +9,4 @@ obj-m  :=
 obj-n  :=
 obj-   :=
 
-obj-$(CONFIG_CPU_S3C2412)  += s3c2412.o
-obj-$(CONFIG_CPU_S3C2412)  += irq.o
-obj-$(CONFIG_CPU_S3C2412)  

[PATCH 07/12] ARM: S3C2410: move mach-s3c2410/* into mach-s3c24xx/

2012-02-15 Thread Kukjin Kim
This patch moves S3C2410 stuff into mach-s3c24xx/ directory
so that we can merge the s3c24 series' directories to the
just one mach-s3c24xx/ directory.

And this patch is including following.
- re-ordered alphabetically by option text at Kconfig and Makefile
- removed unused option, MACH_N35
- fixed duplcated option name, S3C2410_DMA to S3C24XX_DMA which is
  in plat-s3c24xx/

Cc: Ben Dooks 
Cc: Russell King 
Signed-off-by: Kukjin Kim 
---
 arch/arm/Kconfig   |2 +-
 arch/arm/Makefile  |2 +-
 arch/arm/mach-s3c2410/Kconfig  |  154 --
 arch/arm/mach-s3c2410/Makefile |   26 ---
 arch/arm/mach-s3c24xx/Kconfig  |  165 
 arch/arm/mach-s3c24xx/Makefile |   45 ++
 .../{mach-s3c2410 => mach-s3c24xx}/Makefile.boot   |0
 arch/arm/{mach-s3c2410 => mach-s3c24xx}/bast-ide.c |0
 arch/arm/{mach-s3c2410 => mach-s3c24xx}/bast-irq.c |0
 arch/arm/{mach-s3c2410 => mach-s3c24xx}/common.h   |0
 .../dma.c => mach-s3c24xx/dma-s3c2410.c}   |0
 .../h1940-bluetooth.c  |0
 .../include/mach/anubis-cpld.h |0
 .../include/mach/anubis-irq.h  |0
 .../include/mach/anubis-map.h  |0
 .../include/mach/bast-cpld.h   |0
 .../include/mach/bast-irq.h|0
 .../include/mach/bast-map.h|0
 .../include/mach/bast-pmu.h|0
 .../include/mach/debug-macro.S |0
 .../include/mach/dma.h |0
 .../include/mach/entry-macro.S |0
 .../include/mach/fb.h  |0
 .../include/mach/gpio-fns.h|0
 .../include/mach/gpio-nrs.h|0
 .../include/mach/gpio-track.h  |0
 .../include/mach/gpio.h|0
 .../include/mach/h1940-latch.h |0
 .../include/mach/h1940.h   |0
 .../include/mach/hardware.h|0
 .../include/mach/idle.h|0
 .../include/mach/io.h  |0
 .../include/mach/irqs.h|0
 .../include/mach/leds-gpio.h   |0
 .../include/mach/map.h |0
 .../include/mach/osiris-cpld.h |0
 .../include/mach/osiris-map.h  |0
 .../include/mach/otom-map.h|0
 .../include/mach/pm-core.h |0
 .../include/mach/regs-clock.h  |0
 .../include/mach/regs-dsc.h|0
 .../include/mach/regs-gpio.h   |0
 .../include/mach/regs-gpioj.h  |0
 .../include/mach/regs-irq.h|0
 .../include/mach/regs-lcd.h|0
 .../include/mach/regs-mem.h|0
 .../include/mach/regs-power.h  |0
 .../include/mach/regs-s3c2412-mem.h|0
 .../include/mach/regs-s3c2412.h|0
 .../include/mach/regs-s3c2416-mem.h|0
 .../include/mach/regs-s3c2416.h|0
 .../include/mach/regs-s3c2443-clock.h  |0
 .../include/mach/regs-sdi.h|0
 .../include/mach/system.h  |0
 .../include/mach/tick.h|0
 .../include/mach/timex.h   |0
 .../include/mach/uncompress.h  |0
 .../include/mach/vr1000-cpld.h |0
 .../include/mach/vr1000-irq.h  |0
 .../include/mach/vr1000-map.h  |0
 .../{mach-s3c2410 => mach-s3c24xx}/mach-amlm5900.c |0
 .../arm/{mach-s3c2410 => mach-s3c24xx}/mach-bast.c |0
 .../{mach-s3c2410 => mach-s3c24xx}/mach-h1940.c|0
 arch/arm/{mach-s3c2410 => mach-s3c24xx}/mach-n30.c |0
 .../arm/{mach-s3c2410 => mach-s3c24xx}/mach-otom.c |0
 .../{mach-s3c2410 => mach-s3c24xx}/mach-qt2410.c   |0
 .../{mach-s3c2410 => mach-s3c24xx}/mach-smdk2410.c |0
 .../mach-tct_hammer.c  |0
 .../{mach-s3c2410 => mach-s3c24xx}/mach-vr1000.c   |0
 .../{mach-s3c2410 => mach-s3c24xx}/nor-simtec.c|0
 .../{mach-s3c2410 => mach-s3c24xx}/nor-simtec.h|0
 arch/arm/{mach-s3c2410 => mach-s3c24xx}/pm-h1940.S |0
 .../pm.c => mach-s3c24xx/pm-s3c2410.c} |0
 arch/arm/{mach-s3c2410 => mach-s3c24xx}/s3c2410.c  |0
 .../sleep.S => mach-s3c24xx/sleep-s3c2410.S}   |0
 .../{mach-s3c2410 => mach-s3c24xx}/usb-simtec.c|0
 .../{mach-s3c

[PATCH 06/12] ARM: S3C24XX: change the ARCH_S3C2410 to ARCH_S3C24XX

2012-02-15 Thread Kukjin Kim
This patch changes the ARCH name to "ARCH_S3C24XX" for Samsung
S3C2410, S3C2412, S3C2413, S3C2416, S3C2440, S3C2442, S3C2443,
and S3C2450 SoCs so that we can merge the mach-xxx directories
and plat-s3c24xx dir. to just one mach-s3c24xx for them.

I think this should be sent to upstream via samsung tree because
this touches many samsung stuff.

Cc: Dmitry Torokhov 
Cc: Richard Purdie 
Cc: Chris Ball 
Cc: David Woodhouse 
Cc: Alessandro Zummo 
Cc: Grant Likely 
Cc: Greg Kroah-Hartman 
Cc: Felipe Balbi 
Cc: Florian Tobias Schandinat 
Cc: Wim Van Sebroeck 
Cc: Sangbeom Kim 
Cc: Liam Girdwood 
Cc: Mark Brown 
Cc: Russell King 
Signed-off-by: Kukjin Kim 
---
 arch/arm/Kconfig  |   23 +++
 arch/arm/Makefile |2 +-
 arch/arm/boot/compressed/head.S   |2 +-
 arch/arm/configs/mini2440_defconfig   |2 +-
 arch/arm/configs/s3c2410_defconfig|2 +-
 arch/arm/configs/tct_hammer_defconfig |2 +-
 arch/arm/mach-s3c2410/Kconfig |2 +-
 arch/arm/mach-s3c2412/Kconfig |4 ++--
 arch/arm/mach-s3c2416/Kconfig |2 +-
 arch/arm/mach-s3c2443/Kconfig |2 +-
 arch/arm/plat-s3c24xx/Kconfig |6 +++---
 arch/arm/plat-s3c24xx/Makefile|2 +-
 arch/arm/plat-samsung/Kconfig |4 ++--
 drivers/input/touchscreen/Kconfig |2 +-
 drivers/leds/Kconfig  |2 +-
 drivers/mmc/host/Kconfig  |2 +-
 drivers/mtd/nand/Kconfig  |2 +-
 drivers/rtc/Kconfig   |2 +-
 drivers/spi/Kconfig   |2 +-
 drivers/usb/Kconfig   |2 +-
 drivers/usb/gadget/Kconfig|4 ++--
 drivers/usb/host/ohci-hcd.c   |2 +-
 drivers/video/Kconfig |2 +-
 drivers/watchdog/Kconfig  |2 +-
 sound/soc/samsung/Kconfig |   12 ++--
 25 files changed, 45 insertions(+), 46 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 24626b0..5f1a3ad 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -763,22 +763,21 @@ config ARCH_SA1100
help
  Support for StrongARM 11x0 based boards.
 
-config ARCH_S3C2410
-   bool "Samsung S3C2410, S3C2412, S3C2413, S3C2416, S3C2440, S3C2442, 
S3C2443, S3C2450"
+config ARCH_S3C24XX
+   bool "Samsung S3C24XX SoCs"
select GENERIC_GPIO
select ARCH_HAS_CPUFREQ
select HAVE_CLK
select CLKDEV_LOOKUP
select ARCH_USES_GETTIMEOFFSET
select HAVE_S3C2410_I2C if I2C
+   select HAVE_S3C_RTC if RTC_CLASS
+   select HAVE_S3C2410_WATCHDOG if WATCHDOG
help
- Samsung S3C2410X CPU based systems, such as the Simtec Electronics
- BAST (), the IPAQ 1940 or
- the Samsung SMDK2410 development board (and derivatives).
-
- Note, the S3C2416 and the S3C2450 are so close that they even share
- the same SoC ID code. This means that there is no separate machine
- directory (no arch/arm/mach-s3c2450) as the S3C2416 was first.
+ Samsung S3C2410, S3C2412, S3C2413, S3C2416, S3C2440, S3C2442, S3C2443
+ and S3C2450 SoCs based systems, such as the Simtec Electronics BAST
+ (), the IPAQ 1940 or the
+ Samsung SMDK2410 development board (and derivatives).
 
 config ARCH_S3C64XX
bool "Samsung S3C64XX"
@@ -1068,7 +1067,7 @@ source "arch/arm/plat-s5p/Kconfig"
 
 source "arch/arm/plat-spear/Kconfig"
 
-if ARCH_S3C2410
+if ARCH_S3C24XX
 source "arch/arm/mach-s3c2410/Kconfig"
 source "arch/arm/mach-s3c2412/Kconfig"
 source "arch/arm/mach-s3c2416/Kconfig"
@@ -1590,7 +1589,7 @@ source kernel/Kconfig.preempt
 
 config HZ
int
-   default 200 if ARCH_EBSA110 || ARCH_S3C2410 || ARCH_S5P64X0 || \
+   default 200 if ARCH_EBSA110 || ARCH_S3C24XX || ARCH_S5P64X0 || \
ARCH_S5PV210 || ARCH_EXYNOS4
default OMAP_32K_TIMER_HZ if ARCH_OMAP && OMAP_32K_TIMER
default AT91_TIMER_HZ if ARCH_AT91
@@ -2116,7 +2115,7 @@ config CPU_FREQ_S3C
 
 config CPU_FREQ_S3C24XX
bool "CPUfreq driver for Samsung S3C24XX series CPUs (EXPERIMENTAL)"
-   depends on ARCH_S3C2410 && CPU_FREQ && EXPERIMENTAL
+   depends on ARCH_S3C24XX && CPU_FREQ && EXPERIMENTAL
select CPU_FREQ_S3C
help
  This enables the CPUfreq driver for the Samsung S3C24XX family
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 40319d9..624f764 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -175,7 +175,7 @@ machine-$(CONFIG_ARCH_PRIMA2)   := prima2
 machine-$(CONFIG_ARCH_PXA) := pxa
 machine-$(CONFIG_ARCH_REALVIEW):= realview
 machine-$(CONFIG_ARCH_RPC) := rpc
-machine-$(CONFIG_ARCH_S3C2410) := s3c2410 s3c2412 s3c2416 s3c2440 
s3c2443
+machine-$(CONFIG_ARCH_S3C24XX) := s3c2410 s3c2412 

[PATCH 05/12] ARM: S3C2410: move s3c2410_baseclk_add to clock.h

2012-02-15 Thread Kukjin Kim
From: Heiko Stuebner 

plat-samsung/clock.h currently keeps all the SoC specific clock
declarations. As we want to get rid of s3c2410.h altogether, move
the s3c2410_baseclk_add there too.

Signed-off-by: Heiko Stuebner 
Signed-off-by: Kukjin Kim 
---
 arch/arm/plat-samsung/include/plat/clock.h   |4 
 arch/arm/plat-samsung/include/plat/s3c2410.h |2 --
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/arm/plat-samsung/include/plat/clock.h 
b/arch/arm/plat-samsung/include/plat/clock.h
index 42bbe3d..3b5a9dc 100644
--- a/arch/arm/plat-samsung/include/plat/clock.h
+++ b/arch/arm/plat-samsung/include/plat/clock.h
@@ -120,6 +120,10 @@ extern void s3c2412_setup_clocks(void);
 extern void s3c244x_setup_clocks(void);
 extern void s3c2443_setup_clocks(void);
 
+/* S3C2410 specific clock functions */
+
+extern int s3c2410_baseclk_add(void);
+
 /* S3C2443/S3C2416 specific clock functions */
 
 typedef unsigned int (*pll_fn)(unsigned int reg, unsigned int base);
diff --git a/arch/arm/plat-samsung/include/plat/s3c2410.h 
b/arch/arm/plat-samsung/include/plat/s3c2410.h
index 3986497..55b0e5f 100644
--- a/arch/arm/plat-samsung/include/plat/s3c2410.h
+++ b/arch/arm/plat-samsung/include/plat/s3c2410.h
@@ -29,5 +29,3 @@ extern void s3c2410_init_clocks(int xtal);
 #define s3c2410_init NULL
 #define s3c2410a_init NULL
 #endif
-
-extern int s3c2410_baseclk_add(void);
-- 
1.7.4.4

--
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 04/12] ARM: S3C24XX: move common S3C2443 clock definitions to clock.h

2012-02-15 Thread Kukjin Kim
From: Heiko Stuebner 

plat-samsung/clock.h currently keeps all the SoC specific clock
declarations except the ones for S3C2443/S3C2416 which were kept in
s3c2443.h.

This patch moves them out of s3c2443.h to get rid of the header
completely later on.

Signed-off-by: Heiko Stuebner 
Signed-off-by: Kukjin Kim 
---
 arch/arm/mach-s3c2416/clock.c|1 -
 arch/arm/plat-s3c24xx/s3c2443-clock.c|1 -
 arch/arm/plat-samsung/include/plat/clock.h   |   17 +
 arch/arm/plat-samsung/include/plat/s3c2443.h |   19 ---
 4 files changed, 17 insertions(+), 21 deletions(-)

diff --git a/arch/arm/mach-s3c2416/clock.c b/arch/arm/mach-s3c2416/clock.c
index 59f54d1..5e36905 100644
--- a/arch/arm/mach-s3c2416/clock.c
+++ b/arch/arm/mach-s3c2416/clock.c
@@ -15,7 +15,6 @@
 #include 
 
 #include 
-#include 
 #include 
 #include 
 #include 
diff --git a/arch/arm/plat-s3c24xx/s3c2443-clock.c 
b/arch/arm/plat-s3c24xx/s3c2443-clock.c
index 95e6819..3633060 100644
--- a/arch/arm/plat-s3c24xx/s3c2443-clock.c
+++ b/arch/arm/plat-s3c24xx/s3c2443-clock.c
@@ -12,7 +12,6 @@
 
 #include 
 
-#include 
 #include 
 #include 
 #include 
diff --git a/arch/arm/plat-samsung/include/plat/clock.h 
b/arch/arm/plat-samsung/include/plat/clock.h
index 73c66d4..42bbe3d 100644
--- a/arch/arm/plat-samsung/include/plat/clock.h
+++ b/arch/arm/plat-samsung/include/plat/clock.h
@@ -79,6 +79,10 @@ extern struct clk clk_epll;
 extern struct clk clk_xtal;
 extern struct clk clk_ext;
 
+/* S3C2443/S3C2416 specific clocks */
+extern struct clksrc_clk clk_epllref;
+extern struct clksrc_clk clk_esysclk;
+
 /* S3C64XX specific clocks */
 extern struct clk clk_h2;
 extern struct clk clk_27m;
@@ -116,6 +120,19 @@ extern void s3c2412_setup_clocks(void);
 extern void s3c244x_setup_clocks(void);
 extern void s3c2443_setup_clocks(void);
 
+/* S3C2443/S3C2416 specific clock functions */
+
+typedef unsigned int (*pll_fn)(unsigned int reg, unsigned int base);
+
+extern void s3c2443_common_setup_clocks(pll_fn get_mpll);
+extern void s3c2443_common_init_clocks(int xtal, pll_fn get_mpll,
+  unsigned int *divs, int nr_divs,
+  int divmask);
+
+extern int s3c2443_clkcon_enable_h(struct clk *clk, int enable);
+extern int s3c2443_clkcon_enable_p(struct clk *clk, int enable);
+extern int s3c2443_clkcon_enable_s(struct clk *clk, int enable);
+
 /* S3C64XX specific functions and clocks */
 
 extern int s3c64xx_sclk_ctrl(struct clk *clk, int enable);
diff --git a/arch/arm/plat-samsung/include/plat/s3c2443.h 
b/arch/arm/plat-samsung/include/plat/s3c2443.h
index ffaecb9..a5b794f 100644
--- a/arch/arm/plat-samsung/include/plat/s3c2443.h
+++ b/arch/arm/plat-samsung/include/plat/s3c2443.h
@@ -32,22 +32,3 @@ extern void s3c2443_restart(char mode, const char *cmd);
 #define s3c2443_init NULL
 #define s3c2443_restart NULL
 #endif
-
-/* common code used by s3c2443 and others.
- * note, not to be used outside of arch/arm/mach-s3c* */
-
-struct clk;/* some files don't need clk.h otherwise */
-
-typedef unsigned int (*pll_fn)(unsigned int reg, unsigned int base);
-
-extern void s3c2443_common_setup_clocks(pll_fn get_mpll);
-extern void s3c2443_common_init_clocks(int xtal, pll_fn get_mpll,
-  unsigned int *divs, int nr_divs,
-  int divmask);
-
-extern int s3c2443_clkcon_enable_h(struct clk *clk, int enable);
-extern int s3c2443_clkcon_enable_p(struct clk *clk, int enable);
-extern int s3c2443_clkcon_enable_s(struct clk *clk, int enable);
-
-extern struct clksrc_clk clk_epllref;
-extern struct clksrc_clk clk_esysclk;
-- 
1.7.4.4

--
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 03/12] ARM: S3C24XX: Remove extern declaration of clk_msysclk

2012-02-15 Thread Kukjin Kim
From: Heiko Stuebner 

clk_msysclk is not needed outside of s3c2443-clock.c.

Removing the extern declaration will prevent conflicts with the
s3c2412 clk_msysclk in the following cleanups.

Signed-off-by: Heiko Stuebner 
Signed-off-by: Kukjin Kim 
---
 arch/arm/plat-samsung/include/plat/s3c2443.h |1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/arch/arm/plat-samsung/include/plat/s3c2443.h 
b/arch/arm/plat-samsung/include/plat/s3c2443.h
index dce05b4..ffaecb9 100644
--- a/arch/arm/plat-samsung/include/plat/s3c2443.h
+++ b/arch/arm/plat-samsung/include/plat/s3c2443.h
@@ -51,4 +51,3 @@ extern int s3c2443_clkcon_enable_s(struct clk *clk, int 
enable);
 
 extern struct clksrc_clk clk_epllref;
 extern struct clksrc_clk clk_esysclk;
-extern struct clksrc_clk clk_msysclk;
-- 
1.7.4.4

--
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 02/12] ARM: S3C24XX: move spi-s3c24xx platdata out of mach

2012-02-15 Thread Kukjin Kim
From: Heiko Stuebner 

spi.h now only contains the definition of the platform data structure
for the driver in spi-s3c24xx.c . Therefore it does not need to stay
in include/mach but can instead live in linux/spi/s3c24xx.h .

Signed-off-by: Heiko Stuebner 
Cc: Grant Likely 
Signed-off-by: Kukjin Kim 
---
 arch/arm/mach-s3c2440/mach-gta02.c |2 +-
 drivers/spi/spi-s3c24xx.c  |2 +-
 .../mach/spi.h => include/linux/spi/s3c24xx.h  |9 -
 3 files changed, 6 insertions(+), 7 deletions(-)
 rename arch/arm/mach-s3c2410/include/mach/spi.h => include/linux/spi/s3c24xx.h 
(82%)

diff --git a/arch/arm/mach-s3c2440/mach-gta02.c 
b/arch/arm/mach-s3c2440/mach-gta02.c
index 5859e60..cf270f5 100644
--- a/arch/arm/mach-s3c2440/mach-gta02.c
+++ b/arch/arm/mach-s3c2440/mach-gta02.c
@@ -38,6 +38,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -73,7 +74,6 @@
 #include 
 #include 
 
-#include 
 #include 
 #include 
 #include 
diff --git a/drivers/spi/spi-s3c24xx.c b/drivers/spi/spi-s3c24xx.c
index fc06453..8ee7d79 100644
--- a/drivers/spi/spi-s3c24xx.c
+++ b/drivers/spi/spi-s3c24xx.c
@@ -24,10 +24,10 @@
 
 #include 
 #include 
+#include 
 #include 
 
 #include 
-#include 
 
 #include 
 #include 
diff --git a/arch/arm/mach-s3c2410/include/mach/spi.h 
b/include/linux/spi/s3c24xx.h
similarity index 82%
rename from arch/arm/mach-s3c2410/include/mach/spi.h
rename to include/linux/spi/s3c24xx.h
index 2a686c0..c23b923 100644
--- a/arch/arm/mach-s3c2410/include/mach/spi.h
+++ b/include/linux/spi/s3c24xx.h
@@ -1,5 +1,4 @@
-/* arch/arm/mach-s3c2410/include/mach/spi.h
- *
+/*
  * Copyright (c) 2006 Simtec Electronics
  * Ben Dooks 
  *
@@ -10,8 +9,8 @@
  * published by the Free Software Foundation.
 */
 
-#ifndef __ASM_ARCH_SPI_H
-#define __ASM_ARCH_SPI_H __FILE__
+#ifndef __LINUX_SPI_S3C24XX_H
+#define __LINUX_SPI_S3C24XX_H __FILE__
 
 struct s3c2410_spi_info {
int  pin_cs;/* simple gpio cs */
@@ -24,4 +23,4 @@ struct s3c2410_spi_info {
void (*set_cs)(struct s3c2410_spi_info *spi, int cs, int pol);
 };
 
-#endif /* __ASM_ARCH_SPI_H */
+#endif /* __LINUX_SPI_S3C24XX_H */
-- 
1.7.4.4

--
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 01/12] ARM: S3C24XX: remove unused spi gpio setup functions

2012-02-15 Thread Kukjin Kim
From: Heiko Stuebner 

A grep through the kernel source revealed that neither the
config-options nor the defined functions are used anywhere
in the kernel.

There was also no activity in this regard through the last kernel
releases, so it seems this situation will not change in the future.

Therefore this patch removes this seemingly dead code.

Signed-off-by: Heiko Stuebner 
Signed-off-by: Kukjin Kim 
---
 arch/arm/mach-s3c2410/include/mach/spi.h |   11 ---
 arch/arm/plat-s3c24xx/Kconfig|   20 -
 arch/arm/plat-s3c24xx/Makefile   |6 
 arch/arm/plat-s3c24xx/spi-bus0-gpe11_12_13.c |   36 
 arch/arm/plat-s3c24xx/spi-bus1-gpd8_9_10.c   |   38 --
 arch/arm/plat-s3c24xx/spi-bus1-gpg5_6_7.c|   36 
 6 files changed, 0 insertions(+), 147 deletions(-)
 delete mode 100644 arch/arm/plat-s3c24xx/spi-bus0-gpe11_12_13.c
 delete mode 100644 arch/arm/plat-s3c24xx/spi-bus1-gpd8_9_10.c
 delete mode 100644 arch/arm/plat-s3c24xx/spi-bus1-gpg5_6_7.c

diff --git a/arch/arm/mach-s3c2410/include/mach/spi.h 
b/arch/arm/mach-s3c2410/include/mach/spi.h
index 4d95883..2a686c0 100644
--- a/arch/arm/mach-s3c2410/include/mach/spi.h
+++ b/arch/arm/mach-s3c2410/include/mach/spi.h
@@ -24,15 +24,4 @@ struct s3c2410_spi_info {
void (*set_cs)(struct s3c2410_spi_info *spi, int cs, int pol);
 };
 
-/* Standard setup / suspend routines for SPI GPIO pins. */
-
-extern void s3c24xx_spi_gpiocfg_bus0_gpe11_12_13(struct s3c2410_spi_info *spi,
-int enable);
-
-extern void s3c24xx_spi_gpiocfg_bus1_gpg5_6_7(struct s3c2410_spi_info *spi,
- int enable);
-
-extern void s3c24xx_spi_gpiocfg_bus1_gpd8_9_10(struct s3c2410_spi_info *spi,
-  int enable);
-
 #endif /* __ASM_ARCH_SPI_H */
diff --git a/arch/arm/plat-s3c24xx/Kconfig b/arch/arm/plat-s3c24xx/Kconfig
index d8973ac..6b1d918 100644
--- a/arch/arm/plat-s3c24xx/Kconfig
+++ b/arch/arm/plat-s3c24xx/Kconfig
@@ -98,26 +98,6 @@ config S3C2410_DMA_DEBUG
  Enable debugging output for the DMA code. This option sends info
  to the kernel log, at priority KERN_DEBUG.
 
-# SPI default pin configuration code
-
-config S3C24XX_SPI_BUS0_GPE11_GPE12_GPE13
-   bool
-   help
- SPI GPIO configuration code for BUS0 when connected to
- GPE11, GPE12 and GPE13.
-
-config S3C24XX_SPI_BUS1_GPG5_GPG6_GPG7
-   bool
-   help
- SPI GPIO configuration code for BUS 1 when connected to
- GPG5, GPG6 and GPG7.
-
-config S3C24XX_SPI_BUS1_GPD8_GPD9_GPD10
-   bool
-   help
- SPI GPIO configuration code for BUS 1 when connected to
- GPD8, GPD9 and GPD10.
-
 # common code for s3c24xx based machines, such as the SMDKs.
 
 # cpu frequency items common between s3c2410 and s3c2440/s3c2442
diff --git a/arch/arm/plat-s3c24xx/Makefile b/arch/arm/plat-s3c24xx/Makefile
index b2b0112..7cefd7f 100644
--- a/arch/arm/plat-s3c24xx/Makefile
+++ b/arch/arm/plat-s3c24xx/Makefile
@@ -38,12 +38,6 @@ obj-$(CONFIG_S3C2410_CPUFREQ_UTILS) += 
s3c2410-cpufreq-utils.o
 obj-$(CONFIG_ARCH_S3C2410) += setup-i2c.o
 obj-$(CONFIG_S3C2410_SETUP_TS) += setup-ts.o
 
-# SPI gpio central GPIO functions
-
-obj-$(CONFIG_S3C24XX_SPI_BUS0_GPE11_GPE12_GPE13) += spi-bus0-gpe11_12_13.o
-obj-$(CONFIG_S3C24XX_SPI_BUS1_GPG5_GPG6_GPG7)+= spi-bus1-gpg5_6_7.o
-obj-$(CONFIG_S3C24XX_SPI_BUS1_GPD8_GPD9_GPD10)  += spi-bus1-gpd8_9_10.o
-
 # machine common support
 
 obj-$(CONFIG_MACH_SMDK)+= common-smdk.o
diff --git a/arch/arm/plat-s3c24xx/spi-bus0-gpe11_12_13.c 
b/arch/arm/plat-s3c24xx/spi-bus0-gpe11_12_13.c
deleted file mode 100644
index 704175b..000
--- a/arch/arm/plat-s3c24xx/spi-bus0-gpe11_12_13.c
+++ /dev/null
@@ -1,36 +0,0 @@
-/* linux/arch/arm/plat-s3c24xx/spi-bus0-gpe11_12_13.c
- *
- * Copyright (c) 2008 Simtec Electronics
- * http://armlinux.simtec.co.uk/
- * Ben Dooks 
- *
- * S3C24XX SPI - gpio configuration for bus 0 on gpe11,12,13
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License.
-*/
-
-#include 
-#include 
-
-#include 
-#include 
-
-void s3c24xx_spi_gpiocfg_bus0_gpe11_12_13(struct s3c2410_spi_info *spi,
- int enable)
-{
-   if (enable) {
-   s3c_gpio_cfgpin(S3C2410_GPE(13), S3C2410_GPE13_SPICLK0);
-   s3c_gpio_cfgpin(S3C2410_GPE(12), S3C2410_GPE12_SPIMOSI0);
-   s3c_gpio_cfgpin(S3C2410_GPE(11), S3C2410_GPE11_SPIMISO0);
-   s3c2410_gpio_pullup(S3C2410_GPE(11), 0);
-   s3c2410_gpio_pullup(S3C2410_GPE(13), 0);
-   } else {
-   s3c_gpio_cfgpin(S3C2410_GPE(13), S3C2410_GPIO_INPUT);
-   s3c_gpio_cfgpin(

[PATCH 00/12] ARM: S3C24XX: create mach-s3c24xx/ for S3C24XX SoCs - WIP

2012-02-15 Thread Kukjin Kim
This patch aims to make a one mach- directory for S3C24XX SoCs
and now not finished yet such as moving cpufreq and merging
plat-s3c24xx/. I think it will be done maybe in a week.

[PATCH 01/12] ARM: S3C24XX: remove unused spi gpio setup functions
[PATCH 02/12] ARM: S3C24XX: move spi-s3c24xx platdata out of mach
[PATCH 03/12] ARM: S3C24XX: Remove extern declaration of clk_msysclk
[PATCH 04/12] ARM: S3C24XX: move common S3C2443 clock definitions to
[PATCH 05/12] ARM: S3C2410: move s3c2410_baseclk_add to clock.h
[PATCH 06/12] ARM: S3C24XX: change the ARCH_S3C2410 to ARCH_S3C24XX
[PATCH 07/12] ARM: S3C2410: move mach-s3c2410/* into mach-s3c24xx/
[PATCH 08/12] ARM: S3C2412: move mach-s3c2412/* into mach-s3c24xx/
[PATCH 09/12] ARM: S3C2416: move mach-s3c2416/* into mach-s3c24xx/
[PATCH 10/12] ARM: S3C2440: move mach-s3c2440/* into mach-s3c24xx/
[PATCH 11/12] ARM: S3C2443: move mach-s3c2443/* into mach-s3c24xx/
--
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] spi/s3c64xx: Convert to using core message queue

2012-02-15 Thread Linus Walleij
On Wed, Feb 15, 2012 at 11:48 PM, Mark Brown
 wrote:

> Convert the s3c64xx driver to using the new message queue factored out of
> the pl022 driver by Linus Walleij, saving us a nice block of code and
> getting the benefits of improvements implemented in the core.
>
> Signed-off-by: Mark Brown 

Acked-by: Linus Walleij 

> Only lightly tested thus far.  Linus, it'd be really nice if you could
> add this to your patch queue for this feature until it's merged by
> Grant.

I just pinged Grant on the main (v2) patch, if there are issues to
be resolved I will carry this patch in the series, if Grant is happy
with v2 we can just push this on top I guess...

Thanks,
Linus Walleij
--
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] ARM: S3C64XX: Supply platform data for SPI on Cragganmore

2012-02-15 Thread Mark Brown
Having to specify the platform data explicitly like this even though it
is provided as a default doesn't feel entirely elegant but there we are.

Signed-off-by: Mark Brown 
---
 arch/arm/mach-s3c64xx/mach-crag6410.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-s3c64xx/mach-crag6410.c 
b/arch/arm/mach-s3c64xx/mach-crag6410.c
index d5a7982..c05e070 100644
--- a/arch/arm/mach-s3c64xx/mach-crag6410.c
+++ b/arch/arm/mach-s3c64xx/mach-crag6410.c
@@ -790,7 +790,7 @@ static void __init crag6410_machine_init(void)
i2c_register_board_info(1, i2c_devs1, ARRAY_SIZE(i2c_devs1));
 
samsung_keypad_set_platdata(&crag6410_keypad_data);
-   s3c64xx_spi0_set_platdata(NULL, 0, 1);
+   s3c64xx_spi0_set_platdata(&s3c64xx_spi0_pdata, 0, 1);
 
platform_add_devices(crag6410_devices, ARRAY_SIZE(crag6410_devices));
 
-- 
1.7.9.rc1

--
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] spi/s3c64xx: Convert to using core message queue

2012-02-15 Thread Mark Brown
Convert the s3c64xx driver to using the new message queue factored out of
the pl022 driver by Linus Walleij, saving us a nice block of code and
getting the benefits of improvements implemented in the core.

Signed-off-by: Mark Brown 
---

Only lightly tested thus far.  Linus, it'd be really nice if you could
add this to your patch queue for this feature until it's merged by
Grant.

 drivers/spi/spi-s3c64xx.c |  125 -
 1 files changed, 22 insertions(+), 103 deletions(-)

diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c
index b899af66..1174d80 100644
--- a/drivers/spi/spi-s3c64xx.c
+++ b/drivers/spi/spi-s3c64xx.c
@@ -128,8 +128,6 @@
 
 #define msecs_to_loops(t) (loops_per_jiffy / 1000 * HZ * t)
 
-#define SUSPND(1<<0)
-#define SPIBUSY   (1<<1)
 #define RXBUSY(1<<2)
 #define TXBUSY(1<<3)
 
@@ -144,10 +142,8 @@ struct s3c64xx_spi_dma_data {
  * @clk: Pointer to the spi clock.
  * @src_clk: Pointer to the clock used to generate SPI signals.
  * @master: Pointer to the SPI Protocol master.
- * @workqueue: Work queue for the SPI xfer requests.
  * @cntrlr_info: Platform specific data for the controller this driver manages.
  * @tgl_spi: Pointer to the last CS left untoggled by the cs_change hint.
- * @work: Work
  * @queue: To log SPI xfer requests.
  * @lock: Controller specific lock.
  * @state: Set of FLAGS to indicate status.
@@ -167,10 +163,8 @@ struct s3c64xx_spi_driver_data {
struct clk  *src_clk;
struct platform_device  *pdev;
struct spi_master   *master;
-   struct workqueue_struct *workqueue;
struct s3c64xx_spi_info  *cntrlr_info;
struct spi_device   *tgl_spi;
-   struct work_struct  work;
struct list_headqueue;
spinlock_t  lock;
unsigned long   sfr_start;
@@ -637,9 +631,10 @@ static void s3c64xx_spi_unmap_mssg(struct 
s3c64xx_spi_driver_data *sdd,
}
 }
 
-static void handle_msg(struct s3c64xx_spi_driver_data *sdd,
-   struct spi_message *msg)
+static int s3c64xx_spi_transfer_one_message(struct spi_master *master,
+   struct spi_message *msg)
 {
+   struct s3c64xx_spi_driver_data *sdd = spi_master_get_devdata(master);
struct s3c64xx_spi_info *sci = sdd->cntrlr_info;
struct spi_device *spi = msg->spi;
struct s3c64xx_spi_csinfo *cs = spi->controller_data;
@@ -771,13 +766,15 @@ out:
 
if (msg->complete)
msg->complete(msg->context);
+
+   spi_finalize_current_message(master);
+
+   return 0;
 }
 
-static void s3c64xx_spi_work(struct work_struct *work)
+static int s3c64xx_spi_prepare_transfer(struct spi_master *spi)
 {
-   struct s3c64xx_spi_driver_data *sdd = container_of(work,
-   struct s3c64xx_spi_driver_data, work);
-   unsigned long flags;
+   struct s3c64xx_spi_driver_data *sdd = spi_master_get_devdata(spi);
 
/* Acquire DMA channels */
while (!acquire_dma(sdd))
@@ -785,61 +782,18 @@ static void s3c64xx_spi_work(struct work_struct *work)
 
pm_runtime_get_sync(&sdd->pdev->dev);
 
-   spin_lock_irqsave(&sdd->lock, flags);
-
-   while (!list_empty(&sdd->queue)
-   && !(sdd->state & SUSPND)) {
-
-   struct spi_message *msg;
-
-   msg = container_of(sdd->queue.next, struct spi_message, queue);
-
-   list_del_init(&msg->queue);
-
-   /* Set Xfer busy flag */
-   sdd->state |= SPIBUSY;
-
-   spin_unlock_irqrestore(&sdd->lock, flags);
-
-   handle_msg(sdd, msg);
-
-   spin_lock_irqsave(&sdd->lock, flags);
-
-   sdd->state &= ~SPIBUSY;
-   }
+   return 0;
+}
 
-   spin_unlock_irqrestore(&sdd->lock, flags);
+static int s3c64xx_spi_unprepare_transfer(struct spi_master *spi)
+{
+   struct s3c64xx_spi_driver_data *sdd = spi_master_get_devdata(spi);
 
/* Free DMA channels */
sdd->ops->release(sdd->rx_dma.ch, &s3c64xx_spi_dma_client);
sdd->ops->release(sdd->tx_dma.ch, &s3c64xx_spi_dma_client);
 
pm_runtime_put(&sdd->pdev->dev);
-}
-
-static int s3c64xx_spi_transfer(struct spi_device *spi,
-   struct spi_message *msg)
-{
-   struct s3c64xx_spi_driver_data *sdd;
-   unsigned long flags;
-
-   sdd = spi_master_get_devdata(spi->master);
-
-   spin_lock_irqsave(&sdd->lock, flags);
-
-   if (sdd->state & SUSPND) {
-   spin_unlock_irqrestore(&sdd->lock, flags);
-   return -ESHUTDOWN;
-   }
-
-   msg->status = -EINPROGRESS;
-   msg->actual_length = 0;
-
-   list_add_tail(&msg->queue, &sdd->queue);
-
-   queue_work(sdd->workqueue, &sdd->work);
-
-   

[PATCH v2 3/3] ARM: EXYNOS: add support DMA for EXYNOS4X12 SoC

2012-02-15 Thread Kukjin Kim
From: Boojin Kim 

Signed-off-by: Boojin Kim 
Signed-off-by: Kukjin Kim 
---
 arch/arm/mach-exynos/Kconfig   |3 +
 arch/arm/mach-exynos/dma.c |   95 ++--
 arch/arm/plat-samsung/include/plat/dma-pl330.h |8 ++
 3 files changed, 98 insertions(+), 8 deletions(-)

diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
index 5d602f6..5e0a456 100644
--- a/arch/arm/mach-exynos/Kconfig
+++ b/arch/arm/mach-exynos/Kconfig
@@ -41,6 +41,7 @@ config SOC_EXYNOS4212
bool "SAMSUNG EXYNOS4212"
default y
depends on ARCH_EXYNOS4
+   select SAMSUNG_DMADEV
select S5P_PM if PM
select S5P_SLEEP if PM
help
@@ -50,6 +51,7 @@ config SOC_EXYNOS4412
bool "SAMSUNG EXYNOS4412"
default y
depends on ARCH_EXYNOS4
+   select SAMSUNG_DMADEV
help
  Enable EXYNOS4412 SoC support
 
@@ -333,6 +335,7 @@ config MACH_SMDK4212
select SAMSUNG_DEV_BACKLIGHT
select SAMSUNG_DEV_KEYPAD
select SAMSUNG_DEV_PWM
+   select EXYNOS4_DEV_DMA
select EXYNOS4_SETUP_I2C1
select EXYNOS4_SETUP_I2C3
select EXYNOS4_SETUP_I2C7
diff --git a/arch/arm/mach-exynos/dma.c b/arch/arm/mach-exynos/dma.c
index 17a2f90..13607c4 100644
--- a/arch/arm/mach-exynos/dma.c
+++ b/arch/arm/mach-exynos/dma.c
@@ -29,6 +29,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -36,7 +37,7 @@
 
 static u64 dma_dmamask = DMA_BIT_MASK(32);
 
-static u8 pdma0_peri[] = {
+static u8 exynos4210_pdma0_peri[] = {
DMACH_PCM0_RX,
DMACH_PCM0_TX,
DMACH_PCM2_RX,
@@ -69,15 +70,47 @@ static u8 pdma0_peri[] = {
DMACH_AC97_PCMOUT,
 };
 
-static struct dma_pl330_platdata exynos4_pdma0_pdata = {
-   .nr_valid_peri = ARRAY_SIZE(pdma0_peri),
-   .peri_id = pdma0_peri,
+static u8 exynos4212_pdma0_peri[] = {
+   DMACH_PCM0_RX,
+   DMACH_PCM0_TX,
+   DMACH_PCM2_RX,
+   DMACH_PCM2_TX,
+   DMACH_MIPI_HSI0,
+   DMACH_MIPI_HSI1,
+   DMACH_SPI0_RX,
+   DMACH_SPI0_TX,
+   DMACH_SPI2_RX,
+   DMACH_SPI2_TX,
+   DMACH_I2S0S_TX,
+   DMACH_I2S0_RX,
+   DMACH_I2S0_TX,
+   DMACH_I2S2_RX,
+   DMACH_I2S2_TX,
+   DMACH_UART0_RX,
+   DMACH_UART0_TX,
+   DMACH_UART2_RX,
+   DMACH_UART2_TX,
+   DMACH_UART4_RX,
+   DMACH_UART4_TX,
+   DMACH_SLIMBUS0_RX,
+   DMACH_SLIMBUS0_TX,
+   DMACH_SLIMBUS2_RX,
+   DMACH_SLIMBUS2_TX,
+   DMACH_SLIMBUS4_RX,
+   DMACH_SLIMBUS4_TX,
+   DMACH_AC97_MICIN,
+   DMACH_AC97_PCMIN,
+   DMACH_AC97_PCMOUT,
+   DMACH_MIPI_HSI4,
+   DMACH_MIPI_HSI5,
 };
 
+struct dma_pl330_platdata exynos4_pdma0_pdata;
+
 static AMBA_AHB_DEVICE(exynos4_pdma0, "dma-pl330.0", 0x00041330,
EXYNOS4_PA_PDMA0, {IRQ_PDMA0}, &exynos4_pdma0_pdata);
 
-static u8 pdma1_peri[] = {
+static u8 exynos4210_pdma1_peri[] = {
DMACH_PCM0_RX,
DMACH_PCM0_TX,
DMACH_PCM1_RX,
@@ -105,11 +138,41 @@ static u8 pdma1_peri[] = {
DMACH_SLIMBUS5_TX,
 };
 
-static struct dma_pl330_platdata exynos4_pdma1_pdata = {
-   .nr_valid_peri = ARRAY_SIZE(pdma1_peri),
-   .peri_id = pdma1_peri,
+static u8 exynos4212_pdma1_peri[] = {
+   DMACH_PCM0_RX,
+   DMACH_PCM0_TX,
+   DMACH_PCM1_RX,
+   DMACH_PCM1_TX,
+   DMACH_MIPI_HSI2,
+   DMACH_MIPI_HSI3,
+   DMACH_SPI1_RX,
+   DMACH_SPI1_TX,
+   DMACH_I2S0S_TX,
+   DMACH_I2S0_RX,
+   DMACH_I2S0_TX,
+   DMACH_I2S1_RX,
+   DMACH_I2S1_TX,
+   DMACH_UART0_RX,
+   DMACH_UART0_TX,
+   DMACH_UART1_RX,
+   DMACH_UART1_TX,
+   DMACH_UART3_RX,
+   DMACH_UART3_TX,
+   DMACH_SLIMBUS1_RX,
+   DMACH_SLIMBUS1_TX,
+   DMACH_SLIMBUS3_RX,
+   DMACH_SLIMBUS3_TX,
+   DMACH_SLIMBUS5_RX,
+   DMACH_SLIMBUS5_TX,
+   DMACH_SLIMBUS0AUX_RX,
+   DMACH_SLIMBUS0AUX_TX,
+   DMACH_SPDIF,
+   DMACH_MIPI_HSI6,
+   DMACH_MIPI_HSI7,
 };
 
+static struct dma_pl330_platdata exynos4_pdma1_pdata;
+
 static AMBA_AHB_DEVICE(exynos4_pdma1,  "dma-pl330.1", 0x00041330,
EXYNOS4_PA_PDMA1, {IRQ_PDMA1}, &exynos4_pdma1_pdata);
 
@@ -137,6 +200,22 @@ static int __init exynos4_dma_init(void)
if (of_have_populated_dt())
return 0;
 
+   if (soc_is_exynos4210()) {
+   exynos4_pdma0_pdata.nr_valid_peri =
+   ARRAY_SIZE(exynos4210_pdma0_peri);
+   exynos4_pdma0_pdata.peri_id = exynos4210_pdma0_peri;
+   exynos4_pdma1_pdata.nr_valid_peri =
+   ARRAY_SIZE(exynos4210_pdma1_peri);
+   exynos4_pdma1_pdata.peri_id = exynos4210_pdma1_peri;
+   } else if (soc_is_exynos4212() || soc_is_exynos4412()) {
+   exynos4_pdma0_pdata.nr_valid_peri =
+   ARRAY_SIZE(exynos4212_pdma0_peri);
+   exynos4_pdma0_pdata.peri_id = exynos4212_pdma0_peri;
+ 

[PATCH RE-SEND 2/3] ARM: EXYNOS: Add apb_pclk clkdev entry for mdma1

2012-02-15 Thread Kukjin Kim
From: Tushar Behera 

Amba core assumes the pclk to be named as apb_pclk. During device probe,
it tries to get that clock and enable that. When PM_RUNTIME is enabled,
dma clock is not explicitly enabled in pl330_probe, which causes device
probe to fail. Adding a clkdev entry for apb_pclk for mdma1 fixes the
problem.

This patch fixes following runtime error.

dma-pl330 dma-pl330.2: PERIPH_ID 0x0, PCELL_ID 0x0 !
dma-pl330: probe of dma-pl330.2 failed with error -22

Signed-off-by: Tushar Behera 
Signed-off-by: Kukjin Kim 
---
 arch/arm/mach-exynos/clock-exynos4.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-exynos/clock-exynos4.c 
b/arch/arm/mach-exynos/clock-exynos4.c
index a61006d..c087622 100644
--- a/arch/arm/mach-exynos/clock-exynos4.c
+++ b/arch/arm/mach-exynos/clock-exynos4.c
@@ -1339,6 +1339,7 @@ static struct clk_lookup exynos4_clk_lookup[] = {
CLKDEV_INIT("s3c-sdhci.3", "mmc_busclk.2", &exynos4_clk_sclk_mmc3.clk),
CLKDEV_INIT("dma-pl330.0", "apb_pclk", &exynos4_clk_pdma0),
CLKDEV_INIT("dma-pl330.1", "apb_pclk", &exynos4_clk_pdma1),
+   CLKDEV_INIT("dma-pl330.2", "apb_pclk", &exynos4_clk_mdma1),
CLKDEV_INIT("s3c64xx-spi.0", "spi_busclk0", &exynos4_clk_sclk_spi0.clk),
CLKDEV_INIT("s3c64xx-spi.1", "spi_busclk0", &exynos4_clk_sclk_spi1.clk),
CLKDEV_INIT("s3c64xx-spi.2", "spi_busclk0", &exynos4_clk_sclk_spi2.clk),
-- 
1.7.4.4

--
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 v2 1/3] ARM: EXYNOS: Enable MDMA driver

2012-02-15 Thread Kukjin Kim
From: Boojin Kim 

This patch adds MDMA platform data and enables
MDMA for DMA memcpy operation for EXYNOS SoCs.

Signed-off-by: Boojin Kim 
Signed-off-by: Kukjin Kim 
---
 arch/arm/mach-exynos/clock-exynos4.c   |8 
 arch/arm/mach-exynos/dma.c |   22 ++
 arch/arm/mach-exynos/include/mach/irqs.h   |2 ++
 arch/arm/mach-exynos/include/mach/map.h|3 ++-
 arch/arm/plat-samsung/include/plat/dma-pl330.h |8 
 5 files changed, 42 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-exynos/clock-exynos4.c 
b/arch/arm/mach-exynos/clock-exynos4.c
index c83da54..a61006d 100644
--- a/arch/arm/mach-exynos/clock-exynos4.c
+++ b/arch/arm/mach-exynos/clock-exynos4.c
@@ -785,6 +785,13 @@ static struct clk exynos4_clk_pdma1 = {
.ctrlbit= (1 << 1),
 };
 
+static struct clk exynos4_clk_mdma1 = {
+   .name   = "dma",
+   .devname= "dma-pl330.2",
+   .enable = exynos4_clk_ip_image_ctrl,
+   .ctrlbit= ((1 << 8) | (1 << 5) | (1 << 2)),
+};
+
 struct clk *exynos4_clkset_group_list[] = {
[0] = &clk_ext_xtal_mux,
[1] = &clk_xusbxti,
@@ -1303,6 +1310,7 @@ static struct clksrc_clk *exynos4_sysclks[] = {
 static struct clk *exynos4_clk_cdev[] = {
&exynos4_clk_pdma0,
&exynos4_clk_pdma1,
+   &exynos4_clk_mdma1,
 };
 
 static struct clksrc_clk *exynos4_clksrc_cdev[] = {
diff --git a/arch/arm/mach-exynos/dma.c b/arch/arm/mach-exynos/dma.c
index 25f3ef2..17a2f90 100644
--- a/arch/arm/mach-exynos/dma.c
+++ b/arch/arm/mach-exynos/dma.c
@@ -113,6 +113,25 @@ static struct dma_pl330_platdata exynos4_pdma1_pdata = {
 static AMBA_AHB_DEVICE(exynos4_pdma1,  "dma-pl330.1", 0x00041330,
EXYNOS4_PA_PDMA1, {IRQ_PDMA1}, &exynos4_pdma1_pdata);
 
+static u8 mdma_peri[] = {
+   DMACH_MTOM_0,
+   DMACH_MTOM_1,
+   DMACH_MTOM_2,
+   DMACH_MTOM_3,
+   DMACH_MTOM_4,
+   DMACH_MTOM_5,
+   DMACH_MTOM_6,
+   DMACH_MTOM_7,
+};
+
+static struct dma_pl330_platdata exynos4_mdma1_pdata = {
+   .nr_valid_peri = ARRAY_SIZE(mdma_peri),
+   .peri_id = mdma_peri,
+};
+
+static AMBA_AHB_DEVICE(exynos4_mdma1,  "dma-pl330.2", 0x00041330,
+   EXYNOS4_PA_MDMA1, {IRQ_MDMA1}, &exynos4_mdma1_pdata);
+
 static int __init exynos4_dma_init(void)
 {
if (of_have_populated_dt())
@@ -126,6 +145,9 @@ static int __init exynos4_dma_init(void)
dma_cap_set(DMA_CYCLIC, exynos4_pdma1_pdata.cap_mask);
amba_device_register(&exynos4_pdma1_device, &iomem_resource);
 
+   dma_cap_set(DMA_MEMCPY, exynos4_mdma1_pdata.cap_mask);
+   amba_device_register(&exynos4_mdma1_device, &iomem_resource);
+
return 0;
 }
 arch_initcall(exynos4_dma_init);
diff --git a/arch/arm/mach-exynos/include/mach/irqs.h 
b/arch/arm/mach-exynos/include/mach/irqs.h
index f77bce0..1d401c9 100644
--- a/arch/arm/mach-exynos/include/mach/irqs.h
+++ b/arch/arm/mach-exynos/include/mach/irqs.h
@@ -43,6 +43,8 @@
 #define IRQ_EINT15 IRQ_SPI(31)
 #define IRQ_EINT16_31  IRQ_SPI(32)
 
+#define IRQ_MDMA0  IRQ_SPI(33)
+#define IRQ_MDMA1  IRQ_SPI(34)
 #define IRQ_PDMA0  IRQ_SPI(35)
 #define IRQ_PDMA1  IRQ_SPI(36)
 #define IRQ_TIMER0_VIC IRQ_SPI(37)
diff --git a/arch/arm/mach-exynos/include/mach/map.h 
b/arch/arm/mach-exynos/include/mach/map.h
index c754a22..2ad4e9c 100644
--- a/arch/arm/mach-exynos/include/mach/map.h
+++ b/arch/arm/mach-exynos/include/mach/map.h
@@ -67,7 +67,8 @@
 #define EXYNOS4_PA_TWD 0x10500600
 #define EXYNOS4_PA_L2CC0x10502000
 
-#define EXYNOS4_PA_MDMA0x1081
+#define EXYNOS4_PA_MDMA0   0x1081
+#define EXYNOS4_PA_MDMA1   0x1284
 #define EXYNOS4_PA_PDMA0   0x1268
 #define EXYNOS4_PA_PDMA1   0x1269
 
diff --git a/arch/arm/plat-samsung/include/plat/dma-pl330.h 
b/arch/arm/plat-samsung/include/plat/dma-pl330.h
index c5eaad5..ecf23a8 100644
--- a/arch/arm/plat-samsung/include/plat/dma-pl330.h
+++ b/arch/arm/plat-samsung/include/plat/dma-pl330.h
@@ -82,6 +82,14 @@ enum dma_ch {
DMACH_SLIMBUS4_TX,
DMACH_SLIMBUS5_RX,
DMACH_SLIMBUS5_TX,
+   DMACH_MTOM_0,
+   DMACH_MTOM_1,
+   DMACH_MTOM_2,
+   DMACH_MTOM_3,
+   DMACH_MTOM_4,
+   DMACH_MTOM_5,
+   DMACH_MTOM_6,
+   DMACH_MTOM_7,
/* END Marker, also used to denote a reserved channel */
DMACH_MAX,
 };
-- 
1.7.4.4

--
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 v2 0/3] ARM: EXYNOS: add support mdma and EXYNOS4X12 dma

2012-02-15 Thread Kukjin Kim
This patch adds support enabling mdma driver and dma for EXYNOS4X12.
Basically, not changed but rebased on arm-soc/depends/rmk/for-armsoc
and merged next/cleanup-exynos-clock-v2 and next/cleanup-use-static.

[PATCH v2 1/3] ARM: EXYNOS: Enable MDMA driver
[PATCH RE-SEND 2/3] ARM: EXYNOS: Add apb_pclk clkdev entry for mdma1
[PATCH v2 3/3] ARM: EXYNOS: add support DMA for EXYNOS4X12 SoC
--
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 v2 3/3] gpio/samsung: use ioremap() for EXYNOS4 GPIOlib

2012-02-15 Thread Kukjin Kim
From: Sangsu Park 

This patch changes to use ioremap() for EXYNOS4210
so that we can drop the static mapping for EXYNOS
SoCs.

Note: Will be updated for all of Samsung GPIOlibs
to use ioremap() next time.

Signed-off-by: Sangsu Park 
Cc: Grant Likely 
Signed-off-by: Kukjin Kim 
---
 arch/arm/mach-exynos/common.c |   15 
 drivers/gpio/gpio-samsung.c   |   48 +
 2 files changed, 34 insertions(+), 29 deletions(-)

diff --git a/arch/arm/mach-exynos/common.c b/arch/arm/mach-exynos/common.c
index 63a2b04..618e7f3 100644
--- a/arch/arm/mach-exynos/common.c
+++ b/arch/arm/mach-exynos/common.c
@@ -172,21 +172,6 @@ static struct map_desc exynos4_iodesc[] __initdata = {
.length = SZ_4K,
.type   = MT_DEVICE,
}, {
-   .virtual= (unsigned long)S5P_VA_GPIO1,
-   .pfn= __phys_to_pfn(EXYNOS4_PA_GPIO1),
-   .length = SZ_4K,
-   .type   = MT_DEVICE,
-   }, {
-   .virtual= (unsigned long)S5P_VA_GPIO2,
-   .pfn= __phys_to_pfn(EXYNOS4_PA_GPIO2),
-   .length = SZ_4K,
-   .type   = MT_DEVICE,
-   }, {
-   .virtual= (unsigned long)S5P_VA_GPIO3,
-   .pfn= __phys_to_pfn(EXYNOS4_PA_GPIO3),
-   .length = SZ_256,
-   .type   = MT_DEVICE,
-   }, {
.virtual= (unsigned long)S5P_VA_DMC0,
.pfn= __phys_to_pfn(EXYNOS4_PA_DMC0),
.length = SZ_4K,
diff --git a/drivers/gpio/gpio-samsung.c b/drivers/gpio/gpio-samsung.c
index d6cfdee7..4627787 100644
--- a/drivers/gpio/gpio-samsung.c
+++ b/drivers/gpio/gpio-samsung.c
@@ -2331,7 +2331,6 @@ static struct samsung_gpio_chip exynos4_gpios_2[] = {
.label  = "GPY6",
},
}, {
-   .base   = (S5P_VA_GPIO2 + 0xC00),
.config = &samsung_gpio_cfgs[9],
.irq_base = IRQ_EINT(0),
.chip   = {
@@ -2341,7 +2340,6 @@ static struct samsung_gpio_chip exynos4_gpios_2[] = {
.to_irq = samsung_gpiolib_to_irq,
},
}, {
-   .base   = (S5P_VA_GPIO2 + 0xC20),
.config = &samsung_gpio_cfgs[9],
.irq_base = IRQ_EINT(8),
.chip   = {
@@ -2351,7 +2349,6 @@ static struct samsung_gpio_chip exynos4_gpios_2[] = {
.to_irq = samsung_gpiolib_to_irq,
},
}, {
-   .base   = (S5P_VA_GPIO2 + 0xC40),
.config = &samsung_gpio_cfgs[9],
.irq_base = IRQ_EINT(16),
.chip   = {
@@ -2361,7 +2358,6 @@ static struct samsung_gpio_chip exynos4_gpios_2[] = {
.to_irq = samsung_gpiolib_to_irq,
},
}, {
-   .base   = (S5P_VA_GPIO2 + 0xC60),
.config = &samsung_gpio_cfgs[9],
.irq_base = IRQ_EINT(24),
.chip   = {
@@ -2789,9 +2785,16 @@ static __init int samsung_gpiolib_init(void)
s5p_register_gpioint_bank(IRQ_GPIOINT, 0, 
S5P_GPIOINT_GROUP_MAXNR);
 #endif
} else if (soc_is_exynos4210()) {
-   group = 0;
+#ifdef CONFIG_CPU_EXYNOS4210
+   void __iomem *gpx_base;
 
/* gpio part1 */
+   gpio_base1 = ioremap(EXYNOS4_PA_GPIO1, SZ_4K);
+   if (gpio_base1 == NULL) {
+   pr_err("unable to ioremap for gpio_base1\n");
+   goto err_ioremap1;
+   }
+
chip = exynos4_gpios_1;
nr_chips = ARRAY_SIZE(exynos4_gpios_1);
 
@@ -2800,14 +2803,25 @@ static __init int samsung_gpiolib_init(void)
chip->config = &exynos_gpio_cfg;
chip->group = group++;
}
-#ifdef CONFIG_CPU_EXYNOS4210
exynos_gpiolib_attach_ofnode(chip,
EXYNOS4_PA_GPIO1, i * 0x20);
-#endif
}
-   samsung_gpiolib_add_4bit_chips(exynos4_gpios_1, nr_chips, 
S5P_VA_GPIO1);
+   samsung_gpiolib_add_4bit_chips(exynos4_gpios_1,
+  nr_chips, gpio_base1);
 
/* gpio part2 */
+   gpio_base2 = ioremap(EXYNOS4_PA_GPIO2, SZ_4K);
+   if (gpio_base2 == NULL) {
+   pr_err("unable to ioremap for gpio_base2\n");
+   goto err_ioremap2;
+   }
+
+   /* need to set base address for gpx */
+   chip = &exynos4_gpios_2[16];
+   gpx_base = gpio_base2 + 0xC00;
+   for (i = 0; i < 4; i++, chip++, gpx_base += 0x20)
+   chip->base = gpx_base;
+
 

[PATCH v2 2/3] gpio/samsung: add support GPIOlib for EXYNOS5250

2012-02-15 Thread Kukjin Kim
From: Sangsu Park 

This patch adds gpio_chips for EXYNOS5250 and replaces
exynos4_xxx() with exynos_xxx() and variables to support
exynos4 and exynos5 together.
In addition, use ioreamp() for base address of gpios.

Signed-off-by: Sangsu Park 
Cc: Grant Likely 
Signed-off-by: Kukjin Kim 
---
 drivers/gpio/gpio-samsung.c |  439 +--
 1 files changed, 411 insertions(+), 28 deletions(-)

diff --git a/drivers/gpio/gpio-samsung.c b/drivers/gpio/gpio-samsung.c
index 0a79a11..d6cfdee7 100644
--- a/drivers/gpio/gpio-samsung.c
+++ b/drivers/gpio/gpio-samsung.c
@@ -169,7 +169,7 @@ int s3c24xx_gpio_setpull_1down(struct samsung_gpio_chip 
*chip,
return s3c24xx_gpio_setpull_1(chip, off, pull, S3C_GPIO_PULL_DOWN);
 }
 
-static int exynos4_gpio_setpull(struct samsung_gpio_chip *chip,
+static int exynos_gpio_setpull(struct samsung_gpio_chip *chip,
unsigned int off, samsung_gpio_pull_t pull)
 {
if (pull == S3C_GPIO_PULL_UP)
@@ -178,7 +178,7 @@ static int exynos4_gpio_setpull(struct samsung_gpio_chip 
*chip,
return samsung_gpio_setpull_updown(chip, off, pull);
 }
 
-static samsung_gpio_pull_t exynos4_gpio_getpull(struct samsung_gpio_chip *chip,
+static samsung_gpio_pull_t exynos_gpio_getpull(struct samsung_gpio_chip *chip,
unsigned int off)
 {
samsung_gpio_pull_t pull;
@@ -452,9 +452,9 @@ static struct samsung_gpio_cfg s3c24xx_gpiocfg_banka = {
 };
 #endif
 
-static struct samsung_gpio_cfg exynos4_gpio_cfg = {
-   .set_pull   = exynos4_gpio_setpull,
-   .get_pull   = exynos4_gpio_getpull,
+static struct samsung_gpio_cfg exynos_gpio_cfg = {
+   .set_pull   = exynos_gpio_setpull,
+   .get_pull   = exynos_gpio_getpull,
.set_config = samsung_gpio_setcfg_4bit,
.get_config = samsung_gpio_getcfg_4bit,
 };
@@ -502,13 +502,13 @@ static struct samsung_gpio_cfg samsung_gpio_cfgs[] = {
.get_config = samsung_gpio_getcfg_2bit,
},
[8] = {
-   .set_pull   = exynos4_gpio_setpull,
-   .get_pull   = exynos4_gpio_getpull,
+   .set_pull   = exynos_gpio_setpull,
+   .get_pull   = exynos_gpio_getpull,
},
[9] = {
.cfg_eint   = 0x3,
-   .set_pull   = exynos4_gpio_setpull,
-   .get_pull   = exynos4_gpio_getpull,
+   .set_pull   = exynos_gpio_setpull,
+   .get_pull   = exynos_gpio_getpull,
}
 };
 
@@ -2113,10 +2113,10 @@ static struct samsung_gpio_chip s5pv210_gpios_4bit[] = {
 };
 
 /*
- * Followings are the gpio banks in EXYNOS4210
+ * Followings are the gpio banks in EXYNOS SoCs
  *
  * The 'config' member when left to NULL, is initialized to the default
- * structure samsung_gpio_cfgs[3] in the init function below.
+ * structure exynos_gpio_cfg in the init function below.
  *
  * The 'base' member is also initialized in the init function below.
  * Note: The initialization of 'base' member of samsung_gpio_chip structure
@@ -2386,8 +2386,280 @@ static struct samsung_gpio_chip exynos4_gpios_3[] = {
 #endif
 };
 
-#if defined(CONFIG_ARCH_EXYNOS4) && defined(CONFIG_OF)
-static int exynos4_gpio_xlate(struct gpio_chip *gc,
+static struct samsung_gpio_chip exynos5_gpios_1[] = {
+#ifdef CONFIG_ARCH_EXYNOS5
+   {
+   .chip   = {
+   .base   = EXYNOS5_GPA0(0),
+   .ngpio  = EXYNOS5_GPIO_A0_NR,
+   .label  = "GPA0",
+   },
+   }, {
+   .chip   = {
+   .base   = EXYNOS5_GPA1(0),
+   .ngpio  = EXYNOS5_GPIO_A1_NR,
+   .label  = "GPA1",
+   },
+   }, {
+   .chip   = {
+   .base   = EXYNOS5_GPA2(0),
+   .ngpio  = EXYNOS5_GPIO_A2_NR,
+   .label  = "GPA2",
+   },
+   }, {
+   .chip   = {
+   .base   = EXYNOS5_GPB0(0),
+   .ngpio  = EXYNOS5_GPIO_B0_NR,
+   .label  = "GPB0",
+   },
+   }, {
+   .chip   = {
+   .base   = EXYNOS5_GPB1(0),
+   .ngpio  = EXYNOS5_GPIO_B1_NR,
+   .label  = "GPB1",
+   },
+   }, {
+   .chip   = {
+   .base   = EXYNOS5_GPB2(0),
+   .ngpio  = EXYNOS5_GPIO_B2_NR,
+   .label  = "GPB2",
+   },
+   }, {
+   .chip   = {
+   .base   = EXYNOS5_GPB3(0),
+   .ngpio  = EXYNOS5_GPIO_B3_NR,
+   .label  = "GPB3",
+   },
+   }, {
+   .chip   = {
+   .base   = EXYNOS5_GPC0(0),
+   .ngpio  

[PATCH v2 1/3] ARM: EXYNOS: add support GPIO for EXYNOS5250

2012-02-15 Thread Kukjin Kim
From: Sangsu Park 

This patch adds support regarding GPIO definitions for
EXYNOS5250 and change the macro of GPIO numbering to use
EXYNOS4 and EXYNOS5 SoCs.

Signed-off-by: Sangsu Park 
Signed-off-by: Kukjin Kim 
---
 arch/arm/mach-exynos/include/mach/gpio.h |  239 +++---
 arch/arm/mach-exynos/include/mach/map.h  |4 +
 2 files changed, 192 insertions(+), 51 deletions(-)

diff --git a/arch/arm/mach-exynos/include/mach/gpio.h 
b/arch/arm/mach-exynos/include/mach/gpio.h
index 80523ca..d7498af 100644
--- a/arch/arm/mach-exynos/include/mach/gpio.h
+++ b/arch/arm/mach-exynos/include/mach/gpio.h
@@ -1,9 +1,8 @@
-/* linux/arch/arm/mach-exynos4/include/mach/gpio.h
- *
- * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd.
+/*
+ * Copyright (c) 2010-2012 Samsung Electronics Co., Ltd.
  * http://www.samsung.com
  *
- * EXYNOS4 - GPIO lib support
+ * EXYNOS - GPIO lib support
  *
  * 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
@@ -13,9 +12,13 @@
 #ifndef __ASM_ARCH_GPIO_H
 #define __ASM_ARCH_GPIO_H __FILE__
 
-/* Practically, GPIO banks up to GPZ are the configurable gpio banks */
+/* Macro for EXYNOS GPIO numbering */
+
+#define EXYNOS_GPIO_NEXT(__gpio) \
+   ((__gpio##_START) + (__gpio##_NR) + CONFIG_S3C_GPIO_SPACE + 1)
+
+/* EXYNOS4 GPIO bank sizes */
 
-/* GPIO bank sizes */
 #define EXYNOS4_GPIO_A0_NR (8)
 #define EXYNOS4_GPIO_A1_NR (6)
 #define EXYNOS4_GPIO_B_NR  (8)
@@ -54,52 +57,50 @@
 #define EXYNOS4_GPIO_Y6_NR (8)
 #define EXYNOS4_GPIO_Z_NR  (7)
 
-/* GPIO bank numbers */
-
-#define EXYNOS4_GPIO_NEXT(__gpio) \
-   ((__gpio##_START) + (__gpio##_NR) + CONFIG_S3C_GPIO_SPACE + 1)
+/* EXYNOS4 GPIO bank numbers */
 
-enum s5p_gpio_number {
+enum exynos4_gpio_number {
EXYNOS4_GPIO_A0_START   = 0,
-   EXYNOS4_GPIO_A1_START   = EXYNOS4_GPIO_NEXT(EXYNOS4_GPIO_A0),
-   EXYNOS4_GPIO_B_START= EXYNOS4_GPIO_NEXT(EXYNOS4_GPIO_A1),
-   EXYNOS4_GPIO_C0_START   = EXYNOS4_GPIO_NEXT(EXYNOS4_GPIO_B),
-   EXYNOS4_GPIO_C1_START   = EXYNOS4_GPIO_NEXT(EXYNOS4_GPIO_C0),
-   EXYNOS4_GPIO_D0_START   = EXYNOS4_GPIO_NEXT(EXYNOS4_GPIO_C1),
-   EXYNOS4_GPIO_D1_START   = EXYNOS4_GPIO_NEXT(EXYNOS4_GPIO_D0),
-   EXYNOS4_GPIO_E0_START   = EXYNOS4_GPIO_NEXT(EXYNOS4_GPIO_D1),
-   EXYNOS4_GPIO_E1_START   = EXYNOS4_GPIO_NEXT(EXYNOS4_GPIO_E0),
-   EXYNOS4_GPIO_E2_START   = EXYNOS4_GPIO_NEXT(EXYNOS4_GPIO_E1),
-   EXYNOS4_GPIO_E3_START   = EXYNOS4_GPIO_NEXT(EXYNOS4_GPIO_E2),
-   EXYNOS4_GPIO_E4_START   = EXYNOS4_GPIO_NEXT(EXYNOS4_GPIO_E3),
-   EXYNOS4_GPIO_F0_START   = EXYNOS4_GPIO_NEXT(EXYNOS4_GPIO_E4),
-   EXYNOS4_GPIO_F1_START   = EXYNOS4_GPIO_NEXT(EXYNOS4_GPIO_F0),
-   EXYNOS4_GPIO_F2_START   = EXYNOS4_GPIO_NEXT(EXYNOS4_GPIO_F1),
-   EXYNOS4_GPIO_F3_START   = EXYNOS4_GPIO_NEXT(EXYNOS4_GPIO_F2),
-   EXYNOS4_GPIO_J0_START   = EXYNOS4_GPIO_NEXT(EXYNOS4_GPIO_F3),
-   EXYNOS4_GPIO_J1_START   = EXYNOS4_GPIO_NEXT(EXYNOS4_GPIO_J0),
-   EXYNOS4_GPIO_K0_START   = EXYNOS4_GPIO_NEXT(EXYNOS4_GPIO_J1),
-   EXYNOS4_GPIO_K1_START   = EXYNOS4_GPIO_NEXT(EXYNOS4_GPIO_K0),
-   EXYNOS4_GPIO_K2_START   = EXYNOS4_GPIO_NEXT(EXYNOS4_GPIO_K1),
-   EXYNOS4_GPIO_K3_START   = EXYNOS4_GPIO_NEXT(EXYNOS4_GPIO_K2),
-   EXYNOS4_GPIO_L0_START   = EXYNOS4_GPIO_NEXT(EXYNOS4_GPIO_K3),
-   EXYNOS4_GPIO_L1_START   = EXYNOS4_GPIO_NEXT(EXYNOS4_GPIO_L0),
-   EXYNOS4_GPIO_L2_START   = EXYNOS4_GPIO_NEXT(EXYNOS4_GPIO_L1),
-   EXYNOS4_GPIO_X0_START   = EXYNOS4_GPIO_NEXT(EXYNOS4_GPIO_L2),
-   EXYNOS4_GPIO_X1_START   = EXYNOS4_GPIO_NEXT(EXYNOS4_GPIO_X0),
-   EXYNOS4_GPIO_X2_START   = EXYNOS4_GPIO_NEXT(EXYNOS4_GPIO_X1),
-   EXYNOS4_GPIO_X3_START   = EXYNOS4_GPIO_NEXT(EXYNOS4_GPIO_X2),
-   EXYNOS4_GPIO_Y0_START   = EXYNOS4_GPIO_NEXT(EXYNOS4_GPIO_X3),
-   EXYNOS4_GPIO_Y1_START   = EXYNOS4_GPIO_NEXT(EXYNOS4_GPIO_Y0),
-   EXYNOS4_GPIO_Y2_START   = EXYNOS4_GPIO_NEXT(EXYNOS4_GPIO_Y1),
-   EXYNOS4_GPIO_Y3_START   = EXYNOS4_GPIO_NEXT(EXYNOS4_GPIO_Y2),
-   EXYNOS4_GPIO_Y4_START   = EXYNOS4_GPIO_NEXT(EXYNOS4_GPIO_Y3),
-   EXYNOS4_GPIO_Y5_START   = EXYNOS4_GPIO_NEXT(EXYNOS4_GPIO_Y4),
-   EXYNOS4_GPIO_Y6_START   = EXYNOS4_GPIO_NEXT(EXYNOS4_GPIO_Y5),
-   EXYNOS4_GPIO_Z_START= EXYNOS4_GPIO_NEXT(EXYNOS4_GPIO_Y6),
+   EXYNOS4_GPIO_A1_START   = EXYNOS_GPIO_NEXT(EXYNOS4_GPIO_A0),
+   EXYNOS4_GPIO_B_START= EXYNOS_GPIO_NEXT(EXYNOS4_GPIO_A1),
+   EXYNOS4_GPIO_C0_START   = EXYNOS_GPIO_NEXT(EXYNOS4_GPIO_B),
+   EXYNOS4_GPIO_C1_START   = EXYNOS_GPIO_NEXT(EXYNOS4_GPIO_C0),
+   EXYNOS4_GPIO_D0_START   = EXYNOS_GPIO_NEXT(EXYNOS4_GPIO_C1),
+   EXYNOS4_GPIO_D1_START   = EXYNOS_GPIO_NEXT(EXYNOS4_GPIO_D0),
+   EXYNOS4_GPIO_E0_START   = EXYNOS_GPIO_NEXT(EXYNOS4_GPIO_D1),
+   EXYNOS4_GPIO_E1_START   = EXYNOS_GPIO_NEXT(EXYNOS4_GPIO_E0),
+   EXYNOS4_GPIO_E2_START   = EXY

[PATCH v2] ARM: EXYNOS: add support GPIO for EXYNOS5250

2012-02-15 Thread Kukjin Kim
This patch adds support GPIOlib for EXYNOS5250 and is including
use ioremap() for EXYNOS4210 and GPIO5250 GPIOlib instead of
static mapping.

Changes since v1:
- use ioremap() for base address of gpio instead of static
  mapping for EXYNOS4210 and EXYNOS5250

NOTE: this patches depend on EXYNOS5250 supporting patches

[PATCH v2 1/3] ARM: EXYNOS: add support GPIO for EXYNOS5250
[PATCH v2 2/3] gpio/samsung: add support GPIOlib for EXYNOS5250
[PATCH v2 3/3] gpio/samsung: use ioremap() for EXYNOS4 GPIOlib
--
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