RE: [PATCH V5 00/15] To use DMA generic APIs for Samsung DMA

2011-08-11 Thread Kukjin Kim
Koul, Vinod wrote:
> 
> On Thu, 2011-08-04 at 18:53 +0200, Linus Walleij wrote:
> > On Wed, Jul 27, 2011 at 7:31 AM, Boojin Kim  wrote:
> >
> > > This patchset adds support DMA generic APIs for Samsung DMA.
> >
> > Patches look good to me,
> > Acked-by: Linus Walleij 
> 
> Acked-by: Vinod Koul 
> 
> Do you want these to go thru slave-dma tree or arm tree, I am okay with
> either...

Hi Vinod,

Thanks.

I'd like to keep its topic branch in my tree to avoid conflicts with other 
samsung stuff and I think, it should be merged into your slave-dma tree also 
for same reason.

git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung.git 
#next/topic-dma-pl330

Or if you want to make some branch for it in your tree, please let me know so 
that I can merge it in my tree also.

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 2/4] ARM: S5P: add support for tv device

2011-08-11 Thread Kukjin Kim
= vpll_div[i].k << 0;

Same as above.

> + break;
> + }
> + }
> +
> + if (i == ARRAY_SIZE(vpll_div)) {
> + printk(KERN_ERR "%s: Invalid Clock VPLL Frequency\n",
> + __func__);
> + return -EINVAL;
> + }
> +
> + __raw_writel(vpll_con0, S5P_VPLL_CON0);
> + __raw_writel(vpll_con1, S5P_VPLL_CON1);

According to above, in case of S5PV210/S5PC110, VPLL_CON0 and VPLL_CON1 are
same...So this is wrong. The VPLL_CON0 will be overwritten with VPLL_CON1
after writing vpll_con1. In addition, following is not vaild at
VPLL_CON(0xE010_0120) on S5PV210/S5PC110

vpll_con1 &= ~(0x1f << 24 | \
0x3f << 16 |\
0xfff << 0);

> +
> + /* Wait for VPLL lock */
> + while (!(__raw_readl(S5P_VPLL_CON0) & (1 <<
> S5P_VPLLCON0_LOCKED_SHIFT)))
> + continue;
> +
> + clk->rate = rate;
> + return 0;
> +}
> diff --git a/arch/arm/plat-s5p/dev-tv.c b/arch/arm/plat-s5p/dev-tv.c
> new file mode 100644
> index 000..0e44342
> --- /dev/null
> +++ b/arch/arm/plat-s5p/dev-tv.c
> @@ -0,0 +1,100 @@
> +/* linux/arch/arm/plat-s5p/dev-tv.c
> + *
> + * Copyright (C) 2011 Samsung Electronics Co.Ltd
> + * Author: Tomasz Stanislawski 
> + *
> + * S5P series device definition for TV device
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License version 2 as
> + * published by the Free Software Foundation.
> +*/
> +
> +#include 
> +
> +#include 
> +#include 
> +
> +#include 
> +
> +/* HDMI interface */
> +static struct resource s5p_hdmi_resources[] = {
> + [0] = {
> + .start  = S5P_PA_HDMI,
> + .end= S5P_PA_HDMI + SZ_1M - 1,
> + .flags  = IORESOURCE_MEM,
> + },
> + [1] = {
> + .start  = IRQ_HDMI,
> + .end= IRQ_HDMI,
> + .flags  = IORESOURCE_IRQ,
> + },
> +};
> +
> +struct platform_device s5p_device_hdmi = {
> + .name   = "s5p-hdmi",
> + .id = -1,
> + .num_resources  = ARRAY_SIZE(s5p_hdmi_resources),
> + .resource   = s5p_hdmi_resources,
> +};
> +EXPORT_SYMBOL(s5p_device_hdmi);
> +
> +/* MIXER */
> +static struct resource s5p_mixer_resources[] = {
> + [0] = {
> + .start  = S5P_PA_MIXER,
> + .end= S5P_PA_MIXER + SZ_64K - 1,
> + .flags  = IORESOURCE_MEM,
> + .name   = "mxr"
> + },
> + [1] = {
> + .start  = S5P_PA_VP,
> + .end= S5P_PA_VP + SZ_64K - 1,
> + .flags  = IORESOURCE_MEM,
> + .name   = "vp"
> + },
> + [2] = {
> + .start  = IRQ_MIXER,
> + .end= IRQ_MIXER,
> + .flags  = IORESOURCE_IRQ,
> + .name   = "irq"
> + }
> +};
> +

+statuc u64 s5p_tv_dmamask = DMA_BIT_MASK(32);

> +struct platform_device s5p_device_mixer = {
> + .name   = "s5p-mixer",
> + .id = -1,
> + .num_resources  = ARRAY_SIZE(s5p_mixer_resources),
> + .resource   = s5p_mixer_resources,
> + .dev= {
> + .coherent_dma_mask = DMA_BIT_MASK(32),
> + .dma_mask = &s5p_device_mixer.dev.coherent_dma_mask,

+   .dma_mask = &s5p_tv_dmamask,

> + }
> +};
> +EXPORT_SYMBOL(s5p_device_mixer);
> +
> +/* HDMI interface */
> +static struct resource s5p_sdo_resources[] = {
> + [0] = {
> + .start  = S5P_PA_SDO,
> + .end= S5P_PA_SDO + SZ_64K - 1,
> + .flags  = IORESOURCE_MEM,
> + },
> + [1] = {
> + .start  = IRQ_SDO,
> + .end= IRQ_SDO,
> + .flags  = IORESOURCE_IRQ,
> + }
> +};
> +
> +struct platform_device s5p_device_sdo = {
> + .name   = "s5p-sdo",
> + .id = -1,
> + .num_resources  = ARRAY_SIZE(s5p_sdo_resources),
> + .resource   = s5p_sdo_resources,
> + .dev= {
> + .coherent_dma_mask = DMA_BIT_MASK(32),
> + .dma_mask = &s5p_device_sdo.dev.coherent_dma_mask,

+   .dma_mask = &s5p_tv_dmamask,

> + }
> +};
> +EXPORT_SYMBOL(s5p_device_sdo);
> diff --git a/arch/arm/plat-s5p/include/plat/s5p-clock.h b/arch/arm/plat-
> s5p/include/plat/s5p-clock.h
> index 769b5bd..7cb2ffc 100644
> --- a/arch/arm/plat-s5p/include/plat/s5p-clock.h
> +++ b/arch/arm/plat-s5p/include/plat/s5p-clock.h
> @@ -47,6 +47,10 @@ extern int s5p_gatectrl(void __iomem *reg, struct clk
*clk, int
> enable);
>  extern int s5p_epll_enable(struct clk *clk, int enable);
>  extern unsigned long s5p_epll_get_rate(struct clk *clk);
> 
> +/* Common VPLL operations for S5P platform */
> +extern unsigned long s5p_vpll_get_rate(struct clk *clk);
> +extern int s5p_vpll_set_rate(struct clk *clk, unsigned long rate);
> +
>  /* SPDIF clk operations common for S5PC100/V210/C110 and Exynos4 */
>  extern int s5p_spdif_set_rate(struct clk *clk, unsigned long rate);
>  extern unsigned long s5p_spdif_get_rate(struct clk *clk);
> diff --git a/arch/arm/plat-samsung/include/plat/devs.h b/arch/arm/plat-
> samsung/include/plat/devs.h
> index b15805f..ee5014a 100644
> --- a/arch/arm/plat-samsung/include/plat/devs.h
> +++ b/arch/arm/plat-samsung/include/plat/devs.h
> @@ -143,6 +143,11 @@ extern struct platform_device s5p_device_fimc3;
>  extern struct platform_device s5p_device_mfc;
>  extern struct platform_device s5p_device_mfc_l;
>  extern struct platform_device s5p_device_mfc_r;
> +
> +extern struct platform_device s5p_device_hdmi;
> +extern struct platform_device s5p_device_mixer;
> +extern struct platform_device s5p_device_sdo;
> +
>  extern struct platform_device s5p_device_mipi_csis0;
>  extern struct platform_device s5p_device_mipi_csis1;
> 
> diff --git a/arch/arm/plat-samsung/include/plat/tv-core.h b/arch/arm/plat-
> samsung/include/plat/tv-core.h
> new file mode 100644
> index 000..3bc34f3
> --- /dev/null
> +++ b/arch/arm/plat-samsung/include/plat/tv-core.h
> @@ -0,0 +1,44 @@
> +/*
> + * arch/arm/plat-samsung/include/plat/tv.h
> + *
> + * Copyright 2011 Samsung Electronics Co., Ltd.
> + *   Tomasz Stanislawski 
> + *
> + * Samsung TV driver core functions
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License version 2 as
> + * published by the Free Software Foundation.
> + */
> +
> +#ifndef __SAMSUNG_PLAT_TV_H
> +#define __SAMSUNG_PLAT_TV_H __FILE__
> +
> +/*
> + * These functions are only for use with the core support code, such as
> + * the CPU-specific initialization code.
> + */
> +
> +/* Re-define device name to differentiate the subsystem in various SoCs.
*/
> +static inline void s5p_hdmi_setname(char *name)
> +{
> +#ifdef CONFIG_S5P_DEV_TV
> + s5p_device_hdmi.name = name;
> +#endif
> +}
> +
> +static inline void s5p_mixer_setname(char *name)
> +{
> +#ifdef CONFIG_S5P_DEV_TV
> + s5p_device_mixer.name = name;
> +#endif
> +}
> +
> +static inline void s5p_sdo_setname(char *name)
> +{
> +#ifdef CONFIG_S5P_DEV_TV
> + s5p_device_sdo.name = name;
> +#endif
> +}
> +
> +#endif /* __SAMSUNG_PLAT_TV_H */

where are s5p_mixer_setname and s5p_sdo_setname used? just wondering...

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 1/4] ARM: Samsung: add i2c hdmiphy controller definitions

2011-08-11 Thread Kukjin Kim
Marek Szyprowski wrote:
> 
> From: Tomasz Stanislawski 
> 
> This patch adds hdmiphy dedicated i2c controller definitions.
> 
> Signed-off-by: Tomasz Stanislawski 
> Signed-off-by: Kyungmin Park 
> [m.szyprowski: renamed to i2c-hdmiphy and squashed Exynos4 and S5PV210
> patches]
> Signed-off-by: Marek Szyprowski 
> ---
>  arch/arm/mach-exynos4/clock.c|6 ++
>  arch/arm/mach-exynos4/include/mach/iic-hdmiphy.h |   16 ++
>  arch/arm/mach-exynos4/include/mach/irqs.h|2 +
>  arch/arm/mach-exynos4/include/mach/map.h |4 ++
>  arch/arm/mach-s5pv210/clock.c|6 ++
>  arch/arm/mach-s5pv210/include/mach/iic-hdmiphy.h |   16 ++
>  arch/arm/mach-s5pv210/include/mach/irqs.h|2 +-
>  arch/arm/mach-s5pv210/include/mach/map.h |3 +
>  arch/arm/plat-s5p/Kconfig|5 ++
>  arch/arm/plat-s5p/Makefile   |1 +
>  arch/arm/plat-s5p/dev-i2c-hdmiphy.c  |   59
> ++
>  arch/arm/plat-samsung/include/plat/devs.h|1 +
>  arch/arm/plat-samsung/include/plat/iic.h |1 +
>  13 files changed, 121 insertions(+), 1 deletions(-)
>  create mode 100644 arch/arm/mach-exynos4/include/mach/iic-hdmiphy.h
>  create mode 100644 arch/arm/mach-s5pv210/include/mach/iic-hdmiphy.h
>  create mode 100644 arch/arm/plat-s5p/dev-i2c-hdmiphy.c
> 

(snip)

> +#ifndef PLAT_S5P_IIC_HDMIPHY_H_
> +#define PLAT_S5P_IIC_HDMIPHY_H_

Marek, how about to use 'I2C' instead of 'IIC'?
I think, we can use it now even thouhg IIC/iic is still used...

And I don't think we should change the old regarding files..  if required, I
will do it.

> +
> +#define S5P_IIC_HDMIPHY_BUS_NUM  (8)

Same as above.

(snip)

Thanks.

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

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


RE: [PATCH] ARM: Exynos4: enable frame buffer on Universal C210 board

2011-08-11 Thread Kukjin Kim
Marek Szyprowski wrote:
> 
> This patch adds platform definitions to enable s3c-fb driver.
> Framebuffer window with 480x800x16bpp mode has been defined.
> 
> Signed-off-by: Marek Szyprowski 
> Signed-off-by: Kyungmin Park 
> ---
>  arch/arm/mach-exynos4/Kconfig   |2 +
>  arch/arm/mach-exynos4/mach-universal_c210.c |   34
> +++
>  2 files changed, 36 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mach-exynos4/Kconfig b/arch/arm/mach-exynos4/Kconfig
> index 9d62e13..5b01605 100644
> --- a/arch/arm/mach-exynos4/Kconfig
> +++ b/arch/arm/mach-exynos4/Kconfig
> @@ -178,6 +178,7 @@ config MACH_UNIVERSAL_C210
>   select S5P_DEV_FIMC1
>   select S5P_DEV_FIMC2
>   select S5P_DEV_FIMC3
> + select S5P_DEV_FIMD0
>   select S3C_DEV_HSMMC
>   select S3C_DEV_HSMMC2
>   select S3C_DEV_HSMMC3
> @@ -187,6 +188,7 @@ config MACH_UNIVERSAL_C210
>   select S5P_DEV_MFC
>   select S5P_DEV_ONENAND
>   select EXYNOS4_DEV_PD
> + select EXYNOS4_SETUP_FIMD0
>   select EXYNOS4_SETUP_I2C1
>   select EXYNOS4_SETUP_I2C3
>   select EXYNOS4_SETUP_I2C5
> diff --git a/arch/arm/mach-exynos4/mach-universal_c210.c b/arch/arm/mach-
> exynos4/mach-universal_c210.c
> index 0e280d1..307ef98 100644
> --- a/arch/arm/mach-exynos4/mach-universal_c210.c
> +++ b/arch/arm/mach-exynos4/mach-universal_c210.c
> @@ -13,6 +13,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
>  #include 
>  #include 
>  #include 
> @@ -31,9 +32,11 @@
>  #include 
>  #include 
>  #include 
> +#include 
>  #include 
>  #include 
>  #include 
> +#include 
> 
>  #include 
> 
> @@ -702,6 +705,32 @@ static struct i2c_board_info i2c1_devs[] __initdata =
{
>   /* Gyro, To be updated */
>  };
> 
> +/* Frame Buffer */
> +static struct s3c_fb_pd_win universal_fb_win0 = {
> + .win_mode = {
> + .left_margin= 16,
> + .right_margin   = 16,
> + .upper_margin   = 2,
> + .lower_margin   = 28,
> + .hsync_len  = 2,
> + .vsync_len  = 1,
> + .xres   = 480,
> + .yres   = 800,
> + .refresh= 55,
> + },
> + .max_bpp= 32,
> + .default_bpp= 16,
> +};
> +
> +static struct s3c_fb_platdata universal_lcd_pdata __initdata = {
> + .win[0] = &universal_fb_win0,
> + .vidcon0= VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB |
> +   VIDCON0_CLKSEL_LCD,
> + .vidcon1= VIDCON1_INV_VCLK | VIDCON1_INV_VDEN
> +   | VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
> + .setup_gpio = exynos4_fimd0_gpio_setup_24bpp,
> +};
> +
>  static struct platform_device *universal_devices[] __initdata = {
>   /* Samsung Platform Devices */
>   &s5p_device_fimc0,
> @@ -719,10 +748,12 @@ static struct platform_device *universal_devices[]
> __initdata = {
>   &i2c_gpio12,
>   &universal_gpio_keys,
>   &s5p_device_onenand,
> + &s5p_device_fimd0,
>   &s5p_device_mfc,
>   &s5p_device_mfc_l,
>   &s5p_device_mfc_r,
>   &exynos4_device_pd[PD_MFC],
> + &exynos4_device_pd[PD_LCD0],
>  };
> 
>  static void __init universal_map_io(void)
> @@ -751,6 +782,8 @@ static void __init universal_machine_init(void)
>   s3c_i2c5_set_platdata(NULL);
>   i2c_register_board_info(5, i2c5_devs, ARRAY_SIZE(i2c5_devs));
> 
> + s5p_fimd0_set_platdata(&universal_lcd_pdata);
> +
>   universal_touchkey_init();
>   i2c_register_board_info(I2C_GPIO_BUS_12, i2c_gpio12_devs,
>   ARRAY_SIZE(i2c_gpio12_devs));
> @@ -758,6 +791,7 @@ static void __init universal_machine_init(void)
>   /* Last */
>   platform_add_devices(universal_devices,
> ARRAY_SIZE(universal_devices));
>   s5p_device_mfc.dev.parent = &exynos4_device_pd[PD_MFC].dev;
> + s5p_device_fimd0.dev.parent = &exynos4_device_pd[PD_LCD0].dev;
>  }
> 
>  MACHINE_START(UNIVERSAL_C210, "UNIVERSAL_C210")
> --
> 1.7.1.569.g6f426

OK, will apply.

But I'm not sure we really need to add inclusion of  in this
file...

Thanks.

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

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


RE: [PATCH] ARM: Exynos4: enable frame buffer on Nuri board

2011-08-11 Thread Kukjin Kim
Marek Szyprowski wrote:
> 
> This patch adds platform definitions to enable s3c-fb driver.
> Framebuffer window with 1280x800x16bpp mode has been defined.
> 
> Signed-off-by: Marek Szyprowski 
> Signed-off-by: Kyungmin Park 
> ---
>  arch/arm/mach-exynos4/Kconfig |2 ++
>  arch/arm/mach-exynos4/mach-nuri.c |   34
> ++
>  2 files changed, 36 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mach-exynos4/Kconfig b/arch/arm/mach-exynos4/Kconfig
> index 5b01605..c7219c1 100644
> --- a/arch/arm/mach-exynos4/Kconfig
> +++ b/arch/arm/mach-exynos4/Kconfig
> @@ -201,6 +201,7 @@ config MACH_NURI
>   bool "Mobile NURI Board"
>   select CPU_EXYNOS4210
>   select S3C_DEV_WDT
> + select S5P_DEV_FIMD0
>   select S3C_DEV_HSMMC
>   select S3C_DEV_HSMMC2
>   select S3C_DEV_HSMMC3
> @@ -210,6 +211,7 @@ config MACH_NURI
>   select S5P_DEV_MFC
>   select S5P_DEV_USB_EHCI
>   select EXYNOS4_DEV_PD
> + select EXYNOS4_SETUP_FIMD0
>   select EXYNOS4_SETUP_I2C1
>   select EXYNOS4_SETUP_I2C3
>   select EXYNOS4_SETUP_I2C5
> diff --git a/arch/arm/mach-exynos4/mach-nuri.c
b/arch/arm/mach-exynos4/mach-
> nuri.c
> index 43be71b..bbd13f4 100644
> --- a/arch/arm/mach-exynos4/mach-nuri.c
> +++ b/arch/arm/mach-exynos4/mach-nuri.c
> @@ -32,10 +32,12 @@
>  #include 
> 
>  #include 
> +#include 
>  #include 
>  #include 
>  #include 
>  #include 
> +#include 
>  #include 
>  #include 
>  #include 
> @@ -199,6 +201,33 @@ static struct platform_device nuri_gpio_keys = {
>   },
>  };
> 
> +/* Frame Buffer */
> +static struct s3c_fb_pd_win nuri_fb_win0 = {
> + .win_mode = {
> + .left_margin= 64,
> + .right_margin   = 16,
> + .upper_margin   = 64,
> + .lower_margin   = 1,
> + .hsync_len  = 48,
> + .vsync_len  = 3,
> + .xres   = 1280,
> + .yres   = 800,
> + .refresh= 60,
> + },
> + .max_bpp= 24,
> + .default_bpp= 16,
> + .virtual_x  = 1280,
> + .virtual_y  = 800,
> +};
> +
> +static struct s3c_fb_platdata nuri_fb_pdata __initdata = {
> + .win[0] = &nuri_fb_win0,
> + .vidcon0= VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB |
> +   VIDCON0_CLKSEL_LCD,
> + .vidcon1= VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
> + .setup_gpio = exynos4_fimd0_gpio_setup_24bpp,
> +};
> +
>  static void nuri_lcd_power_on(struct plat_lcd_data *pd, unsigned int
power)
>  {
>   int gpio = EXYNOS4_GPE1(5);
> @@ -1092,6 +1121,7 @@ static struct platform_device *nuri_devices[]
__initdata =
> {
>   /* Samsung Platform Devices */
>   &s3c_device_i2c5, /* PMIC should initialize first */
>   &emmc_fixed_voltage,
> + &s5p_device_fimd0,
>   &s3c_device_hsmmc0,
>   &s3c_device_hsmmc2,
>   &s3c_device_hsmmc3,
> @@ -1106,6 +1136,7 @@ static struct platform_device *nuri_devices[]
__initdata =
> {
>   &s5p_device_mfc_l,
>   &s5p_device_mfc_r,
>   &exynos4_device_pd[PD_MFC],
> + &exynos4_device_pd[PD_LCD0],
> 
>   /* NURI Devices */
>   &nuri_gpio_keys,
> @@ -1142,12 +1173,15 @@ static void __init nuri_machine_init(void)
>   i2c9_devs[I2C9_MAX17042].irq = gpio_to_irq(EXYNOS4_GPX2(3));
>   i2c_register_board_info(9, i2c9_devs, ARRAY_SIZE(i2c9_devs));
> 
> + s5p_fimd0_set_platdata(&nuri_fb_pdata);
> +
>   nuri_ehci_init();
>   clk_xusbxti.rate = 2400;
> 
>   /* Last */
>   platform_add_devices(nuri_devices, ARRAY_SIZE(nuri_devices));
>   s5p_device_mfc.dev.parent = &exynos4_device_pd[PD_MFC].dev;
> + s5p_device_fimd0.dev.parent = &exynos4_device_pd[PD_LCD0].dev;
>  }
> 
>  MACHINE_START(NURI, "NURI")
> --
> 1.7.1.569.g6f426

OK, applied.
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: Samsung: fix watchdog reset issue with clk_get()

2011-08-11 Thread Kukjin Kim
Marek Szyprowski wrote:
> 
> clkdev framework uses global mutex to protect clock tree, so it is not
> possible to call clk_get() in interrupt context. This patch fixes this
> issue and makes system reset by watchdog call working again.
> 
> Signed-off-by: Marek Szyprowski 
> Signed-off-by: Kyungmin Park 
> ---
>  arch/arm/mach-exynos4/clock.c  |1 +
>  arch/arm/mach-s3c2412/clock.c  |1 +
>  arch/arm/mach-s3c2416/clock.c  |2 +-
>  arch/arm/mach-s3c2443/clock.c  |1 +
>  arch/arm/mach-s3c64xx/clock.c  |1 +
>  arch/arm/mach-s5p64x0/cpu.c|2 ++
>  arch/arm/mach-s5pc100/clock.c  |1 +
>  arch/arm/mach-s5pv210/clock.c  |1 +
>  arch/arm/plat-s3c24xx/s3c2410-clock.c  |1 +
>  arch/arm/plat-samsung/clock.c  |9 +
>  arch/arm/plat-samsung/include/plat/clock.h |2 ++
>  .../arm/plat-samsung/include/plat/watchdog-reset.h |   10 +++---
>  12 files changed, 24 insertions(+), 8 deletions(-)
> 

(snip)

> +void s3c_wdt_reset_init(void)
+void __init s3c_wdt_reset_init(void)

(snip)

> +extern void s3c_wdt_reset_init(void);
+extern void __init s3c_wdt_reset_init(void);

(snip)

Thanks.

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

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


RE: [PATCH 11/13] ARM: gpio: consolidate trivial gpiolib implementations

2011-08-11 Thread Kukjin Kim
Russell King - ARM Linux wrote:
> 
> Consolidate 24 trivial gpiolib implementions out of mach/gpio.h
> into asm/gpio.h.  This is basically the include of asm-generic/gpio.h
> and the definition of gpio_get_value, gpio_set_value, and gpio_cansleep
> as described in Documentation/gpio.txt
> 
> Signed-off-by: Russell King 

Acked-by: Kukjin Kim 
on following Samsung stuff...

As a note, there were duplicated e-mail address Grant and Nicolas in Cc ;)
I just pushed 'reply all' :)

Thanks.

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

> ---
>  arch/arm/include/asm/gpio.h |   10 ++
...
>  arch/arm/mach-exynos4/include/mach/gpio.h   |5 +
...
>  arch/arm/mach-s3c2410/include/mach/gpio.h   |5 +
>  arch/arm/mach-s3c64xx/include/mach/gpio.h   |6 +-
>  arch/arm/mach-s5p64x0/include/mach/gpio.h   |6 +-
>  arch/arm/mach-s5pc100/include/mach/gpio.h   |6 +-
>  arch/arm/mach-s5pv210/include/mach/gpio.h   |6 +-
> 
> diff --git a/arch/arm/include/asm/gpio.h b/arch/arm/include/asm/gpio.h
> index 166a7a3..15e8970 100644
> --- a/arch/arm/include/asm/gpio.h
> +++ b/arch/arm/include/asm/gpio.h
> @@ -4,4 +4,14 @@
>  /* not all ARM platforms necessarily support this API ... */
>  #include 
> 
> +#ifdef __ARM_GPIOLIB_TRIVIAL
> +/* Note: this may rely upon the value of ARCH_NR_GPIOS set in mach/gpio.h
*/
> +#include 
> +
> +/* The trivial gpiolib dispatchers */
> +#define gpio_get_value  __gpio_get_value
> +#define gpio_set_value  __gpio_set_value
> +#define gpio_cansleep   __gpio_cansleep
> +#endif
> +
>  #endif /* _ARCH_ARM_GPIO_H */
> diff --git a/arch/arm/mach-exynos4/include/mach/gpio.h b/arch/arm/mach-
> exynos4/include/mach/gpio.h
> index be9266b..b2e3595 100644
> --- a/arch/arm/mach-exynos4/include/mach/gpio.h
> +++ b/arch/arm/mach-exynos4/include/mach/gpio.h
> @@ -13,9 +13,6 @@
>  #ifndef __ASM_ARCH_GPIO_H
>  #define __ASM_ARCH_GPIO_H __FILE__
> 
> -#define gpio_get_value   __gpio_get_value
> -#define gpio_set_value   __gpio_set_value
> -#define gpio_cansleep__gpio_cansleep
>  #define gpio_to_irq  __gpio_to_irq
> 
>  /* Practically, GPIO banks up to GPZ are the configurable gpio banks */
> @@ -151,6 +148,6 @@ enum s5p_gpio_number {
>  #define ARCH_NR_GPIOS
>   (EXYNOS4_GPZ(EXYNOS4_GPIO_Z_NR) +   \
>CONFIG_SAMSUNG_GPIO_EXTRA + 1)
> 
> -#include 
> +#define __ARM_GPIOLIB_TRIVIAL
> 
>  #endif /* __ASM_ARCH_GPIO_H */

> diff --git a/arch/arm/mach-s3c2410/include/mach/gpio.h b/arch/arm/mach-
> s3c2410/include/mach/gpio.h
> index f7f6b07..998ef4c 100644
> --- a/arch/arm/mach-s3c2410/include/mach/gpio.h
> +++ b/arch/arm/mach-s3c2410/include/mach/gpio.h
> @@ -11,9 +11,7 @@
>   * published by the Free Software Foundation.
>  */
> 
> -#define gpio_get_value   __gpio_get_value
> -#define gpio_set_value   __gpio_set_value
> -#define gpio_cansleep__gpio_cansleep
> +#define __ARM_GPIOLIB_TRIVIAL
>  #define gpio_to_irq  __gpio_to_irq
> 
>  /* some boards require extra gpio capacity to support external
> @@ -28,7 +26,6 @@
>  #define ARCH_NR_GPIOS(256 + CONFIG_S3C24XX_GPIO_EXTRA)
>  #endif
> 
> -#include 
>  #include 
>  #include 
> 
> diff --git a/arch/arm/mach-s3c64xx/include/mach/gpio.h b/arch/arm/mach-
> s3c64xx/include/mach/gpio.h
> index 0d46e99..6958b3f 100644
> --- a/arch/arm/mach-s3c64xx/include/mach/gpio.h
> +++ b/arch/arm/mach-s3c64xx/include/mach/gpio.h
> @@ -12,9 +12,7 @@
>   * published by the Free Software Foundation.
>  */
> 
> -#define gpio_get_value   __gpio_get_value
> -#define gpio_set_value   __gpio_set_value
> -#define gpio_cansleep__gpio_cansleep
> +#define __ARM_GPIOLIB_TRIVIAL
>  #define gpio_to_irq  __gpio_to_irq
> 
>  /* GPIO bank sizes */
> @@ -96,5 +94,3 @@ enum s3c_gpio_number {
>  #define BOARD_NR_GPIOS 16
> 
>  #define ARCH_NR_GPIOS(GPIO_BOARD_START + BOARD_NR_GPIOS)
> -
> -#include 
> diff --git a/arch/arm/mach-s5p64x0/include/mach/gpio.h b/arch/arm/mach-
> s5p64x0/include/mach/gpio.h
> index adb5f29..a25160b 100644
> --- a/arch/arm/mach-s5p64x0/include/mach/gpio.h
> +++ b/arch/arm/mach-s5p64x0/include/mach/gpio.h
> @@ -13,9 +13,7 @@
>  #ifndef __ASM_ARCH_GPIO_H
>  #define __ASM_ARCH_GPIO_H __FILE__
> 
> -#define gpio_get_value   __gpio_get_value
> -#define gpio_set_value   __gpio_set_value
> -#define gpio_cansleep__gpio_cansleep
> +#define __ARM_GPIOLIB_TRIVIAL
>  #define gpio_to_irq  __gpio_to_irq
> 
>  /* GPIO bank sizes */
> @@ -134,6 +132,4 @@ enum s5p6450_gpio_number {
> 

RE: [PATCH 12/13] ARM: gpio: consolidate gpio_to_irq

2011-08-11 Thread Kukjin Kim
Russell King - ARM Linux wrote:
> 
> Many of the gpio_to_irq implementations use the gpiolib version of this
> function.  Provide the standard gpiolib gpio_to_irq() for everyone, but
> allow platforms to override it if they wish.  Add the neccessary
> overrides for those platforms which do not use the standard definition.
> 
> Signed-off-by: Russell King 

Acked-by: Kukjin Kim 

on following Samsung stuff :)

Thanks.

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

> ---
>  arch/arm/include/asm/gpio.h |9 +

>  arch/arm/mach-exynos4/include/mach/gpio.h   |2 --

>  arch/arm/mach-s3c2410/include/mach/gpio.h   |1 -
>  arch/arm/mach-s3c64xx/include/mach/gpio.h   |1 -
>  arch/arm/mach-s5p64x0/include/mach/gpio.h   |1 -
>  arch/arm/mach-s5pc100/include/mach/gpio.h   |1 -
>  arch/arm/mach-s5pv210/include/mach/gpio.h   |1 -
> 
> diff --git a/arch/arm/include/asm/gpio.h b/arch/arm/include/asm/gpio.h
> index 15e8970..5032224 100644
> --- a/arch/arm/include/asm/gpio.h
> +++ b/arch/arm/include/asm/gpio.h
> @@ -14,4 +14,13 @@
>  #define gpio_cansleep   __gpio_cansleep
>  #endif
> 
> +/*
> + * Provide a default gpio_to_irq() which should satisfy every case.
> + * However, some platforms want to do this differently, so allow them
> + * to override it.
> + */
> +#ifndef gpio_to_irq
> +#define gpio_to_irq  __gpio_to_irq
> +#endif
> +
>  #endif /* _ARCH_ARM_GPIO_H */

> diff --git a/arch/arm/mach-exynos4/include/mach/gpio.h b/arch/arm/mach-
> exynos4/include/mach/gpio.h
> index b2e3595..b91e8b2 100644
> --- a/arch/arm/mach-exynos4/include/mach/gpio.h
> +++ b/arch/arm/mach-exynos4/include/mach/gpio.h
> @@ -13,8 +13,6 @@
>  #ifndef __ASM_ARCH_GPIO_H
>  #define __ASM_ARCH_GPIO_H __FILE__
> 
> -#define gpio_to_irq  __gpio_to_irq
> -
>  /* Practically, GPIO banks up to GPZ are the configurable gpio banks */
> 
>  /* GPIO bank sizes */

> diff --git a/arch/arm/mach-s3c2410/include/mach/gpio.h b/arch/arm/mach-
> s3c2410/include/mach/gpio.h
> index 998ef4c..d502d17 100644
> --- a/arch/arm/mach-s3c2410/include/mach/gpio.h
> +++ b/arch/arm/mach-s3c2410/include/mach/gpio.h
> @@ -12,7 +12,6 @@
>  */
> 
>  #define __ARM_GPIOLIB_TRIVIAL
> -#define gpio_to_irq  __gpio_to_irq
> 
>  /* some boards require extra gpio capacity to support external
>   * devices that need GPIO.
> diff --git a/arch/arm/mach-s3c64xx/include/mach/gpio.h b/arch/arm/mach-
> s3c64xx/include/mach/gpio.h
> index 6958b3f..3a8857c 100644
> --- a/arch/arm/mach-s3c64xx/include/mach/gpio.h
> +++ b/arch/arm/mach-s3c64xx/include/mach/gpio.h
> @@ -13,7 +13,6 @@
>  */
> 
>  #define __ARM_GPIOLIB_TRIVIAL
> -#define gpio_to_irq  __gpio_to_irq
> 
>  /* GPIO bank sizes */
>  #define S3C64XX_GPIO_A_NR(8)
> diff --git a/arch/arm/mach-s5p64x0/include/mach/gpio.h b/arch/arm/mach-
> s5p64x0/include/mach/gpio.h
> index a25160b..c3a6aa0 100644
> --- a/arch/arm/mach-s5p64x0/include/mach/gpio.h
> +++ b/arch/arm/mach-s5p64x0/include/mach/gpio.h
> @@ -14,7 +14,6 @@
>  #define __ASM_ARCH_GPIO_H __FILE__
> 
>  #define __ARM_GPIOLIB_TRIVIAL
> -#define gpio_to_irq  __gpio_to_irq
> 
>  /* GPIO bank sizes */
> 
> diff --git a/arch/arm/mach-s5pc100/include/mach/gpio.h b/arch/arm/mach-
> s5pc100/include/mach/gpio.h
> index f515bfb..0e75641 100644
> --- a/arch/arm/mach-s5pc100/include/mach/gpio.h
> +++ b/arch/arm/mach-s5pc100/include/mach/gpio.h
> @@ -16,7 +16,6 @@
>  #define __ASM_ARCH_GPIO_H __FILE__
> 
>  #define __ARM_GPIOLIB_TRIVIAL
> -#define gpio_to_irq  __gpio_to_irq
> 
>  /* GPIO bank sizes */
>  #define S5PC100_GPIO_A0_NR   (8)
> diff --git a/arch/arm/mach-s5pv210/include/mach/gpio.h b/arch/arm/mach-
> s5pv210/include/mach/gpio.h
> index 27f2139..d348ee2 100644
> --- a/arch/arm/mach-s5pv210/include/mach/gpio.h
> +++ b/arch/arm/mach-s5pv210/include/mach/gpio.h
> @@ -14,7 +14,6 @@
>  #define __ASM_ARCH_GPIO_H __FILE__
> 
>  #define __ARM_GPIOLIB_TRIVIAL
> -#define gpio_to_irq  __gpio_to_irq
> 
>  /* Practically, GPIO banks up to MP03 are the configurable gpio banks */
>

--
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 13/13] ARM: gpio: make trivial GPIOLIB implementation the default

2011-08-11 Thread Kukjin Kim
Russell King - ARM Linux wrote:
> 
> Rather than marking the mach/gpio.h header files which want to use the
> trivial GPIOLIB implementation, mark those which do not want to use it
> instead.  This means that by default, you get the trivial implementation
> and only have to do something extra if you need to.  This should
> encourage the use of the trivial default implementation.
> 
> As an additional bonus, several gpio.h header files become empty.
> 
> Signed-off-by: Russell King 

Looks good to me :)

Acked-by: Kukjin Kim 

on following Samsung stuff...

Thanks.

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

> ---
>  arch/arm/include/asm/gpio.h |2 +-

>  arch/arm/mach-exynos4/include/mach/gpio.h   |2 --

>  arch/arm/mach-s3c2410/include/mach/gpio.h   |2 --
>  arch/arm/mach-s3c64xx/include/mach/gpio.h   |2 --
>  arch/arm/mach-s5p64x0/include/mach/gpio.h   |2 --
>  arch/arm/mach-s5pc100/include/mach/gpio.h   |2 --
>  arch/arm/mach-s5pv210/include/mach/gpio.h   |2 --
> 
> diff --git a/arch/arm/include/asm/gpio.h b/arch/arm/include/asm/gpio.h
> index 5032224..11ad0bf 100644
> --- a/arch/arm/include/asm/gpio.h
> +++ b/arch/arm/include/asm/gpio.h
> @@ -4,7 +4,7 @@
>  /* not all ARM platforms necessarily support this API ... */
>  #include 
> 
> -#ifdef __ARM_GPIOLIB_TRIVIAL
> +#ifndef __ARM_GPIOLIB_COMPLEX
>  /* Note: this may rely upon the value of ARCH_NR_GPIOS set in mach/gpio.h
*/
>  #include 
> 

> diff --git a/arch/arm/mach-exynos4/include/mach/gpio.h b/arch/arm/mach-
> exynos4/include/mach/gpio.h
> index b91e8b2..80523ca 100644
> --- a/arch/arm/mach-exynos4/include/mach/gpio.h
> +++ b/arch/arm/mach-exynos4/include/mach/gpio.h
> @@ -146,6 +146,4 @@ enum s5p_gpio_number {
>  #define ARCH_NR_GPIOS
>   (EXYNOS4_GPZ(EXYNOS4_GPIO_Z_NR) +   \
>CONFIG_SAMSUNG_GPIO_EXTRA + 1)
> 
> -#define __ARM_GPIOLIB_TRIVIAL
> -
>  #endif /* __ASM_ARCH_GPIO_H */

> diff --git a/arch/arm/mach-s3c2410/include/mach/gpio.h b/arch/arm/mach-
> s3c2410/include/mach/gpio.h
> index d502d17..6fac70f 100644
> --- a/arch/arm/mach-s3c2410/include/mach/gpio.h
> +++ b/arch/arm/mach-s3c2410/include/mach/gpio.h
> @@ -11,8 +11,6 @@
>   * published by the Free Software Foundation.
>  */
> 
> -#define __ARM_GPIOLIB_TRIVIAL
> -
>  /* some boards require extra gpio capacity to support external
>   * devices that need GPIO.
>   */
> diff --git a/arch/arm/mach-s3c64xx/include/mach/gpio.h b/arch/arm/mach-
> s3c64xx/include/mach/gpio.h
> index 3a8857c..6e34c2f 100644
> --- a/arch/arm/mach-s3c64xx/include/mach/gpio.h
> +++ b/arch/arm/mach-s3c64xx/include/mach/gpio.h
> @@ -12,8 +12,6 @@
>   * published by the Free Software Foundation.
>  */
> 
> -#define __ARM_GPIOLIB_TRIVIAL
> -
>  /* GPIO bank sizes */
>  #define S3C64XX_GPIO_A_NR(8)
>  #define S3C64XX_GPIO_B_NR(7)
> diff --git a/arch/arm/mach-s5p64x0/include/mach/gpio.h b/arch/arm/mach-
> s5p64x0/include/mach/gpio.h
> index c3a6aa0..06cd3c9 100644
> --- a/arch/arm/mach-s5p64x0/include/mach/gpio.h
> +++ b/arch/arm/mach-s5p64x0/include/mach/gpio.h
> @@ -13,8 +13,6 @@
>  #ifndef __ASM_ARCH_GPIO_H
>  #define __ASM_ARCH_GPIO_H __FILE__
> 
> -#define __ARM_GPIOLIB_TRIVIAL
> -
>  /* GPIO bank sizes */
> 
>  #define S5P6440_GPIO_A_NR(6)
> diff --git a/arch/arm/mach-s5pc100/include/mach/gpio.h b/arch/arm/mach-
> s5pc100/include/mach/gpio.h
> index 0e75641..5e1a924 100644
> --- a/arch/arm/mach-s5pc100/include/mach/gpio.h
> +++ b/arch/arm/mach-s5pc100/include/mach/gpio.h
> @@ -15,8 +15,6 @@
>  #ifndef __ASM_ARCH_GPIO_H
>  #define __ASM_ARCH_GPIO_H __FILE__
> 
> -#define __ARM_GPIOLIB_TRIVIAL
> -
>  /* GPIO bank sizes */
>  #define S5PC100_GPIO_A0_NR   (8)
>  #define S5PC100_GPIO_A1_NR   (5)
> diff --git a/arch/arm/mach-s5pv210/include/mach/gpio.h b/arch/arm/mach-
> s5pv210/include/mach/gpio.h
> index d348ee2..6c8b903 100644
> --- a/arch/arm/mach-s5pv210/include/mach/gpio.h
> +++ b/arch/arm/mach-s5pv210/include/mach/gpio.h
> @@ -13,8 +13,6 @@
>  #ifndef __ASM_ARCH_GPIO_H
>  #define __ASM_ARCH_GPIO_H __FILE__
> 
> -#define __ARM_GPIOLIB_TRIVIAL
> -
>  /* Practically, GPIO banks up to MP03 are the configurable gpio banks */
> 
>  /* GPIO bank sizes */

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


RE: [PATCH] ARM: EXYNOS4: Update config file of NURI to enable RTC

2011-08-12 Thread Kukjin Kim
Chanwoo Choi wrote:
> 
> This patch update config file of NURI board to enable RTC
> 
> Signed-off-by: Chanwoo Choi 
> Signed-off-by: Kyungmin Park 
> ---
>  arch/arm/mach-exynos4/Kconfig |1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mach-exynos4/Kconfig b/arch/arm/mach-exynos4/Kconfig
> index b735705..bb675fb 100644
> --- a/arch/arm/mach-exynos4/Kconfig
> +++ b/arch/arm/mach-exynos4/Kconfig
> @@ -184,6 +184,7 @@ config MACH_NURI
>   bool "Mobile NURI Board"
>   select CPU_EXYNOS4210
>   select S3C_DEV_WDT
> + select S3C_DEV_RTC
>   select S3C_DEV_HSMMC
>   select S3C_DEV_HSMMC2
>   select S3C_DEV_HSMMC3
> --
> 1.7.0.4

Applied, thanks.

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

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


RE: [PATCH] ARM: EXYNOS4: Fix wrong devname to support clkdev

2011-08-12 Thread Kukjin Kim
jhbird.c...@samsung.com wrote:
> 
> From: Jonghwan Choi 
> 
> Signed-off-by: Jonghwan Choi 
> ---
>  arch/arm/mach-exynos4/clock.c |2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/arm/mach-exynos4/clock.c b/arch/arm/mach-exynos4/clock.c
> index 66494f2..8e9699e 100644
> --- a/arch/arm/mach-exynos4/clock.c
> +++ b/arch/arm/mach-exynos4/clock.c
> @@ -520,7 +520,7 @@ static struct clk init_clocks_off[] = {
>   .ctrlbit= (1 << 21),
>   }, {
>   .name   = "ac97",
> - .id = -1,
> + .devname= "samsung-ac97",
>   .enable = exynos4_clk_ip_peril_ctrl,
>   .ctrlbit= (1 << 27),
>   }, {
> --
> 1.7.1

OK, applied.
Thanks.

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

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


RE: [PATCH] ARM: EXYNOS4: Enable MFC on Samsung SMDKV310

2011-08-12 Thread Kukjin Kim
Sachin Kamat wrote:
> 
> Signed-off-by: Sachin Kamat 
> ---
> 
> This patch is based on Kukjin's for-arm-soc branch.
> 
>  arch/arm/mach-exynos4/Kconfig |1 +
>  arch/arm/mach-exynos4/mach-smdkv310.c |   11 +++
>  2 files changed, 12 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mach-exynos4/Kconfig b/arch/arm/mach-exynos4/Kconfig
> index 9d62e13..8da2960 100644
> --- a/arch/arm/mach-exynos4/Kconfig
> +++ b/arch/arm/mach-exynos4/Kconfig
> @@ -139,6 +139,7 @@ config MACH_SMDKV310
>   select S3C_DEV_RTC
>   select S3C_DEV_WDT
>   select S3C_DEV_I2C1
> + select S5P_DEV_MFC
>   select S3C_DEV_HSMMC
>   select S3C_DEV_HSMMC1
>   select S3C_DEV_HSMMC2
> diff --git a/arch/arm/mach-exynos4/mach-smdkv310.c b/arch/arm/mach-
> exynos4/mach-smdkv310.c
> index ea41495..2a128f4 100644
> --- a/arch/arm/mach-exynos4/mach-smdkv310.c
> +++ b/arch/arm/mach-exynos4/mach-smdkv310.c
> @@ -32,6 +32,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
> 
>  #include 
> 
> @@ -177,6 +178,9 @@ static struct platform_device *smdkv310_devices[]
> __initdata = {
>   &exynos4_device_ac97,
>   &exynos4_device_i2s0,
>   &samsung_device_keypad,
> + &s5p_device_mfc,
> + &s5p_device_mfc_l,
> + &s5p_device_mfc_r,
>   &exynos4_device_pd[PD_MFC],
>   &exynos4_device_pd[PD_G3D],
>   &exynos4_device_pd[PD_LCD0],
> @@ -233,6 +237,11 @@ static void __init smdkv310_map_io(void)
>   s3c24xx_init_uarts(smdkv310_uartcfgs,
> ARRAY_SIZE(smdkv310_uartcfgs));
>  }
> 
> +static void __init smdkv310_reserve(void)
> +{
> + s5p_mfc_reserve_mem(0x4300, 8 << 20, 0x5100, 8 << 20);
> +}
> +
>  static void __init smdkv310_machine_init(void)
>  {
>   s3c_i2c1_set_platdata(NULL);
> @@ -250,6 +259,7 @@ static void __init smdkv310_machine_init(void)
>   samsung_bl_set(&smdkv310_bl_gpio_info, &smdkv310_bl_data);
> 
>   platform_add_devices(smdkv310_devices,
> ARRAY_SIZE(smdkv310_devices));
> + s5p_device_mfc.dev.parent = &exynos4_device_pd[PD_MFC].dev;
>  }
> 
>  MACHINE_START(SMDKV310, "SMDKV310")
> @@ -260,4 +270,5 @@ MACHINE_START(SMDKV310, "SMDKV310")
>   .map_io = smdkv310_map_io,
>   .init_machine   = smdkv310_machine_init,
>   .timer  = &exynos4_timer,
> + .reserve= &smdkv310_reserve,
>  MACHINE_END
> --
> 1.7.4.1

OK, applied.
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: [RFC][PATCH] serial: samsung: Use single interrupt handler for s3c64xx and higher SoC's

2011-08-12 Thread Kukjin Kim
Thomas Abraham wrote:
> 
> s3c64xx and higher SoC's include the interrupt mask and pending registers
> in the uart controller, unlike the s3c24xx SoC's which have these
registers
> in the interrupt controller. When the mask and pending registers are part
> of the uart controller, it is easier to manage interrupts with a single
> interrupt rather than having to create 3 seperate tx/rx/err interrupts.
> 
> This patch modifies the tx/rx/err uart interrupt handling for s3c64xx
> SoC's and higher by registering a single interrupt handler. This makes
> it easier to add device tree support as well.
> 
> Suggested-by: Grant Likely 
> CC: Ben Dooks 
> Signed-off-by: Thomas Abraham 
> ---
> Tested on Exynos4 smdkv310 only. If this approach is acceptable, it will
be
> tested it on s3c64xx and all s5p SoC's (should work on all as the changes
> are generic). This is a bulky patch but it will split into smaller patches
> if the approach is acceptable.
> 
Hi Thomas,

Hmm, could you please test this on other boards before split?
And I need to check whether this is available on s3c24xx SoCs 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] ARM: EXYNOS4: Fix the IRQ definitions for MIPI CSIS device

2011-08-12 Thread Kukjin Kim
Sergei Shtylyov wrote:
> 
> Hello.
> 
> On 08-08-2011 17:11, Sylwester Nawrocki wrote:
> 
> > This is a regression fix after migration to the external GIC.
> > The breakage has been introduced in commit:
> > "ARM: EXYNOS4: modify interrupt mappings for external GIC"
> 
> Would be good to also cite that commit's ID for gitweb.
> 
Yes, I think so :)

Sylwester,
This is required now so I added commit id when I applied.

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 0/2] Fixes for S5PV210 PM

2011-08-12 Thread Kukjin Kim
Abhilash Kesavan wrote:
> 
> This patchset fixes a compilation warning and removes an unwanted
> Kconfig symbol.
> 
> Abhilash Kesavan (2):
>   ARM: S5PV210: Fix build warning
>   ARM: S5PV210: Remove unncessary symbol for PM
> 
>  arch/arm/mach-s5pv210/Kconfig  |6 --
>  arch/arm/mach-s5pv210/Makefile |2 +-
>  arch/arm/mach-s5pv210/pm.c |2 +-
>  3 files changed, 2 insertions(+), 8 deletions(-)
> 
> --
> 1.7.4.1

Looks ok, applied.
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: Fix build break in PM debug

2011-08-12 Thread Kukjin Kim
Abhilash Kesavan wrote:
> 
> When S3C_PM_DEBUG_LED_SMDK is enabled for suspend/resume debugging,
> the following
> compilation error occurs:
> 
> arch/arm/mach-s3c64xx/pm.c: In function 's3c_pm_debug_smdkled':
> arch/arm/mach-s3c64xx/pm.c:41: error: implicit declaration of function
> 'gpio_set_value'
> arch/arm/mach-s3c64xx/pm.c:41: error: implicit declaration of function
> 'S3C64XX_GPN'
> arch/arm/mach-s3c64xx/pm.c: In function 's3c64xx_pm_init':
> arch/arm/mach-s3c64xx/pm.c:184: error: implicit declaration of function
> 'gpio_request'
> arch/arm/mach-s3c64xx/pm.c:188: error: implicit declaration of function
> 'gpio_direction_output'
> 
> Fix the error by including linux/gpio.h
> 
> Signed-off-by: Abhilash Kesavan 
> ---
>  arch/arm/mach-s3c64xx/pm.c |1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mach-s3c64xx/pm.c b/arch/arm/mach-s3c64xx/pm.c
> index 8bad643..055e285 100644
> --- a/arch/arm/mach-s3c64xx/pm.c
> +++ b/arch/arm/mach-s3c64xx/pm.c
> @@ -16,6 +16,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
> 
>  #include 
>  #include 
> --
> 1.6.6.1

OK, applied.
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 0/2] Chained irq fixes

2011-08-12 Thread Kukjin Kim
Marek Szyprowski wrote:
> 
> Hello,
> 
> It looks that the chained IRQ enter/exit functions are missing in more
> places. This short patch series fixes all chained irq usage on Exynos4
> platform.
> 
> Best regards
> Marek Szyprowski
> Samsung Poland R&D Center
> 
> 
> Summary:
> 
> Marek Szyprowski (2):
>   ARM: Exynos4: add required chained_irq_enter/exit to eint code
>   ARM: S5P: add required chained_irq_enter/exit to gpio-int code
> 
>  arch/arm/mach-exynos4/irq-eint.c |7 +++
>  arch/arm/plat-s5p/irq-gpioint.c  |6 ++
>  2 files changed, 13 insertions(+), 0 deletions(-)
> 
> --
> 1.7.1.569.g6f426

OK, applied.
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 V5 00/15] To use DMA generic APIs for Samsung DMA

2011-08-12 Thread Kukjin Kim
Koul, Vinod wrote:
> 
> On Thu, 2011-08-11 at 16:26 +0900, Kukjin Kim wrote:
> > Koul, Vinod wrote:
> > >
> > > On Thu, 2011-08-04 at 18:53 +0200, Linus Walleij wrote:
> > > > On Wed, Jul 27, 2011 at 7:31 AM, Boojin Kim 
> wrote:
> > > >
> > > > > This patchset adds support DMA generic APIs for Samsung DMA.
> > > >
> > > > Patches look good to me,
> > > > Acked-by: Linus Walleij 
> > >
> > > Acked-by: Vinod Koul 
> > >
> > > Do you want these to go thru slave-dma tree or arm tree, I am okay with
> > > either...
> >
> > Hi Vinod,
> >
> > Thanks.
> >
> > I'd like to keep its topic branch in my tree to avoid conflicts with other 
> > samsung
> stuff and I think, it should be merged into your slave-dma tree also for same
> reason.
> >
> > git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung.git 
> > #next/topic-
> dma-pl330
> >
> > Or if you want to make some branch for it in your tree, please let me know 
> > so
> that I can merge it in my tree also.
> Okay can you update this branch with latest patchset (I think there were
> few comments on last patchset). Once you add all acks let me know the
> branch, I will merge it to my next

Hi,

I updated it so that you can merge it to yours.
I think, if any fixing is required on that, it should be small so can be fixed 
easily after this merging.

If any problems, please let me know :)

Thanks.

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

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


RE: [PATCH] ARM: EXYNOS4: Increase reset delay for USB HOST PHY

2011-08-18 Thread Kukjin Kim
Jingoo Han wrote:
> 
> From: Yulgon Kim 
> 
> This patch increases reset delay from 50 usec to 80 usec for USB HOST PHY.
> In order to reset USB HOST PHY controller properly, a little extra time is
> required during its reset cycle.
> 
> Signed-off-by: Yulgon Kim 
> Signed-off-by: Jingoo Han 
> ---
>  arch/arm/mach-exynos4/setup-usb-phy.c |2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/arm/mach-exynos4/setup-usb-phy.c b/arch/arm/mach-
> exynos4/setup-usb-phy.c
> index 0883c1b..39aca04 100644
> --- a/arch/arm/mach-exynos4/setup-usb-phy.c
> +++ b/arch/arm/mach-exynos4/setup-usb-phy.c
> @@ -82,7 +82,7 @@ static int exynos4_usb_phy1_init(struct platform_device
> *pdev)
> 
>   rstcon &= ~(HOST_LINK_PORT_SWRST_MASK | PHY1_SWRST_MASK);
>   writel(rstcon, EXYNOS4_RSTCON);
> - udelay(50);
> + udelay(80);
> 
>   clk_disable(otg_clk);
>   clk_put(otg_clk);
> --
> 1.7.1

OK, will apply.
But I'm not sure why extra time is required on current kernel not on old
kernel...

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: Remove un-used code

2011-08-18 Thread Kukjin Kim
Banajit Goswami wrote:
> 
> Remove un-used backlight code for SMDK6410 board
> 
> Signed-off-by: Banajit Goswami 
> ---
>  arch/arm/mach-s3c64xx/mach-smdk6410.c |   39
-
>  1 files changed, 0 insertions(+), 39 deletions(-)
> 
> diff --git a/arch/arm/mach-s3c64xx/mach-smdk6410.c b/arch/arm/mach-
> s3c64xx/mach-smdk6410.c
> index ecbea92..a9f3183 100644
> --- a/arch/arm/mach-s3c64xx/mach-smdk6410.c
> +++ b/arch/arm/mach-s3c64xx/mach-smdk6410.c
> @@ -262,45 +262,6 @@ static struct samsung_keypad_platdata
> smdk6410_keypad_data __initdata = {
>   .cols   = 8,
>  };
> 
> -static int smdk6410_backlight_init(struct device *dev)
> -{
> - int ret;
> -
> - ret = gpio_request(S3C64XX_GPF(15), "Backlight");
> - if (ret) {
> - printk(KERN_ERR "failed to request GPF for PWM-OUT1\n");
> - return ret;
> - }
> -
> - /* Configure GPIO pin with S3C64XX_GPF15_PWM_TOUT1 */
> - s3c_gpio_cfgpin(S3C64XX_GPF(15), S3C_GPIO_SFN(2));
> -
> - return 0;
> -}
> -
> -static void smdk6410_backlight_exit(struct device *dev)
> -{
> - s3c_gpio_cfgpin(S3C64XX_GPF(15), S3C_GPIO_OUTPUT);
> - gpio_free(S3C64XX_GPF(15));
> -}
> -
> -static struct platform_pwm_backlight_data smdk6410_backlight_data = {
> - .pwm_id = 1,
> - .max_brightness = 255,
> - .dft_brightness = 255,
> - .pwm_period_ns  = 78770,
> - .init   = smdk6410_backlight_init,
> - .exit   = smdk6410_backlight_exit,
> -};
> -
> -static struct platform_device smdk6410_backlight_device = {
> - .name   = "pwm-backlight",
> - .dev= {
> - .parent = &s3c_device_timer[1].dev,
> - .platform_data  = &smdk6410_backlight_data,
> - },
> -};
> -
>  static struct map_desc smdk6410_iodesc[] = {};
> 
>  static struct platform_device *smdk6410_devices[] __initdata = {
> --
> 1.7.2.3

OK, applied.
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 0/2] Remove hw_addr dma leftovers from S3C24xx machs

2011-08-18 Thread Kukjin Kim
Heiko Stübner wrote:
> 
> While trying to sort the dma for S3C2416 I stumbled open the hw_addr
> declarations in the other dma.c files.
> 
> It took me a while to figure out that they seem to be some sort
> of leftover, i.e. they are used in dma-pl080.c of the old Samsung
> kernels based on 2.6.21 but nowhere in current kernels.
> 
> Therefore I think removing this stuff is appropriate.
> 
> The patches apply against current linux-next and are
> compile-tested against s3c2410_defconfig and mini2440_defconfig.
> 
> Heiko Stuebner (2):
>   Remove hw_addr from s3c24XX dma channel declarations
>   Remove s3c24xx_dma_addr definition
> 
>  arch/arm/mach-s3c2410/dma.c  |   14 ---
>  arch/arm/mach-s3c2412/dma.c  |   18 --
>  arch/arm/mach-s3c2440/dma.c  |   17 -
>  arch/arm/mach-s3c2443/dma.c  |   27
--
>  arch/arm/plat-samsung/include/plat/dma-s3c24xx.h |6 -
>  5 files changed, 0 insertions(+), 82 deletions(-)
> 
> --
> 1.7.5.4

Good :)
Applied, 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 V5 00/15] To use DMA generic APIs for Samsung DMA

2011-08-18 Thread Kukjin Kim
Koul, Vinod wrote:
> 
> On Sat, 2011-08-13 at 13:11 +0900, Kukjin Kim wrote:
> > Koul, Vinod wrote:
> > >
> > > On Thu, 2011-08-11 at 16:26 +0900, Kukjin Kim wrote:
> > > > Koul, Vinod wrote:
> > > > >
> > > > > On Thu, 2011-08-04 at 18:53 +0200, Linus Walleij wrote:
> > > > > > On Wed, Jul 27, 2011 at 7:31 AM, Boojin Kim
> 
> > > wrote:
> > > > > >
> > > > > > > This patchset adds support DMA generic APIs for Samsung DMA.
> > > > > >
> > > > > > Patches look good to me,
> > > > > > Acked-by: Linus Walleij 
> > > > >
> > > > > Acked-by: Vinod Koul 
> > > > >
> > > > > Do you want these to go thru slave-dma tree or arm tree, I am okay 
> > > > > with
> > > > > either...
> > > >
> > > > Hi Vinod,
> > > >
> > > > Thanks.
> > > >
> > > > I'd like to keep its topic branch in my tree to avoid conflicts with 
> > > > other
> samsung
> > > stuff and I think, it should be merged into your slave-dma tree also for 
> > > same
> > > reason.
> > > >
> > > > git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung.git
> #next/topic-
> > > dma-pl330
> > > >
> > > > Or if you want to make some branch for it in your tree, please let me 
> > > > know so
> > > that I can merge it in my tree also.
> > > Okay can you update this branch with latest patchset (I think there were
> > > few comments on last patchset). Once you add all acks let me know the
> > > branch, I will merge it to my next
> >
> > Hi,
> >
> > I updated it so that you can merge it to yours.
> > I think, if any fixing is required on that, it should be small so can be 
> > fixed easily
> after this merging.
> >
> > If any problems, please let me know :)
> >
> Well, that not how things are supposed to be done. Fixing an error
> introduced is not recommended, rather original patch set should be
> fixed.
> Since you have already done 5 posting of your patch series, I am okay if
> you split things up, send me the parts that have already been reviewed
> and acked. I will host them on a branch for you. Once rest is reviewed
> and acked, I will merge this entire branch to my next.
> 
OK, Boojin will send whole series soon.
Then if you make a branch for me, I will merge it too.

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: SAMSUNG: Consolidate common function to set SDHCI plat data

2011-08-18 Thread Kukjin Kim
> - set->ext_cd_init = pd->ext_cd_init;
> - set->ext_cd_cleanup = pd->ext_cd_cleanup;
> - set->ext_cd_gpio = pd->ext_cd_gpio;
> - set->ext_cd_gpio_invert = pd->ext_cd_gpio_invert;
> -
> - if (pd->max_width)
> - set->max_width = pd->max_width;
> - if (pd->cfg_gpio)
> - set->cfg_gpio = pd->cfg_gpio;
> - if (pd->cfg_card)
> - set->cfg_card = pd->cfg_card;
> - if (pd->host_caps)
> - set->host_caps |= pd->host_caps;
> - if (pd->clk_type)
> - set->clk_type = pd->clk_type;
> + s3c_sdhci_set_platdata(pd, &s3c_hsmmc3_def_platdata);
>  }
> diff --git a/arch/arm/plat-samsung/include/plat/sdhci.h b/arch/arm/plat-
> samsung/include/plat/sdhci.h
> index 058e096..20dc81c 100644
> --- a/arch/arm/plat-samsung/include/plat/sdhci.h
> +++ b/arch/arm/plat-samsung/include/plat/sdhci.h
> @@ -86,6 +86,13 @@ struct s3c_sdhci_platdata {
>   struct mmc_card *card);
>  };
> 
> +/* s3c_sdhci_set_platdata() - common helper for setting SDHCI platform
data
> + * @pd: The default platform data for this device.
> + * @set: Pointer to the platform data to fill in.
> + */
> +extern void s3c_sdhci_set_platdata(struct s3c_sdhci_platdata *pd,
> + struct s3c_sdhci_platdata *set);
> +
>  /**
>   * s3c_sdhci0_set_platdata - Set platform data for S3C SDHCI device.
>   * @pd: Platform data to register to device.
> diff --git a/arch/arm/plat-samsung/platformdata.c b/arch/arm/plat-
> samsung/platformdata.c
> index 7cf2e1e..27bec0a 100644
> --- a/arch/arm/plat-samsung/platformdata.c
> +++ b/arch/arm/plat-samsung/platformdata.c
> @@ -14,6 +14,7 @@
>  #include 
> 
>  #include 
> +#include 
> 
>  void __init *s3c_set_platdata(void *pd, size_t pdsize,
> struct platform_device *pdev)
> @@ -35,3 +36,24 @@ void __init *s3c_set_platdata(void *pd, size_t pdsize,
>   pdev->dev.platform_data = npd;
>       return npd;
>  }
> +
> +void s3c_sdhci_set_platdata(struct s3c_sdhci_platdata *pd,
> + struct s3c_sdhci_platdata *set)
> +{
> + set->cd_type = pd->cd_type;
> + set->ext_cd_init = pd->ext_cd_init;
> + set->ext_cd_cleanup = pd->ext_cd_cleanup;
> + set->ext_cd_gpio = pd->ext_cd_gpio;
> + set->ext_cd_gpio_invert = pd->ext_cd_gpio_invert;
> +
> + if (pd->max_width)
> + set->max_width = pd->max_width;
> + if (pd->cfg_gpio)
> + set->cfg_gpio = pd->cfg_gpio;
> + if (pd->cfg_card)
> + set->cfg_card = pd->cfg_card;
> + if (pd->host_caps)
> + set->host_caps |= pd->host_caps;
> + if (pd->clk_type)
> + set->clk_type = pd->clk_type;
> +}
> --
> 1.7.2.3

Banajit, OK, applied.
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 1/2] ARM: Samsung: Add chained enrty/exit call to timer interrupt handler

2011-08-18 Thread Kukjin Kim
Marek Szyprowski wrote:
> 
> This patch adds chained IRQ enter/exit functions to timer
> interrupt handler in order to function correctly on primary
> controllers with different methods of flow control.
> 
> Signed-off-by: Marek Szyprowski 
> Signed-off-by: Kyungmin Park 
> ---
>  arch/arm/plat-samsung/irq-vic-timer.c |5 +
>  1 files changed, 5 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/plat-samsung/irq-vic-timer.c
b/arch/arm/plat-samsung/irq-vic-
> timer.c
> index a607546..6df9e33 100644
> --- a/arch/arm/plat-samsung/irq-vic-timer.c
> +++ b/arch/arm/plat-samsung/irq-vic-timer.c
> @@ -22,9 +22,14 @@
>  #include 
>  #include 
> 
> +#include 
> +
>  static void s3c_irq_demux_vic_timer(unsigned int irq, struct irq_desc
*desc)
>  {
> + struct irq_chip *chip = irq_get_chip(irq);
> + chained_irq_enter(chip, desc);
>   generic_handle_irq((int)desc->irq_data.handler_data);
> + chained_irq_exit(chip, desc);
>  }
> 
>  /* We assume the IRQ_TIMER0..IRQ_TIMER4 range is continuous. */
> --
> 1.7.1.569.g6f426

OK, applied.
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: S5P64X0: Add the devname for DMA clock

2011-08-18 Thread Kukjin Kim
Boojin Kim wrote:
> 
> This patch adds devname for DMA clock.
> NOTE: This patch should be added after merging new pl330 driver on
dmaengine.
> 
> Signed-off-by: Boojin Kim 
> ---
>  arch/arm/mach-s5p64x0/clock-s5p6440.c |1 +
>  arch/arm/mach-s5p64x0/clock-s5p6450.c |1 +
>  2 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mach-s5p64x0/clock-s5p6440.c b/arch/arm/mach-
> s5p64x0/clock-s5p6440.c
> index c1f548f..c54c65d 100644
> --- a/arch/arm/mach-s5p64x0/clock-s5p6440.c
> +++ b/arch/arm/mach-s5p64x0/clock-s5p6440.c
> @@ -147,6 +147,7 @@ static struct clk init_clocks_off[] = {
>   .ctrlbit= (1 << 8),
>   }, {
>   .name   = "dma",
> + .devname= "dma-pl330",
>   .parent = &clk_hclk_low.clk,
>   .enable = s5p64x0_hclk0_ctrl,
>   .ctrlbit= (1 << 12),
> diff --git a/arch/arm/mach-s5p64x0/clock-s5p6450.c b/arch/arm/mach-
> s5p64x0/clock-s5p6450.c
> index 3d9b609..2d04abf 100644
> --- a/arch/arm/mach-s5p64x0/clock-s5p6450.c
> +++ b/arch/arm/mach-s5p64x0/clock-s5p6450.c
> @@ -180,6 +180,7 @@ static struct clk init_clocks_off[] = {
>   .ctrlbit= (1 << 3),
>   }, {
>   .name   = "dma",
> + .devname= "dma-pl330",
>   .parent = &clk_hclk_low.clk,
>   .enable = s5p64x0_hclk0_ctrl,
>   .ctrlbit= (1 << 12),
> --
> 1.7.1

OK, will apply.
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 0/3] ARM: Samsung: use dma-pl330 device name for clock

2011-08-18 Thread Kukjin Kim
Vladimir Zapolskiy wrote:
> 
> This changeset replaces s3c-pl330.x clock device names with
> dma-pl330.x, otherwise there won't be a correspondence between clock
> device name and amba device name, thus clocks can't be enabled.
> 
> Fixes runtime errors on clk_get() from drivers/dma/pl330.c:
>   dma-pl330 dma-pl330.0: Cannot get operation clock.
>   dma-pl330: probe of dma-pl330.0 failed with error -22
> 
> The changes are based on linux-samsung/next/topic-dma-pl330 branch.
> 
> Vladimir Zapolskiy (3):
>   ARM: EXYNOS4: use dma-pl330 device name for clock
>   ARM: S5PC100: use dma-pl330 device name for clock
>   ARM: S5PV210: use dma-pl330 device name for clock
> 
>  arch/arm/mach-exynos4/clock.c |4 ++--
>  arch/arm/mach-s5pc100/clock.c |4 ++--
>  arch/arm/mach-s5pv210/clock.c |4 ++--
>  3 files changed, 6 insertions(+), 6 deletions(-)
> 
> --
> 1.7.5.1

OK, will apply.
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: Remove un-used code

2011-08-18 Thread Kukjin Kim
Mark Brown wrote:
> 
> On Fri, Aug 19, 2011 at 09:40:29AM +0530, Banajit Goswami wrote:
> > On Fri, Aug 19, 2011 at 7:29 AM, Mark Brown
> >  wrote:
> > > On Tue, Aug 16, 2011 at 06:11:28PM +0530, Banajit Goswami wrote:
> > >> Remove un-used backlight code for SMDK6410 board
> 
> > > Is the data actually wrong?  If not it'd seem better to finish hooking
> > > it up properly than to remove it.
> 
> > No, this code is no longer needed, as we are having a common backlight
> > infrastructure , which serves the same purpose.
> 
> Ideally your commit log should make this clear - it looks like you're
> just deleting unreferenced code.

Yes, I agree with your opinion...It was difficult to know why it is un-used
code when I applied that.

OK, I will amend its commit log in my tree to clear.

Thanks.

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

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


RE: [GIT PULL] Samsung S5P for v3.1 merge window

2011-08-18 Thread Kukjin Kim
Tushar Behera wrote:
> 
> Hi Arnd,
> 
> On Thursday 21 July 2011 03:21 PM, Kukjin Kim wrote:
> > Hi Arnd
> >
> > Please pull Samsung S5P updates from:
> >
> > git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung.git
> > for-arm-soc
> >
> > Or if you want to merge each branch into arm-soc, please use following.
> > As per your suggestion, I made following branches in my tree...
> >
> > - next-samsung-cleanup for arm-soc/next/cleanup
> > - next-samsung-devel for arm-soc/next/devel
> > - next-samsung-soc for arm-soc/next/soc (nothing)
> > - next-samsung-board for arm-soc/next/board
> > - and so on...
> >
> (snip)
> >
> > JeongHyeon Kim (1):
> >ARM: EXYNOS4: Add support for ORIGEN board
> >
> I can't find this patch in the 3.1-rc1 release. Does it need some rework?
> 
Hi

Yes, you're right, and I already informed that to Arnd at the end of last
merge window. As I know, he will take care of it.

As a note, you can keep going on development of ORIGEN against on my
for-next before merging it in mainline.

Thanks.

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

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


RE: [PATCH] ARM:EXYNOS4: Add the missing clock of EXYNOS4210 to remove leakage power

2011-08-18 Thread Kukjin Kim
Chanwoo Choi wrote:
> 
> Singed-off-by: Chanwoo Choi 
> Singed-off-by: Donggeun Kim 
> Signed-off-by: Kyungmin Park 
> ---
>  arch/arm/mach-exynos4/clock.c |  295
> +
>  arch/arm/mach-exynos4/include/mach/regs-pmu.h |6 +
>  2 files changed, 301 insertions(+), 0 deletions(-)
>  mode change 100644 => 100755 arch/arm/mach-exynos4/clock.c
> 
NO. don't change the mode :(

And I don't think we _really_ need to add all clocks if they will not be used 
anywhere in kernel. If it is required, please turn off the clocks in boot 
loader.

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 v3] ARM: Samsung: fix watchdog reset issue with clk_get()

2011-08-19 Thread Kukjin Kim
was here
make[1]: *** [arch/arm/plat-s3c24xx/cpu.o] Error 1
make[1]: *** Waiting for unfinished jobs
make: *** [arch/arm/plat-s3c24xx] Error 2
make: *** Waiting for unfinished jobs

And, with s5p64x0_defconfig:

  CHK include/linux/version.h
  CHK include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
  CALLscripts/checksyscalls.sh
  CHK include/generated/compile.h
  KSYM.tmp_kallsyms1.S
  AS  .tmp_kallsyms1.o
  LD  .tmp_vmlinux2
  KSYM.tmp_kallsyms2.S
  AS  .tmp_kallsyms2.o
  LD  vmlinux
  SYSMAP  System.map
  SYSMAP  .tmp_System.map
Inconsistent kallsyms data
This is a bug - please report about it
Try make KALLSYMS_EXTRA_PASS=1 as a workaround
make: *** [vmlinux] Error 1


The building error of s3c2410_defconfig can be fixed with below.
---
commit c5f80e2eb419437a7e4272d28bc7258b650b0934
Author: Kukjin Kim 
Date:   Fri Aug 19 21:12:19 2011 +0900

ARM: SAMSUNG: fix to prevent declaring duplicated

The plat/clock.h revised to prevent declaring duplicated.

Signed-off-by: Kukjin Kim 

diff --git a/arch/arm/plat-samsung/include/plat/clock.h
b/arch/arm/plat-samsung/include/plat/clock.h
index 8f95700..092be14 100644
--- a/arch/arm/plat-samsung/include/plat/clock.h
+++ b/arch/arm/plat-samsung/include/plat/clock.h
@@ -9,6 +9,9 @@
  * published by the Free Software Foundation.
 */

+#ifndef __ASM_PLAT_CLOCK_H
+#define __ASM_PLAT_CLOCK_H __FILE__
+
 #include 
 #include 

@@ -124,3 +127,5 @@ extern void s3c_pwmclk_init(void);
 /* Global watchdog clock used by arch_wtd_reset() callback */

 extern struct clk *s3c2410_wdtclk;
+
+#endif /* __ASM_PLAT_CLOCK_H */
---

But, the error of s5p64x0_defconfig happens still :(

I know, the 'watchdog reset issue' should be fixed however, we need to sort
this out again.

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: SAMSUNG: TSADC: Remove unnecessary duplication of plat_data

2011-08-19 Thread Kukjin Kim
> 
>   s3c_i2c0_set_platdata(&s5p6440_i2c0_data);
>   s3c_i2c1_set_platdata(&s5p6440_i2c1_data);
> diff --git a/arch/arm/mach-s5p64x0/mach-smdk6450.c b/arch/arm/mach-
> s5p64x0/mach-smdk6450.c
> index 33f2adf..ee0da14 100644
> --- a/arch/arm/mach-s5p64x0/mach-smdk6450.c
> +++ b/arch/arm/mach-s5p64x0/mach-smdk6450.c
> @@ -148,12 +148,6 @@ static struct i2c_board_info smdk6450_i2c_devs1[]
> __initdata = {
>   { I2C_BOARD_INFO("24c128", 0x57), },/* Samsung S524AD0XD1
> EEPROM */
>  };
> 
> -static struct s3c2410_ts_mach_info s3c_ts_platform __initdata = {
> - .delay  = 1,
> - .presc  = 49,
> - .oversampling_shift = 2,
> -};
> -
>  /* LCD Backlight data */
>  static struct samsung_bl_gpio_info smdk6450_bl_gpio_info = {
>   .no = S5P6450_GPF(15),
> @@ -174,7 +168,7 @@ static void __init smdk6450_map_io(void)
> 
>  static void __init smdk6450_machine_init(void)
>  {
> - s3c24xx_ts_set_platdata(&s3c_ts_platform);
> + s3c24xx_ts_set_platdata(NULL);
> 
>   s3c_i2c0_set_platdata(&s5p6450_i2c0_data);
>   s3c_i2c1_set_platdata(&s5p6450_i2c1_data);
> diff --git a/arch/arm/mach-s5pc100/mach-smdkc100.c b/arch/arm/mach-
> s5pc100/mach-smdkc100.c
> index 227d890..0b70762 100644
> --- a/arch/arm/mach-s5pc100/mach-smdkc100.c
> +++ b/arch/arm/mach-s5pc100/mach-smdkc100.c
> @@ -203,12 +203,6 @@ static struct platform_device *smdkc100_devices[]
> __initdata = {
>   &s5pc100_device_spdif,
>  };
> 
> -static struct s3c2410_ts_mach_info s3c_ts_platform __initdata = {
> - .delay  = 1,
> - .presc  = 49,
> - .oversampling_shift = 2,
> -};
> -
>  /* LCD Backlight data */
>  static struct samsung_bl_gpio_info smdkc100_bl_gpio_info = {
>   .no = S5PC100_GPD(0),
> @@ -228,7 +222,7 @@ static void __init smdkc100_map_io(void)
> 
>  static void __init smdkc100_machine_init(void)
>  {
> - s3c24xx_ts_set_platdata(&s3c_ts_platform);
> + s3c24xx_ts_set_platdata(NULL);
> 
>   /* I2C */
>   s3c_i2c0_set_platdata(NULL);
> diff --git a/arch/arm/mach-s5pv210/mach-smdkv210.c b/arch/arm/mach-
> s5pv210/mach-smdkv210.c
> index 5e011fc..4b27bca 100644
> --- a/arch/arm/mach-s5pv210/mach-smdkv210.c
> +++ b/arch/arm/mach-s5pv210/mach-smdkv210.c
> @@ -265,12 +265,6 @@ static struct i2c_board_info smdkv210_i2c_devs2[]
> __initdata = {
>   /* To Be Updated */
>  };
> 
> -static struct s3c2410_ts_mach_info s3c_ts_platform __initdata = {
> - .delay  = 1,
> - .presc  = 49,
> - .oversampling_shift = 2,
> -};
> -
>  /* LCD Backlight data */
>  static struct samsung_bl_gpio_info smdkv210_bl_gpio_info = {
>   .no = S5PV210_GPD0(3),
> @@ -296,7 +290,7 @@ static void __init smdkv210_machine_init(void)
>   smdkv210_dm9000_init();
> 
>   samsung_keypad_set_platdata(&smdkv210_keypad_data);
> - s3c24xx_ts_set_platdata(&s3c_ts_platform);
> + s3c24xx_ts_set_platdata(NULL);
> 
>   s3c_i2c0_set_platdata(NULL);
>   s3c_i2c1_set_platdata(NULL);
> diff --git a/arch/arm/plat-samsung/dev-ts.c
b/arch/arm/plat-samsung/dev-ts.c
> index 82543f0..5f3d46a 100644
> --- a/arch/arm/plat-samsung/dev-ts.c
> +++ b/arch/arm/plat-samsung/dev-ts.c
> @@ -43,8 +43,17 @@ struct platform_device s3c_device_ts = {
>   .resource   = s3c_ts_resource,
>  };
> 
> +static struct s3c2410_ts_mach_info default_ts_data __initdata = {
> + .delay  = 1,
> + .presc  = 49,
> + .oversampling_shift = 2,
> +};
> +
>  void __init s3c24xx_ts_set_platdata(struct s3c2410_ts_mach_info *pd)
>  {
> + if (!pd)
> + pd = &default_ts_data;
> +
>   s3c_set_platdata(pd, sizeof(struct s3c2410_ts_mach_info),
>&s3c_device_ts);
>  }
> --
> 1.7.2.3

Looks ok, applied.
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: S5P: fix bug in spdif_clk_get_rate

2011-08-19 Thread Kukjin Kim
Naveen Krishna Chatradhi wrote:
> 
> Should be passing the parent clk object when
> calling for parent rate.
> 
> Signed-off-by: Naveen Krishna Chatradhi 
> ---
>  arch/arm/plat-s5p/clock.c |2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/arm/plat-s5p/clock.c b/arch/arm/plat-s5p/clock.c
> index 02af235..5f84a3f 100644
> --- a/arch/arm/plat-s5p/clock.c
> +++ b/arch/arm/plat-s5p/clock.c
> @@ -192,7 +192,7 @@ unsigned long s5p_spdif_get_rate(struct clk *clk)
>   if (IS_ERR(pclk))
>   return -EINVAL;
> 
> - rate = pclk->ops->get_rate(clk);
> + rate = pclk->ops->get_rate(pclk);
>   clk_put(pclk);
> 
>   return rate;
> --
> 1.7.2.3

Yes, applied.
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] ARM: EXYNOS4: Remove useless codes on NURI board

2011-08-19 Thread Kukjin Kim
The 'nuri_cm_devices' is defined but not used.

Cc: Kyungmin Park 
Signed-off-by: Kukjin Kim 
---
 arch/arm/mach-exynos4/mach-nuri.c |7 ---
 1 files changed, 0 insertions(+), 7 deletions(-)

diff --git a/arch/arm/mach-exynos4/mach-nuri.c 
b/arch/arm/mach-exynos4/mach-nuri.c
index 43be71b..65df994 100644
--- a/arch/arm/mach-exynos4/mach-nuri.c
+++ b/arch/arm/mach-exynos4/mach-nuri.c
@@ -1037,13 +1037,6 @@ static struct platform_device nuri_max8903_device = {
},
 };
 
-static struct device *nuri_cm_devices[] = {
-   &s3c_device_i2c5.dev,
-   &s3c_device_adc.dev,
-   NULL, /* Reserved for UART */
-   NULL,
-};
-
 static void __init nuri_power_init(void)
 {
int gpio;
-- 
1.7.1

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


[PATCH] ARM: EXYNOS4: Turn the mach-smdkc210.c into mach-smdv310.c

2011-08-19 Thread Kukjin Kim
Since the components on SMDKC210 are similar with SMDKV310
even though its memory is different. So we can support the
SMDKC210 and SMDKV310 on mach-smdkv310.c, one machine file.

Signed-off-by: Kukjin Kim 
---
 arch/arm/mach-exynos4/Kconfig |   17 +--
 arch/arm/mach-exynos4/Makefile|2 +-
 arch/arm/mach-exynos4/mach-smdkc210.c |  309 -
 arch/arm/mach-exynos4/mach-smdkv310.c |   78 +
 4 files changed, 80 insertions(+), 326 deletions(-)
 delete mode 100644 arch/arm/mach-exynos4/mach-smdkc210.c

diff --git a/arch/arm/mach-exynos4/Kconfig b/arch/arm/mach-exynos4/Kconfig
index 0c77ab9..bee8f77 100644
--- a/arch/arm/mach-exynos4/Kconfig
+++ b/arch/arm/mach-exynos4/Kconfig
@@ -113,22 +113,7 @@ menu "EXYNOS4 Machines"
 
 config MACH_SMDKC210
bool "SMDKC210"
-   select CPU_EXYNOS4210
-   select S5P_DEV_FIMD0
-   select S3C_DEV_RTC
-   select S3C_DEV_WDT
-   select S3C_DEV_I2C1
-   select S3C_DEV_HSMMC
-   select S3C_DEV_HSMMC1
-   select S3C_DEV_HSMMC2
-   select S3C_DEV_HSMMC3
-   select SAMSUNG_DEV_PWM
-   select SAMSUNG_DEV_BACKLIGHT
-   select EXYNOS4_DEV_PD
-   select EXYNOS4_DEV_SYSMMU
-   select EXYNOS4_SETUP_FIMD0
-   select EXYNOS4_SETUP_I2C1
-   select EXYNOS4_SETUP_SDHCI
+   select MACH_SMDKV310
help
  Machine support for Samsung SMDKC210
 
diff --git a/arch/arm/mach-exynos4/Makefile b/arch/arm/mach-exynos4/Makefile
index b7fe1d7..e3e93ea 100644
--- a/arch/arm/mach-exynos4/Makefile
+++ b/arch/arm/mach-exynos4/Makefile
@@ -25,7 +25,7 @@ obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o
 
 # machine support
 
-obj-$(CONFIG_MACH_SMDKC210)+= mach-smdkc210.o
+obj-$(CONFIG_MACH_SMDKC210)+= mach-smdkv310.o
 obj-$(CONFIG_MACH_SMDKV310)+= mach-smdkv310.o
 obj-$(CONFIG_MACH_ARMLEX4210)  += mach-armlex4210.o
 obj-$(CONFIG_MACH_UNIVERSAL_C210)  += mach-universal_c210.o
diff --git a/arch/arm/mach-exynos4/mach-smdkc210.c 
b/arch/arm/mach-exynos4/mach-smdkc210.c
deleted file mode 100644
index a7c65e0..000
--- a/arch/arm/mach-exynos4/mach-smdkc210.c
+++ /dev/null
@@ -1,309 +0,0 @@
-/* linux/arch/arm/mach-exynos4/mach-smdkc210.c
- *
- * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd.
- * http://www.samsung.com
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
-*/
-
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-
-#include 
-#include 
-
-#include 
-
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-
-#include 
-
-/* Following are default values for UCON, ULCON and UFCON UART registers */
-#define SMDKC210_UCON_DEFAULT  (S3C2410_UCON_TXILEVEL |\
-S3C2410_UCON_RXILEVEL |\
-S3C2410_UCON_TXIRQMODE |   \
-S3C2410_UCON_RXIRQMODE |   \
-S3C2410_UCON_RXFIFO_TOI |  \
-S3C2443_UCON_RXERR_IRQEN)
-
-#define SMDKC210_ULCON_DEFAULT S3C2410_LCON_CS8
-
-#define SMDKC210_UFCON_DEFAULT (S3C2410_UFCON_FIFOMODE |   \
-S5PV210_UFCON_TXTRIG4 |\
-S5PV210_UFCON_RXTRIG4)
-
-static struct s3c2410_uartcfg smdkc210_uartcfgs[] __initdata = {
-   [0] = {
-   .hwport = 0,
-   .flags  = 0,
-   .ucon   = SMDKC210_UCON_DEFAULT,
-   .ulcon  = SMDKC210_ULCON_DEFAULT,
-   .ufcon  = SMDKC210_UFCON_DEFAULT,
-   },
-   [1] = {
-   .hwport = 1,
-   .flags  = 0,
-   .ucon   = SMDKC210_UCON_DEFAULT,
-   .ulcon  = SMDKC210_ULCON_DEFAULT,
-   .ufcon  = SMDKC210_UFCON_DEFAULT,
-   },
-   [2] = {
-   .hwport = 2,
-   .flags  = 0,
-   .ucon   = SMDKC210_UCON_DEFAULT,
-   .ulcon  = SMDKC210_ULCON_DEFAULT,
-   .ufcon  = SMDKC210_UFCON_DEFAULT,
-   },
-   [3] = {
-   .hwport = 3,
-   .flags  = 0,
-   .ucon   = SMDKC210_UCON_DEFAULT,
-   .ulcon  = SMDKC210_ULCON_DEFAULT,
-   .ufcon  = SMDKC210_UFCON_DEFAULT,
-   },
-};
-
-static struct s3c_sdhci_platdata smdkc210_hsmmc0_pdata __initdata = {
-   .cd_type= S3C_SDHCI_CD_GPIO,
-   .ext_cd_gpio= EXYNOS4_GPK0(2),
-   .ext_cd_gpio_invert = 1,
-   .clk_type   = S3C_SD

RE: [PATCH] ARM: EXYNOS4: Remove useless codes on NURI board

2011-08-19 Thread Kukjin Kim
Kyungmin Park wrote:
> 
> Maybe charger manager codes are not merged. it's used for charger managers.
> 
OK, if this is required on charger manager, will drop this.

Thanks.

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

> To Mr. Ham,
> which patches are missing?
> 
> Thank you,
> Kyungmin Park
> 
> On Fri, Aug 19, 2011 at 10:01 PM, Kukjin Kim  wrote:
> > The 'nuri_cm_devices' is defined but not used.
> >
> > Cc: Kyungmin Park 
> > Signed-off-by: Kukjin Kim 
> > ---
> >  arch/arm/mach-exynos4/mach-nuri.c |7 ---
> >  1 files changed, 0 insertions(+), 7 deletions(-)
> >
> > diff --git a/arch/arm/mach-exynos4/mach-nuri.c b/arch/arm/mach-exynos4/mach-
> nuri.c
> > index 43be71b..65df994 100644
> > --- a/arch/arm/mach-exynos4/mach-nuri.c
> > +++ b/arch/arm/mach-exynos4/mach-nuri.c
> > @@ -1037,13 +1037,6 @@ static struct platform_device nuri_max8903_device =
> {
> >},
> >  };
> >
> > -static struct device *nuri_cm_devices[] = {
> > -   &s3c_device_i2c5.dev,
> > -   &s3c_device_adc.dev,
> > -   NULL, /* Reserved for UART */
> > -   NULL,
> > -};
> > -
> >  static void __init nuri_power_init(void)
> >  {
> >int gpio;
> > --
> > 1.7.1

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


RE: [PATCH] ARM: EXYNOS4: Add usb ehci device to the SMDKC210

2011-08-19 Thread Kukjin Kim
Jingoo Han wrote:
> 
> This patch is to support usb ehci device to the SMDKC210 board.
> 
> Signed-off-by: Jingoo Han 
> ---
>  arch/arm/mach-exynos4/Kconfig |2 ++
>  arch/arm/mach-exynos4/mach-smdkc210.c |   16 
>  2 files changed, 18 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mach-exynos4/Kconfig b/arch/arm/mach-exynos4/Kconfig
> index 3ceefdb..12a0481 100644
> --- a/arch/arm/mach-exynos4/Kconfig
> +++ b/arch/arm/mach-exynos4/Kconfig
> @@ -115,6 +115,7 @@ config MACH_SMDKC210
>   bool "SMDKC210"
>   select CPU_EXYNOS4210
>   select S5P_DEV_FIMD0
> + select S5P_DEV_USB_EHCI
>   select S3C_DEV_RTC
>   select S3C_DEV_WDT
>   select S3C_DEV_I2C1
> @@ -127,6 +128,7 @@ config MACH_SMDKC210
>   select EXYNOS4_DEV_PD
>   select EXYNOS4_DEV_SYSMMU
>   select EXYNOS4_SETUP_FIMD0
> + select EXYNOS4_SETUP_USB_PHY
>   select EXYNOS4_SETUP_I2C1
>   select EXYNOS4_SETUP_SDHCI
>   help
> diff --git a/arch/arm/mach-exynos4/mach-smdkc210.c b/arch/arm/mach-
> exynos4/mach-smdkc210.c
> index a7c65e0..2cd2eb4 100644
> --- a/arch/arm/mach-exynos4/mach-smdkc210.c
> +++ b/arch/arm/mach-exynos4/mach-smdkc210.c
> @@ -36,6 +36,8 @@
>  #include 
>  #include 
>  #include 
> +#include 
> +#include 
> 
>  #include 
> 
> @@ -216,6 +218,16 @@ static struct i2c_board_info i2c_devs1[] __initdata =
{
>   {I2C_BOARD_INFO("wm8994", 0x1a),},
>  };
> 
> +/* USB EHCI */
> +static struct s5p_ehci_platdata smdkc210_ehci_pdata;
> +
> +static void __init smdkc210_ehci_init(void)
> +{
> + struct s5p_ehci_platdata *pdata = &smdkc210_ehci_pdata;
> +
> + s5p_ehci_set_platdata(pdata);
> +}
> +
>  static struct platform_device *smdkc210_devices[] __initdata = {
>   &s3c_device_hsmmc0,
>   &s3c_device_hsmmc1,
> @@ -224,6 +236,7 @@ static struct platform_device *smdkc210_devices[]
> __initdata = {
>   &s3c_device_i2c1,
>   &s3c_device_rtc,
>   &s3c_device_wdt,
> + &s5p_device_ehci,
>   &exynos4_device_ac97,
>   &exynos4_device_i2s0,
>   &exynos4_device_pd[PD_MFC],
> @@ -296,6 +309,9 @@ static void __init smdkc210_machine_init(void)
>   samsung_bl_set(&smdkc210_bl_gpio_info, &smdkc210_bl_data);
>   s5p_fimd0_set_platdata(&smdkc210_lcd0_pdata);
> 
> + smdkc210_ehci_init();
> + clk_xusbxti.rate = 2400;
> +
>   platform_add_devices(smdkc210_devices,
> ARRAY_SIZE(smdkc210_devices));
>  }
> 
> --
> 1.7.1

Hi Jingoo,

If there is no problem, could you please re-work/test on smdkv310?

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 0/5] S5P64X0 PM Support

2011-08-19 Thread Kukjin Kim
Abhilash Kesavan wrote:
> 
> The patchset adds Power Mangement support for S5P64X0. The first
> four patches lay the groundwork for adding PM support, while the
> final patch adds the SoC specific PM code.
> Tested using external interrupts as wake-up sources on SMDK6440
> and SMDK6450.
> 
> Abhilash Kesavan (5):
>   ARM: S5P: Make the common S5P PM code conditionally compile
>   ARM: SAMSUNG: Make the sleep code common for S3C64XX and newer SoCs
>   ARM: S5P64X0: Add pm save/restore functions for GPIO banks
>   ARM: S5P64X0: Fix incorrect serial clock name
>   ARM: S5P64X0: Add Power Management support
> 
>  arch/arm/Kconfig|2 +-
>  arch/arm/mach-exynos4/Kconfig   |2 +
>  arch/arm/mach-exynos4/Makefile  |2 +-
>  arch/arm/mach-exynos4/sleep.S   |   54 --
>  arch/arm/mach-s3c64xx/Kconfig   |1 +
>  arch/arm/mach-s3c64xx/Makefile  |1 -
>  arch/arm/mach-s3c64xx/sleep.S   |   72 
>  arch/arm/mach-s5p64x0/Kconfig   |4 +
>  arch/arm/mach-s5p64x0/Makefile  |1 +
>  arch/arm/mach-s5p64x0/clock-s5p6440.c   |2 +-
>  arch/arm/mach-s5p64x0/clock-s5p6450.c   |2 +-
>  arch/arm/mach-s5p64x0/gpiolib.c |1 +
>  arch/arm/mach-s5p64x0/include/mach/map.h|1 +
>  arch/arm/mach-s5p64x0/include/mach/pm-core.h|  117 +
>  arch/arm/mach-s5p64x0/include/mach/regs-clock.h |   33 
>  arch/arm/mach-s5p64x0/include/mach/regs-gpio.h  |   19 ++
>  arch/arm/mach-s5p64x0/init.c|2 +-
>  arch/arm/mach-s5p64x0/irq-eint.c|2 +
>  arch/arm/mach-s5p64x0/irq-pm.c  |   92 ++
>  arch/arm/mach-s5p64x0/pm.c  |  204
> +++
>  arch/arm/mach-s5pv210/Kconfig   |2 +
>  arch/arm/mach-s5pv210/Makefile  |2 +-
>  arch/arm/mach-s5pv210/sleep.S   |   52 --
>  arch/arm/plat-s5p/Kconfig   |6 +
>  arch/arm/plat-s5p/Makefile  |3 +-
>  arch/arm/plat-samsung/Kconfig   |7 +
>  arch/arm/plat-samsung/Makefile  |1 +
>  arch/arm/plat-samsung/sleep.S   |   80 +
>  drivers/gpio/gpio-plat-samsung.c|4 +-
>  29 files changed, 583 insertions(+), 188 deletions(-)
>  delete mode 100644 arch/arm/mach-exynos4/sleep.S
>  delete mode 100644 arch/arm/mach-s3c64xx/sleep.S
>  create mode 100644 arch/arm/mach-s5p64x0/include/mach/pm-core.h
>  create mode 100644 arch/arm/mach-s5p64x0/irq-pm.c
>  create mode 100644 arch/arm/mach-s5p64x0/pm.c
>  delete mode 100644 arch/arm/mach-s5pv210/sleep.S
>  create mode 100644 arch/arm/plat-samsung/sleep.S
> 
> --

Hi Abhilash,

As a note, I will be back on this in the next week :)

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 v4 0/4] Updated s5p-tv platform definitions

2011-08-19 Thread Kukjin Kim
Tomasz Stanislawski wrote:
> 
> Hello,
> 
> This patch series contains platform definitions for s5p-tv driver
> rebased onto latest for-next branch (including generic GIC and clockdev
> changes).
> 
> Changes since v3:
> - vpll code was fixed and moved back to mach-dependant code
> - changed naming from IIC to I2C
> 
> Changes since v2:
> - moved vpll code to plat-s5p/clock-vpll.c
> 
> Changes since v1:
> - renamed i2c8 to common i2c-hdmiphy
> - moved common vpll code to plat-s5p/clock.c
> - added check for pll locking
> - various minor coding style fixes here and there
> 
> Best regards
> 
> Tomasz Stanislawski (4):
>   ARM: Samsung: add i2c hdmiphy controller definitions
>   ARM: S5P: add support for tv device
>   ARM: Exynos4: enable TV support on Universal_C210 board
>   ARM: S5PV210: enable TV support on GONI board
> 
>  arch/arm/mach-exynos4/Kconfig|2 +
>  arch/arm/mach-exynos4/clock.c|  200
> +-
>  arch/arm/mach-exynos4/cpu.c  |2 +
>  arch/arm/mach-exynos4/include/mach/i2c-hdmiphy.h |   16 ++
>  arch/arm/mach-exynos4/include/mach/irqs.h|4 +
>  arch/arm/mach-exynos4/include/mach/map.h |   12 ++
>  arch/arm/mach-exynos4/include/mach/regs-pmu.h|6 +
>  arch/arm/mach-exynos4/mach-universal_c210.c  |   74 
>  arch/arm/mach-s5pv210/Kconfig|1 +
>  arch/arm/mach-s5pv210/clock.c|  137 ++-
> -
>  arch/arm/mach-s5pv210/cpu.c  |4 +
>  arch/arm/mach-s5pv210/include/mach/i2c-hdmiphy.h |   16 ++
>  arch/arm/mach-s5pv210/include/mach/irqs.h|4 +-
>  arch/arm/mach-s5pv210/include/mach/map.h |   13 ++
>  arch/arm/mach-s5pv210/include/mach/regs-clock.h  |3 +-
>  arch/arm/mach-s5pv210/mach-goni.c|9 +
>  arch/arm/plat-s5p/Kconfig|   10 +
>  arch/arm/plat-s5p/Makefile   |2 +
>  arch/arm/plat-s5p/dev-i2c-hdmiphy.c  |   59 +++
>  arch/arm/plat-s5p/dev-tv.c   |   98 +++
>  arch/arm/plat-s5p/include/plat/pll.h |   14 ++-
>  arch/arm/plat-samsung/include/plat/devs.h|6 +
>  arch/arm/plat-samsung/include/plat/iic.h |1 +
>  arch/arm/plat-samsung/include/plat/tv-core.h |   44 +
>  24 files changed, 720 insertions(+), 17 deletions(-)
>  create mode 100644 arch/arm/mach-exynos4/include/mach/i2c-hdmiphy.h
>  create mode 100644 arch/arm/mach-s5pv210/include/mach/i2c-hdmiphy.h
>  create mode 100644 arch/arm/plat-s5p/dev-i2c-hdmiphy.c
>  create mode 100644 arch/arm/plat-s5p/dev-tv.c
>  create mode 100644 arch/arm/plat-samsung/include/plat/tv-core.h
> 
> --
> 1.7.6

Hi Tomasz,

Initially, looks ok, let me review this in detail in the next week.
Then if no comments, will apply :)

Thanks.

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

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


RE: [PATCH] ARM: EXYNOS4: ADD USB EHCI device to SMDKV310

2011-08-19 Thread Kukjin Kim
Sachin Kamat wrote:
> 
> Signed-off-by: Bhuvana Kakunoori 
> Signed-off-by: Pankaj Dubey 
> Signed-off-by: Sachin Kamat 
> ---
>  arch/arm/mach-exynos4/Kconfig |2 ++
>  arch/arm/mach-exynos4/mach-smdkv310.c |   16 
>  2 files changed, 18 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mach-exynos4/Kconfig b/arch/arm/mach-exynos4/Kconfig
> index bb29d51..cc97d23 100644
> --- a/arch/arm/mach-exynos4/Kconfig
> +++ b/arch/arm/mach-exynos4/Kconfig
> @@ -136,6 +136,7 @@ config MACH_SMDKV310
>   bool "SMDKV310"
>   select CPU_EXYNOS4210
>   select S5P_DEV_FIMD0
> + select S5P_DEV_USB_EHCI
>   select S3C_DEV_RTC
>   select S3C_DEV_WDT
>   select S3C_DEV_I2C1
> @@ -151,6 +152,7 @@ config MACH_SMDKV310
>   select SAMSUNG_DEV_PWM
>   select EXYNOS4_DEV_SYSMMU
>   select EXYNOS4_SETUP_FIMD0
> + select EXYNOS4_SETUP_USB_PHY
>   select EXYNOS4_SETUP_I2C1
>   select EXYNOS4_SETUP_KEYPAD
>   select EXYNOS4_SETUP_SDHCI
> diff --git a/arch/arm/mach-exynos4/mach-smdkv310.c b/arch/arm/mach-
> exynos4/mach-smdkv310.c
> index 5f62b2b..b6c28ea 100644
> --- a/arch/arm/mach-exynos4/mach-smdkv310.c
> +++ b/arch/arm/mach-exynos4/mach-smdkv310.c
> @@ -33,6 +33,8 @@
>  #include 
>  #include 
>  #include 
> +#include 
> +#include 
> 
>  #include 
> 
> @@ -167,6 +169,16 @@ static struct i2c_board_info i2c_devs1[] __initdata =
{
>   {I2C_BOARD_INFO("wm8994", 0x1a),},
>  };
> 
> +/* USB EHCI */
> +static struct s5p_ehci_platdata smdkv310_ehci_pdata;
> +
> +static void __init smdkv310_ehci_init(void)
> +{
> + struct s5p_ehci_platdata *pdata = &smdkv310_ehci_pdata;
> +
> + s5p_ehci_set_platdata(pdata);
> +}
> +
>  static struct platform_device *smdkv310_devices[] __initdata = {
>   &s3c_device_hsmmc0,
>   &s3c_device_hsmmc1,
> @@ -175,6 +187,7 @@ static struct platform_device *smdkv310_devices[]
> __initdata = {
>   &s3c_device_i2c1,
>   &s3c_device_rtc,
>   &s3c_device_wdt,
> + &s5p_device_ehci,
>   &exynos4_device_ac97,
>   &exynos4_device_i2s0,
>   &samsung_device_keypad,
> @@ -258,6 +271,9 @@ static void __init smdkv310_machine_init(void)
> 
>   samsung_bl_set(&smdkv310_bl_gpio_info, &smdkv310_bl_data);
> 
> + smdkv310_ehci_init();
> + clk_xusbxti.rate = 2400;
> +
>   platform_add_devices(smdkv310_devices,
> ARRAY_SIZE(smdkv310_devices));
>   s5p_device_mfc.dev.parent = &exynos4_device_pd[PD_MFC].dev;
>  }
> --
> 1.7.4.1

(Cc'ed Jingoo Han)

Well, this is same with Jingoo's patch on smdkc210 which has been submitted
at 12th Aug.

I requested to him to re-work this on smdkv310 on his patch just now...
Hmm...I don't know :(

Let me think again...

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 0/4] ARM: EXYNOS4: Support generic Power domain framework for EXYNOS4210

2011-08-19 Thread Kukjin Kim
Chanwoo Choi wrote:
> 
> The following patch set use the generic Power domain Framework instead of
> power domain code depend of Samsung SoC.
> 
> Chanwoo Choi (4):
>   ARM: EXYNOS4: Support for generic I/O power domains on EXYNOS4210
>   ARM: EXYNOS4: Support for generic Clock manipulation PM callbacks
>   ARM: EXYNOS4: Delete the power-domain code depend on Samsung SoC
>   ARM: EXYNOS4: Add power domain to use generic Power domain Framework
> 
>  arch/arm/mach-exynos4/Kconfig  |   10 +-
>  arch/arm/mach-exynos4/Makefile |4 +-
>  arch/arm/mach-exynos4/dev-pd.c |  139 --
>  arch/arm/mach-exynos4/include/mach/pm-exynos4210.h |   52 ++
>  arch/arm/mach-exynos4/include/mach/regs-clock.h|8 +
>  arch/arm/mach-exynos4/mach-nuri.c  |   21 ++-
>  arch/arm/mach-exynos4/mach-smdkc210.c  |   26 ++-
>  arch/arm/mach-exynos4/mach-smdkv310.c  |   23 ++-
>  arch/arm/mach-exynos4/mach-universal_c210.c|   21 ++-
>  arch/arm/mach-exynos4/pm-exynos4210.c  |  189
> 
>  arch/arm/mach-exynos4/pm-runtime.c |   56 ++
>  arch/arm/plat-samsung/Kconfig  |8 -
>  arch/arm/plat-samsung/Makefile |4 -
>  arch/arm/plat-samsung/include/plat/pd.h|   30 ---
>  arch/arm/plat-samsung/pd.c |   95 --
>  15 files changed, 377 insertions(+), 309 deletions(-)
>  delete mode 100644 arch/arm/mach-exynos4/dev-pd.c
>  create mode 100644 arch/arm/mach-exynos4/include/mach/pm-exynos4210.h
>  create mode 100644 arch/arm/mach-exynos4/pm-exynos4210.c
>  create mode 100644 arch/arm/mach-exynos4/pm-runtime.c
>  delete mode 100644 arch/arm/plat-samsung/include/plat/pd.h
>  delete mode 100644 arch/arm/plat-samsung/pd.c

Hi Chanwoo,

Basically looks ok.
I will review this in detail in the next week.
Then if no problems, will apply.

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 v3] ARM: Samsung: fix watchdog reset issue with clk_get()

2011-08-19 Thread Kukjin Kim
Marek Szyprowski wrote:
> 
> Hello,
> 
> On Friday, August 19, 2011 3:06 PM Kukjin Kim wrote:
> 
> > Marek Szyprowski wrote:
> > >
> > > clkdev framework uses global mutex to protect clock tree, so it is not
> > > possible to call clk_get() in interrupt context. This patch fixes this
> > > issue and makes system reset by watchdog call working again.
> > >
> > > Signed-off-by: Marek Szyprowski 
> > > Signed-off-by: Kyungmin Park 
> > > ---
> > >  arch/arm/plat-samsung/clock.c  |   11
> +++
> > >  arch/arm/plat-samsung/include/plat/clock.h |3 +++
> > >  .../arm/plat-samsung/include/plat/watchdog-reset.h |   10 +++---
> > >  3 files changed, 17 insertions(+), 7 deletions(-)
> > >
> > >
> > > history:
> > > v3:
> > > - moved initialization to arch_initcall, cleaned the code
> > >
> > > v2:
> > > - added missing '__init' section modifiers
> > >
> > > diff --git a/arch/arm/plat-samsung/clock.c
b/arch/arm/plat-samsung/clock.c
> > > index 302c426..3b44519 100644
> > > --- a/arch/arm/plat-samsung/clock.c
> > > +++ b/arch/arm/plat-samsung/clock.c
> > > @@ -64,6 +64,17 @@ static LIST_HEAD(clocks);
> > >   */
> > >  DEFINE_SPINLOCK(clocks_lock);
> > >
> > > +/* Global watchdog clock used by arch_wtd_reset() callback */
> > > +struct clk *s3c2410_wdtclk;
> > > +static int __init s3c_wdt_reset_init(void)
> > > +{
> > > + s3c2410_wdtclk = clk_get(NULL, "watchdog");
> > > + if (IS_ERR(s3c2410_wdtclk))
> > > + printk(KERN_WARNING "%s: warning: cannot get watchdog
> > > clock\n", __func__);
> > > + return 0;
> > > +}
> > > +arch_initcall(s3c_wdt_reset_init);
> > > +
> > >  /* enable and disable calls for use with the clk struct */
> > >
> > >  static int clk_null_enable(struct clk *clk, int enable)
> > > diff --git a/arch/arm/plat-samsung/include/plat/clock.h
b/arch/arm/plat-
> > > samsung/include/plat/clock.h
> > > index 87d5b38..8f95700 100644
> > > --- a/arch/arm/plat-samsung/include/plat/clock.h
> > > +++ b/arch/arm/plat-samsung/include/plat/clock.h
> > > @@ -121,3 +121,6 @@ extern int s3c64xx_sclk_ctrl(struct clk *clk, int
> > enable);
> > >
> > >  extern void s3c_pwmclk_init(void);
> > >
> > > +/* Global watchdog clock used by arch_wtd_reset() callback */
> > > +
> > > +extern struct clk *s3c2410_wdtclk;
> > > diff --git a/arch/arm/plat-samsung/include/plat/watchdog-reset.h
> > b/arch/arm/plat-
> > > samsung/include/plat/watchdog-reset.h
> > > index 54b762a..40dbb2b 100644
> > > --- a/arch/arm/plat-samsung/include/plat/watchdog-reset.h
> > > +++ b/arch/arm/plat-samsung/include/plat/watchdog-reset.h
> > > @@ -10,6 +10,7 @@
> > >   * published by the Free Software Foundation.
> > >  */
> > >
> > > +#include 
> > >  #include 
> > >  #include 
> > >
> > > @@ -19,17 +20,12 @@
> > >
> > >  static inline void arch_wdt_reset(void)
> > >  {
> > > - struct clk *wdtclk;
> > > -
> > >   printk("arch_reset: attempting watchdog reset\n");
> > >
> > >   __raw_writel(0, S3C2410_WTCON);   /* disable watchdog, to be safe
> > */
> > >
> > > - wdtclk = clk_get(NULL, "watchdog");
> > > - if (!IS_ERR(wdtclk)) {
> > > - clk_enable(wdtclk);
> > > - } else
> > > - printk(KERN_WARNING "%s: warning: cannot get watchdog
> > > clock\n", __func__);
> > > + if (s3c2410_wdtclk)
> > > + clk_enable(s3c2410_wdtclk);
> > >
> > >   /* put initial values into count and data */
> > >   __raw_writel(0x80, S3C2410_WTCNT);
> > > --
> > > 1.7.1.569.g6f426
> >
> > Looks good but happens following:
> >
> > Hmm...
> > With s3c2410_defconfig:
> >
> > In file included from arch/arm/plat-s3c24xx/cpu.c:48:
> > arch/arm/plat-samsung/include/plat/clock.h:32: error: redefinition of
> > 'struct clk_ops'
> > arch/arm/plat-samsung/include/plat/clock.h:39: error: redefinition of
> > 'struct clk'
> > arch/arm/plat-samsung/include/plat/clock.h:60: error: conflicting types
for
> > 's3c24xx_dclk0'
> > arch/arm/plat-samsung/include/plat/clock.h:60: note: previous
declaration 

[GIT PULL] Samsung Fixes for v3.1-rc3

2011-08-19 Thread Kukjin Kim
Hi Arnd,

This is pull request for Samsung fixes for v3.1-rc3.

Please pull Samsung fixes from:
  git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung.git
samsung-fixes

These things are for _real_ fixing.

And as a note, following is only for v3.1:

5d747c6 ARM: S5P: fix bug in spdif_clk_get_rate
3f6065d ARM: S5P: add required chained_irq_enter/exit to gpio-int code
70b0e82 ARM: EXYNOS4: add required chained_irq_enter/exit to eint code
995b528 ARM: SAMSUNG: Add chained enrty/exit call to timer interrupt handler
7e1291d ARM: S5PV210: Fix build warning
5a1993f ARM: EXYNOS4: Fix the IRQ definitions for MIPI CSIS device
6b875cb ARM: EXYNOS4: remove duplicated inclusion
af8a9f6 ARM: EXYNOS4: Fix wrong devname to support clkdev
b8a297d ARM: SAMSUNG: Fix Section mismatch in samsung_bl_set()
ac0d151 ARM: S5P64X0: Replace irq_gc_ack() with irq_gc_ack_set_bit()

Of course, others should be fixed on stable kernel.

f98d429 ARM: S3C64XX: Fix build break in PM debug
d2edddf ARM: EXYNOS4: Add restart hook for proper reboot
2b431ff ARM: EXYNOS4: Increase reset delay for USB HOST PHY
c1a238a ARM: EXYNOS4: Use the correct regulator names on universal_c210

So will send above to sta...@kernel.org soon.

If any problems, please let me know.

Thanks.

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

The following changes since commit 93ee7a9340d64f20295aacc3fb6a22b759323280:

  Linux 3.1-rc2 (2011-08-14 15:09:08 -0700)

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

Abhilash Kesavan (2):
  ARM: S5PV210: Fix build warning
  ARM: S3C64XX: Fix build break in PM debug

Huang Weiyi (1):
  ARM: EXYNOS4: remove duplicated inclusion

Jonghwan Choi (1):
  ARM: EXYNOS4: Fix wrong devname to support clkdev

Kukjin Kim (2):
  ARM: S5P64X0: Replace irq_gc_ack() with irq_gc_ack_set_bit()
  ARM: SAMSUNG: Fix Section mismatch in samsung_bl_set()

Kyungmin Park (2):
  ARM: EXYNOS4: Use the correct regulator names on universal_c210
  ARM: EXYNOS4: Add restart hook for proper reboot

Marek Szyprowski (3):
  ARM: SAMSUNG: Add chained enrty/exit call to timer interrupt handler
  ARM: EXYNOS4: add required chained_irq_enter/exit to eint code
  ARM: S5P: add required chained_irq_enter/exit to gpio-int code

Naveen Krishna Chatradhi (1):
  ARM: S5P: fix bug in spdif_clk_get_rate

Sylwester Nawrocki (1):
  ARM: EXYNOS4: Fix the IRQ definitions for MIPI CSIS device

Yulgon Kim (1):
  ARM: EXYNOS4: Increase reset delay for USB HOST PHY

 arch/arm/mach-exynos4/clock.c  |2 +-
 arch/arm/mach-exynos4/cpu.c|   11 ++-
 arch/arm/mach-exynos4/include/mach/irqs.h  |5 ++---
 arch/arm/mach-exynos4/include/mach/regs-pmu.h  |2 ++
 arch/arm/mach-exynos4/irq-eint.c   |7 +++
 arch/arm/mach-exynos4/mach-universal_c210.c|4 ++--
 arch/arm/mach-exynos4/setup-usb-phy.c  |2 +-
 arch/arm/mach-s3c64xx/pm.c |1 +
 arch/arm/mach-s5p64x0/irq-eint.c   |2 +-
 arch/arm/mach-s5pv210/pm.c |2 +-
 arch/arm/plat-s5p/clock.c  |2 +-
 arch/arm/plat-s5p/irq-gpioint.c|6 ++
 arch/arm/plat-samsung/include/plat/backlight.h |2 +-
 arch/arm/plat-samsung/irq-vic-timer.c  |5 +
 14 files changed, 41 insertions(+), 12 deletions(-)

--
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 0/4] ARM: SAMSUNG: Add support CPU ID and Rev. at runtime

2011-08-19 Thread Kukjin Kim
This patch adds support handling of CPU ID and varialble silicon revision
at runtime.

[PATCH 1/4] ARM: SAMSUNG: Add support for detecting CPU at runtime
[PATCH 2/4] ARM: S5P64X0: Use cpu_is_s5p64x0() to distinguish cpu at runtime
[PATCH 3/4] ARM: SAMSUNG: Add support for handling of cpu revision
[PATCH 4/4] ARM: EXYNOS4: Use samsung_rev() to distinguish silicon revision
--
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 2/4] ARM: S5P64X0: Use cpu_is_s5p64x0() to distinguish cpu at runtime

2011-08-19 Thread Kukjin Kim
Signed-off-by: Kukjin Kim 
---
 arch/arm/mach-s5p64x0/dev-spi.c  |8 +++-
 arch/arm/mach-s5p64x0/dma.c  |7 ++-
 arch/arm/mach-s5p64x0/gpiolib.c  |7 ++-
 arch/arm/mach-s5p64x0/irq-eint.c |3 ++-
 4 files changed, 9 insertions(+), 16 deletions(-)

diff --git a/arch/arm/mach-s5p64x0/dev-spi.c b/arch/arm/mach-s5p64x0/dev-spi.c
index ac825e8..aa24442 100644
--- a/arch/arm/mach-s5p64x0/dev-spi.c
+++ b/arch/arm/mach-s5p64x0/dev-spi.c
@@ -21,6 +21,7 @@
 #include 
 #include 
 
+#include 
 #include 
 #include 
 
@@ -185,11 +186,8 @@ struct platform_device s5p64x0_device_spi1 = {
 
 void __init s5p64x0_spi_set_info(int cntrlr, int src_clk_nr, int num_cs)
 {
-   unsigned int id;
struct s3c64xx_spi_info *pd;
 
-   id = __raw_readl(S5P64X0_SYS_ID) & 0xFF000;
-
/* Reject invalid configuration */
if (!num_cs || src_clk_nr < 0
|| src_clk_nr > S5P64X0_SPI_SRCCLK_SCLK) {
@@ -199,7 +197,7 @@ void __init s5p64x0_spi_set_info(int cntrlr, int 
src_clk_nr, int num_cs)
 
switch (cntrlr) {
case 0:
-   if (id == 0x5)
+   if (cpu_is_s5p6450())
pd = &s5p6450_spi0_pdata;
else
pd = &s5p6440_spi0_pdata;
@@ -207,7 +205,7 @@ void __init s5p64x0_spi_set_info(int cntrlr, int 
src_clk_nr, int num_cs)
s5p64x0_device_spi0.dev.platform_data = pd;
break;
case 1:
-   if (id == 0x5)
+   if (cpu_is_s5p6450())
pd = &s5p6450_spi1_pdata;
else
pd = &s5p6440_spi1_pdata;
diff --git a/arch/arm/mach-s5p64x0/dma.c b/arch/arm/mach-s5p64x0/dma.c
index d7ad944..0ac3d59 100644
--- a/arch/arm/mach-s5p64x0/dma.c
+++ b/arch/arm/mach-s5p64x0/dma.c
@@ -28,6 +28,7 @@
 #include 
 #include 
 
+#include 
 #include 
 #include 
 
@@ -133,11 +134,7 @@ static struct platform_device s5p64x0_device_pdma = {
 
 static int __init s5p64x0_dma_init(void)
 {
-   unsigned int id;
-
-   id = __raw_readl(S5P64X0_SYS_ID) & 0xFF000;
-
-   if (id == 0x5)
+   if (cpu_is_s5p6450())
s5p64x0_device_pdma.dev.platform_data = &s5p6450_pdma_pdata;
else
s5p64x0_device_pdma.dev.platform_data = &s5p6440_pdma_pdata;
diff --git a/arch/arm/mach-s5p64x0/gpiolib.c b/arch/arm/mach-s5p64x0/gpiolib.c
index e7fb3b0..c65684e 100644
--- a/arch/arm/mach-s5p64x0/gpiolib.c
+++ b/arch/arm/mach-s5p64x0/gpiolib.c
@@ -19,6 +19,7 @@
 #include 
 #include 
 
+#include 
 #include 
 #include 
 #include 
@@ -473,14 +474,10 @@ static void __init s5p64x0_gpio_add_rbank_4bit2(struct 
s3c_gpio_chip *chip,
 
 static int __init s5p64x0_gpiolib_init(void)
 {
-   unsigned int chipid;
-
-   chipid = __raw_readl(S5P64X0_SYS_ID);
-
s5p64x0_gpiolib_set_cfg(s5p64x0_gpio_cfgs,
ARRAY_SIZE(s5p64x0_gpio_cfgs));
 
-   if ((chipid & 0xff000) == 0x5) {
+   if (cpu_is_s5p6450()) {
samsung_gpiolib_add_2bit_chips(s5p6450_gpio_2bit,
ARRAY_SIZE(s5p6450_gpio_2bit));
 
diff --git a/arch/arm/mach-s5p64x0/irq-eint.c b/arch/arm/mach-s5p64x0/irq-eint.c
index 69ed454..eef01f1 100644
--- a/arch/arm/mach-s5p64x0/irq-eint.c
+++ b/arch/arm/mach-s5p64x0/irq-eint.c
@@ -17,6 +17,7 @@
 #include 
 #include 
 
+#include 
 #include 
 #include 
 
@@ -67,7 +68,7 @@ static int s5p64x0_irq_eint_set_type(struct irq_data *data, 
unsigned int type)
__raw_writel(ctrl, S5P64X0_EINT0CON0);
 
/* Configure the GPIO pin for 6450 or 6440 based on CPU ID */
-   if (0x5 == (__raw_readl(S5P64X0_SYS_ID) & 0xFF000))
+   if (cpu_is_s5p6450())
s3c_gpio_cfgpin(S5P6450_GPN(offs), S3C_GPIO_SFN(2));
else
s3c_gpio_cfgpin(S5P6440_GPN(offs), S3C_GPIO_SFN(2));
-- 
1.7.1

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


[PATCH 3/4] ARM: SAMSUNG: Add support for handling of cpu revision

2011-08-19 Thread Kukjin Kim
This patch adds plat-samsung/cpu.c for detecting of cpu id and
silicon revision.

This patch was originally from Changhwan Youn 

Acked-by: Changhwan Youn 
Cc: Ben Dooks 
Signed-off-by: Kukjin Kim 
---
 arch/arm/mach-s3c64xx/cpu.c  |   10 +
 arch/arm/plat-s3c24xx/cpu.c  |1 +
 arch/arm/plat-s5p/cpu.c  |4 ++-
 arch/arm/plat-samsung/Makefile   |2 +-
 arch/arm/plat-samsung/cpu.c  |   58 ++
 arch/arm/plat-samsung/include/plat/cpu.h |4 ++
 arch/arm/plat-samsung/init.c |1 -
 7 files changed, 69 insertions(+), 11 deletions(-)
 create mode 100644 arch/arm/plat-samsung/cpu.c

diff --git a/arch/arm/mach-s3c64xx/cpu.c b/arch/arm/mach-s3c64xx/cpu.c
index 7b665f3..6c498f9 100644
--- a/arch/arm/mach-s3c64xx/cpu.c
+++ b/arch/arm/mach-s3c64xx/cpu.c
@@ -144,14 +144,8 @@ void __init s3c64xx_init_io(struct map_desc *mach_desc, 
int size)
iotable_init(s3c_iodesc, ARRAY_SIZE(s3c_iodesc));
iotable_init(mach_desc, size);
 
-   samsung_cpu_id = __raw_readl(S3C_VA_SYS + 0x118);
-   if (!samsung_cpu_id) {
-   /* S3C6400 has the ID register in a different place,
-* and needs a write before it can be read. */
-
-   __raw_writel(0x0, S3C_VA_SYS + 0xA1C);
-   samsung_cpu_id = __raw_readl(S3C_VA_SYS + 0xA1C);
-   }
+   /* detect cpu id */
+   s3c64xx_init_cpu();
 
s3c_init_cpu(samsung_cpu_id, cpu_ids, ARRAY_SIZE(cpu_ids));
 }
diff --git a/arch/arm/plat-s3c24xx/cpu.c b/arch/arm/plat-s3c24xx/cpu.c
index ead21a4..3c63353 100644
--- a/arch/arm/plat-s3c24xx/cpu.c
+++ b/arch/arm/plat-s3c24xx/cpu.c
@@ -224,6 +224,7 @@ void __init s3c24xx_init_io(struct map_desc *mach_desc, int 
size)
} else {
samsung_cpu_id = s3c24xx_read_idcode_v4();
}
+   s3c24xx_init_cpu();
 
arm_pm_restart = s3c24xx_pm_restart;
 
diff --git a/arch/arm/plat-s5p/cpu.c b/arch/arm/plat-s5p/cpu.c
index 3ef6734..04392c7 100644
--- a/arch/arm/plat-s5p/cpu.c
+++ b/arch/arm/plat-s5p/cpu.c
@@ -119,6 +119,8 @@ void __init s5p_init_io(struct map_desc *mach_desc,
if (mach_desc)
iotable_init(mach_desc, size);
 
-   samsung_cpu_id = __raw_readl(cpuid_addr);
+   /* detect cpu id and rev. */
+   s5p_init_cpu(cpuid_addr);
+
s3c_init_cpu(samsung_cpu_id, cpu_ids, ARRAY_SIZE(cpu_ids));
 }
diff --git a/arch/arm/plat-samsung/Makefile b/arch/arm/plat-samsung/Makefile
index 853764b..3de756d 100644
--- a/arch/arm/plat-samsung/Makefile
+++ b/arch/arm/plat-samsung/Makefile
@@ -11,7 +11,7 @@ obj-  :=
 
 # Objects we always build independent of SoC choice
 
-obj-y  += init.o
+obj-y  += init.o cpu.o
 obj-$(CONFIG_ARCH_USES_GETTIMEOFFSET)   += time.o
 obj-y  += clock.o
 obj-y  += pwm-clock.o
diff --git a/arch/arm/plat-samsung/cpu.c b/arch/arm/plat-samsung/cpu.c
new file mode 100644
index 000..fb3b293
--- /dev/null
+++ b/arch/arm/plat-samsung/cpu.c
@@ -0,0 +1,58 @@
+/* linux/arch/arm/plat-samsung/cpu.c
+ *
+ * Copyright (c) 2009-2011 Samsung Electronics Co., Ltd.
+ * http://www.samsung.com
+ *
+ * Samsung CPU 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
+ * published by the Free Software Foundation.
+*/
+
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+#include 
+#include 
+
+unsigned long samsung_cpu_id;
+static unsigned int samsung_cpu_rev;
+
+unsigned int samsung_rev(void)
+{
+   return samsung_cpu_rev;
+}
+EXPORT_SYMBOL(samsung_rev);
+
+void __init s3c24xx_init_cpu(void)
+{
+   /* nothing here yet */
+
+   samsung_cpu_rev = 0;
+}
+
+void __init s3c64xx_init_cpu(void)
+{
+   samsung_cpu_id = __raw_readl(S3C_VA_SYS + 0x118);
+   if (!samsung_cpu_id) {
+   /*
+* S3C6400 has the ID register in a different place,
+* and needs a write before it can be read.
+*/
+   __raw_writel(0x0, S3C_VA_SYS + 0xA1C);
+   samsung_cpu_id = __raw_readl(S3C_VA_SYS + 0xA1C);
+   }
+
+   samsung_cpu_rev = 0;
+}
+
+void __init s5p_init_cpu(void __iomem *cpuid_addr)
+{
+   samsung_cpu_id = __raw_readl(cpuid_addr);
+   samsung_cpu_rev = samsung_cpu_id & 0xF;
+}
diff --git a/arch/arm/plat-samsung/include/plat/cpu.h 
b/arch/arm/plat-samsung/include/plat/cpu.h
index b762b37..16238c8 100644
--- a/arch/arm/plat-samsung/include/plat/cpu.h
+++ b/arch/arm/plat-samsung/include/plat/cpu.h
@@ -140,6 +140,10 @@ extern void s3c64xx_init_io(struct map_desc *mach_desc, 
int size);
 extern void s5p_init_io(struct map_desc *mach_desc,
int size, void __iomem *cpuid_addr);
 
+extern void s3c24xx_init_cpu(void);
+extern void s3c64xx_init_cpu(

[PATCH 4/4] ARM: EXYNOS4: Use samsung_rev() to distinguish silicon revision

2011-08-19 Thread Kukjin Kim
This patch uses samsung_rev() to support variable silicon revision of
EXYNOS4210 so that can support for EXYNOS4210 REV0, REV1.0 and REV1.1.

Note: Need to change timer setting on REV0.

Acked-by: Changhwan Youn 
Signed-off-by: Kukjin Kim 
---
 arch/arm/mach-exynos4/cpu.c  |   28 +++-
 arch/arm/mach-exynos4/include/mach/map.h |3 ++-
 arch/arm/mach-exynos4/platsmp.c  |8 ++--
 arch/arm/plat-samsung/include/plat/cpu.h |6 ++
 4 files changed, 37 insertions(+), 8 deletions(-)

diff --git a/arch/arm/mach-exynos4/cpu.c b/arch/arm/mach-exynos4/cpu.c
index 2d8a40c..f188c6d 100644
--- a/arch/arm/mach-exynos4/cpu.c
+++ b/arch/arm/mach-exynos4/cpu.c
@@ -43,11 +43,6 @@ static struct map_desc exynos4_iodesc[] __initdata = {
.length = SZ_4K,
.type   = MT_DEVICE,
}, {
-   .virtual= (unsigned long)S5P_VA_SYSRAM,
-   .pfn= __phys_to_pfn(EXYNOS4_PA_SYSRAM),
-   .length = SZ_4K,
-   .type   = MT_DEVICE,
-   }, {
.virtual= (unsigned long)S5P_VA_CMU,
.pfn= __phys_to_pfn(EXYNOS4_PA_CMU),
.length = SZ_128K,
@@ -128,6 +123,24 @@ static void exynos4_idle(void)
local_irq_enable();
 }
 
+static struct map_desc exynos4_iodesc0[] __initdata = {
+   {
+   .virtual= (unsigned long)S5P_VA_SYSRAM,
+   .pfn= __phys_to_pfn(EXYNOS4_PA_SYSRAM0),
+   .length = SZ_4K,
+   .type   = MT_DEVICE,
+   },
+};
+
+static struct map_desc exynos4_iodesc1[] __initdata = {
+   {
+   .virtual= (unsigned long)S5P_VA_SYSRAM,
+   .pfn= __phys_to_pfn(EXYNOS4_PA_SYSRAM1),
+   .length = SZ_4K,
+   .type   = MT_DEVICE,
+   },
+};
+
 /*
  * exynos4_map_io
  *
@@ -137,6 +150,11 @@ void __init exynos4_map_io(void)
 {
iotable_init(exynos4_iodesc, ARRAY_SIZE(exynos4_iodesc));
 
+   if (samsung_rev() == EXYNOS4210_REV_0)
+   iotable_init(exynos4_iodesc0, ARRAY_SIZE(exynos4_iodesc0));
+   else if (samsung_rev() == EXYNOS4210_REV_1_0)
+   iotable_init(exynos4_iodesc1, ARRAY_SIZE(exynos4_iodesc1));
+
/* initialize device information early */
exynos4_default_sdhci0();
exynos4_default_sdhci1();
diff --git a/arch/arm/mach-exynos4/include/mach/map.h 
b/arch/arm/mach-exynos4/include/mach/map.h
index d32296d..7073ac7 100644
--- a/arch/arm/mach-exynos4/include/mach/map.h
+++ b/arch/arm/mach-exynos4/include/mach/map.h
@@ -23,7 +23,8 @@
 
 #include 
 
-#define EXYNOS4_PA_SYSRAM  0x0202
+#define EXYNOS4_PA_SYSRAM0 0x02025000
+#define EXYNOS4_PA_SYSRAM1 0x0202
 
 #define EXYNOS4_PA_FIMC0   0x1180
 #define EXYNOS4_PA_FIMC1   0x1181
diff --git a/arch/arm/mach-exynos4/platsmp.c b/arch/arm/mach-exynos4/platsmp.c
index 7c2282c..96cc651 100644
--- a/arch/arm/mach-exynos4/platsmp.c
+++ b/arch/arm/mach-exynos4/platsmp.c
@@ -30,9 +30,12 @@
 #include 
 #include 
 
+#include 
+
 extern void exynos4_secondary_startup(void);
 
-#define CPU1_BOOT_REG S5P_VA_SYSRAM
+#define CPU1_BOOT_REG  (samsung_rev() == EXYNOS4210_REV_1_1 ? \
+   S5P_INFORM5 : S5P_VA_SYSRAM)
 
 /*
  * control for which core is the next to come out of the secondary
@@ -216,5 +219,6 @@ void __init platform_smp_prepare_cpus(unsigned int max_cpus)
 * until it receives a soft interrupt, and then the
 * secondary CPU branches to this address.
 */
-   __raw_writel(BSYM(virt_to_phys(exynos4_secondary_startup)), 
S5P_VA_SYSRAM);
+   __raw_writel(BSYM(virt_to_phys(exynos4_secondary_startup)),
+   CPU1_BOOT_REG);
 }
diff --git a/arch/arm/plat-samsung/include/plat/cpu.h 
b/arch/arm/plat-samsung/include/plat/cpu.h
index 16238c8..b0d3d59 100644
--- a/arch/arm/plat-samsung/include/plat/cpu.h
+++ b/arch/arm/plat-samsung/include/plat/cpu.h
@@ -100,6 +100,10 @@ IS_SAMSUNG_CPU(exynos4210, EXYNOS4210_CPU_ID, 
EXYNOS4_CPU_MASK)
 # define cpu_is_exynos4210()   0
 #endif
 
+#define EXYNOS4210_REV_0   (0x0)
+#define EXYNOS4210_REV_1_0 (0x2)
+#define EXYNOS4210_REV_1_1 (0x3)
+
 #define IODESC_ENT(x) { (unsigned long)S3C24XX_VA_##x, 
__phys_to_pfn(S3C24XX_PA_##x), S3C24XX_SZ_##x, MT_DEVICE }
 
 #ifndef MHZ
@@ -144,6 +148,8 @@ extern void s3c24xx_init_cpu(void);
 extern void s3c64xx_init_cpu(void);
 extern void s5p_init_cpu(void __iomem *cpuid_addr);
 
+extern unsigned int samsung_rev(void);
+
 extern void s3c24xx_init_uarts(struct s3c2410_uartcfg *cfg, int no);
 
 extern void s3c24xx_init_clocks(int xtal);
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.

[PATCH 1/4] ARM: SAMSUNG: Add support for detecting CPU at runtime

2011-08-19 Thread Kukjin Kim
The cpu_is_[name]() can be used to distinguish cpu at runtime.

This patch was originally from Changhwan Youn 

Acked-by: Changhwan Youn 
Cc: Ben Dooks 
Signed-off-by: Kukjin Kim 
---
 arch/arm/mach-s3c64xx/cpu.c  |   18 +++
 arch/arm/plat-s3c24xx/cpu.c  |8 +--
 arch/arm/plat-s5p/cpu.c  |   26 -
 arch/arm/plat-samsung/include/plat/cpu.h |   87 +-
 arch/arm/plat-samsung/init.c |1 +
 5 files changed, 110 insertions(+), 30 deletions(-)

diff --git a/arch/arm/mach-s3c64xx/cpu.c b/arch/arm/mach-s3c64xx/cpu.c
index 374e45e..7b665f3 100644
--- a/arch/arm/mach-s3c64xx/cpu.c
+++ b/arch/arm/mach-s3c64xx/cpu.c
@@ -43,16 +43,16 @@ static const char name_s3c6410[] = "S3C6410";
 
 static struct cpu_table cpu_ids[] __initdata = {
{
-   .idcode = 0x3640,
-   .idmask = 0xf000,
+   .idcode = S3C6400_CPU_ID,
+   .idmask = S3C64XX_CPU_MASK,
.map_io = s3c6400_map_io,
.init_clocks= s3c6400_init_clocks,
.init_uarts = s3c6400_init_uarts,
.init   = s3c6400_init,
.name   = name_s3c6400,
}, {
-   .idcode = 0x36410100,
-   .idmask = 0xff00,
+   .idcode = S3C6410_CPU_ID,
+   .idmask = S3C64XX_CPU_MASK,
.map_io = s3c6410_map_io,
.init_clocks= s3c6410_init_clocks,
.init_uarts = s3c6410_init_uarts,
@@ -140,22 +140,20 @@ void __init s3c6400_common_init_uarts(struct 
s3c2410_uartcfg *cfg, int no)
 
 void __init s3c64xx_init_io(struct map_desc *mach_desc, int size)
 {
-   unsigned long idcode;
-
/* initialise the io descriptors we need for initialisation */
iotable_init(s3c_iodesc, ARRAY_SIZE(s3c_iodesc));
iotable_init(mach_desc, size);
 
-   idcode = __raw_readl(S3C_VA_SYS + 0x118);
-   if (!idcode) {
+   samsung_cpu_id = __raw_readl(S3C_VA_SYS + 0x118);
+   if (!samsung_cpu_id) {
/* S3C6400 has the ID register in a different place,
 * and needs a write before it can be read. */
 
__raw_writel(0x0, S3C_VA_SYS + 0xA1C);
-   idcode = __raw_readl(S3C_VA_SYS + 0xA1C);
+   samsung_cpu_id = __raw_readl(S3C_VA_SYS + 0xA1C);
}
 
-   s3c_init_cpu(idcode, cpu_ids, ARRAY_SIZE(cpu_ids));
+   s3c_init_cpu(samsung_cpu_id, cpu_ids, ARRAY_SIZE(cpu_ids));
 }
 
 static __init int s3c64xx_sysdev_init(void)
diff --git a/arch/arm/plat-s3c24xx/cpu.c b/arch/arm/plat-s3c24xx/cpu.c
index c1fc6c6..ead21a4 100644
--- a/arch/arm/plat-s3c24xx/cpu.c
+++ b/arch/arm/plat-s3c24xx/cpu.c
@@ -215,19 +215,17 @@ static void s3c24xx_pm_restart(char mode, const char *cmd)
 
 void __init s3c24xx_init_io(struct map_desc *mach_desc, int size)
 {
-   unsigned long idcode = 0x0;
-
/* initialise the io descriptors we need for initialisation */
iotable_init(mach_desc, size);
iotable_init(s3c_iodesc, ARRAY_SIZE(s3c_iodesc));
 
if (cpu_architecture() >= CPU_ARCH_ARMv5) {
-   idcode = s3c24xx_read_idcode_v5();
+   samsung_cpu_id = s3c24xx_read_idcode_v5();
} else {
-   idcode = s3c24xx_read_idcode_v4();
+   samsung_cpu_id = s3c24xx_read_idcode_v4();
}
 
arm_pm_restart = s3c24xx_pm_restart;
 
-   s3c_init_cpu(idcode, cpu_ids, ARRAY_SIZE(cpu_ids));
+   s3c_init_cpu(samsung_cpu_id, cpu_ids, ARRAY_SIZE(cpu_ids));
 }
diff --git a/arch/arm/plat-s5p/cpu.c b/arch/arm/plat-s5p/cpu.c
index bbc2aa7..3ef6734 100644
--- a/arch/arm/plat-s5p/cpu.c
+++ b/arch/arm/plat-s5p/cpu.c
@@ -36,40 +36,40 @@ static const char name_exynos4210[] = "EXYNOS4210";
 
 static struct cpu_table cpu_ids[] __initdata = {
{
-   .idcode = 0x56440100,
-   .idmask = 0xf000,
+   .idcode = S5P6440_CPU_ID,
+   .idmask = S5P64XX_CPU_MASK,
.map_io = s5p6440_map_io,
.init_clocks= s5p6440_init_clocks,
.init_uarts = s5p6440_init_uarts,
.init   = s5p64x0_init,
.name   = name_s5p6440,
}, {
-   .idcode = 0x3645,
-   .idmask = 0xf000,
+   .idcode = S5P6450_CPU_ID,
+   .idmask = S5P64XX_CPU_MASK,
.map_io = s5p6450_map_io,
.init_clocks= s5p6450_init_clocks,
.init_uarts = s5p6450_init_uarts,
.init   = s5p64x0_init,
.name   = name_s5p6450,
}, {
-   .idcode = 0x4310,
-   .idma

RE: [PATCH 1/4] ARM: SAMSUNG: Add support for detecting CPU at runtime

2011-08-22 Thread Kukjin Kim
Russell King - ARM Linux wrote:
> 
> On Sat, Aug 20, 2011 at 02:05:56PM +0900, Kukjin Kim wrote:
> > The cpu_is_[name]() can be used to distinguish cpu at runtime.
> 
> This really should be soc_is_xxx().  The CPU is stuff like ARM920, ARM926,
> Cortex-A9 etc.  The SoC is the CPU plus the peripherals.
> 
> S3C6410 describes the entire SoC, not just the CPU.

OK and will address comments from you.

Russell, I'm not sure it is required to change CPU_XXX such as
CPU_EXYNOS4210 to SOC_XXX in Kconfig.

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 V2 1/4] ARM: SAMSUNG: Add support for detecting CPU at runtime

2011-08-22 Thread Kukjin Kim
The soc_is_[name]() can be used to distinguish cpu at runtime.

This patch was originally from Changhwan Youn 

Acked-by: Changhwan Youn 
Cc: Ben Dooks 
Signed-off-by: Kukjin Kim 
---
Changes since v1:
- soc_is_xxx() is used instead of cpu_is_xxx()

 arch/arm/mach-s3c64xx/cpu.c  |   18 +++
 arch/arm/plat-s3c24xx/cpu.c  |8 +--
 arch/arm/plat-s5p/cpu.c  |   26 -
 arch/arm/plat-samsung/include/plat/cpu.h |   87 +-
 arch/arm/plat-samsung/init.c |1 +
 5 files changed, 110 insertions(+), 30 deletions(-)

diff --git a/arch/arm/mach-s3c64xx/cpu.c b/arch/arm/mach-s3c64xx/cpu.c
index 374e45e..7b665f3 100644
--- a/arch/arm/mach-s3c64xx/cpu.c
+++ b/arch/arm/mach-s3c64xx/cpu.c
@@ -43,16 +43,16 @@ static const char name_s3c6410[] = "S3C6410";
 
 static struct cpu_table cpu_ids[] __initdata = {
{
-   .idcode = 0x3640,
-   .idmask = 0xf000,
+   .idcode = S3C6400_CPU_ID,
+   .idmask = S3C64XX_CPU_MASK,
.map_io = s3c6400_map_io,
.init_clocks= s3c6400_init_clocks,
.init_uarts = s3c6400_init_uarts,
.init   = s3c6400_init,
.name   = name_s3c6400,
}, {
-   .idcode = 0x36410100,
-   .idmask = 0xff00,
+   .idcode = S3C6410_CPU_ID,
+   .idmask = S3C64XX_CPU_MASK,
.map_io = s3c6410_map_io,
.init_clocks= s3c6410_init_clocks,
.init_uarts = s3c6410_init_uarts,
@@ -140,22 +140,20 @@ void __init s3c6400_common_init_uarts(struct 
s3c2410_uartcfg *cfg, int no)
 
 void __init s3c64xx_init_io(struct map_desc *mach_desc, int size)
 {
-   unsigned long idcode;
-
/* initialise the io descriptors we need for initialisation */
iotable_init(s3c_iodesc, ARRAY_SIZE(s3c_iodesc));
iotable_init(mach_desc, size);
 
-   idcode = __raw_readl(S3C_VA_SYS + 0x118);
-   if (!idcode) {
+   samsung_cpu_id = __raw_readl(S3C_VA_SYS + 0x118);
+   if (!samsung_cpu_id) {
/* S3C6400 has the ID register in a different place,
 * and needs a write before it can be read. */
 
__raw_writel(0x0, S3C_VA_SYS + 0xA1C);
-   idcode = __raw_readl(S3C_VA_SYS + 0xA1C);
+   samsung_cpu_id = __raw_readl(S3C_VA_SYS + 0xA1C);
}
 
-   s3c_init_cpu(idcode, cpu_ids, ARRAY_SIZE(cpu_ids));
+   s3c_init_cpu(samsung_cpu_id, cpu_ids, ARRAY_SIZE(cpu_ids));
 }
 
 static __init int s3c64xx_sysdev_init(void)
diff --git a/arch/arm/plat-s3c24xx/cpu.c b/arch/arm/plat-s3c24xx/cpu.c
index c1fc6c6..ead21a4 100644
--- a/arch/arm/plat-s3c24xx/cpu.c
+++ b/arch/arm/plat-s3c24xx/cpu.c
@@ -215,19 +215,17 @@ static void s3c24xx_pm_restart(char mode, const char *cmd)
 
 void __init s3c24xx_init_io(struct map_desc *mach_desc, int size)
 {
-   unsigned long idcode = 0x0;
-
/* initialise the io descriptors we need for initialisation */
iotable_init(mach_desc, size);
iotable_init(s3c_iodesc, ARRAY_SIZE(s3c_iodesc));
 
if (cpu_architecture() >= CPU_ARCH_ARMv5) {
-   idcode = s3c24xx_read_idcode_v5();
+   samsung_cpu_id = s3c24xx_read_idcode_v5();
} else {
-   idcode = s3c24xx_read_idcode_v4();
+   samsung_cpu_id = s3c24xx_read_idcode_v4();
}
 
arm_pm_restart = s3c24xx_pm_restart;
 
-   s3c_init_cpu(idcode, cpu_ids, ARRAY_SIZE(cpu_ids));
+   s3c_init_cpu(samsung_cpu_id, cpu_ids, ARRAY_SIZE(cpu_ids));
 }
diff --git a/arch/arm/plat-s5p/cpu.c b/arch/arm/plat-s5p/cpu.c
index bbc2aa7..3ef6734 100644
--- a/arch/arm/plat-s5p/cpu.c
+++ b/arch/arm/plat-s5p/cpu.c
@@ -36,40 +36,40 @@ static const char name_exynos4210[] = "EXYNOS4210";
 
 static struct cpu_table cpu_ids[] __initdata = {
{
-   .idcode = 0x56440100,
-   .idmask = 0xf000,
+   .idcode = S5P6440_CPU_ID,
+   .idmask = S5P64XX_CPU_MASK,
.map_io = s5p6440_map_io,
.init_clocks= s5p6440_init_clocks,
.init_uarts = s5p6440_init_uarts,
.init   = s5p64x0_init,
.name   = name_s5p6440,
}, {
-   .idcode = 0x3645,
-   .idmask = 0xf000,
+   .idcode = S5P6450_CPU_ID,
+   .idmask = S5P64XX_CPU_MASK,
.map_io = s5p6450_map_io,
.init_clocks= s5p6450_init_clocks,
.init_uarts = s5p6450_init_uarts,
.init   = s5p64x0_init,
.name   = name_s5p6450,
}, {

[PATCH V2 2/4] ARM: S5P64X0: Use soc_is_s5p64x0() to distinguish cpu at runtime

2011-08-22 Thread Kukjin Kim
Signed-off-by: Kukjin Kim 
---
Changes since v1:
- soc_is_s5p64x0() is used instead of cpu_is_s5p64x0()

 arch/arm/mach-s5p64x0/dev-spi.c  |8 +++-
 arch/arm/mach-s5p64x0/dma.c  |7 ++-
 arch/arm/mach-s5p64x0/gpiolib.c  |7 ++-
 arch/arm/mach-s5p64x0/irq-eint.c |3 ++-
 4 files changed, 9 insertions(+), 16 deletions(-)

diff --git a/arch/arm/mach-s5p64x0/dev-spi.c b/arch/arm/mach-s5p64x0/dev-spi.c
index ac825e8..1fd9c79 100644
--- a/arch/arm/mach-s5p64x0/dev-spi.c
+++ b/arch/arm/mach-s5p64x0/dev-spi.c
@@ -21,6 +21,7 @@
 #include 
 #include 
 
+#include 
 #include 
 #include 
 
@@ -185,11 +186,8 @@ struct platform_device s5p64x0_device_spi1 = {
 
 void __init s5p64x0_spi_set_info(int cntrlr, int src_clk_nr, int num_cs)
 {
-   unsigned int id;
struct s3c64xx_spi_info *pd;
 
-   id = __raw_readl(S5P64X0_SYS_ID) & 0xFF000;
-
/* Reject invalid configuration */
if (!num_cs || src_clk_nr < 0
|| src_clk_nr > S5P64X0_SPI_SRCCLK_SCLK) {
@@ -199,7 +197,7 @@ void __init s5p64x0_spi_set_info(int cntrlr, int 
src_clk_nr, int num_cs)
 
switch (cntrlr) {
case 0:
-   if (id == 0x5)
+   if (soc_is_s5p6450())
pd = &s5p6450_spi0_pdata;
else
pd = &s5p6440_spi0_pdata;
@@ -207,7 +205,7 @@ void __init s5p64x0_spi_set_info(int cntrlr, int 
src_clk_nr, int num_cs)
s5p64x0_device_spi0.dev.platform_data = pd;
break;
case 1:
-   if (id == 0x5)
+   if (soc_is_s5p6450())
pd = &s5p6450_spi1_pdata;
else
pd = &s5p6440_spi1_pdata;
diff --git a/arch/arm/mach-s5p64x0/dma.c b/arch/arm/mach-s5p64x0/dma.c
index d7ad944..0e5b3e6 100644
--- a/arch/arm/mach-s5p64x0/dma.c
+++ b/arch/arm/mach-s5p64x0/dma.c
@@ -28,6 +28,7 @@
 #include 
 #include 
 
+#include 
 #include 
 #include 
 
@@ -133,11 +134,7 @@ static struct platform_device s5p64x0_device_pdma = {
 
 static int __init s5p64x0_dma_init(void)
 {
-   unsigned int id;
-
-   id = __raw_readl(S5P64X0_SYS_ID) & 0xFF000;
-
-   if (id == 0x5)
+   if (soc_is_s5p6450())
s5p64x0_device_pdma.dev.platform_data = &s5p6450_pdma_pdata;
else
s5p64x0_device_pdma.dev.platform_data = &s5p6440_pdma_pdata;
diff --git a/arch/arm/mach-s5p64x0/gpiolib.c b/arch/arm/mach-s5p64x0/gpiolib.c
index e7fb3b0..700dac6 100644
--- a/arch/arm/mach-s5p64x0/gpiolib.c
+++ b/arch/arm/mach-s5p64x0/gpiolib.c
@@ -19,6 +19,7 @@
 #include 
 #include 
 
+#include 
 #include 
 #include 
 #include 
@@ -473,14 +474,10 @@ static void __init s5p64x0_gpio_add_rbank_4bit2(struct 
s3c_gpio_chip *chip,
 
 static int __init s5p64x0_gpiolib_init(void)
 {
-   unsigned int chipid;
-
-   chipid = __raw_readl(S5P64X0_SYS_ID);
-
s5p64x0_gpiolib_set_cfg(s5p64x0_gpio_cfgs,
ARRAY_SIZE(s5p64x0_gpio_cfgs));
 
-   if ((chipid & 0xff000) == 0x5) {
+   if (soc_is_s5p6450()) {
samsung_gpiolib_add_2bit_chips(s5p6450_gpio_2bit,
ARRAY_SIZE(s5p6450_gpio_2bit));
 
diff --git a/arch/arm/mach-s5p64x0/irq-eint.c b/arch/arm/mach-s5p64x0/irq-eint.c
index 69ed454..94104c4 100644
--- a/arch/arm/mach-s5p64x0/irq-eint.c
+++ b/arch/arm/mach-s5p64x0/irq-eint.c
@@ -17,6 +17,7 @@
 #include 
 #include 
 
+#include 
 #include 
 #include 
 
@@ -67,7 +68,7 @@ static int s5p64x0_irq_eint_set_type(struct irq_data *data, 
unsigned int type)
__raw_writel(ctrl, S5P64X0_EINT0CON0);
 
/* Configure the GPIO pin for 6450 or 6440 based on CPU ID */
-   if (0x5 == (__raw_readl(S5P64X0_SYS_ID) & 0xFF000))
+   if (soc_is_s5p6450())
s3c_gpio_cfgpin(S5P6450_GPN(offs), S3C_GPIO_SFN(2));
else
s3c_gpio_cfgpin(S5P6440_GPN(offs), S3C_GPIO_SFN(2));
-- 
1.7.1

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


RE: [PATCH 1/4] S3C2443: Move i2s clock definitions to common code

2011-08-22 Thread Kukjin Kim
Heiko Stübner wrote:
> 
> Am Sonntag 21 August 2011, 19:13:32 schrieb Russell King - ARM Linux:
> > On Sat, Aug 20, 2011 at 06:01:29PM +0200, Heiko Stübner wrote:
> > > +/* i2s-ref
> > > + *
> > > + * i2s bus reference clock, selectable from external, esysclk or
epllref
> > > + *
> > > + * Note, this used to be two clocks, but was compressed into one.
> > > +*/
> > > +
> > > +struct clk *clk_i2s_srclist[] = {
> > > + [0] = &clk_i2s_eplldiv.clk,
> > > + [1] = &clk_i2s_ext,
> > > + [2] = &clk_epllref.clk,
> > > + [3] = &clk_epllref.clk,
> > > +};
> >
> > Is there any reason not to make this static (have you run your patch
> > through checkpatch.pl ?)
> Yep I did run all of them through checkpatch (after beeing scolded last
time)
> and it didn't report anything.
> 

Hmm...as a note, happened following with checkpatch.pl :(

ERROR: need consistent spacing around '*' (ctx:WxV)
#35: FILE: arch/arm/mach-s3c2416/clock.c:57:
+   .sources = (struct clk *[]) {
           ^

total: 1 errors, 0 warnings, 38 lines checked

PATCH 34 S3C2416 Add HSSPI clock sourced from EPLL.txt has style problems,
please review.

Thanks.

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


> But for this move of code I simply grabbed the code fragments and put them
> into their new location (i.e. it was this way in mach-s3c2443/clock.c) and
> should have probably taken a closer look at what I'm moving.
> 
> So it seems you are right, it should probably be static as everything else
is
> also static.
> 
> 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: S5P: Remove duplicate kdiv calculation

2011-08-23 Thread Kukjin Kim
jhbird.c...@samsung.com wrote:
> 
> From: Jonghwan Choi 
> 
> Signed-off-by: Jonghwan Choi 
> ---
>  arch/arm/plat-s5p/include/plat/pll.h |1 -
>  1 files changed, 0 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/arm/plat-s5p/include/plat/pll.h
b/arch/arm/plat-s5p/include/plat/pll.h
> index bf28fad..ebc142c 100644
> --- a/arch/arm/plat-s5p/include/plat/pll.h
> +++ b/arch/arm/plat-s5p/include/plat/pll.h
> @@ -72,7 +72,6 @@ static inline unsigned long s5p_get_pll46xx(unsigned
long
> baseclk,
>   mdiv = (pll_con0 >> PLL46XX_MDIV_SHIFT) & PLL46XX_MDIV_MASK;
>   pdiv = (pll_con0 >> PLL46XX_PDIV_SHIFT) & PLL46XX_PDIV_MASK;
>   sdiv = (pll_con0 >> PLL46XX_SDIV_SHIFT) & PLL46XX_SDIV_MASK;
> - kdiv = pll_con1 & PLL46XX_KDIV_MASK;
> 
>   if (pll_type == pll_4650c)
>   kdiv = pll_con1 & PLL4650C_KDIV_MASK;
> --
> 1.7.0

Yes, OK.
Applied, thanks.

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

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


RE: [PATCH] ARM: EXYNOS4: Fix wrong pll type for vpll

2011-08-23 Thread Kukjin Kim
jhbird.c...@samsung.com wrote:
> 
> From: Jonghwan Choi 
> 
> Signed-off-by: Jonghwan Choi 
> ---
>  arch/arm/mach-exynos4/clock.c |2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/arm/mach-exynos4/clock.c b/arch/arm/mach-exynos4/clock.c
> index 851dea0..0b39860 100644
> --- a/arch/arm/mach-exynos4/clock.c
> +++ b/arch/arm/mach-exynos4/clock.c
> @@ -1160,7 +1160,7 @@ void __init_or_cpufreq exynos4_setup_clocks(void)
> 
>   vpllsrc = clk_get_rate(&clk_vpllsrc.clk);
>   vpll = s5p_get_pll46xx(vpllsrc, __raw_readl(S5P_VPLL_CON0),
> - __raw_readl(S5P_VPLL_CON1), pll_4650);
> + __raw_readl(S5P_VPLL_CON1), pll_4650c);
> 
>   clk_fout_apll.ops = &exynos4_fout_apll_ops;
>   clk_fout_mpll.rate = mpll;
> --
> 1.7.0

Hi,

OK, will apply.

But would be helpful understanding if you could add git message in detail
like following...
"The PLL4650C is used for VPLL on EXYNOS4 so should be fixed"...I will add
this when apply.

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] ARM: EXYNOS4: Fix return type of local_timer_setup()

2011-08-24 Thread Kukjin Kim
According to commmit af90f10d ("ARM: 6759/1: smp: Select
local timers vs broadcast timer support"), the return type
of local_timer_setup() should be int instead of void.

Reported-by: Changhwan Youn 
Signed-off-by: Kukjin Kim 
---
 arch/arm/mach-exynos4/mct.c |4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-exynos4/mct.c b/arch/arm/mach-exynos4/mct.c
index 1ae059b..f3638fa 100644
--- a/arch/arm/mach-exynos4/mct.c
+++ b/arch/arm/mach-exynos4/mct.c
@@ -389,9 +389,11 @@ static void exynos4_mct_tick_init(struct 
clock_event_device *evt)
 }
 
 /* Setup the local clock events for a CPU */
-void __cpuinit local_timer_setup(struct clock_event_device *evt)
+int __cpuinit local_timer_setup(struct clock_event_device *evt)
 {
exynos4_mct_tick_init(evt);
+
+   return 0;
 }
 
 int local_timer_ack(void)
-- 
1.7.1

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


RE: [PATCH 3/4] ARM: SAMSUNG: Add support for handling of cpu revision

2011-08-24 Thread Kukjin Kim
Kukjin Kim wrote:
> 
> This patch adds plat-samsung/cpu.c for detecting of cpu id and
> silicon revision.
> 
> This patch was originally from Changhwan Youn 
> 
> Acked-by: Changhwan Youn 
> Cc: Ben Dooks 
> Signed-off-by: Kukjin Kim 
> ---

(snip)

> +void __init s5p_init_cpu(void __iomem *cpuid_addr)
> +{
> + samsung_cpu_id = __raw_readl(cpuid_addr);
> + samsung_cpu_rev = samsung_cpu_id & 0xF;

Oops, should be 0xFF not 0xF.

Thanks.

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

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


RE: [PATCH 4/4] ARM: EXYNOS4: Use samsung_rev() to distinguish silicon revision

2011-08-24 Thread Kukjin Kim
Kukjin Kim wrote:
> 
> This patch uses samsung_rev() to support variable silicon revision of
> EXYNOS4210 so that can support for EXYNOS4210 REV0, REV1.0 and REV1.1.
> 
> Note: Need to change timer setting on REV0.
> 
> Acked-by: Changhwan Youn 
> Signed-off-by: Kukjin Kim 
> ---

(snip)

> +#define EXYNOS4210_REV_1_0   (0x2)
> +#define EXYNOS4210_REV_1_1   (0x3)

Should be following...

+#define EXYNOS4210_REV_1_0 (0x10)
+#define EXYNOS4210_REV_1_1 (0x11)

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 5/5] tty: Add support serial for EXYNOS4212 SoC

2011-08-24 Thread Kukjin Kim
According to add support EXYNOS4212 SoC, we need to enable
SERIAL_S5PV210 on EXYNOS4212.

Cc: Alan Cox 
Cc: Greg Kroah-Hartman 
Signed-off-by: Kukjin Kim 
---
 drivers/tty/serial/Kconfig |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig
index 4dcb37b..bff6943 100644
--- a/drivers/tty/serial/Kconfig
+++ b/drivers/tty/serial/Kconfig
@@ -522,8 +522,8 @@ config SERIAL_S3C6400
 
 config SERIAL_S5PV210
tristate "Samsung S5PV210 Serial port support"
-   depends on SERIAL_SAMSUNG && (CPU_S5PV210 || CPU_EXYNOS4210)
-   select SERIAL_SAMSUNG_UARTS_4 if (CPU_S5PV210 || CPU_EXYNOS4210)
+   depends on SERIAL_SAMSUNG && (CPU_S5PV210 || CPU_EXYNOS4210 || 
SOC_EXYNOS4212)
+   select SERIAL_SAMSUNG_UARTS_4 if (CPU_S5PV210 || CPU_EXYNOS4210 || 
SOC_EXYNOS4212)
default y
help
  Serial port support for Samsung's S5P Family of SoC's
-- 
1.7.1

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


[PATCH 4/5] ARM: EXYNOS4: Add support SMDK4212 Board

2011-08-24 Thread Kukjin Kim
This patch adds mach-smdk4212.c to support SMDK4212 board.
Now it can support HSMMCs, I2Cs, RTC, WDT and Keypad. Other
features will be supported next time.

Signed-off-by: Kukjin Kim 
---
 arch/arm/mach-exynos4/Kconfig |   25 +++
 arch/arm/mach-exynos4/Makefile|2 +
 arch/arm/mach-exynos4/mach-smdk4212.c |  292 +
 3 files changed, 319 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-exynos4/mach-smdk4212.c

diff --git a/arch/arm/mach-exynos4/Kconfig b/arch/arm/mach-exynos4/Kconfig
index 0b40289..f4ec583 100644
--- a/arch/arm/mach-exynos4/Kconfig
+++ b/arch/arm/mach-exynos4/Kconfig
@@ -116,6 +116,8 @@ config EXYNOS4_SETUP_USB_PHY
 
 menu "EXYNOS4 Machines"
 
+comment "EXYNOS4210 Boards"
+
 config MACH_SMDKC210
bool "SMDKC210"
select MACH_SMDKV310
@@ -208,6 +210,29 @@ config MACH_NURI
help
  Machine support for Samsung Mobile NURI Board.
 
+comment "EXYNOS4212 Boards"
+
+config MACH_SMDK4212
+   bool "SMDK4212"
+   select SOC_EXYNOS4212
+   select S3C_DEV_HSMMC2
+   select S3C_DEV_HSMMC3
+   select S3C_DEV_I2C1
+   select S3C_DEV_I2C3
+   select S3C_DEV_I2C7
+   select S3C_DEV_RTC
+   select S3C_DEV_WDT
+   select SAMSUNG_DEV_BACKLIGHT
+   select SAMSUNG_DEV_KEYPAD
+   select SAMSUNG_DEV_PWM
+   select EXYNOS4_SETUP_I2C1
+   select EXYNOS4_SETUP_I2C3
+   select EXYNOS4_SETUP_I2C7
+   select EXYNOS4_SETUP_KEYPAD
+   select EXYNOS4_SETUP_SDHCI
+   help
+ Machine support for Samsung SMDK4212
+
 endmenu
 
 comment "Configuration for HSMMC bus width"
diff --git a/arch/arm/mach-exynos4/Makefile b/arch/arm/mach-exynos4/Makefile
index 4624457..64ffad4 100644
--- a/arch/arm/mach-exynos4/Makefile
+++ b/arch/arm/mach-exynos4/Makefile
@@ -33,6 +33,8 @@ obj-$(CONFIG_MACH_ARMLEX4210) += mach-armlex4210.o
 obj-$(CONFIG_MACH_UNIVERSAL_C210)  += mach-universal_c210.o
 obj-$(CONFIG_MACH_NURI)+= mach-nuri.o
 
+obj-$(CONFIG_MACH_SMDK4212)+= mach-smdk4212.o
+
 # device support
 
 obj-y  += dev-audio.o
diff --git a/arch/arm/mach-exynos4/mach-smdk4212.c 
b/arch/arm/mach-exynos4/mach-smdk4212.c
new file mode 100644
index 000..3479a93
--- /dev/null
+++ b/arch/arm/mach-exynos4/mach-smdk4212.c
@@ -0,0 +1,292 @@
+/*
+ * linux/arch/arm/mach-exynos4/mach-smdk4212.c
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd.
+ * http://www.samsung.com
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+*/
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+/* Following are default values for UCON, ULCON and UFCON UART registers */
+#define SMDK4212_UCON_DEFAULT  (S3C2410_UCON_TXILEVEL |\
+S3C2410_UCON_RXILEVEL |\
+S3C2410_UCON_TXIRQMODE |   \
+S3C2410_UCON_RXIRQMODE |   \
+S3C2410_UCON_RXFIFO_TOI |  \
+S3C2443_UCON_RXERR_IRQEN)
+
+#define SMDK4212_ULCON_DEFAULT S3C2410_LCON_CS8
+
+#define SMDK4212_UFCON_DEFAULT (S3C2410_UFCON_FIFOMODE |   \
+S5PV210_UFCON_TXTRIG4 |\
+S5PV210_UFCON_RXTRIG4)
+
+static struct s3c2410_uartcfg smdk4212_uartcfgs[] __initdata = {
+   [0] = {
+   .hwport = 0,
+   .flags  = 0,
+   .ucon   = SMDK4212_UCON_DEFAULT,
+   .ulcon  = SMDK4212_ULCON_DEFAULT,
+   .ufcon  = SMDK4212_UFCON_DEFAULT,
+   },
+   [1] = {
+   .hwport = 1,
+   .flags  = 0,
+   .ucon   = SMDK4212_UCON_DEFAULT,
+   .ulcon  = SMDK4212_ULCON_DEFAULT,
+   .ufcon  = SMDK4212_UFCON_DEFAULT,
+   },
+   [2] = {
+   .hwport = 2,
+   .flags  = 0,
+   .ucon   = SMDK4212_UCON_DEFAULT,
+   .ulcon  = SMDK4212_ULCON_DEFAULT,
+   .ufcon  = SMDK4212_UFCON_DEFAULT,
+   },
+   [3] = {
+   .hwport = 3,
+   .flags  = 0,
+   .ucon   = SMDK4212_UCON_DEFAULT,
+   .ulcon  = SMDK4212_ULCON_DEFAULT,
+   .ufcon  = SMDK4212_UFCON_DEFAULT,
+   },
+};
+
+static struct s3c_sdhci_platdata smdk4212_hsmmc2_pdata __initdata

[PATCH 1/5] ARM: EXYNOS4: Add support new EXYNOS4212 SoC

2011-08-24 Thread Kukjin Kim
This patch adds Samsung EXYNOS4212 SoC support.
The EXYNOS4212 integrates a ARM Cortex A9 multi-core.

Signed-off-by: Kukjin Kim 
---
 arch/arm/mach-exynos4/Kconfig|5 +
 arch/arm/mach-exynos4/Makefile   |6 --
 arch/arm/mach-exynos4/cpu.c  |6 +-
 arch/arm/plat-s5p/cpu.c  |9 +
 arch/arm/plat-s5p/include/plat/exynos4.h |3 +--
 arch/arm/plat-samsung/include/plat/cpu.h |8 
 6 files changed, 32 insertions(+), 5 deletions(-)

diff --git a/arch/arm/mach-exynos4/Kconfig b/arch/arm/mach-exynos4/Kconfig
index bee8f77..0b40289 100644
--- a/arch/arm/mach-exynos4/Kconfig
+++ b/arch/arm/mach-exynos4/Kconfig
@@ -15,6 +15,11 @@ config CPU_EXYNOS4210
help
  Enable EXYNOS4210 CPU support
 
+config SOC_EXYNOS4212
+   bool
+   help
+ Enable EXYNOS4212 SoC support
+
 config EXYNOS4_MCT
bool
default y
diff --git a/arch/arm/mach-exynos4/Makefile b/arch/arm/mach-exynos4/Makefile
index e3e93ea..4624457 100644
--- a/arch/arm/mach-exynos4/Makefile
+++ b/arch/arm/mach-exynos4/Makefile
@@ -12,8 +12,10 @@ obj- :=
 
 # Core support for EXYNOS4 system
 
-obj-$(CONFIG_CPU_EXYNOS4210)   += cpu.o init.o clock.o irq-combiner.o
-obj-$(CONFIG_CPU_EXYNOS4210)   += setup-i2c0.o irq-eint.o dma.o pmu.o
+obj-$(CONFIG_ARCH_EXYNOS4) += cpu.o init.o clock.o irq-combiner.o
+obj-$(CONFIG_ARCH_EXYNOS4) += setup-i2c0.o irq-eint.o dma.o pmu.o
+obj-$(CONFIG_CPU_EXYNOS4210)   += clock-exynos4210.o
+obj-$(CONFIG_SOC_EXYNOS4212)   += clock-exynos4212.o
 obj-$(CONFIG_PM)   += pm.o sleep.o
 obj-$(CONFIG_CPU_IDLE) += cpuidle.o
 
diff --git a/arch/arm/mach-exynos4/cpu.c b/arch/arm/mach-exynos4/cpu.c
index 0d281bb..1e1a7a9 100644
--- a/arch/arm/mach-exynos4/cpu.c
+++ b/arch/arm/mach-exynos4/cpu.c
@@ -241,7 +241,11 @@ static int __init exynos4_l2x0_cache_init(void)
 {
/* TAG, Data Latency Control: 2cycle */
__raw_writel(0x110, S5P_VA_L2CC + L2X0_TAG_LATENCY_CTRL);
-   __raw_writel(0x110, S5P_VA_L2CC + L2X0_DATA_LATENCY_CTRL);
+
+   if (soc_is_exynos4210())
+   __raw_writel(0x110, S5P_VA_L2CC + L2X0_DATA_LATENCY_CTRL);
+   else if (soc_is_exynos4212())
+   __raw_writel(0x120, S5P_VA_L2CC + L2X0_DATA_LATENCY_CTRL);
 
/* L2X0 Prefetch Control */
__raw_writel(0x3007, S5P_VA_L2CC + L2X0_PREFETCH_CTRL);
diff --git a/arch/arm/plat-s5p/cpu.c b/arch/arm/plat-s5p/cpu.c
index 04392c7..909507b 100644
--- a/arch/arm/plat-s5p/cpu.c
+++ b/arch/arm/plat-s5p/cpu.c
@@ -33,6 +33,7 @@ static const char name_s5p6450[] = "S5P6450";
 static const char name_s5pc100[] = "S5PC100";
 static const char name_s5pv210[] = "S5PV210/S5PC110";
 static const char name_exynos4210[] = "EXYNOS4210";
+static const char name_exynos4212[] = "EXYNOS4212";
 
 static struct cpu_table cpu_ids[] __initdata = {
{
@@ -75,6 +76,14 @@ static struct cpu_table cpu_ids[] __initdata = {
.init_uarts = exynos4_init_uarts,
.init   = exynos4_init,
.name   = name_exynos4210,
+   }, {
+   .idcode = EXYNOS4212_CPU_ID,
+   .idmask = EXYNOS4_CPU_MASK,
+   .map_io = exynos4_map_io,
+   .init_clocks= exynos4_init_clocks,
+   .init_uarts = exynos4_init_uarts,
+   .init   = exynos4_init,
+   .name   = name_exynos4212,
},
 };
 
diff --git a/arch/arm/plat-s5p/include/plat/exynos4.h 
b/arch/arm/plat-s5p/include/plat/exynos4.h
index 907caab..4aed130 100644
--- a/arch/arm/plat-s5p/include/plat/exynos4.h
+++ b/arch/arm/plat-s5p/include/plat/exynos4.h
@@ -16,8 +16,7 @@ extern void exynos4_common_init_uarts(struct s3c2410_uartcfg 
*cfg, int no);
 extern void exynos4_register_clocks(void);
 extern void exynos4_setup_clocks(void);
 
-#ifdef CONFIG_CPU_EXYNOS4210
-
+#ifdef CONFIG_ARCH_EXYNOS4
 extern  int exynos4_init(void);
 extern void exynos4_init_irq(void);
 extern void exynos4_map_io(void);
diff --git a/arch/arm/plat-samsung/include/plat/cpu.h 
b/arch/arm/plat-samsung/include/plat/cpu.h
index 6fdd5ef..aa1f69b 100644
--- a/arch/arm/plat-samsung/include/plat/cpu.h
+++ b/arch/arm/plat-samsung/include/plat/cpu.h
@@ -39,6 +39,7 @@ extern unsigned long samsung_cpu_id;
 #define S5PV210_CPU_MASK   0xF000
 
 #define EXYNOS4210_CPU_ID  0x4321
+#define EXYNOS4212_CPU_ID  0x4322
 #define EXYNOS4_CPU_MASK   0xFFFE
 
 #define IS_SAMSUNG_CPU(name, id, mask) \
@@ -54,6 +55,7 @@ IS_SAMSUNG_CPU(s5p6450, S5P6450_CPU_ID, S5P64XX_CPU_MASK)
 IS_SAMSUNG_CPU(s5pc100, S5PC100_CPU_ID, S5PC100_CPU_MASK)
 IS_SAMSUNG_CPU(s5pv210, S5PV210_CPU_ID, S5PV210_CPU_MASK)
 IS_SAMSUNG_CPU(exynos4210, EXYNOS4210_CPU_ID, EXYNOS4_CPU_MASK)
+IS_SAMSUNG_CPU(exynos4212, EXYNOS4212_CPU_ID, EXYNOS4_CPU_M

[PATCH 2/5] ARM: EXYNOS4: Add support clock for EXYNOS4212

2011-08-24 Thread Kukjin Kim
This patch splits EXYNOS4 clock code to EXYNOS4 common,
EXYNOS4210 and EXYNOS4212 for supporting new EXYNOS4212
SoC with one kernel image. Of course, this patch adds
some clock codes for EXYNOS4212 SoC.

Signed-off-by: Kukjin Kim 
---
 arch/arm/mach-exynos4/clock-exynos4210.c   |  101 
 arch/arm/mach-exynos4/clock-exynos4212.c   |   84 +
 arch/arm/mach-exynos4/clock.c  |  127 +---
 arch/arm/mach-exynos4/cpu.c|6 +
 arch/arm/mach-exynos4/include/mach/exynos4-clock.h |   43 +++
 arch/arm/mach-exynos4/include/mach/regs-clock.h|   50 +---
 arch/arm/plat-s5p/include/plat/exynos4.h   |2 +
 arch/arm/plat-s5p/include/plat/pll.h   |   55 -
 8 files changed, 377 insertions(+), 91 deletions(-)
 create mode 100644 arch/arm/mach-exynos4/clock-exynos4210.c
 create mode 100644 arch/arm/mach-exynos4/clock-exynos4212.c
 create mode 100644 arch/arm/mach-exynos4/include/mach/exynos4-clock.h

diff --git a/arch/arm/mach-exynos4/clock-exynos4210.c 
b/arch/arm/mach-exynos4/clock-exynos4210.c
new file mode 100644
index 000..fe74b91
--- /dev/null
+++ b/arch/arm/mach-exynos4/clock-exynos4210.c
@@ -0,0 +1,101 @@
+/*
+ * linux/arch/arm/mach-exynos4/clock-exynos4210.c
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd.
+ * http://www.samsung.com
+ *
+ * EXYNOS4210 - Clock 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
+ * published by the Free Software Foundation.
+*/
+
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+
+static struct clksrc_clk *sysclks[] = {
+   /* nothing here yet */
+};
+
+static int exynos4_clksrc_mask_lcd1_ctrl(struct clk *clk, int enable)
+{
+   return s5p_gatectrl(S5P_CLKSRC_MASK_LCD1, clk, enable);
+}
+
+static struct clksrc_clk clksrcs[] = {
+   {
+   .clk= {
+   .name   = "sclk_sata",
+   .id = -1,
+   .enable = exynos4_clksrc_mask_fsys_ctrl,
+   .ctrlbit= (1 << 24),
+   },
+   .sources = &clkset_mout_corebus,
+   .reg_src = { .reg = S5P_CLKSRC_FSYS, .shift = 24, .size = 1 },
+   .reg_div = { .reg = S5P_CLKDIV_FSYS0, .shift = 20, .size = 4 },
+   }, {
+   .clk= {
+   .name   = "sclk_fimd",
+   .devname= "exynos4-fb.1",
+   .enable = exynos4_clksrc_mask_lcd1_ctrl,
+   .ctrlbit= (1 << 0),
+   },
+   .sources = &clkset_group,
+   .reg_src = { .reg = S5P_CLKSRC_LCD1, .shift = 0, .size = 4 },
+   .reg_div = { .reg = S5P_CLKDIV_LCD1, .shift = 0, .size = 4 },
+   },
+};
+
+static struct clk init_clocks_off[] = {
+   {
+   .name   = "sataphy",
+   .id = -1,
+   .parent = &clk_aclk_133.clk,
+   .enable = exynos4_clk_ip_fsys_ctrl,
+   .ctrlbit= (1 << 3),
+   }, {
+   .name   = "sata",
+   .id = -1,
+   .parent = &clk_aclk_133.clk,
+   .enable = exynos4_clk_ip_fsys_ctrl,
+   .ctrlbit= (1 << 10),
+   }, {
+   .name   = "fimd",
+   .devname= "exynos4-fb.1",
+   .enable = exynos4_clk_ip_lcd1_ctrl,
+   .ctrlbit= (1 << 0),
+   },
+};
+
+void __init exynos4210_register_clocks(void)
+{
+   int ptr;
+
+   clk_mout_mpll.reg_src.reg = S5P_CLKSRC_CPU;
+   clk_mout_mpll.reg_src.shift = 8;
+   clk_mout_mpll.reg_src.size = 1;
+
+   for (ptr = 0; ptr < ARRAY_SIZE(sysclks); ptr++)
+   s3c_register_clksrc(sysclks[ptr], 1);
+
+   s3c_register_clksrc(clksrcs, ARRAY_SIZE(clksrcs));
+
+   s3c_register_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off));
+   s3c_disable_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off));
+}
diff --git a/arch/arm/mach-exynos4/clock-exynos4212.c 
b/arch/arm/mach-exynos4/clock-exynos4212.c
new file mode 100644
index 000..5a47a3f
--- /dev/null
+++ b/arch/arm/mach-exynos4/clock-exynos4212.c
@@ -0,0 +1,84 @@
+/*
+ * linux/arch/arm/mach-exynos4/clock-exynos4212.c
+ *
+ * Copyright (c) 2011 Samsung Electronics Co., Ltd.
+ * http://www.samsung.com
+ *
+ * EXYNOS4212 - Clock support
+ *
+ * This program is free software; you can redistribute it and/or mod

[PATCH 3/5] ARM: EXYNOS4: Add support PM for EXYNOS4212

2011-08-24 Thread Kukjin Kim
From: Jonghwan Choi 

This patch moves regarding clock stuff of PM into clock
file to support PM on EXYNOS4210 and EXYNOS4212 with one
single kernel image. Because some clock registers are
different on each SoCs.

Signed-off-by: Jonghwan Choi 
Signed-off-by: Kukjin Kim 
---
 arch/arm/mach-exynos4/clock-exynos4210.c|   38 ++
 arch/arm/mach-exynos4/clock-exynos4212.c|   34 +
 arch/arm/mach-exynos4/clock.c   |   89 +++
 arch/arm/mach-exynos4/include/mach/regs-clock.h |4 +
 arch/arm/mach-exynos4/pm.c  |   79 ++--
 5 files changed, 172 insertions(+), 72 deletions(-)

diff --git a/arch/arm/mach-exynos4/clock-exynos4210.c 
b/arch/arm/mach-exynos4/clock-exynos4210.c
index fe74b91..a4b00b7 100644
--- a/arch/arm/mach-exynos4/clock-exynos4210.c
+++ b/arch/arm/mach-exynos4/clock-exynos4210.c
@@ -15,6 +15,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -23,12 +24,24 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
 #include 
 #include 
 
+static struct sleep_save exynos4210_clock_save[] = {
+   SAVE_ITEM(S5P_CLKSRC_IMAGE),
+   SAVE_ITEM(S5P_CLKSRC_LCD1),
+   SAVE_ITEM(S5P_CLKDIV_IMAGE),
+   SAVE_ITEM(S5P_CLKDIV_LCD1),
+   SAVE_ITEM(S5P_CLKSRC_MASK_LCD1),
+   SAVE_ITEM(S5P_CLKGATE_IP_IMAGE_4210),
+   SAVE_ITEM(S5P_CLKGATE_IP_LCD1),
+   SAVE_ITEM(S5P_CLKGATE_IP_PERIR_4210),
+};
+
 static struct clksrc_clk *sysclks[] = {
/* nothing here yet */
 };
@@ -83,6 +96,29 @@ static struct clk init_clocks_off[] = {
},
 };
 
+#ifdef CONFIG_PM
+static int exynos4210_clock_suspend(void)
+{
+   s3c_pm_do_save(exynos4210_clock_save, 
ARRAY_SIZE(exynos4210_clock_save));
+
+   return 0;
+}
+
+static void exynos4210_clock_resume(void)
+{
+   s3c_pm_do_restore_core(exynos4210_clock_save, 
ARRAY_SIZE(exynos4210_clock_save));
+}
+
+#else
+#define exynos4210_clock_suspend NULL
+#define exynos4210_clock_resume NULL
+#endif
+
+struct syscore_ops exynos4210_clock_syscore_ops = {
+   .suspend= exynos4210_clock_suspend,
+   .resume = exynos4210_clock_resume,
+};
+
 void __init exynos4210_register_clocks(void)
 {
int ptr;
@@ -98,4 +134,6 @@ void __init exynos4210_register_clocks(void)
 
s3c_register_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off));
s3c_disable_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off));
+
+   register_syscore_ops(&exynos4210_clock_syscore_ops);
 }
diff --git a/arch/arm/mach-exynos4/clock-exynos4212.c 
b/arch/arm/mach-exynos4/clock-exynos4212.c
index 5a47a3f..4638a21 100644
--- a/arch/arm/mach-exynos4/clock-exynos4212.c
+++ b/arch/arm/mach-exynos4/clock-exynos4212.c
@@ -15,6 +15,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -23,12 +24,20 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
 #include 
 #include 
 
+static struct sleep_save exynos4212_clock_save[] = {
+   SAVE_ITEM(S5P_CLKSRC_IMAGE),
+   SAVE_ITEM(S5P_CLKDIV_IMAGE),
+   SAVE_ITEM(S5P_CLKGATE_IP_IMAGE_4212),
+   SAVE_ITEM(S5P_CLKGATE_IP_PERIR_4212),
+};
+
 static struct clk *clk_src_mpll_user_list[] = {
[0] = &clk_fin_mpll,
[1] = &clk_mout_mpll.clk,
@@ -59,6 +68,29 @@ static struct clk init_clocks_off[] = {
/* nothing here yet */
 };
 
+#ifdef CONFIG_PM
+static int exynos4212_clock_suspend(void)
+{
+   s3c_pm_do_save(exynos4212_clock_save, 
ARRAY_SIZE(exynos4212_clock_save));
+
+   return 0;
+}
+
+static void exynos4212_clock_resume(void)
+{
+   s3c_pm_do_restore_core(exynos4212_clock_save, 
ARRAY_SIZE(exynos4212_clock_save));
+}
+
+#else
+#define exynos4212_clock_suspend NULL
+#define exynos4212_clock_resume NULL
+#endif
+
+struct syscore_ops exynos4212_clock_syscore_ops = {
+   .suspend= exynos4212_clock_suspend,
+   .resume = exynos4212_clock_resume,
+};
+
 void __init exynos4212_register_clocks(void)
 {
int ptr;
@@ -81,4 +113,6 @@ void __init exynos4212_register_clocks(void)
 
s3c_register_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off));
s3c_disable_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off));
+
+   register_syscore_ops(&exynos4212_clock_syscore_ops);
 }
diff --git a/arch/arm/mach-exynos4/clock.c b/arch/arm/mach-exynos4/clock.c
index eb99467..99c2a1f 100644
--- a/arch/arm/mach-exynos4/clock.c
+++ b/arch/arm/mach-exynos4/clock.c
@@ -13,6 +13,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -21,12 +22,77 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
 #include 
 #include 
 
+static struct sleep_save exynos4_clock_save[] = {
+   SAVE_ITEM(S5P_CLKDIV_LEFTBUS),
+   SAVE_ITEM(S5P_CLKGATE_IP_LEFTBUS),
+   SAVE_ITEM(S5P_CLKDIV_RIGHTBUS),
+   SAVE_ITEM(S5P_CLKGATE_IP_RIGHTBUS),
+   SAVE_ITEM(S5P_CLKSRC_TOP0),
+   SAVE_ITEM(S5P_CLKSRC_TOP1),
+

[PATCH 0/5] ARM: EXYNOS4: Add support new EXYNOS4212 SoC

2011-08-24 Thread Kukjin Kim
This patch adds support new EXYNOS4212 SoC and SMDK4212 Board.

[PATCH 1/5] ARM: EXYNOS4: Add support new EXYNOS4212 SoC
[PATCH 2/5] ARM: EXYNOS4: Add support clock for EXYNOS4212
[PATCH 3/5] ARM: EXYNOS4: Add support PM for EXYNOS4212
[PATCH 4/5] ARM: EXYNOS4: Add support SMDK4212 Board
[PATCH 5/5] tty: Add support serial for EXYNOS4212 SoC

 arch/arm/mach-exynos4/Kconfig  |   30 ++
 arch/arm/mach-exynos4/Makefile |8 +-
 arch/arm/mach-exynos4/clock-exynos4210.c   |  139 ++
 arch/arm/mach-exynos4/clock-exynos4212.c   |  118 
 arch/arm/mach-exynos4/clock.c  |  218 ++-
 arch/arm/mach-exynos4/cpu.c|   12 +-
 arch/arm/mach-exynos4/include/mach/exynos4-clock.h |   43 +++
 arch/arm/mach-exynos4/include/mach/regs-clock.h|   54 +++--
 arch/arm/mach-exynos4/mach-smdk4212.c  |  292 
 arch/arm/mach-exynos4/pm.c |   79 +-
 arch/arm/plat-s5p/cpu.c|9 +
 arch/arm/plat-s5p/include/plat/exynos4.h   |5 +-
 arch/arm/plat-s5p/include/plat/pll.h   |   55 -
 arch/arm/plat-samsung/include/plat/cpu.h   |8 +
 drivers/tty/serial/Kconfig |4 +-
 15 files changed, 903 insertions(+), 171 deletions(-)

--
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 3/5] ARM: EXYNOS4: Add support PM for EXYNOS4212

2011-08-25 Thread Kukjin Kim
MyungJoo Ham wrote:
> 
> On Wed, Aug 24, 2011 at 10:25 PM, Kukjin Kim 
wrote:
> > From: Jonghwan Choi 
> >
> > This patch moves regarding clock stuff of PM into clock
> > file to support PM on EXYNOS4210 and EXYNOS4212 with one
> > single kernel image. Because some clock registers are
> > different on each SoCs.
> >
> > Signed-off-by: Jonghwan Choi 
> > Signed-off-by: Kukjin Kim 
> > ---
> >  arch/arm/mach-exynos4/clock-exynos4210.c        |   38 ++
> >  arch/arm/mach-exynos4/clock-exynos4212.c        |   34 +
> >  arch/arm/mach-exynos4/clock.c                   |   89
> +++
> >  arch/arm/mach-exynos4/include/mach/regs-clock.h |    4 +
> >  arch/arm/mach-exynos4/pm.c                      |   79
++--
> >  5 files changed, 172 insertions(+), 72 deletions(-)
> >
> > diff --git a/arch/arm/mach-exynos4/clock-exynos4210.c b/arch/arm/mach-
> exynos4/clock-exynos4210.c
> > index fe74b91..a4b00b7 100644
> > --- a/arch/arm/mach-exynos4/clock-exynos4210.c
> > +++ b/arch/arm/mach-exynos4/clock-exynos4210.c
> > +static struct sleep_save exynos4210_clock_save[] = {
> > +       SAVE_ITEM(S5P_CLKSRC_IMAGE),
> > +       SAVE_ITEM(S5P_CLKSRC_LCD1),
> > +       SAVE_ITEM(S5P_CLKDIV_IMAGE),
> > +       SAVE_ITEM(S5P_CLKDIV_LCD1),
> > +       SAVE_ITEM(S5P_CLKSRC_MASK_LCD1),
> > +       SAVE_ITEM(S5P_CLKGATE_IP_IMAGE_4210),
> > +       SAVE_ITEM(S5P_CLKGATE_IP_LCD1),
> > +       SAVE_ITEM(S5P_CLKGATE_IP_PERIR_4210),
> > +};
> > +
> > --- a/arch/arm/mach-exynos4/clock-exynos4212.c
> > +++ b/arch/arm/mach-exynos4/clock-exynos4212.c
> > +static struct sleep_save exynos4212_clock_save[] = {
> > +       SAVE_ITEM(S5P_CLKSRC_IMAGE),
> > +       SAVE_ITEM(S5P_CLKDIV_IMAGE),
> > +       SAVE_ITEM(S5P_CLKGATE_IP_IMAGE_4212),
> > +       SAVE_ITEM(S5P_CLKGATE_IP_PERIR_4212),
> > +};
> > +
> > --- a/arch/arm/mach-exynos4/clock.c
> > +++ b/arch/arm/mach-exynos4/clock.c
> > +static struct sleep_save exynos4_clock_save[] = {
> 
> Hello,
> 
Hi,

> Is there any reason to have the following two
> SAVE_ITEM(S5P_CLKSRC_IMAGE),
> SAVE_ITEM(S5P_CLKDIV_IMAGE
> defined at both clock-exynos4210.c and clock-exynos4212.c, not defined
> at clock.c once?
> 
Yes, I know. I just wanted to keep in mind there is a different
value(CLKGATE_IP_IMAGE) in regarding IMAGE clocks on each SoCs, and I think
need it now. Anyway thanks for your pointing out.

> Also, consider using CONFIG_PM_SLEEP rather than CONFIG_PM for
> suspend/resume ops.
> 
(Cc'ed Rafael)

Well, even though CONFIG_PM_SLEEP is used in regarding syscore_ops, in this
case, using CONFIG_PM looks better.

If ARCH_SUSPEND_POSSIBLE will be selected, then CONFIG_SUSPEND is selected
and CONFIG_PM_SLEEP is selected in kernel/power/Kconfig and of course,
ARCH_SUSPEND_POSSIBLE is selected in arch/arm/Kconfig. However above
everything depends on CONFIG_PM. So I think to use CONFIG_PM is more
reasonable. In addition, it is more popular in other mainline codes now.

Hi Rafael,
How do you think about this?

Its original code is below.
---
#ifdef CONFIG_PM
static int exynos4210_clock_suspend(void)
{
s3c_pm_do_save(exynos4210_clock_save,
ARRAY_SIZE(exynos4210_clock_save));

return 0;
}

static void exynos4210_clock_resume(void)
{
s3c_pm_do_restore_core(exynos4210_clock_save,
ARRAY_SIZE(exynos4210_clock_save));
}

#else
#define exynos4210_clock_suspend NULL
#define exynos4210_clock_resume NULL
#endif

struct syscore_ops exynos4210_clock_syscore_ops = {
.suspend= exynos4210_clock_suspend,
.resume = exynos4210_clock_resume,
};
---

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] ARM: EXYNOS4: Fix routing timer interrupt to offline CPU

2011-08-25 Thread Kukjin Kim
The commit 5dfc54e087c15f823ee9b6541d2f0f314e69cbed
("ARM: GIC: avoid routing interrupts to offline CPUs")
prevents routing interrupts to offline CPUs. But in
case of timer on EXYNOS4, the irq_set_affinity() method
is called in percpu_timer_setup() before CPU1 becomes
online. So this patch fixes routing timer interrupt to
offline CPU.

Reported-by: Changhwan Youn 
Signed-off-by: Kukjin Kim 
---
Hi Russell and all,

I'm not sure it's safe to call set_cpu_online() here...

 arch/arm/mach-exynos4/platsmp.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-exynos4/platsmp.c b/arch/arm/mach-exynos4/platsmp.c
index 96cc651..a3346e3 100644
--- a/arch/arm/mach-exynos4/platsmp.c
+++ b/arch/arm/mach-exynos4/platsmp.c
@@ -109,6 +109,8 @@ void __cpuinit platform_secondary_init(unsigned int cpu)
 */
spin_lock(&boot_lock);
spin_unlock(&boot_lock);
+
+   set_cpu_online(cpu, true);
 }
 
 int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle)
-- 
1.7.1

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


RE: [GIT PULL] Samsung Fixes for v3.1-rc3

2011-08-25 Thread Kukjin Kim
Kukjin Kim wrote:
> 
> Hi Arnd,
> 
> This is pull request for Samsung fixes for v3.1-rc3.
> 
> Please pull Samsung fixes from:
>   git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung.git
> samsung-fixes
> 
> These things are for _real_ fixing.
> 
> And as a note, following is only for v3.1:
> 
> 5d747c6 ARM: S5P: fix bug in spdif_clk_get_rate
> 3f6065d ARM: S5P: add required chained_irq_enter/exit to gpio-int code
> 70b0e82 ARM: EXYNOS4: add required chained_irq_enter/exit to eint code
> 995b528 ARM: SAMSUNG: Add chained enrty/exit call to timer interrupt
handler
> 7e1291d ARM: S5PV210: Fix build warning
> 5a1993f ARM: EXYNOS4: Fix the IRQ definitions for MIPI CSIS device
> 6b875cb ARM: EXYNOS4: remove duplicated inclusion
> af8a9f6 ARM: EXYNOS4: Fix wrong devname to support clkdev
> b8a297d ARM: SAMSUNG: Fix Section mismatch in samsung_bl_set()
> ac0d151 ARM: S5P64X0: Replace irq_gc_ack() with irq_gc_ack_set_bit()
> 
> Of course, others should be fixed on stable kernel.
> 
> f98d429 ARM: S3C64XX: Fix build break in PM debug
> d2edddf ARM: EXYNOS4: Add restart hook for proper reboot
> 2b431ff ARM: EXYNOS4: Increase reset delay for USB HOST PHY
> c1a238a ARM: EXYNOS4: Use the correct regulator names on universal_c210
> 
> So will send above to sta...@kernel.org soon.
> 
> If any problems, please let me know.
> 

Hi Arnd, any problem?
I can't find this yet in your -fixes branch.

As you said before, if there are fixes in -fixes branch, it should be
handled faster than others.
Maybe missed? Or should I need to send this to Linus directly?...
I think, that should be fixed now and there is no dependency with other ARM
stuff.

Thanks.

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


> Thanks.
> 
> Best regards,
> Kgene.
> --
> Kukjin Kim , Senior Engineer,
> SW Solution Development Team, Samsung Electronics Co., Ltd.
> 
> The following changes since commit
> 93ee7a9340d64f20295aacc3fb6a22b759323280:
> 
>   Linux 3.1-rc2 (2011-08-14 15:09:08 -0700)
> 
> are available in the git repository at:
>   git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung.git
> samsung-fixes
> 
> Abhilash Kesavan (2):
>   ARM: S5PV210: Fix build warning
>   ARM: S3C64XX: Fix build break in PM debug
> 
> Huang Weiyi (1):
>   ARM: EXYNOS4: remove duplicated inclusion
> 
> Jonghwan Choi (1):
>   ARM: EXYNOS4: Fix wrong devname to support clkdev
> 
> Kukjin Kim (2):
>   ARM: S5P64X0: Replace irq_gc_ack() with irq_gc_ack_set_bit()
>   ARM: SAMSUNG: Fix Section mismatch in samsung_bl_set()
> 
> Kyungmin Park (2):
>   ARM: EXYNOS4: Use the correct regulator names on universal_c210
>   ARM: EXYNOS4: Add restart hook for proper reboot
> 
> Marek Szyprowski (3):
>   ARM: SAMSUNG: Add chained enrty/exit call to timer interrupt handler
>   ARM: EXYNOS4: add required chained_irq_enter/exit to eint code
>   ARM: S5P: add required chained_irq_enter/exit to gpio-int code
> 
> Naveen Krishna Chatradhi (1):
>   ARM: S5P: fix bug in spdif_clk_get_rate
> 
> Sylwester Nawrocki (1):
>   ARM: EXYNOS4: Fix the IRQ definitions for MIPI CSIS device
> 
> Yulgon Kim (1):
>   ARM: EXYNOS4: Increase reset delay for USB HOST PHY
> 
>  arch/arm/mach-exynos4/clock.c  |2 +-
>  arch/arm/mach-exynos4/cpu.c|   11 ++-
>  arch/arm/mach-exynos4/include/mach/irqs.h  |5 ++---
>  arch/arm/mach-exynos4/include/mach/regs-pmu.h  |2 ++
>  arch/arm/mach-exynos4/irq-eint.c   |7 +++
>  arch/arm/mach-exynos4/mach-universal_c210.c|4 ++--
>  arch/arm/mach-exynos4/setup-usb-phy.c  |2 +-
>  arch/arm/mach-s3c64xx/pm.c |1 +
>  arch/arm/mach-s5p64x0/irq-eint.c   |2 +-
>  arch/arm/mach-s5pv210/pm.c |2 +-
>  arch/arm/plat-s5p/clock.c  |2 +-
>  arch/arm/plat-s5p/irq-gpioint.c|6 ++
>  arch/arm/plat-samsung/include/plat/backlight.h |2 +-
>  arch/arm/plat-samsung/irq-vic-timer.c  |5 +
>  14 files changed, 41 insertions(+), 12 deletions(-)
> 
> --

--
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 2/5] ARM: SAMSUNG: Make the sleep code common for S3C64XX and newer SoCs

2011-08-25 Thread Kukjin Kim
Abhilash Kesavan wrote:
> 
> The sleep code for S5PV210 and EXYNOS4 is identical; moreover it is quite
> similar
> to that for S3C64XX except for some SoC specific debug logic. S5P64X0 and
> S5PC100,
> for which support will be added soon, can also use the same procedure.
Create a
> common sleep code in the plat-samsung directory so that it can be re-used.
> 
> Signed-off-by: Abhilash Kesavan 
> ---
>  arch/arm/mach-exynos4/Kconfig  |1 +
>  arch/arm/mach-exynos4/Makefile |2 +-
>  arch/arm/mach-exynos4/sleep.S  |   54 ---
>  arch/arm/mach-s3c64xx/Kconfig  |1 +
>  arch/arm/mach-s3c64xx/Makefile |1 -
>  arch/arm/mach-s3c64xx/sleep.S  |   72

>  arch/arm/mach-s5pv210/Kconfig  |1 +
>  arch/arm/mach-s5pv210/Makefile |2 +-
>  arch/arm/mach-s5pv210/sleep.S  |   52 --
>  arch/arm/plat-samsung/Kconfig  |7 +++
>  arch/arm/plat-samsung/Makefile |1 +
>  arch/arm/plat-samsung/sleep.S  |   80
> 
>  12 files changed, 93 insertions(+), 181 deletions(-)
>  delete mode 100644 arch/arm/mach-exynos4/sleep.S
>  delete mode 100644 arch/arm/mach-s3c64xx/sleep.S
>  delete mode 100644 arch/arm/mach-s5pv210/sleep.S
>  create mode 100644 arch/arm/plat-samsung/sleep.S
> 

(snip)

> +ENTRY(s3c_cpu_resume)
> +#if defined(CONFIG_S3C_PM_DEBUG_LED_SMDK)
> +

Hi Abhilash,

Yes, would be nice if each sleep.S can be handled in plat-samsung for
Samsung SoCs.

Hmm...but the CONFIG_S3C_PM_DEBUG_LED_SMDK can be used on other SoCs for
same reason even though it is available only on S3C64XX now. I think, we
need to add SoC detecting here.

> +#undef S3C64XX_VA_GPIO
> +#define S3C64XX_VA_GPIO (0x0)

Please let me know why this is needed here.


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] ARM: SAMSUNG: Move map header file into plat-samsung

2011-08-30 Thread Kukjin Kim
This is required to work consolidation Samsung platform.

Cc: Ben Dooks 
Signed-off-by: Kukjin Kim 
---
 arch/arm/mach-s3c2410/include/mach/map.h   |   52 +-
 arch/arm/mach-s3c64xx/include/mach/map.h   |9 +--
 arch/arm/plat-s3c24xx/include/plat/map.h   |  100 
 arch/arm/plat-samsung/include/plat/map-s3c.h   |   84 
 .../include/plat/map-s5p.h |6 +-
 5 files changed, 134 insertions(+), 117 deletions(-)
 delete mode 100644 arch/arm/plat-s3c24xx/include/plat/map.h
 create mode 100644 arch/arm/plat-samsung/include/plat/map-s3c.h
 rename arch/arm/{plat-s5p => plat-samsung}/include/plat/map-s5p.h (94%)

diff --git a/arch/arm/mach-s3c2410/include/mach/map.h 
b/arch/arm/mach-s3c2410/include/mach/map.h
index 425552d..4cf495f 100644
--- a/arch/arm/mach-s3c2410/include/mach/map.h
+++ b/arch/arm/mach-s3c2410/include/mach/map.h
@@ -14,9 +14,53 @@
 #define __ASM_ARCH_MAP_H
 
 #include 
-#include 
 
-#define S3C2410_ADDR(x)S3C_ADDR(x)
+/*
+ * S3C2410 UART offset is 0x4000 but the other SoCs are 0x400.
+ * So need to define it, and here is to avoid redefinition warning.
+ */
+#define S3C_UART_OFFSET(0x4000)
+
+#include 
+
+/*
+ * interrupt controller is the first thing we put in, to make
+ * the assembly code for the irq detection easier
+ */
+#define S3C2410_PA_IRQ (0x4A00)
+#define S3C24XX_SZ_IRQ SZ_1M
+
+/* memory controller registers */
+#define S3C2410_PA_MEMCTRL (0x4800)
+#define S3C24XX_SZ_MEMCTRL SZ_1M
+
+/* UARTs */
+#define S3C_VA_UARTx(uart) (S3C_VA_UART + ((uart * S3C_UART_OFFSET)))
+
+/* Timers */
+#define S3C2410_PA_TIMER   (0x5100)
+#define S3C24XX_SZ_TIMER   SZ_1M
+
+/* Clock and Power management */
+#define S3C24XX_SZ_CLKPWR  SZ_1M
+
+/* USB Device port */
+#define S3C2410_PA_USBDEV  (0x5200)
+#define S3C24XX_SZ_USBDEV  SZ_1M
+
+/* Watchdog */
+#define S3C2410_PA_WATCHDOG(0x5300)
+#define S3C24XX_SZ_WATCHDOGSZ_1M
+
+/* Standard size definitions for peripheral blocks. */
+
+#define S3C24XX_SZ_UARTSZ_1M
+#define S3C24XX_SZ_IIS SZ_1M
+#define S3C24XX_SZ_ADC SZ_1M
+#define S3C24XX_SZ_SPI SZ_1M
+#define S3C24XX_SZ_SDI SZ_1M
+#define S3C24XX_SZ_NANDSZ_1M
+#define S3C24XX_SZ_GPIOSZ_1M
 
 /* USB host controller */
 #define S3C2410_PA_USBHOST (0x4900)
@@ -75,10 +119,8 @@
 
 /* S3C2412 memory and IO controls */
 #define S3C2412_PA_SSMC(0x4F00)
-#define S3C2412_VA_SSMCS3C_ADDR_CPU(0x)
 
 #define S3C2412_PA_EBI (0x4880)
-#define S3C2412_VA_EBI S3C_ADDR_CPU(0x0001)
 
 /* physical addresses of all the chip-select areas */
 
@@ -100,12 +142,10 @@
 #define S3C24XX_PA_DMA  S3C2410_PA_DMA
 #define S3C24XX_PA_CLKPWR   S3C2410_PA_CLKPWR
 #define S3C24XX_PA_LCD  S3C2410_PA_LCD
-#define S3C24XX_PA_UART S3C2410_PA_UART
 #define S3C24XX_PA_TIMERS3C2410_PA_TIMER
 #define S3C24XX_PA_USBDEV   S3C2410_PA_USBDEV
 #define S3C24XX_PA_WATCHDOG S3C2410_PA_WATCHDOG
 #define S3C24XX_PA_IIS  S3C2410_PA_IIS
-#define S3C24XX_PA_GPIO S3C2410_PA_GPIO
 #define S3C24XX_PA_RTC  S3C2410_PA_RTC
 #define S3C24XX_PA_ADC  S3C2410_PA_ADC
 #define S3C24XX_PA_SPI  S3C2410_PA_SPI
diff --git a/arch/arm/mach-s3c64xx/include/mach/map.h 
b/arch/arm/mach-s3c64xx/include/mach/map.h
index a1f13f0..23a1d71 100644
--- a/arch/arm/mach-s3c64xx/include/mach/map.h
+++ b/arch/arm/mach-s3c64xx/include/mach/map.h
@@ -16,6 +16,7 @@
 #define __ASM_ARCH_MAP_H __FILE__
 
 #include 
+#include 
 
 /*
  * Post-mux Chip Select Regions Xm0CSn_
@@ -83,7 +84,6 @@
 #define S3C64XX_PA_IIC1(0x7F00F000)
 
 #define S3C64XX_PA_GPIO(0x7F008000)
-#define S3C64XX_VA_GPIOS3C_ADDR_CPU(0x)
 #define S3C64XX_SZ_GPIOSZ_4K
 
 #define S3C64XX_PA_SDRAM   (0x5000)
@@ -94,16 +94,10 @@
 #define S3C64XX_PA_VIC1(0x7130)
 
 #define S3C64XX_PA_MODEM   (0x74108000)
-#define S3C64XX_VA_MODEM   S3C_ADDR_CPU(0x0010)
 
 #define S3C64XX_PA_USBHOST (0x7430)
 
 #define S3C64XX_PA_USB_HSPHY   (0x7C10)
-#define S3C64XX_VA_USB_HSPHY   S3C_ADDR_CPU(0x0020)
-
-/* place VICs close together */
-#define VA_VIC0(S3C_VA_IRQ + 0x00)
-#define VA_VIC1(S3C_VA_IRQ + 0x1)
 
 /* compatibiltiy defines. */
 #define S3C_PA_TIMER   S3C64XX_PA_TIMER
@@ -119,7 +113,6 @@
 #define S3C_PA_FB  S3C64XX_PA_FB
 #define S3C_PA_USBHOST S3C64XX_PA_USBHOST
 #define S3C_PA_USB_HSOTG   S3C64XX_PA_USB_HSOTG
-#define S3C_VA_USB_HSPHY   S3C64XX_VA_USB_HSPHY
 #define S3C_PA_RTC S3C64XX_PA_RTC
 #define S3C_PA_WDT S3C64XX_PA_WATCHDOG
 
diff --git a/arch/arm/plat-s3c24xx/include/plat/map.h 
b/arch/arm/plat-s3c24xx/include/plat/map.h
deleted file mode 100

[PATCH 0/7] gpio/samsung: Add support Samsung GPIO with gpio-samsung.c

2011-08-30 Thread Kukjin Kim
This patch merges existing many Samsung GPIO drivers into the one
drivers/gpio/gpio-samsung.c.

[PATCH 1/7 (RE-SEND)] gpio/s3c24xx: move gpio driver into drivers/gpio/
[PATCH 2/7 (RE-SEND)] gpio/s3c64xx: move gpio driver into drivers/gpio/
[PATCH 3/7 (RE-SEND)] gpio/s5p64x0: move gpio driver into drivers/gpio/
[PATCH 4/7] gpio/samsung: Remove useless old Samsung related GPIO drivers
[PATCH 5/7] gpio/samsung: Added gpio-samsung.c to support Samsung GPIOs
[PATCH 6/7] ARM: SAMSUNG: Update the name of regarding Samsung GPIO
[PATCH 7/7] ARM: SAMSUNG: Remove useless Samsung GPIO related CONFIGs
--
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 7/7] ARM: SAMSUNG: Remove useless Samsung GPIO related CONFIGs

2011-08-30 Thread Kukjin Kim
Cc: Ben Dooks 
Signed-off-by: Kukjin Kim 
---
 arch/arm/Kconfig  |3 ---
 arch/arm/mach-s3c2410/Kconfig |1 -
 arch/arm/mach-s3c2416/Kconfig |1 -
 arch/arm/mach-s3c2440/Kconfig |2 --
 arch/arm/mach-s3c2443/Kconfig |1 -
 arch/arm/plat-s3c24xx/Kconfig |1 -
 arch/arm/plat-s5p/Kconfig |3 ---
 arch/arm/plat-samsung/Kconfig |   27 ---
 8 files changed, 0 insertions(+), 39 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 5ebc5d9..b6fb00c 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -724,9 +724,6 @@ config ARCH_S3C64XX
select SAMSUNG_IRQ_VIC_TIMER
select SAMSUNG_IRQ_UART
select S3C_GPIO_TRACK
-   select S3C_GPIO_PULL_UPDOWN
-   select S3C_GPIO_CFG_S3C24XX
-   select S3C_GPIO_CFG_S3C64XX
select S3C_DEV_NAND
select USB_ARCH_HAS_OHCI
select SAMSUNG_GPIOLIB_4BIT
diff --git a/arch/arm/mach-s3c2410/Kconfig b/arch/arm/mach-s3c2410/Kconfig
index 3700cf3..5261a7e 100644
--- a/arch/arm/mach-s3c2410/Kconfig
+++ b/arch/arm/mach-s3c2410/Kconfig
@@ -6,7 +6,6 @@ config CPU_S3C2410
bool
depends on ARCH_S3C2410
select CPU_ARM920T
-   select S3C_GPIO_PULL_UP
select S3C2410_CLOCK
select CPU_LLSERIAL_S3C2410
select S3C2410_PM if PM
diff --git a/arch/arm/mach-s3c2416/Kconfig b/arch/arm/mach-s3c2416/Kconfig
index 69b48a7..84c7b03 100644
--- a/arch/arm/mach-s3c2416/Kconfig
+++ b/arch/arm/mach-s3c2416/Kconfig
@@ -13,7 +13,6 @@ config CPU_S3C2416
select CPU_ARM926T
select S3C2416_DMA if S3C2410_DMA
select CPU_LLSERIAL_S3C2440
-   select S3C_GPIO_PULL_UPDOWN
select SAMSUNG_CLKSRC
select S3C2443_CLOCK
help
diff --git a/arch/arm/mach-s3c2440/Kconfig b/arch/arm/mach-s3c2440/Kconfig
index c461fb8..914e620 100644
--- a/arch/arm/mach-s3c2440/Kconfig
+++ b/arch/arm/mach-s3c2440/Kconfig
@@ -5,7 +5,6 @@
 config CPU_S3C2440
bool
select CPU_ARM920T
-   select S3C_GPIO_PULL_UP
select S3C2410_CLOCK
select S3C2410_PM if PM
select S3C2440_DMA if S3C2410_DMA
@@ -17,7 +16,6 @@ config CPU_S3C2440
 config CPU_S3C2442
bool
select CPU_ARM920T
-   select S3C_GPIO_PULL_DOWN
select S3C2410_CLOCK
select S3C2410_PM if PM
select CPU_S3C244X
diff --git a/arch/arm/mach-s3c2443/Kconfig b/arch/arm/mach-s3c2443/Kconfig
index d8eb868..8814031 100644
--- a/arch/arm/mach-s3c2443/Kconfig
+++ b/arch/arm/mach-s3c2443/Kconfig
@@ -10,7 +10,6 @@ config CPU_S3C2443
select CPU_LLSERIAL_S3C2440
select SAMSUNG_CLKSRC
select S3C2443_CLOCK
-   select S3C_GPIO_PULL_S3C2443
help
  Support for the S3C2443 SoC from the S3C24XX line
 
diff --git a/arch/arm/plat-s3c24xx/Kconfig b/arch/arm/plat-s3c24xx/Kconfig
index 8c5b302..d8973ac 100644
--- a/arch/arm/plat-s3c24xx/Kconfig
+++ b/arch/arm/plat-s3c24xx/Kconfig
@@ -9,7 +9,6 @@ config PLAT_S3C24XX
select NO_IOPORT
select ARCH_REQUIRE_GPIOLIB
select S3C_DEV_NAND
-   select S3C_GPIO_CFG_S3C24XX
help
  Base platform code for any Samsung S3C24XX device
 
diff --git a/arch/arm/plat-s5p/Kconfig b/arch/arm/plat-s5p/Kconfig
index 9843c95..ac610be 100644
--- a/arch/arm/plat-s5p/Kconfig
+++ b/arch/arm/plat-s5p/Kconfig
@@ -16,9 +16,6 @@ config PLAT_S5P
select S3C_GPIO_TRACK
select S5P_GPIO_DRVSTR
select SAMSUNG_GPIOLIB_4BIT
-   select S3C_GPIO_CFG_S3C64XX
-   select S3C_GPIO_PULL_UPDOWN
-   select S3C_GPIO_CFG_S3C24XX
select PLAT_SAMSUNG
select SAMSUNG_CLKSRC
select SAMSUNG_IRQ_VIC_TIMER
diff --git a/arch/arm/plat-samsung/Kconfig b/arch/arm/plat-samsung/Kconfig
index b3e1065..1f346d2 100644
--- a/arch/arm/plat-samsung/Kconfig
+++ b/arch/arm/plat-samsung/Kconfig
@@ -79,39 +79,12 @@ config SAMSUNG_GPIOLIB_4BIT
  configuration. GPIOlib shall be compiled only for S3C64XX and S5P
  series of processors.
 
-config S3C_GPIO_CFG_S3C24XX
-   bool
-   help
- Internal configuration to enable S3C24XX style GPIO configuration
- functions.
-
 config S3C_GPIO_CFG_S3C64XX
bool
help
  Internal configuration to enable S3C64XX style GPIO configuration
  functions.
 
-config S3C_GPIO_PULL_UPDOWN
-   bool
-   help
- Internal configuration to enable the correct GPIO pull helper
-
-config S3C_GPIO_PULL_S3C2443
-   bool
-   select S3C_GPIO_PULL_UPDOWN
-   help
- Internal configuration to enable the correct GPIO pull helper for 
S3C2443-style GPIO
-
-config S3C_GPIO_PULL_DOWN
-   bool
-   help
- Internal configuration to enable the correct GPIO pull helper
-
-config S3C_GPIO_PULL_UP
-   bool
-   help
- Internal configuration to enable the correct GPIO pull helper
-
 config S5P_GPIO_DRVSTR
bool
help
-- 
1.7.1

--
To unsubscribe from this

[PATCH 3/7 (RE-SEND)] gpio/s5p64x0: move gpio driver into drivers/gpio/

2011-08-30 Thread Kukjin Kim
Cc: Grant Likely 
Signed-off-by: Kukjin Kim 
---
 arch/arm/mach-s5p64x0/Makefile |2 +-
 drivers/gpio/Kconfig   |4 
 drivers/gpio/Makefile  |1 +
 .../gpiolib.c => drivers/gpio/gpio-s5p64x0.c   |3 +--
 4 files changed, 7 insertions(+), 3 deletions(-)
 rename arch/arm/mach-s5p64x0/gpiolib.c => drivers/gpio/gpio-s5p64x0.c (99%)

diff --git a/arch/arm/mach-s5p64x0/Makefile b/arch/arm/mach-s5p64x0/Makefile
index 5f6afdf..5b94955 100644
--- a/arch/arm/mach-s5p64x0/Makefile
+++ b/arch/arm/mach-s5p64x0/Makefile
@@ -12,7 +12,7 @@ obj-  :=
 
 # Core support for S5P64X0 system
 
-obj-$(CONFIG_ARCH_S5P64X0) += cpu.o init.o clock.o dma.o gpiolib.o
+obj-$(CONFIG_ARCH_S5P64X0) += cpu.o init.o clock.o dma.o
 obj-$(CONFIG_ARCH_S5P64X0) += setup-i2c0.o irq-eint.o
 obj-$(CONFIG_CPU_S5P6440)  += clock-s5p6440.o
 obj-$(CONFIG_CPU_S5P6450)  += clock-s5p6450.o
diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
index 6368730..5eb29bc 100644
--- a/drivers/gpio/Kconfig
+++ b/drivers/gpio/Kconfig
@@ -143,6 +143,10 @@ config GPIO_S3C64XX
def_bool y
depends on ARCH_S3C64XX
 
+config GPIO_S5P64X0
+   def_bool y
+   depends on ARCH_S5P64X0
+
 config GPIO_S5PC100
def_bool y
depends on CPU_S5PC100
diff --git a/drivers/gpio/Makefile b/drivers/gpio/Makefile
index 8c1fb23..10f3bbf 100644
--- a/drivers/gpio/Makefile
+++ b/drivers/gpio/Makefile
@@ -42,6 +42,7 @@ obj-$(CONFIG_GPIO_RDC321X)+= gpio-rdc321x.o
 obj-$(CONFIG_GPIO_PLAT_SAMSUNG)+= gpio-plat-samsung.o
 obj-$(CONFIG_GPIO_S3C24XX) += gpio-s3c24xx.o
 obj-$(CONFIG_GPIO_S3C64XX) += gpio-s3c64xx.o
+obj-$(CONFIG_GPIO_S5P64X0) += gpio-s5p64x0.o
 obj-$(CONFIG_GPIO_S5PC100) += gpio-s5pc100.o
 obj-$(CONFIG_GPIO_S5PV210) += gpio-s5pv210.o
 
diff --git a/arch/arm/mach-s5p64x0/gpiolib.c b/drivers/gpio/gpio-s5p64x0.c
similarity index 99%
rename from arch/arm/mach-s5p64x0/gpiolib.c
rename to drivers/gpio/gpio-s5p64x0.c
index e7fb3b0..96e816f 100644
--- a/arch/arm/mach-s5p64x0/gpiolib.c
+++ b/drivers/gpio/gpio-s5p64x0.c
@@ -1,5 +1,4 @@
-/* linux/arch/arm/mach-s5p64x0/gpiolib.c
- *
+/*
  * Copyright (c) 2009-2010 Samsung Electronics Co., Ltd.
  * http://www.samsung.com
  *
-- 
1.7.1

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


[PATCH 2/7 (RE-SEND)] gpio/s3c64xx: move gpio driver into drivers/gpio/

2011-08-30 Thread Kukjin Kim
Cc: Ben Dooks 
Cc: Grant Likely 
Signed-off-by: Kukjin Kim 
---
 arch/arm/mach-s3c64xx/Makefile |1 -
 drivers/gpio/Kconfig   |4 
 drivers/gpio/Makefile  |1 +
 .../gpiolib.c => drivers/gpio/gpio-s3c64xx.c   |3 +--
 4 files changed, 6 insertions(+), 3 deletions(-)
 rename arch/arm/mach-s3c64xx/gpiolib.c => drivers/gpio/gpio-s3c64xx.c (99%)

diff --git a/arch/arm/mach-s3c64xx/Makefile b/arch/arm/mach-s3c64xx/Makefile
index 61b4034..f0102d7 100644
--- a/arch/arm/mach-s3c64xx/Makefile
+++ b/arch/arm/mach-s3c64xx/Makefile
@@ -13,7 +13,6 @@ obj-  :=
 # Core files
 obj-y  += cpu.o
 obj-y  += clock.o
-obj-y  += gpiolib.o
 
 # Core support for S3C6400 system
 
diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
index 5654e1b..6368730 100644
--- a/drivers/gpio/Kconfig
+++ b/drivers/gpio/Kconfig
@@ -139,6 +139,10 @@ config GPIO_S3C24XX
def_bool y
depends on PLAT_S3C24XX
 
+config GPIO_S3C64XX
+   def_bool y
+   depends on ARCH_S3C64XX
+
 config GPIO_S5PC100
def_bool y
depends on CPU_S5PC100
diff --git a/drivers/gpio/Makefile b/drivers/gpio/Makefile
index c7f1c00..8c1fb23 100644
--- a/drivers/gpio/Makefile
+++ b/drivers/gpio/Makefile
@@ -41,6 +41,7 @@ obj-$(CONFIG_GPIO_RDC321X)+= gpio-rdc321x.o
 
 obj-$(CONFIG_GPIO_PLAT_SAMSUNG)+= gpio-plat-samsung.o
 obj-$(CONFIG_GPIO_S3C24XX) += gpio-s3c24xx.o
+obj-$(CONFIG_GPIO_S3C64XX) += gpio-s3c64xx.o
 obj-$(CONFIG_GPIO_S5PC100) += gpio-s5pc100.o
 obj-$(CONFIG_GPIO_S5PV210) += gpio-s5pv210.o
 
diff --git a/arch/arm/mach-s3c64xx/gpiolib.c b/drivers/gpio/gpio-s3c64xx.c
similarity index 99%
rename from arch/arm/mach-s3c64xx/gpiolib.c
rename to drivers/gpio/gpio-s3c64xx.c
index 92b0908..b4f1c82 100644
--- a/arch/arm/mach-s3c64xx/gpiolib.c
+++ b/drivers/gpio/gpio-s3c64xx.c
@@ -1,5 +1,4 @@
-/* arch/arm/plat-s3c64xx/gpiolib.c
- *
+/*
  * Copyright 2008 Openmoko, Inc.
  * Copyright 2008 Simtec Electronics
  *  Ben Dooks 
-- 
1.7.1

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


[PATCH 1/7 (RE-SEND)] gpio/s3c24xx: move gpio driver into drivers/gpio/

2011-08-30 Thread Kukjin Kim
Cc: Ben Dooks 
Cc: Grant Likely 
Signed-off-by: Kukjin Kim 
---
 arch/arm/mach-s3c2410/Kconfig  |6 --
 arch/arm/mach-s3c2410/Makefile |1 -
 arch/arm/mach-s3c2412/Kconfig  |1 -
 arch/arm/mach-s3c2412/Makefile |1 -
 arch/arm/mach-s3c2440/Kconfig  |2 -
 arch/arm/plat-s3c24xx/Makefile |2 -
 arch/arm/plat-s3c24xx/gpio.c   |   96 
 drivers/gpio/Kconfig   |4 +
 drivers/gpio/Makefile  |1 +
 .../gpiolib.c => drivers/gpio/gpio-s3c24xx.c   |   70 +--
 10 files changed, 67 insertions(+), 117 deletions(-)
 delete mode 100644 arch/arm/plat-s3c24xx/gpio.c
 rename arch/arm/plat-s3c24xx/gpiolib.c => drivers/gpio/gpio-s3c24xx.c (78%)

diff --git a/arch/arm/mach-s3c2410/Kconfig b/arch/arm/mach-s3c2410/Kconfig
index 7245a55..3700cf3 100644
--- a/arch/arm/mach-s3c2410/Kconfig
+++ b/arch/arm/mach-s3c2410/Kconfig
@@ -8,7 +8,6 @@ config CPU_S3C2410
select CPU_ARM920T
select S3C_GPIO_PULL_UP
select S3C2410_CLOCK
-   select S3C2410_GPIO
select CPU_LLSERIAL_S3C2410
select S3C2410_PM if PM
select S3C2410_CPUFREQ if CPU_FREQ_S3C24XX
@@ -28,11 +27,6 @@ config S3C2410_PM
help
  Power Management code common to S3C2410 and better
 
-config S3C2410_GPIO
-   bool
-   help
- GPIO code for S3C2410 and similar processors
-
 config SIMTEC_NOR
bool
help
diff --git a/arch/arm/mach-s3c2410/Makefile b/arch/arm/mach-s3c2410/Makefile
index 8169535..782fd81 100644
--- a/arch/arm/mach-s3c2410/Makefile
+++ b/arch/arm/mach-s3c2410/Makefile
@@ -13,7 +13,6 @@ obj-$(CONFIG_CPU_S3C2410) += s3c2410.o
 obj-$(CONFIG_CPU_S3C2410_DMA)  += dma.o
 obj-$(CONFIG_CPU_S3C2410_DMA)  += dma.o
 obj-$(CONFIG_S3C2410_PM)   += pm.o sleep.o
-obj-$(CONFIG_S3C2410_GPIO) += gpio.o
 obj-$(CONFIG_S3C2410_CPUFREQ)  += cpu-freq.o
 obj-$(CONFIG_S3C2410_PLLTABLE) += pll.o
 
diff --git a/arch/arm/mach-s3c2412/Kconfig b/arch/arm/mach-s3c2412/Kconfig
index c2cf4e5..b8b9029 100644
--- a/arch/arm/mach-s3c2412/Kconfig
+++ b/arch/arm/mach-s3c2412/Kconfig
@@ -9,7 +9,6 @@ config CPU_S3C2412
select CPU_LLSERIAL_S3C2440
select S3C2412_PM if PM
select S3C2412_DMA if S3C2410_DMA
-   select S3C2410_GPIO
help
  Support for the S3C2412 and S3C2413 SoCs from the S3C24XX line
 
diff --git a/arch/arm/mach-s3c2412/Makefile b/arch/arm/mach-s3c2412/Makefile
index 6c48a91..7e4d95f 100644
--- a/arch/arm/mach-s3c2412/Makefile
+++ b/arch/arm/mach-s3c2412/Makefile
@@ -12,7 +12,6 @@ obj-  :=
 obj-$(CONFIG_CPU_S3C2412)  += s3c2412.o
 obj-$(CONFIG_CPU_S3C2412)  += irq.o
 obj-$(CONFIG_CPU_S3C2412)  += clock.o
-obj-$(CONFIG_CPU_S3C2412)  += gpio.o
 obj-$(CONFIG_S3C2412_DMA)  += dma.o
 obj-$(CONFIG_S3C2412_PM)   += pm.o
 obj-$(CONFIG_S3C2412_PM_SLEEP) += sleep.o
diff --git a/arch/arm/mach-s3c2440/Kconfig b/arch/arm/mach-s3c2440/Kconfig
index 50825a3..c461fb8 100644
--- a/arch/arm/mach-s3c2440/Kconfig
+++ b/arch/arm/mach-s3c2440/Kconfig
@@ -8,7 +8,6 @@ config CPU_S3C2440
select S3C_GPIO_PULL_UP
select S3C2410_CLOCK
select S3C2410_PM if PM
-   select S3C2410_GPIO
select S3C2440_DMA if S3C2410_DMA
select CPU_S3C244X
select CPU_LLSERIAL_S3C2440
@@ -20,7 +19,6 @@ config CPU_S3C2442
select CPU_ARM920T
select S3C_GPIO_PULL_DOWN
select S3C2410_CLOCK
-   select S3C2410_GPIO
select S3C2410_PM if PM
select CPU_S3C244X
select CPU_LLSERIAL_S3C2440
diff --git a/arch/arm/plat-s3c24xx/Makefile b/arch/arm/plat-s3c24xx/Makefile
index 0291bd6..e4f4649 100644
--- a/arch/arm/plat-s3c24xx/Makefile
+++ b/arch/arm/plat-s3c24xx/Makefile
@@ -15,8 +15,6 @@ obj-  :=
 obj-y  += cpu.o
 obj-y  += irq.o
 obj-y  += devs.o
-obj-y  += gpio.o
-obj-y  += gpiolib.o
 obj-y  += clock.o
 obj-$(CONFIG_S3C24XX_DCLK) += clock-dclk.o
 
diff --git a/arch/arm/plat-s3c24xx/gpio.c b/arch/arm/plat-s3c24xx/gpio.c
deleted file mode 100644
index 2f3d7c0..000
--- a/arch/arm/plat-s3c24xx/gpio.c
+++ /dev/null
@@ -1,96 +0,0 @@
-/* linux/arch/arm/plat-s3c24xx/gpio.c
- *
- * Copyright (c) 2004-2010 Simtec Electronics
- * Ben Dooks 
- *
- * S3C24XX GPIO support
- *
- * 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, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without ev

[PATCH 6/7] ARM: SAMSUNG: Update the name of regarding Samsung GPIO

2011-08-30 Thread Kukjin Kim
According to gpio-samsung.c, this patch updates the name of
regarding Samsung GPIO. Basically the samsung_xxx prefix is
used in gpio-samsung.c instead of s3c_xxx, because unified
name can reduce its complexity.

Note: some s3c_xxx stil remains because it is used widely.
It will be updated next time.

Cc: Ben Dooks 
Signed-off-by: Kukjin Kim 
---
 arch/arm/mach-exynos4/include/mach/pm-core.h   |2 +-
 arch/arm/mach-s3c2410/include/mach/gpio-fns.h  |   99 +---
 arch/arm/mach-s3c2410/include/mach/gpio-track.h|6 +-
 arch/arm/mach-s3c2410/include/mach/pm-core.h   |2 +-
 arch/arm/mach-s3c2410/s3c2410.c|4 +-
 arch/arm/mach-s3c2412/gpio.c   |2 +-
 arch/arm/mach-s3c2416/s3c2416.c|4 +-
 arch/arm/mach-s3c2440/s3c2440.c|4 +-
 arch/arm/mach-s3c2440/s3c2442.c|4 +-
 arch/arm/mach-s3c2443/s3c2443.c|4 +-
 arch/arm/mach-s3c64xx/include/mach/pm-core.h   |2 +-
 arch/arm/mach-s5pv210/include/mach/pm-core.h   |2 +-
 arch/arm/plat-s5p/irq-gpioint.c|   10 +-
 .../plat-samsung/include/plat/gpio-cfg-helpers.h   |  172 +---
 arch/arm/plat-samsung/include/plat/gpio-cfg.h  |   34 ++--
 arch/arm/plat-samsung/include/plat/gpio-core.h |   97 +++
 arch/arm/plat-samsung/include/plat/gpio-fns.h  |   98 +++
 arch/arm/plat-samsung/include/plat/pm.h|   10 +-
 arch/arm/plat-samsung/pm-gpio.c|   72 
 arch/arm/plat-samsung/pm.c |6 +-
 20 files changed, 250 insertions(+), 384 deletions(-)
 create mode 100644 arch/arm/plat-samsung/include/plat/gpio-fns.h

diff --git a/arch/arm/mach-exynos4/include/mach/pm-core.h 
b/arch/arm/mach-exynos4/include/mach/pm-core.h
index 1df3b81..3499ec7 100644
--- a/arch/arm/mach-exynos4/include/mach/pm-core.h
+++ b/arch/arm/mach-exynos4/include/mach/pm-core.h
@@ -53,7 +53,7 @@ static inline void s3c_pm_restored_gpios(void)
/* nothing here yet */
 }
 
-static inline void s3c_pm_saved_gpios(void)
+static inline void samsung_pm_saved_gpios(void)
 {
/* nothing here yet */
 }
diff --git a/arch/arm/mach-s3c2410/include/mach/gpio-fns.h 
b/arch/arm/mach-s3c2410/include/mach/gpio-fns.h
index bab1392..c53ad34 100644
--- a/arch/arm/mach-s3c2410/include/mach/gpio-fns.h
+++ b/arch/arm/mach-s3c2410/include/mach/gpio-fns.h
@@ -1,98 +1 @@
-/* arch/arm/mach-s3c2410/include/mach/gpio-fns.h
- *
- * Copyright (c) 2003-2009 Simtec Electronics
- * Ben Dooks 
- *
- * S3C2410 - hardware
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
-*/
-
-#ifndef __MACH_GPIO_FNS_H
-#define __MACH_GPIO_FNS_H __FILE__
-
-/* These functions are in the to-be-removed category and it is strongly
- * encouraged not to use these in new code. They will be marked deprecated
- * very soon.
- *
- * Most of the functionality can be either replaced by the gpiocfg calls
- * for the s3c platform or by the generic GPIOlib API.
- *
- * As of 2.6.35-rc, these will be removed, with the few drivers using them
- * either replaced or given a wrapper until the calls can be removed.
-*/
-
-#include 
-
-static inline void s3c2410_gpio_cfgpin(unsigned int pin, unsigned int cfg)
-{
-   /* 1:1 mapping between cfgpin and setcfg calls at the moment */
-   s3c_gpio_cfgpin(pin, cfg);
-}
-
-/* external functions for GPIO support
- *
- * These allow various different clients to access the same GPIO
- * registers without conflicting. If your driver only owns the entire
- * GPIO register, then it is safe to ioremap/__raw_{read|write} to it.
-*/
-
-extern unsigned int s3c2410_gpio_getcfg(unsigned int pin);
-
-/* s3c2410_gpio_getirq
- *
- * turn the given pin number into the corresponding IRQ number
- *
- * returns:
- * < 0 = no interrupt for this pin
- * >=0 = interrupt number for the pin
-*/
-
-extern int s3c2410_gpio_getirq(unsigned int pin);
-
-/* s3c2410_gpio_irqfilter
- *
- * set the irq filtering on the given pin
- *
- * on = 0 => disable filtering
- *  1 => enable filtering
- *
- * config = S3C2410_EINTFLT_PCLK or S3C2410_EINTFLT_EXTCLK orred with
- *  width of filter (0 through 63)
- *
- *
-*/
-
-extern int s3c2410_gpio_irqfilter(unsigned int pin, unsigned int on,
- unsigned int config);
-
-/* s3c2410_gpio_pullup
- *
- * This call should be replaced with s3c_gpio_setpull().
- *
- * As a note, there is currently no distinction between pull-up and pull-down
- * in the s3c24xx series devices with only an on/off configuration.
- */
-
-/* s3c2410_gpio_pullup
- *
- * configure the pull-up control on the given pin
- *
- * to = 1 => disable the pull-up
- *  0 => enable the pull-up
- *
- * eg;
- *
- *   s3c2410_gpio_pullup

RE: [PATCH 3/5] ARM: EXYNOS4: Add support PM for EXYNOS4212

2011-08-30 Thread Kukjin Kim
Rafael J. Wysocki wrote:
> 
> On Friday, August 26, 2011, Kukjin Kim wrote:
> > MyungJoo Ham wrote:
> > >
> > > On Wed, Aug 24, 2011 at 10:25 PM, Kukjin Kim 
> > wrote:
> > > > From: Jonghwan Choi 
> > > >
> > > > This patch moves regarding clock stuff of PM into clock
> > > > file to support PM on EXYNOS4210 and EXYNOS4212 with one
> > > > single kernel image. Because some clock registers are
> > > > different on each SoCs.
> > > >
> > > > Signed-off-by: Jonghwan Choi 
> > > > Signed-off-by: Kukjin Kim 
> > > > ---
> > > >  arch/arm/mach-exynos4/clock-exynos4210.c|   38 ++
> > > >  arch/arm/mach-exynos4/clock-exynos4212.c|   34 +
> > > >  arch/arm/mach-exynos4/clock.c   |   89
> > > +++
> > > >  arch/arm/mach-exynos4/include/mach/regs-clock.h |4 +
> > > >  arch/arm/mach-exynos4/pm.c  |   79
> > ++--
> > > >  5 files changed, 172 insertions(+), 72 deletions(-)
> > > >
> > > > diff --git a/arch/arm/mach-exynos4/clock-exynos4210.c
b/arch/arm/mach-
> > > exynos4/clock-exynos4210.c
> > > > index fe74b91..a4b00b7 100644
> > > > --- a/arch/arm/mach-exynos4/clock-exynos4210.c
> > > > +++ b/arch/arm/mach-exynos4/clock-exynos4210.c
> > > > +static struct sleep_save exynos4210_clock_save[] = {
> > > > +   SAVE_ITEM(S5P_CLKSRC_IMAGE),
> > > > +   SAVE_ITEM(S5P_CLKSRC_LCD1),
> > > > +   SAVE_ITEM(S5P_CLKDIV_IMAGE),
> > > > +   SAVE_ITEM(S5P_CLKDIV_LCD1),
> > > > +   SAVE_ITEM(S5P_CLKSRC_MASK_LCD1),
> > > > +   SAVE_ITEM(S5P_CLKGATE_IP_IMAGE_4210),
> > > > +   SAVE_ITEM(S5P_CLKGATE_IP_LCD1),
> > > > +   SAVE_ITEM(S5P_CLKGATE_IP_PERIR_4210),
> > > > +};
> > > > +
> > > > --- a/arch/arm/mach-exynos4/clock-exynos4212.c
> > > > +++ b/arch/arm/mach-exynos4/clock-exynos4212.c
> > > > +static struct sleep_save exynos4212_clock_save[] = {
> > > > +   SAVE_ITEM(S5P_CLKSRC_IMAGE),
> > > > +   SAVE_ITEM(S5P_CLKDIV_IMAGE),
> > > > +   SAVE_ITEM(S5P_CLKGATE_IP_IMAGE_4212),
> > > > +   SAVE_ITEM(S5P_CLKGATE_IP_PERIR_4212),
> > > > +};
> > > > +
> > > > --- a/arch/arm/mach-exynos4/clock.c
> > > > +++ b/arch/arm/mach-exynos4/clock.c
> > > > +static struct sleep_save exynos4_clock_save[] = {
> > >
> > > Hello,
> > >
> > Hi,
> >
> > > Is there any reason to have the following two
> > > SAVE_ITEM(S5P_CLKSRC_IMAGE),
> > > SAVE_ITEM(S5P_CLKDIV_IMAGE
> > > defined at both clock-exynos4210.c and clock-exynos4212.c, not defined
> > > at clock.c once?
> > >
> > Yes, I know. I just wanted to keep in mind there is a different
> > value(CLKGATE_IP_IMAGE) in regarding IMAGE clocks on each SoCs, and I
> think
> > need it now. Anyway thanks for your pointing out.
> >
> > > Also, consider using CONFIG_PM_SLEEP rather than CONFIG_PM for
> > > suspend/resume ops.
> > >
> > (Cc'ed Rafael)
> >
> > Well, even though CONFIG_PM_SLEEP is used in regarding syscore_ops, in
this
> > case, using CONFIG_PM looks better.
> >
> > If ARCH_SUSPEND_POSSIBLE will be selected, then CONFIG_SUSPEND is
> selected
> > and CONFIG_PM_SLEEP is selected in kernel/power/Kconfig and of course,
> > ARCH_SUSPEND_POSSIBLE is selected in arch/arm/Kconfig. However above
> > everything depends on CONFIG_PM. So I think to use CONFIG_PM is more
> > reasonable. In addition, it is more popular in other mainline codes now.
> >
> > Hi Rafael,
> > How do you think about this?
> 
> If you make syscore_ops depend on CONFIG_PM, they will be built but not
> used when CONFIG_PM_RUNTIME is set and CONFIG_PM_SLEEP is unset.  If
> you
> think that's acceptable, I guess you can do it (although you may get a
> few "defined but not used" warnings in that case, which don't look nice).
> 
Hmm...ok, I understand you mean CONFIG_PM_SLEEP is better in this case to
reduce useless warnings. Will use CONFIG_PM_SLEEP.

Rafael and MyungJoo, Thanks.

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

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


RE: [PATCH] ARM: EXYNOS4: Add usb ehci device to the SMDKC210

2011-08-30 Thread Kukjin Kim
Jingoo Han wrote:
> 
> This patch is to support usb ehci device to the SMDKC210 board.
> 
> Signed-off-by: Jingoo Han 
> ---
>  arch/arm/mach-exynos4/Kconfig |2 ++
>  arch/arm/mach-exynos4/mach-smdkc210.c |   16 
>  2 files changed, 18 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mach-exynos4/Kconfig b/arch/arm/mach-exynos4/Kconfig
> index 3ceefdb..12a0481 100644
> --- a/arch/arm/mach-exynos4/Kconfig
> +++ b/arch/arm/mach-exynos4/Kconfig
> @@ -115,6 +115,7 @@ config MACH_SMDKC210
>   bool "SMDKC210"
>   select CPU_EXYNOS4210
>   select S5P_DEV_FIMD0
> + select S5P_DEV_USB_EHCI
>   select S3C_DEV_RTC
>   select S3C_DEV_WDT
>   select S3C_DEV_I2C1
> @@ -127,6 +128,7 @@ config MACH_SMDKC210
>   select EXYNOS4_DEV_PD
>   select EXYNOS4_DEV_SYSMMU
>   select EXYNOS4_SETUP_FIMD0
> + select EXYNOS4_SETUP_USB_PHY
>   select EXYNOS4_SETUP_I2C1
>   select EXYNOS4_SETUP_SDHCI
>   help
> diff --git a/arch/arm/mach-exynos4/mach-smdkc210.c b/arch/arm/mach-
> exynos4/mach-smdkc210.c
> index a7c65e0..2cd2eb4 100644
> --- a/arch/arm/mach-exynos4/mach-smdkc210.c
> +++ b/arch/arm/mach-exynos4/mach-smdkc210.c
> @@ -36,6 +36,8 @@
>  #include 
>  #include 
>  #include 
> +#include 
> +#include 
> 
>  #include 
> 
> @@ -216,6 +218,16 @@ static struct i2c_board_info i2c_devs1[] __initdata =
{
>   {I2C_BOARD_INFO("wm8994", 0x1a),},
>  };
> 
> +/* USB EHCI */
> +static struct s5p_ehci_platdata smdkc210_ehci_pdata;
> +
> +static void __init smdkc210_ehci_init(void)
> +{
> + struct s5p_ehci_platdata *pdata = &smdkc210_ehci_pdata;
> +
> + s5p_ehci_set_platdata(pdata);
> +}
> +
>  static struct platform_device *smdkc210_devices[] __initdata = {
>   &s3c_device_hsmmc0,
>   &s3c_device_hsmmc1,
> @@ -224,6 +236,7 @@ static struct platform_device *smdkc210_devices[]
> __initdata = {
>   &s3c_device_i2c1,
>   &s3c_device_rtc,
>   &s3c_device_wdt,
> + &s5p_device_ehci,
>   &exynos4_device_ac97,
>   &exynos4_device_i2s0,
>   &exynos4_device_pd[PD_MFC],
> @@ -296,6 +309,9 @@ static void __init smdkc210_machine_init(void)
>   samsung_bl_set(&smdkc210_bl_gpio_info, &smdkc210_bl_data);
>   s5p_fimd0_set_platdata(&smdkc210_lcd0_pdata);
> 
> + smdkc210_ehci_init();
> + clk_xusbxti.rate = 2400;
> +
>   platform_add_devices(smdkc210_devices,
> ARRAY_SIZE(smdkc210_devices));
>  }
> 
> --
> 1.7.1

Hi Jingoo,

Maybe as you know, I merged smdkc210.c into smdkv310.c because its
components are similar so I can't apply this now.

Thanks.

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

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


RE: [PATCH] ARM: EXYNOS4: Add USB EHCI device to Origen

2011-08-30 Thread Kukjin Kim
Sachin Kamat wrote:
> 
> Signed-off-by: Pankaj Dubey 
> Signed-off-by: Sachin Kamat 
> ---
>  arch/arm/mach-exynos4/Kconfig   |2 ++
>  arch/arm/mach-exynos4/mach-origen.c |   17 +
>  2 files changed, 19 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mach-exynos4/Kconfig b/arch/arm/mach-exynos4/Kconfig
> index 3ab0f18..fba97a4 100644
> --- a/arch/arm/mach-exynos4/Kconfig
> +++ b/arch/arm/mach-exynos4/Kconfig
> @@ -189,8 +189,10 @@ config MACH_NURI
>  config MACH_ORIGEN
>   bool "ORIGEN"
>   select CPU_EXYNOS4210
> + select S5P_DEV_USB_EHCI
>   select S3C_DEV_RTC
>   select S3C_DEV_WDT
> + select EXYNOS4_SETUP_USB_PHY

If possible, please keep the ordering :(

>   select S3C_DEV_HSMMC2
>   select EXYNOS4_SETUP_SDHCI
>   help
> diff --git a/arch/arm/mach-exynos4/mach-origen.c
b/arch/arm/mach-exynos4/mach-
> origen.c
> index ed59f86..d101756 100644
> --- a/arch/arm/mach-exynos4/mach-origen.c
> +++ b/arch/arm/mach-exynos4/mach-origen.c
> @@ -24,6 +24,8 @@
>  #include 
>  #include 
>  #include 
> +#include 
> +#include 
> 
>  #include 
> 
> @@ -79,10 +81,21 @@ static struct s3c_sdhci_platdata origen_hsmmc2_pdata
> __initdata = {
>   .clk_type   = S3C_SDHCI_CLK_DIV_EXTERNAL,
>  };
> 
> +/* USB EHCI */
> +static struct s5p_ehci_platdata origen_ehci_pdata;
> +
> +static void __init origen_ehci_init(void)
> +{
> + struct s5p_ehci_platdata *pdata = &origen_ehci_pdata;
> +
> + s5p_ehci_set_platdata(pdata);
> +}
> +
>  static struct platform_device *origen_devices[] __initdata = {
>   &s3c_device_hsmmc2,
>   &s3c_device_rtc,
>   &s3c_device_wdt,
> + &s5p_device_ehci,
>  };
> 
>  static void __init origen_map_io(void)
> @@ -95,6 +108,10 @@ static void __init origen_map_io(void)
>  static void __init origen_machine_init(void)
>  {
>   s3c_sdhci2_set_platdata(&origen_hsmmc2_pdata);
> +
> + origen_ehci_init();
> + clk_xusbxti.rate = 2400;
> +
>   platform_add_devices(origen_devices, ARRAY_SIZE(origen_devices));
>  }
> 
> --
> 1.7.4.1

OK, will apply with re-ordering as per my comments.
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 2/3] ARM: EXYNOS4: Add support for secondary MMC port on ORIGEN

2011-08-30 Thread Kukjin Kim
Tushar Behera wrote:
> -Original Message-
> From: Tushar Behera [mailto:tushar.beh...@linaro.org]
> Sent: Friday, August 26, 2011 6:39 PM
> To: linux-samsung-soc@vger.kernel.org
> Cc: linaro-...@lists.linaro.org; kgene@samsung.com; patc...@linaro.org
> Subject: [PATCH 2/3] ARM: EXYNOS4: Add support for secondary MMC port on
> ORIGEN
> 
> Secondary MMC port on ORIGEN is connected to sdhci instance 0. Support
> for secondary MMC port is extended by registering sdhci instance 0.
> 
> Since sdhci instance 2 can contain a bootable media, sdhci instance 0
> is registered after instance 2.
> 
Would be helpful if above comments could be included in codes :)

> Signed-off-by: Tushar Behera 
> ---
>  arch/arm/mach-exynos4/Kconfig   |1 +
>  arch/arm/mach-exynos4/mach-origen.c |7 +++
>  2 files changed, 8 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mach-exynos4/Kconfig b/arch/arm/mach-exynos4/Kconfig
> index e6925de..4c14d5e 100644
> --- a/arch/arm/mach-exynos4/Kconfig
> +++ b/arch/arm/mach-exynos4/Kconfig
> @@ -229,6 +229,7 @@ config MACH_ORIGEN
>   select CPU_EXYNOS4210
>   select S3C_DEV_RTC
>   select S3C_DEV_WDT
> + select S3C_DEV_HSMMC
>   select S3C_DEV_HSMMC2
>   select EXYNOS4_SETUP_SDHCI
>   help
> diff --git a/arch/arm/mach-exynos4/mach-origen.c
b/arch/arm/mach-exynos4/mach-
> origen.c
> index e280270..ae18812 100644
> --- a/arch/arm/mach-exynos4/mach-origen.c
> +++ b/arch/arm/mach-exynos4/mach-origen.c
> @@ -72,6 +72,11 @@ static struct s3c2410_uartcfg origen_uartcfgs[]
__initdata = {
>   },
>  };
> 
> +static struct s3c_sdhci_platdata origen_hsmmc0_pdata __initdata = {
> + .cd_type= S3C_SDHCI_CD_INTERNAL,
> + .clk_type   = S3C_SDHCI_CLK_DIV_EXTERNAL,
> +};
> +
>  static struct s3c_sdhci_platdata origen_hsmmc2_pdata __initdata = {
>   .cd_type= S3C_SDHCI_CD_INTERNAL,
>   .clk_type   = S3C_SDHCI_CLK_DIV_EXTERNAL,
> @@ -79,6 +84,7 @@ static struct s3c_sdhci_platdata origen_hsmmc2_pdata
> __initdata = {
> 
>  static struct platform_device *origen_devices[] __initdata = {
>   &s3c_device_hsmmc2,
> + &s3c_device_hsmmc0,
>   &s3c_device_rtc,
>   &s3c_device_wdt,
>  };
> @@ -93,6 +99,7 @@ static void __init origen_map_io(void)
>  static void __init origen_machine_init(void)
>  {
>   s3c_sdhci2_set_platdata(&origen_hsmmc2_pdata);
> + s3c_sdhci0_set_platdata(&origen_hsmmc0_pdata);
>   platform_add_devices(origen_devices, ARRAY_SIZE(origen_devices));
>  }
> 
> --
> 1.7.4.1

OK, will apply.
If you don't mind, I will add comments the reason of the ordering when I
apply this.

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 1/3] ARM: EXYNOS4: Fix sdhci card detection for ORIGEN

2011-08-30 Thread Kukjin Kim
Tushar Behera wrote:
> 
> Fix incorrect value of cd_type field in platform data for sdhci
> device.
> 
> Based on "ARM: EXYNOS4: Fix card detection for sdhci 0 and 2".
> commit a0d8efedb203b5b908dd46cea38201761e2380f9
> 
> Signed-off-by: Tushar Behera 
> ---
>  arch/arm/mach-exynos4/mach-origen.c |4 +---
>  1 files changed, 1 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/arm/mach-exynos4/mach-origen.c
b/arch/arm/mach-exynos4/mach-
> origen.c
> index ed59f86..e280270 100644
> --- a/arch/arm/mach-exynos4/mach-origen.c
> +++ b/arch/arm/mach-exynos4/mach-origen.c
> @@ -73,9 +73,7 @@ static struct s3c2410_uartcfg origen_uartcfgs[]
__initdata = {
>  };
> 
>  static struct s3c_sdhci_platdata origen_hsmmc2_pdata __initdata = {
> - .cd_type= S3C_SDHCI_CD_GPIO,
> - .ext_cd_gpio= EXYNOS4_GPK2(2),
> - .ext_cd_gpio_invert = 1,
> + .cd_type= S3C_SDHCI_CD_INTERNAL,
>   .clk_type   = S3C_SDHCI_CLK_DIV_EXTERNAL,
>  };
> 
> --
> 1.7.4.1

OK, will apply.
Thanks.

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

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


RE: [PATCH] ARM: EXYNOS4: Add FIMC device on Origen board

2011-08-30 Thread Kukjin Kim
Sachin Kamat wrote:
> 
> This patch adds definitions to enable support for s5p-fimc driver on
> Origen board.
> 
> Signed-off-by: Sachin Kamat 
> ---
>  arch/arm/mach-exynos4/Kconfig   |4 
>  arch/arm/mach-exynos4/mach-origen.c |4 
>  2 files changed, 8 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mach-exynos4/Kconfig b/arch/arm/mach-exynos4/Kconfig
> index e6925de..a3d92a8 100644
> --- a/arch/arm/mach-exynos4/Kconfig
> +++ b/arch/arm/mach-exynos4/Kconfig
> @@ -227,6 +227,10 @@ config MACH_NURI
>  config MACH_ORIGEN
>   bool "ORIGEN"
>   select CPU_EXYNOS4210
> + select S5P_DEV_FIMC0
> + select S5P_DEV_FIMC1
> + select S5P_DEV_FIMC2
> + select S5P_DEV_FIMC3
>   select S3C_DEV_RTC
>   select S3C_DEV_WDT
>   select S3C_DEV_HSMMC2
> diff --git a/arch/arm/mach-exynos4/mach-origen.c
b/arch/arm/mach-exynos4/mach-
> origen.c
> index ed59f86..4a2ac49 100644
> --- a/arch/arm/mach-exynos4/mach-origen.c
> +++ b/arch/arm/mach-exynos4/mach-origen.c
> @@ -80,6 +80,10 @@ static struct s3c_sdhci_platdata origen_hsmmc2_pdata
> __initdata = {
>  };
> 
>  static struct platform_device *origen_devices[] __initdata = {
> + &s5p_device_fimc0,
> + &s5p_device_fimc1,
> + &s5p_device_fimc2,
> + &s5p_device_fimc3,
>       &s3c_device_hsmmc2,
>   &s3c_device_rtc,
>   &s3c_device_wdt,
> --
> 1.7.4.1

OK, will apply.
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 1/1] ARM: EXYNOS4: Add PWM backlight support on Origen

2011-08-30 Thread Kukjin Kim
Sachin Kamat wrote:
> 
> From: Giridhar Maruthy 
> 
> This patch adds support for LCD backlight using PWM timer on
> Origen board.
> 
> Signed-off-by: Giridhar Maruthy 
> Signed-off-by: Sachin Kamat 
> ---
>  arch/arm/mach-exynos4/Kconfig   |2 ++
>  arch/arm/mach-exynos4/mach-origen.c |   16 
>  2 files changed, 18 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mach-exynos4/Kconfig b/arch/arm/mach-exynos4/Kconfig
> index e6925de..3e9138e 100644
> --- a/arch/arm/mach-exynos4/Kconfig
> +++ b/arch/arm/mach-exynos4/Kconfig
> @@ -230,6 +230,8 @@ config MACH_ORIGEN
>   select S3C_DEV_RTC
>   select S3C_DEV_WDT
>   select S3C_DEV_HSMMC2
> + select SAMSUNG_DEV_BACKLIGHT
> + select SAMSUNG_DEV_PWM
>   select EXYNOS4_SETUP_SDHCI
>   help
> Machine support for ORIGEN based on Samsung EXYNOS4210
> diff --git a/arch/arm/mach-exynos4/mach-origen.c
b/arch/arm/mach-exynos4/mach-
> origen.c
> index ed59f86..b871815 100644
> --- a/arch/arm/mach-exynos4/mach-origen.c
> +++ b/arch/arm/mach-exynos4/mach-origen.c
> @@ -14,6 +14,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
> 
>  #include 
>  #include 
> @@ -24,6 +25,8 @@
>  #include 
>  #include 
>  #include 
> +#include 
> +#include 
> 
>  #include 
> 
> @@ -85,6 +88,17 @@ static struct platform_device *origen_devices[]
__initdata =
> {
>   &s3c_device_wdt,
>  };
> 
> +/* LCD Backlight data */
> +static struct samsung_bl_gpio_info origen_bl_gpio_info = {
> + .no = EXYNOS4_GPD0(0),
> + .func = S3C_GPIO_SFN(2),
> +};
> +
> +static struct platform_pwm_backlight_data origen_bl_data = {
> + .pwm_id = 0,
> + .pwm_period_ns = 1000,
> +};
> +
>  static void __init origen_map_io(void)
>  {
>   s5p_init_io(NULL, 0, S5P_VA_CHIPID);
> @@ -96,6 +110,8 @@ static void __init origen_machine_init(void)
>  {
>   s3c_sdhci2_set_platdata(&origen_hsmmc2_pdata);
>   platform_add_devices(origen_devices, ARRAY_SIZE(origen_devices));
> +
> + samsung_bl_set(&origen_bl_gpio_info, &origen_bl_data);
>  }
> 
>  MACHINE_START(ORIGEN, "ORIGEN")
> --
> 1.7.4.1

OK, will apply.
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 3/3] ARM: EXYNOS4: Add support for 8-bit bus width in SDHCI for ORIGEN

2011-08-30 Thread Kukjin Kim
Tushar Behera wrote:
> 
> Platform data for SDHCI controller on ORIGEN board is missing the
> support for 8-bit bus width. The platform data is extended in sync
> with other EXYNOS4 machines.
> 
> Signed-off-by: Tushar Behera 
> ---
>  arch/arm/mach-exynos4/mach-origen.c |8 
>  1 files changed, 8 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mach-exynos4/mach-origen.c
b/arch/arm/mach-exynos4/mach-
> origen.c
> index ae18812..6b6cd77 100644
> --- a/arch/arm/mach-exynos4/mach-origen.c
> +++ b/arch/arm/mach-exynos4/mach-origen.c
> @@ -75,11 +75,19 @@ static struct s3c2410_uartcfg origen_uartcfgs[]
__initdata =
> {
>  static struct s3c_sdhci_platdata origen_hsmmc0_pdata __initdata = {
>   .cd_type= S3C_SDHCI_CD_INTERNAL,
>   .clk_type   = S3C_SDHCI_CLK_DIV_EXTERNAL,
> +#ifdef CONFIG_EXYNOS4_SDHCI_CH0_8BIT
> + .max_width  = 8,
> + .host_caps  = MMC_CAP_8_BIT_DATA,
> +#endif
>  };
> 
>  static struct s3c_sdhci_platdata origen_hsmmc2_pdata __initdata = {
>   .cd_type= S3C_SDHCI_CD_INTERNAL,
>   .clk_type   = S3C_SDHCI_CLK_DIV_EXTERNAL,
> +#ifdef CONFIG_EXYNOS4_SDHCI_CH2_8BIT
> + .max_width  = 8,
> + .host_caps  = MMC_CAP_8_BIT_DATA,
> +#endif
>  };
> 
>  static struct platform_device *origen_devices[] __initdata = {
> --
> 1.7.4.1

Hi Tushar,

I wonder the bus width of SDHCI controller can be changed manually on ORIGEN
like SMDK board.

Thanks.

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

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


RE: [PATCH] ARM: EXYNOS4: iommu: Add IOMMU API and moved to drivers/iommu

2011-08-30 Thread Kukjin Kim
KyongHo Cho wrote:
> 
> Implemented IOMMU API for Exynos4 platform that has IOMMU(System MMU).
> The previous System MMU driver exposed its own functions and was lack
> of page table management.
> 
> This patch includes complete implementation of IOMMU API
> and it is capable of mapping and unmapping any number of orders.
> 
> iommu_map() for Exynos4 does not map 16MiB page because it is not
> practical now. 1MiB page is sufficient for larger physically contiguous
> memory mapping. Performance degradation due to TLB miss is not such a
> big problem with 1MiB page.
> 
> Since archdata field of structure 'device' contains nothing in ARM,
> I've used linked list to manage the relation between domain and device.
> 
> Marek is trying to add domain and dma_map_ops fields into dev_archdata.
> This way of relation management will be changed after the Marek's work
> is merged into the mainline.
> 
> Signed-off-by: KyongHo Cho 
> ---
>  arch/arm/mach-exynos4/include/mach/sysmmu.h |9 +-
>  drivers/iommu/Kconfig   |   11 +
>  drivers/iommu/Makefile  |1 +
>  drivers/iommu/exynos4_sysmmu.c  |  343
> ++
>  drivers/iommu/exynos4_sysmmu.h  |   18 +
>  drivers/iommu/exynos_iommu.c|  496
> +++
>  6 files changed, 872 insertions(+), 6 deletions(-)
>  create mode 100644 drivers/iommu/exynos4_sysmmu.c
>  create mode 100644 drivers/iommu/exynos4_sysmmu.h
>  create mode 100644 drivers/iommu/exynos_iommu.c
> 

Hi KyongHo,

Basically, we need this for EXYNOS System MMU but I think, this is required
to re-work based on latest kernel and if possible, please make it look as a
single patch set about regarding patches to prevent missing something
important.

Thanks.

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


> diff --git a/arch/arm/mach-exynos4/include/mach/sysmmu.h b/arch/arm/mach-
> exynos4/include/mach/sysmmu.h
> index 6a5fbb5..2be20c5 100644
> --- a/arch/arm/mach-exynos4/include/mach/sysmmu.h
> +++ b/arch/arm/mach-exynos4/include/mach/sysmmu.h
> @@ -34,13 +34,10 @@ enum exynos4_sysmmu_ips {
>  };
> 
>  #define S5P_SYSMMU_TOTAL_IPNUM
>   EXYNOS4_SYSMMU_TOTAL_IPNUM
> -
> -extern const char *sysmmu_ips_name[EXYNOS4_SYSMMU_TOTAL_IPNUM];
> +#define SYSMMU_NONE
>   S5P_SYSMMU_TOTAL_IPNUM
> 
>  typedef enum exynos4_sysmmu_ips sysmmu_ips;
> 
> -void sysmmu_clk_init(struct device *dev, sysmmu_ips ips);
> -void sysmmu_clk_enable(sysmmu_ips ips);
> -void sysmmu_clk_disable(sysmmu_ips ips);
> -
> +#else /* __ASM_ARM_ARCH_SYSMMU_H */
> +#error mach/sysmmu.h must not be included by device drivers
>  #endif /* __ASM_ARM_ARCH_SYSMMU_H */
> diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig
> index b57b3fa..a9fcc79 100644
> --- a/drivers/iommu/Kconfig
> +++ b/drivers/iommu/Kconfig
> @@ -107,4 +107,15 @@ config INTR_REMAP
> To use x2apic mode in the CPU's which support x2APIC enhancements
> or
> to support platforms with CPU's having > 8 bit APIC ID, say Y.
> 
> +# EXYNOS IOMMU support
> +config EXYNOS_IOMMU
> + bool "Exynos4 IOMMU(System MMU) Support"
> + depends on ARCH_EXYNOS4
> + select IOMMU_API
> + help
> +   Support for the System MMU embedded in Samsung Exynos4 SOCs.
> +   These IOMMUs allow virtualization of the address space used by
most
> +   cores within the multimedia subsystem.
> +
> +   If unsure, say N here.
>  endif # IOMMU_SUPPORT
> diff --git a/drivers/iommu/Makefile b/drivers/iommu/Makefile
> index 4d4d77d..446bbdd 100644
> --- a/drivers/iommu/Makefile
> +++ b/drivers/iommu/Makefile
> @@ -3,3 +3,4 @@ obj-$(CONFIG_MSM_IOMMU) += msm_iommu.o
> msm_iommu_dev.o
>  obj-$(CONFIG_AMD_IOMMU) += amd_iommu.o amd_iommu_init.o
>  obj-$(CONFIG_DMAR) += dmar.o iova.o intel-iommu.o
>  obj-$(CONFIG_INTR_REMAP) += dmar.o intr_remapping.o
> +obj-$(CONFIG_EXYNOS_IOMMU) += exynos_iommu.o exynos4_sysmmu.o
> diff --git a/drivers/iommu/exynos4_sysmmu.c
b/drivers/iommu/exynos4_sysmmu.c
> new file mode 100644
> index 000..01e0966
> --- /dev/null
> +++ b/drivers/iommu/exynos4_sysmmu.c
> @@ -0,0 +1,343 @@
> +/* linux/drivers/iommu/exynos4_sysmmu.c
> + *
> + * Copyright (c) 2011 Samsung Electronics Co., Ltd.
> + *   http://www.samsung.com
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License version 2 as
> + * published by the Free Software Foundation.
> + */
> +
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
&g

RE: [PATCH] ARM: EXYNOS4: Enable system MMU support on Origen

2011-08-30 Thread Kukjin Kim
Sachin Kamat wrote:
> 
> Signed-off-by: Sachin Kamat 
> ---
>  arch/arm/mach-exynos4/Kconfig   |1 +
>  arch/arm/mach-exynos4/mach-origen.c |1 +
>  2 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mach-exynos4/Kconfig b/arch/arm/mach-exynos4/Kconfig
> index 3ab0f18..bdb76e2 100644
> --- a/arch/arm/mach-exynos4/Kconfig
> +++ b/arch/arm/mach-exynos4/Kconfig
> @@ -192,6 +192,7 @@ config MACH_ORIGEN
>   select S3C_DEV_RTC
>   select S3C_DEV_WDT
>   select S3C_DEV_HSMMC2
> + select EXYNOS4_DEV_SYSMMU
>   select EXYNOS4_SETUP_SDHCI
>   help
> Machine support for ORIGEN based on Samsung EXYNOS4210
> diff --git a/arch/arm/mach-exynos4/mach-origen.c
b/arch/arm/mach-exynos4/mach-
> origen.c
> index ed59f86..d04f7ee 100644
> --- a/arch/arm/mach-exynos4/mach-origen.c
> +++ b/arch/arm/mach-exynos4/mach-origen.c
> @@ -83,6 +83,7 @@ static struct platform_device *origen_devices[]
__initdata = {
>   &s3c_device_hsmmc2,
>   &s3c_device_rtc,
>   &s3c_device_wdt,
> + &exynos4_device_sysmmu,
>  };
> 
>  static void __init origen_map_io(void)
> --
> 1.7.4.1

Hi Sachin,

Hmm, do you _really_ use this feature on ORIGEN board now?

As I know, the EXYNOS System MMU driver will be changed like a form of omap
and msm soon maybe it's within 1 or 2 weeks. So if this is not required on
ORIGEN now, I'd like to wait for new EXYNOS System MMU driver.

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 1/2] ARM: EXYNOS4: Code cleanup and remove extra functions.

2011-08-30 Thread Kukjin Kim
orts of both PHY and Link */
> - rstcon = readl(EXYNOS4_RSTCON) | HOST_LINK_PORT_SWRST_MASK |
> - PHY1_SWRST_MASK;
> - writel(rstcon, EXYNOS4_RSTCON);
> - udelay(10);
> + /* reset all ports of both PHY and Link */
> + rstcon = readl(EXYNOS4_RSTCON) |
> HOST_LINK_PORT_SWRST_MASK |
> + PHY1_SWRST_MASK;
> + writel(rstcon, EXYNOS4_RSTCON);
> + udelay(10);
> 
> - rstcon &= ~(HOST_LINK_PORT_SWRST_MASK | PHY1_SWRST_MASK);
> - writel(rstcon, EXYNOS4_RSTCON);
> - udelay(80);
> + rstcon &= ~(HOST_LINK_PORT_SWRST_MASK |
> PHY1_SWRST_MASK);
> + writel(rstcon, EXYNOS4_RSTCON);
> + udelay(80);
> 
> - clk_disable(otg_clk);
> - clk_put(otg_clk);
> + clk_disable(otg_clk);
> + clk_put(otg_clk);
> 
> - return 0;
> + return 0;
> + }
> + return -EINVAL;
>  }
> 
> -static int exynos4_usb_phy1_exit(struct platform_device *pdev)
> +int s5p_usb_phy_exit(struct platform_device *pdev, int type)
>  {
> - struct clk *otg_clk;
> - int err;
> -
> - otg_clk = clk_get(&pdev->dev, "otg");
> - if (IS_ERR(otg_clk)) {
> - dev_err(&pdev->dev, "Failed to get otg clock\n");
> - return PTR_ERR(otg_clk);
> - }
> + if (type == S5P_USB_PHY_HOST) {
> + struct clk *otg_clk;
> + int err;
> + otg_clk = clk_get(&pdev->dev, "otg");
> + if (IS_ERR(otg_clk)) {
> + dev_err(&pdev->dev, "Failed to get otg clock\n");
> + return PTR_ERR(otg_clk);
> + }
> 
> - err = clk_enable(otg_clk);
> - if (err) {
> - clk_put(otg_clk);
> - return err;
> - }
> + err = clk_enable(otg_clk);
> + if (err) {
> + clk_put(otg_clk);
> + return err;
> + }
> 
> - writel((readl(EXYNOS4_PHYPWR) |
> PHY1_STD_ANALOG_POWERDOWN),
> + writel((readl(EXYNOS4_PHYPWR) |
> PHY1_STD_ANALOG_POWERDOWN),
>   EXYNOS4_PHYPWR);
> 
> - writel(readl(S5P_USBHOST_PHY_CONTROL) &
> ~S5P_USBHOST_PHY_ENABLE,
> + writel(readl(S5P_USBHOST_PHY_CONTROL) &
> ~S5P_USBHOST_PHY_ENABLE,
>   S5P_USBHOST_PHY_CONTROL);
> 
> - clk_disable(otg_clk);
> - clk_put(otg_clk);
> -
> - return 0;
> -}
> -
> -int s5p_usb_phy_init(struct platform_device *pdev, int type)
> -{
> - if (type == S5P_USB_PHY_HOST)
> - return exynos4_usb_phy1_init(pdev);
> -
> - return -EINVAL;
> -}
> -
> -int s5p_usb_phy_exit(struct platform_device *pdev, int type)
> -{
> - if (type == S5P_USB_PHY_HOST)
> - return exynos4_usb_phy1_exit(pdev);
> + clk_disable(otg_clk);
> + clk_put(otg_clk);
> 
> + return 0;
> + }
>   return -EINVAL;
>  }
> --
> 1.7.4.1

(Cc'ed Yulgon Kim and Kyoungil Kim)

Hi Sachin,

I don't know why this is required on usb-phy control for EXYNOS4 now.

Actually, other upcoming EXYNOS SoCs have more usb phys than EXYNOS4210, so
this can make it more difficult to control.

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 2/2] ARM: EXYNOS4: Add USB PHY initialization for device

2011-08-30 Thread Kukjin Kim
 break;
> - case 24 * MHZ:
> - phyclk |= CLKSEL_24M;
> - break;
> - default:
> - case 48 * MHZ:
> - /* default reference clock */
> - break;
> - }
> - clk_put(xusbxti_clk);
> - }
> -
> - writel(phyclk, EXYNOS4_PHYCLK);
> -
> - /* floating prevention logic: disable */
>   writel((readl(EXYNOS4_PHY1CON) | FPENABLEN),
> EXYNOS4_PHY1CON);
> 
>   /* set to normal HSIC 0 and 1 of PHY1 */
> @@ -84,30 +98,61 @@ int s5p_usb_phy_init(struct platform_device *pdev,
int type)
> 
>   rstcon &= ~(HOST_LINK_PORT_SWRST_MASK |
> PHY1_SWRST_MASK);
>   writel(rstcon, EXYNOS4_RSTCON);
> - udelay(80);
> + } else if (type == S5P_USB_PHY_DEVICE) {
> + writel(readl(S5P_USBDEVICE_PHY_CONTROL) | (0x1<<0),
> + S5P_USBDEVICE_PHY_CONTROL);
> + writel((readl(EXYNOS4_PHYPWR) & ~(0x7<<3)&~(0x1<<0)),
> + EXYNOS4_PHYPWR);
> + writel((readl(EXYNOS4_PHYCLK) & ~(0x5<<2))|(0x3<<0),
> + EXYNOS4_PHYCLK);
> + writel((readl(EXYNOS4_RSTCON) & ~(0x3<<1))|(0x1<<0),
> + EXYNOS4_RSTCON);
> + udelay(10);
> + writel(readl(EXYNOS4_RSTCON) & ~(0x7<<0),
> + EXYNOS4_RSTCON);
> + }
> + udelay(80);
> 
> - clk_disable(otg_clk);
> - clk_put(otg_clk);
> + clk_disable(otg_clk);
> + clk_put(otg_clk);
> + if (type == S5P_USB_PHY_HOST)
> + clk_put(usbhost_clk);
> 
> - return 0;
> - }
> - return -EINVAL;
> + return 0;
>  }
> 
>  int s5p_usb_phy_exit(struct platform_device *pdev, int type)
>  {
> + struct clk *otg_clk, *usbhost_clk;
> + int err;
> +
> + if ((type != S5P_USB_PHY_HOST) && (type != S5P_USB_PHY_DEVICE))
> + return -EINVAL;
> +
> + otg_clk = clk_get(&pdev->dev, "otg");
> + if (IS_ERR(otg_clk)) {
> + dev_err(&pdev->dev, "Failed to get otg clock\n");
> + return PTR_ERR(otg_clk);
> + }
> +
> + err = clk_enable(otg_clk);
> + if (err) {
> + clk_put(otg_clk);
> + return err;
> + }
> +
>   if (type == S5P_USB_PHY_HOST) {
> - struct clk *otg_clk;
> - int err;
> - otg_clk = clk_get(&pdev->dev, "otg");
> - if (IS_ERR(otg_clk)) {
> - dev_err(&pdev->dev, "Failed to get otg clock\n");
> - return PTR_ERR(otg_clk);
> +
> + usbhost_clk = clk_get(&pdev->dev, "usbhost");
> +
> + if (IS_ERR(usbhost_clk)) {
> + dev_err(&pdev->dev, "Failed to get usbhost
clock\n");
> + return PTR_ERR(usbhost_clk);
>   }
> 
> - err = clk_enable(otg_clk);
> + err = clk_enable(usbhost_clk);

Wrong, do you _really_ want to enable usbhost_clk here, in usb_phy_exit()?


>   if (err) {
> - clk_put(otg_clk);
> + clk_put(usbhost_clk);
>   return err;
>   }
> 
> @@ -117,10 +162,18 @@ int s5p_usb_phy_exit(struct platform_device *pdev,
int
> type)
>   writel(readl(S5P_USBHOST_PHY_CONTROL) &
> ~S5P_USBHOST_PHY_ENABLE,
>   S5P_USBHOST_PHY_CONTROL);
> 
> - clk_disable(otg_clk);
> - clk_put(otg_clk);
> + } else if (type == S5P_USB_PHY_DEVICE) {
> + writel(readl(EXYNOS4_PHYPWR) | (0x3<<3),
> + EXYNOS4_PHYPWR);
> 
> - return 0;
> + writel(readl(S5P_USBDEVICE_PHY_CONTROL) & ~(1<<0),
> + S5P_USBDEVICE_PHY_CONTROL);
>   }
> - return -EINVAL;
> +
> + clk_disable(otg_clk);
> + clk_put(otg_clk);
> + if (type == S5P_USB_PHY_HOST)
> + clk_put(usbhost_clk);
> +
> + return 0;
>  }
> --
> 1.7.4.1

I can't agree this patch. I think you need to check about whole USB PHY
structure on EXYNOS4 again.

In addition, I don’t have idea we need to control USB Host clock for
handling USB PHY enable/disable.

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: S3C24XX: remove unused gpio codes

2011-08-30 Thread Kukjin Kim
Kukjin Kim wrote:
> 
> Cc: Ben Dooks 
> Signed-off-by: Kukjin Kim 
> ---
>  arch/arm/mach-s3c2400/gpio.c |   42 
>  arch/arm/mach-s3c2410/gpio.c |   72
--
>  arch/arm/mach-s3c2412/gpio.c |   62 
>  3 files changed, 0 insertions(+), 176 deletions(-)
>  delete mode 100644 arch/arm/mach-s3c2400/gpio.c
>  delete mode 100644 arch/arm/mach-s3c2410/gpio.c
>  delete mode 100644 arch/arm/mach-s3c2412/gpio.c
> 
As a note, I applied this into my -cleanup branch except s3c2400 stuff
because it has been already removed before.

Thanks.

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

> diff --git a/arch/arm/mach-s3c2400/gpio.c b/arch/arm/mach-s3c2400/gpio.c
> deleted file mode 100644
> index 6c68e78..000
> --- a/arch/arm/mach-s3c2400/gpio.c
> +++ /dev/null
> @@ -1,42 +0,0 @@
> -/* linux/arch/arm/mach-s3c2400/gpio.c
> - *
> - * Copyright (c) 2006 Lucas Correia Villa Real 
> - *
> - * S3C2400 GPIO support
> - *
> - * 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, or
> - * (at your option) any later version.
> - *
> - * This program is distributed in the hope that it will be useful,
> - * but WITHOUT ANY WARRANTY; without even the implied warranty of
> - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> - * GNU General Public License for more details.
> - *
> - * You should have received a copy of the GNU General Public License
> - * along with this program; if not, write to the Free Software
> - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
USA
> -*/
> -
> -#include 
> -#include 
> -#include 
> -#include 
> -#include 
> -#include 
> -
> -#include 
> -#include 
> -
> -#include 
> -
> -int s3c2400_gpio_getirq(unsigned int pin)
> -{
> - if (pin < S3C2410_GPE(0) || pin > S3C2400_GPE(7))
> - return -EINVAL;  /* not valid interrupts */
> -
> - return (pin - S3C2410_GPE(0)) + IRQ_EINT0;
> -}
> -
> -EXPORT_SYMBOL(s3c2400_gpio_getirq);
> diff --git a/arch/arm/mach-s3c2410/gpio.c b/arch/arm/mach-s3c2410/gpio.c
> deleted file mode 100644
> index 9664e01..000
> --- a/arch/arm/mach-s3c2410/gpio.c
> +++ /dev/null
> @@ -1,72 +0,0 @@
> -/* linux/arch/arm/mach-s3c2410/gpio.c
> - *
> - * Copyright (c) 2004-2006 Simtec Electronics
> - *   Ben Dooks 
> - *
> - * S3C2410 GPIO support
> - *
> - * 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, or
> - * (at your option) any later version.
> - *
> - * This program is distributed in the hope that it will be useful,
> - * but WITHOUT ANY WARRANTY; without even the implied warranty of
> - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> - * GNU General Public License for more details.
> - *
> - * You should have received a copy of the GNU General Public License
> - * along with this program; if not, write to the Free Software
> - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
USA
> - */
> -
> -#include 
> -#include 
> -#include 
> -#include 
> -#include 
> -#include 
> -
> -#include 
> -#include 
> -#include 
> -
> -#include 
> -
> -int s3c2410_gpio_irqfilter(unsigned int pin, unsigned int on,
> -unsigned int config)
> -{
> - void __iomem *reg = S3C24XX_EINFLT0;
> - unsigned long flags;
> - unsigned long val;
> -
> - if (pin < S3C2410_GPG(8) || pin > S3C2410_GPG(15))
> - return -EINVAL;
> -
> - config &= 0xff;
> -
> - pin -= S3C2410_GPG(8);
> - reg += pin & ~3;
> -
> - local_irq_save(flags);
> -
> - /* update filter width and clock source */
> -
> - val = __raw_readl(reg);
> - val &= ~(0xff << ((pin & 3) * 8));
> - val |= config << ((pin & 3) * 8);
> - __raw_writel(val, reg);
> -
> - /* update filter enable */
> -
> - val = __raw_readl(S3C24XX_EXTINT2);
> - val &= ~(1 << ((pin * 4) + 3));
> - val |= on << ((pin * 4) + 3);
> - __raw_writel(val, S3C24XX_EXTINT2);
> -
> - local_irq_restore(flags);
> -
> - return 0;
> -}
> -
> -EXPORT_SYMBOL(s3c2410_gpio_irqfilter);
> diff --git a/arch/arm/mach-s3c2412/gpio.c b/arch/arm/m

RE: [PATCH] mmc: core: eMMC4.5 Add the timeout for switch

2011-08-31 Thread Kukjin Kim
Girish K S wrote:
> 
> This patch adds the code to handle the default timeout
> for switch command.
> For eMMC 4.5 devices if timeout is not specified for the switch
> command while accessing a specific field,then the default timeout
> shall be used to timeout. Specification says there is no timeout
> defined while accessing BKOPS_START, SANITIZE_START, FLUSH_CACHE
> field(so these fields are excluded).
> 
> Signed-off-by: Girish K S 
> ---
>  drivers/mmc/core/mmc.c |5 +
>  drivers/mmc/core/mmc_ops.c |8 
>  include/linux/mmc/card.h   |1 +
>  include/linux/mmc/mmc.h|4 
>  4 files changed, 18 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
> index 5700b1c..5b9fb6a 100644
> --- a/drivers/mmc/core/mmc.c
> +++ b/drivers/mmc/core/mmc.c
> @@ -405,6 +405,11 @@ static int mmc_read_ext_csd(struct mmc_card *card, u8
> *ext_csd)
>   if (card->ext_csd.rev >= 5)
>   card->ext_csd.rel_param =
> ext_csd[EXT_CSD_WR_REL_PARAM];
> 
> + if (card->ext_csd.rev > 5) {
> + /* (eMMC 4.5)timeout is expressed in units of 10 ms*/
> + card->ext_csd.cmd6_timeout =
> ext_csd[EXT_CSD_CMD6_TIME]*10;
> + }
> +
>   if (ext_csd[EXT_CSD_ERASED_MEM_CONT])
>   card->erased_byte = 0xFF;
>   else
> diff --git a/drivers/mmc/core/mmc_ops.c b/drivers/mmc/core/mmc_ops.c
> index 770c3d0..c4d82f4 100644
> --- a/drivers/mmc/core/mmc_ops.c
> +++ b/drivers/mmc/core/mmc_ops.c
> @@ -394,6 +394,14 @@ int mmc_switch(struct mmc_card *card, u8 set, u8
index,
> u8 value,
>   cmd.flags = MMC_RSP_SPI_R1B | MMC_RSP_R1B | MMC_CMD_AC;
>   cmd.cmd_timeout_ms = timeout_ms;
> 
> + /* timeout is not defined for below command indexes (eMMC 4.5) */
> + if ((timeout_ms == 0)   &&
> + (card->ext_csd->rev > 5)&&
> + (index != EXT_CSD_BKOPS_START)  &&
> + (index != EXT_CSD_SANITIZE_START)   &&
> + (index != EXT_CSD_FLUSH_CACHE))
> + cmd.cmd_timeout_ms = card->ext_csd->cmd6_timeout;
> +
>   err = mmc_wait_for_cmd(card->host, &cmd, MMC_CMD_RETRIES);
>   if (err)
>   return err;
> diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h
> index b460fc2..ef88412 100644
> --- a/include/linux/mmc/card.h
> +++ b/include/linux/mmc/card.h
> @@ -50,6 +50,7 @@ struct mmc_ext_csd {
>   u8  rel_sectors;
>   u8  rel_param;
>   u8  part_config;
> + u8  cmd6_timeout;   /* timeout in ms */
>   unsigned intpart_time;  /* Units: ms */
>   unsigned intsa_timeout; /* Units: 100ns */
>   unsigned inths_max_dtr;
> diff --git a/include/linux/mmc/mmc.h b/include/linux/mmc/mmc.h
> index 5a794cb..a23f836 100644
> --- a/include/linux/mmc/mmc.h
> +++ b/include/linux/mmc/mmc.h
> @@ -270,8 +270,11 @@ struct _mmc_csd {
>   * EXT_CSD fields
>   */
> 
> +#define EXT_CSD_FLUSH_CACHE  32  /* R/W */
>  #define EXT_CSD_PARTITION_ATTRIBUTE  156 /* R/W */
>  #define EXT_CSD_PARTITION_SUPPORT160 /* RO */
> +#define EXT_CSD_BKOPS_START  164 /* R/W */
> +#define EXT_CSD_SANITIZE_START   165 /* R/W */
>  #define EXT_CSD_WR_REL_PARAM 166 /* RO */
>  #define EXT_CSD_ERASE_GROUP_DEF  175 /* R/W */
>  #define EXT_CSD_PART_CONFIG  179 /* R/W */
> @@ -293,6 +296,7 @@ struct _mmc_csd {
>  #define EXT_CSD_SEC_ERASE_MULT   230 /* RO */
>  #define EXT_CSD_SEC_FEATURE_SUPPORT  231 /* RO */
>  #define EXT_CSD_TRIM_MULT232 /* RO */
> +#define EXT_CSD_CMD6_TIME248 /* RO */
> 
>  /*
>   * EXT_CSD field definitions
> --
> 1.7.1

Hi Girish,

(Cc'ed Seungwon Jeon)

As I know, Seungwon Jeon has been submitted same/similar patch before this.
http://www.spinics.net/lists/linux-mmc/msg09770.html

Chris,
I cannot find your review on that...

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 1/2] mmc: sdhci-s3c: add default controller configuration

2011-09-04 Thread Kukjin Kim
Thomas Abraham wrote:
> 
> The default controller configuration which was previously setup by
> platform helper functions is moved into the driver.
> 
> Cc: Ben Dooks 
> Signed-off-by: Thomas Abraham 
> ---
>  drivers/mmc/host/sdhci-s3c.c |   28 +---
>  1 files changed, 17 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/mmc/host/sdhci-s3c.c b/drivers/mmc/host/sdhci-s3c.c
> index 2bd7bf4..d891682 100644
> --- a/drivers/mmc/host/sdhci-s3c.c
> +++ b/drivers/mmc/host/sdhci-s3c.c
> @@ -203,17 +203,23 @@ static void sdhci_s3c_set_clock(struct sdhci_host
*host,
> unsigned int clock)
>   writel(ctrl, host->ioaddr + S3C_SDHCI_CONTROL2);
>   }
> 
> - /* reconfigure the hardware for new clock rate */
> -
> - {
> - struct mmc_ios ios;
> -
> - ios.clock = clock;
> -
> - if (ourhost->pdata->cfg_card)
> - (ourhost->pdata->cfg_card)(ourhost->pdev, host-
> >ioaddr,
> -&ios, NULL);
> - }
> + /* reprogram default hardware configuration */
> + writel(S3C64XX_SDHCI_CONTROL4_DRIVE_9mA,
> + host->ioaddr + S3C64XX_SDHCI_CONTROL4);

Since there are above codes on only S5PC100 and S5PV210, I'm not sure above
is needed on other Samsung SoCs.

I need to sort out checking.

> +
> + ctrl = readl(host->ioaddr + S3C_SDHCI_CONTROL2);

+   ctrl &= S3C_SDHCI_CTRL2_SELBASECLK_MASK; ?

> + ctrl |= (S3C64XX_SDHCI_CTRL2_ENSTAASYNCCLR |
> +   S3C64XX_SDHCI_CTRL2_ENCMDCNFMSK |
> +   S3C_SDHCI_CTRL2_ENFBCLKRX |
> +   S3C_SDHCI_CTRL2_DFCNT_NONE |
> +   S3C_SDHCI_CTRL2_ENCLKOUTHOLD);
> + writel(ctrl, host->ioaddr + S3C_SDHCI_CONTROL2);
> +
> + /* reconfigure the controller for new clock rate */
> + ctrl = (S3C_SDHCI_CTRL3_FCSEL1 | S3C_SDHCI_CTRL3_FCSEL0);
> + if (clock < 25 * 100)
> + ctrl |= (S3C_SDHCI_CTRL3_FCSEL3 |
> S3C_SDHCI_CTRL3_FCSEL2);
> + writel(ctrl, host->ioaddr + S3C_SDHCI_CONTROL3);
>  }
> 
>  /**
> --

Basically, it's good to move common codes and to remove that. But I'm not
sure we don't _really_ need to keep SoC specific control function such as
cfg_card().

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 2/2] arm: samsung: remove sdhci default configuration setup platform helper

2011-09-04 Thread Kukjin Kim
(struct platform_device *dev,
> -void __iomem *r,
> -struct mmc_ios *ios,
> -struct mmc_card *card);
> -
>  static inline void s5pc100_default_sdhci0(void)
>  {
>  #ifdef CONFIG_S3C_DEV_HSMMC
>   s3c_hsmmc0_def_platdata.clocks = s5pc100_hsmmc_clksrcs;
>   s3c_hsmmc0_def_platdata.cfg_gpio = s5pc100_setup_sdhci0_cfg_gpio;
> - s3c_hsmmc0_def_platdata.cfg_card = s5pc100_setup_sdhci0_cfg_card;
>  #endif
>  }
> 
> @@ -263,7 +226,6 @@ static inline void s5pc100_default_sdhci1(void)
>  #ifdef CONFIG_S3C_DEV_HSMMC1
>   s3c_hsmmc1_def_platdata.clocks = s5pc100_hsmmc_clksrcs;
>   s3c_hsmmc1_def_platdata.cfg_gpio = s5pc100_setup_sdhci1_cfg_gpio;
> - s3c_hsmmc1_def_platdata.cfg_card = s5pc100_setup_sdhci0_cfg_card;
>  #endif
>  }
> 
> @@ -272,7 +234,6 @@ static inline void s5pc100_default_sdhci2(void)
>  #ifdef CONFIG_S3C_DEV_HSMMC2
>   s3c_hsmmc2_def_platdata.clocks = s5pc100_hsmmc_clksrcs;
>   s3c_hsmmc2_def_platdata.cfg_gpio = s5pc100_setup_sdhci2_cfg_gpio;
> - s3c_hsmmc2_def_platdata.cfg_card = s5pc100_setup_sdhci0_cfg_card;
>  #endif
>  }
> 
> @@ -288,17 +249,11 @@ static inline void s5pc100_default_sdhci2(void) { }
>  #ifdef CONFIG_S5PV210_SETUP_SDHCI
>  extern char *s5pv210_hsmmc_clksrcs[4];
> 
> -extern void s5pv210_setup_sdhci_cfg_card(struct platform_device *dev,
> -void __iomem *r,
> -struct mmc_ios *ios,
> -struct mmc_card *card);
> -
>  static inline void s5pv210_default_sdhci0(void)
>  {
>  #ifdef CONFIG_S3C_DEV_HSMMC
>   s3c_hsmmc0_def_platdata.clocks = s5pv210_hsmmc_clksrcs;
>   s3c_hsmmc0_def_platdata.cfg_gpio = s5pv210_setup_sdhci0_cfg_gpio;
> - s3c_hsmmc0_def_platdata.cfg_card = s5pv210_setup_sdhci_cfg_card;
>  #endif
>  }
> 
> @@ -307,7 +262,6 @@ static inline void s5pv210_default_sdhci1(void)
>  #ifdef CONFIG_S3C_DEV_HSMMC1
>   s3c_hsmmc1_def_platdata.clocks = s5pv210_hsmmc_clksrcs;
>   s3c_hsmmc1_def_platdata.cfg_gpio = s5pv210_setup_sdhci1_cfg_gpio;
> - s3c_hsmmc1_def_platdata.cfg_card = s5pv210_setup_sdhci_cfg_card;
>  #endif
>  }
> 
> @@ -316,7 +270,6 @@ static inline void s5pv210_default_sdhci2(void)
>  #ifdef CONFIG_S3C_DEV_HSMMC2
>   s3c_hsmmc2_def_platdata.clocks = s5pv210_hsmmc_clksrcs;
>   s3c_hsmmc2_def_platdata.cfg_gpio = s5pv210_setup_sdhci2_cfg_gpio;
> - s3c_hsmmc2_def_platdata.cfg_card = s5pv210_setup_sdhci_cfg_card;
>  #endif
>  }
> 
> @@ -325,7 +278,6 @@ static inline void s5pv210_default_sdhci3(void)
>  #ifdef CONFIG_S3C_DEV_HSMMC3
>   s3c_hsmmc3_def_platdata.clocks = s5pv210_hsmmc_clksrcs;
>   s3c_hsmmc3_def_platdata.cfg_gpio = s5pv210_setup_sdhci3_cfg_gpio;
> - s3c_hsmmc3_def_platdata.cfg_card = s5pv210_setup_sdhci_cfg_card;
>  #endif
>  }
> 
> @@ -341,17 +293,11 @@ static inline void s5pv210_default_sdhci3(void) { }
>  #ifdef CONFIG_EXYNOS4_SETUP_SDHCI
>  extern char *exynos4_hsmmc_clksrcs[4];
> 
> -extern void exynos4_setup_sdhci_cfg_card(struct platform_device *dev,
> -void __iomem *r,
> -struct mmc_ios *ios,
> -struct mmc_card *card);
> -
>  static inline void exynos4_default_sdhci0(void)
>  {
>  #ifdef CONFIG_S3C_DEV_HSMMC
>   s3c_hsmmc0_def_platdata.clocks = exynos4_hsmmc_clksrcs;
>   s3c_hsmmc0_def_platdata.cfg_gpio = exynos4_setup_sdhci0_cfg_gpio;
> - s3c_hsmmc0_def_platdata.cfg_card = exynos4_setup_sdhci_cfg_card;
>  #endif
>  }
> 
> @@ -360,7 +306,6 @@ static inline void exynos4_default_sdhci1(void)
>  #ifdef CONFIG_S3C_DEV_HSMMC1
>   s3c_hsmmc1_def_platdata.clocks = exynos4_hsmmc_clksrcs;
>   s3c_hsmmc1_def_platdata.cfg_gpio = exynos4_setup_sdhci1_cfg_gpio;
> - s3c_hsmmc1_def_platdata.cfg_card = exynos4_setup_sdhci_cfg_card;
>  #endif
>  }
> 
> @@ -369,7 +314,6 @@ static inline void exynos4_default_sdhci2(void)
>  #ifdef CONFIG_S3C_DEV_HSMMC2
>   s3c_hsmmc2_def_platdata.clocks = exynos4_hsmmc_clksrcs;
>   s3c_hsmmc2_def_platdata.cfg_gpio = exynos4_setup_sdhci2_cfg_gpio;
> - s3c_hsmmc2_def_platdata.cfg_card = exynos4_setup_sdhci_cfg_card;
>  #endif
>  }
> 
> @@ -378,7 +322,6 @@ static inline void exynos4_default_sdhci3(void)
>  #ifdef CONFIG_S3C_DEV_HSMMC3
>   s3c_hsmmc3_def_platdata.clocks = exynos4_hsmmc_clksrcs;
>   s3c_hsmmc3_def_platdata.cfg_gpio = exynos4_setup_sdhci3_cfg_gpio;
> - s3c_hsmmc3_def_platdata.cfg_card = exynos4_setup_sdhci_cfg_card;
>  #endif
>  }
> 
> --
> 1.6.6.rc2

Hi Thomas,

The arch/arm/plat-samsung/dev-hsmmcX.c files have been changed due to commit
61e62fcb ("ARM: SAMSUNG: Consolidate common function to set SDHCI plat
data"). So if possible please make your patch based on latest my for-next :)

If any problems, please let me 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 6/6] ARM: EXYNOS4: Limit usage of pl330 device instance to non-dt build

2011-09-04 Thread Kukjin Kim
> -Original Message-
> From: Thomas Abraham [mailto:thomas.abra...@linaro.org]
> Sent: Thursday, September 01, 2011 6:05 PM
> To: devicetree-disc...@lists.ozlabs.org
> Cc: grant.lik...@secretlab.ca; linux-arm-ker...@lists.infradead.org;
linux-samsung-
> s...@vger.kernel.org; kgene@samsung.com; robherri...@gmail.com;
> vinod.k...@intel.com; patc...@linaro.org; jassisinghb...@gmail.com;
> boojin@samsung.com
> Subject: [PATCH v2 6/6] ARM: EXYNOS4: Limit usage of pl330 device instance
to
> non-dt build
> 
> The pl330 device instances and associated platform data is required only
> for non-device-tree builds. With device tree, all of this information is
> obtained from the device tree.
> 
> Signed-off-by: Thomas Abraham 
> ---
>  arch/arm/mach-exynos4/Kconfig  |7 +++
>  arch/arm/mach-exynos4/Makefile |3 ++-
>  2 files changed, 9 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/arm/mach-exynos4/Kconfig b/arch/arm/mach-exynos4/Kconfig
> index d4d401c..3edbf37 100644
> --- a/arch/arm/mach-exynos4/Kconfig
> +++ b/arch/arm/mach-exynos4/Kconfig
> @@ -21,6 +21,13 @@ config EXYNOS4_MCT
>   help
> Use MCT (Multi Core Timer) as kernel timers
> 
> +config EXYNOS4_DEV_DMA
> + bool
> + default y if !OF
> + help
> +   Compile in amba device definitions for DMA controller if OF
> +   is not enabled.
> +
>  config EXYNOS4_DEV_AHCI
>   bool
>   help
> diff --git a/arch/arm/mach-exynos4/Makefile
b/arch/arm/mach-exynos4/Makefile
> index d2bf5bf..a2f33dc 100644
> --- a/arch/arm/mach-exynos4/Makefile
> +++ b/arch/arm/mach-exynos4/Makefile
> @@ -13,7 +13,8 @@ obj-:=
>  # Core support for EXYNOS4 system
> 
>  obj-$(CONFIG_CPU_EXYNOS4210) += cpu.o init.o clock.o irq-combiner.o
> -obj-$(CONFIG_CPU_EXYNOS4210) += setup-i2c0.o irq-eint.o dma.o
> pmu.o
> +obj-$(CONFIG_CPU_EXYNOS4210) += setup-i2c0.o irq-eint.o pmu.o
> +obj-$(CONFIG_EXYNOS4_DEV_DMA)+= dma.o

Do we need _really_ EXYNOS4_DEV_DMA here?
How about to use like following?

+obj-$(!CONFIG_OF)  += dma.o

If any problems, let me know.

Thanks.

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


>  obj-$(CONFIG_PM) += pm.o sleep.o
>  obj-$(CONFIG_CPU_IDLE)   += cpuidle.o
> 
> --
> 1.6.6.rc2

--
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 0/6] Add device tree support for PL330 dma controller driver

2011-09-04 Thread Kukjin Kim
Vinod Koul wrote:
> 
> On Fri, 2011-08-26 at 14:10 +0530, Thomas Abraham wrote:
> > This patchset adds device tree support for PL330 driver and uses it
> > to add device tree support for Samsung platforms, specifically Exynos4.
> The DMA patches looks good to me. Do you want this to go thru slave-dma
> tree or somewhere else.
> I will need acks on 3, 5 and 6th patch to carry them.
> 

Looks good to me on 3 and 5th patch, I think, 6th patch is needed to update, 
please refer to my comments on there.

Acked-by: Kukjin Kim 

As you know, Boojin Kim submitted 8th patch last Friday. So would be nice to me 
if you could rebase Thomas' patch based on her updated patch set and apply all 
series into your slave-dma.git samsung_dma branch I think it’s easy because v8 
changes are small then I will merge it into my -next to prevent useless 
conflicts.

If any problems, please let me know.

Thanks.

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

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


RE: [PATCH] ARM: S5P64X0: Fix mask value for S5P64X0 CPU IDs

2011-09-05 Thread Kukjin Kim
Ajay Kumar wrote:
> 
> The current value for S5P64XX_CPU_MASK does not include the necessary
> bits, which causes detection failure.
> 
> Signed-off-by: Ajay Kumar 
> ---
>  arch/arm/plat-samsung/include/plat/cpu.h |2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/arm/plat-samsung/include/plat/cpu.h b/arch/arm/plat-
> samsung/include/plat/cpu.h
> index aa1f69b..897d161 100644
> --- a/arch/arm/plat-samsung/include/plat/cpu.h
> +++ b/arch/arm/plat-samsung/include/plat/cpu.h
> @@ -30,7 +30,7 @@ extern unsigned long samsung_cpu_id;
> 
>  #define S5P6440_CPU_ID   0x5644
>  #define S5P6450_CPU_ID   0x3645
> -#define S5P64XX_CPU_MASK 0x1FF4
> +#define S5P64XX_CPU_MASK 0x7FFF
> 
>  #define S5PC100_CPU_ID   0x4310
>  #define S5PC100_CPU_MASK 0xF000
> --
> 1.7.2.3

Yes, you're right.
But in this case, 0xF000 is better than 0x7FFF.

If any problems with above value, please let me know.

Will apply, 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 3/3] ARM: EXYNOS4: Add support for 8-bit bus width in SDHCI for ORIGEN

2011-09-05 Thread Kukjin Kim
Tushar Behera wrote:

> 
> On Wednesday 31 August 2011 06:31 AM, Kukjin Kim wrote:
> > Tushar Behera wrote:
> >>
> >> Platform data for SDHCI controller on ORIGEN board is missing the
> >> support for 8-bit bus width. The platform data is extended in sync
> >> with other EXYNOS4 machines.
> >>
> >> Signed-off-by: Tushar Behera
> >> ---
> >>   arch/arm/mach-exynos4/mach-origen.c |8 
> >>   1 files changed, 8 insertions(+), 0 deletions(-)
> >>
> >> diff --git a/arch/arm/mach-exynos4/mach-origen.c
> > b/arch/arm/mach-exynos4/mach-
> >> origen.c
> >> index ae18812..6b6cd77 100644
> >> --- a/arch/arm/mach-exynos4/mach-origen.c
> >> +++ b/arch/arm/mach-exynos4/mach-origen.c
> >> @@ -75,11 +75,19 @@ static struct s3c2410_uartcfg origen_uartcfgs[]
> > __initdata =
> >> {
> >>   static struct s3c_sdhci_platdata origen_hsmmc0_pdata __initdata = {
> >>.cd_type= S3C_SDHCI_CD_INTERNAL,
> >>.clk_type   = S3C_SDHCI_CLK_DIV_EXTERNAL,
> >> +#ifdef CONFIG_EXYNOS4_SDHCI_CH0_8BIT
> >> +  .max_width  = 8,
> >> +  .host_caps  = MMC_CAP_8_BIT_DATA,
> >> +#endif
> >>   };
> >>
> >>   static struct s3c_sdhci_platdata origen_hsmmc2_pdata __initdata = {
> >>.cd_type= S3C_SDHCI_CD_INTERNAL,
> >>.clk_type   = S3C_SDHCI_CLK_DIV_EXTERNAL,
> >> +#ifdef CONFIG_EXYNOS4_SDHCI_CH2_8BIT
> >> +  .max_width  = 8,
> >> +  .host_caps  = MMC_CAP_8_BIT_DATA,
> >> +#endif
> >>   };
> >>
> >>   static struct platform_device *origen_devices[] __initdata = {
> >> --
> >> 1.7.4.1
> >
> > Hi Tushar,
> >
> > I wonder the bus width of SDHCI controller can be changed manually on
ORIGEN
> > like SMDK board.
> >
> Thanks for your review.
> 
> On ORIGEN board, we have wire connections for HSMMC-0/2/3 between the
> MMC port and the SoC. Hence ideally we can work with HSMMC2 in both
> 4-bit and 8-bit mode. However HSMMC0 can only work in 4-bit mode.
> 
> Also IIRC WLAN would be using HSMMC-3 controller for its operations. So
> we would have conflict when HSMMC2 is working in 8-bit mode and WLAN is
> also enabled. Hence it appears better to drop this patch now.
> 
OK.
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 v3] ARM: Samsung: fix watchdog reset issue with clk_get()

2011-09-05 Thread Kukjin Kim
Marek Szyprowski wrote:
> 
> clkdev framework uses global mutex to protect clock tree, so it is not
> possible to call clk_get() in interrupt context. This patch fixes this
> issue and makes system reset by watchdog call working again.
> 
> Signed-off-by: Marek Szyprowski 
> Signed-off-by: Kyungmin Park 
> ---
>  arch/arm/plat-samsung/clock.c  |   11 +++
>  arch/arm/plat-samsung/include/plat/clock.h |3 +++
>  .../arm/plat-samsung/include/plat/watchdog-reset.h |   10 +++---
>  3 files changed, 17 insertions(+), 7 deletions(-)
> 
> 
> history:
> v3:
> - moved initialization to arch_initcall, cleaned the code
> 
> v2:
> - added missing '__init' section modifiers
> 
> diff --git a/arch/arm/plat-samsung/clock.c b/arch/arm/plat-samsung/clock.c
> index 302c426..3b44519 100644
> --- a/arch/arm/plat-samsung/clock.c
> +++ b/arch/arm/plat-samsung/clock.c
> @@ -64,6 +64,17 @@ static LIST_HEAD(clocks);
>   */
>  DEFINE_SPINLOCK(clocks_lock);
> 
> +/* Global watchdog clock used by arch_wtd_reset() callback */
> +struct clk *s3c2410_wdtclk;
> +static int __init s3c_wdt_reset_init(void)
> +{
> + s3c2410_wdtclk = clk_get(NULL, "watchdog");
> + if (IS_ERR(s3c2410_wdtclk))
> + printk(KERN_WARNING "%s: warning: cannot get watchdog
> clock\n", __func__);
> + return 0;
> +}
> +arch_initcall(s3c_wdt_reset_init);
> +
>  /* enable and disable calls for use with the clk struct */
> 
>  static int clk_null_enable(struct clk *clk, int enable)
> diff --git a/arch/arm/plat-samsung/include/plat/clock.h b/arch/arm/plat-
> samsung/include/plat/clock.h
> index 87d5b38..8f95700 100644
> --- a/arch/arm/plat-samsung/include/plat/clock.h
> +++ b/arch/arm/plat-samsung/include/plat/clock.h
> @@ -121,3 +121,6 @@ extern int s3c64xx_sclk_ctrl(struct clk *clk, int
enable);
> 
>  extern void s3c_pwmclk_init(void);
> 
> +/* Global watchdog clock used by arch_wtd_reset() callback */
> +
> +extern struct clk *s3c2410_wdtclk;
> diff --git a/arch/arm/plat-samsung/include/plat/watchdog-reset.h
b/arch/arm/plat-
> samsung/include/plat/watchdog-reset.h
> index 54b762a..40dbb2b 100644
> --- a/arch/arm/plat-samsung/include/plat/watchdog-reset.h
> +++ b/arch/arm/plat-samsung/include/plat/watchdog-reset.h
> @@ -10,6 +10,7 @@
>   * published by the Free Software Foundation.
>  */
> 
> +#include 
>  #include 
>  #include 
> 
> @@ -19,17 +20,12 @@
> 
>  static inline void arch_wdt_reset(void)
>  {
> - struct clk *wdtclk;
> -
>   printk("arch_reset: attempting watchdog reset\n");
> 
>   __raw_writel(0, S3C2410_WTCON);   /* disable watchdog, to be safe
*/
> 
> - wdtclk = clk_get(NULL, "watchdog");
> - if (!IS_ERR(wdtclk)) {
> - clk_enable(wdtclk);
> - } else
> - printk(KERN_WARNING "%s: warning: cannot get watchdog
> clock\n", __func__);
> + if (s3c2410_wdtclk)
> + clk_enable(s3c2410_wdtclk);
> 
>   /* put initial values into count and data */
>   __raw_writel(0x80, S3C2410_WTCNT);
> --
> 1.7.1.569.g6f426

Looks ok to me, applied.
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 v4 0/4] Updated s5p-tv platform definitions

2011-09-05 Thread Kukjin Kim
Tomasz Stanislawski wrote:
> 
> Hello,
> 
> This patch series contains platform definitions for s5p-tv driver
> rebased onto latest for-next branch (including generic GIC and clockdev
> changes).
> 
> Changes since v3:
> - vpll code was fixed and moved back to mach-dependant code
> - changed naming from IIC to I2C
> 
> Changes since v2:
> - moved vpll code to plat-s5p/clock-vpll.c
> 
> Changes since v1:
> - renamed i2c8 to common i2c-hdmiphy
> - moved common vpll code to plat-s5p/clock.c
> - added check for pll locking
> - various minor coding style fixes here and there
> 
> Best regards
> 
> Tomasz Stanislawski (4):
>   ARM: Samsung: add i2c hdmiphy controller definitions
>   ARM: S5P: add support for tv device
>   ARM: Exynos4: enable TV support on Universal_C210 board
>   ARM: S5PV210: enable TV support on GONI board
> 
>  arch/arm/mach-exynos4/Kconfig|2 +
>  arch/arm/mach-exynos4/clock.c|  200
> +-
>  arch/arm/mach-exynos4/cpu.c  |2 +
>  arch/arm/mach-exynos4/include/mach/i2c-hdmiphy.h |   16 ++
>  arch/arm/mach-exynos4/include/mach/irqs.h|4 +
>  arch/arm/mach-exynos4/include/mach/map.h |   12 ++
>  arch/arm/mach-exynos4/include/mach/regs-pmu.h|6 +
>  arch/arm/mach-exynos4/mach-universal_c210.c  |   74 
>  arch/arm/mach-s5pv210/Kconfig|1 +
>  arch/arm/mach-s5pv210/clock.c|  137 ++-
> -
>  arch/arm/mach-s5pv210/cpu.c  |4 +
>  arch/arm/mach-s5pv210/include/mach/i2c-hdmiphy.h |   16 ++
>  arch/arm/mach-s5pv210/include/mach/irqs.h|4 +-
>  arch/arm/mach-s5pv210/include/mach/map.h |   13 ++
>  arch/arm/mach-s5pv210/include/mach/regs-clock.h  |3 +-
>  arch/arm/mach-s5pv210/mach-goni.c|9 +
>  arch/arm/plat-s5p/Kconfig|   10 +
>  arch/arm/plat-s5p/Makefile   |2 +
>  arch/arm/plat-s5p/dev-i2c-hdmiphy.c  |   59 +++
>  arch/arm/plat-s5p/dev-tv.c   |   98 +++
>  arch/arm/plat-s5p/include/plat/pll.h |   14 ++-
>  arch/arm/plat-samsung/include/plat/devs.h|6 +
>  arch/arm/plat-samsung/include/plat/iic.h |1 +
>  arch/arm/plat-samsung/include/plat/tv-core.h |   44 +
>  24 files changed, 720 insertions(+), 17 deletions(-)
>  create mode 100644 arch/arm/mach-exynos4/include/mach/i2c-hdmiphy.h
>  create mode 100644 arch/arm/mach-s5pv210/include/mach/i2c-hdmiphy.h
>  create mode 100644 arch/arm/plat-s5p/dev-i2c-hdmiphy.c
>  create mode 100644 arch/arm/plat-s5p/dev-tv.c
>  create mode 100644 arch/arm/plat-samsung/include/plat/tv-core.h
> 
> --
> 1.7.6

Looks ok to me, will apply.
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 2/5] ARM: SAMSUNG: Make the sleep code common for S3C64XX and newer SoCs

2011-09-06 Thread Kukjin Kim
Abhilash Kesavan wrote:
> 
> Hi Mr Kim,
> 
> Thanks for your comments. Please find my reply below:
> 
> Regards,
> Abhilash
> 
> On Fri, Aug 26, 2011 at 7:10 AM, Kukjin Kim  wrote:
> > Abhilash Kesavan wrote:
> >>
> >> The sleep code for S5PV210 and EXYNOS4 is identical; moreover it is
quite
> >> similar
> >> to that for S3C64XX except for some SoC specific debug logic. S5P64X0
and
> >> S5PC100,
> >> for which support will be added soon, can also use the same procedure.
> > Create a
> >> common sleep code in the plat-samsung directory so that it can be
re-used.
> >>
> >> Signed-off-by: Abhilash Kesavan 
> >> ---
> >>  arch/arm/mach-exynos4/Kconfig  |    1 +
> >>  arch/arm/mach-exynos4/Makefile |    2 +-
> >>  arch/arm/mach-exynos4/sleep.S  |   54 ---
> >>  arch/arm/mach-s3c64xx/Kconfig  |    1 +
> >>  arch/arm/mach-s3c64xx/Makefile |    1 -
> >>  arch/arm/mach-s3c64xx/sleep.S  |   72
> > 
> >>  arch/arm/mach-s5pv210/Kconfig  |    1 +
> >>  arch/arm/mach-s5pv210/Makefile |    2 +-
> >>  arch/arm/mach-s5pv210/sleep.S  |   52 --
> >>  arch/arm/plat-samsung/Kconfig  |    7 +++
> >>  arch/arm/plat-samsung/Makefile |    1 +
> >>  arch/arm/plat-samsung/sleep.S  |   80
> >> 
> >>  12 files changed, 93 insertions(+), 181 deletions(-)
> >>  delete mode 100644 arch/arm/mach-exynos4/sleep.S
> >>  delete mode 100644 arch/arm/mach-s3c64xx/sleep.S
> >>  delete mode 100644 arch/arm/mach-s5pv210/sleep.S
> >>  create mode 100644 arch/arm/plat-samsung/sleep.S
> >>
> >
> > (snip)
> >
> >> +ENTRY(s3c_cpu_resume)
> >> +#if defined(CONFIG_S3C_PM_DEBUG_LED_SMDK)
> >> +
> >
> > Hi Abhilash,
> >
> > Yes, would be nice if each sleep.S can be handled in plat-samsung for
> > Samsung SoCs.
> >
> > Hmm...but the CONFIG_S3C_PM_DEBUG_LED_SMDK can be used on other
> SoCs for
> > same reason even though it is available only on S3C64XX now. I think, we
> > need to add SoC detecting here.
> Quite right, it is possible to use this for other SoCs. But as of now,
> my patch just intends
> to move all the sleep code to a common place. The S3C64XX sleep code
> has this feature
> and I didn't want to disturb it in anyway, hence it has been added to
> the common file.
> Perhaps, generalizing it for other SoCs can be done later on top of this

Hmm, this codes should be cleaned for all Samsung SoCs because this can
break one kernel image...

> >
> >> +#undef S3C64XX_VA_GPIO
> >> +#define S3C64XX_VA_GPIO (0x0)
> >
> > Please let me know why this is needed here.
> The code is trying to access the registers at a stage where the MMU is
> not enabled.
> Hence, the VA_GPIO is being re-defined as 0 reducing S3C64XX_GPIOREG(reg)
> to
> reg.
> It has been moved as is from the existing s3c64xx sleep code.


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 3/5] ARM: S5P64X0: Add pm save/restore functions for GPIO banks

2011-09-06 Thread Kukjin Kim
Abhilash Kesavan wrote:
> 
> Fix the "no pm for GPIOXX" messages appearing during bootup due
> to missing assignment of save/restore functions for those banks.
> 
> Signed-off-by: Abhilash Kesavan 
> ---
>  arch/arm/mach-s5p64x0/gpiolib.c  |1 +
>  drivers/gpio/gpio-plat-samsung.c |4 +++-
>  2 files changed, 4 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/arm/mach-s5p64x0/gpiolib.c
b/arch/arm/mach-s5p64x0/gpiolib.c
> index e7fb3b0..76c0924 100644
> --- a/arch/arm/mach-s5p64x0/gpiolib.c
> +++ b/arch/arm/mach-s5p64x0/gpiolib.c
> @@ -467,6 +467,7 @@ static void __init s5p64x0_gpio_add_rbank_4bit2(struct
> s3c_gpio_chip *chip,
>   chip->chip.direction_input =
s5p64x0_gpiolib_rbank_4bit2_input;
>   chip->chip.direction_output =
>   s5p64x0_gpiolib_rbank_4bit2_output;
> + chip->pm = __gpio_pm(&s3c_gpio_pm_4bit);
>   s3c_gpiolib_add(chip);
>   }
>  }
> diff --git a/drivers/gpio/gpio-plat-samsung.c
b/drivers/gpio/gpio-plat-samsung.c
> index ef67f19..4f7c387 100644
> --- a/drivers/gpio/gpio-plat-samsung.c
> +++ b/drivers/gpio/gpio-plat-samsung.c
> @@ -200,6 +200,8 @@ void __init samsung_gpiolib_add_4bit2_chips(struct
> s3c_gpio_chip *chip,
>  void __init samsung_gpiolib_add_2bit_chips(struct s3c_gpio_chip *chip,
>  int nr_chips)
>  {
> - for (; nr_chips > 0; nr_chips--, chip++)
> + for (; nr_chips > 0; nr_chips--, chip++) {
> + chip->pm = __gpio_pm(&s3c_gpio_pm_2bit);
>   s3c_gpiolib_add(chip);
> + }
>  }
> --
> 1.7.4.1

Hi Abhilash,

Since submitted gpio-samsung patch includes above changes, so we can drop
this.

If any problem, please let me 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 4/5] ARM: S5P64X0: Fix incorrect serial clock name

2011-09-06 Thread Kukjin Kim
Abhilash Kesavan wrote:
> 
> The S3C6400 serial glue driver(used by S5P64X0) needs the clock name to be
> pclk or uclk1. Correct the clock name in init.c to pclk and source pclk
> from pclk_low to get the correct rate.
> 
> Signed-off-by: Abhilash Kesavan 
> ---
>  arch/arm/mach-s5p64x0/clock-s5p6440.c |2 +-
>  arch/arm/mach-s5p64x0/clock-s5p6450.c |2 +-
>  arch/arm/mach-s5p64x0/init.c  |2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/arm/mach-s5p64x0/clock-s5p6440.c b/arch/arm/mach-
> s5p64x0/clock-s5p6440.c
> index 0e9cd30..4b594a4 100644
> --- a/arch/arm/mach-s5p64x0/clock-s5p6440.c
> +++ b/arch/arm/mach-s5p64x0/clock-s5p6440.c
> @@ -554,7 +554,7 @@ void __init_or_cpufreq s5p6440_setup_clocks(void)
> 
>   clk_f.rate = fclk;
>   clk_h.rate = hclk;
> - clk_p.rate = pclk;
> + clk_p.rate = pclk_low;

As you know, HCLK and PCLK are connected to IPs which are included in high
frequency domain and HCLK_LOW and PCLK_LOW are connected to IPs which are
included in low frequency domain. I wonder what value is the ARM clock on
your SMDK64X0? 533MHz or 667MHz?

Originally, the "struct clk clk_p" means PCLK not PCLK_LOW. So I think, the
rate of clk_p should be pclk

> 
>   for (ptr = 0; ptr < ARRAY_SIZE(clksrcs); ptr++)
>   s3c_set_clksrc(&clksrcs[ptr], true);
> diff --git a/arch/arm/mach-s5p64x0/clock-s5p6450.c b/arch/arm/mach-
> s5p64x0/clock-s5p6450.c
> index d9dc16c..eca9a57 100644
> --- a/arch/arm/mach-s5p64x0/clock-s5p6450.c
> +++ b/arch/arm/mach-s5p64x0/clock-s5p6450.c
> @@ -613,7 +613,7 @@ void __init_or_cpufreq s5p6450_setup_clocks(void)
> 
>   clk_f.rate = fclk;
>   clk_h.rate = hclk;
> - clk_p.rate = pclk;
> + clk_p.rate = pclk_low;

Same as above.

> 
>   for (ptr = 0; ptr < ARRAY_SIZE(clksrcs); ptr++)
>   s3c_set_clksrc(&clksrcs[ptr], true);
> diff --git a/arch/arm/mach-s5p64x0/init.c b/arch/arm/mach-s5p64x0/init.c
> index 79833ca..ee25e28 100644
> --- a/arch/arm/mach-s5p64x0/init.c
> +++ b/arch/arm/mach-s5p64x0/init.c
> @@ -25,7 +25,7 @@
> 
>  static struct s3c24xx_uart_clksrc s5p64x0_serial_clocks[] = {
>   [0] = {
> - .name   = "pclk_low",
> + .name   = "pclk",

According to data sheet, should be pclk_low. Or if required for serial
driver, uclk1 can be used here.

>   .divisor= 1,
>   .min_baud   = 0,
>   .max_baud   = 0,
> --
> 1.7.4.1



Thanks.

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

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


RE: [PATCH 5/5] ARM: S5P64X0: Add Power Management support

2011-09-06 Thread Kukjin Kim
_SIZE(s5p64x0_misc_save));
> +}
> +
> +void s3c_pm_save_core(void)
> +{
> + s3c_pm_do_save(s5p64x0_misc_save,
> ARRAY_SIZE(s5p64x0_misc_save));
> +
> + if ((__raw_readl(S5P64X0_SYS_ID) & 0xFF000) == 0x5)
> + s3c_pm_do_save(s5p6450_core_save,
> + ARRAY_SIZE(s5p6450_core_save));

Same.

> +
> + s3c_pm_do_save(s5p64x0_core_save,
> ARRAY_SIZE(s5p64x0_core_save));
> +}
> +
> +static int s5p64x0_cpu_suspend(unsigned long arg)
> +{
> + unsigned long tmp = 0;
> +
> + /*
> +  * Issue the standby signal into the pm unit. Note, we
> +  * issue a write-buffer drain just in case.
> +  */
> + asm("b 1f\n\t"
> + ".align 5\n\t"
> + "1:\n\t"
> + "mcr p15, 0, %0, c7, c10, 5\n\t"
> + "mcr p15, 0, %0, c7, c10, 4\n\t"
> + "mcr p15, 0, %0, c7, c0, 4" : : "r" (tmp));
> +
> + /* we should never get past here */
> + panic("sleep resumed to originator?");
> +}
> +
> +/* mapping of interrupts to parts of the wakeup mask */
> +static struct samsung_wakeup_mask s5p64x0_wake_irqs[] = {
> + { .irq = IRQ_RTC_ALARM, .bit =
> S5P64X0_PWRCFG_RTC_ALRM_DISABLE, },
> + { .irq = IRQ_RTC_TIC,   .bit =
> S5P64X0_PWRCFG_RTC_TICK_DISABLE, },
> + { .irq = IRQ_HSMMC0,.bit = S5P64X0_PWRCFG_MMC0_DISABLE, },
> + { .irq = IRQ_HSMMC1,.bit = S5P64X0_PWRCFG_MMC1_DISABLE, },
> +};
> +
> +static void s5p64x0_pm_prepare(void)
> +{
> + u32 tmp;
> +
> + samsung_sync_wakemask(S5P64X0_PWR_CFG,
> + s5p64x0_wake_irqs, ARRAY_SIZE(s5p64x0_wake_irqs));
> +
> + /* store the resume address in INFORM0 register */
> + __raw_writel(virt_to_phys(s3c_cpu_resume), S5P64X0_INFORM0);
> +
> + /* setup clock gating for FIMGVG block */
> + __raw_writel((__raw_readl(S5P64X0_CLK_GATE_HCLK1) | \
> + (S5P64X0_CLKCON_HCLK1_FIMGVG)),
> S5P64X0_CLK_GATE_HCLK1);
> + __raw_writel((__raw_readl(S5P64X0_CLK_GATE_SCLK1) | \
> + (S5P64X0_CLKCON_SCLK1_FIMGVG)),
> S5P64X0_CLK_GATE_SCLK1);
> +
> + /* Configure the stabilization counter with wait time required */
> + __raw_writel(S5P64X0_PWR_STABLE_CNT_VAL_4,
> S5P64X0_PWR_STABLE);
> +
> + /* set WFI to SLEEP mode configuration */
> + tmp = __raw_readl(S5P64X0_SLEEP_CFG);
> + tmp &= ~(S5P64X0_SLEEP_CFG_OSC_EN);
> + __raw_writel(tmp, S5P64X0_SLEEP_CFG);
> +
> + tmp = __raw_readl(S5P64X0_PWR_CFG);
> + tmp &= ~(S5P64X0_PWRCFG_CFG_WFI_MASK);
> + tmp |= S5P64X0_PWRCFG_CFG_WFI_SLEEP;
> + __raw_writel(tmp, S5P64X0_PWR_CFG);
> +
> + /*
> +  * set OTHERS register to disable interrupt before going to
> +  * sleep. This bit is present only in S5P6450, it is reserved
> +  * in S5P6440.
> +  */
> + if ((__raw_readl(S5P64X0_SYS_ID) & 0xFF000) == 0x5) {
> + tmp = __raw_readl(S5P64X0_OTHERS);
> + tmp |= S5P6450_OTHERS_DISABLE_INT;
> + __raw_writel(tmp, S5P64X0_OTHERS);
> + }
> +
> + /* ensure previous wakeup state is cleared before sleeping */
> + __raw_writel(__raw_readl(S5P64X0_WAKEUP_STAT),
> S5P64X0_WAKEUP_STAT);
> +
> +}
> +
> +static int s5p64x0_pm_add(struct sys_device *sysdev)
> +{
> + pm_cpu_prep = s5p64x0_pm_prepare;
> + pm_cpu_sleep = s5p64x0_cpu_suspend;
> + pm_uart_udivslot = 1;

If pm_uart_udivslot has value, the UDIVSLOT3 is used...is this right on
S5P64X0?

> +
> + return 0;
> +}
> +
> +static struct sysdev_driver s5p64x0_pm_driver = {
> + .add= s5p64x0_pm_add,
> +};
> +
> +static __init int s5p64x0_pm_drvinit(void)
> +{
> + s3c_pm_init();
> +
> + return sysdev_driver_register(&s5p64x0_sysclass,
&s5p64x0_pm_driver);
> +}
> +arch_initcall(s5p64x0_pm_drvinit);
> +
> +static void s5p64x0_pm_resume(void)
> +{
> + u32 tmp;
> +
> + tmp = __raw_readl(S5P64X0_OTHERS);
> + tmp |= (S5P64X0_OTHERS_RET_MMC0 |
> S5P64X0_OTHERS_RET_MMC1 | \
> + S5P64X0_OTHERS_RET_UART);
> + __raw_writel(tmp , S5P64X0_OTHERS);
> +}
> +
> +static struct syscore_ops s5p64x0_pm_syscore_ops = {
> + .resume = s5p64x0_pm_resume,
> +};
> +
> +static __init int s5p64x0_pm_syscore_init(void)
> +{
> + register_syscore_ops(&s5p64x0_pm_syscore_ops);
> +
> + return 0;
> +}
> +arch_initcall(s5p64x0_pm_syscore_init);
> --
> 1.7.4.1

Basically, this codes need small fixing. I mean if this codes have been
tested on board and it works fine, it's ok to me.

But as you said, s5p64x0 pm is almost same with s3c64xx, so we need to clean
them up 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] ARM: EXYNOS4: ADD USB EHCI device to SMDKV310

2011-09-07 Thread Kukjin Kim
Kukjin Kim wrote:
> 
> Sachin Kamat wrote:
> >
> > Signed-off-by: Bhuvana Kakunoori 
> > Signed-off-by: Pankaj Dubey 
> > Signed-off-by: Sachin Kamat 
> > ---
> >  arch/arm/mach-exynos4/Kconfig |2 ++
> >  arch/arm/mach-exynos4/mach-smdkv310.c |   16 
> >  2 files changed, 18 insertions(+), 0 deletions(-)
> >
> > diff --git a/arch/arm/mach-exynos4/Kconfig
b/arch/arm/mach-exynos4/Kconfig
> > index bb29d51..cc97d23 100644
> > --- a/arch/arm/mach-exynos4/Kconfig
> > +++ b/arch/arm/mach-exynos4/Kconfig
> > @@ -136,6 +136,7 @@ config MACH_SMDKV310
> > bool "SMDKV310"
> > select CPU_EXYNOS4210
> > select S5P_DEV_FIMD0
> > +   select S5P_DEV_USB_EHCI
> > select S3C_DEV_RTC
> > select S3C_DEV_WDT
> > select S3C_DEV_I2C1
> > @@ -151,6 +152,7 @@ config MACH_SMDKV310
> > select SAMSUNG_DEV_PWM
> > select EXYNOS4_DEV_SYSMMU
> > select EXYNOS4_SETUP_FIMD0
> > +   select EXYNOS4_SETUP_USB_PHY
> > select EXYNOS4_SETUP_I2C1
> > select EXYNOS4_SETUP_KEYPAD
> > select EXYNOS4_SETUP_SDHCI
> > diff --git a/arch/arm/mach-exynos4/mach-smdkv310.c b/arch/arm/mach-
> > exynos4/mach-smdkv310.c
> > index 5f62b2b..b6c28ea 100644
> > --- a/arch/arm/mach-exynos4/mach-smdkv310.c
> > +++ b/arch/arm/mach-exynos4/mach-smdkv310.c
> > @@ -33,6 +33,8 @@
> >  #include 
> >  #include 
> >  #include 
> > +#include 
> > +#include 
> >
> >  #include 
> >
> > @@ -167,6 +169,16 @@ static struct i2c_board_info i2c_devs1[] __initdata
= {
> > {I2C_BOARD_INFO("wm8994", 0x1a),},
> >  };
> >
> > +/* USB EHCI */
> > +static struct s5p_ehci_platdata smdkv310_ehci_pdata;
> > +
> > +static void __init smdkv310_ehci_init(void)
> > +{
> > +   struct s5p_ehci_platdata *pdata = &smdkv310_ehci_pdata;
> > +
> > +   s5p_ehci_set_platdata(pdata);
> > +}
> > +
> >  static struct platform_device *smdkv310_devices[] __initdata = {
> > &s3c_device_hsmmc0,
> > &s3c_device_hsmmc1,
> > @@ -175,6 +187,7 @@ static struct platform_device *smdkv310_devices[]
> > __initdata = {
> > &s3c_device_i2c1,
> > &s3c_device_rtc,
> > &s3c_device_wdt,
> > +   &s5p_device_ehci,
> > &exynos4_device_ac97,
> > &exynos4_device_i2s0,
> > &samsung_device_keypad,
> > @@ -258,6 +271,9 @@ static void __init smdkv310_machine_init(void)
> >
> > samsung_bl_set(&smdkv310_bl_gpio_info, &smdkv310_bl_data);
> >
> > +   smdkv310_ehci_init();
> > +   clk_xusbxti.rate = 2400;
> > +
> > platform_add_devices(smdkv310_devices,
> > ARRAY_SIZE(smdkv310_devices));
> > s5p_device_mfc.dev.parent = &exynos4_device_pd[PD_MFC].dev;
> >  }
> > --
> > 1.7.4.1
> 
> (Cc'ed Jingoo Han)
> 
> Well, this is same with Jingoo's patch on smdkc210 which has been
submitted at
> 12th Aug.
> 
> I requested to him to re-work this on smdkv310 on his patch just now...
> Hmm...I don't know :(
> 
> Let me think again...
> 
As I've heard, Jingoo talked you about this patch and you agreed to use
Jingoo's patch on SMDKV310. So I dropped this and will pick up his patch.

If any problems, please let me 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


  1   2   3   4   5   6   7   8   9   10   >