Re: [PATCH V3 2/2] sdhci-s3c: Add support no internal clock divider in host controller

2010-10-10 Thread Kyungmin Park
On Fri, Oct 8, 2010 at 5:46 PM, Kukjin Kim  wrote:
> From: Jeongbae Seo 
>
> This patch adds to support no internal clock divider in SDHCI.
> The external clock divider can be used to make a proper clock
> because SDHCI doesn't support internal clock divider by itself.
>
> If external clock divider type is selected, some functions related
> with clock control will be overridened by other functions.
>
> The current clock control index is added to let you know which
> clock bus is used for SDHCI when using overriding functions.
>
> The checking functions is added into sdhci_s3c_consider_clock,
> because clock divider step is different from that of host controller.
>
> Signed-off-by: Jeongbae Seo 
> Cc: Jaehoon Chung 
> Cc: Ben Dooks 
> Signed-off-by: Kukjin Kim 
> ---
> Changes since v2:
> - Changed clock control method to overriding from using quirk
> - This patch is referred from that of Jaehoon Chung's support non-standard 
> clock setting

I don't know how to handle this case. Just "CC" the Jaehoon is enough?
>
> Changes since v1:
> - Separated to each topic
>
> NOTE :
> - This patch depends on following.
>  [PATCH 4/5] ARM: SAMSUNG : Add clock types into platform data
>
>  drivers/mmc/host/sdhci-s3c.c |   62 
> ++
>  1 files changed, 62 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci-s3c.c b/drivers/mmc/host/sdhci-s3c.c
> index a7710f5..1720358 100644
> --- a/drivers/mmc/host/sdhci-s3c.c
> +++ b/drivers/mmc/host/sdhci-s3c.c
> @@ -130,6 +130,15 @@ static unsigned int sdhci_s3c_consider_clock(struct 
> sdhci_s3c *ourhost,
>        if (!clksrc)
>                return UINT_MAX;
>
> +       /*
> +        * Clock divider's step is different as 1 from that of host controller
> +        * when 'clk_type' is S3C_SDHCI_CLK_DIV_EXTERNAL.
> +        */
> +       if (ourhost->pdata->clk_type) {
I'm still confusing the 'clk_type" word, if you assume it's just two
values, 0, and 1 at this time. then compare it with CLK_DIV_EXTERNAL.
or change it as clk_exteranl  it's more clear.
> +               rate = clk_round_rate(clksrc, wanted);
> +               return wanted - rate;
> +       }
> +
>        rate = clk_get_rate(clksrc);
>
>        for (div = 1; div < 256; div *= 2) {
> @@ -232,6 +241,42 @@ static unsigned int sdhci_s3c_get_min_clock(struct 
> sdhci_host *host)
>        return min;
>  }
>
> +/* sdhci_cmu_get_max_clk - callback to get maximum clock frequency.*/
> +static unsigned int sdhci_cmu_get_max_clock(struct sdhci_host *host)
> +{
> +       struct sdhci_s3c *ourhost = to_s3c(host);
> +
> +       return clk_round_rate(ourhost->clk_bus[ourhost->cur_clk], UINT_MAX);
> +}
> +
> +/* sdhci_cmu_get_min_clock - callback to get minimal supported clock value. 
> */
> +static unsigned int sdhci_cmu_get_min_clock(struct sdhci_host *host)
> +{
> +       struct sdhci_s3c *ourhost = to_s3c(host);
> +
> +       /*
> +        * initial clock can be in the frequency range of
> +        * 100KHz-400KHz, so we set it as max value.
> +        */
> +       return clk_round_rate(ourhost->clk_bus[ourhost->cur_clk], 40);
> +}
> +
> +/* sdhci_cmu_set_clock - callback on clock change.*/
> +static void sdhci_cmu_set_clock(struct sdhci_host *host, unsigned int clock)
> +{
> +       struct sdhci_s3c *ourhost = to_s3c(host);
> +
> +       /* don't bother if the clock is going off */
> +       if (clock == 0)
> +               return;
> +
> +       sdhci_s3c_set_clock(host, clock);
> +
> +       clk_set_rate(ourhost->clk_bus[ourhost->cur_clk], clock);
> +
> +       host->clock = clock;
> +}
> +
>  static struct sdhci_ops sdhci_s3c_ops = {
>        .get_max_clock          = sdhci_s3c_get_max_clk,
>        .set_clock              = sdhci_s3c_set_clock,
> @@ -361,6 +406,13 @@ static int __devinit sdhci_s3c_probe(struct 
> platform_device *pdev)
>
>                clks++;
>                sc->clk_bus[ptr] = clk;
> +
> +               /*
> +                * save current clock index to know which clock bus
> +                * is used later in overriding functions.
> +                */
> +               sc->cur_clk = ptr;
> +
>                clk_enable(clk);
>
>                dev_info(dev, "clock source %d: %s (%ld Hz)\n",
> @@ -427,6 +479,16 @@ static int __devinit sdhci_s3c_probe(struct 
> platform_device *pdev)
>        /* HSMMC on Samsung SoCs uses SDCLK as timeout clock */
>        host->quirks |= SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK;
>
> +       /*
> +        * If controller does not have internal clock divider,
> +        * we can use overriding functions instead of default.
> +        */
> +       if (pdata->clk_type) {
> +               sdhci_s3c_ops.set_clock = sdhci_cmu_set_clock;
> +               sdhci_s3c_ops.get_min_clock = sdhci_cmu_get_min_clock;
> +               sdhci_s3c_ops.get_max_clock = sdhci_cmu_get_max_clock;
> +       }
> +
>        /* It supports additional host capabilities if needed */
>        if (pdata->host_caps)
>                host->mmc->ca

Re: [PATCH 1/2] ARM: S3C64XX: Add suspend support

2010-10-05 Thread Kyungmin Park
On Wed, Oct 6, 2010 at 8:27 AM, Maurus Cuelenaere  wrote:
>  Op 06-10-10 01:23, Kyungmin Park schreef:
>> Hi,
>>
>> I agree your approach, put the common features in common place.
>> but Samsung maintainers insist put these at each machine file at current 
>> time.
>>
>> So move this to the each machines for their tastes.
> I did it that way first, but then wondered why this wasn't done for all 
> boards.
>
> When looking at some S3C24XX boards, you'll see that these need changes to the
> bootloader to support suspend; but IIRC this isn't needed for S3C64XX so I 
> think
> this can be safely enabled for all S3C64XX boards?

There are be answered by Samsung maintainers.
I'm have same opinions since it's common feature. Previous time I
already argued with them but they reject it.
you can issue it again.

and current status.
# grep s3c_pm_init -H -R arch/arm/mach-*
arch/arm/mach-s3c2410/mach-qt2410.c:s3c_pm_init();
arch/arm/mach-s3c2410/mach-h1940.c: s3c_pm_init();
arch/arm/mach-s3c2412/mach-jive.c:  s3c_pm_init();
arch/arm/mach-s3c2440/mach-rx3715.c:s3c_pm_init();
arch/arm/mach-s3c2440/mach-gta02.c: s3c_pm_init();
arch/arm/mach-s3c2440/mach-rx1950.c:s3c_pm_init();
arch/arm/mach-s5pv210/mach-smdkv210.c:  s3c_pm_init();
arch/arm/mach-s5pv210/mach-smdkc110.c:  s3c_pm_init();

Thank you,
Kyungmin Park

>
> --
> Maurus Cuelenaere
>
>
> ___
> linux-arm-kernel mailing list
> linux-arm-ker...@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>
--
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: S3C64XX: Add suspend support

2010-10-05 Thread Kyungmin Park
Hi,

I agree your approach, put the common features in common place.
but Samsung maintainers insist put these at each machine file at current time.

So move this to the each machines for their tastes.

Thank you,
Kyungmin Park

On Wed, Oct 6, 2010 at 8:09 AM, Maurus Cuelenaere  wrote:
> The only missing thing for SoC-wide suspend support, is a call to s3c_pm_init,
> so add that. This was tested on a S3C6410 SmartQ 7.
>
> Signed-off-by: Maurus Cuelenaere 
> ---
>  arch/arm/mach-s3c64xx/pm.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-s3c64xx/pm.c b/arch/arm/mach-s3c64xx/pm.c
> index 79412f7..db292c9 100644
> --- a/arch/arm/mach-s3c64xx/pm.c
> +++ b/arch/arm/mach-s3c64xx/pm.c
> @@ -187,6 +187,9 @@ static int s3c64xx_pm_init(void)
>        pm_cpu_prep = s3c64xx_pm_prepare;
>        pm_cpu_sleep = s3c64xx_cpu_suspend;
>        pm_uart_udivslot = 1;
> +
> +       s3c_pm_init();
> +
>        return 0;
>  }
>
> --
> 1.7.2.3
>
>
> ___
> linux-arm-kernel mailing list
> linux-arm-ker...@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>
--
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 3/3] ARM: S5PC210: Set the common L2 cache configurations

2010-10-05 Thread Kyungmin Park
On Tue, Oct 5, 2010 at 5:47 PM, Kukjin Kim  wrote:
> Kyungmin Park wrote:
>>
>> From: Kyungmin Park 
>>
>> S5PC210 has PL310 1MiB L2 cache.
>> It uses the optimized data & tag latency and also enable the prefetch.
>>
>> Signed-off-by: Kyungmin Park 
>> ---
>>  arch/arm/mach-s5pv310/cpu.c |   19 +++
>>  1 files changed, 19 insertions(+), 0 deletions(-)
>>
>> diff --git a/arch/arm/mach-s5pv310/cpu.c b/arch/arm/mach-s5pv310/cpu.c
>> index e5b261a..b50312e 100644
>> --- a/arch/arm/mach-s5pv310/cpu.c
>> +++ b/arch/arm/mach-s5pv310/cpu.c
>> @@ -15,6 +15,7 @@
>>  #include 
>>
>>  #include 
>> +#include 
>>
>>  #include 
>>  #include 
>> @@ -121,6 +122,24 @@ static int __init s5pv310_core_init(void)
>>
>>  core_initcall(s5pv310_core_init);
>>
>> +static int __init s5pv310_init_cache(void)
>
> It would be helpful that could use more detailed function name like
> s5pv310_l2x0_cache_init().
>
>> +{
>> +#ifdef CONFIG_CACHE_L2X0
>> +     void __iomem *p = S5P_VA_L2CC;
>> +
>> +     /* TAG,  Data latency control */
>> +     writel(0x110, p + L2X0_TAG_LATENCY_CTRL);
>> +     writel(0x110, p + L2X0_DATA_LATENCY_CTRL);
>
> I still thinking, __raw_writel is more suitable here...
> Because no need to add barriers between each write here.

I think It's micro optimization.
>
>> +
>> +     /* L2 cache prefetch control */
>> +     writel(0x3007, p + L2X0_PREFETCH_CTRL);
>> +
>> +     l2x0_init(p, 0x3C070001, 0xC200);
>
> 0x7C070001 is better...or should be?...because it is for early write
> response.
> I think need it for optimization...so please change it.
Send the official documents, At the latest Info. LSI said it's no
performance gain at there.
>
> And it'd better if you could add PL310(L2 cache controller) power control
> here.
> It can help to reduce power consumption.
>
>> +#endif
>> +     return 0;
>> +}
>> +early_initcall(s5pv310_init_cache);
>> +
>
> And in my opinion, following format is better even if do not consider the
> coding-style.
> Because if not defined CACHE_L2X0, no need to add empty function into
> early_initcall().
>
> #ifdef CONFIG_CACHE_L2X0
> static int __init s5pv310_l2x0_cache_init(void)
> {
>
> /* */
>
>        return 0;
> }
> early_initcall(s5p_l2x0_cache_init);
> #endif
>
>
>>  int __init s5pv310_init(void)
>>  {
>>       printk(KERN_INFO "S5PV310: Initializing architecture\n");
>> --
>
>
> 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/7] ARM: S5PC210: I2C devices support and Universal board updates

2010-10-05 Thread Kyungmin Park
On Tue, Oct 5, 2010 at 5:40 PM, Kukjin Kim  wrote:
> Kyungmin Park wrote:
>>
>> Hi,
>>
> Hi,
>
>> I think we made some conclusion. first apply the current style and
>> improve it later for consistency.
>>
> Yeah, we should decide for this.
>
> However, it's expected following problem with current I2C style.
>
> Suppose A board want to use only I2C0, 1, 2, 3, 4, 7 as I2C and B board want
> to use all of I2C channels as I2C. If use one kernel image for A and B,
> maybe selected all I2C channels. It can be happened the some problem about
> I2C5 and I2C6 on A board when it used for other purpose.

It's handled by platform_device id. Even though turn on all I2C. A
board don't register 5 or 6 then no configure any GPIOs.

>
> Of course can happen regardless of number of I2C channel, but if more I2C
> channels, the probability can be increased.
>
> Anyway I know Mr. Han is preparing I2C patches for it and almost done.
> How about continuing discussion for this after submitting it?
>
> I think we have some time that talk about this issue.
>
> Thanks.
>
> Best regards,
> Kgene.
> --
> Kukjin Kim , Senior Engineer,
> SW Solution Development Team, Samsung Electronics Co., Ltd.
>
>
> ___
> linux-arm-kernel mailing list
> linux-arm-ker...@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>
--
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: S5PC100: Cleanup the GPIOlib code

2010-10-01 Thread Kyungmin Park
Hi,

There's some comments.
At least the s5p series use the same .config = &gpio_cfg, so move it
to common code and then can delete it at each SOC gpiolib.

Please also check the other team how modified it since there's some
comments from G  "why do you set each config at for loop. just put it
at each configuration as is.

Thank you,
Kyungmin Park

> -   .base   = S5PC100_GPA0_BASE,
> -   .config = &gpio_cfg,

On Fri, Oct 1, 2010 at 9:58 PM, Kukjin Kim  wrote:
> This patch clean up the GPIO code and removes useless GPIO addresses.
> It can be calculated with offset, the 'base' member of s3c_gpio_chip
> is also initialized in the init function.
>
> Signed-off-by: Kukjin Kim 
> ---
>  arch/arm/mach-s5pc100/gpiolib.c                |  172 
> ++--
>  arch/arm/mach-s5pc100/include/mach/regs-gpio.h |   37 -
>  2 files changed, 69 insertions(+), 140 deletions(-)
>
> diff --git a/arch/arm/mach-s5pc100/gpiolib.c b/arch/arm/mach-s5pc100/gpiolib.c
> index def4ff8..20856eb 100644
> --- a/arch/arm/mach-s5pc100/gpiolib.c
> +++ b/arch/arm/mach-s5pc100/gpiolib.c
> @@ -1,5 +1,7 @@
> -/*
> - * arch/arm/plat-s5pc100/gpiolib.c
> +/* linux/arch/arm/mach-s5pc100/gpiolib.c
> + *
> + * Copyright (c) 2010 Samsung Electronics Co., Ltd.
> + *             http://www.samsung.com
>  *
>  *  Copyright 2009 Samsung Electronics Co
>  *  Kyungmin Park 
> @@ -80,217 +82,150 @@ static struct s3c_gpio_cfg gpio_cfg_noint = {
>        .get_pull       = s3c_gpio_getpull_updown,
>  };
>
> +/*
> + * GPIO bank's base address given the index of the bank in the
> + * list of all gpio banks.
> + */
> +#define S5PC100_BANK_BASE(bank_nr)     (S5P_VA_GPIO + ((bank_nr) * 0x20))
> +
> +/*
> + * Following are the gpio banks in S5PC100.
> + *
> + * The 'config' member when left to NULL, is initialized to the default
> + * structure gpio_cfg in the init function below.
> + *
> + * The 'base' member is also initialized in the init function below.
> + * Note: The initialization of 'base' member of s3c_gpio_chip structure
> + * uses the above macro and depends on the banks being listed in order here.
> + */
>  static struct s3c_gpio_chip s5pc100_gpio_chips[] = {
>        {
> -               .base   = S5PC100_GPA0_BASE,
> -               .config = &gpio_cfg,
>                .chip   = {
>                        .base   = S5PC100_GPA0(0),
>                        .ngpio  = S5PC100_GPIO_A0_NR,
>                        .label  = "GPA0",
>                },
>        }, {
> -               .base   = S5PC100_GPA1_BASE,
> -               .config = &gpio_cfg,
>                .chip   = {
>                        .base   = S5PC100_GPA1(0),
>                        .ngpio  = S5PC100_GPIO_A1_NR,
>                        .label  = "GPA1",
>                },
>        }, {
> -               .base   = S5PC100_GPB_BASE,
> -               .config = &gpio_cfg,
>                .chip   = {
>                        .base   = S5PC100_GPB(0),
>                        .ngpio  = S5PC100_GPIO_B_NR,
>                        .label  = "GPB",
>                },
>        }, {
> -               .base   = S5PC100_GPC_BASE,
> -               .config = &gpio_cfg,
>                .chip   = {
>                        .base   = S5PC100_GPC(0),
>                        .ngpio  = S5PC100_GPIO_C_NR,
>                        .label  = "GPC",
>                },
>        }, {
> -               .base   = S5PC100_GPD_BASE,
> -               .config = &gpio_cfg,
>                .chip   = {
>                        .base   = S5PC100_GPD(0),
>                        .ngpio  = S5PC100_GPIO_D_NR,
>                        .label  = "GPD",
>                },
>        }, {
> -               .base   = S5PC100_GPE0_BASE,
> -               .config = &gpio_cfg,
>                .chip   = {
>                        .base   = S5PC100_GPE0(0),
>                        .ngpio  = S5PC100_GPIO_E0_NR,
>                        .label  = "GPE0",
>                },
>        }, {
> -               .base   = S5PC100_GPE1_BASE,
> -               .config = &gpio_cfg,
>                .chip   = {
>                        .base   = S5PC100_GPE1(0),
>                        .ngpio  = S5PC100_GPIO_E1_NR,
>                        .label  = "GPE1",
>                },
>        }, {
> -               .base   = S5PC100_GPF0_BASE,
> -               .config = &gpio_cfg,
>                .chip   = {
>                        .base   = S5PC100_GPF0(0),
>                        .ngpio  = S5PC

Re: [PATCH 06/27] ARM: S5P64X0: 2nd Change to using s3c_gpio_cfgpin_range()

2010-10-01 Thread Kyungmin Park
Hi,

On Fri, Oct 1, 2010 at 9:05 PM, Kukjin Kim  wrote:
> This patch changes the code setting ranges of GPIO pins in mach-s5p64x0 using
> s3c_gpio_cfgpin() to use the recently introduced s3c_gpio_cfgpin_range().
> NOTE: This is for missed things from the previous patch.
>
> Signed-off-by: Kukjin Kim 
> ---
>  arch/arm/mach-s5p64x0/dev-spi.c    |   24 
>  arch/arm/mach-s5p64x0/setup-i2c0.c |    6 ++
>  arch/arm/mach-s5p64x0/setup-i2c1.c |    6 ++
>  3 files changed, 16 insertions(+), 20 deletions(-)
>
> diff --git a/arch/arm/mach-s5p64x0/dev-spi.c b/arch/arm/mach-s5p64x0/dev-spi.c
> index 5b69ec4..be64fee 100644
> --- a/arch/arm/mach-s5p64x0/dev-spi.c
> +++ b/arch/arm/mach-s5p64x0/dev-spi.c
> @@ -39,20 +39,18 @@ static char *s5p64x0_spi_src_clks[] = {
>  */
>  static int s5p6440_spi_cfg_gpio(struct platform_device *pdev)
>  {
> +       unsigned int base;
> +
>        switch (pdev->id) {
>        case 0:
> -               s3c_gpio_cfgpin(S5P6440_GPC(0), S3C_GPIO_SFN(2));
> -               s3c_gpio_cfgpin(S5P6440_GPC(1), S3C_GPIO_SFN(2));
> -               s3c_gpio_cfgpin(S5P6440_GPC(2), S3C_GPIO_SFN(2));
> +               base = S5P6440_GPC(0);
>                s3c_gpio_setpull(S5P6440_GPC(0), S3C_GPIO_PULL_UP);
>                s3c_gpio_setpull(S5P6440_GPC(1), S3C_GPIO_PULL_UP);
>                s3c_gpio_setpull(S5P6440_GPC(2), S3C_GPIO_PULL_UP);

Also make a wrapper, s3c_gpio_cfgrange_pullup, then you can also
remove above codes.
There's lots of codes use PULL_UP as default pin setup.

Thank you,
Kyungmin Park
>                break;
>
>        case 1:
> -               s3c_gpio_cfgpin(S5P6440_GPC(4), S3C_GPIO_SFN(2));
> -               s3c_gpio_cfgpin(S5P6440_GPC(5), S3C_GPIO_SFN(2));
> -               s3c_gpio_cfgpin(S5P6440_GPC(6), S3C_GPIO_SFN(2));
> +               base = S5P6440_GPC(4);
>                s3c_gpio_setpull(S5P6440_GPC(4), S3C_GPIO_PULL_UP);
>                s3c_gpio_setpull(S5P6440_GPC(5), S3C_GPIO_PULL_UP);
>                s3c_gpio_setpull(S5P6440_GPC(6), S3C_GPIO_PULL_UP);
> @@ -63,25 +61,25 @@ static int s5p6440_spi_cfg_gpio(struct platform_device 
> *pdev)
>                return -EINVAL;
>        }
>
> +       s3c_gpio_cfgpin_range(base, 3, S3C_GPIO_SFN(2));
> +
>        return 0;
>  }
>
>  static int s5p6450_spi_cfg_gpio(struct platform_device *pdev)
>  {
> +       unsigned int base;
> +
>        switch (pdev->id) {
>        case 0:
> -               s3c_gpio_cfgpin(S5P6450_GPC(0), S3C_GPIO_SFN(2));
> -               s3c_gpio_cfgpin(S5P6450_GPC(1), S3C_GPIO_SFN(2));
> -               s3c_gpio_cfgpin(S5P6450_GPC(2), S3C_GPIO_SFN(2));
> +               base = S5P6450_GPC(0);
>                s3c_gpio_setpull(S5P6450_GPC(0), S3C_GPIO_PULL_UP);
>                s3c_gpio_setpull(S5P6450_GPC(1), S3C_GPIO_PULL_UP);
>                s3c_gpio_setpull(S5P6450_GPC(2), S3C_GPIO_PULL_UP);
>                break;
>
>        case 1:
> -               s3c_gpio_cfgpin(S5P6450_GPC(4), S3C_GPIO_SFN(2));
> -               s3c_gpio_cfgpin(S5P6450_GPC(5), S3C_GPIO_SFN(2));
> -               s3c_gpio_cfgpin(S5P6450_GPC(6), S3C_GPIO_SFN(2));
> +               base = S5P6450_GPC(4);
>                s3c_gpio_setpull(S5P6450_GPC(4), S3C_GPIO_PULL_UP);
>                s3c_gpio_setpull(S5P6450_GPC(5), S3C_GPIO_PULL_UP);
>                s3c_gpio_setpull(S5P6450_GPC(6), S3C_GPIO_PULL_UP);
> @@ -92,6 +90,8 @@ static int s5p6450_spi_cfg_gpio(struct platform_device 
> *pdev)
>                return -EINVAL;
>        }
>
> +       s3c_gpio_cfgpin_range(base, 3, S3C_GPIO_SFN(2));
> +
>        return 0;
>  }
>
> diff --git a/arch/arm/mach-s5p64x0/setup-i2c0.c 
> b/arch/arm/mach-s5p64x0/setup-i2c0.c
> index dc4cc65..75ef9e5 100644
> --- a/arch/arm/mach-s5p64x0/setup-i2c0.c
> +++ b/arch/arm/mach-s5p64x0/setup-i2c0.c
> @@ -25,17 +25,15 @@ struct platform_device; /* don't need the contents */
>
>  void s5p6440_i2c0_cfg_gpio(struct platform_device *dev)
>  {
> -       s3c_gpio_cfgpin(S5P6440_GPB(5), S3C_GPIO_SFN(2));
> +       s3c_gpio_cfgpin_range(S5P6440_GPB(5), 2, S3C_GPIO_SFN(2));
>        s3c_gpio_setpull(S5P6440_GPB(5), S3C_GPIO_PULL_UP);
> -       s3c_gpio_cfgpin(S5P6440_GPB(6), S3C_GPIO_SFN(2));
>        s3c_gpio_setpull(S5P6440_GPB(6), S3C_GPIO_PULL_UP);
>  }
>
>  void s5p6450_i2c0_cfg_gpio(struct platform_device *dev)
>  {
> -       s3c_gpio_cfgpin(S5P6450_GPB(5), S3C_GPIO_SFN(2));
> +       s3c_gpio_cfgpin_range(S5P6450_GPB(5), 2, S3C_GPIO_SFN(2));
>        s3c_gpio_setpull(S5P6450_GPB(5), S3C_GPIO_PULL_UP);
> -       s3c_gpio_cfgpin(S5P6450_GPB(6), S3C_GPIO_SFN(2));
>        s3c_gpio_setpull(S5P6450_GPB(6), S3C_GPIO_PULL_UP);
>  }
>
>

Re: [PATCH 3/3] ARM: S5PV210: Add voltage consumer of WM8994 to the regulator framework

2010-10-01 Thread Kyungmin Park
On Fri, Oct 1, 2010 at 4:24 PM, Mark Brown
 wrote:
> On Fri, Oct 01, 2010 at 02:40:02PM +0900, Kyungmin Park wrote:
>
>> FYI: now wm8994 codec is connected to I/O power directly. and there's
>> no connection with PMIC.
>
> Presumably there's a power rail connection...
>
>> Maybe you mean the I/O power LDO and use it. but it's always on in
>> case of s5pc110.
>
> ...like this.
>
>> and can't turn off the this LDO on max8998 except the sleep.
>
> It's still good to show the actual connection on the board for clarity -
> like I say, the regulator API can handle always on regulators and
> keeping the regulator setup in software close to the schematic helps
> make the code easier to follow.

It's best but in most case schematic is confidential. so it's impossible.

And as you concerns there's no power issues related with codes. it's
already verified design. I think wolfsonmicro already confirmed.

Thank you,
Kyungmin Park
--
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: S5PV210: Add voltage consumer of WM8994 to the regulator framework

2010-09-30 Thread Kyungmin Park
On Fri, Oct 1, 2010 at 2:31 PM, Mark Brown
 wrote:
> On Fri, Oct 01, 2010 at 01:23:25PM +0900, Chanwoo Choi wrote:
>
>> Additionally, I explain the constraints of the regulator of WM8994 codec.
>> All these consumer supply of WM8994 codec connected the regulator(VCC_1.8V)
>> on a circuit diagram. "VCC_1.8V" regulator is always enabled, because it is
>> used to many devices on Goni/Aquila board. This is required especially
>
> It would be nicer to connect this to the regulator on the PMIC (I'm
> assuming there is one), even if it is always enabled.  That said, is the
> PMIC on these boards supported by Linux yet?

FYI: now wm8994 codec is connected to I/O power directly. and there's
no connection with PMIC.
Maybe you mean the I/O power LDO and use it. but it's always on in
case of s5pc110.
and can't turn off the this LDO on max8998 except the sleep.

Thank you,
Kyungmin Park
>
>> when there are many devices physically attached to "VCC_1.8V" and some of
>> they did not "register" as consumers to "VCC_1.8V". "VCC_1.8V" might be
>> turned off by those who are registered while "unregistered" are still active
>
> You can set the always_on flag in the regulator constraints to prevent
> this happening - if that flag is set the supply will be kept active even
> if all consumers are disabled.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" 
> in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v4] ARM: Samsung: Add common s5p gpio interrupt support

2010-09-30 Thread Kyungmin Park
On Thu, Sep 30, 2010 at 10:29 PM, Kukjin Kim  wrote:
> Marek Szyprowski wrote:
>>
>> This patch adds common code to enable support of gpio interrupts on s5p
>> series.
>>
>> The total number of gpio pins is quite large on s5p series. Registering
>> irq support for all of them would be a resource waste. Because of that
>> the interrupt support for standard gpio pins is registered dynamically
>> by the s5p_register_gpio_interrupt() function.
>>
>> Signed-off-by: Marek Szyprowski 
>> Signed-off-by: Joonyoung Shim 
>> Signed-off-by: Kyungmin Park 
>>
>> ---
>>
>> Changes since v3:
>> - merged default and IRQ_TYPE_NONE cases in s5p_gpioint_set_type function
>> - fixed mask in GPIOINT_CON_OFFSET register from 0xf to 0x7
>> - renamed the chip to s5p_gpioint to match the s5p_extint style
>> - extended comments in plat/irqs.h
>>
>> ---
>>  arch/arm/plat-s5p/Kconfig                      |    5 +
>>  arch/arm/plat-s5p/Makefile                     |    1 +
>>  arch/arm/plat-s5p/include/plat/irqs.h          |    9 +
>>  arch/arm/plat-s5p/irq-gpioint.c                |  242
>> 
>>  arch/arm/plat-samsung/include/plat/gpio-cfg.h  |   18 ++
>>  arch/arm/plat-samsung/include/plat/gpio-core.h |    4 +
>>  6 files changed, 279 insertions(+), 0 deletions(-)
>>  create mode 100644 arch/arm/plat-s5p/irq-gpioint.c
>>
>> diff --git a/arch/arm/plat-s5p/Kconfig b/arch/arm/plat-s5p/Kconfig
>> index 2596096..65dbfa8 100644
>> --- a/arch/arm/plat-s5p/Kconfig
>> +++ b/arch/arm/plat-s5p/Kconfig
>> @@ -32,6 +32,11 @@ config S5P_EXT_INT
>>         Use the external interrupts (other than GPIO interrupts.)
>>         Note: Do not choose this for S5P6440 and S5P6450.
>>
>> +config S5P_GPIO_INT
>> +     bool
>> +     help
>> +       Common code for the GPIO interrupts (other than external
> interrupts.)
>> +
>>  config S5P_DEV_FIMC0
>>       bool
>>       help
>> diff --git a/arch/arm/plat-s5p/Makefile b/arch/arm/plat-s5p/Makefile
>> index f3e917e..e0823be 100644
>> --- a/arch/arm/plat-s5p/Makefile
>> +++ b/arch/arm/plat-s5p/Makefile
>> @@ -18,6 +18,7 @@ obj-y                               += cpu.o
>>  obj-y                                += clock.o
>>  obj-y                                += irq.o
>>  obj-$(CONFIG_S5P_EXT_INT)    += irq-eint.o
>> +obj-$(CONFIG_S5P_GPIO_INT)   += irq-gpioint.o
>>
>>  # devices
>>
>> diff --git a/arch/arm/plat-s5p/include/plat/irqs.h b/arch/arm/plat-
>> s5p/include/plat/irqs.h
>> index 3fb3a3a..5a7bf96 100644
>> --- a/arch/arm/plat-s5p/include/plat/irqs.h
>> +++ b/arch/arm/plat-s5p/include/plat/irqs.h
>> @@ -94,4 +94,13 @@
>>                                               ((irq) - S5P_EINT_BASE1) : \
>>                                               ((irq) + 16 -
>> S5P_EINT_BASE2))
>>
>> +/* Typically only a few gpio chips require gpio interrupt support.
>> +   To avoid memory waste irq descriptors are allocated only for
>> +   S5P_GPIOINT_GROUP_COUNT chips, each with total number of
>> +   S5P_GPIOINT_GROUP_SIZE pins/irqs. Each GPIOINT group can be assiged
>> +   to any gpio chip with the s5p_register_gpio_interrupt() function */
>> +#define S5P_GPIOINT_GROUP_COUNT 4
>> +#define S5P_GPIOINT_GROUP_SIZE       8
>> +#define S5P_GPIOINT_COUNT    (S5P_GPIOINT_GROUP_COUNT *
>> S5P_GPIOINT_GROUP_SIZE)
>> +
>>  #endif /* __ASM_PLAT_S5P_IRQS_H */
>> diff --git a/arch/arm/plat-s5p/irq-gpioint.c
> b/arch/arm/plat-s5p/irq-gpioint.c
>> new file mode 100644
>> index 000..32263a3
>> --- /dev/null
>> +++ b/arch/arm/plat-s5p/irq-gpioint.c
>> @@ -0,0 +1,242 @@
>> +/* linux/arch/arm/plat-s5p/irq-gpioint.c
>> + *
>> + * Copyright (c) 2010 Samsung Electronics Co., Ltd.
>> + * Author: Kyungmin Park 
>> + * Author: Joonyoung Shim 
>> + * Author: Marek Szyprowski 
>> + *
>> + *  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.
>> + *
>> + */
>> +
>> +#include 
>> +#include 
>> +#include 
>> +#include 
>> +#include 
>> +
>> +#include 
>> +#include 
>> +#include 
>> +
>> +#define S5P_GPIOREG(x)                       (S5P_VA_GPIO + (x))
>> +
>> +#define GPIOINT_CON_OFFSET  

Re: [PATCH 5/5] sdhci-s3c: Add support no internal clock divider in host controller

2010-09-29 Thread Kyungmin Park
On Thu, Sep 30, 2010 at 2:40 PM, Jeongbae Seo  wrote:
> Chris wrote:
>
>> Hi Kyungmin, Ben,
>>
>> On Thu, Sep 30, 2010 at 10:18:12AM +0900, Kyungmin Park wrote:
>> > On Sat, Sep 18, 2010 at 12:59 AM, Chris Ball  wrote:
>> > > Hi,
>> > >
>> > > On Thu, Sep 16, 2010 at 06:08:28PM +0900, Kyungmin Park wrote:
>> > >> Well there are two implementations. and no conclusion yet.
>> > >> as s5pc210 don't support internal SDHCI clock, DMC overrides the
>> > >> function operation itself when s5pc210. System LSI use the quirks.
>> > >>
>> > >> Choose any one from MMC maintainer.
>> > >
>> > > Both approaches are generally acceptable for MMC, so I would want to
>> > > leave it up to the maintainer of the driver in question (which is Ben,
>> > > in this case?) to choose between them.
>> >
>> > Hi Chris,
>> >
>> > Did you get the opinion from Ben?
>> >
>> > I hope this decision will be done before 2.6.37 merge windows start to
>> > support SDHCI support on s5pc210.
>>
>> Hm, I didn't, and Ben's been silent about the urgent sdhci-s3c patches
>> too.  Ben, are you just dealing with a large backlog, or are you
>> interested in nominating someone else to take over sdhci-s3c?
>
> Hi Chris, Kyungmin
>
> I'd like to let you know that Ben had reviewed and commented for
> "[PATCH v2 2/2] sdhci-s3c: Add support no internal clock divider" in host
> controller in 9/21. However, our response was late due to our holidays. I
> made a response in 9/28 that why we use this quirk and now we're waiting for
> his opinion.
>
> Kyungmin, did you check Ben's review comments for this ? When I saw it, his
> approach is just a bit different from you and me. Please let us know if you
> have any idea about his comments.

I think he just ask "why these quirk are needed" and you already
explained it. I don't have any clue this approach.
Anyway he suggest any ideas I will check it. but no comments then no way.

Thank you,
Kyungmin Park
>
> Thanks,
> Best Regards
> Jeongbae Seo
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" 
> in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 5/5] sdhci-s3c: Add support no internal clock divider in host controller

2010-09-29 Thread Kyungmin Park
On Sat, Sep 18, 2010 at 12:59 AM, Chris Ball  wrote:
> Hi,
>
> On Thu, Sep 16, 2010 at 06:08:28PM +0900, Kyungmin Park wrote:
>> Well there are two implementations. and no conclusion yet.
>> as s5pc210 don't support internal SDHCI clock, DMC overrides the
>> function operation itself when s5pc210. System LSI use the quirks.
>>
>> Choose any one from MMC maintainer.
>
> Both approaches are generally acceptable for MMC, so I would want to
> leave it up to the maintainer of the driver in question (which is Ben,
> in this case?) to choose between them.

Hi Chris,

Did you get the opinion from Ben?

I hope this decision will be done before 2.6.37 merge windows start to
support SDHCI support on s5pc210.

Thank you,
Kyungmin Park

>
> That said, I think my own mild preference is for Jaehoon's approach.
>
> Thanks,
>
> - Chris.
> --
> Chris Ball      <http://printf.net/>
> One Laptop Per Child
>
--
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/6] ARM: Samsung: Add common s5p gpio interrupt support

2010-09-28 Thread Kyungmin Park
Hi Marek,

On Sep 28, 2010 11:24 PM, "Marek Szyprowski"
 wrote:> Hello,
>
> On Tuesday, September 28, 2010 4:04 PM Kukjin Kim wrote:
>
>> Marek Szyprowski wrote:
>> >
>> > This patch adds common code to enable support of gpio interrupts on s5p
>> > series.
>> >
>> > The total number of gpio pins is quite large on s5p series. Registering
>> > irq support for all of them would be a resource waste. Because of that
>> > the interrupt support for standard gpio pins is registered dynamically
>> > by the s5p_register_gpio_interrupt() function.
>>
>> Hi,
>>
>> I checked only S5PV210/S5PC110 GPIO interrupt.
>>
>> >
>> > Signed-off-by: Marek Szyprowski 
>> > Signed-off-by: Joonyoung Shim 
>> > Signed-off-by: Kyungmin Park 
>> > ---
>> >  arch/arm/plat-s5p/Kconfig  |5 +
>> >  arch/arm/plat-s5p/Makefile |1 +
>> >  arch/arm/plat-s5p/include/plat/irqs.h  |5 +
>> >  arch/arm/plat-s5p/irq-gpioint.c|  243
>> > 
>> >  arch/arm/plat-samsung/include/plat/gpio-cfg.h  |   18 ++
>> >  arch/arm/plat-samsung/include/plat/gpio-core.h |4 +
>> >  6 files changed, 276 insertions(+), 0 deletions(-)
>> >  create mode 100644 arch/arm/plat-s5p/irq-gpioint.c
>> >
>> > diff --git a/arch/arm/plat-s5p/Kconfig b/arch/arm/plat-s5p/Kconfig
>> > index 407e323..d77d518 100644
>> > --- a/arch/arm/plat-s5p/Kconfig
>> > +++ b/arch/arm/plat-s5p/Kconfig
>> > @@ -32,6 +32,11 @@ config S5P_EXT_INT
>> >  Use the external interrupts (other than GPIO interrupts.)
>> >  Note: Do not choose this for S5P6440.
>> >
>> > +config S5P_GPIO_INT
>> > +  bool
>> > +  help
>> > +Common code for the GPIO interrupts (other than external
>> interrupts.)
>> > +
>> >  config S5P_DEV_FIMC0
>> >bool
>> >help
>> > diff --git a/arch/arm/plat-s5p/Makefile b/arch/arm/plat-s5p/Makefile
>> > index f3e917e..e0823be 100644
>> > --- a/arch/arm/plat-s5p/Makefile
>> > +++ b/arch/arm/plat-s5p/Makefile
>> > @@ -18,6 +18,7 @@ obj-y+= cpu.o
>> >  obj-y += clock.o
>> >  obj-y += irq.o
>> >  obj-$(CONFIG_S5P_EXT_INT) += irq-eint.o
>> > +obj-$(CONFIG_S5P_GPIO_INT)+= irq-gpioint.o
>> >
>> >  # devices
>> >
>> > diff --git a/arch/arm/plat-s5p/include/plat/irqs.h b/arch/arm/plat-
>> > s5p/include/plat/irqs.h
>> > index 3fb3a3a..50bcf1e 100644
>> > --- a/arch/arm/plat-s5p/include/plat/irqs.h
>> > +++ b/arch/arm/plat-s5p/include/plat/irqs.h
>> > @@ -94,4 +94,9 @@
>> >((irq) - S5P_EINT_BASE1) : \
>> >((irq) + 16 -
>> > S5P_EINT_BASE2))
>> >
>> > +/* GPIO interrupt (registered by s5p_register_gpio_interrupt) */
>> > +#define S5P_GPIOINT_GROUP_COUNT 4
>> > +#define S5P_GPIOINT_GROUP_SIZE8
>>
>> Is it possible to support S5P SoCs GPIO interrupt with only 4-GROUPs?
>
> Yes, it won't be a problem. Just 4 interrupt slots will be wasted. Not a bit 
> problem
> imho.
>
>>
>> > +#define S5P_GPIOINT_COUNT (S5P_GPIOINT_GROUP_COUNT *
>> > S5P_GPIOINT_GROUP_SIZE)
>> > +
>> >  #endif /* __ASM_PLAT_S5P_IRQS_H */
>> > diff --git a/arch/arm/plat-s5p/irq-gpioint.c
>> b/arch/arm/plat-s5p/irq-gpioint.c
>> > new file mode 100644
>> > index 000..7409ae0
>> > --- /dev/null
>> > +++ b/arch/arm/plat-s5p/irq-gpioint.c
>> > @@ -0,0 +1,243 @@
>> > +/* linux/arch/arm/plat-s5p/irq-gpioint.c
>> > + *
>> > + * Copyright (c) 2010 Samsung Electronics Co., Ltd.
>> > + * Author: Kyungmin Park 
>> > + * Author: Joonyoung Shim 
>> > + * Author: Marek Szyprowski 
>> > + *
>> > + *  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.
>> > + *
>> > + */
>> > +
>> > +#include 
>> > +#include 
>> > +#include 
>> > +#include 
>> > +#include 
>> > +

Re: [PATCH v3] regulators: add support max8952 regulator

2010-09-28 Thread Kyungmin Park
On Tue, Sep 28, 2010 at 4:58 PM, Kukjin Kim  wrote:
> Kukjin Kim wrote:
>>
>> Kyungmin Park wrote:
>> >
>> > Do you check the DVS feature?
>> > It can support the DVS by GPIOs and platform can set the each voltages
> at
>> > each mode.
>> >
>> Ok...I agree about the feature's necessity that you said.
>>
>> However, we don't need separate driver which has same/similar
> functionality.
>> So...would be better that could implement it in max8649...
>>
>> Could you please do it based on this?...in fact, can't test it on SMDK.
>>
> Hmm...
> Kyungmin, if you have no time to do it, my team will do it.
>
> Is it ok?
No problem, go ahead.

Thank you,
Kyungmin Park
>
>> Thanks.
>>
>> Best regards,
>> Kgene.
>> --
>> Kukjin Kim , Senior Engineer,
>> SW Solution Development Team, Samsung Electronics Co., Ltd.
>>
>> > As quick review of max8649. It can't support it.
>> >
>> > Thank you,
>> > Kyungmin Park
>> >
>> > -Original Message-
>> > From: Kukjin Kim [mailto:kgene@samsung.com]
>> > Sent: Wednesday, September 08, 2010 8:26 AM
>> > To: linux-ker...@vger.kernel.org; linux-arm-ker...@lists.infradead.org;
>> > linux-samsung-soc@vger.kernel.org
>> > Cc: l...@slimlogic.co.uk; Changhwan Youn; Kukjin Kim; MyungJoo Ham;
>> Kyungmin
>> > Park
>> > Subject: [PATCH v3] regulators: add support max8952 regulator
>> >
>> > From: Changhwan Youn 
>> >
>> > The operation of max8952 is almost similar to max8649 except the output
>> > voltage range. This patch adds support the max8952 regulator using
>> > current max8649 implementation. And removes separate max8952.[ch] files
>> > since the functionality is now merged into this driver.
>> >
>> > Signed-off-by: Changhwan Youn 
>> > Signed-off-by: Kukjin Kim 
>> > Cc: MyungJoo Ham 
>> > Cc: Kyungmin Park 
>> > Acked-by: Mark Brown 
>> > ---
>> > Following is as per Mark Brown's suggestion.
>> > Changes since v2:
>> > - Removed separate max8952.[ch] files
>> >
>> > Changes since v1:
>> > - Added returning fail when detected wrong ID
>> > - Added matching the ID from the chip in case the user got things wrong
>> > - Added enum chip ID instead of 0, 1
>> >
>> (snip)
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" 
> in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] ARM: S5PV210: Add Torbreck board support

2010-09-27 Thread Kyungmin Park
On Tue, Sep 28, 2010 at 2:55 PM, Kukjin Kim  wrote:
> 최규호 wrote:
> Hi,
>
> Welcome to Linux mainline ;-)
> I have some comments about your patches.
>
> Firstly could you please use English character in the representing name in 
> e-mail client not Korean character :-)
> And make sure it's text type.
>
>>Hi,
>>Thank you for your interesting.
>>On Mon, Sep 27, 2010 at 11:58 AM, Kyungmin Park  wrote:
>
> (snip)
>
>>> +#define TORBRECK_UFCON_DEFAULT (S3C2410_UFCON_FIFOMODE |       \
>>> +                                S5PV210_UFCON_TXTRIG4 |        \
>>> +                                S5PV210_UFCON_RXTRIG4)
>>Any reason to use TRIG4? just use the full trigger e.g., 256.
>>
>>Okay, I'll fix it.
>>
> Hmm...Kyungmin, any reason to use full trigger here?
>
> It depends on board...so it doesn't matter TRIG4 or anything else if there is 
> no problem on your board.
> It means the maximum value is not best condition...only depends on your 
> situation/condition.

So I ask ANY REASON to use TRIG4?
And my opinions,
First. it's not true for all UARTs. it's only valid on UART0.
Second, "the maximum value is not best condition" then why Spec said
"increase the FIFO size for performance".

>
>>> +
>>> +static struct s3c2410_uartcfg torbreck_uartcfgs[] __initdata = {
>>> +       [0] = {
>>> +               .hwport         = 0,
>>> +               .flags          = 0,
>>There's no code for flags, please remove it all.
>>
>>Okay, I'll remove it.
>>
> I think no need to modify it.
> Actually I said many times about this...
>
> And as Ben Dooks said in other patch, the format will be changed soon.

I always listen "will be changed" so until that time use the correct code.
Don't add the meaningless codes.

Thank you,
Kyungmin Park
>
>>> +               .ucon           = TORBRECK_UCON_DEFAULT,
>>> +               .ulcon          = TORBRECK_ULCON_DEFAULT,
>>> +               .ufcon          = TORBRECK_UFCON_DEFAULT,
>>> +       },
>>> +       [1] = {
>>> +               .hwport         = 1,
>>> +               .flags          = 0,
>>> +               .ucon           = TORBRECK_UCON_DEFAULT,
>>> +               .ulcon          = TORBRECK_ULCON_DEFAULT,
>>> +               .ufcon          = TORBRECK_UFCON_DEFAULT,
>>> +       },
>>> +       [2] = {
>>> +               .hwport         = 2,
>>> +               .flags          = 0,
>>> +               .ucon           = TORBRECK_UCON_DEFAULT,
>>> +               .ulcon          = TORBRECK_ULCON_DEFAULT,
>>> +               .ufcon          = TORBRECK_UFCON_DEFAULT,
>>> +       },
>>> +       [3] = {
>>> +               .hwport         = 3,
>>> +               .flags          = 0,
>>> +               .ucon           = TORBRECK_UCON_DEFAULT,
>>> +               .ulcon          = TORBRECK_ULCON_DEFAULT,
>>> +               .ufcon          = TORBRECK_UFCON_DEFAULT,
>>> +       },
>>> +};
>>> +
>
> (snip)
>
>>> --
>>> 1.5.6.3
>>>
> If possible, please use later version git.
> It doesn't mean latest git is best...
> This is just private opinion. :-)
>
> Thanks.
>
> Best regards,
> Kgene.
> --
> Kukjin Kim , Senior Engineer,
> SW Solution Development Team, Samsung Electronics Co., Ltd.
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" 
> in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] ARM: S5PV210: Add Torbreck board support

2010-09-27 Thread Kyungmin Park
On Mon, Sep 27, 2010 at 7:10 PM, 최규호  wrote:
> Hi,
> Thank you for your interesting.
>
> On Mon, Sep 27, 2010 at 11:58 AM, Kyungmin Park 
> wrote:
>>
>> Hi,
>>
>> Looks good to me except minor fixup.
>>
>> Acked-by: Kyungmin Park 
>>
>> On Sun, Sep 26, 2010 at 10:05 AM, Kyuho Choi  wrote:
>> > This patch adds to support Torbreck board of aESOP community using
>> > Samsung S5PV210 SoC.
>> >
>> > Signed-off-by: Kyuho Choi 
>> > Signed-off-by: Hyunchul Ko 
>> > ---
>> >  arch/arm/mach-s5pv210/Kconfig         |   18 +
>> >  arch/arm/mach-s5pv210/Makefile        |    1 +
>> >  arch/arm/mach-s5pv210/mach-torbreck.c |  133
>> > +
>> >  3 files changed, 152 insertions(+), 0 deletions(-)
>> >  create mode 100644 arch/arm/mach-s5pv210/mach-torbreck.c
>> >
>> > diff --git a/arch/arm/mach-s5pv210/Kconfig
>> > b/arch/arm/mach-s5pv210/Kconfig
>> > index d3a3895..c5ec466 100644
>> > --- a/arch/arm/mach-s5pv210/Kconfig
>> > +++ b/arch/arm/mach-s5pv210/Kconfig
>> > @@ -139,6 +139,24 @@ config MACH_SMDKV210
>> >        help
>> >          Machine support for Samsung SMDKV210
>> >
>> > +config MACH_TORBRECK
>> > +       bool "Torbreck"
>> > +       select CPU_S5PV210
>> > +       select ARCH_SPARSEMEM_ENABLE
>> > +       select S3C_DEV_HSMMC
>> > +       select S3C_DEV_HSMMC1
>> > +       select S3C_DEV_HSMMC2
>> > +       select S3C_DEV_HSMMC3
>> > +       select S3C_DEV_I2C1
>> > +       select S3C_DEV_I2C2
>> > +       select S3C_DEV_RTC
>> > +       select S3C_DEV_WDT
>> > +       select S5PV210_SETUP_I2C1
>> > +       select S5PV210_SETUP_I2C2
>> > +       select S5PV210_SETUP_SDHCI
>> > +       help
>> > +         Machine support for aESOP Torbreck
>> Just question. Does it TDROID board?
>
>
> No, Torbreck is aESOP community's co-work board. It's not TDORID.
Then can I get the schematics or information for this board?
e.g., LCD resolution. SD/MMC configuration USB, and so on.

Thank you,
Kyungmin Park
>
>>
>> > +
>> >  endmenu
>> >
>> >  endif
>> > diff --git a/arch/arm/mach-s5pv210/Makefile
>> > b/arch/arm/mach-s5pv210/Makefile
>> > index 05048c5..927c2b7 100644
>> > --- a/arch/arm/mach-s5pv210/Makefile
>> > +++ b/arch/arm/mach-s5pv210/Makefile
>> > @@ -21,6 +21,7 @@ obj-$(CONFIG_MACH_AQUILA)     += mach-aquila.o
>> >  obj-$(CONFIG_MACH_SMDKV210)    += mach-smdkv210.o
>> >  obj-$(CONFIG_MACH_SMDKC110)    += mach-smdkc110.o
>> >  obj-$(CONFIG_MACH_GONI)                += mach-goni.o
>> > +obj-$(CONFIG_MACH_TORBRECK)    += mach-torbreck.o
>> >
>> >  # device support
>> >
>> > diff --git a/arch/arm/mach-s5pv210/mach-torbreck.c
>> > b/arch/arm/mach-s5pv210/mach-torbreck.c
>> > new file mode 100644
>> > index 000..3142250
>> > --- /dev/null
>> > +++ b/arch/arm/mach-s5pv210/mach-torbreck.c
>> > @@ -0,0 +1,133 @@
>> > +/* linux/arch/arm/mach-s5pv210/mach-torbreck.c
>> > + *
>> > + * Copyright (c) 2010 aESOP Community
>> > + *             http://www.aesop.or.kr/
>> > + *
>> > + * 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 
>> > +
>> > +/* Following are default values for UCON, ULCON and UFCON UART
>> > registers */
>> > +#define TORBRECK_UCON_DEFAULT  (S3C2410_UCON_TXILEVEL |        \
>> > +                                S3C2410_UCON_RXILEVEL |        \
>> > +                                S3C2410_UCON_TXIRQMODE |       \
>> > +                                S3C2410_UCON_RXIRQMODE |       \
>> > +                                S3C2410_UCON_RXFIFO_TOI |      \
>> > +                                S3C2443_UCON_RXERR_IRQEN)
>> > +
>

Re: [PATCH] ARM: S5PV210: Add Torbreck board support

2010-09-26 Thread Kyungmin Park
Hi,

Looks good to me except minor fixup.

Acked-by: Kyungmin Park 

On Sun, Sep 26, 2010 at 10:05 AM, Kyuho Choi  wrote:
> This patch adds to support Torbreck board of aESOP community using
> Samsung S5PV210 SoC.
>
> Signed-off-by: Kyuho Choi 
> Signed-off-by: Hyunchul Ko 
> ---
>  arch/arm/mach-s5pv210/Kconfig         |   18 +
>  arch/arm/mach-s5pv210/Makefile        |    1 +
>  arch/arm/mach-s5pv210/mach-torbreck.c |  133 
> +
>  3 files changed, 152 insertions(+), 0 deletions(-)
>  create mode 100644 arch/arm/mach-s5pv210/mach-torbreck.c
>
> diff --git a/arch/arm/mach-s5pv210/Kconfig b/arch/arm/mach-s5pv210/Kconfig
> index d3a3895..c5ec466 100644
> --- a/arch/arm/mach-s5pv210/Kconfig
> +++ b/arch/arm/mach-s5pv210/Kconfig
> @@ -139,6 +139,24 @@ config MACH_SMDKV210
>        help
>          Machine support for Samsung SMDKV210
>
> +config MACH_TORBRECK
> +       bool "Torbreck"
> +       select CPU_S5PV210
> +       select ARCH_SPARSEMEM_ENABLE
> +       select S3C_DEV_HSMMC
> +       select S3C_DEV_HSMMC1
> +       select S3C_DEV_HSMMC2
> +       select S3C_DEV_HSMMC3
> +       select S3C_DEV_I2C1
> +       select S3C_DEV_I2C2
> +       select S3C_DEV_RTC
> +       select S3C_DEV_WDT
> +       select S5PV210_SETUP_I2C1
> +       select S5PV210_SETUP_I2C2
> +       select S5PV210_SETUP_SDHCI
> +       help
> +         Machine support for aESOP Torbreck
Just question. Does it TDROID board?
> +
>  endmenu
>
>  endif
> diff --git a/arch/arm/mach-s5pv210/Makefile b/arch/arm/mach-s5pv210/Makefile
> index 05048c5..927c2b7 100644
> --- a/arch/arm/mach-s5pv210/Makefile
> +++ b/arch/arm/mach-s5pv210/Makefile
> @@ -21,6 +21,7 @@ obj-$(CONFIG_MACH_AQUILA)     += mach-aquila.o
>  obj-$(CONFIG_MACH_SMDKV210)    += mach-smdkv210.o
>  obj-$(CONFIG_MACH_SMDKC110)    += mach-smdkc110.o
>  obj-$(CONFIG_MACH_GONI)                += mach-goni.o
> +obj-$(CONFIG_MACH_TORBRECK)    += mach-torbreck.o
>
>  # device support
>
> diff --git a/arch/arm/mach-s5pv210/mach-torbreck.c 
> b/arch/arm/mach-s5pv210/mach-torbreck.c
> new file mode 100644
> index 000..3142250
> --- /dev/null
> +++ b/arch/arm/mach-s5pv210/mach-torbreck.c
> @@ -0,0 +1,133 @@
> +/* linux/arch/arm/mach-s5pv210/mach-torbreck.c
> + *
> + * Copyright (c) 2010 aESOP Community
> + *             http://www.aesop.or.kr/
> + *
> + * 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 
> +
> +/* Following are default values for UCON, ULCON and UFCON UART registers */
> +#define TORBRECK_UCON_DEFAULT  (S3C2410_UCON_TXILEVEL |        \
> +                                S3C2410_UCON_RXILEVEL |        \
> +                                S3C2410_UCON_TXIRQMODE |       \
> +                                S3C2410_UCON_RXIRQMODE |       \
> +                                S3C2410_UCON_RXFIFO_TOI |      \
> +                                S3C2443_UCON_RXERR_IRQEN)
> +
> +#define TORBRECK_ULCON_DEFAULT S3C2410_LCON_CS8
> +
> +#define TORBRECK_UFCON_DEFAULT (S3C2410_UFCON_FIFOMODE |       \
> +                                S5PV210_UFCON_TXTRIG4 |        \
> +                                S5PV210_UFCON_RXTRIG4)

Any reason to use TRIG4? just use the full trigger e.g., 256.
> +
> +static struct s3c2410_uartcfg torbreck_uartcfgs[] __initdata = {
> +       [0] = {
> +               .hwport         = 0,
> +               .flags          = 0,
There's no code for flags, please remove it all.
> +               .ucon           = TORBRECK_UCON_DEFAULT,
> +               .ulcon          = TORBRECK_ULCON_DEFAULT,
> +               .ufcon          = TORBRECK_UFCON_DEFAULT,
> +       },
> +       [1] = {
> +               .hwport         = 1,
> +               .flags          = 0,
> +               .ucon           = TORBRECK_UCON_DEFAULT,
> +               .ulcon          = TORBRECK_ULCON_DEFAULT,
> +               .ufcon          = TORBRECK_UFCON_DEFAULT,
> +       },
> +       [2] = {
> +               .hwport         = 2,
> +               .flags          = 0,
> +               .ucon           = TORBRECK_UCON_DEFAULT,
> +               .ulcon          = TORBRECK_ULCON_DEFAULT,
> +               .ufcon          = TORBRECK_UFCON_DEFAULT,
> +       },
> +       [3] = {
> +  

Re: [PATCH] sdhci-s3c: fix NULL ptr access in sdhci_s3c_remove

2010-09-26 Thread Kyungmin Park
On Sun, Sep 26, 2010 at 7:53 AM, Chris Ball  wrote:
> On Thu, Sep 23, 2010 at 12:08:03PM -0700, Andrew Morton wrote:
>> The patch applies OK to 2.6.35.  Is the bug present there as well?  If
>> so, should we fix it in earlier kernels?  If so then the way in which
>> we indicate this is by adding
>>
>>       Cc: 
>>
>> to the changelog.
>
> Marek, Kyungmin, what do you think?

Of course my opinion is should be merged at this time.
In normal case it's built as static module. so there's no complains.
but it should be fixed.
My SOB is already included at patch. so no need to ACK from me.

Thank you,
Kyungmin Park
>
> Andrew, I've been waiting for an ACK from Ben Dooks, since he's listed
> in MAINTAINERS for this driver, but he hasn't replied yet (I've tried
> pinging privately).  I'll plan on sending Marek's two s3c fixes to
> Linus tomorrow regardless (this one with Cc: )
> along with my MAINTAINERS update for MMC unless anyone objects.
>
> Thanks,
>
> --
> Chris Ball      <http://printf.net/>
> One Laptop Per Child
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" 
> in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v3] ARM: S5PV210: Add Power Management Support

2010-09-16 Thread Kyungmin Park
2010/9/17 Sangbeom Kim :
>
>
> Kyungmin Park wrote:
>
>>On Wed, Sep 15, 2010 at 5:33 PM, Sangbeom Kim  wrote:
>>> From: Jongpill Lee 
>>>
>>> This patch adds suspend-to-ram support for S5PV210.
>>> Note. This patch is confirmed on SMDKV210 and SMDKC110 board.
>>>
>>> Signed-off-by: Jongpill Lee 
>>> Signed-off-by: Sangbeom Kim 
>>> ---
>>> Changes since v2:
>>> 1. Fixed comments as per commnets from Ben Dooks
>>> 2. Removed backup and restore function for VIC 2 and 3
>>>
>>> Changes since v1:
>>> 1. Fixed comments as per comments from Ben Dooks
>>> 2. Removed redunt #if defined(CONFIG_PM)
>>> 3. Removed redunt including header files
>>> 4. Removed  and 
>>> 5. Moved 's5pv210_core_save' into machine directory
>>> 6. Moved sleep.S into machine directory for S5P SoCs compatibility
>>> 7. Added CF retension configuration when wake-up
>>>
>>>
>>>  arch/arm/mach-s5pv210/Kconfig                   |    6 +
>>>  arch/arm/mach-s5pv210/Makefile                  |    1 +
>>>  arch/arm/mach-s5pv210/include/mach/pm-core.h    |   43 ++
>>>  arch/arm/mach-s5pv210/include/mach/regs-clock.h |    7 +-
>>>  arch/arm/mach-s5pv210/mach-smdkc110.c           |    3 +
>>>  arch/arm/mach-s5pv210/mach-smdkv210.c           |    3 +
>>>  arch/arm/mach-s5pv210/pm.c                      |  166
>>++
>>>  arch/arm/mach-s5pv210/sleep.S                   |  171
>>+++
>>>  arch/arm/plat-s5p/Makefile                      |    2 +
>>>  arch/arm/plat-s5p/include/plat/irqs.h           |    1 +
>>>  arch/arm/plat-s5p/irq-pm.c                      |   93 
>>>  arch/arm/plat-s5p/pm.c                          |   52 +++
>>>  arch/arm/plat-samsung/pm-gpio.c                 |    4 +-
>>>  13 files changed, 548 insertions(+), 4 deletions(-)
>>>  create mode 100644 arch/arm/mach-s5pv210/include/mach/pm-core.h
>>>  create mode 100644 arch/arm/mach-s5pv210/pm.c
>>>  create mode 100644 arch/arm/mach-s5pv210/sleep.S
>>>  create mode 100644 arch/arm/plat-s5p/irq-pm.c
>>>  create mode 100644 arch/arm/plat-s5p/pm.c
>>>
>>> diff --git a/arch/arm/mach-s5pv210/Kconfig b/arch/arm/mach-
>>s5pv210/Kconfig
>>> index b46925b..6649170 100644
>>> --- a/arch/arm/mach-s5pv210/Kconfig
>>> +++ b/arch/arm/mach-s5pv210/Kconfig
>>> @@ -14,6 +14,7 @@ config CPU_S5PV210
>>>        select PLAT_S5P
>>>        select S3C_PL330_DMA
>>>        select S5P_EXT_INT
>>> +       select S5PV210_PM if PM
>>>        help
>>>          Enable S5PV210 CPU support
>>>
>>> @@ -138,4 +139,9 @@ config MACH_SMDKV210
>>>
>>>  endmenu
>>>
>>> +config S5PV210_PM
>>> +       bool
>>> +       help
>>> +         Power Management code common to S5PV210
>>> +
>>>  endif
>>> diff --git a/arch/arm/mach-s5pv210/Makefile b/arch/arm/mach-
>>s5pv210/Makefile
>>> index 7045489..c63c162 100644
>>> --- a/arch/arm/mach-s5pv210/Makefile
>>> +++ b/arch/arm/mach-s5pv210/Makefile
>>> @@ -14,6 +14,7 @@ obj-                          :=
>>>
>>>  obj-$(CONFIG_CPU_S5PV210)      += cpu.o init.o clock.o dma.o gpiolib.o
>>>  obj-$(CONFIG_CPU_S5PV210)      += setup-i2c0.o
>>> +obj-$(CONFIG_S5PV210_PM)       += pm.o sleep.o
>>>
>>>  # machine support
>>>
>>> diff --git a/arch/arm/mach-s5pv210/include/mach/pm-core.h
>>b/arch/arm/mach-s5pv210/include/mach/pm-core.h
>>> new file mode 100644
>>> index 000..e8d394f
>>> --- /dev/null
>>> +++ b/arch/arm/mach-s5pv210/include/mach/pm-core.h
>>> @@ -0,0 +1,43 @@
>>> +/* linux/arch/arm/mach-s5pv210/include/mach/pm-core.h
>>> + *
>>> + * Copyright (c) 2010 Samsung Electronics Co., Ltd.
>>> + *             http://www.samsung.com
>>> + *
>>> + * Based on arch/arm/mach-s3c2410/include/mach/pm-core.h,
>>> + * Copyright 2008 Simtec Electronics
>>> + *      Ben Dooks 
>>> + *      http://armlinux.simtec.co.uk/
>>> + *
>>> + * S5PV210 - PM core support for arch/arm/plat-s5p/pm.c
>>> + *
>>> + * This program is free software; you can redistribute it and/or modify
>>> + * it under the terms of the GNU General Public License version 2 as
>>> + * published by the Free Software Foundation.
>>> +*/
>>> +
>&

Re: [PATCH 0/5] ARM: S5PV210: Add support CPUFREQ for S5PV210/S5PC110

2010-09-16 Thread Kyungmin Park
2010/9/17 Kukjin Kim :
> Kyungmin Park wrote:
>>
>> First thank you for posting the patches.
>> but I'm worry about sending the same feature patches from different
> divisions.
>>
> It doesn't matter which division it is from.
> What matters is the quality of the patch.
> Any patches can be submitted anytime anywhere.
>
>> I'm not sure you're talking with kgene. but there are some codes
>> posted by Mr. Ham and get feedback and reviewed with kgene.
>> http://git.infradead.org/users/kmpark/linux-2.6-
>> samsung/shortlog/refs/heads/cpufreq
>>
>> To kgene,
>> One code from DMC(me), another code from System LSI(you). then which
>> codes do you pick up and apply to mainline?
>
> As I said, it is not important where it is from.
> I will apply the best patch.
>
>> and what's rules or principles?
>>
> The best patch will get merged.
> And I think that's the purpose of mailing lists
> - to put all ideas together and find the best solution.

But no need to do same things. Look at the patches. do the same
mistake, e.g., hard-corded values. but Mr. Ham's patch already fixed
it and support full features.

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


Re: [PATCH 1/5] ARM: S5PV310: Add HSMMC support and SDHCI configuration

2010-09-16 Thread Kyungmin Park
On Fri, Sep 17, 2010 at 9:57 AM, Kukjin Kim  wrote:
> Kyungmin Park wrote:
>>
>> On Thu, Sep 16, 2010 at 5:36 PM, Jeongbae Seo 
>> wrote:
>> > From: Hyuk Lee 
>> >
>> > This patch adds to support HSMMC for S5PV310 and S5PC210 and setup for
>> > HSMMC host controller and also related GPIO.
>> > At most 4 channel can be used at the same time.
>> > A user can configure SDHCI data bus as 8bit or 4bit.
>> >
>> > Signed-off-by: Hyuk Lee 
>> > Signed-off-by: Jeongbae Seo 
>> > ---
>> >  arch/arm/mach-s5pv310/Kconfig            |   39 
>> >  arch/arm/mach-s5pv310/Makefile           |    2 +
>> >  arch/arm/mach-s5pv310/setup-sdhci-gpio.c |  156
>> ++
>> >  arch/arm/mach-s5pv310/setup-sdhci.c      |   69 +
>> >  4 files changed, 266 insertions(+), 0 deletions(-)
>> >  create mode 100644 arch/arm/mach-s5pv310/setup-sdhci-gpio.c
>> >  create mode 100644 arch/arm/mach-s5pv310/setup-sdhci.c
>> >
>> > diff --git a/arch/arm/mach-s5pv310/Kconfig
> b/arch/arm/mach-s5pv310/Kconfig
>> > index 9ac29fe..6a07968 100644
>> > --- a/arch/arm/mach-s5pv310/Kconfig
>> > +++ b/arch/arm/mach-s5pv310/Kconfig
>> > @@ -25,6 +25,17 @@ config S5PV310_SETUP_I2C2
>> >        help
>> >          Common setup code for i2c bus 2.
>> >
>> > +config S5PV310_SETUP_SDHCI
>> > +       bool
>> > +       select S5PV310_SETUP_SDHCI_GPIO
>> > +       help
>> > +         Internal helper functions for S5PV310 based SDHCI systems.
>> > +
>> > +config S5PV310_SETUP_SDHCI_GPIO
>> > +       bool
>> > +       help
>> > +         Common setup code for SDHCI gpio.
>> > +
>> >  # machine support
>> >
>> >  menu "S5PC210 Machines"
>> > @@ -33,6 +44,11 @@ config MACH_SMDKC210
>> >        bool "SMDKC210"
>> >        select CPU_S5PV310
>> >        select ARCH_SPARSEMEM_ENABLE
>> > +       select S3C_DEV_HSMMC
>> > +       select S3C_DEV_HSMMC1
>> > +       select S3C_DEV_HSMMC2
>> > +       select S3C_DEV_HSMMC3
>> > +       select S5PV310_SETUP_SDHCI
>> >        help
>> >          Machine support for Samsung SMDKC210
>> >          S5PC210(MCP) is one of package option of S5PV310
>> > @@ -53,9 +69,32 @@ config MACH_SMDKV310
>> >        bool "SMDKV310"
>> >        select CPU_S5PV310
>> >        select ARCH_SPARSEMEM_ENABLE
>> > +       select S3C_DEV_HSMMC
>> > +       select S3C_DEV_HSMMC1
>> > +       select S3C_DEV_HSMMC2
>> > +       select S3C_DEV_HSMMC3
>> > +       select S5PV310_SETUP_SDHCI
>> >        help
>> >          Machine support for Samsung SMDKV310
>> >
>> >  endmenu
>> >
>> > +comment "Configuration for HSMMC bus width"
>> > +
>> > +menu "Use 8-bit bus width"
>> > +
>> > +config S5PV310_SDHCI_CH0_8BIT
>> > +       bool "Channel 0 with 8-bit bus"
>> > +       help
>> > +         Support HSMMC Channel 0 8-bit bus.
>> > +         If selected, Channel 1 is disabled.
>> > +
>> > +config S5PV310_SDHCI_CH2_8BIT
>> > +       bool "Channel 2 with 8-bit bus"
>> > +       help
>> > +         Support HSMMC Channel 2 8-bit bus.
>> > +         If selected, Channel 3 is disabled.
>>
>> I think it's not needed since most boards have fixed bandwith and
>> cfg_gpio handle it regardless these configuration.
>> Also we use the select state if needed, e.g., when MMC0 uses
>> 8-buswidth then don't select MMC1.
>> I saw the SMDK board use this configuration. but just choose bandwidth 4
> or 8.
>>
> Hmm...
>
> If it can be supported 4bit or 8bit option on each board, should be added
> above configuration for selecting it.
why? each sdhci_cfg_gpio can configure the pins properly. each board
has each own SD/MMC. In your test board maybe can switch 4 or 8 but
most board has fixed one.

If SMDK has 8-bit just assign 8 and unselect MMC1 or 3. that's all. No
configurations.

>
> Mr. Seo, it would be nice if you could add un-selection CH1 or CH3 when
> selecting 8bit support later.
>
> Anyway, looks ok to me now..will apply.
>
>> Others good.
>>
> (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-mmc" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/5] ARM: S5PV310: Add HSMMC support and SDHCI configuration

2010-09-16 Thread Kyungmin Park
On Thu, Sep 16, 2010 at 5:36 PM, Jeongbae Seo  wrote:
> From: Hyuk Lee 
>
> This patch adds to support HSMMC for S5PV310 and S5PC210 and setup for
> HSMMC host controller and also related GPIO.
> At most 4 channel can be used at the same time.
> A user can configure SDHCI data bus as 8bit or 4bit.
>
> Signed-off-by: Hyuk Lee 
> Signed-off-by: Jeongbae Seo 
> ---
>  arch/arm/mach-s5pv310/Kconfig            |   39 
>  arch/arm/mach-s5pv310/Makefile           |    2 +
>  arch/arm/mach-s5pv310/setup-sdhci-gpio.c |  156 
> ++
>  arch/arm/mach-s5pv310/setup-sdhci.c      |   69 +
>  4 files changed, 266 insertions(+), 0 deletions(-)
>  create mode 100644 arch/arm/mach-s5pv310/setup-sdhci-gpio.c
>  create mode 100644 arch/arm/mach-s5pv310/setup-sdhci.c
>
> diff --git a/arch/arm/mach-s5pv310/Kconfig b/arch/arm/mach-s5pv310/Kconfig
> index 9ac29fe..6a07968 100644
> --- a/arch/arm/mach-s5pv310/Kconfig
> +++ b/arch/arm/mach-s5pv310/Kconfig
> @@ -25,6 +25,17 @@ config S5PV310_SETUP_I2C2
>        help
>          Common setup code for i2c bus 2.
>
> +config S5PV310_SETUP_SDHCI
> +       bool
> +       select S5PV310_SETUP_SDHCI_GPIO
> +       help
> +         Internal helper functions for S5PV310 based SDHCI systems.
> +
> +config S5PV310_SETUP_SDHCI_GPIO
> +       bool
> +       help
> +         Common setup code for SDHCI gpio.
> +
>  # machine support
>
>  menu "S5PC210 Machines"
> @@ -33,6 +44,11 @@ config MACH_SMDKC210
>        bool "SMDKC210"
>        select CPU_S5PV310
>        select ARCH_SPARSEMEM_ENABLE
> +       select S3C_DEV_HSMMC
> +       select S3C_DEV_HSMMC1
> +       select S3C_DEV_HSMMC2
> +       select S3C_DEV_HSMMC3
> +       select S5PV310_SETUP_SDHCI
>        help
>          Machine support for Samsung SMDKC210
>          S5PC210(MCP) is one of package option of S5PV310
> @@ -53,9 +69,32 @@ config MACH_SMDKV310
>        bool "SMDKV310"
>        select CPU_S5PV310
>        select ARCH_SPARSEMEM_ENABLE
> +       select S3C_DEV_HSMMC
> +       select S3C_DEV_HSMMC1
> +       select S3C_DEV_HSMMC2
> +       select S3C_DEV_HSMMC3
> +       select S5PV310_SETUP_SDHCI
>        help
>          Machine support for Samsung SMDKV310
>
>  endmenu
>
> +comment "Configuration for HSMMC bus width"
> +
> +menu "Use 8-bit bus width"
> +
> +config S5PV310_SDHCI_CH0_8BIT
> +       bool "Channel 0 with 8-bit bus"
> +       help
> +         Support HSMMC Channel 0 8-bit bus.
> +         If selected, Channel 1 is disabled.
> +
> +config S5PV310_SDHCI_CH2_8BIT
> +       bool "Channel 2 with 8-bit bus"
> +       help
> +         Support HSMMC Channel 2 8-bit bus.
> +         If selected, Channel 3 is disabled.

I think it's not needed since most boards have fixed bandwith and
cfg_gpio handle it regardless these configuration.
Also we use the select state if needed, e.g., when MMC0 uses
8-buswidth then don't select MMC1.
I saw the SMDK board use this configuration. but just choose bandwidth 4 or 8.

Others good.

Thank you,
Kyungmin Park
> +
> +endmenu
> +
>  endif
> diff --git a/arch/arm/mach-s5pv310/Makefile b/arch/arm/mach-s5pv310/Makefile
> index aefb14f..c89b6b0 100644
> --- a/arch/arm/mach-s5pv310/Makefile
> +++ b/arch/arm/mach-s5pv310/Makefile
> @@ -29,3 +29,5 @@ obj-$(CONFIG_MACH_UNIVERSAL_C210)     += 
> mach-universal_c210.o
>
>  obj-$(CONFIG_S5PV310_SETUP_I2C1)       += setup-i2c1.o
>  obj-$(CONFIG_S5PV310_SETUP_I2C2)       += setup-i2c2.o
> +obj-$(CONFIG_S5PV310_SETUP_SDHCI)      += setup-sdhci.o
> +obj-$(CONFIG_S5PV310_SETUP_SDHCI_GPIO) += setup-sdhci-gpio.o
> diff --git a/arch/arm/mach-s5pv310/setup-sdhci-gpio.c 
> b/arch/arm/mach-s5pv310/setup-sdhci-gpio.c
> new file mode 100644
> index 000..8db8c81
> --- /dev/null
> +++ b/arch/arm/mach-s5pv310/setup-sdhci-gpio.c
> @@ -0,0 +1,156 @@
> +/* linux/arch/arm/mach-s5pv310/setup-sdhci-gpio.c
> + *
> + * Copyright (c) 2010 Samsung Electronics Co., Ltd.
> + *             http://www.samsung.com/
> + *
> + * S5PV310 - Helper functions for setting up SDHCI device(s) GPIO (HSMMC)
> + *
> + * 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 
> +
> +void s5pv310_setup_sdhci0_cfg_gpio(struct platform_device *dev, int width)
> +{
> +       struct s3c_sdhci_plat

Re: [PATCH 5/5] sdhci-s3c: Add support no internal clock divider in host controller

2010-09-16 Thread Kyungmin Park
Hi,

Well there are two implementations. and no conclusion yet.
as s5pc210 don't support internal SDHCI clock, DMC overrides the
function operation itself when s5pc210. System LSI use the quirks.

Choose any one from MMC maintainer.

Thank you,
Kyungmin Park

On Thu, Sep 16, 2010 at 5:37 PM, Jeongbae Seo  wrote:
> From: Hyuk Lee 
>
> This patch adds to support no internal clock divider in SDHCI.
> The external clock divider can be used to make a proper clock
> because SDHCI doesn't support internal clock divider by itself.
>
> Signed-off-by: Hyuk Lee 
> Signed-off-by: Jeongbae Seo 
> ---
>  drivers/mmc/host/sdhci-s3c.c |   63 
> ++
>  1 files changed, 63 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci-s3c.c b/drivers/mmc/host/sdhci-s3c.c
> index 71ad416..6160960 100644
> --- a/drivers/mmc/host/sdhci-s3c.c
> +++ b/drivers/mmc/host/sdhci-s3c.c
> @@ -96,6 +96,13 @@ static unsigned int sdhci_s3c_get_max_clk(struct 
> sdhci_host *host)
>        unsigned int rate, max;
>        int clk;
>
> +       /*
> +        * There is only one clock source(sclk) if there is no clock divider
> +        * in the host controller
> +        */
> +       if (host->quirks & SDHCI_QUIRK_NONSTANDARD_CLOCK)
> +               return clk_round_rate(ourhost->clk_bus[2], UINT_MAX);
No hard-coded index.
> +
>        /* note, a reset will reset the clock source */
>
>        sdhci_s3c_check_sclk(host);
> @@ -130,6 +137,15 @@ static unsigned int sdhci_s3c_consider_clock(struct 
> sdhci_s3c *ourhost,
>        if (!clksrc)
>                return UINT_MAX;
>
> +       /*
> +        * There is only one clock source(sclk) if there is no clock divider
> +        * in the host controller
> +        */
> +       if (ourhost->host->quirks & SDHCI_QUIRK_NONSTANDARD_CLOCK) {
> +               rate = clk_round_rate(clksrc, wanted);
> +               return wanted - rate;
> +       }
> +
>        rate = clk_get_rate(clksrc);
>
>        for (div = 1; div < 256; div *= 2) {
> @@ -159,6 +175,7 @@ static void sdhci_s3c_set_clock(struct sdhci_host *host, 
> unsigned int clock)
>        int best_src = 0;
>        int src;
>        u32 ctrl;
> +       unsigned int timeout;
>
>        /* don't bother if the clock is going off. */
>        if (clock == 0)
> @@ -204,6 +221,35 @@ static void sdhci_s3c_set_clock(struct sdhci_host *host, 
> unsigned int clock)
>                        (ourhost->pdata->cfg_card)(ourhost->pdev, host->ioaddr,
>                                                   &ios, NULL);
>        }
> +
> +       /*
> +        * There is only one clock source(sclk) if there is no clock divider
> +        * in the host controller
> +        */
> +       if (host->quirks & SDHCI_QUIRK_NONSTANDARD_CLOCK) {
> +               writew(0, host->ioaddr + SDHCI_CLOCK_CONTROL);
> +               clk_set_rate(ourhost->clk_bus[ourhost->cur_clk], clock);
> +
> +               writew(SDHCI_CLOCK_INT_EN, host->ioaddr + 
> SDHCI_CLOCK_CONTROL);
> +
> +               /* Wait max 20 ms */
> +               timeout = 20;
> +               while (!((sdhci_readw(host, SDHCI_CLOCK_CONTROL))
> +                       & SDHCI_CLOCK_INT_STABLE)) {
> +                       if (timeout == 0) {
> +                               printk(KERN_ERR "%s: clock never 
> stabilised.\n"
> +                                               , mmc_hostname(host->mmc));
> +                               return;
> +                       }
> +                       timeout--;
> +                       mdelay(1);
> +               }
> +
> +               writew(SDHCI_CLOCK_INT_EN | SDHCI_CLOCK_CARD_EN,
> +                               host->ioaddr + SDHCI_CLOCK_CONTROL);
> +
> +               host->clock = clock;
> +       }
>  }
>
>  /**
> @@ -221,6 +267,13 @@ static unsigned int sdhci_s3c_get_min_clock(struct 
> sdhci_host *host)
>        unsigned int delta, min = UINT_MAX;
>        int src;
>
> +       /*
> +        * There is only one clock source(sclk) if there is no clock divider
> +        * in the host controller
> +        */
> +       if (host->quirks & SDHCI_QUIRK_NONSTANDARD_CLOCK)
> +               return clk_round_rate(ourhost->clk_bus[2], 40);
ditto
> +
>        for (src = 0; src < MAX_BUS_CLK; src++) {
>                delta = sdhci_s3c_consider_clock(ourhost, src, 0);
>                if (delta == UINT_MAX)
> @@ -425,6 +478,16 @@ static int __devinit sdhci_s3c_probe(struct 
> platform_device *pdev)
>        /* HSMMC on Samsung SoCs uses SDCLK as timeout clock */
&

Re: [PATCH 0/5] ARM: S5PV210: Add support CPUFREQ for S5PV210/S5PC110

2010-09-15 Thread Kyungmin Park
First thank you for posting the patches.
but I'm worry about sending the same feature patches from different divisions.

I'm not sure you're talking with kgene. but there are some codes
posted by Mr. Ham and get feedback and reviewed with kgene.
http://git.infradead.org/users/kmpark/linux-2.6-samsung/shortlog/refs/heads/cpufreq

To kgene,
One code from DMC(me), another code from System LSI(you). then which
codes do you pick up and apply to mainline?
and what's rules or principles?

Thank you,
Kyungmin Park

On Wed, Sep 15, 2010 at 4:52 PM, Jaecheol Lee  wrote:
> This patch adds CPUFREQ for S5PV210/S5PC110.
>
> [PATCH 1/5] ARM: S5PV210: Add support DMC map_desc table
> [PATCH 2/5] ARM: S5PV210: Add struct clk_ops for clk_fout_apll
> [PATCH 3/5] ARM: S5PV210: Add Register definition for CMU
> [PATCH 4/5] ARM: S5PV210: Add support CPUFREQ
> [PATCH 5/5] ARM: S5PV210: Update Kconfig and Makefile for supporting CPUFREQ 
> driver
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" 
> in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v3] ARM: S5PV210: Add Power Management Support

2010-09-15 Thread Kyungmin Park
On Wed, Sep 15, 2010 at 5:33 PM, Sangbeom Kim  wrote:
> From: Jongpill Lee 
>
> This patch adds suspend-to-ram support for S5PV210.
> Note. This patch is confirmed on SMDKV210 and SMDKC110 board.
>
> Signed-off-by: Jongpill Lee 
> Signed-off-by: Sangbeom Kim 
> ---
> Changes since v2:
> 1. Fixed comments as per commnets from Ben Dooks
> 2. Removed backup and restore function for VIC 2 and 3
>
> Changes since v1:
> 1. Fixed comments as per comments from Ben Dooks
> 2. Removed redunt #if defined(CONFIG_PM)
> 3. Removed redunt including header files
> 4. Removed  and 
> 5. Moved 's5pv210_core_save' into machine directory
> 6. Moved sleep.S into machine directory for S5P SoCs compatibility
> 7. Added CF retension configuration when wake-up
>
>
>  arch/arm/mach-s5pv210/Kconfig                   |    6 +
>  arch/arm/mach-s5pv210/Makefile                  |    1 +
>  arch/arm/mach-s5pv210/include/mach/pm-core.h    |   43 ++
>  arch/arm/mach-s5pv210/include/mach/regs-clock.h |    7 +-
>  arch/arm/mach-s5pv210/mach-smdkc110.c           |    3 +
>  arch/arm/mach-s5pv210/mach-smdkv210.c           |    3 +
>  arch/arm/mach-s5pv210/pm.c                      |  166 ++
>  arch/arm/mach-s5pv210/sleep.S                   |  171 
> +++
>  arch/arm/plat-s5p/Makefile                      |    2 +
>  arch/arm/plat-s5p/include/plat/irqs.h           |    1 +
>  arch/arm/plat-s5p/irq-pm.c                      |   93 
>  arch/arm/plat-s5p/pm.c                          |   52 +++
>  arch/arm/plat-samsung/pm-gpio.c                 |    4 +-
>  13 files changed, 548 insertions(+), 4 deletions(-)
>  create mode 100644 arch/arm/mach-s5pv210/include/mach/pm-core.h
>  create mode 100644 arch/arm/mach-s5pv210/pm.c
>  create mode 100644 arch/arm/mach-s5pv210/sleep.S
>  create mode 100644 arch/arm/plat-s5p/irq-pm.c
>  create mode 100644 arch/arm/plat-s5p/pm.c
>
> diff --git a/arch/arm/mach-s5pv210/Kconfig b/arch/arm/mach-s5pv210/Kconfig
> index b46925b..6649170 100644
> --- a/arch/arm/mach-s5pv210/Kconfig
> +++ b/arch/arm/mach-s5pv210/Kconfig
> @@ -14,6 +14,7 @@ config CPU_S5PV210
>        select PLAT_S5P
>        select S3C_PL330_DMA
>        select S5P_EXT_INT
> +       select S5PV210_PM if PM
>        help
>          Enable S5PV210 CPU support
>
> @@ -138,4 +139,9 @@ config MACH_SMDKV210
>
>  endmenu
>
> +config S5PV210_PM
> +       bool
> +       help
> +         Power Management code common to S5PV210
> +
>  endif
> diff --git a/arch/arm/mach-s5pv210/Makefile b/arch/arm/mach-s5pv210/Makefile
> index 7045489..c63c162 100644
> --- a/arch/arm/mach-s5pv210/Makefile
> +++ b/arch/arm/mach-s5pv210/Makefile
> @@ -14,6 +14,7 @@ obj-                          :=
>
>  obj-$(CONFIG_CPU_S5PV210)      += cpu.o init.o clock.o dma.o gpiolib.o
>  obj-$(CONFIG_CPU_S5PV210)      += setup-i2c0.o
> +obj-$(CONFIG_S5PV210_PM)       += pm.o sleep.o
>
>  # machine support
>
> diff --git a/arch/arm/mach-s5pv210/include/mach/pm-core.h 
> b/arch/arm/mach-s5pv210/include/mach/pm-core.h
> new file mode 100644
> index 000..e8d394f
> --- /dev/null
> +++ b/arch/arm/mach-s5pv210/include/mach/pm-core.h
> @@ -0,0 +1,43 @@
> +/* linux/arch/arm/mach-s5pv210/include/mach/pm-core.h
> + *
> + * Copyright (c) 2010 Samsung Electronics Co., Ltd.
> + *             http://www.samsung.com
> + *
> + * Based on arch/arm/mach-s3c2410/include/mach/pm-core.h,
> + * Copyright 2008 Simtec Electronics
> + *      Ben Dooks 
> + *      http://armlinux.simtec.co.uk/
> + *
> + * S5PV210 - PM core support for arch/arm/plat-s5p/pm.c
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License version 2 as
> + * published by the Free Software Foundation.
> +*/
> +
> +static inline void s3c_pm_debug_init_uart(void)
> +{
> +       /* nothing here yet */
> +}
> +
> +static inline void s3c_pm_arch_prepare_irqs(void)
> +{
> +       __raw_writel(s3c_irqwake_intmask, S5P_WAKEUP_MASK);
> +       __raw_writel(s3c_irqwake_eintmask, S5P_EINT_WAKEUP_MASK);
> +}
> +
> +static inline void s3c_pm_arch_stop_clocks(void)
> +{
> +       /* nothing here yet */
> +}
> +
> +static inline void s3c_pm_arch_show_resume_irqs(void)
> +{
> +       /* nothing here yet */
> +}
> +
> +static inline void s3c_pm_arch_update_uart(void __iomem *regs,
> +                                          struct pm_uart_save *save)
> +{
> +       /* nothing here yet */
> +}
> diff --git a/arch/arm/mach-s5pv210/include/mach/regs-clock.h 
> b/arch/arm/mach-s5pv210/include/mach/regs-clock.h
> index 499aef7..929fd3a 100644
> --- a/arch/arm/mach-s5pv210/include/mach/regs-clock.h
> +++ b/arch/arm/mach-s5pv210/include/mach/regs-clock.h
> @@ -95,7 +95,7 @@
>  /* Registers related to power management */
>  #define S5P_PWR_CFG            S5P_CLKREG(0xC000)
>  #define S5P_EINT_WAKEUP_MASK   S5P_CLKREG(0xC004)
> -#define S5P_WAKEUP_MASK        S5P_CLKREG(0xC008)
> +#define S5P_WAKEUP_MASK                S5P_CLKRE

Re: [PATCH 3/3] ARM: S5PC210: Set the common L2 cache configurations

2010-09-14 Thread Kyungmin Park
On Tue, Sep 14, 2010 at 6:48 PM, Kukjin Kim  wrote:
> Kyungmin Park wrote:
>>
>> From: Kyungmin Park 
>>
>> S5PC210 has PL310 1MiB L2 cache.
>> It uses the optimized data & tag latency and also enable the prefetch.
>>
>> Signed-off-by: Kyungmin Park 
>> ---
>>  arch/arm/mach-s5pv310/cpu.c |   19 +++
>>  1 files changed, 19 insertions(+), 0 deletions(-)
>>
>> diff --git a/arch/arm/mach-s5pv310/cpu.c b/arch/arm/mach-s5pv310/cpu.c
>> index e5b261a..b50312e 100644
>> --- a/arch/arm/mach-s5pv310/cpu.c
>> +++ b/arch/arm/mach-s5pv310/cpu.c
>> @@ -15,6 +15,7 @@
>>  #include 
>>
>>  #include 
>> +#include 
>>
>>  #include 
>>  #include 
>> @@ -121,6 +122,24 @@ static int __init s5pv310_core_init(void)
>>
>>  core_initcall(s5pv310_core_init);
>>
>> +static int __init s5pv310_init_cache(void)
>> +{
>> +#ifdef CONFIG_CACHE_L2X0
>> +     void __iomem *p = S5P_VA_L2CC;
>> +
>> +     /* TAG,  Data latency control */
>> +     writel(0x110, p + L2X0_TAG_LATENCY_CTRL);
>
> Please use '__raw_writel' instead of 'writel' here...
why?
>
>> +     writel(0x110, p + L2X0_DATA_LATENCY_CTRL);
>> +
>> +     /* L2 cache prefetch control */
>> +     writel(0x6, p + L2X0_PREFETCH_CTRL);
>
> As I know, there is more suitable value which has been tested.
> It means should be changed...but now it is under testing.
I know but almost same effect. 0x3000'000x is set by at AUX_CTRL. and
0x7 is not fully tested.
I mean 0x3000'0006 and 0x6 is same.
>
>> +
>> +     l2x0_init(p, 0x3C070001, 0xC200);
>> +#endif
>> +     return 0;
>> +}
>> +early_initcall(s5pv310_init_cache);
>> +
>>  int __init s5pv310_init(void)
>>  {
>>       printk(KERN_INFO "S5PV310: Initializing architecture\n");
>> --
>
> Thanks.
>
> Best regards,
> Kgene.
> --
> Kukjin Kim , Senior Engineer,
> SW Solution Development Team, Samsung Electronics Co., Ltd.
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" 
> in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 4/6] ARM: S5PV210: Enable USB HSOTG gadget build

2010-09-10 Thread Kyungmin Park
Hi Kgene,

Actually IMHO these basic devices connected at AP are done by System
LSI. Anyway I hope you or your team implement SMDK board support fully
first. Now SMDK board is just placeholder and not much features.

My request is that these are supported on mainline at least.
1. Basic AP peripherals support. RTC, timer, and so on.
2. Suspend & wakeup,
3. clock & power gating.

I think these features are SoC specific and it's under
arch/arm/mach-samsung-soc. So no need to communicate with other
subsystem. just implement it and verified at your side.

I hope use the mainline kernel for our board.

Thank you,
Kyungmin Park

On Fri, Sep 10, 2010 at 7:33 PM, Kukjin Kim  wrote:
> Marek Szyprowski wrote:
>>
>> Add the necessary definitions and mapping information to enable the
>> s3c-hsotg gadget to build.
>>
>> Signed-off-by: Marek Szyprowski 
>> Signed-off-by: Kyungmin Park 
>> ---
>>  arch/arm/mach-s5pv210/cpu.c                   |    5 +
>>  arch/arm/mach-s5pv210/include/mach/map.h      |    6 ++
>>  arch/arm/mach-s5pv210/include/mach/regs-sys.h |   19
>> +++
>>  3 files changed, 30 insertions(+), 0 deletions(-)
>>  create mode 100644 arch/arm/mach-s5pv210/include/mach/regs-sys.h
>>
>> diff --git a/arch/arm/mach-s5pv210/cpu.c b/arch/arm/mach-s5pv210/cpu.c
>> index c551ab1..6183b55 100644
>> --- a/arch/arm/mach-s5pv210/cpu.c
>> +++ b/arch/arm/mach-s5pv210/cpu.c
>> @@ -84,6 +84,11 @@ static struct map_desc s5pv210_iodesc[] __initdata = {
>>               .pfn            = __phys_to_pfn(S5PV210_PA_SROMC),
>>               .length         = SZ_4K,
>>               .type           = MT_DEVICE,
>> +     }, {
>> +             .virtual        = (unsigned long)S3C_VA_USB_HSPHY,
>> +             .pfn            =__phys_to_pfn(S3C_PA_USB_HSPHY),
>
> It's better to use S5PV210_PA_HSPHY directly without re-mapping.
> Because don't need S3C_PA_USB_HSPHY except here.
>
>> +             .length         = SZ_4K,
>> +             .type           = MT_DEVICE,
>>       }
>>  };
>>
>> diff --git a/arch/arm/mach-s5pv210/include/mach/map.h b/arch/arm/mach-
>> s5pv210/include/mach/map.h
>> index bd9afd5..724a428 100644
>> --- a/arch/arm/mach-s5pv210/include/mach/map.h
>> +++ b/arch/arm/mach-s5pv210/include/mach/map.h
>> @@ -73,6 +73,9 @@
>>
>>  #define S5PV210_PA_HSMMC(x)  (0xEB00 + ((x) * 0x10))
>>
>> +#define S5PV210_PA_HSOTG     (0xEC00)
>> +#define S5PV210_PA_HSPHY     (0xEC10)
>> +
>>  #define S5PV210_PA_VIC0              (0xF200)
>>  #define S5PV210_PA_VIC1              (0xF210)
>>  #define S5PV210_PA_VIC2              (0xF220)
>> @@ -111,6 +114,9 @@
>>  #define S5P_PA_FIMC0         S5PV210_PA_FIMC0
>>  #define S5P_PA_FIMC1         S5PV210_PA_FIMC1
>>  #define S5P_PA_FIMC2         S5PV210_PA_FIMC2
>> +#define S3C_PA_USB_HSOTG     S5PV210_PA_HSOTG
>
> IMHO, would be better if we could define S3C_PA_XXX first than S5P_PA_XXX.
>
>> +#define S3C_PA_USB_HSPHY     S5PV210_PA_HSPHY
>
> As I said, no need re-mapping to S3C_PA_USB_HSPHY.
>
>> +#define S3C_VA_USB_HSPHY     S3C_ADDR(0x0200)
>>
> How about moving definition of VA_ to plat/map-s5p.h or plat/map-base.h?
> Yeah, I know in the case of s3c64xx, same address mapping is in mach/map.h.
>
>>  #define SAMSUNG_PA_ADC               S5PV210_PA_ADC
>>  #define SAMSUNG_PA_CFCON     S5PV210_PA_CFCON
>> diff --git a/arch/arm/mach-s5pv210/include/mach/regs-sys.h
> b/arch/arm/mach-
>> s5pv210/include/mach/regs-sys.h
>> new file mode 100644
>> index 000..26691d3
>> --- /dev/null
>> +++ b/arch/arm/mach-s5pv210/include/mach/regs-sys.h
>> @@ -0,0 +1,19 @@
>> +/* arch/arm/mach-s5pv210/include/mach/regs-sys.h
>> + *
>> + * Copyright (c) 2010 Samsung Electronics Co., Ltd.
>> + *           http://www.samsung.com/
>> + *
>> + * S5PV210 - System registers definitions
>> + *
>> + * 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.
>> +*/
>> +
>> +#define S5PV210_USB_PHY_CON  (S3C_VA_SYS + 0xE80C)
>> +#define S5PV210_USB_PHY0_EN  (1 << 0)
>> +#define S5PV210_USB_PHY1_EN  (1 << 1)
>> +
>> +/* compatibility defines for s3c-hsotg driver */
>> +#define S3C64XX_OTHERS               S5PV210_USB_PHY_CON
>> +#define S3C64XX_OTHERS_USBMASK       S5PV210_USB_PHY0_EN
>> --
>
> Others, 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
>
--
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] regulators: add support max8952 regulator

2010-09-07 Thread Kyungmin Park
Do you check the DVS feature?
It can support the DVS by GPIOs and platform can set the each voltages at
each mode.

As quick review of max8649. It can't support it.

Thank you,
Kyungmin Park

-Original Message-
From: Kukjin Kim [mailto:kgene@samsung.com] 
Sent: Wednesday, September 08, 2010 8:26 AM
To: linux-ker...@vger.kernel.org; linux-arm-ker...@lists.infradead.org;
linux-samsung-soc@vger.kernel.org
Cc: l...@slimlogic.co.uk; Changhwan Youn; Kukjin Kim; MyungJoo Ham; Kyungmin
Park
Subject: [PATCH v3] regulators: add support max8952 regulator

From: Changhwan Youn 

The operation of max8952 is almost similar to max8649 except the output
voltage range. This patch adds support the max8952 regulator using
current max8649 implementation. And removes separate max8952.[ch] files
since the functionality is now merged into this driver.

Signed-off-by: Changhwan Youn 
Signed-off-by: Kukjin Kim 
Cc: MyungJoo Ham 
Cc: Kyungmin Park 
Acked-by: Mark Brown 
---
Following is as per Mark Brown's suggestion.
Changes since v2:
- Removed separate max8952.[ch] files

Changes since v1:
- Added returning fail when detected wrong ID
- Added matching the ID from the chip in case the user got things wrong
- Added enum chip ID instead of 0, 1

 drivers/regulator/Kconfig |   12 +-
 drivers/regulator/Makefile|1 -
 drivers/regulator/max8649.c   |   55 +-
 drivers/regulator/max8952.c   |  360
-
 include/linux/regulator/max8952.h |  135 --
 5 files changed, 50 insertions(+), 513 deletions(-)
 delete mode 100644 drivers/regulator/max8952.c
 delete mode 100644 include/linux/regulator/max8952.h

diff --git a/drivers/regulator/Kconfig b/drivers/regulator/Kconfig
index 4889caa..fab9a90 100644
--- a/drivers/regulator/Kconfig
+++ b/drivers/regulator/Kconfig
@@ -81,10 +81,10 @@ config REGULATOR_MAX1586
  for PXA27x chips to control VCC_CORE and VCC_USIM voltages.
 
 config REGULATOR_MAX8649
-   tristate "Maxim 8649 voltage regulator"
+   tristate "Maxim 8649/8952 voltage regulator"
depends on I2C
help
- This driver controls a Maxim 8649 voltage output regulator via
+ This driver controls a Maxim 8649/8952 voltage output regulator
via
  I2C bus.
 
 config REGULATOR_MAX8660
@@ -100,14 +100,6 @@ config REGULATOR_MAX8925
help
  Say y here to support the voltage regulaltor of Maxim MAX8925
PMIC.
 
-config REGULATOR_MAX8952
-   tristate "Maxim MAX8952 Power Management IC"
-   depends on I2C
-   help
- This driver controls a Maxim 8952 voltage output regulator
- via I2C bus. Maxim 8952 has one voltage output and supports 4 DVS
- modes ranging from 0.77V to 1.40V by 0.01V steps.
-
 config REGULATOR_MAX8998
tristate "Maxim 8998 voltage regulator"
depends on MFD_MAX8998
diff --git a/drivers/regulator/Makefile b/drivers/regulator/Makefile
index beff6da..8285fd8 100644
--- a/drivers/regulator/Makefile
+++ b/drivers/regulator/Makefile
@@ -17,7 +17,6 @@ obj-$(CONFIG_REGULATOR_TWL4030) += twl-regulator.o
 obj-$(CONFIG_REGULATOR_MAX8649)+= max8649.o
 obj-$(CONFIG_REGULATOR_MAX8660) += max8660.o
 obj-$(CONFIG_REGULATOR_MAX8925) += max8925-regulator.o
-obj-$(CONFIG_REGULATOR_MAX8952) += max8952.o
 obj-$(CONFIG_REGULATOR_MAX8998) += max8998.o
 obj-$(CONFIG_REGULATOR_WM831X) += wm831x-dcdc.o
 obj-$(CONFIG_REGULATOR_WM831X) += wm831x-isink.o
diff --git a/drivers/regulator/max8649.c b/drivers/regulator/max8649.c
index 4520ace..7f61a3a 100644
--- a/drivers/regulator/max8649.c
+++ b/drivers/regulator/max8649.c
@@ -22,6 +22,9 @@
 #define MAX8649_DCDC_STEP  1   /* uV */
 #define MAX8649_VOL_MASK   0x3f
 
+/* difference between voltages of max8649 and max8952 */
+#define DIFF_MAX8952_DCDC_VOL  2   /* uV */
+
 /* Registers */
 #define MAX8649_MODE0  0x00
 #define MAX8649_MODE1  0x01
@@ -47,6 +50,11 @@
 #define MAX8649_RAMP_MASK  (7 << 5)
 #define MAX8649_RAMP_DOWN  (1 << 1)
 
+enum chips {
+   MAX8649 = 0x200a,
+   MAX8952 = 0x201a,
+};
+
 struct max8649_regulator_info {
struct regulator_dev*regulator;
struct i2c_client   *i2c;
@@ -54,6 +62,7 @@ struct max8649_regulator_info {
struct mutexio_lock;
 
int vol_reg;
+   int type;
unsignedmode:2; /* bit[1:0] = VID1, VID0 */
unsignedextclk_freq:2;
unsignedextclk:1;
@@ -138,7 +147,12 @@ static inline int check_range(int min_uV, int max_uV)
 
 static int max8649_list_voltage(struct regulator_dev *rdev, unsigned index)
 {
-   return (MAX8649_DCDC_VMIN + index * MAX8649_DCDC_STEP);
+   struct max8649_regulator_info *info = rdev_get_drvdata(rdev);
+   int ret = MAX8649_DCDC_VMIN + index * MAX8649_DCDC_STEP;
+
+   if (info->type == MAX8952)

Re: [PATCH 4/5] rtc: rtc-s3c: Fix on RTC initialization method

2010-09-07 Thread Kyungmin Park
On Tue, Sep 7, 2010 at 2:29 PM, Kukjin Kim  wrote:
> From: Changhwan Youn 
>
> This patch changes RTC initialization method on probe() as
> per Wan ZongShun's suggestion. The 'rtc_valid_tm(tm)' can
> check whether RTC BCD is valid or not.
>
> And should be changed the method of check because previous
> method cannot validate RTC BCD registers properly.
>
> Signed-off-by: Changhwan Youn 
> Signed-off-by: Kukjin Kim 
> Cc: Ben Dooks 
> Cc: Wan ZongShun 
> ---
>  drivers/rtc/rtc-s3c.c |   16 +++-
>  1 files changed, 11 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c
> index c078548..7f15073 100644
> --- a/drivers/rtc/rtc-s3c.c
> +++ b/drivers/rtc/rtc-s3c.c
> @@ -458,8 +458,8 @@ static int __devexit s3c_rtc_remove(struct 
> platform_device *dev)
>  static int __devinit s3c_rtc_probe(struct platform_device *pdev)
>  {
>        struct rtc_device *rtc;
> +       struct rtc_time rtc_tm;
>        struct resource *res;
> -       unsigned int tmp, i;
>        int ret;
>
>        pr_debug("%s: probe=%p\n", __func__, pdev);
> @@ -540,11 +540,17 @@ static int __devinit s3c_rtc_probe(struct 
> platform_device *pdev)
>
>        /* Check RTC Time */
>
> -       for (i = S3C2410_RTCSEC; i <= S3C2410_RTCYEAR; i += 0x4) {
> -               tmp = readb(s3c_rtc_base + i);
> +       s3c_rtc_gettime(NULL, &rtc_tm);
>
> -               if ((tmp & 0xf) > 0x9 || ((tmp >> 4) & 0xf) > 0x9)
> -                       writeb(0, s3c_rtc_base + i);
> +       if (rtc_valid_tm(&rtc_tm)) {
instead of !rtc_valid_tm(&rtc_tm) ???
> +               rtc_tm.tm_year  = 100;
> +               rtc_tm.tm_mon   = 0;
> +               rtc_tm.tm_mday  = 1;
> +               rtc_tm.tm_hour  = 0;
> +               rtc_tm.tm_min   = 0;
> +               rtc_tm.tm_sec   = 0;
> +
> +               s3c_rtc_settime(NULL, &rtc_tm);
>        }
>
>        if (s3c_rtc_cpu_type == TYPE_S3C64XX)
> --
> 1.6.2.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" 
> in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 12/13] ARM: S5P64X0: Add UART serial support for S5P6450

2010-09-01 Thread Kyungmin Park
On Wed, Sep 1, 2010 at 4:09 PM, Kukjin Kim  wrote:
> This patch adds UART serial port support for S5P6450 SoC.
> The S5P6450 has 6 UARTs, so adds resource of UART4 and UART5.
> And to fix membase which is in serial/samsung.c is from Ben Dooks.
>
> Signed-off-by: Kukjin Kim 
> Cc: Ben Dooks 
> ---
>  arch/arm/plat-s5p/dev-uart.c |   58 
> ++
>  drivers/serial/Kconfig       |    7 +++--
>  drivers/serial/samsung.c     |    2 +-
>  3 files changed, 63 insertions(+), 4 deletions(-)
>
> diff --git a/arch/arm/plat-s5p/dev-uart.c b/arch/arm/plat-s5p/dev-uart.c
> index a89331e..6a73428 100644
> --- a/arch/arm/plat-s5p/dev-uart.c
> +++ b/arch/arm/plat-s5p/dev-uart.c
> @@ -119,6 +119,56 @@ static struct resource s5p_uart3_resource[] = {
>  #endif
>  };
>
> +static struct resource s5p_uart4_resource[] = {
> +#if CONFIG_SERIAL_SAMSUNG_UARTS > 4
> +       [0] = {
> +               .start  = S5P_PA_UART4,
> +               .end    = S5P_PA_UART4 + S5P_SZ_UART,
> +               .flags  = IORESOURCE_MEM,
> +       },
> +       [1] = {
> +               .start  = IRQ_S5P_UART_RX4,
> +               .end    = IRQ_S5P_UART_RX4,
> +               .flags  = IORESOURCE_IRQ,
> +       },
> +       [2] = {
> +               .start  = IRQ_S5P_UART_TX4,
> +               .end    = IRQ_S5P_UART_TX4,
> +               .flags  = IORESOURCE_IRQ,
> +       },
> +       [3] = {
> +               .start  = IRQ_S5P_UART_ERR4,
> +               .end    = IRQ_S5P_UART_ERR4,
> +               .flags  = IORESOURCE_IRQ,
> +       },
> +#endif
> +};
> +
> +static struct resource s5p_uart5_resource[] = {
> +#if CONFIG_SERIAL_SAMSUNG_UARTS > 5
> +       [0] = {
> +               .start  = S5P_PA_UART5,
> +               .end    = S5P_PA_UART5 + S5P_SZ_UART,
> +               .flags  = IORESOURCE_MEM,
> +       },
> +       [1] = {
> +               .start  = IRQ_S5P_UART_RX5,
> +               .end    = IRQ_S5P_UART_RX5,
> +               .flags  = IORESOURCE_IRQ,
> +       },
> +       [2] = {
> +               .start  = IRQ_S5P_UART_TX5,
> +               .end    = IRQ_S5P_UART_TX5,
> +               .flags  = IORESOURCE_IRQ,
> +       },
> +       [3] = {
> +               .start  = IRQ_S5P_UART_ERR5,
> +               .end    = IRQ_S5P_UART_ERR5,
> +               .flags  = IORESOURCE_IRQ,
> +       },
> +#endif
> +};
> +
>  struct s3c24xx_uart_resources s5p_uart_resources[] __initdata = {
>        [0] = {
>                .resources      = s5p_uart0_resource,
> @@ -136,4 +186,12 @@ struct s3c24xx_uart_resources s5p_uart_resources[] 
> __initdata = {
>                .resources      = s5p_uart3_resource,
>                .nr_resources   = ARRAY_SIZE(s5p_uart3_resource),
>        },
> +       [4] = {
> +               .resources      = s5p_uart4_resource,
> +               .nr_resources   = ARRAY_SIZE(s5p_uart4_resource),
> +       },
> +       [5] = {
> +               .resources      = s5p_uart5_resource,
> +               .nr_resources   = ARRAY_SIZE(s5p_uart5_resource),
> +       },
>  };
> diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig
> index 12900f7..3198c53 100644
> --- a/drivers/serial/Kconfig
> +++ b/drivers/serial/Kconfig
> @@ -458,6 +458,7 @@ config SERIAL_SAMSUNG_UARTS
>        int
>        depends on ARM && PLAT_SAMSUNG
>        default 2 if ARCH_S3C2400
> +       default 6 if ARCH_S5P6450
>        default 4 if SERIAL_SAMSUNG_UARTS_4
>        default 3
>        help

How about to remove SERIAL_SAMSUNG_UARTS_4 and use the
SERIAL_SAMSUNG_UARTS only?

> @@ -526,12 +527,12 @@ config SERIAL_S3C24A0
>          Serial port support for the Samsung S3C24A0 SoC
>
>  config SERIAL_S3C6400
> -       tristate "Samsung S3C6400/S3C6410/S5P6440/S5PC100 Serial port support"
> -       depends on SERIAL_SAMSUNG && (CPU_S3C6400 || CPU_S3C6410 || 
> CPU_S5P6440 || CPU_S5PC100)
> +       tristate "Samsung S3C6400/S3C6410/S5P6440/S5P6450/S5PC100 Serial port 
> support"
> +       depends on SERIAL_SAMSUNG && (CPU_S3C6400 || CPU_S3C6410 || 
> CPU_S5P6440 || CPU_S5P6450 || CPU_S5PC100)
>        select SERIAL_SAMSUNG_UARTS_4
>        default y
>        help
> -         Serial port support for the Samsung S3C6400, S3C6410, S5P6440
> +         Serial port support for the Samsung S3C6400, S3C6410, S5P6440, 
> S5P6450
>          and S5PC100 SoCs
>
>  config SERIAL_S5PV210
> diff --git a/drivers/serial/samsung.c b/drivers/serial/samsung.c
> index b1156ba..7ac2bf5 100644
> --- a/drivers/serial/samsung.c
> +++ b/drivers/serial/samsung.c
> @@ -1101,7 +1101,7 @@ static int s3c24xx_serial_init_port(struct 
> s3c24xx_uart_port *ourport,
>        dbg("resource %p (%lx..%lx)\n", res, res->start, res->end);
>
>        port->mapbase = res->start;
> -       port->membase = S3C_VA_UART + res->start - (S3C_PA_UART & 0xfff0);
> +       port->membase = S3C_VA_UART + (res->start & 0xf);
>        ret = platform_get_irq(platdev, 0);
>        if (ret < 0)
>                port->irq = 0;
> --
> 1.6.2.5
>
> --
> To unsub

Re: [PATCH v2] MAX8952 PMIC Driver Initial Release

2010-09-01 Thread Kyungmin Park
On Wed, Sep 1, 2010 at 7:27 PM, Kukjin Kim  wrote:
> Kyungmin Park wrote:
>>
>> On Wed, Sep 1, 2010 at 6:44 PM, Kukjin Kim  wrote:
>> > Mark Brown wrote:
>> >>
>> >> On Wed, Sep 01, 2010 at 09:15:36AM +0900, Kukjin Kim wrote:
>> >>
>> >> > Seems almost same between the operation of max8649 and max8952 except
>> >> output
>> >> > voltage range.
>> >>
>> >> > How do you think that can support max8952 with small modifying
> max8649?
>> >>
>> >> Take a look at something like the WM831x drivers for how you can handle
>> >> multiple devices with one driver - you can register I2C IDs for
> multiple
>> >> devices and then select behaviour based on the name that was quoted.
>> >
>> > MM...but I'm not sure if I can submit other patch for max8952...
>> > Actually, Mr. Ham's max8952 code has been applied by Liam.
>> >
>> > Anyway, could you please see below patch?
>> > Basic functions are tested on the board...
>> >
>> >
>> > From: Changhwan Youn 
>> > ---
>> > diff --git a/drivers/regulator/max8649.c b/drivers/regulator/max8649.c
>> > index 4520ace..a13bf1d 100644
>> > --- a/drivers/regulator/max8649.c
>> > +++ b/drivers/regulator/max8649.c
>
> (snip)
>
>> > @@ -311,13 +323,13 @@ static int __devinit
> max8649_regulator_probe(struct
>> > i2c_client *client,
>> >                break;
>> >        }
>> >
>> > -       ret = max8649_reg_read(info->i2c, MAX8649_CHIP_ID1);
>> > +       ret = max8649_reg_read(info->i2c, MAX8649_CHIP_ID2);
>> Why do you read the ID2? original code read the ID1. With this change
>> don't brake the max8649?
>
> It's no problem, because it is used only in the following printout.
>
> And the reason of changing is that the CHIP_ID1 value of max8649 and max
> 8952 is same by 0x20.
> So cannot distinguish them. If change to CHIP_ID2, can separate them in the
> printout.
> (The CHIP_ID2 value of max 8649 is '0x0D', max8952 is '0x1A')

As your word, first check the ID1 to detect the 8649 and 8952 and read
ID2 again to distinguish it. But actually we pass the max8952 as
platform device, so don't need to read ID2.

Thank you,
Kyungmin Park
>
>> >        if (ret < 0) {
>> >                dev_err(info->dev, "Failed to detect ID of MAX8649:%d\n",
>> >                        ret);
>> >                goto out;
>> >        }
>> > -       dev_info(info->dev, "Detected MAX8649 (ID:%x)\n", ret);
>> > +       dev_info(info->dev, "Detected %s (ID:%x)\n", id->name, ret);
>> >
>> >        /* enable VID0 & VID1 */
>> >        max8649_set_bits(info->i2c, MAX8649_CONTROL, MAX8649_VID_MASK,
>> 0);
>> > @@ -354,7 +366,7 @@ static int __devinit max8649_regulator_probe(struct
>> > i2c_client *client,
>> >                goto out;
>> >        }
>> >
>> > -       dev_info(info->dev, "Max8649 regulator device is detected.\n");
>> > +       dev_info(info->dev, "%s regulator device is detected.\n",
> id->name);
>> >        return 0;
>> >  out:
>> >        kfree(info);
>> > @@ -376,6 +388,7 @@ static int __devexit max8649_regulator_remove(struct
>> > i2c_client *client)
>> >
>> >  static const struct i2c_device_id max8649_id[] = {
>> >        { "max8649", 0 },
>> > +       { "max8952", 0 },
>> >        { }
>> >  };
>> >  MODULE_DEVICE_TABLE(i2c, max8649_id);
>> > --
>> > 1.6.2.5
>> >
>> >
>
>
> Thanks.
>
> Best regards,
> Kgene.
> --
> Kukjin Kim , Senior Engineer,
> SW Solution Development Team, Samsung Electronics Co., Ltd.
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" 
> in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2] MAX8952 PMIC Driver Initial Release

2010-09-01 Thread Kyungmin Park
On Wed, Sep 1, 2010 at 6:44 PM, Kukjin Kim  wrote:
> Mark Brown wrote:
>>
>> On Wed, Sep 01, 2010 at 09:15:36AM +0900, Kukjin Kim wrote:
>>
>> > Seems almost same between the operation of max8649 and max8952 except
>> output
>> > voltage range.
>>
>> > How do you think that can support max8952 with small modifying max8649?
>>
>> Take a look at something like the WM831x drivers for how you can handle
>> multiple devices with one driver - you can register I2C IDs for multiple
>> devices and then select behaviour based on the name that was quoted.
>
> MM...but I'm not sure if I can submit other patch for max8952...
> Actually, Mr. Ham's max8952 code has been applied by Liam.
>
> Anyway, could you please see below patch?
> Basic functions are tested on the board...
>
>
> From: Changhwan Youn 
> ---
> diff --git a/drivers/regulator/max8649.c b/drivers/regulator/max8649.c
> index 4520ace..a13bf1d 100644
> --- a/drivers/regulator/max8649.c
> +++ b/drivers/regulator/max8649.c
> @@ -22,6 +22,9 @@
>  #define MAX8649_DCDC_STEP      1           /* uV */
>  #define MAX8649_VOL_MASK       0x3f
>
> +/* difference between voltages of max8649 and max8952 */
> +#define DIFF_DCDC_VOL          2           /* uV */
> +
>  /* Registers */
>  #define MAX8649_MODE0          0x00
>  #define MAX8649_MODE1          0x01
> @@ -138,7 +141,12 @@ static inline int check_range(int min_uV, int max_uV)
>
>  static int max8649_list_voltage(struct regulator_dev *rdev, unsigned index)
>  {
> -       return (MAX8649_DCDC_VMIN + index * MAX8649_DCDC_STEP);
> +       struct max8649_regulator_info *info = rdev_get_drvdata(rdev);
> +       int ret = MAX8649_DCDC_VMIN + index * MAX8649_DCDC_STEP;
> +
> +       if (!strcmp(info->i2c->name, "max8952"))
> +               ret += DIFF_DCDC_VOL;
> +       return ret;
>  }
>
>  static int max8649_get_voltage(struct regulator_dev *rdev)
> @@ -160,6 +168,11 @@ static int max8649_set_voltage(struct regulator_dev
> *rdev,
>        struct max8649_regulator_info *info = rdev_get_drvdata(rdev);
>        unsigned char data, mask;
>
> +       if (!strcmp(info->i2c->name, "max8952")) {
> +               min_uV -= DIFF_DCDC_VOL;
> +               max_uV -= DIFF_DCDC_VOL;
> +       }
> +
>        if (check_range(min_uV, max_uV)) {
>                dev_err(info->dev, "invalid voltage range (%d, %d) uV\n",
>                        min_uV, max_uV);
> @@ -263,7 +276,6 @@ static struct regulator_ops max8649_dcdc_ops = {
>        .enable_time    = max8649_enable_time,
>        .set_mode       = max8649_set_mode,
>        .get_mode       = max8649_get_mode,
> -
>  };
>
>  static struct regulator_desc dcdc_desc = {
> @@ -311,13 +323,13 @@ static int __devinit max8649_regulator_probe(struct
> i2c_client *client,
>                break;
>        }
>
> -       ret = max8649_reg_read(info->i2c, MAX8649_CHIP_ID1);
> +       ret = max8649_reg_read(info->i2c, MAX8649_CHIP_ID2);
Why do you read the ID2? original code read the ID1. With this change
don't brake the max8649?
>        if (ret < 0) {
>                dev_err(info->dev, "Failed to detect ID of MAX8649:%d\n",
>                        ret);
>                goto out;
>        }
> -       dev_info(info->dev, "Detected MAX8649 (ID:%x)\n", ret);
> +       dev_info(info->dev, "Detected %s (ID:%x)\n", id->name, ret);
>
>        /* enable VID0 & VID1 */
>        max8649_set_bits(info->i2c, MAX8649_CONTROL, MAX8649_VID_MASK, 0);
> @@ -354,7 +366,7 @@ static int __devinit max8649_regulator_probe(struct
> i2c_client *client,
>                goto out;
>        }
>
> -       dev_info(info->dev, "Max8649 regulator device is detected.\n");
> +       dev_info(info->dev, "%s regulator device is detected.\n", id->name);
>        return 0;
>  out:
>        kfree(info);
> @@ -376,6 +388,7 @@ static int __devexit max8649_regulator_remove(struct
> i2c_client *client)
>
>  static const struct i2c_device_id max8649_id[] = {
>        { "max8649", 0 },
> +       { "max8952", 0 },
>        { }
>  };
>  MODULE_DEVICE_TABLE(i2c, max8649_id);
> --
> 1.6.2.5
>
>
> Thanks.
>
> Best regards,
> Kgene.
> --
> Kukjin Kim , Senior Engineer,
> SW Solution Development Team, Samsung Electronics Co., Ltd.
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" 
> in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 11/13] ARM: S5P64X0: Move SMDK6440 board file and Add SMDK6450 board file

2010-09-01 Thread Kyungmin Park
On Wed, Sep 1, 2010 at 4:09 PM, Kukjin Kim  wrote:
> This patch moves smdk6440 board file from mach-s5p6440 into the new
> mach-s5p64x0 directory and adds smdk6450 board file.
>
> Signed-off-by: Kukjin Kim 
> ---
>  .../{mach-s5p6440 => mach-s5p64x0}/mach-smdk6440.c |   87 ++
>  arch/arm/mach-s5p64x0/mach-smdk6450.c              |  182 
> 
>  2 files changed, 234 insertions(+), 35 deletions(-)
>  rename arch/arm/{mach-s5p6440 => mach-s5p64x0}/mach-smdk6440.c (66%)
>  create mode 100644 arch/arm/mach-s5p64x0/mach-smdk6450.c
>
> diff --git a/arch/arm/mach-s5p6440/mach-smdk6440.c 
> b/arch/arm/mach-s5p64x0/mach-smdk6440.c
> similarity index 66%
> rename from arch/arm/mach-s5p6440/mach-smdk6440.c
> rename to arch/arm/mach-s5p64x0/mach-smdk6440.c
> index 9202aaa..28de0a5 100644
> --- a/arch/arm/mach-s5p6440/mach-smdk6440.c
> +++ b/arch/arm/mach-s5p64x0/mach-smdk6440.c
> @@ -1,7 +1,7 @@
> -/* linux/arch/arm/mach-s5p6440/mach-smdk6440.c
> +/* linux/arch/arm/mach-s5p64x0/mach-smdk6440.c
>  *
> - * Copyright (c) 2009 Samsung Electronics Co., Ltd.
> - *             http://www.samsung.com/
> + * Copyright (c) 2009-2010 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
> @@ -21,21 +21,22 @@
>  #include 
>  #include 
>  #include 
> +#include 
>
>  #include 
>  #include 
> +#include 
> +#include 
>
>  #include 
>  #include 
> -
> -#include 
> -#include 
> +#include 
> +#include 
>
>  #include 
> -
> +#include 
>  #include 
>  #include 
> -#include 
>  #include 
>  #include 
>  #include 
> @@ -58,43 +59,60 @@
>
>  static struct s3c2410_uartcfg smdk6440_uartcfgs[] __initdata = {
>        [0] = {
> -               .hwport      = 0,
> -               .flags       = 0,
> -               .ucon        = SMDK6440_UCON_DEFAULT,
> -               .ulcon       = SMDK6440_ULCON_DEFAULT,
> -               .ufcon       = SMDK6440_UFCON_DEFAULT,
> +               .hwport         = 0,
> +               .flags          = 0,
There's no place to use this flags, it's posted for long time. but you
don't listen it.
I hope delete it if not used.
> +               .ucon           = SMDK6440_UCON_DEFAULT,
> +               .ulcon          = SMDK6440_ULCON_DEFAULT,
> +               .ufcon          = SMDK6440_UFCON_DEFAULT,
>        },
>        [1] = {
> -               .hwport      = 1,
> -               .flags       = 0,
> -               .ucon        = SMDK6440_UCON_DEFAULT,
> -               .ulcon       = SMDK6440_ULCON_DEFAULT,
> -               .ufcon       = SMDK6440_UFCON_DEFAULT,
> +               .hwport         = 1,
> +               .flags          = 0,
> +               .ucon           = SMDK6440_UCON_DEFAULT,
> +               .ulcon          = SMDK6440_ULCON_DEFAULT,
> +               .ufcon          = SMDK6440_UFCON_DEFAULT,
>        },
>        [2] = {
> -               .hwport      = 2,
> -               .flags       = 0,
> -               .ucon        = SMDK6440_UCON_DEFAULT,
> -               .ulcon       = SMDK6440_ULCON_DEFAULT,
> -               .ufcon       = SMDK6440_UFCON_DEFAULT,
> +               .hwport         = 2,
> +               .flags          = 0,
> +               .ucon           = SMDK6440_UCON_DEFAULT,
> +               .ulcon          = SMDK6440_ULCON_DEFAULT,
> +               .ufcon          = SMDK6440_UFCON_DEFAULT,
>        },
>        [3] = {
> -               .hwport      = 3,
> -               .flags       = 0,
> -               .ucon        = SMDK6440_UCON_DEFAULT,
> -               .ulcon       = SMDK6440_ULCON_DEFAULT,
> -               .ufcon       = SMDK6440_UFCON_DEFAULT,
> +               .hwport         = 3,
> +               .flags          = 0,
> +               .ucon           = SMDK6440_UCON_DEFAULT,
> +               .ulcon          = SMDK6440_ULCON_DEFAULT,
> +               .ufcon          = SMDK6440_UFCON_DEFAULT,
>        },
>  };
>
>  static struct platform_device *smdk6440_devices[] __initdata = {
> -       &s5p6440_device_iis,
>        &s3c_device_adc,
>        &s3c_device_rtc,
>        &s3c_device_i2c0,
>        &s3c_device_i2c1,
>        &s3c_device_ts,
>        &s3c_device_wdt,
> +       &s5p6440_device_iis,
> +};
> +
> +static struct s3c2410_platform_i2c s5p6440_i2c0_data __initdata = {
> +       .flags          = 0,
> +       .slave_addr     = 0x10,
> +       .frequency      = 100*1000,
> +       .sda_delay      = 100,
> +       .cfg_gpio       = s5p6440_i2c0_cfg_gpio,
> +};
> +
> +static struct s3c2410_platform_i2c s5p6440_i2c1_data __initdata = {
> +       .flags          = 0,
> +       .bus_num        = 1,
> +       .slave_addr     = 0x10,
> +       .frequency      = 100*1000,
> +       .sda_delay      = 100,
> +       .cfg_gpio       = s5p6440_i2c1_cfg_gpio,
>  };
>
>  static struct i2c_board_info smdk6440_i2c_devs0[] __initdata = {
> @@ -113,7 +131,7 @@ static struct s3c241

Re: [PATCH 02/13] ARM: S5P64X0: Update Kconfig and Makefile

2010-09-01 Thread Kyungmin Park
> -       help
> -         Machine support for the Samsung SMDK6440
> -
> -endif
> diff --git a/arch/arm/mach-s5p6440/Makefile b/arch/arm/mach-s5p6440/Makefile
> deleted file mode 100644
> index c3fe4d3..000
> --- a/arch/arm/mach-s5p6440/Makefile
> +++ /dev/null
> @@ -1,25 +0,0 @@
> -# arch/arm/mach-s5p6440/Makefile
> -#
> -# Copyright (c) 2009 Samsung Electronics Co., Ltd.
> -#              http://www.samsung.com/
> -#
> -# Licensed under GPLv2
> -
> -obj-y                          :=
> -obj-m                          :=
> -obj-n                          :=
> -obj-                           :=
> -
> -# Core support for S5P6440 system
> -
> -obj-$(CONFIG_CPU_S5P6440)      += cpu.o init.o clock.o gpio.o dma.o
> -obj-$(CONFIG_CPU_S5P6440)      += setup-i2c0.o
> -
> -# machine support
> -
> -obj-$(CONFIG_MACH_SMDK6440)    += mach-smdk6440.o
> -
> -# device support
> -obj-y                          += dev-audio.o
> -obj-$(CONFIG_S3C64XX_DEV_SPI)  += dev-spi.o
> -obj-$(CONFIG_S5P6440_SETUP_I2C1)       += setup-i2c1.o
> diff --git a/arch/arm/mach-s5p64x0/Kconfig b/arch/arm/mach-s5p64x0/Kconfig
> new file mode 100644
> index 000..488375c
> --- /dev/null
> +++ b/arch/arm/mach-s5p64x0/Kconfig
> @@ -0,0 +1,55 @@
> +# arch/arm/mach-s5p64x0/Kconfig
> +#
> +# Copyright (c) 2009-2010 Samsung Electronics Co., Ltd.
> +#              http://www.samsung.com/
> +#
> +# Licensed under GPLv2
> +
> +if ARCH_S5P64X0
> +
> +config CPU_S5P6440
> +       bool
> +       select PLAT_S5P
> +       select S3C_PL330_DMA
> +       help
> +         Enable S5P6440 CPU support
> +
> +config CPU_S5P6450
> +       bool
> +       select PLAT_S5P
> +       select S3C_PL330_DMA
> +       help
> +         Enable S5P6450 CPU support
> +
> +config S5P64X0_SETUP_I2C1
> +       bool
> +       help
> +         Common setup code for i2c bus 1.
> +
> +# machine support
> +
> +config MACH_SMDK6440
> +       bool "SMDK6440"
> +       select CPU_S5P6440
> +       select S3C_DEV_I2C1
> +       select S3C_DEV_RTC
> +       select S3C_DEV_WDT
> +       select SAMSUNG_DEV_ADC
> +       select SAMSUNG_DEV_TS
> +       select S5P64X0_SETUP_I2C1
> +       help
> +         Machine support for the Samsung SMDK6440
> +
> +config MACH_SMDK6450
> +       bool "SMDK6450"
> +       select CPU_S5P6450
> +       select S3C_DEV_I2C1
> +       select S3C_DEV_RTC
> +       select S3C_DEV_WDT
> +       select SAMSUNG_DEV_ADC
> +       select SAMSUNG_DEV_TS
> +       select S5P64X0_SETUP_I2C1
> +       help
> +         Machine support for the Samsung SMDK6450

In most case SMDK has almost same functionality. make a common select
e.g., SMDK_COMMON and each board just select it.
> +
> +endif
> diff --git a/arch/arm/mach-s5p64x0/Makefile b/arch/arm/mach-s5p64x0/Makefile
> new file mode 100644
> index 000..2655829
> --- /dev/null
> +++ b/arch/arm/mach-s5p64x0/Makefile
> @@ -0,0 +1,30 @@
> +# arch/arm/mach-s5p64x0/Makefile
> +#
> +# Copyright (c) 2009-2010 Samsung Electronics Co., Ltd.
> +#              http://www.samsung.com
> +#
> +# Licensed under GPLv2
> +
> +obj-y                          :=
> +obj-m                          :=
> +obj-n                          :=
> +obj-                           :=
> +
> +# Core support for S5P64X0 system
> +
> +obj-$(CONFIG_ARCH_S5P64X0)     += cpu.o init.o clock.o dma.o
> +obj-$(CONFIG_ARCH_S5P64X0)     += setup-i2c0.o
> +obj-$(CONFIG_CPU_S5P6440)      += clock-s5p6440.o gpio.o
> +obj-$(CONFIG_CPU_S5P6450)      += clock-s5p6450.o
> +
> +# machine support
> +
> +obj-$(CONFIG_MACH_SMDK6440)    += mach-smdk6440.o
> +obj-$(CONFIG_MACH_SMDK6450)    += mach-smdk6450.o
Are there difference between smdk6440 and smdk6450 except the SOC?
If no, how about to make a single file as pxa or omap does?

Thank you,
Kyungmin Park
> +
> +# device support
> +
> +obj-y                          += dev-audio.o
> +obj-$(CONFIG_S3C64XX_DEV_SPI)  += dev-spi.o
> +
> +obj-$(CONFIG_S5P64X0_SETUP_I2C1)       += setup-i2c1.o
> diff --git a/arch/arm/mach-s5p6440/Makefile.boot 
> b/arch/arm/mach-s5p64x0/Makefile.boot
> similarity index 100%
> rename from arch/arm/mach-s5p6440/Makefile.boot
> rename to arch/arm/mach-s5p64x0/Makefile.boot
> diff --git a/arch/arm/plat-s5p/Kconfig b/arch/arm/plat-s5p/Kconfig
> index c6a855d..90f97d6 100644
> --- a/arch/arm/plat-s5p/Kconfig
> +++ b/arch/arm/plat-s5p/Kconfig
> @@ -7,7 +7,7 @@
>
>  config PLAT_S5P
>        bool
> -       depends on (ARCH_S5P6440 || ARCH_S5P6442 || ARCH_S5PC100 || 
> ARCH_S5PV210 || ARCH_S5PV310)
> +       depends on (ARCH_S5P64X0 || ARCH_S5P6442 || ARCH_S5PC100 || 
> ARCH_S5PV210 || ARCH_S5PV310)
>        default y
>        select ARM_VIC if !ARCH_S5PV310
>        select ARM_GIC if ARCH_S5PV310
> @@ -30,7 +30,7 @@ config S5P_EXT_INT
>        bool
>        help
>          Use the external interrupts (other than GPIO interrupts.)
> -         Note: Do not choose this for S5P6440.
> +         Note: Do not choose this for S5P6440 and S5P6450.
>
>  config S5P_DEV_FIMC0
>        bool
> --
> 1.6.2.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" 
> in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 01/13] ARM: S5P: Moves initial map for merging S5P64X0

2010-09-01 Thread Kyungmin Park
For long time you insist to use the S5P prefix, but it's changed to
each SoC name.
anyway good move.

On Wed, Sep 1, 2010 at 4:09 PM, Kukjin Kim  wrote:
> This patch moves some initial maps from plat-s5p to machine,
> so that can merge mach-s5p6440 and mach-s5p6450.
>
> Signed-off-by: Kukjin Kim 
> ---
>  arch/arm/mach-s5p6440/cpu.c              |   37 ++---
>  arch/arm/mach-s5p6440/include/mach/map.h |    7 +-
>  arch/arm/mach-s5p6442/cpu.c              |   27 +++--
>  arch/arm/mach-s5p6442/include/mach/map.h |    6 -
>  arch/arm/mach-s5pc100/cpu.c              |   25 +++-
>  arch/arm/mach-s5pc100/include/mach/map.h |   11 +++-
>  arch/arm/mach-s5pv210/cpu.c              |   22 +-
>  arch/arm/mach-s5pv210/include/mach/map.h |    8 --
>  arch/arm/mach-s5pv310/cpu.c              |   26 ++--
>  arch/arm/plat-s5p/cpu.c                  |   22 -
>  10 files changed, 125 insertions(+), 66 deletions(-)
>
> diff --git a/arch/arm/mach-s5p6440/cpu.c b/arch/arm/mach-s5p6440/cpu.c
> index 526f33a..a3c33d9 100644
> --- a/arch/arm/mach-s5p6440/cpu.c
> +++ b/arch/arm/mach-s5p6440/cpu.c
> @@ -1,7 +1,7 @@
>  /* linux/arch/arm/mach-s5p6440/cpu.c
>  *
> - * Copyright (c) 2009 Samsung Electronics Co., Ltd.
> - *             http://www.samsung.com/
> + * Copyright (c) 2009-2010 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
> @@ -39,6 +39,32 @@
>  #include 
>  #include 
>
> +/* Initial IO mappings */
> +
> +static struct map_desc s5p6440_iodesc[] __initdata = {
> +       {
> +               .virtual        = (unsigned long)S5P_VA_GPIO,
> +               .pfn            = __phys_to_pfn(S5P6440_PA_GPIO),
> +               .length         = SZ_4K,
> +               .type           = MT_DEVICE,
> +       }, {
> +               .virtual        = (unsigned long)VA_VIC0,
> +               .pfn            = __phys_to_pfn(S5P6440_PA_VIC0),
> +               .length         = SZ_16K,
> +               .type           = MT_DEVICE,
> +       }, {
> +               .virtual        = (unsigned long)VA_VIC1,
> +               .pfn            = __phys_to_pfn(S5P6440_PA_VIC1),
> +               .length         = SZ_16K,
> +               .type           = MT_DEVICE,
> +       }, {
> +               .virtual        = (unsigned long)S3C_VA_UART,
> +               .pfn            = __phys_to_pfn(S3C_PA_UART),
> +               .length         = SZ_512K,

Yes it's just move to each SoCs. but It's too big some SoCs which has
0x400 offset. I think 8K is enough to cover uart.
> +               .type           = MT_DEVICE,
> +       }
> +};
> +
>  static void s5p6440_idle(void)
>  {
>        unsigned long val;
> @@ -54,15 +80,18 @@ static void s5p6440_idle(void)
>        local_irq_enable();
>  }
>
> -/* s5p6440_map_io
> +/*
> + * s5p6440_map_io
>  *
>  * register the standard cpu IO areas
> -*/
> + */
>
>  void __init s5p6440_map_io(void)
>  {
>        /* initialize any device information early */
>        s3c_adc_setname("s3c64xx-adc");
> +
> +       iotable_init(s5p6440_iodesc, ARRAY_SIZE(s5p6440_iodesc));
>  }
>
>  void __init s5p6440_init_clocks(int xtal)
> diff --git a/arch/arm/mach-s5p6440/include/mach/map.h 
> b/arch/arm/mach-s5p6440/include/mach/map.h
> index 6cc5cbc..11d31fe 100644
> --- a/arch/arm/mach-s5p6440/include/mach/map.h
> +++ b/arch/arm/mach-s5p6440/include/mach/map.h
> @@ -24,23 +24,18 @@
>  #define S5P_PA_SYSCON          S5P6440_PA_SYSCON
>
>  #define S5P6440_PA_GPIO                (0xE0308000)
> -#define S5P_PA_GPIO            S5P6440_PA_GPIO
>
>  #define S5P6440_PA_VIC0                (0xE400)
> -#define S5P_PA_VIC0            S5P6440_PA_VIC0
> +#define S5P6440_PA_VIC1                (0xE410)
>
>  #define S5P6440_PA_PDMA                0xE900
>
> -#define S5P6440_PA_VIC1                (0xE410)
> -#define S5P_PA_VIC1            S5P6440_PA_VIC1
> -
>  #define S5P6440_PA_TIMER       (0xEA00)
>  #define S5P_PA_TIMER           S5P6440_PA_TIMER
>
>  #define S5P6440_PA_RTC         (0xEA10)
>
>  #define S5P6440_PA_WDT         (0xEA20)
> -#define S5P_PA_WDT             S5P6440_PA_WDT
>
>  #define S5P6440_PA_UART                (0xEC00)
>
> diff --git a/arch/arm/mach-s5p6442/cpu.c b/arch/arm/mach-s5p6442/cpu.c
> index a48fb55..d3ab268 100644
> --- a/arch/arm/mach-s5p6442/cpu.c
> +++ b/arch/arm/mach-s5p6442/cpu.c
> @@ -1,7 +1,7 @@
>  /* linux/arch/arm/mach-s5p6442/cpu.c
>  *
>  * Copyright (c) 2010 Samsung Electronics Co., Ltd.
> - *             http://www.samsung.com/
> + *             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
> @@ -47,10 +47,30 @@ static struct map_desc s5p6442_iodesc[] 

Re: [GIT PULL] Samsung fixes for 2.6.36-rc3

2010-08-27 Thread Kyungmin Park
On Fri, Aug 27, 2010 at 6:48 PM, Kukjin Kim  wrote:
> Hi Linus,
>
> Please pull Samsung fixes from:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung.git
> s5p-fixes-for-linus
>
> These things are for bug fix on 2.6.36-rc3.
> If any problems, please let me know.

Well nothing changed. only LSI codes and required things from LSI side
are merged.
And still need more patches for booting at s5pc210 (aka s5pv310).

Several thins are missed.
1. gpio_to_irq patch not included. it's basic gpiolib feature. Without
this patch, it can't use the generic gpiolib based drivers. e.g.,
gpio-keys.
http://marc.info/?l=linux-arm-kernel&m=128202435823832&w=2

2. Wrong UART level triggers.
At least s5pc110/s5pc210 has wrong UART trigger values compare to macro name.
http://marc.info/?l=linux-arm-kernel&m=128218476209330&w=2

3. set correct gpio config at GPIO I at s5pc110
http://marc.info/?l=linux-arm-kernel&m=128202423923745&w=2


>
> Thanks.
>
> Best regards,
> Kgene.
> --
> Kukjin Kim , Senior Engineer,
> SW Solution Development Team, Samsung Electronics Co., Ltd.
>
>
> The following changes since commit 76be97c1fc945db08aae1f1b746012662d643e97:
>
>  Linux 2.6.36-rc2 (2010-08-22 17:43:29 -0700)
>
> are available in the git repository at:
>   git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung.git
> s5p-fixes-for-linus
>
> Changhwan Youn (1):
>      ARM: S5PV310: Fix on Secondary CPU startup
>
> Jongpill Lee (4):
>      ARM: S5PV310: Fix on PLL setting for S5PV310
>      ARM: S5PV310: Should be clk_sclk_apll not clk_mout_apll
>      ARM: S5PV310: Fix missed uart clocks
>      ARM: S5PV310: Bug fix on uclk1 and sclk_pwm
>
> Kukjin Kim (4):
>      ARM: SAMSUNG: Fix on build warning regarding VMALLOC_END type
>      ARM: S5PV310: Fix on default ZRELADDR of ARCH_S5PV310
>      ARM: S5PV310: Fix on typo irqs.h of S5PV310
>      ARM: S5PV310: Add CMU block for S5PV310 Clock
>
> Kyungmin Park (2):
>      ARM: S5P: VMALLOC_END should be unsigned long
>      ARM: S5PV310: Fix on GPIO base addresses
>
>  arch/arm/Kconfig                                |    3 +-
>  arch/arm/mach-s3c2410/include/mach/vmalloc.h    |    2 +-
>  arch/arm/mach-s3c64xx/include/mach/vmalloc.h    |    2 +-
>  arch/arm/mach-s5p6440/include/mach/vmalloc.h    |    2 +-
>  arch/arm/mach-s5p6442/include/mach/vmalloc.h    |    2 +-
>  arch/arm/mach-s5pv210/include/mach/vmalloc.h    |    2 +-
>  arch/arm/mach-s5pv310/clock.c                   |   82
> +-
>  arch/arm/mach-s5pv310/cpu.c                     |   10 +++
>  arch/arm/mach-s5pv310/include/mach/irqs.h       |   11 ++-
>  arch/arm/mach-s5pv310/include/mach/map.h        |   16 -
>  arch/arm/mach-s5pv310/include/mach/regs-clock.h |   59 
>  arch/arm/mach-s5pv310/include/mach/vmalloc.h    |    2 +-
>  arch/arm/mach-s5pv310/platsmp.c                 |    2 +-
>  arch/arm/plat-s5p/include/plat/map-s5p.h        |    2 +
>  14 files changed, 135 insertions(+), 62 deletions(-)
>
>
> ___
> linux-arm-kernel mailing list
> linux-arm-ker...@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>
--
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 RE-SEND] ARM: S5P: Move OneNAND device definitions in plat-s5p

2010-08-22 Thread Kyungmin Park
On Mon, Aug 23, 2010 at 11:35 AM, Kukjin Kim  wrote:
> Kyungmin Park wrote:
>>
>> " Note: S5PC110 and S5PC210 have same OneNAND driver."
>>
>> Yes I also think it's same device. At least Spec is same. But I heard it
> has
>> some different feature related with DMA operation.
>> I'm not yet receive the official release from LSI. So I can't tell the
> exact
>> one.
>>
>> If it's true. we need to separate it if required.
>>
> No need to separate this stuff.
> It means that no problem to use this commonly for S5PC110 and S5PC210.
As DMA operation is changed, we need to register onenand device
separately like s5pc210-onenand.
to use the different read operations.

>
> But...I will check it again before applying.
>
>> Thank you,
>> Kyungmin Park
>>
>> -Original Message-
>> From: Kukjin Kim [mailto:kgene@samsung.com]
>> Sent: Monday, August 23, 2010 9:07 AM
>> To: linux-arm-ker...@lists.infradead.org;
> linux-samsung-soc@vger.kernel.org
>> Cc: ben-li...@fluff.org; Kukjin Kim; Kyungmin Park
>> Subject: [PATCH RE-SEND] ARM: S5P: Move OneNAND device definitions in
>> plat-s5p
>>
>> This patch moves OneNAND device definitions from mach-s5pv210 to plat-s5p
>> so that can support it commonly.
>>
>> Note: S5PC110 and S5PC210 have same OneNAND driver.
>>
>> Signed-off-by: Kukjin Kim 
>> Cc: Kyungmin Park 
>> ---
>>  arch/arm/mach-s5pv210/Kconfig                     |    9 +-
>>  arch/arm/mach-s5pv210/Makefile                    |    1 -
>>  arch/arm/mach-s5pv210/include/mach/map.h          |    3 ++
>>  arch/arm/mach-s5pv210/mach-aquila.c               |    2 +-
>>  arch/arm/mach-s5pv210/mach-goni.c                 |    2 +-
>>  arch/arm/mach-s5pv310/include/mach/irqs.h         |    2 +
>>  arch/arm/mach-s5pv310/include/mach/map.h          |    6 
>>  arch/arm/plat-s5p/Kconfig                         |    5 +++
>>  arch/arm/plat-s5p/Makefile                        |    1 +
>>  arch/arm/{mach-s5pv210 => plat-s5p}/dev-onenand.c |   28
>> +++-
>>  arch/arm/plat-samsung/include/plat/devs.h         |    2 +-
>>  11 files changed, 37 insertions(+), 24 deletions(-)
>>  rename arch/arm/{mach-s5pv210 => plat-s5p}/dev-onenand.c (59%)
>>
>> diff --git a/arch/arm/mach-s5pv210/Kconfig b/arch/arm/mach-s5pv210/Kconfig
>> index d3a3895..5315fec 100644
>> --- a/arch/arm/mach-s5pv210/Kconfig
>> +++ b/arch/arm/mach-s5pv210/Kconfig
>> @@ -53,11 +53,6 @@ config S5PV210_SETUP_SDHCI_GPIO
>>       help
>>         Common setup code for SDHCI gpio.
>>
>> -config S5PC110_DEV_ONENAND
>> -     bool
>> -     help
>> -       Compile in platform device definition for OneNAND1 controller
>> -
>>  menu "S5PC110 Machines"
>>
>>  config MACH_AQUILA
>> @@ -71,7 +66,7 @@ config MACH_AQUILA
>>       select S3C_DEV_HSMMC
>>       select S3C_DEV_HSMMC1
>>       select S3C_DEV_HSMMC2
>> -     select S5PC110_DEV_ONENAND
>> +     select S5P_DEV_ONENAND
>>       select S5PV210_SETUP_FB_24BPP
>>       select S5PV210_SETUP_SDHCI
>>       help
>> @@ -88,7 +83,7 @@ config MACH_GONI
>>       select S3C_DEV_HSMMC
>>       select S3C_DEV_HSMMC1
>>       select S3C_DEV_HSMMC2
>> -     select S5PC110_DEV_ONENAND
>> +     select S5P_DEV_ONENAND
>>       select S5PV210_SETUP_FB_24BPP
>>       select S5PV210_SETUP_SDHCI
>>       help
>> diff --git a/arch/arm/mach-s5pv210/Makefile
> b/arch/arm/mach-s5pv210/Makefile
>> index 05048c5..7045489 100644
>> --- a/arch/arm/mach-s5pv210/Makefile
>> +++ b/arch/arm/mach-s5pv210/Makefile
>> @@ -26,7 +26,6 @@ obj-$(CONFIG_MACH_GONI)             += mach-goni.o
>>
>>  obj-y                                += dev-audio.o
>>  obj-$(CONFIG_S3C64XX_DEV_SPI)        += dev-spi.o
>> -obj-$(CONFIG_S5PC110_DEV_ONENAND) += dev-onenand.o
>>
>>  obj-$(CONFIG_S5PV210_SETUP_FB_24BPP) += setup-fb-24bpp.o
>>  obj-$(CONFIG_S5PV210_SETUP_I2C1)     += setup-i2c1.o
>> diff --git a/arch/arm/mach-s5pv210/include/mach/map.h
>> b/arch/arm/mach-s5pv210/include/mach/map.h
>> index dd4fb6b..aa19d2f 100644
>> --- a/arch/arm/mach-s5pv210/include/mach/map.h
>> +++ b/arch/arm/mach-s5pv210/include/mach/map.h
>> @@ -17,7 +17,10 @@
>>  #include 
>>
>>  #define S5PC110_PA_ONENAND   (0xB000)
>> +#define S5P_PA_ONENAND               S5PC110_PA_ONENAND
>> +
>>  #define S5PC110_PA_ONENAND_DMA       (0xB060)
>> +#define S5P_PA_ONENAND_DMA   S5PC110_PA_ON

Re: [PATCH 2/3] ARM: S5P: Add initial map for GPIO2 and GPIO3

2010-08-22 Thread Kyungmin Park
On Mon, Aug 23, 2010 at 11:15 AM, Kukjin Kim  wrote:
> Kyungmin Park wrote:
>>
>> On Mon, Aug 23, 2010 at 9:18 AM, Kukjin Kim  wrote:
>> > Kyungmin Park wrote:
>> >>
>> >> NAK.
>> >>
>> > I don't know why I need your ack for this...if any opinions, just
> comments
>> > is enough.
>>
>> Okay I said in other word, I can't agree this patch.
>>
>> >
>> >> This approach don't make a common GPIO framework. I already send the
>> >> common GPIO framework which send the base address to GPIO framework
>> >> and handle it regradless GPIO is one or three.
>> >>
>> > I don't think that your that RFC GPIO patch is common GPIO framework.
>> >
>> >>
>> >
> http://lists.infradead.org/pipermail/linux-arm-kernel/2010-August/022513.htm
>> > l
>> >>
>> >> With this patch, we can use the common GPIO framework and remove the
>> >> VA_GPIO dependency.
>> >>
>> > Why do you think your patch is common?
>>
>> In another patch, you just write the driver strength with
>> readl/writel. even though gpiolib already has interface,
>> s5p_gpio_set_drvstr
>>
> I missed gpio driver strength driver. Will fix it.
> But this issue is not regarding gpio driver strength.
>
>> and how to you implement the gpio_to_irq at both GPIO and EINT?
>>
> Will sort it out.
>
>> The "common" means GPIO related function should use the gpiolib
>> functions only. No direct access.
>>
> It means don't need to use your previous patch which is just RFC regarding
> removing VA_GPIO.
and make it for multiple GPIOs such as s5pc210. also make it simple
for GPIOs and EINT.
It's also cover the gpio_to_irq to use the similar scheme either GPIOs or EINT.

>
>> If your patch match these criteria then I'll ack your patch.
>>
> Hmm...
>
>> All
>> >
>> >> Thank you,
>> >> Kyungmin Park
>> >>
>> >> On Fri, Aug 20, 2010 at 9:33 PM, Kukjin Kim 
> wrote:
>> >> > From: Jongpill Lee 
>> >> >
>> >> > This patch adds initial map for GPIO2 and GPIO3.
>> >> > S5PV310/S5PC210 has separated GPIO1, GPIO2 and GPIO3.
>> >> >
>> >> > Signed-off-by: Jongpill Lee 
>> >> > Signed-off-by: Kukjin Kim 
>> >> > ---
>> >> >  arch/arm/mach-s5pv310/cpu.c              |   10 ++
>> >> >  arch/arm/plat-s5p/include/plat/map-s5p.h |    2 ++
>> >> >  2 files changed, 12 insertions(+), 0 deletions(-)
>> >> >
>> >> > diff --git a/arch/arm/mach-s5pv310/cpu.c
> b/arch/arm/mach-s5pv310/cpu.c
>> >> > index 196c9f1..db4f55a 100644
>> >> > --- a/arch/arm/mach-s5pv310/cpu.c
>> >> > +++ b/arch/arm/mach-s5pv310/cpu.c
>> >> > @@ -45,6 +45,16 @@ static struct map_desc s5pv310_iodesc[] __initdata
> =
>> > {
>> >> >                .pfn            = __phys_to_pfn(S5PV310_PA_L2CC),
>> >> >                .length         = SZ_4K,
>> >> >                .type           = MT_DEVICE,
>> >> > +       }, {
>> >> > +               .virtual        = (unsigned long)S5P_VA_GPIO2,
>> >> > +               .pfn            = __phys_to_pfn(S5PV310_PA_GPIO2),
>> >> > +               .length         = SZ_4K,
>> >> > +               .type           = MT_DEVICE,
>> >> > +       }, {
>> >> > +               .virtual        = (unsigned long)S5P_VA_GPIO3,
>> >> > +               .pfn            = __phys_to_pfn(S5PV310_PA_GPIO3),
>> >> > +               .length         = SZ_256K,
>> >> > +               .type           = MT_DEVICE,
>> >> >        },
>> >> >  };
>> >> >
>> >> > diff --git a/arch/arm/plat-s5p/include/plat/map-s5p.h
> b/arch/arm/plat-
>> >> s5p/include/plat/map-s5p.h
>> >> > index 54e9fb9..bc52595 100644
>> >> > --- a/arch/arm/plat-s5p/include/plat/map-s5p.h
>> >> > +++ b/arch/arm/plat-s5p/include/plat/map-s5p.h
>> >> > @@ -15,6 +15,8 @@
>> >> >
>> >> >  #define S5P_VA_CHIPID          S3C_ADDR(0x0070)
>> >> >  #define S5P_VA_GPIO            S3C_ADDR(0x0050)
>> >> > +#define S5P_VA_GPIO2           S3C_ADDR(0x0051)
>> >> > +#define S5P_VA_GPIO3           S3C_ADDR(0x0052)
>> >> >  #define S5P_VA_SYSTIMER                S3C_ADDR(0x0120)
>> >> >  #define S5P_VA_SROMC           S3C_ADDR(0x0110)
>> >> >
>> >> > --
>> >
>> >
>
>
> 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 RE-SEND] ARM: S5P: Move OneNAND device definitions in plat-s5p

2010-08-22 Thread Kyungmin Park
" Note: S5PC110 and S5PC210 have same OneNAND driver."

Yes I also think it's same device. At least Spec is same. But I heard it has
some different feature related with DMA operation.
I'm not yet receive the official release from LSI. So I can't tell the exact
one.

If it's true. we need to separate it if required.

Thank you,
Kyungmin Park

-Original Message-
From: Kukjin Kim [mailto:kgene@samsung.com] 
Sent: Monday, August 23, 2010 9:07 AM
To: linux-arm-ker...@lists.infradead.org; linux-samsung-soc@vger.kernel.org
Cc: ben-li...@fluff.org; Kukjin Kim; Kyungmin Park
Subject: [PATCH RE-SEND] ARM: S5P: Move OneNAND device definitions in
plat-s5p

This patch moves OneNAND device definitions from mach-s5pv210 to plat-s5p
so that can support it commonly.

Note: S5PC110 and S5PC210 have same OneNAND driver.

Signed-off-by: Kukjin Kim 
Cc: Kyungmin Park 
---
 arch/arm/mach-s5pv210/Kconfig |9 +-
 arch/arm/mach-s5pv210/Makefile|1 -
 arch/arm/mach-s5pv210/include/mach/map.h  |3 ++
 arch/arm/mach-s5pv210/mach-aquila.c   |2 +-
 arch/arm/mach-s5pv210/mach-goni.c |2 +-
 arch/arm/mach-s5pv310/include/mach/irqs.h |2 +
 arch/arm/mach-s5pv310/include/mach/map.h  |6 
 arch/arm/plat-s5p/Kconfig |5 +++
 arch/arm/plat-s5p/Makefile|1 +
 arch/arm/{mach-s5pv210 => plat-s5p}/dev-onenand.c |   28
+++-
 arch/arm/plat-samsung/include/plat/devs.h |2 +-
 11 files changed, 37 insertions(+), 24 deletions(-)
 rename arch/arm/{mach-s5pv210 => plat-s5p}/dev-onenand.c (59%)

diff --git a/arch/arm/mach-s5pv210/Kconfig b/arch/arm/mach-s5pv210/Kconfig
index d3a3895..5315fec 100644
--- a/arch/arm/mach-s5pv210/Kconfig
+++ b/arch/arm/mach-s5pv210/Kconfig
@@ -53,11 +53,6 @@ config S5PV210_SETUP_SDHCI_GPIO
help
  Common setup code for SDHCI gpio.
 
-config S5PC110_DEV_ONENAND
-   bool
-   help
- Compile in platform device definition for OneNAND1 controller
-
 menu "S5PC110 Machines"
 
 config MACH_AQUILA
@@ -71,7 +66,7 @@ config MACH_AQUILA
select S3C_DEV_HSMMC
select S3C_DEV_HSMMC1
select S3C_DEV_HSMMC2
-   select S5PC110_DEV_ONENAND
+   select S5P_DEV_ONENAND
select S5PV210_SETUP_FB_24BPP
select S5PV210_SETUP_SDHCI
help
@@ -88,7 +83,7 @@ config MACH_GONI
select S3C_DEV_HSMMC
select S3C_DEV_HSMMC1
select S3C_DEV_HSMMC2
-   select S5PC110_DEV_ONENAND
+   select S5P_DEV_ONENAND
select S5PV210_SETUP_FB_24BPP
select S5PV210_SETUP_SDHCI
help
diff --git a/arch/arm/mach-s5pv210/Makefile b/arch/arm/mach-s5pv210/Makefile
index 05048c5..7045489 100644
--- a/arch/arm/mach-s5pv210/Makefile
+++ b/arch/arm/mach-s5pv210/Makefile
@@ -26,7 +26,6 @@ obj-$(CONFIG_MACH_GONI)   += mach-goni.o
 
 obj-y  += dev-audio.o
 obj-$(CONFIG_S3C64XX_DEV_SPI)  += dev-spi.o
-obj-$(CONFIG_S5PC110_DEV_ONENAND) += dev-onenand.o
 
 obj-$(CONFIG_S5PV210_SETUP_FB_24BPP)   += setup-fb-24bpp.o
 obj-$(CONFIG_S5PV210_SETUP_I2C1)   += setup-i2c1.o
diff --git a/arch/arm/mach-s5pv210/include/mach/map.h
b/arch/arm/mach-s5pv210/include/mach/map.h
index dd4fb6b..aa19d2f 100644
--- a/arch/arm/mach-s5pv210/include/mach/map.h
+++ b/arch/arm/mach-s5pv210/include/mach/map.h
@@ -17,7 +17,10 @@
 #include 
 
 #define S5PC110_PA_ONENAND (0xB000)
+#define S5P_PA_ONENAND S5PC110_PA_ONENAND
+
 #define S5PC110_PA_ONENAND_DMA (0xB060)
+#define S5P_PA_ONENAND_DMA S5PC110_PA_ONENAND_DMA
 
 #define S5PV210_PA_CHIPID  (0xE000)
 #define S5P_PA_CHIPID  S5PV210_PA_CHIPID
diff --git a/arch/arm/mach-s5pv210/mach-aquila.c
b/arch/arm/mach-s5pv210/mach-aquila.c
index 0dda801..bf772de 100644
--- a/arch/arm/mach-s5pv210/mach-aquila.c
+++ b/arch/arm/mach-s5pv210/mach-aquila.c
@@ -477,7 +477,7 @@ static struct platform_device *aquila_devices[]
__initdata = {
&aquila_i2c_gpio_pmic,
&aquila_device_gpiokeys,
&s3c_device_fb,
-   &s5pc110_device_onenand,
+   &s5p_device_onenand,
&s3c_device_hsmmc0,
&s3c_device_hsmmc1,
&s3c_device_hsmmc2,
diff --git a/arch/arm/mach-s5pv210/mach-goni.c
b/arch/arm/mach-s5pv210/mach-goni.c
index 53754d7..fdc5cca 100644
--- a/arch/arm/mach-s5pv210/mach-goni.c
+++ b/arch/arm/mach-s5pv210/mach-goni.c
@@ -456,7 +456,7 @@ static void goni_setup_sdhci(void)
 
 static struct platform_device *goni_devices[] __initdata = {
&s3c_device_fb,
-   &s5pc110_device_onenand,
+   &s5p_device_onenand,
&goni_i2c_gpio_pmic,
&goni_device_gpiokeys,
&s5p_device_fimc0,
diff --git a/arch/arm/mach-s5pv310/include/mach/irqs.h
b/arch/arm/mach-s5pv310/include/mach/irqs.h
index 522352f..7b4b09f 

Re: [PATCH 00/14] ARM: S5PV310: Updates clock

2010-08-22 Thread Kyungmin Park
Well,

The current V310 clock codes don't work. I wonder these codes are
should be tested by your team. but it's just hang at clock init.

With this patch, it's also don't boot. We also fixed the wrong uart
clock bit. but same. don't works.

Question? Do you can boot with this codes at your board?

Thank you,
Kyungmin Park

Uncompressing Linux... done, booting the kernel.
[0.00] Linux version 2.6.36-rc1-ga400ca7-dirty
(dofm...@dofmind-linux) (gcc version 4.4.1 (GCC) ) #334 PREEMPT Mon
Aug 23 10:45:59 KST 2010
[0.00] CPU: ARMv7 Processor [412fc091] revision 1 (ARMv7), cr=10c53c7f
[0.00] CPU: VIPT nonaliasing data cache, VIPT nonaliasing
instruction cache
[0.00] Machine: UNIVERSAL_C210
[0.00] bootconsole [earlycon0] enabled
[0.00] Memory policy: ECC disabled, Data cache writeback
[0.00] CPU S5PV310 (id 0x43200200)
[0.00] S3C24XX Clocks, Copyright 2004 Simtec Electronics
[0.00] s3c_register_clksrc: clock armclk has no registers set
[0.00] S5PV310: PLL settings, A=8, M=66000,
E=9600 V=10800
[0.00] S5PV310: ARMCLK=8, DMC=33000, ACLK200=16500
[0.00] ACLK100=8250, ACLK160=13200, ACLK133=11000
[0.00] uclk1: source is mout_mpll (6), rate is 8250
[0.00] uclk1: source is mout_mpll (6), rate is 8250
[0.00] uclk1: source is mout_mpll (6), rate is 8250
[0.00] uclk1: source is mout_mpll (6), rate is 8250
[0.00] sclk_pwm: source is mout_mpll (6), rate is 7333
[0.00] sclk_csis: source is ext_xtal (0), rate is 2400
[0.00] sclk_csis: source is ext_xtal (0), rate is 2400
[0.00] sclk_cam: source is ext_xtal (0), rate is 2400
[0.00] sclk_cam: source is ext_xtal (0), rate is 2400
[0.00] sclk_fimc: source is ext_xtal (0), rate is 2400
[0.00] sclk_fimc: source is ext_xtal (0), rate is 2400
[0.00] sclk_fimc: source is ext_xtal (0), rate is 2400
[0.00] sclk_fimc: source is ext_xtal (0), rate is 2400
[0.00] sclk_fimd: source is ext_xtal (0), rate is 2400
[0.00] sclk_fimd: source is ext_xtal (0), rate is 2400
[0.00] sclk_sata: source is mout_mpll (0), rate is 11000
[0.00] sclk_spi: source is ext_xtal (0), rate is 2400
[0.00] sclk_spi: source is ext_xtal (0), rate is 2400
[0.00] sclk_spi: source is ext_xtal (0), rate is 2400
[0.00] sclk_fimg2d: source is mout_g2d0 (0), rate is 0
[0.00] Built 1 zonelists in Zone order, mobility grouping on.
Total pages: 130048
[0.00] Kernel command line: root=ubi0!rootfs rootfstype=ubifs
rootflags=bulk_read,no_chk_data_crc ubi.mtd=8 ubi.mtd=3 ubi.mtd=6
earlyprintk console=ttySAC2,115200n8 mem=512M mtdparts=samsung-onenan)
[0.00] PID hash table entries: 2048 (order: 1, 8192 bytes)
[0.00] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[0.00] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[0.00] Memory: 512MB = 512MB total
[0.00] Memory: 517040k/517040k available, 7248k reserved, 0K highmem
[0.00] Virtual kernel memory layout:
[0.00] vector  : 0x - 0x1000   (   4 kB)
[0.00] fixmap  : 0xfff0 - 0xfffe   ( 896 kB)
[0.00] DMA : 0xffc0 - 0xffe0   (   2 MB)
[0.00] vmalloc : 0xe080 - 0xf000   ( 248 MB)
[0.00] lowmem  : 0xc000 - 0xe000   ( 512 MB)
[0.00] modules : 0xbf00 - 0xc000   (  16 MB)
[0.00]   .init : 0xc0008000 - 0xc001f000   (  92 kB)
[0.00]   .text : 0xc001f000 - 0xc023b000   (2160 kB)
[0.00]   .data : 0xc025 - 0xc0271340   ( 133 kB)
[0.00] SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0,
CPUs=1, Nodes=1
[0.00] Hierarchical RCU implementation.
[0.00]  RCU-based detection of stalled CPUs is disabled.
[0.00]  Verbose stalled-CPUs detection is disabled.
[0.00] NR_IRQS:440
[0.00] Console: colour dummy device 80x30
s3c24xx_serial_initconsole
s3c24xx_serial_init_ports: initialising ports...
s3c24xx_serial_init_port: port=c026caa0, platdev=c0271b20
s3c24xx_serial_init_port: c026caa0 (hw 0)...
resource c02564b8 (1380..13800100)
port: map=1380, mem=f500, irq=16 (16,18), clock=1
s3c24xx_serial_init_port: port=c026cb68, platdev=c0256f08
s3c24xx_serial_init_port: c026cb68 (hw 1)...
resource c0256528 (1381..13810100)
port: map=1381, mem=f501, irq=20 (20,22), clock=1
s3c24xx_serial_init_port: port=c026cc30, platdev=c0256fe8
s3c24xx_serial_init_port: c026cc30 (hw 2)...
resource c0256598 (1382..13820100)
port: map=1382, mem=f502, irq=24 (24,26), clock=1
s3c24xx_serial_init_port: port=c026ccf8, platdev=c02570c8
s3c24xx_serial_init_port: c026ccf8 (hw 3)...
resource c0256608 

Re: [PATCH 2/3] ARM: S5P: Add initial map for GPIO2 and GPIO3

2010-08-22 Thread Kyungmin Park
On Mon, Aug 23, 2010 at 9:18 AM, Kukjin Kim  wrote:
> Kyungmin Park wrote:
>>
>> NAK.
>>
> I don't know why I need your ack for this...if any opinions, just comments
> is enough.

Okay I said in other word, I can't agree this patch.

>
>> This approach don't make a common GPIO framework. I already send the
>> common GPIO framework which send the base address to GPIO framework
>> and handle it regradless GPIO is one or three.
>>
> I don't think that your that RFC GPIO patch is common GPIO framework.
>
>>
> http://lists.infradead.org/pipermail/linux-arm-kernel/2010-August/022513.htm
> l
>>
>> With this patch, we can use the common GPIO framework and remove the
>> VA_GPIO dependency.
>>
> Why do you think your patch is common?

In another patch, you just write the driver strength with
readl/writel. even though gpiolib already has interface,
s5p_gpio_set_drvstr

and how to you implement the gpio_to_irq at both GPIO and EINT?

The "common" means GPIO related function should use the gpiolib
functions only. No direct access.

If your patch match these criteria then I'll ack your patch.

All
>
>> Thank you,
>> Kyungmin Park
>>
>> On Fri, Aug 20, 2010 at 9:33 PM, Kukjin Kim  wrote:
>> > From: Jongpill Lee 
>> >
>> > This patch adds initial map for GPIO2 and GPIO3.
>> > S5PV310/S5PC210 has separated GPIO1, GPIO2 and GPIO3.
>> >
>> > Signed-off-by: Jongpill Lee 
>> > Signed-off-by: Kukjin Kim 
>> > ---
>> >  arch/arm/mach-s5pv310/cpu.c              |   10 ++
>> >  arch/arm/plat-s5p/include/plat/map-s5p.h |    2 ++
>> >  2 files changed, 12 insertions(+), 0 deletions(-)
>> >
>> > diff --git a/arch/arm/mach-s5pv310/cpu.c b/arch/arm/mach-s5pv310/cpu.c
>> > index 196c9f1..db4f55a 100644
>> > --- a/arch/arm/mach-s5pv310/cpu.c
>> > +++ b/arch/arm/mach-s5pv310/cpu.c
>> > @@ -45,6 +45,16 @@ static struct map_desc s5pv310_iodesc[] __initdata =
> {
>> >                .pfn            = __phys_to_pfn(S5PV310_PA_L2CC),
>> >                .length         = SZ_4K,
>> >                .type           = MT_DEVICE,
>> > +       }, {
>> > +               .virtual        = (unsigned long)S5P_VA_GPIO2,
>> > +               .pfn            = __phys_to_pfn(S5PV310_PA_GPIO2),
>> > +               .length         = SZ_4K,
>> > +               .type           = MT_DEVICE,
>> > +       }, {
>> > +               .virtual        = (unsigned long)S5P_VA_GPIO3,
>> > +               .pfn            = __phys_to_pfn(S5PV310_PA_GPIO3),
>> > +               .length         = SZ_256K,
>> > +               .type           = MT_DEVICE,
>> >        },
>> >  };
>> >
>> > diff --git a/arch/arm/plat-s5p/include/plat/map-s5p.h b/arch/arm/plat-
>> s5p/include/plat/map-s5p.h
>> > index 54e9fb9..bc52595 100644
>> > --- a/arch/arm/plat-s5p/include/plat/map-s5p.h
>> > +++ b/arch/arm/plat-s5p/include/plat/map-s5p.h
>> > @@ -15,6 +15,8 @@
>> >
>> >  #define S5P_VA_CHIPID          S3C_ADDR(0x0070)
>> >  #define S5P_VA_GPIO            S3C_ADDR(0x0050)
>> > +#define S5P_VA_GPIO2           S3C_ADDR(0x0051)
>> > +#define S5P_VA_GPIO3           S3C_ADDR(0x0052)
>> >  #define S5P_VA_SYSTIMER                S3C_ADDR(0x0120)
>> >  #define S5P_VA_SROMC           S3C_ADDR(0x0110)
>> >
>> > --
>
>
> Thanks.
>
> Best regards,
> Kgene.
> --
> Kukjin Kim , Senior Engineer,
> SW Solution Development Team, Samsung Electronics Co., Ltd.
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" 
> in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/3] ARM: SAMSUNG: Change the 3rd HSMMC interrupt name for compatibility

2010-08-21 Thread Kyungmin Park
Acked-by: Kyungmin Park 

On Fri, Aug 20, 2010 at 9:33 PM, Kukjin Kim  wrote:
> This patch changes the 3rd HSMMC interrupt name for compatibility
> from IRQ_MMC to IRQ_HSMMC3.
>
> Signed-off-by: Kukjin Kim 
> ---
>  arch/arm/mach-s5pv210/include/mach/irqs.h |    2 +-
>  arch/arm/mach-s5pv310/include/mach/irqs.h |    5 +
>  arch/arm/plat-samsung/dev-hsmmc3.c        |    4 ++--
>  3 files changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/arch/arm/mach-s5pv210/include/mach/irqs.h 
> b/arch/arm/mach-s5pv210/include/mach/irqs.h
> index e1c020e..cdb8ae4 100644
> --- a/arch/arm/mach-s5pv210/include/mach/irqs.h
> +++ b/arch/arm/mach-s5pv210/include/mach/irqs.h
> @@ -109,7 +109,7 @@
>
>  #define IRQ_IPC                        S5P_IRQ_VIC3(0)
>  #define IRQ_HOSTIF             S5P_IRQ_VIC3(1)
> -#define IRQ_MMC3               S5P_IRQ_VIC3(2)
> +#define IRQ_HSMMC3             S5P_IRQ_VIC3(2)
>  #define IRQ_CEC                        S5P_IRQ_VIC3(3)
>  #define IRQ_TSI                        S5P_IRQ_VIC3(4)
>  #define IRQ_MDNIE0             S5P_IRQ_VIC3(5)
> diff --git a/arch/arm/mach-s5pv310/include/mach/irqs.h 
> b/arch/arm/mach-s5pv310/include/mach/irqs.h
> index 4cdedda..522352f 100644
> --- a/arch/arm/mach-s5pv310/include/mach/irqs.h
> +++ b/arch/arm/mach-s5pv310/include/mach/irqs.h
> @@ -68,6 +68,11 @@
>
>  #define IRQ_IIC                        COMBINER_IRQ(27, 0)
>
> +#define IRQ_HSMMC0             COMBINER_IRQ(29, 0)
> +#define IRQ_HSMMC1             COMBINER_IRQ(29, 1)
> +#define IRQ_HSMMC2             COMBINER_IRQ(29, 2)
> +#define IRQ_HSMMC3             COMBINER_IRQ(29, 3)
> +
>  /* Set the default NR_IRQS */
>
>  #define NR_IRQS                        COMBINER_IRQ(MAX_COMBINER_NR, 0)
> diff --git a/arch/arm/plat-samsung/dev-hsmmc3.c 
> b/arch/arm/plat-samsung/dev-hsmmc3.c
> index 85aaf0f..335bc35 100644
> --- a/arch/arm/plat-samsung/dev-hsmmc3.c
> +++ b/arch/arm/plat-samsung/dev-hsmmc3.c
> @@ -33,8 +33,8 @@ static struct resource s3c_hsmmc3_resource[] = {
>                .flags  = IORESOURCE_MEM,
>        },
>        [1] = {
> -               .start  = IRQ_MMC3,
> -               .end    = IRQ_MMC3,
> +               .start  = IRQ_HSMMC3,
> +               .end    = IRQ_HSMMC3,
>                .flags  = IORESOURCE_IRQ,
>        }
>  };
> --
> 1.6.2.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" 
> in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2/3] ARM: S5P: Add initial map for GPIO2 and GPIO3

2010-08-21 Thread Kyungmin Park
NAK.

This approach don't make a common GPIO framework. I already send the
common GPIO framework which send the base address to GPIO framework
and handle it regradless GPIO is one or three.

http://lists.infradead.org/pipermail/linux-arm-kernel/2010-August/022513.html

With this patch, we can use the common GPIO framework and remove the
VA_GPIO dependency.

Thank you,
Kyungmin Park

On Fri, Aug 20, 2010 at 9:33 PM, Kukjin Kim  wrote:
> From: Jongpill Lee 
>
> This patch adds initial map for GPIO2 and GPIO3.
> S5PV310/S5PC210 has separated GPIO1, GPIO2 and GPIO3.
>
> Signed-off-by: Jongpill Lee 
> Signed-off-by: Kukjin Kim 
> ---
>  arch/arm/mach-s5pv310/cpu.c              |   10 ++
>  arch/arm/plat-s5p/include/plat/map-s5p.h |    2 ++
>  2 files changed, 12 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-s5pv310/cpu.c b/arch/arm/mach-s5pv310/cpu.c
> index 196c9f1..db4f55a 100644
> --- a/arch/arm/mach-s5pv310/cpu.c
> +++ b/arch/arm/mach-s5pv310/cpu.c
> @@ -45,6 +45,16 @@ static struct map_desc s5pv310_iodesc[] __initdata = {
>                .pfn            = __phys_to_pfn(S5PV310_PA_L2CC),
>                .length         = SZ_4K,
>                .type           = MT_DEVICE,
> +       }, {
> +               .virtual        = (unsigned long)S5P_VA_GPIO2,
> +               .pfn            = __phys_to_pfn(S5PV310_PA_GPIO2),
> +               .length         = SZ_4K,
> +               .type           = MT_DEVICE,
> +       }, {
> +               .virtual        = (unsigned long)S5P_VA_GPIO3,
> +               .pfn            = __phys_to_pfn(S5PV310_PA_GPIO3),
> +               .length         = SZ_256K,
> +               .type           = MT_DEVICE,
>        },
>  };
>
> diff --git a/arch/arm/plat-s5p/include/plat/map-s5p.h 
> b/arch/arm/plat-s5p/include/plat/map-s5p.h
> index 54e9fb9..bc52595 100644
> --- a/arch/arm/plat-s5p/include/plat/map-s5p.h
> +++ b/arch/arm/plat-s5p/include/plat/map-s5p.h
> @@ -15,6 +15,8 @@
>
>  #define S5P_VA_CHIPID          S3C_ADDR(0x0070)
>  #define S5P_VA_GPIO            S3C_ADDR(0x0050)
> +#define S5P_VA_GPIO2           S3C_ADDR(0x0051)
> +#define S5P_VA_GPIO3           S3C_ADDR(0x0052)
>  #define S5P_VA_SYSTIMER                S3C_ADDR(0x0120)
>  #define S5P_VA_SROMC           S3C_ADDR(0x0110)
>
> --
> 1.6.2.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" 
> in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 3/3] ARM: S5PV310: Add support HSMMC on SMDKC210 and SMDKV310

2010-08-21 Thread Kyungmin Park
On Fri, Aug 20, 2010 at 9:33 PM, Kukjin Kim  wrote:
> From: Hyuk Lee 
>
> This patch adds support HSMMC on SMDKC210 and SMDKV310, and adds
> setup functions for it. S5PV310/S5PC210 can support 4 hsmmc such
> as hsmmc0, hsmmc1, hsmmc2 and hsmmc3.
>
> Signed-off-by: Hyuk Lee 
> Signed-off-by: Kukjin Kim 
> ---
>  arch/arm/mach-s5pv310/Kconfig              |   21 
>  arch/arm/mach-s5pv310/Makefile             |    2 +
>  arch/arm/mach-s5pv310/cpu.c                |    8 ++
>  arch/arm/mach-s5pv310/mach-smdkc210.c      |   50 ++
>  arch/arm/mach-s5pv310/mach-smdkv310.c      |   50 ++
>  arch/arm/mach-s5pv310/setup-sdhci-gpio.c   |  141 
> 
>  arch/arm/mach-s5pv310/setup-sdhci.c        |   56 +++
>  arch/arm/plat-samsung/include/plat/sdhci.h |   58 +++
>  8 files changed, 386 insertions(+), 0 deletions(-)
>  create mode 100644 arch/arm/mach-s5pv310/setup-sdhci-gpio.c
>  create mode 100644 arch/arm/mach-s5pv310/setup-sdhci.c
>
> diff --git a/arch/arm/mach-s5pv310/Kconfig b/arch/arm/mach-s5pv310/Kconfig
> index 9ac29fe..bebad32 100644
> --- a/arch/arm/mach-s5pv310/Kconfig
> +++ b/arch/arm/mach-s5pv310/Kconfig
> @@ -25,6 +25,17 @@ config S5PV310_SETUP_I2C2
>        help
>          Common setup code for i2c bus 2.
>
> +config S5PV310_SETUP_SDHCI
> +       bool
> +       select S5PV310_SETUP_SDHCI_GPIO
> +       help
> +         Internal helper functions for S5PV310 based SDHCI systems.
> +
> +config S5PV310_SETUP_SDHCI_GPIO
> +       bool
> +       help
> +         Common setup code for SDHCI GPIO.
> +
>  # machine support
>
>  menu "S5PC210 Machines"
> @@ -33,6 +44,11 @@ config MACH_SMDKC210
>        bool "SMDKC210"
>        select CPU_S5PV310
>        select ARCH_SPARSEMEM_ENABLE
> +       select S3C_DEV_HSMMC
> +       select S3C_DEV_HSMMC1
> +       select S3C_DEV_HSMMC2
> +       select S3C_DEV_HSMMC3
> +       select S5PV310_SETUP_SDHCI
>        help
>          Machine support for Samsung SMDKC210
>          S5PC210(MCP) is one of package option of S5PV310
> @@ -53,6 +69,11 @@ config MACH_SMDKV310
>        bool "SMDKV310"
>        select CPU_S5PV310
>        select ARCH_SPARSEMEM_ENABLE
> +       select S3C_DEV_HSMMC
> +       select S3C_DEV_HSMMC1
> +       select S3C_DEV_HSMMC2
> +       select S3C_DEV_HSMMC3
> +       select S5PV310_SETUP_SDHCI
>        help
>          Machine support for Samsung SMDKV310
>
> diff --git a/arch/arm/mach-s5pv310/Makefile b/arch/arm/mach-s5pv310/Makefile
> index aefb14f..c89b6b0 100644
> --- a/arch/arm/mach-s5pv310/Makefile
> +++ b/arch/arm/mach-s5pv310/Makefile
> @@ -29,3 +29,5 @@ obj-$(CONFIG_MACH_UNIVERSAL_C210)     += 
> mach-universal_c210.o
>
>  obj-$(CONFIG_S5PV310_SETUP_I2C1)       += setup-i2c1.o
>  obj-$(CONFIG_S5PV310_SETUP_I2C2)       += setup-i2c2.o
> +obj-$(CONFIG_S5PV310_SETUP_SDHCI)      += setup-sdhci.o
> +obj-$(CONFIG_S5PV310_SETUP_SDHCI_GPIO) += setup-sdhci-gpio.o
> diff --git a/arch/arm/mach-s5pv310/cpu.c b/arch/arm/mach-s5pv310/cpu.c
> index db4f55a..3514e87 100644
> --- a/arch/arm/mach-s5pv310/cpu.c
> +++ b/arch/arm/mach-s5pv310/cpu.c
> @@ -19,6 +19,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
>
>  #include 
>
> @@ -73,6 +74,13 @@ static void s5pv310_idle(void)
>  void __init s5pv310_map_io(void)
>  {
>        iotable_init(s5pv310_iodesc, ARRAY_SIZE(s5pv310_iodesc));
> +
> +       /* initialize device information early */
> +
> +       s5pv310_default_sdhci0();
> +       s5pv310_default_sdhci1();
> +       s5pv310_default_sdhci2();
> +       s5pv310_default_sdhci3();
>  }
>
>  void __init s5pv310_init_clocks(int xtal)
> diff --git a/arch/arm/mach-s5pv310/mach-smdkc210.c 
> b/arch/arm/mach-s5pv310/mach-smdkc210.c
> index 71a3bec..52c85de 100644
> --- a/arch/arm/mach-s5pv310/mach-smdkc210.c
> +++ b/arch/arm/mach-s5pv310/mach-smdkc210.c
> @@ -9,6 +9,7 @@
>  */
>
>  #include 
> +#include 
>
>  #include 
>  #include 
> @@ -16,7 +17,9 @@
>
>  #include 
>  #include 
> +#include 
>  #include 
> +#include 
>
>  #include 
>
> @@ -65,6 +68,49 @@ static struct s3c2410_uartcfg smdkc210_uartcfgs[] 
> __initdata = {
>        },
>  };
>
> +static struct s3c_sdhci_platdata smdkc210_hsmmc0_pdata __initdata = {
> +       .max_width              = 4,
> +       .cd_type                = S3C_SDHCI_CD_GPIO,
> +       .ext_cd_gpio            = S5PV310_GPK0(2),
> +       .ext_cd_gpio_invert     = 1,
> +};
> +
> +static struct s3c_sdhci_platdata smdkc210_hsmmc1_pdata __initdata = {
> +       .max_width              = 4,
> +       .cd_type                = S3C_SDHCI_CD_GPIO,
> +       .ext_cd_gpio            = S5PV310_GPK0(2),
> +       .ext_cd_gpio_invert     = 1,
> +};
> +
> +static struct s3c_sdhci_platdata smdkc210_hsmmc2_pdata __initdata = {
> +       .max_width              = 4,
> +       .cd_type                = S3C_SDHCI_CD_GPIO,
> +       .ext_cd_gpio            = S5PV310_GPK2(2),
> +       .ext_cd_gpio_invert     = 1,
> +};
> +
> +static struct s3c_sdhci_platdata smdkc210_hsmmc3_pdata __initdata

Re: 'error: 'SDHCI_QUIRK_NO_HISPD_BIT' undeclared' and 'undefined reference to `sdhci_card_detect''

2010-08-18 Thread Kyungmin Park
On Thu, Aug 19, 2010 at 10:10 AM, Kyungmin Park  wrote:
> On Thu, Aug 19, 2010 at 3:33 AM, Andrew Morton
>  wrote:
>> On Fri, 13 Aug 2010 10:13:04 +0200
>> Marek Szyprowski  wrote:
>>
>>> Hello,
>>>
>>> On Friday, August 13, 2010 9:32 AM Kukjin Kim wrote:
>>>
>>> > This is just information about Samsung sdmmc stuff building error now.
>>> >
>>> > I found Marek's 'sdhci-s3c: enable SDHCI_QUIRK_NO_HISPD_BIT quirk' in the
>>> > Linus' tree.
>>> > (commit ID: a1d5646005af1247d6ae78434bb4db15b07a07b2)
>>> >
>>> > But not defined the quirk yet...so following build error happened with
>>> > s3c6400_defconfig in Linus' latest.
>>> >
>>> > drivers/mmc/host/sdhci-s3c.c: In function 'sdhci_s3c_probe':
>>> > drivers/mmc/host/sdhci-s3c.c:400: error: 'SDHCI_QUIRK_NO_HISPD_BIT'
>>> > undeclared (first use in this function)
>>> > drivers/mmc/host/sdhci-s3c.c:400: error: (Each undeclared identifier is
>>> > reported only once
>>> > drivers/mmc/host/sdhci-s3c.c:400: error: for each function it appears in.)
>>> > make[4]: *** [drivers/mmc/host/sdhci-s3c.o] Error 1
>>> > make[3]: *** [drivers/mmc/host] Error 2
>>> > make[2]: *** [drivers/mmc] Error 2
>>> > make[1]: *** [drivers] Error 2
>>> >
>>> > Kyungmin Park's below patch can solve this and it is in mmotm now.
>>> > (commit ID: 2935b9e7fcc4bea3751b8d039b383b2036a7d36d)
>>> >
>>> > But I think, to update quirk definition should being in Marek's patch for
>>> > avoiding build error.
>>> > Of course, I'm not sure whether the commit order changed.
>>> > Anyway, in this case, will be solved after merging mm tree.
>>> >
>>> >
>>> > And second case is same.
>>> >
>>> > Marek's 'sdhci-s3c: add support for new card detection methods' cause
>>> > following build error.
>>> > (commit ID:17866e14f3a4f219e94f1374ece7226479418ff8)
>>> >
>>> > drivers/built-in.o: In function `sdhci_s3c_notify_change':
>>> > /home/kgene/linux/linux-2.6-mainline-dev/drivers/mmc/host/sdhci-s3c.c:255:
>>> > undefined reference to `sdhci_card_detect'
>>> > make[1]: *** [.tmp_vmlinux1] Error 1
>>> > make: *** [sub-make] Error 2

and this issue is another. check the this.
http://marc.info/?l=linux-mmc&m=128201811218629&w=3

>>> >
>>> > And Andrew's patch(b567e5dd5a34c184e5642100e752cb87e064bb97) can solve 
>>> > this.
>>> > (of course this needs another patches...)
>>> >
>>> > Anyway...
>>> > Marek, in future please make sure your patch has no building problem 
>>> > before
>>> > submitting.
>>> > (or it can help to add some kind of dependency note in your patch)
>>>
>>> My patches submited to Andrew Morton had the description and a note that 
>>> they
>>> have been prepared especially for his tree, taking into account all patches
>>> that are already there (mainly a tasklets to threaded irq conversion). For 
>>> me
>>> it was quite obvious that they will be merged after all other sdhci changes
>>> from that tree. I have no idea why the order of the patches has been 
>>> reversed
>>> and my sdhci patches has been submitted to Linus before the other sdhci
>>> changes.
>>
>> We're talking about these:
>>
>> s5pc110-sdhci-s3c-can-override-host-capabilities.patch
>> s5pc110-sdhci-s3c-support-on-s5pc110.patch
>> sdhci-add-no-hi-speed-bit-quirk-support.patch
>>
>> I have a note that these await an ack from Ben Dooks so I held them
>> back for a closer look after -rc1.  I was unaware of this dependency.
>>
>> Ben, are you OK with those patches?
>
> These are required for support s5pc110 & s5pc210.
>
> Current sdhci on s5p has some wrong assumption. only support 4-bit
> bandwidth. and don't consider the embedded mmc like eMMC.
>
>>
>> http://userweb.kernel.org/~akpm/mmotm/broken-out/s5pc110-sdhci-s3c-can-override-host-capabilities.patch
> It required for override the host caps and pass to the mmc with correct caps
>> http://userweb.kernel.org/~akpm/mmotm/broken-out/s5pc110-sdhci-s3c-support-on-s5pc110.patch
> required for support s5pc110 and also s5pc210
>> http://userweb.kernel.org/~akpm/mmotm/broken-out/sdhci-add-no-hi-speed-bit-quirk-support.patch
> As SDHCI on s5p don't has HISPD bit in controller register. need to quirks.
>>
>> Thanks.
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" 
>> in
>> the body of a message to majord...@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: 'error: 'SDHCI_QUIRK_NO_HISPD_BIT' undeclared' and 'undefined reference to `sdhci_card_detect''

2010-08-18 Thread Kyungmin Park
On Thu, Aug 19, 2010 at 3:33 AM, Andrew Morton
 wrote:
> On Fri, 13 Aug 2010 10:13:04 +0200
> Marek Szyprowski  wrote:
>
>> Hello,
>>
>> On Friday, August 13, 2010 9:32 AM Kukjin Kim wrote:
>>
>> > This is just information about Samsung sdmmc stuff building error now.
>> >
>> > I found Marek's 'sdhci-s3c: enable SDHCI_QUIRK_NO_HISPD_BIT quirk' in the
>> > Linus' tree.
>> > (commit ID: a1d5646005af1247d6ae78434bb4db15b07a07b2)
>> >
>> > But not defined the quirk yet...so following build error happened with
>> > s3c6400_defconfig in Linus' latest.
>> >
>> > drivers/mmc/host/sdhci-s3c.c: In function 'sdhci_s3c_probe':
>> > drivers/mmc/host/sdhci-s3c.c:400: error: 'SDHCI_QUIRK_NO_HISPD_BIT'
>> > undeclared (first use in this function)
>> > drivers/mmc/host/sdhci-s3c.c:400: error: (Each undeclared identifier is
>> > reported only once
>> > drivers/mmc/host/sdhci-s3c.c:400: error: for each function it appears in.)
>> > make[4]: *** [drivers/mmc/host/sdhci-s3c.o] Error 1
>> > make[3]: *** [drivers/mmc/host] Error 2
>> > make[2]: *** [drivers/mmc] Error 2
>> > make[1]: *** [drivers] Error 2
>> >
>> > Kyungmin Park's below patch can solve this and it is in mmotm now.
>> > (commit ID: 2935b9e7fcc4bea3751b8d039b383b2036a7d36d)
>> >
>> > But I think, to update quirk definition should being in Marek's patch for
>> > avoiding build error.
>> > Of course, I'm not sure whether the commit order changed.
>> > Anyway, in this case, will be solved after merging mm tree.
>> >
>> >
>> > And second case is same.
>> >
>> > Marek's 'sdhci-s3c: add support for new card detection methods' cause
>> > following build error.
>> > (commit ID:17866e14f3a4f219e94f1374ece7226479418ff8)
>> >
>> > drivers/built-in.o: In function `sdhci_s3c_notify_change':
>> > /home/kgene/linux/linux-2.6-mainline-dev/drivers/mmc/host/sdhci-s3c.c:255:
>> > undefined reference to `sdhci_card_detect'
>> > make[1]: *** [.tmp_vmlinux1] Error 1
>> > make: *** [sub-make] Error 2
>> >
>> > And Andrew's patch(b567e5dd5a34c184e5642100e752cb87e064bb97) can solve 
>> > this.
>> > (of course this needs another patches...)
>> >
>> > Anyway...
>> > Marek, in future please make sure your patch has no building problem before
>> > submitting.
>> > (or it can help to add some kind of dependency note in your patch)
>>
>> My patches submited to Andrew Morton had the description and a note that they
>> have been prepared especially for his tree, taking into account all patches
>> that are already there (mainly a tasklets to threaded irq conversion). For me
>> it was quite obvious that they will be merged after all other sdhci changes
>> from that tree. I have no idea why the order of the patches has been reversed
>> and my sdhci patches has been submitted to Linus before the other sdhci
>> changes.
>
> We're talking about these:
>
> s5pc110-sdhci-s3c-can-override-host-capabilities.patch
> s5pc110-sdhci-s3c-support-on-s5pc110.patch
> sdhci-add-no-hi-speed-bit-quirk-support.patch
>
> I have a note that these await an ack from Ben Dooks so I held them
> back for a closer look after -rc1.  I was unaware of this dependency.
>
> Ben, are you OK with those patches?

These are required for support s5pc110 & s5pc210.

Current sdhci on s5p has some wrong assumption. only support 4-bit
bandwidth. and don't consider the embedded mmc like eMMC.

>
> http://userweb.kernel.org/~akpm/mmotm/broken-out/s5pc110-sdhci-s3c-can-override-host-capabilities.patch
It required for override the host caps and pass to the mmc with correct caps
> http://userweb.kernel.org/~akpm/mmotm/broken-out/s5pc110-sdhci-s3c-support-on-s5pc110.patch
required for support s5pc110 and also s5pc210
> http://userweb.kernel.org/~akpm/mmotm/broken-out/sdhci-add-no-hi-speed-bit-quirk-support.patch
As SDHCI on s5p don't has HISPD bit in controller register. need to quirks.
>
> Thanks.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" 
> in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] ARM: Update number of VIC

2010-08-15 Thread Kyungmin Park
Even though it required. I still think ben's patch is better approaches.
Talk to Ben again.
And there's no answer from Russell this approaches can be accepted.

And if you want to apply this patch, please apply my previous patch
and then add other SoCs.
http://marc.info/?l=linux-arm-kernel&m=127555986709819&w=2

Thank you,
Kyungmin Park

On Fri, Aug 13, 2010 at 8:09 PM, Kukjin Kim  wrote:
> Update the number of VIC to handle the 3 or 4 VICs of
> the S5PV210, S5P6442 and S5PC100.
>
> Signed-off-by: Kukjin Kim 
> Cc: Ben Dooks 
> Cc: Russell King 
> ---
>  arch/arm/common/Kconfig |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/common/Kconfig b/arch/arm/common/Kconfig
> index 0a34c81..b7c76a9 100644
> --- a/arch/arm/common/Kconfig
> +++ b/arch/arm/common/Kconfig
> @@ -6,8 +6,10 @@ config ARM_VIC
>
>  config ARM_VIC_NR
>        int
> -       default 2
>        depends on ARM_VIC
> +       default 4 if ARCH_S5PV210
> +       default 3 if ARCH_S5P6442 || ARCH_S5PC100
> +       default 2
>        help
>          The maximum number of VICs available in the system, for
>          power management.
> --
> 1.6.2.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" 
> in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v4] ARM: S5PV310: Add Samsung UNIVERSAL_C210 support

2010-08-06 Thread Kyungmin Park
On Fri, Aug 6, 2010 at 9:14 PM, Kukjin Kim  wrote:
> From: Kyungmin Park 
>
> This patch adds Samsung Mobile S5PC210 Reference Board, UNIVERSAL_C210 board
> support.
>
> Signed-off-by: Kyungmin Park 
> [kgene@samsung.com: changed machine name]
> Signed-off-by: Kukjin Kim 
> ---
> Kyungmin,
> Maybe as you know, should be changed all universal_ functions when adding
> other universal board for avoiding confusing later. And need this so that
> we can support single kernel image in future. Thanks.

Keep in mind. but as you see other universal patches. it's almost
static variables do don't make a problem when other universal board
comes.
Yes. some time later it needs to change the name, but current samsung
socs has each SoCs directory so it also don't make a problem.

Thank you,
Kyungmin Park
>
> NOTE:
> Changes since v3:
> - Changed only machine name not functions based on v1 patch
>
> Changes since v2:
> - Changed machine name from 'UNIVERSAL' to 'UNIVERSAL_C210'
>
> Changes since v1:
> - Changed default UFCON tx/rx trigger level
>
>  arch/arm/mach-s5pv310/Kconfig               |    9 +++
>  arch/arm/mach-s5pv310/Makefile              |    1 +
>  arch/arm/mach-s5pv310/mach-universal_c210.c |   86 
> +++
>  3 files changed, 96 insertions(+), 0 deletions(-)
>  create mode 100644 arch/arm/mach-s5pv310/mach-universal_c210.c
>
> diff --git a/arch/arm/mach-s5pv310/Kconfig b/arch/arm/mach-s5pv310/Kconfig
> index f9b1892..331b5bd 100644
> --- a/arch/arm/mach-s5pv310/Kconfig
> +++ b/arch/arm/mach-s5pv310/Kconfig
> @@ -33,4 +33,13 @@ config MACH_SMDKV310
>        select ARCH_SPARSEMEM_ENABLE
>        help
>          Machine support for Samsung SMDKV310
> +
> +config MACH_UNIVERSAL_C210
> +       bool "Mobile UNIVERSAL_C210 Board"
> +       select CPU_S5PV310
> +       select ARCH_SPARSEMEM_ENABLE
> +       help
> +         Machine support for Samsung Mobile Universal S5PC210 Reference
> +         Board. S5PC210(MCP) is one of package option of S5PV310
> +
>  endif
> diff --git a/arch/arm/mach-s5pv310/Makefile b/arch/arm/mach-s5pv310/Makefile
> index 967e2c8..d5b51c7 100644
> --- a/arch/arm/mach-s5pv310/Makefile
> +++ b/arch/arm/mach-s5pv310/Makefile
> @@ -22,6 +22,7 @@ obj-$(CONFIG_HOTPLUG_CPU)     += hotplug.o
>  # machine support
>
>  obj-$(CONFIG_MACH_SMDKV310)    += mach-smdkv310.o
> +obj-$(CONFIG_MACH_UNIVERSAL_C210)      += mach-universal_c210.o
>
>  # device support
>
> diff --git a/arch/arm/mach-s5pv310/mach-universal_c210.c 
> b/arch/arm/mach-s5pv310/mach-universal_c210.c
> new file mode 100644
> index 000..2388cb9
> --- /dev/null
> +++ b/arch/arm/mach-s5pv310/mach-universal_c210.c
> @@ -0,0 +1,86 @@
> +/* linux/arch/arm/mach-s5pv310/mach-universal_c210.c
> + *
> + * Copyright (c) 2010 Samsung Electronics Co., Ltd.
> + *
> + * 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 
> +
> +/* Following are default values for UCON, ULCON and UFCON UART registers */
> +#define UNIVERSAL_UCON_DEFAULT (S3C2410_UCON_TXILEVEL |        \
> +                                S3C2410_UCON_RXILEVEL |        \
> +                                S3C2410_UCON_TXIRQMODE |       \
> +                                S3C2410_UCON_RXIRQMODE |       \
> +                                S3C2410_UCON_RXFIFO_TOI |      \
> +                                S3C2443_UCON_RXERR_IRQEN)
> +
> +#define UNIVERSAL_ULCON_DEFAULT        S3C2410_LCON_CS8
> +
> +#define UNIVERSAL_UFCON_DEFAULT        (S3C2410_UFCON_FIFOMODE |       \
> +                                S5PV210_UFCON_TXTRIG256 |      \
> +                                S5PV210_UFCON_RXTRIG256)
> +
> +static struct s3c2410_uartcfg universal_uartcfgs[] __initdata = {
> +       [0] = {
> +               .hwport         = 0,
> +               .ucon           = UNIVERSAL_UCON_DEFAULT,
> +               .ulcon          = UNIVERSAL_ULCON_DEFAULT,
> +               .ufcon          = UNIVERSAL_UFCON_DEFAULT,
> +       },
> +       [1] = {
> +               .hwport         = 1,
> +               .ucon           = UNIVERSAL_UCON_DEFAULT,
> +               .ulcon          = UNIVERSAL_ULCON_DEFAULT,
> +               .ufcon          = UNIVERSAL_UFCON_DEFAULT,
> +       },
> +       [2] = {
> +               .hwport         = 2,
> +               .ucon           = UNIVERSAL_UCON_DEFAULT,
> +          

Re: [PATCH] ARM: SAMSUNG: Fix on inclusion mach/gpio.h for Samsung SoCs

2010-08-04 Thread Kyungmin Park
Acked-by: Kyungmin Park 

On Thu, Aug 5, 2010 at 8:07 AM, Kukjin Kim  wrote:
> This patch fixes on inclusion  to .
>
> Signed-off-by: Kukjin Kim 
> Cc: Ben Dooks 
> ---
>  arch/arm/mach-s3c64xx/dev-audio.c        |    2 +-
>  arch/arm/mach-s3c64xx/dev-spi.c          |    2 +-
>  arch/arm/mach-s3c64xx/gpiolib.c          |    2 +-
>  arch/arm/mach-s3c64xx/setup-fb-24bpp.c   |    2 +-
>  arch/arm/mach-s3c64xx/setup-i2c0.c       |    2 +-
>  arch/arm/mach-s3c64xx/setup-i2c1.c       |    2 +-
>  arch/arm/mach-s3c64xx/setup-sdhci-gpio.c |    2 +-
>  arch/arm/mach-s5p6440/dev-audio.c        |    2 +-
>  arch/arm/mach-s5p6440/dev-spi.c          |    2 +-
>  arch/arm/mach-s5p6440/gpio.c             |    4 +++-
>  arch/arm/mach-s5p6442/dev-audio.c        |    2 +-
>  arch/arm/mach-s5p6442/dev-spi.c          |    2 +-
>  arch/arm/mach-s5pc100/dev-audio.c        |    2 +-
>  arch/arm/mach-s5pc100/dev-spi.c          |    2 +-
>  arch/arm/mach-s5pv210/dev-audio.c        |    2 +-
>  arch/arm/mach-s5pv210/dev-spi.c          |    2 +-
>  arch/arm/mach-s5pv210/setup-fb-24bpp.c   |    2 +-
>  arch/arm/mach-s5pv210/setup-i2c0.c       |    2 +-
>  arch/arm/mach-s5pv210/setup-i2c1.c       |    2 +-
>  arch/arm/mach-s5pv210/setup-i2c2.c       |    2 +-
>  arch/arm/mach-s5pv210/setup-sdhci-gpio.c |    2 +-
>  21 files changed, 23 insertions(+), 21 deletions(-)
>
> diff --git a/arch/arm/mach-s3c64xx/dev-audio.c 
> b/arch/arm/mach-s3c64xx/dev-audio.c
> index c3e9e73..9648fbc 100644
> --- a/arch/arm/mach-s3c64xx/dev-audio.c
> +++ b/arch/arm/mach-s3c64xx/dev-audio.c
> @@ -12,11 +12,11 @@
>  #include 
>  #include 
>  #include 
> +#include 
>
>  #include 
>  #include 
>  #include 
> -#include 
>
>  #include 
>  #include 
> diff --git a/arch/arm/mach-s3c64xx/dev-spi.c b/arch/arm/mach-s3c64xx/dev-spi.c
> index 29c32d0..a492b98 100644
> --- a/arch/arm/mach-s3c64xx/dev-spi.c
> +++ b/arch/arm/mach-s3c64xx/dev-spi.c
> @@ -12,10 +12,10 @@
>  #include 
>  #include 
>  #include 
> +#include 
>
>  #include 
>  #include 
> -#include 
>  #include 
>  #include 
>
> diff --git a/arch/arm/mach-s3c64xx/gpiolib.c b/arch/arm/mach-s3c64xx/gpiolib.c
> index 60c929a..300dee4 100644
> --- a/arch/arm/mach-s3c64xx/gpiolib.c
> +++ b/arch/arm/mach-s3c64xx/gpiolib.c
> @@ -15,9 +15,9 @@
>  #include 
>  #include 
>  #include 
> +#include 
>
>  #include 
> -#include 
>
>  #include 
>  #include 
> diff --git a/arch/arm/mach-s3c64xx/setup-fb-24bpp.c 
> b/arch/arm/mach-s3c64xx/setup-fb-24bpp.c
> index 8e28e44..0007368 100644
> --- a/arch/arm/mach-s3c64xx/setup-fb-24bpp.c
> +++ b/arch/arm/mach-s3c64xx/setup-fb-24bpp.c
> @@ -15,9 +15,9 @@
>  #include 
>  #include 
>  #include 
> +#include 
>
>  #include 
> -#include 
>  #include 
>  #include 
>
> diff --git a/arch/arm/mach-s3c64xx/setup-i2c0.c 
> b/arch/arm/mach-s3c64xx/setup-i2c0.c
> index d1b11e6..406192a 100644
> --- a/arch/arm/mach-s3c64xx/setup-i2c0.c
> +++ b/arch/arm/mach-s3c64xx/setup-i2c0.c
> @@ -14,10 +14,10 @@
>
>  #include 
>  #include 
> +#include 
>
>  struct platform_device; /* don't need the contents */
>
> -#include 
>  #include 
>  #include 
>  #include 
> diff --git a/arch/arm/mach-s3c64xx/setup-i2c1.c 
> b/arch/arm/mach-s3c64xx/setup-i2c1.c
> index 2dce57d..1ee62c9 100644
> --- a/arch/arm/mach-s3c64xx/setup-i2c1.c
> +++ b/arch/arm/mach-s3c64xx/setup-i2c1.c
> @@ -14,10 +14,10 @@
>
>  #include 
>  #include 
> +#include 
>
>  struct platform_device; /* don't need the contents */
>
> -#include 
>  #include 
>  #include 
>  #include 
> diff --git a/arch/arm/mach-s3c64xx/setup-sdhci-gpio.c 
> b/arch/arm/mach-s3c64xx/setup-sdhci-gpio.c
> index a58c0cc..dcf37e2 100644
> --- a/arch/arm/mach-s3c64xx/setup-sdhci-gpio.c
> +++ b/arch/arm/mach-s3c64xx/setup-sdhci-gpio.c
> @@ -16,8 +16,8 @@
>  #include 
>  #include 
>  #include 
> +#include 
>
> -#include 
>  #include 
>  #include 
>
> diff --git a/arch/arm/mach-s5p6440/dev-audio.c 
> b/arch/arm/mach-s5p6440/dev-audio.c
> index 0c53679..3ca0d2b 100644
> --- a/arch/arm/mach-s5p6440/dev-audio.c
> +++ b/arch/arm/mach-s5p6440/dev-audio.c
> @@ -10,11 +10,11 @@
>
>  #include 
>  #include 
> +#include 
>
>  #include 
>  #include 
>
> -#include 
>  #include 
>  #include 
>  #include 
> diff --git a/arch/arm/mach-s5p6440/dev-spi.c b/arch/arm/mach-s5p6440/dev-spi.c
> index 0a30280..510af44 100644
> --- a/arch/arm/mach-s5p6440/dev-spi.c
> +++ b/arch/arm/mach-s5p6440/dev-spi.c
> @@ -10,11 +10,11 @@
>
>  #include 
>  #include 
> +#include 
>
>  #include 
>

Re: [PATCH v6 5/7] ARM: S5PV210: Access for DMCx registers

2010-08-04 Thread Kyungmin Park
On Wed, Aug 4, 2010 at 8:17 PM, Kukjin Kim  wrote:
> MyungJoo Ham wrote:
>>
>>       The CPUFREQ driver requires an access to DMCx registers. We
>> define physical addresses and mapping between physical and virtual
>> addresses of DMCx registers.
>>
>> Signed-off-by: MyungJoo Ham 
>> Signed-off-by: Kyungmin Park 
>> ---
>>  arch/arm/mach-s5pv210/cpu.c              |   12 +++-
>>  arch/arm/mach-s5pv210/include/mach/map.h |    4 
>>  2 files changed, 15 insertions(+), 1 deletions(-)
>>
>> diff --git a/arch/arm/mach-s5pv210/cpu.c b/arch/arm/mach-s5pv210/cpu.c
>> index 74d4c08..2066695 100644
>> --- a/arch/arm/mach-s5pv210/cpu.c
>> +++ b/arch/arm/mach-s5pv210/cpu.c
>> @@ -60,7 +60,17 @@ static struct map_desc s5pv210_iodesc[] __initdata = {
>>               .pfn            = __phys_to_pfn(S5PV210_PA_SROMC),
>>               .length         = SZ_4K,
>>               .type           = MT_DEVICE,
>> -     }
>> +     }, {
>> +             .virtual        = (unsigned long)S5P_VA_DMC0,
>> +             .pfn            = __phys_to_pfn(S5PV210_PA_DMC0),
>> +             .length         = SZ_4K,
>> +             .type           = MT_DEVICE,
>> +     }, {
>> +             .virtual        = (unsigned long)S5P_VA_DMC1,
>> +             .pfn            = __phys_to_pfn(S5PV210_PA_DMC1),
>> +             .length         = SZ_4K,
>> +             .type           = MT_DEVICE,
>> +     },
>>  };
>>
>>  static void s5pv210_idle(void)
>> diff --git a/arch/arm/mach-s5pv210/include/mach/map.h b/arch/arm/mach-
>> s5pv210/include/mach/map.h
>> index 17687f0..daf6456 100644
>> --- a/arch/arm/mach-s5pv210/include/mach/map.h
>> +++ b/arch/arm/mach-s5pv210/include/mach/map.h
>> @@ -108,4 +108,8 @@
>>  #define SAMSUNG_PA_ADC               S5PV210_PA_ADC
>>  #define SAMSUNG_PA_KEYPAD    S5PV210_PA_KEYPAD
>>
>> +/* DMC */
>
> No need an obvious comment like above...
>
>> +#define S5PV210_PA_DMC0              (0xF000)
>> +#define S5PV210_PA_DMC1              (0xF140)
>
> As I said, if you need adding new definition into the mach/map.h, please
> keep the address order like others.
> It can help to us for easily reading...

Good, good, good,

I'm really appreciate it if the same rules apply to LSI internal trees.
I hope you check it LSI codes also.

Thank you,
Kyungmin Park

>
>> +
>>  #endif /* __ASM_ARCH_MAP_H */
>> --
>
> And as I commented, to merge your 4th(previous, just adding VA) and 5th
> patch to one is better...just for adding DMC map IO.
>
>
> Thanks.
>
> Best regards,
> Kgene.
> --
> Kukjin Kim , Senior Engineer,
> SW Solution Development Team, Samsung Electronics Co., Ltd.
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" 
> in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFC 9/9] crypto: Add Samsung crypto engine driver

2010-08-02 Thread Kyungmin Park
Hi,

Any update on this?

Thank you,
Kyungmin Park

On Sat, Jun 12, 2010 at 4:49 AM, Maurus Cuelenaere
 wrote:
> This patch adds support for the Samsung crypto engine driver available in the
> S3C64XX and S5PC100 SoCs. Currently this supports AES and (T)DES with ECB and
> CBC block ciphers (also CTR for AES). Support for (HMAC)-SHA1 acceleration is
> also available in this engine, but isn't used in the driver yet.
>
> Support for DMA has been added in the code but is currently disabled due to
> issues with data transfers.
>
> Signed-off-by: Maurus Cuelenaere 
> ---
>  drivers/crypto/Kconfig   |   11 +
>  drivers/crypto/Makefile  |    1 +
>  drivers/crypto/s3c-sss.c | 1320 
> ++
>  3 files changed, 1332 insertions(+), 0 deletions(-)
>  create mode 100644 drivers/crypto/s3c-sss.c
>
> diff --git a/drivers/crypto/Kconfig b/drivers/crypto/Kconfig
> index b08403d..597a151 100644
> --- a/drivers/crypto/Kconfig
> +++ b/drivers/crypto/Kconfig
> @@ -222,4 +222,15 @@ config CRYPTO_DEV_PPC4XX
>        help
>          This option allows you to have support for AMCC crypto acceleration.
>
> +config CRYPTO_DEV_SSS
> +       tristate "Samsung Security Sub-Systems"
> +       depends on SAMSUNG_DEV_SSS
> +       select CRYPTO_ALGAPI
> +       select CRYPTO_BLKCIPHER
> +       select CRYPTO_DES
> +       select CRYPTO_HASH
> +       help
> +           This driver utilizes the cryptographic engine in Samsung S3C64XX
> +           and S5PC100 SoCs.
> +
>  endif # CRYPTO_HW
> diff --git a/drivers/crypto/Makefile b/drivers/crypto/Makefile
> index 6ffcb3f..ef14b4d 100644
> --- a/drivers/crypto/Makefile
> +++ b/drivers/crypto/Makefile
> @@ -6,3 +6,4 @@ obj-$(CONFIG_CRYPTO_DEV_MV_CESA) += mv_cesa.o
>  obj-$(CONFIG_CRYPTO_DEV_TALITOS) += talitos.o
>  obj-$(CONFIG_CRYPTO_DEV_IXP4XX) += ixp4xx_crypto.o
>  obj-$(CONFIG_CRYPTO_DEV_PPC4XX) += amcc/
> +obj-$(CONFIG_CRYPTO_DEV_SSS) += s3c-sss.o
> diff --git a/drivers/crypto/s3c-sss.c b/drivers/crypto/s3c-sss.c
> new file mode 100644
> index 000..9fd5288
> --- /dev/null
> +++ b/drivers/crypto/s3c-sss.c
> @@ -0,0 +1,1320 @@
> +/*
> + * linux/drivers/crypto/s3c-sss.c
> + *
> + * Copyright (C) 2010 Maurus Cuelenaere
> + *
> + * Support for S3C64XX Security Sub-Systems
> + *
> + * 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.
> + *
> + */
> +
> +/*#define DEBUG*/
> +
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +
> +#include 
> +
> +#include 
> +
> +#define SSS_CRA_PRIORITY       300
> +#define SSS_MAX_KEY_SIZE       AES_MAX_KEY_SIZE
> +#define SSS_FIFO_SIZE          0x40U
> +#define SSS_TIMEOUT            (3*HZ)
> +
> +/**
> + * struct s3c_sss - driver state.
> + * @dev: pointer to the device struct
> + * @clock: clock associated with peripheral
> + * @irq: irq associated with peripheral
> + * @regs: pointer to mapped registers
> + * @regs_phys: pointer to physical address of registers
> + * @regs_res: pointer to struct resource representing registers
> + * @cur_req: pointer to pending request (NULL indicates no current request)
> + * @dma_client: struct used for passing to DMA core
> + * @lock: lock used for synchronizing queue accesses
> + * @tasklet: tasklet doing the main work
> + * @timer: timer used for timing out faulty requests
> + * @queue: queue containing requests
> + */
> +struct s3c_sss {
> +       struct device                   *dev;
> +
> +       struct clk                      *clock;
> +       int                             irq;
> +       void __iomem                    *regs;
> +       void __iomem                    *regs_phys;
> +       struct resource                 *regs_res;
> +
> +       struct ablkcipher_request       *cur_req;
> +       struct s3c2410_dma_client       dma_client;
> +       spinlock_t                      lock;
> +       struct tasklet_struct           tasklet;
> +       struct timer_list               timer;
> +       struct crypto_queue             queue;
> +};
> +
> +/**
> + * struct sss_context - cipher/hash key state
> + * @key: storage for the key
> + * @key_len: length of the key
> + * @dev: pointer to struct containing the driver state
> + */
> +struct sss_context {
> +       u8                              key[SSS_MAX_KEY_SIZE];
> +       unsi

Re: [PATCH v3 1/8] ARM: Samsung: Add register definitions for Samsung S5P SoC camera interface

2010-08-02 Thread Kyungmin Park
On Tue, Aug 3, 2010 at 9:46 AM, Kukjin Kim  wrote:
> Russell King wrote:
>>
>> On Mon, Aug 02, 2010 at 02:08:42PM +0200, Pawel Osciak wrote:
>> > >Russell King - ARM Linux  wrote:
>> > >On Mon, Aug 02, 2010 at 12:32:20PM +0200, Pawel Osciak wrote:
>> > >> Well, some of them are indeed unused, but it's not an uncommon
> practice in
>> > >> kernel and might help future developers.
>> > >
>> > >On the other hand, arch/arm is getting soo big that we need to do
>> > >something about this - and one solution is to avoid unnecessary
>> > >definitions that we're not using.
>> > >
>> > >Another good idea is to put definitions along side the drivers which
>> > >they're relevant to - maybe in a local driver-name.h file which
>> > >driver-name.c includes, or maybe even within driver-name.c if they're
>> > >not excessive.  This has the advantage of distributing the "bloat" to
>> > >where its actually used, and means that the driver isn't dependent so
>> > >much on arch/arm or even the SoC itself.
>> > >
>> > >Take a look at arch/arm/mach-vexpress/include/mach/ct-ca9x4.h and
>> > >arch/arm/mach-vexpress/include/mach/motherboard.h - these are the only
>> > >two files which contain platform definitions which are actually used
>> > >for Versatile Express.  Compare that with
>> > >arch/arm/mach-realview/include/mach/platform.h which contains lots
>> > >more...
>> >
>> > So basically, what you and Mauro are recommending is that we move the
> *.h
>> > file with register definitions to drivers/media?
>>
>> What I'm suggesting is what's been pretty standard in Linux for a long
>> time.  Take a look at: drivers/net/3c503.[ch], or for a more recent
>> driver, drivers/net/e1000/*.[ch].  Or drivers/mmc/host/mmci.[ch]
>>
> I agree with Russell's opinion.
> I don't want to add unnecessary(or unavailable in arch/arm) definitions in
> arch/arm/*/include
>
>> Putting definitions which are only used by one driver in
> arch/arm/*/include
>> is silly.

I also happy with this method.

Thank you,
Kyungmin Park
--
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 3/8] ARM: Samsung: Add platform definitions and helpers for FIMC driver

2010-08-02 Thread Kyungmin Park
On Tue, Aug 3, 2010 at 10:05 AM, Kukjin Kim  wrote:
> Kyungmin Park wrote:
>>
>> On Tue, Aug 3, 2010 at 9:46 AM, Kukjin Kim  wrote:
>> > Kyungmin Park wrote:
>> >>
>> >> On Tue, Aug 3, 2010 at 8:58 AM, Kukjin Kim 
> wrote:
>> >> > Marek Szyprowski wrote:
>> >> >>
>> >> >> From: Sylwester Nawrocki 
>> >> >>
>> >> >> FIMC (CAMIF) device is a camera interface embedded in S3C/S5P
> Samsung
>> >> >> SOC series. It supports ITU-R BT.601/656 and MIPI-CSI2 standards,
>> >> >> memory to memory operations, color conversion, resizing and
> rotation.
>> >> >>
>> >> >> Signed-off-by: Sylwester Nawrocki 
>> >> >> Signed-off-by: Kyungmin Park 
>> >> >> Signed-off-by: Marek Szyprowski 
>> >> >> ---
>> >> >>
>> >> >> This is patch is a v3 version rebased onto latest kgene/for-next
> tree.
>> >> >> New entries in map.h files has been sorted by the physicall address.
>> >> >>
>> >> > Thanks for your addressing.
>> >> >
>> >> >> I'm resending this patch on behalf of Sylwester who is on holidays
> this
>> >> >> week.
>> >> >>
>> >> >> Best regards
>> >> >> --
>> >> >> Marek Szyprowski
>> >> >> Samsung Poland R&D Center
>> >> >> ---
>
> (snip)
>
>> >> >>
>> >> >> diff --git a/arch/arm/mach-s5pc100/include/mach/map.h
> b/arch/arm/mach-
>> >> >> s5pc100/include/mach/map.h
>> >> >> index c018697..3abe7f5 100644
>> >> >> --- a/arch/arm/mach-s5pc100/include/mach/map.h
>> >> >> +++ b/arch/arm/mach-s5pc100/include/mach/map.h
>> >> >> @@ -99,6 +99,10 @@
>> >> >>
>> >> >>  #define S5PC100_PA_FB                (0xEE00)
>> >> >>
>> >> >> +#define S5PC100_PA_FIMC0     (0xEE20)
>> >> >> +#define S5PC100_PA_FIMC1     (0xEE30)
>> >> >> +#define S5PC100_PA_FIMC2     (0xEE40)
>> >> >> +
>> >> >>  #define S5PC100_PA_I2S0              (0xF200)
>> >> >>  #define S5PC100_PA_I2S1              (0xF210)
>> >> >>  #define S5PC100_PA_I2S2              (0xF220)
>> >> >> @@ -143,6 +147,9 @@
>> >> >>  #define S3C_PA_ONENAND_BUF   S5PC100_PA_ONENAND_BUF
>> >> >>  #define S3C_SZ_ONENAND_BUF   S5PC100_SZ_ONENAND_BUF
>> >> >>  #define S3C_PA_RTC           S5PC100_PA_RTC
>> >> >> +#define S5P_PA_FIMC0         S5PC100_PA_FIMC0
>> >> >> +#define S5P_PA_FIMC1         S5PC100_PA_FIMC1
>> >> >> +#define S5P_PA_FIMC2         S5PC100_PA_FIMC2
>> >> >>
>> >> >>  #define SAMSUNG_PA_ADC               S5PC100_PA_TSADC
>> >> >>  #define SAMSUNG_PA_CFCON     S5PC100_PA_CFCON
>> >> >> diff --git a/arch/arm/mach-s5pv210/cpu.c
> b/arch/arm/mach-s5pv210/cpu.c
>
> (snip)
>
>> >> >> diff --git a/arch/arm/mach-s5pv210/include/mach/map.h
> b/arch/arm/mach-
>> >> >> s5pv210/include/mach/map.h
>> >> >> index 986b285..6a07e55 100644
>> >> >> --- a/arch/arm/mach-s5pv210/include/mach/map.h
>> >> >> +++ b/arch/arm/mach-s5pv210/include/mach/map.h
>> >> >> @@ -65,6 +65,10 @@
>> >> >>
>> >> >>  #define S5PV210_PA_FB                (0xF800)
>> >> >>
>> >> >> +#define S5PV210_PA_FIMC0     (0xFB20)
>> >> >> +#define S5PV210_PA_FIMC1     (0xFB30)
>> >> >> +#define S5PV210_PA_FIMC2     (0xFB40)
>> >> >> +
>> >> >>  #define S5PV210_PA_HSMMC(x)  (0xEB00 + ((x) * 0x10))
>> >> >>
>> >> >>  #define S5PV210_PA_VIC0              (0xF200)
>> >> >> @@ -114,4 +118,8 @@
>> >> >>  #define SAMSUNG_PA_CFCON     S5PV210_PA_CFCON
>> >> >>  #define SAMSUNG_PA_KEYPAD    S5PV210_PA_KEYPAD
>> >> >>
>> >> >> +#define S5P_PA_FIMC0         S5PV210_PA_FIMC0
>> >> >> +#define S5P_PA_FIMC1         S5PV210_PA_FIMC1
>> >> >> +#define S5P_PA_FIMC2         S5PV210_PA_FIMC2
>> >> >
>&g

Re: Please remind 'WARNING: about Samsung merge window over'

2010-08-02 Thread Kyungmin Park
On Tue, Aug 3, 2010 at 9:53 AM, Kukjin Kim  wrote:
> Russell King wrote:
>>
>> On Mon, Aug 02, 2010 at 05:35:37PM +0900, Kyungmin Park wrote:
>> > As the maintainer, he merged his features freely but others can't get
>> > the chance if the implementation is not fit his taste or company
>> > policy.
>> >
>> > Look at the example.
>> > [PATCH v2 0/4] ARM: S5P: Support gpio interrupts
>> > http://marc.info/?l=linux-arm-kernel&m=127840208508625&w=2
>> >
>> > We need the gpio interrupt support but he refused it since it used too
>> > many irq. Actually his board don't use this features.
>> > "It is because there are too many gpio interrupts and having support
>> > of all of them is unnecessary as realistically only few of them maybe
>> > used."
>>
>> From my count, there's already 144 IRQs, and you'll be adding 27*8 = 216
>> additional IRQs to that.  That's quite small compared to some platforms
>> which have in the order of 512 or even 1024 IRQs.

Can you comment this one?
and previous s5pc110 cpufreq also?

>>
>> > And current kernel don't support the sparse irq feature. then it's
>> > reasonable to merge it first and revise it later.
>>
>> sparse irq support has been queued for almost a month for the merge
>> window which has just this morning opened.  This doesn't help you if
>> you instantiate all your 360 interrupts though - just because you
>> don't _use_ an interrupt which has been declared as existing doesn't
>> reduce the size of the arrays.
>>
>> > Another why FIMC support is missing? we modified it as his requested
>> > and send it properly.
>> > [PATCH v3 3/8] ARM: Samsung: Add platform definitions and helpers for
>> > http://marc.info/?l=linux-arm-kernel&m=127990218813931&w=2
>>
>> This looks like it's been missed.  People get busy and miss things on
>> the mailing list, there's nothing special about that.
>>
> Yeah...actually I missed reply for it...so I requested re-submit v4 patch to
> Marek with some modifying and finished review it just now.
>
>> > [PATCH v3 1/8] ARM: Samsung: Add register definitions for Samsung S5P
>> > http://marc.info/?l=linux-arm-kernel&m=127990218613922&w=2
>>
>> Kukjin Kim replied to this one with a point requiring an answer, but
>> nothing came back.
>>
>>    "Looks ok...however, I'm still thinking whether really need all these
>>     definitions."
>>
>> Seems to be a perfectly reasonable point to raise, and if there's no
>> reply to justify them...
>
> 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 3/8] ARM: Samsung: Add platform definitions and helpers for FIMC driver

2010-08-02 Thread Kyungmin Park
On Tue, Aug 3, 2010 at 9:46 AM, Kukjin Kim  wrote:
> Kyungmin Park wrote:
>>
>> On Tue, Aug 3, 2010 at 8:58 AM, Kukjin Kim  wrote:
>> > Marek Szyprowski wrote:
>> >>
>> >> From: Sylwester Nawrocki 
>> >>
>> >> FIMC (CAMIF) device is a camera interface embedded in S3C/S5P Samsung
>> >> SOC series. It supports ITU-R BT.601/656 and MIPI-CSI2 standards,
>> >> memory to memory operations, color conversion, resizing and rotation.
>> >>
>> >> Signed-off-by: Sylwester Nawrocki 
>> >> Signed-off-by: Kyungmin Park 
>> >> Signed-off-by: Marek Szyprowski 
>> >> ---
>> >>
>> >> This is patch is a v3 version rebased onto latest kgene/for-next tree.
>> >> New entries in map.h files has been sorted by the physicall address.
>> >>
>> > Thanks for your addressing.
>> >
>> >> I'm resending this patch on behalf of Sylwester who is on holidays this
>> >> week.
>> >>
>> >> Best regards
>> >> --
>> >> Marek Szyprowski
>> >> Samsung Poland R&D Center
>> >> ---
>> >>  arch/arm/mach-s5pc100/include/mach/map.h       |    7 
>> >>  arch/arm/mach-s5pv210/cpu.c                    |    5 +++
>> >>  arch/arm/mach-s5pv210/include/mach/map.h       |    8 
>> >>  arch/arm/plat-s5p/Kconfig                      |   16 
>> >>  arch/arm/plat-s5p/Makefile                     |    3 ++
>> >>  arch/arm/plat-s5p/dev-fimc0.c                  |   35
>> >> ++
>> >>  arch/arm/plat-s5p/dev-fimc1.c                  |   35
>> >> ++
>> >>  arch/arm/plat-s5p/dev-fimc2.c                  |   35
>> >> ++
>> >>  arch/arm/plat-samsung/include/plat/fimc-core.h |   45
>> >> 
>> >>  arch/arm/plat-samsung/include/plat/fimc.h      |   22 +++
>> >>  10 files changed, 211 insertions(+), 0 deletions(-)
>> >>  create mode 100644 arch/arm/plat-s5p/dev-fimc0.c
>> >>  create mode 100644 arch/arm/plat-s5p/dev-fimc1.c
>> >>  create mode 100644 arch/arm/plat-s5p/dev-fimc2.c
>> >>  create mode 100644 arch/arm/plat-samsung/include/plat/fimc-core.h
>> >>  create mode 100644 arch/arm/plat-samsung/include/plat/fimc.h
>> >>
>> >> diff --git a/arch/arm/mach-s5pc100/include/mach/map.h b/arch/arm/mach-
>> >> s5pc100/include/mach/map.h
>> >> index c018697..3abe7f5 100644
>> >> --- a/arch/arm/mach-s5pc100/include/mach/map.h
>> >> +++ b/arch/arm/mach-s5pc100/include/mach/map.h
>> >> @@ -99,6 +99,10 @@
>> >>
>> >>  #define S5PC100_PA_FB                (0xEE00)
>> >>
>> >> +#define S5PC100_PA_FIMC0     (0xEE20)
>> >> +#define S5PC100_PA_FIMC1     (0xEE30)
>> >> +#define S5PC100_PA_FIMC2     (0xEE40)
>> >> +
>> >>  #define S5PC100_PA_I2S0              (0xF200)
>> >>  #define S5PC100_PA_I2S1              (0xF210)
>> >>  #define S5PC100_PA_I2S2              (0xF220)
>> >> @@ -143,6 +147,9 @@
>> >>  #define S3C_PA_ONENAND_BUF   S5PC100_PA_ONENAND_BUF
>> >>  #define S3C_SZ_ONENAND_BUF   S5PC100_SZ_ONENAND_BUF
>> >>  #define S3C_PA_RTC           S5PC100_PA_RTC
>> >> +#define S5P_PA_FIMC0         S5PC100_PA_FIMC0
>> >> +#define S5P_PA_FIMC1         S5PC100_PA_FIMC1
>> >> +#define S5P_PA_FIMC2         S5PC100_PA_FIMC2
>> >>
>> >>  #define SAMSUNG_PA_ADC               S5PC100_PA_TSADC
>> >>  #define SAMSUNG_PA_CFCON     S5PC100_PA_CFCON
>> >> diff --git a/arch/arm/mach-s5pv210/cpu.c b/arch/arm/mach-s5pv210/cpu.c
>> >> index ea09c32..a7446d4 100644
>> >> --- a/arch/arm/mach-s5pv210/cpu.c
>> >> +++ b/arch/arm/mach-s5pv210/cpu.c
>> >> @@ -37,6 +37,7 @@
>> >>  #include 
>> >>  #include 
>> >>  #include 
>> >> +#include 
>> >>  #include 
>> >>
>> >>  /* Initial IO mappings */
>> >> @@ -104,6 +105,10 @@ void __init s5pv210_map_io(void)
>> >>
>> >>       /* Use s5pv210-keypad instead of samsung-keypad */
>> >>       samsung_keypad_setname("s5pv210-keypad");
>> >> +
>> >> +     s3c_fimc_setname(0, "s5pv210-fimc");
>> >> +     s3c_fimc_setname(1, "s5pv210-fimc

Re: [PATCH v4 3/8] ARM: Samsung: Add platform definitions and helpers for FIMC driver

2010-08-02 Thread Kyungmin Park
On Tue, Aug 3, 2010 at 8:58 AM, Kukjin Kim  wrote:
> Marek Szyprowski wrote:
>>
>> From: Sylwester Nawrocki 
>>
>> FIMC (CAMIF) device is a camera interface embedded in S3C/S5P Samsung
>> SOC series. It supports ITU-R BT.601/656 and MIPI-CSI2 standards,
>> memory to memory operations, color conversion, resizing and rotation.
>>
>> Signed-off-by: Sylwester Nawrocki 
>> Signed-off-by: Kyungmin Park 
>> Signed-off-by: Marek Szyprowski 
>> ---
>>
>> This is patch is a v3 version rebased onto latest kgene/for-next tree.
>> New entries in map.h files has been sorted by the physicall address.
>>
> Thanks for your addressing.
>
>> I'm resending this patch on behalf of Sylwester who is on holidays this
>> week.
>>
>> Best regards
>> --
>> Marek Szyprowski
>> Samsung Poland R&D Center
>> ---
>>  arch/arm/mach-s5pc100/include/mach/map.h       |    7 
>>  arch/arm/mach-s5pv210/cpu.c                    |    5 +++
>>  arch/arm/mach-s5pv210/include/mach/map.h       |    8 
>>  arch/arm/plat-s5p/Kconfig                      |   16 
>>  arch/arm/plat-s5p/Makefile                     |    3 ++
>>  arch/arm/plat-s5p/dev-fimc0.c                  |   35
>> ++
>>  arch/arm/plat-s5p/dev-fimc1.c                  |   35
>> ++
>>  arch/arm/plat-s5p/dev-fimc2.c                  |   35
>> ++
>>  arch/arm/plat-samsung/include/plat/fimc-core.h |   45
>> 
>>  arch/arm/plat-samsung/include/plat/fimc.h      |   22 +++
>>  10 files changed, 211 insertions(+), 0 deletions(-)
>>  create mode 100644 arch/arm/plat-s5p/dev-fimc0.c
>>  create mode 100644 arch/arm/plat-s5p/dev-fimc1.c
>>  create mode 100644 arch/arm/plat-s5p/dev-fimc2.c
>>  create mode 100644 arch/arm/plat-samsung/include/plat/fimc-core.h
>>  create mode 100644 arch/arm/plat-samsung/include/plat/fimc.h
>>
>> diff --git a/arch/arm/mach-s5pc100/include/mach/map.h b/arch/arm/mach-
>> s5pc100/include/mach/map.h
>> index c018697..3abe7f5 100644
>> --- a/arch/arm/mach-s5pc100/include/mach/map.h
>> +++ b/arch/arm/mach-s5pc100/include/mach/map.h
>> @@ -99,6 +99,10 @@
>>
>>  #define S5PC100_PA_FB                (0xEE00)
>>
>> +#define S5PC100_PA_FIMC0     (0xEE20)
>> +#define S5PC100_PA_FIMC1     (0xEE30)
>> +#define S5PC100_PA_FIMC2     (0xEE40)
>> +
>>  #define S5PC100_PA_I2S0              (0xF200)
>>  #define S5PC100_PA_I2S1              (0xF210)
>>  #define S5PC100_PA_I2S2              (0xF220)
>> @@ -143,6 +147,9 @@
>>  #define S3C_PA_ONENAND_BUF   S5PC100_PA_ONENAND_BUF
>>  #define S3C_SZ_ONENAND_BUF   S5PC100_SZ_ONENAND_BUF
>>  #define S3C_PA_RTC           S5PC100_PA_RTC
>> +#define S5P_PA_FIMC0         S5PC100_PA_FIMC0
>> +#define S5P_PA_FIMC1         S5PC100_PA_FIMC1
>> +#define S5P_PA_FIMC2         S5PC100_PA_FIMC2
>>
>>  #define SAMSUNG_PA_ADC               S5PC100_PA_TSADC
>>  #define SAMSUNG_PA_CFCON     S5PC100_PA_CFCON
>> diff --git a/arch/arm/mach-s5pv210/cpu.c b/arch/arm/mach-s5pv210/cpu.c
>> index ea09c32..a7446d4 100644
>> --- a/arch/arm/mach-s5pv210/cpu.c
>> +++ b/arch/arm/mach-s5pv210/cpu.c
>> @@ -37,6 +37,7 @@
>>  #include 
>>  #include 
>>  #include 
>> +#include 
>>  #include 
>>
>>  /* Initial IO mappings */
>> @@ -104,6 +105,10 @@ void __init s5pv210_map_io(void)
>>
>>       /* Use s5pv210-keypad instead of samsung-keypad */
>>       samsung_keypad_setname("s5pv210-keypad");
>> +
>> +     s3c_fimc_setname(0, "s5pv210-fimc");
>> +     s3c_fimc_setname(1, "s5pv210-fimc");
>> +     s3c_fimc_setname(2, "s5pv210-fimc");
>>  }
>>
>>  void __init s5pv210_init_clocks(int xtal)
>> diff --git a/arch/arm/mach-s5pv210/include/mach/map.h b/arch/arm/mach-
>> s5pv210/include/mach/map.h
>> index 986b285..6a07e55 100644
>> --- a/arch/arm/mach-s5pv210/include/mach/map.h
>> +++ b/arch/arm/mach-s5pv210/include/mach/map.h
>> @@ -65,6 +65,10 @@
>>
>>  #define S5PV210_PA_FB                (0xF800)
>>
>> +#define S5PV210_PA_FIMC0     (0xFB20)
>> +#define S5PV210_PA_FIMC1     (0xFB30)
>> +#define S5PV210_PA_FIMC2     (0xFB40)
>> +
>>  #define S5PV210_PA_HSMMC(x)  (0xEB00 + ((x) * 0x10))
>>
>>  #define S5PV210_PA_VIC0              (0xF200)
>> @@ -114,4 +118,8 @@
>>  #define SAMSUNG_PA_CFCON     S5PV210_PA_CFCON
>>  #define

Re: Please remind 'WARNING: about Samsung merge window over'

2010-08-02 Thread Kyungmin Park
On Mon, Aug 2, 2010 at 4:31 PM, Russell King - ARM Linux
 wrote:
> On Mon, Aug 02, 2010 at 03:24:13PM +0900, Kyungmin Park wrote:
>> Absurd !!!
>>
>> Did you mentioned that samsung merge window over before?
>> why it's reminder mail? it's unilateral notification at this time.
>
> It's standard Linux kernel development procedure.
>
> The merge window is not for new code - the merge window is for code which
> has already been merged by maintainers to submit it to Linus in an orderly
> manner and fixup any conflicts which may occur.
>
> New code which hasn't been reviewed by the beginning of the merge window
> and which hasn't been in linux-next for a _reasonable_ amount of time
> should wait until the following merge window unless there's a _very_ good
> reason to make an exception.

I don't complain the merge window procedure. Even though follow the
normal procedure, send the patches and reviewed before the merge
windows. it's not included at this merge window. Our team tries to
include some features but will wait next merge window. Frankly I'm not
sure our implementation can be merged since he focus on their the
latest chip but I want to cover the existing chips even though it's
not released outside.

As the maintainer, he merged his features freely but others can't get
the chance if the implementation is not fit his taste or company
policy.

Look at the example.
[PATCH v2 0/4] ARM: S5P: Support gpio interrupts
http://marc.info/?l=linux-arm-kernel&m=127840208508625&w=2

We need the gpio interrupt support but he refused it since it used too
many irq. Actually his board don't use this features.
"It is because there are too many gpio interrupts and having support
of all of them is unnecessary as realistically only few of them maybe
used."
And current kernel don't support the sparse irq feature. then it's
reasonable to merge it first and revise it later.

Another why FIMC support is missing? we modified it as his requested
and send it properly.
[PATCH v3 3/8] ARM: Samsung: Add platform definitions and helpers for
http://marc.info/?l=linux-arm-kernel&m=127990218813931&w=2
[PATCH v3 1/8] ARM: Samsung: Add register definitions for Samsung S5P
http://marc.info/?l=linux-arm-kernel&m=127990218613922&w=2

I want to listen other maintainers opinions.

Thank you,
Kyungmin Park
--
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: Please remind 'WARNING: about Samsung merge window over'

2010-08-01 Thread Kyungmin Park
Absurd !!!

Did you mentioned that samsung merge window over before?
why it's reminder mail? it's unilateral notification at this time.

In my feelings. only include the your side (LSI) patches and don't
include others (mobile). since it's not fit your taste.
Can you explain the difference between "S5PV310 CPU support" and
"S5PV210 cpufreq support"?
Did you get any ACKs for V310 support? Why do you exclude the v210
cpufreq support even though it's acked from others?

On Mon, Aug 2, 2010 at 2:52 PM, Kukjin Kim  wrote:
> Please remind following which is from discussion about Samsung merge stuff
> with Russell.
>
> ---
>
>> > So, please send the majority of patches *before* the merge window and
>> > try to avoid sending anything but fixes during the merge window itself.
>> > The merge window is for code which has _already_ been merged and has
>> > been in linux-next to be merged into Linus' tree.  It's not for new
>> > code to be reviewed.
>>
>> Next merge window, which will probably be the last I will handle for the
>> S5P range, will have an earlier cut-off point. It was a big rush to get
>> this lot reviewed and merged.
>
> It also means that *NONE* of the stuff in your second pull request was
> in linux-next for *any* time.  It also conflicted with my tree.  The
> result of that is I'm expecting mainline to be dead for all ARM with:
>
> arch/arm/Kconfig:883: can't open file "arch/arm/plat-s5pc1xx/Kconfig"
>
> because of a mis-merge - and since that conflict was not picked up by
> linux-next, it could not have been previously published.
>
> For the next merge window, I will avoid reading email for the duration
> of the window - which means those who are late for the merge window will
> simply not have their patches and trees pulled.  This means we _will_
> have time to resolve conflicts and find problems _before_ the merge
> window
>
> ---
>
> I have no more plan to merge s5p stuff for this merge window, but reviewed
> here until now.
>
> Thanks.
>
> Best regards,
> Kgene.
> --
> Kukjin Kim , Senior Engineer,
> SW Solution Development Team, Samsung Electronics Co., Ltd.
>
>
> ___
> linux-arm-kernel mailing list
> linux-arm-ker...@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>
--
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 3/3] ARM: SAMSUNG: i2c/busses: Add HAVE_S3C2410_I2C option to include I2C for Samsung SoCs

2010-07-29 Thread Kyungmin Park
On Fri, Jul 30, 2010 at 10:03 AM, Kukjin Kim  wrote:
> Kyungmin Park wrote:
>>
>> On Thu, Jul 29, 2010 at 6:42 PM, Kukjin Kim  wrote:
>> > From: Naveen Krishna Ch 
>> >
>> > This patch adds HAVE_S3C2410_I2C to control inclusion of I2C bus driver
>> > on Samsung SoCs and makes I2C bus driver dependency SoC specific instead
>> > of machine specific. This will enalbe all machines using Samsung
>> ARCH_S3C2410,
>> > _S3C64XX, _S5P6440, _S5PC100, and _S5PV210 to select the I2C driver by
>> default
>>
>> What's the different from use PLAT_SAMSUNG?
>>
> Hi,
>
> Hmm..the difference?
>
> I remember, already said to you...
> Anyway actually, there was a stuff in here about that.
> Please refer to following...it may answer on your question.
>
> --- From Ben Dooks
>
>>  config RTC_DRV_S3C
>>       tristate "Samsung S3C series SoC RTC"
>> -     depends on ARCH_S3C2410
>> +     depends on ARCH_S3C2410 || ARCH_S3C64XX
>
> I wonder whether just making this depend on either S3C_DEV_RTC, or simply
> PLAT_SAMSUNG would just be a better choice.
>
> The S3C_DEV_RTC would mean that the drivers the core of the kernel
> would be built, but means that we can't speculatively build drivers
> if the kernel hasn't any machines using them.
>
> Making it depend on PLAT_SAMSUNG would mean it is available to all,
> but would be selectable even if there isn't a machine supporting it
> being built.
>
> The current situation would mean that we have to update driver Kconfig
> entries each time a new SoC turns up...

In other word, It can make it workable when new SoCs arrives, even
though depends on PLAT_SAMSUNG.

If new chip has improved i2C IP then define new I2C drivers and modify
it as 'depends on PLAT_SAMUSNG if !NEW_IP_I2C'
and use another i2c drivers. of course it's depends on PLAT_SAMSUNG or
PLAT_S5P if NEW_IP_I2C.

>
> We could also have a HAVE_RTC_DRV_S3C so that all SoCs supporting this
> coudl select it independant of whether there is machine support.
>
> ---
>
> It doesn't mean that we should use HAVE_XXX in this case...
> But this way is better _now_ and they used same method in several drivers.
> And if driver IP changes, we can use with HAVE_XXXV2...
>
>> config I2C_S3C2410
>>         tristate "S3C2410 I2C Driver"
>>         depends on PLAT_SAMSUNG
>>
>> Please don't populate the Kconfigs.
>>
>
> I hope you stop talking same issue without alternative...
>
>> Thank you,
>> Kyungmin Park
>>
>> >
>> > Signed-off-by: Naveen Krishna Ch 
>> > Signed-off-by: Kukjin Kim 
>> > Cc: Ben Dooks 
>> > ---
>> > Changes since v2:
>> > - Added HAVE_S3C2410_I2C in drivers Kconfig
>> > - Made I2C bus driver dependency SoC specific
>> > - Selected additional support I2C bus driver for S5P6440, S5PC100,
>> >  and S5PV210
>> >
>> > Changes since v1:
>> > - Modifed the Kconfig help comments.
>> >
>> >  arch/arm/Kconfig           |    5 +
>> >  drivers/i2c/busses/Kconfig |   11 +--
>> >  2 files changed, 14 insertions(+), 2 deletions(-)
>> >
>> > diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
>> > index 98922f7..e922994 100644
>> > --- a/arch/arm/Kconfig
>> > +++ b/arch/arm/Kconfig
>> > @@ -634,6 +634,7 @@ config ARCH_S3C2410
>> >        select ARCH_HAS_CPUFREQ
>> >        select HAVE_CLK
>> >        select ARCH_USES_GETTIMEOFFSET
>> > +       select HAVE_S3C2410_I2C
>> >        help
>> >          Samsung S3C2410X CPU based systems, such as the Simtec
>> Electronics
>> >          BAST (<http://www.simtec.co.uk/products/EB110ITX/>), the IPAQ 1940
>> or
>> > @@ -663,6 +664,7 @@ config ARCH_S3C64XX
>> >        select S3C_DEV_NAND
>> >        select USB_ARCH_HAS_OHCI
>> >        select SAMSUNG_GPIOLIB_4BIT
>> > +       select HAVE_S3C2410_I2C
>> >        help
>> >          Samsung S3C64XX series based systems
>> >
>> > @@ -672,6 +674,7 @@ config ARCH_S5P6440
>> >        select GENERIC_GPIO
>> >        select HAVE_CLK
>> >        select ARCH_USES_GETTIMEOFFSET
>> > +       select HAVE_S3C2410_I2C
>> >        help
>> >          Samsung S5P6440 CPU based systems
>> >
>> > @@ -691,6 +694,7 @@ config ARCH_S5PC100
>> >        select CPU_V7
>> >        select ARM_L1_CACHE_SHIFT_6
>> >        select ARCH_USES_GETTIMEOFFSET
>> > 

Re: [PATCH v3 3/3] ARM: SAMSUNG: i2c/busses: Add HAVE_S3C2410_I2C option to include I2C for Samsung SoCs

2010-07-29 Thread Kyungmin Park
On Thu, Jul 29, 2010 at 6:42 PM, Kukjin Kim  wrote:
> From: Naveen Krishna Ch 
>
> This patch adds HAVE_S3C2410_I2C to control inclusion of I2C bus driver
> on Samsung SoCs and makes I2C bus driver dependency SoC specific instead
> of machine specific. This will enalbe all machines using Samsung ARCH_S3C2410,
> _S3C64XX, _S5P6440, _S5PC100, and _S5PV210 to select the I2C driver by default

What's the different from use PLAT_SAMSUNG?

config I2C_S3C2410
tristate "S3C2410 I2C Driver"
depends on PLAT_SAMSUNG

Please don't populate the Kconfigs.

Thank you,
Kyungmin Park

>
> Signed-off-by: Naveen Krishna Ch 
> Signed-off-by: Kukjin Kim 
> Cc: Ben Dooks 
> ---
> Changes since v2:
> - Added HAVE_S3C2410_I2C in drivers Kconfig
> - Made I2C bus driver dependency SoC specific
> - Selected additional support I2C bus driver for S5P6440, S5PC100,
>  and S5PV210
>
> Changes since v1:
> - Modifed the Kconfig help comments.
>
>  arch/arm/Kconfig           |    5 +
>  drivers/i2c/busses/Kconfig |   11 +--
>  2 files changed, 14 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index 98922f7..e922994 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -634,6 +634,7 @@ config ARCH_S3C2410
>        select ARCH_HAS_CPUFREQ
>        select HAVE_CLK
>        select ARCH_USES_GETTIMEOFFSET
> +       select HAVE_S3C2410_I2C
>        help
>          Samsung S3C2410X CPU based systems, such as the Simtec Electronics
>          BAST (<http://www.simtec.co.uk/products/EB110ITX/>), the IPAQ 1940 or
> @@ -663,6 +664,7 @@ config ARCH_S3C64XX
>        select S3C_DEV_NAND
>        select USB_ARCH_HAS_OHCI
>        select SAMSUNG_GPIOLIB_4BIT
> +       select HAVE_S3C2410_I2C
>        help
>          Samsung S3C64XX series based systems
>
> @@ -672,6 +674,7 @@ config ARCH_S5P6440
>        select GENERIC_GPIO
>        select HAVE_CLK
>        select ARCH_USES_GETTIMEOFFSET
> +       select HAVE_S3C2410_I2C
>        help
>          Samsung S5P6440 CPU based systems
>
> @@ -691,6 +694,7 @@ config ARCH_S5PC100
>        select CPU_V7
>        select ARM_L1_CACHE_SHIFT_6
>        select ARCH_USES_GETTIMEOFFSET
> +       select HAVE_S3C2410_I2C
>        help
>          Samsung S5PC100 series based systems
>
> @@ -701,6 +705,7 @@ config ARCH_S5PV210
>        select HAVE_CLK
>        select ARM_L1_CACHE_SHIFT_6
>        select ARCH_USES_GETTIMEOFFSET
> +       select HAVE_S3C2410_I2C
>        help
>          Samsung S5PV210/S5PC110 series based systems
>
> diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig
> index bceafbf..f1751da 100644
> --- a/drivers/i2c/busses/Kconfig
> +++ b/drivers/i2c/busses/Kconfig
> @@ -521,12 +521,19 @@ config I2C_PXA_SLAVE
>          is necessary for systems where the PXA may be a target on the
>          I2C bus.
>
> +config HAVE_S3C2410_I2C
> +       bool
> +       help
> +         This will include I2C support for Samsung SoCs. If you want to
> +         include I2C support for any machine, kindly select this in the
> +         respective Kconfig file.
> +
>  config I2C_S3C2410
>        tristate "S3C2410 I2C Driver"
> -       depends on ARCH_S3C2410 || ARCH_S3C64XX
> +       depends on HAVE_S3C2410_I2C
>        help
>          Say Y here to include support for I2C controller in the
> -         Samsung S3C2410 based System-on-Chip devices.
> +         Samsung SoCs.
>
>  config I2C_S6000
>        tristate "S6000 I2C support"
> --
> 1.6.2.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" 
> in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/2] ARM: S5PV210: Add audio support to Aquila

2010-07-29 Thread Kyungmin Park
On Fri, Jul 30, 2010 at 7:48 AM, Ben Dooks  wrote:
> On 28/07/10 04:04, Chanwoo Choi wrote:
>
> [snip]
>
>
>> +/* GPIO I2C AP 1.8V */
>> +#define AP_I2C_GPIO_BUS_5    5
>> +static struct i2c_gpio_platform_data i2c_gpio5_data = {
>> +     .sda_pin        = S5PV210_MP05(3),      /* XM0ADDR_11 */
>> +     .scl_pin        = S5PV210_MP05(2),      /* XM0ADDR_10 */
>> +};
>> +
>> +static struct platform_device i2c_gpio5 = {
>> +     .name           = "i2c-gpio",
>> +     .id             = AP_I2C_GPIO_BUS_5,
>> +     .dev            = {
>> +             .platform_data  = &i2c_gpio5_data,
>> +     },
>> +};
>> +
>> +static struct i2c_board_info i2c_gpio5_devs[] __initdata = {
>> +     {
>> +             /* CS/ADDR = low 0x34 (FYI: high = 0x36) */
>> +             I2C_BOARD_INFO("wm8994", 0x34 >> 1),
>> +             .platform_data  = &wm8994_platform_data,
>> +     },
>> +};
>> +
>> +static void __init aquila_sound_init(void)
>> +{
>> +     unsigned int gpio;
>> +
>> +     /* CODEC_XTAL_EN */
>> +     gpio = S5PV210_GPH3(2);         /* XEINT_26 */
>> +     gpio_request(gpio, "CODEC_XTAL_EN");
>> +     s3c_gpio_cfgpin(gpio, S3C_GPIO_OUTPUT);
>> +     s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE);
>> +     gpio_direction_output(gpio, 1);
>
> gpio_direction_output() should have done the cfgpin()
> call.

Good catch. Thanks.

I think we required that extend the current gpiolib to support the
setpull like functions. also sleep gpio pin configuration.
Marek or shim? do you have any ideas?

>
>> +     /* CLKOUT[9:8] set to 0x3(XUSBXTI) of 0xE010E000(OTHERS)
>> +      * for 24MHZ
>> +      */
>> +     writel(readl(S5P_OTHERS) | (0x3 << 8), S5P_OTHERS);
>
> Not sure if this should be being done directly? will it affect
> the current clock tree?

It's almost done by bootloader. but we make sure it's really routed
the CLKOUT to XUSBXTI.

Thank you,
Kyungmin Park

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


Re: [PATCH v4 5/8] ARM: S5PV310: Add Timer support

2010-07-26 Thread Kyungmin Park
You mean we can use pwm2 and I2c simultaneously since we don't use the Tout.

Do you also consider low power audio case? In the previous time to
this reason, HRT uses the RTC and systimer.

anyway thank you for clarification.

Thank you,
Kyungmin Park

On Tue, Jul 27, 2010 at 1:58 PM, Sangbeom Kim  wrote:
> Thanks for your answer,
> If you want use to GPD0[2] as I2C_7, you can use it as I2C port.
> Because We don't use PWM2 Tout.
> We only use pwm timer2 for internal operation.
> Thanks,
>
> Kyungmin Park  wrote:
>>On Tue, Jul 27, 2010 at 1:12 PM, Sangbeom Kim  wrote:
>>> Hi! Kyungmin,
>>>
>>> After booting, clock event is generated by 2 arm private timers.
>>> What do you mean by 'change the pwm2 pin to i2c functions' ?
>>> What do you use for I2C emulation? (TOUT2 or gpio)
>>> Could you explain it in detail?
>>
>>In the spec, PWM2 is muxed with I2C_7. I muxed it I2C pin to use i2c chip.
>>
>>Thank you,
>>Kyungmin Park
>>>
>>> Thanks and regards,
>>> Sangbeom Kim
>>>
>>> Kyungmin Park  wrote:
>>>
>>>>Can you confirm that during boot time, change the pwm2 pin to i2c
>>>>functions and still it's working correctly?
>>>>
>>>>1. pwm2 is used for clock event at first boot.
>>>>2. during i2c init, pwm2 pin is changed to i2c functionality.
>>>>
>>>>then where can get the clockevent?
>>>>
>>>>Another possible scenarios is that.
>>>>pwm2 pin is changed to i2c function at bootloader to access the i2c
> chips.
>>>>Then below code is working?
>>>>
>>>>Thank you,
>>>>Kyungmin Park
>>>>
>>>>On Mon, Jul 26, 2010 at 9:42 PM, Kukjin Kim 
> wrote:
>>>>> From: Changhwan Youn 
>>>>>
>>>>> This patch adds timer support for S5PV310.  Until now, all S5P SoCs
>>>>> use CONFIG_ARCH_USES_GETTIMEOFFSET macro as a default configuration.
>>>>> Instead,S5PV310 implements clocksource and clock_event_device to
>>>>> support the high resolution timer and tickless system.
>>>>>
>>>>> Signed-off-by: Changhwan Youn 
>>>>> Signed-off-by: Hyuk Lee 
>>>>> Signed-off-by: Kukjin Kim 
>>>>> ---
>>>>> Changes since v3:
>>>>>
>>>>> - Changes clock source from PWM2 to PWM4 because PWM4 cannot be used
>>for
>>>>>  other purpose such as external output function through GPIO.
>>>>>
>>>>>  arch/arm/mach-s5pv310/include/mach/pwm-clock.h |   70 ++
>>>>>  arch/arm/mach-s5pv310/localtimer.c             |   25 ++
>>>>>  arch/arm/mach-s5pv310/time.c                   |  287
>>>>
>>>>>  arch/arm/plat-s5p/include/plat/s5pv310.h       |    1 +
>>>>>  arch/arm/plat-samsung/Makefile                 |    2 +-
>>>>>  5 files changed, 384 insertions(+), 1 deletions(-)
>>>>>  create mode 100644 arch/arm/mach-s5pv310/include/mach/pwm-clock.h
>>>>>  create mode 100644 arch/arm/mach-s5pv310/localtimer.c
>>>>>  create mode 100644 arch/arm/mach-s5pv310/time.c
>>>>>
>>>>> diff --git a/arch/arm/mach-s5pv310/include/mach/pwm-clock.h
>>>>b/arch/arm/mach-s5pv310/include/mach/pwm-clock.h
>>>>> new file mode 100644
>>>>> index 000..7e6da27
>>>>> --- /dev/null
>>>>> +++ b/arch/arm/mach-s5pv310/include/mach/pwm-clock.h
>>>>> @@ -0,0 +1,70 @@
>>>>> +/* linux/arch/arm/mach-s5pv310/include/mach/pwm-clock.h
>>>>> + *
>>>>> + * Copyright (c) 2010 Samsung Electronics Co., Ltd.
>>>>> + *             http://www.samsung.com/
>>>>> + *
>>>>> + * Copyright 2008 Openmoko, Inc.
>>>>> + * Copyright 2008 Simtec Electronics
>>>>> + *      Ben Dooks 
>>>>> + *      http://armlinux.simtec.co.uk/
>>>>> + *
>>>>> + * Based on arch/arm/mach-s3c64xx/include/mach/pwm-clock.h
>>>>> + *
>>>>> + * S5PV310 - pwm clock and timer 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.
>>>>> +*/
>>>>> +
>&g

Re: [PATCH v4 5/8] ARM: S5PV310: Add Timer support

2010-07-26 Thread Kyungmin Park
On Tue, Jul 27, 2010 at 1:12 PM, Sangbeom Kim  wrote:
> Hi! Kyungmin,
>
> After booting, clock event is generated by 2 arm private timers.
> What do you mean by 'change the pwm2 pin to i2c functions' ?
> What do you use for I2C emulation? (TOUT2 or gpio)
> Could you explain it in detail?

In the spec, PWM2 is muxed with I2C_7. I muxed it I2C pin to use i2c chip.

Thank you,
Kyungmin Park
>
> Thanks and regards,
> Sangbeom Kim
>
> Kyungmin Park  wrote:
>
>>Can you confirm that during boot time, change the pwm2 pin to i2c
>>functions and still it's working correctly?
>>
>>1. pwm2 is used for clock event at first boot.
>>2. during i2c init, pwm2 pin is changed to i2c functionality.
>>
>>then where can get the clockevent?
>>
>>Another possible scenarios is that.
>>pwm2 pin is changed to i2c function at bootloader to access the i2c chips.
>>Then below code is working?
>>
>>Thank you,
>>Kyungmin Park
>>
>>On Mon, Jul 26, 2010 at 9:42 PM, Kukjin Kim  wrote:
>>> From: Changhwan Youn 
>>>
>>> This patch adds timer support for S5PV310.  Until now, all S5P SoCs
>>> use CONFIG_ARCH_USES_GETTIMEOFFSET macro as a default configuration.
>>> Instead,S5PV310 implements clocksource and clock_event_device to
>>> support the high resolution timer and tickless system.
>>>
>>> Signed-off-by: Changhwan Youn 
>>> Signed-off-by: Hyuk Lee 
>>> Signed-off-by: Kukjin Kim 
>>> ---
>>> Changes since v3:
>>>
>>> - Changes clock source from PWM2 to PWM4 because PWM4 cannot be used for
>>>  other purpose such as external output function through GPIO.
>>>
>>>  arch/arm/mach-s5pv310/include/mach/pwm-clock.h |   70 ++
>>>  arch/arm/mach-s5pv310/localtimer.c             |   25 ++
>>>  arch/arm/mach-s5pv310/time.c                   |  287
>>
>>>  arch/arm/plat-s5p/include/plat/s5pv310.h       |    1 +
>>>  arch/arm/plat-samsung/Makefile                 |    2 +-
>>>  5 files changed, 384 insertions(+), 1 deletions(-)
>>>  create mode 100644 arch/arm/mach-s5pv310/include/mach/pwm-clock.h
>>>  create mode 100644 arch/arm/mach-s5pv310/localtimer.c
>>>  create mode 100644 arch/arm/mach-s5pv310/time.c
>>>
>>> diff --git a/arch/arm/mach-s5pv310/include/mach/pwm-clock.h
>>b/arch/arm/mach-s5pv310/include/mach/pwm-clock.h
>>> new file mode 100644
>>> index 000..7e6da27
>>> --- /dev/null
>>> +++ b/arch/arm/mach-s5pv310/include/mach/pwm-clock.h
>>> @@ -0,0 +1,70 @@
>>> +/* linux/arch/arm/mach-s5pv310/include/mach/pwm-clock.h
>>> + *
>>> + * Copyright (c) 2010 Samsung Electronics Co., Ltd.
>>> + *             http://www.samsung.com/
>>> + *
>>> + * Copyright 2008 Openmoko, Inc.
>>> + * Copyright 2008 Simtec Electronics
>>> + *      Ben Dooks 
>>> + *      http://armlinux.simtec.co.uk/
>>> + *
>>> + * Based on arch/arm/mach-s3c64xx/include/mach/pwm-clock.h
>>> + *
>>> + * S5PV310 - pwm clock and timer 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.
>>> +*/
>>> +
>>> +#ifndef __ASM_ARCH_PWMCLK_H
>>> +#define __ASM_ARCH_PWMCLK_H __FILE__
>>> +
>>> +/**
>>> + * pwm_cfg_src_is_tclk() - return whether the given mux config is a tclk
>>> + * @tcfg: The timer TCFG1 register bits shifted down to 0.
>>> + *
>>> + * Return true if the given configuration from TCFG1 is a TCLK instead
>>> + * any of the TDIV clocks.
>>> + */
>>> +static inline int pwm_cfg_src_is_tclk(unsigned long tcfg)
>>> +{
>>> +       return tcfg == S3C64XX_TCFG1_MUX_TCLK;
>>> +}
>>> +
>>> +/**
>>> + * tcfg_to_divisor() - convert tcfg1 setting to a divisor
>>> + * @tcfg1: The tcfg1 setting, shifted down.
>>> + *
>>> + * Get the divisor value for the given tcfg1 setting. We assume the
>>> + * caller has already checked to see if this is not a TCLK source.
>>> + */
>>> +static inline unsigned long tcfg_to_divisor(unsigned long tcfg1)
>>> +{
>>> +       return 1 << tcfg1;
>>> +}
>>> +
>>> +/**
>>> + * pwm_tdiv_has_div1() - does the tdiv setting have a /1
>>> + *
>>> + * Return true if we have a /1 in t

Re: [PATCH v4 5/8] ARM: S5PV310: Add Timer support

2010-07-26 Thread Kyungmin Park
Can you confirm that during boot time, change the pwm2 pin to i2c
functions and still it's working correctly?

1. pwm2 is used for clock event at first boot.
2. during i2c init, pwm2 pin is changed to i2c functionality.

then where can get the clockevent?

Another possible scenarios is that.
pwm2 pin is changed to i2c function at bootloader to access the i2c chips.
Then below code is working?

Thank you,
Kyungmin Park

On Mon, Jul 26, 2010 at 9:42 PM, Kukjin Kim  wrote:
> From: Changhwan Youn 
>
> This patch adds timer support for S5PV310.  Until now, all S5P SoCs
> use CONFIG_ARCH_USES_GETTIMEOFFSET macro as a default configuration.
> Instead,S5PV310 implements clocksource and clock_event_device to
> support the high resolution timer and tickless system.
>
> Signed-off-by: Changhwan Youn 
> Signed-off-by: Hyuk Lee 
> Signed-off-by: Kukjin Kim 
> ---
> Changes since v3:
>
> - Changes clock source from PWM2 to PWM4 because PWM4 cannot be used for
>  other purpose such as external output function through GPIO.
>
>  arch/arm/mach-s5pv310/include/mach/pwm-clock.h |   70 ++
>  arch/arm/mach-s5pv310/localtimer.c             |   25 ++
>  arch/arm/mach-s5pv310/time.c                   |  287 
> 
>  arch/arm/plat-s5p/include/plat/s5pv310.h       |    1 +
>  arch/arm/plat-samsung/Makefile                 |    2 +-
>  5 files changed, 384 insertions(+), 1 deletions(-)
>  create mode 100644 arch/arm/mach-s5pv310/include/mach/pwm-clock.h
>  create mode 100644 arch/arm/mach-s5pv310/localtimer.c
>  create mode 100644 arch/arm/mach-s5pv310/time.c
>
> diff --git a/arch/arm/mach-s5pv310/include/mach/pwm-clock.h 
> b/arch/arm/mach-s5pv310/include/mach/pwm-clock.h
> new file mode 100644
> index 000..7e6da27
> --- /dev/null
> +++ b/arch/arm/mach-s5pv310/include/mach/pwm-clock.h
> @@ -0,0 +1,70 @@
> +/* linux/arch/arm/mach-s5pv310/include/mach/pwm-clock.h
> + *
> + * Copyright (c) 2010 Samsung Electronics Co., Ltd.
> + *             http://www.samsung.com/
> + *
> + * Copyright 2008 Openmoko, Inc.
> + * Copyright 2008 Simtec Electronics
> + *      Ben Dooks 
> + *      http://armlinux.simtec.co.uk/
> + *
> + * Based on arch/arm/mach-s3c64xx/include/mach/pwm-clock.h
> + *
> + * S5PV310 - pwm clock and timer 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.
> +*/
> +
> +#ifndef __ASM_ARCH_PWMCLK_H
> +#define __ASM_ARCH_PWMCLK_H __FILE__
> +
> +/**
> + * pwm_cfg_src_is_tclk() - return whether the given mux config is a tclk
> + * @tcfg: The timer TCFG1 register bits shifted down to 0.
> + *
> + * Return true if the given configuration from TCFG1 is a TCLK instead
> + * any of the TDIV clocks.
> + */
> +static inline int pwm_cfg_src_is_tclk(unsigned long tcfg)
> +{
> +       return tcfg == S3C64XX_TCFG1_MUX_TCLK;
> +}
> +
> +/**
> + * tcfg_to_divisor() - convert tcfg1 setting to a divisor
> + * @tcfg1: The tcfg1 setting, shifted down.
> + *
> + * Get the divisor value for the given tcfg1 setting. We assume the
> + * caller has already checked to see if this is not a TCLK source.
> + */
> +static inline unsigned long tcfg_to_divisor(unsigned long tcfg1)
> +{
> +       return 1 << tcfg1;
> +}
> +
> +/**
> + * pwm_tdiv_has_div1() - does the tdiv setting have a /1
> + *
> + * Return true if we have a /1 in the tdiv setting.
> + */
> +static inline unsigned int pwm_tdiv_has_div1(void)
> +{
> +       return 1;
> +}
> +
> +/**
> + * pwm_tdiv_div_bits() - calculate TCFG1 divisor value.
> + * @div: The divisor to calculate the bit information for.
> + *
> + * Turn a divisor into the necessary bit field for TCFG1.
> + */
> +static inline unsigned long pwm_tdiv_div_bits(unsigned int div)
> +{
> +       return ilog2(div);
> +}
> +
> +#define S3C_TCFG1_MUX_TCLK S3C64XX_TCFG1_MUX_TCLK
> +
> +#endif /* __ASM_ARCH_PWMCLK_H */
> diff --git a/arch/arm/mach-s5pv310/localtimer.c 
> b/arch/arm/mach-s5pv310/localtimer.c
> new file mode 100644
> index 000..2784036
> --- /dev/null
> +++ b/arch/arm/mach-s5pv310/localtimer.c
> @@ -0,0 +1,25 @@
> +/* linux/arch/arm/mach-s5pv310/localtimer.c
> + *
> + * Cloned from linux/arch/arm/mach-realview/localtimer.c
> + *
> + *  Copyright (C) 2002 ARM Ltd.
> + *  All Rights Reserved
> + *
> + * 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 
>

Re: [PATCH v3 3/3] sdhci-s3c: Add SDHCI_QUIRK_NO_WP_BIT quirk for Samsung SoC

2010-07-23 Thread Kyungmin Park
On Fri, Jul 23, 2010 at 8:56 PM, Kukjin Kim  wrote:
> From: Hyuk Lee 
>
> If host controller doesn't have WP pin which should be connnected with SDMMC
> card WP pin, can implement get_ro function with using the allocated gpio.
> In order to use this quirk wp_gpio in the platform data must be set.
>
> Signed-off-by: Hyuk Lee 
> Signed-off-by: Kukjin Kim 
> ---
>  drivers/mmc/host/sdhci-s3c.c |   43 
> ++
>  drivers/mmc/host/sdhci.c     |    3 ++
>  drivers/mmc/host/sdhci.h     |    3 ++
>  3 files changed, 49 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci-s3c.c b/drivers/mmc/host/sdhci-s3c.c
> index 0d25285..0b75e57 100644
> --- a/drivers/mmc/host/sdhci-s3c.c
> +++ b/drivers/mmc/host/sdhci-s3c.c
> @@ -22,6 +22,7 @@
>
>  #include 
>
> +#include 
>  #include 
>  #include 
>
> @@ -213,6 +214,36 @@ static void sdhci_s3c_set_clock(struct sdhci_host *host, 
> unsigned int clock)
>  }
>
>  /**
> + * sdhci_s3c_get_ro - callback for get_ro
> + * @host: The SDHCI host being changed
> + *
> + * If the WP pin is connected with GPIO, can get the value which indicates
> + * the card is locked or not.
> +*/
> +static int sdhci_s3c_get_ro(struct mmc_host *mmc)
> +{
> +       struct sdhci_s3c *sc;
> +       struct sdhci_host *host;
> +
> +       host = mmc_priv(mmc);
> +       sc = sdhci_priv(host);
> +
> +       return gpio_get_value(sc->pdata->wp_gpio);
> +}
> +
> +/**
> + * sdhci_s3c_cfg_wp - configure GPIO for WP pin
> + * @gpio_num: GPIO number which connected with WP line from SD/MMC slot
> + *
> + * Configure GPIO for using WP line
> +*/
> +static void sdhci_s3c_cfg_wp(unsigned int gpio_num)
> +{
> +       s3c_gpio_cfgpin(gpio_num, S3C_GPIO_INPUT);
> +       s3c_gpio_setpull(gpio_num, S3C_GPIO_PULL_UP);
> +}
> +
> +/**
>  * sdhci_s3c_get_min_clock - callback to get minimal supported clock value
>  * @host: The SDHCI host being queried
>  *
> @@ -375,6 +406,9 @@ static int __devinit sdhci_s3c_probe(struct 
> platform_device *pdev)
>        if (pdata->cfg_gpio)
>                pdata->cfg_gpio(pdev, pdata->max_width);
>
> +       if (gpio_is_valid(pdata->wp_gpio))
> +               sdhci_s3c_ops.get_ro = sdhci_s3c_get_ro;
> +
>        host->hw_name = "samsung-hsmmc";
>        host->ops = &sdhci_s3c_ops;
>        host->quirks = 0;
> @@ -408,6 +442,15 @@ static int __devinit sdhci_s3c_probe(struct 
> platform_device *pdev)
>        host->quirks |= (SDHCI_QUIRK_32BIT_DMA_ADDR |
>                         SDHCI_QUIRK_32BIT_DMA_SIZE);
>
> +       /* Controller's WP pin donsn't connected with SD card and there is an
> +        * allocated GPIO for getting WP data form SD card, use this quirk and
> +        * send the GPIO number in pdata->wp_gpio. */
> +       host->quirks |= SDHCI_QUIRK_NO_WP_BIT;
> +
> +       /* to configure gpio pin as a card write protection signal */
> +       if (gpio_is_valid(pdata->wp_gpio))
> +               sdhci_s3c_cfg_wp(pdata->wp_gpio);
> +

Put it just one place like this.

if (gpio_is_valid(pdata->wp_gpio)) {
   sdhci_s3c_cfg_wp(pdata->wp_gpio);
sdhci_s3c_ops.get_ro = sdhci_s3c_get_ro;
   host->quirks |= SDHCI_QUIRK_NO_WP_BIT;
}

It reduce the below quirks check by one. If you add the quriks as your
patch, host->quirks are always true whether WP use or not.

Thank you,
Kyungmin Park
>        ret = sdhci_add_host(host);
>        if (ret) {
>                dev_err(dev, "sdhci_add_host() failed\n");
> diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
> index f9ca4c6..7fba401 100644
> --- a/drivers/mmc/host/sdhci.c
> +++ b/drivers/mmc/host/sdhci.c
> @@ -1198,6 +1198,9 @@ static int sdhci_get_ro(struct mmc_host *mmc)
>
>        host = mmc_priv(mmc);
>
> +       if ((host->quirks & SDHCI_QUIRK_NO_WP_BIT) && host->ops->get_ro)
> +               return host->ops->get_ro(mmc);
> +
>        spin_lock_irqsave(&host->lock, flags);
>
>        if (host->flags & SDHCI_DEVICE_DEAD)
> diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h
> index 0de8b38..dd9a233 100644
> --- a/drivers/mmc/host/sdhci.h
> +++ b/drivers/mmc/host/sdhci.h
> @@ -247,6 +247,8 @@ struct sdhci_host {
>  #define SDHCI_QUIRK_MISSING_CAPS                       (1<<28)
>  /* Controller has nonstandard clock management */
>  #define SDHCI_QUIRK_NONSTANDARD_MINCLOCK               (1<<29)
> +/* Controller has no write-protect pin connected with SD card */
> +#define SDHCI_QUIRK_NO_WP_BIT                          (1<<30)
>
>        int                   

Re: [PATCH v3 2/8] ARM: S5PV310: Add new CPU initialization support

2010-07-21 Thread Kyungmin Park
On Wed, Jul 21, 2010 at 10:29 PM, Kyungmin Park  wrote:
> On Wed, Jul 21, 2010 at 9:55 PM, Kukjin Kim  wrote:
>> Kyungmin Park wrote:
>>>
>>> On Tue, Jul 20, 2010 at 9:11 PM, Kukjin Kim  wrote:
>>> > From: Changhwan Youn 
>>> >
>>> > This patch adds Samsung S5PV310/S5PC210 CPU support.
>>> > The S5PV310/S5PC210 integrates a ARM Cortex A9 multi-core.
>>> >
>>> > Signed-off-by: Changhwan Youn 
>>> > Signed-off-by: Jongpill Lee 
>>> > Signed-off-by: Jiseong Oh 
>>> > Signed-off-by: Kukjin Kim 
>>> > ---
>>> > Changes since v2:
>>> > - Re-model platsmp.c on the Versatile Express as per Russell King's
>> suggestion.
>>> >  And tested on the board.
>>> >
>>> > - Compared Versatile Express SMP code with Realview SMP code and
>> modified
>>> as needed.
>>> >
>>
>> Hi,
>>
>> (snip)
>>
>>> > +static void arch_detect_cpu(void)
>>> > +{
>>> > +       /* we do not need to do any cpu detection here at the moment. */
>>> > +
>>> > +       fifo_mask = S5PV210_UFSTAT_TXMASK;
>>> > +       fifo_max = 63 << S5PV210_UFSTAT_TXSHIFT;
>>>
>>> It's only valid when use the UART1. others 255 for UART0, 15 for others.
>>
>> Ok..will fix it.
>>
>> (snip)
>>
>>> > +#define VMALLOC_END      (0xE000)
>>>
>>> Increase to 0xF000'. but it will be removed from Eric's patch.
>>>
>> Right now, the 0xE000 is no problem as default.
>> But I will check this is appropriate again.
> Since maybe you use the 2g/2g configuration. try to use the 3g/1g
> configuration with more the 512MiB.
>
>>
>> And according to his '[PATCH 08/13] [ARM] Make VMALLOC_END into a global
>> variable if not defined',
>> it doesn't mean absolutely remove it. why did you say like that.
>>
>> +#ifndef VMALLOC_END
>> +extern unsigned long vmalloc_end;
>> +#define VMALLOC_END (vmalloc_end)
>> +#endif

It's intermediate patch, after merge, I or he will remove the global
VMALLOC_END and define it each boards.
At that case smdk use the 0xe000' but aquila/goni will use the 0xf000'.
>> +
>>
>> And if required modify it for some machine, you can do it later with
>> mach_desc after applying Eric's patch.
Why do  the work twice?

>> Or as Russell said, there is the way to do it is to specify a vmalloc=
>> parameter to the kernel.

Do you define the decreased vmalloc usage? android binder use the
vmalloc 1MiB at normal case.
If you decrease the vmalloc size, you only launch lower applications
even though there's enough system memory.

>
> I don't have confidence with HIGHMEM with VIPT (it's same as PIPT).
> So I want to use lowmem if possible,
>
>>
>> (snip)
>>
>>> > +               /*
>>> > +                * Write the address of secondary startup into the
>>> > +                * system-wide flags register. The boot monitor waits
>>> > +                * until it receives a soft interrupt, and then the
>>> > +                * secondary CPU branches to this address.
>>> > +                */
>>> > +       __raw_writel(BSYM(virt_to_phys(s5pv310_secondary_startup)),
>>> S5P_INFORM0);
>>>
>>> Do you really use the INFORM0? historically it's used for sleep &
>>> wakeup. new SoC has several INFORM register. So I recommend to use
>>> others.
>>>
>>
>> It doesn't mean we should use INFORM0 for sleep & wakeup even though
>> historically used.
>> ...I mean it doesn't matter and as you know, just need to sync with
>> boot-loader for it.
> that's reason I said, we got unused INFORM{3,4,5,...} so if we use it,
> no problem.
>>
>> (snip)
>>
>>> > +void s3c_i2c0_cfg_gpio(struct platform_device *dev)
>>> > +{
>>> > +/* will be implemented later */
>>> > +}
>>>
>>> Remove it and send separate patch. e.g.,I2C support on s5pc210.
>>>
>> I think i2c0 is un-conditionally compiled. So need to add i2c0 support in
>> here.
> It mean all samsung SoC have i2c0. okay if you want it.
>>
>> (snip)
>>
>>> > +#define S5P_VA_COREPERI_BASE   S3C_ADDR(0x0080)
>>> > +#define S5P_VA_COREPERI(x)     (S5P_VA_COREPERI_BASE + (x))
>>> > +#define S5P_VA_SCU             S5P_VA_COREPERI(0x0)
>>> > +#define S5P_VA_GIC_CPU         S5P_VA_COREPERI(0x100)
>>> > +#define S5P_VA_TWD             S5P_VA_COREPERI(0x600)
>>> > +#define S5P_VA_GIC_DIST                S5P_VA_COREPERI(0x1000)
>>> > +
>>> > +#define S5P_VA_L2CC            S3C_ADDR(0x0090)
>>>
>>> I'm not sure it's proper prefix.
>>>
>> It's no problem.
>>
>> (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
>>
>
--
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 3/3] i2c/busses: Select I2C bus support for S5PV210 and S5P6440.

2010-07-21 Thread Kyungmin Park
On Wed, Jul 21, 2010 at 10:55 PM, Kukjin Kim  wrote:
> Kyungmin Park wrote:
>>
>> I don't want to modify Kconfig anymore. it's simple to modify driver
> itself.
>>
> Yeah, I think so.
>
>> Think the usage of I2c. I think there's no case don't use it.
>>
>> At this time modify Kconfig once, and just fix the driver if new SoCs
>> are arrives.
>> Of course we can modify Kconfig one more, If there's really new IPs of
>> I2C are created. but I expect we also need to define new PLAT_SAMSUNG2
>>
> Maybe you did see the Watchdog driver...I think, in this case, the depending
> on 'HAVE_xxx_I2C' is better than 'PLAT_xxx'.
>
> If there is newer I2C, the 'HAVE_xxx_I2Cv2' is enough.

yes it's personal taste. I just don't want to modify each Kconfig for
every samsung ARCH.
Now your team enables Samsung SoCs peripherals and if you like this
way, you should define all SoCs peripherals like this.

>
>> Thank you,
>> Kyungmin Park
>>
>> On Wed, Jul 21, 2010 at 9:59 PM, Kukjin Kim  wrote:
>> > From: Naveen Krishna Ch 
>> >
>> > This patch is to select support I2C channels 0, 1 and 2 for S5PV210 and
>> S5P6440.
>> >
>> > Signed-off-by: Naveen Krishna Ch 
>> > Signed-off-by: Kukjin Kim 
>> > ---
>> > Changes since v1:
>> > - Modifed the Kconfig help comments.
>> >
>> >  drivers/i2c/busses/Kconfig |    6 +++---
>> >  1 files changed, 3 insertions(+), 3 deletions(-)
>> >
>> > diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig
>> > index bceafbf..27c96ec 100644
>> > --- a/drivers/i2c/busses/Kconfig
>> > +++ b/drivers/i2c/busses/Kconfig
>> > @@ -523,10 +523,10 @@ config I2C_PXA_SLAVE
>> >
>> >  config I2C_S3C2410
>> >        tristate "S3C2410 I2C Driver"
>> > -       depends on ARCH_S3C2410 || ARCH_S3C64XX
>> > +       depends on ARCH_S3C2410 || ARCH_S3C64XX || ARCH_S5P6440 ||
>> ARCH_S5PV210
>> >        help
>> > -         Say Y here to include support for I2C controller in the
>> > -         Samsung S3C2410 based System-on-Chip devices.
>> > +         Say Y here to include support for I2C controller in the
> Samsung
>> > +         S3C2410, S3C64XX, S5P6440 and S5PV210 based System-on-Chip
>> devices.
>> >
>> >  config I2C_S6000
>> >        tristate "S6000 I2C support"
>> > --
>> > 1.6.2.5
>> >
>> > --
>
>
> 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 1/7] ARM: S5PV210: Add a Kconfig entry "S5PC110_EVT0_WORKAROUND"

2010-07-21 Thread Kyungmin Park
On Wed, Jul 21, 2010 at 8:47 PM, Ben Dooks  wrote:
> On 21/07/10 02:13, MyungJoo Ham wrote:
>> On Wed, Jul 21, 2010 at 9:36 AM, Ben Dooks  wrote:
>>> On 07/19/10 06:31, MyungJoo Ham wrote:
>>>>
>>>> Early S5PC110 (EVT0) chip had some issues required workaround from a
>>>> kernel. We can add such workaround codes with this Kconfig entry.
>>>>
>>>> Signed-off-by: MyungJoo Ham
>>>> Signed-off-by: Kyungmin Park
>>>> ---
>>>>  arch/arm/mach-s5pv210/Kconfig |    7 +++
>>>>  1 files changed, 7 insertions(+), 0 deletions(-)
>>>>
>>>> diff --git a/arch/arm/mach-s5pv210/Kconfig b/arch/arm/mach-s5pv210/Kconfig
>>>> index 631019a..18802e7 100644
>>>> --- a/arch/arm/mach-s5pv210/Kconfig
>>>> +++ b/arch/arm/mach-s5pv210/Kconfig
>>>> @@ -101,4 +101,11 @@ config MACH_SMDKC110
>>>>          Machine support for Samsung SMDKC110
>>>>          S5PC110(MCP) is one of package option of S5PV210
>>>>
>>>> +config S5PC110_EVT0_WORKAROUND
>>>> +       bool "S5PC110 Early Chip Workaround (EVT0)"
>>>> +       help
>>>> +         Early S5PC110 (so called EVT0) has errata items that should be
>>>> +         addressed; otherwise the kernel may panic or be locked up.
>>>> Enable
>>>> +         this option to execute workaround instructions.
>>>> +
>>>>  endif
>>>
>>> What happens for non EVT0, is the a performance issue or is it exclusive?
>>>
>>
>> This S5PC110_EVT0_WORKAROUND addresses issues (erratic behaviors, not
>> performance issues) of "EVT-0" revisions, which is exclusive for these
>> EVT-0 only. They do not apply to the later (EVT-1 and so on) chips.
>
> Ok, so does the fix work for just EVT0? Does it exclude supporting other
> EVT sillicon as well?

Mr. Ham will reply it.

As I know "yes", just FYI now Mr. Ham works on it. you can see it
http://git.infradead.org/users/kmpark/linux-2.6-samsung clock and
cpufreq branch.

If you have a good idea, give your opinions.

Thank you,
Kyungmin Park
--
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 3/3] i2c/busses: Select I2C bus support for S5PV210 and S5P6440.

2010-07-21 Thread Kyungmin Park
I don't want to modify Kconfig anymore. it's simple to modify driver itself.

Think the usage of I2c. I think there's no case don't use it.

At this time modify Kconfig once, and just fix the driver if new SoCs
are arrives.
Of course we can modify Kconfig one more, If there's really new IPs of
I2C are created. but I expect we also need to define new PLAT_SAMSUNG2

Thank you,
Kyungmin Park

On Wed, Jul 21, 2010 at 9:59 PM, Kukjin Kim  wrote:
> From: Naveen Krishna Ch 
>
> This patch is to select support I2C channels 0, 1 and 2 for S5PV210 and 
> S5P6440.
>
> Signed-off-by: Naveen Krishna Ch 
> Signed-off-by: Kukjin Kim 
> ---
> Changes since v1:
> - Modifed the Kconfig help comments.
>
>  drivers/i2c/busses/Kconfig |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig
> index bceafbf..27c96ec 100644
> --- a/drivers/i2c/busses/Kconfig
> +++ b/drivers/i2c/busses/Kconfig
> @@ -523,10 +523,10 @@ config I2C_PXA_SLAVE
>
>  config I2C_S3C2410
>        tristate "S3C2410 I2C Driver"
> -       depends on ARCH_S3C2410 || ARCH_S3C64XX
> +       depends on ARCH_S3C2410 || ARCH_S3C64XX || ARCH_S5P6440 || 
> ARCH_S5PV210
>        help
> -         Say Y here to include support for I2C controller in the
> -         Samsung S3C2410 based System-on-Chip devices.
> +         Say Y here to include support for I2C controller in the Samsung
> +         S3C2410, S3C64XX, S5P6440 and S5PV210 based System-on-Chip devices.
>
>  config I2C_S6000
>        tristate "S6000 I2C support"
> --
> 1.6.2.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" 
> in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] ARM: SAMSUNG: Make RTC driver dependency SoC specific instead of machine specific

2010-07-21 Thread Kyungmin Park
On Wed, Jul 21, 2010 at 9:29 PM, Kukjin Kim  wrote:
> Kyungmin Park wrote:
>>
>> I don't see the Samsung SoCs don't have RTC feature.
>>
> Yes, you're right...
> But it doesn't mean the RTC driver can support every Samsung SoCs now.

Vice versa, if there's problem, we can fix it easily. No need to
modify Kconfig anymore, just fix it driver itself.
>
>> I think S3C_RTC only depends on PLAT_SAMSUNG so PLAT_SAMSUNG select
>> HAVE_S3C_RTC is enough.
>
> So I think, this is not bad.
>
>>
>> Thank you,
>> Kyungmin Park
>>
>> On Wed, Jul 21, 2010 at 6:00 PM, Kukjin Kim  wrote:
>> > From: Atul Dahiya 
>> >
>> > This patch moves the dependency of RTC driver from MACH_XXX(board) to
>> > ARCH_XXX(SoC). This will enable all machines using Samsung S5P6440,
>> S5PC100
>> > and S5PV210 SoCs to use RTC driver by default.
>> >
>> > Signed-off-by: Atul Dahiya 
>> > Signed-off-by: Kukjin Kim 
>> > ---
>> >  arch/arm/Kconfig              |    3 +++
>> >  arch/arm/mach-s5p6440/Kconfig |    1 -
>> >  arch/arm/mach-s5pc100/Kconfig |    1 -
>> >  arch/arm/mach-s5pv210/Kconfig |    2 --
>> >  4 files changed, 3 insertions(+), 4 deletions(-)
>> >
>> > diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
>> > index 98922f7..ea668a4 100644
>> > --- a/arch/arm/Kconfig
>> > +++ b/arch/arm/Kconfig
>> > @@ -672,6 +672,7 @@ config ARCH_S5P6440
>> >        select GENERIC_GPIO
>> >        select HAVE_CLK
>> >        select ARCH_USES_GETTIMEOFFSET
>> > +       select HAVE_S3C_RTC
>> >        help
>> >          Samsung S5P6440 CPU based systems
>> >
>> > @@ -691,6 +692,7 @@ config ARCH_S5PC100
>> >        select CPU_V7
>> >        select ARM_L1_CACHE_SHIFT_6
>> >        select ARCH_USES_GETTIMEOFFSET
>> > +       select HAVE_S3C_RTC
>> >        help
>> >          Samsung S5PC100 series based systems
>> >
>> > @@ -701,6 +703,7 @@ config ARCH_S5PV210
>> >        select HAVE_CLK
>> >        select ARM_L1_CACHE_SHIFT_6
>> >        select ARCH_USES_GETTIMEOFFSET
>> > +       select HAVE_S3C_RTC
>> >        help
>> >          Samsung S5PV210/S5PC110 series based systems
>> >
>> > diff --git a/arch/arm/mach-s5p6440/Kconfig
> b/arch/arm/mach-s5p6440/Kconfig
>> > index b2d4716..de8f08d 100644
>> > --- a/arch/arm/mach-s5p6440/Kconfig
>> > +++ b/arch/arm/mach-s5p6440/Kconfig
>> > @@ -20,7 +20,6 @@ config MACH_SMDK6440
>> >        select SAMSUNG_DEV_ADC
>> >        select S3C_DEV_RTC
>> >        select S3C_DEV_WDT
>> > -       select HAVE_S3C_RTC
>> >        select HAVE_S3C2410_WATCHDOG
>> >        help
>> >          Machine support for the Samsung SMDK6440
>> > diff --git a/arch/arm/mach-s5pc100/Kconfig
> b/arch/arm/mach-s5pc100/Kconfig
>> > index 2602895..e9c3d98 100644
>> > --- a/arch/arm/mach-s5pc100/Kconfig
>> > +++ b/arch/arm/mach-s5pc100/Kconfig
>> > @@ -48,7 +48,6 @@ config MACH_SMDKC100
>> >        select S5PC100_SETUP_FB_24BPP
>> >        select S5PC100_SETUP_I2C1
>> >        select S5PC100_SETUP_SDHCI
>> > -       select HAVE_S3C_RTC
>> >        help
>> >          Machine support for the Samsung SMDKC100
>> >
>> > diff --git a/arch/arm/mach-s5pv210/Kconfig
> b/arch/arm/mach-s5pv210/Kconfig
>> > index 04597cc..7f029d1 100644
>> > --- a/arch/arm/mach-s5pv210/Kconfig
>> > +++ b/arch/arm/mach-s5pv210/Kconfig
>> > @@ -75,7 +75,6 @@ config MACH_SMDKV210
>> >        select SAMSUNG_DEV_TS
>> >        select S3C_DEV_RTC
>> >        select S3C_DEV_WDT
>> > -       select HAVE_S3C_RTC
>> >        select HAVE_S3C2410_WATCHDOG
>> >        help
>> >          Machine support for Samsung SMDKV210
>> > @@ -86,7 +85,6 @@ config MACH_SMDKC110
>> >        select ARCH_SPARSEMEM_ENABLE
>> >        select S3C_DEV_RTC
>> >        select S3C_DEV_WDT
>> > -       select HAVE_S3C_RTC
>> >        select HAVE_S3C2410_WATCHDOG
>> >        help
>> >          Machine support for Samsung SMDKC110
>> > --
>
> 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 2/8] ARM: S5PV310: Add new CPU initialization support

2010-07-21 Thread Kyungmin Park
On Wed, Jul 21, 2010 at 9:55 PM, Kukjin Kim  wrote:
> Kyungmin Park wrote:
>>
>> On Tue, Jul 20, 2010 at 9:11 PM, Kukjin Kim  wrote:
>> > From: Changhwan Youn 
>> >
>> > This patch adds Samsung S5PV310/S5PC210 CPU support.
>> > The S5PV310/S5PC210 integrates a ARM Cortex A9 multi-core.
>> >
>> > Signed-off-by: Changhwan Youn 
>> > Signed-off-by: Jongpill Lee 
>> > Signed-off-by: Jiseong Oh 
>> > Signed-off-by: Kukjin Kim 
>> > ---
>> > Changes since v2:
>> > - Re-model platsmp.c on the Versatile Express as per Russell King's
> suggestion.
>> >  And tested on the board.
>> >
>> > - Compared Versatile Express SMP code with Realview SMP code and
> modified
>> as needed.
>> >
>
> Hi,
>
> (snip)
>
>> > +static void arch_detect_cpu(void)
>> > +{
>> > +       /* we do not need to do any cpu detection here at the moment. */
>> > +
>> > +       fifo_mask = S5PV210_UFSTAT_TXMASK;
>> > +       fifo_max = 63 << S5PV210_UFSTAT_TXSHIFT;
>>
>> It's only valid when use the UART1. others 255 for UART0, 15 for others.
>
> Ok..will fix it.
>
> (snip)
>
>> > +#define VMALLOC_END      (0xE000)
>>
>> Increase to 0xF000'. but it will be removed from Eric's patch.
>>
> Right now, the 0xE000 is no problem as default.
> But I will check this is appropriate again.
Since maybe you use the 2g/2g configuration. try to use the 3g/1g
configuration with more the 512MiB.

>
> And according to his '[PATCH 08/13] [ARM] Make VMALLOC_END into a global
> variable if not defined',
> it doesn't mean absolutely remove it. why did you say like that.
>
> +#ifndef VMALLOC_END
> +extern unsigned long vmalloc_end;
> +#define VMALLOC_END (vmalloc_end)
> +#endif
> +
>
> And if required modify it for some machine, you can do it later with
> mach_desc after applying Eric's patch.
> Or as Russell said, there is the way to do it is to specify a vmalloc=
> parameter to the kernel.

I don't have confidence with HIGHMEM with VIPT (it's same as PIPT).
So I want to use lowmem if possible,

>
> (snip)
>
>> > +               /*
>> > +                * Write the address of secondary startup into the
>> > +                * system-wide flags register. The boot monitor waits
>> > +                * until it receives a soft interrupt, and then the
>> > +                * secondary CPU branches to this address.
>> > +                */
>> > +       __raw_writel(BSYM(virt_to_phys(s5pv310_secondary_startup)),
>> S5P_INFORM0);
>>
>> Do you really use the INFORM0? historically it's used for sleep &
>> wakeup. new SoC has several INFORM register. So I recommend to use
>> others.
>>
>
> It doesn't mean we should use INFORM0 for sleep & wakeup even though
> historically used.
> ...I mean it doesn't matter and as you know, just need to sync with
> boot-loader for it.
that's reason I said, we got unused INFORM{3,4,5,...} so if we use it,
no problem.
>
> (snip)
>
>> > +void s3c_i2c0_cfg_gpio(struct platform_device *dev)
>> > +{
>> > +/* will be implemented later */
>> > +}
>>
>> Remove it and send separate patch. e.g.,I2C support on s5pc210.
>>
> I think i2c0 is un-conditionally compiled. So need to add i2c0 support in
> here.
It mean all samsung SoC have i2c0. okay if you want it.
>
> (snip)
>
>> > +#define S5P_VA_COREPERI_BASE   S3C_ADDR(0x0080)
>> > +#define S5P_VA_COREPERI(x)     (S5P_VA_COREPERI_BASE + (x))
>> > +#define S5P_VA_SCU             S5P_VA_COREPERI(0x0)
>> > +#define S5P_VA_GIC_CPU         S5P_VA_COREPERI(0x100)
>> > +#define S5P_VA_TWD             S5P_VA_COREPERI(0x600)
>> > +#define S5P_VA_GIC_DIST                S5P_VA_COREPERI(0x1000)
>> > +
>> > +#define S5P_VA_L2CC            S3C_ADDR(0x0090)
>>
>> I'm not sure it's proper prefix.
>>
> It's no problem.
>
> (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
>
--
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 2/3] ARM: S5PV210: Add support for I2C devices on SMDKV210 and SMDKC110

2010-07-21 Thread Kyungmin Park
which tree do you use? If not fix the s5pv210_IIC2_IRQ correcly, it
can't compile it.
but I'm not see related patch at mailing list.

Thank you,
Kyungmin Park

On Wed, Jul 21, 2010 at 9:58 PM, Kukjin Kim  wrote:
> From: Naveen Krishna Ch 
>
> This patch adds support I2C-0/1/2 devices to the SMDKV210/SMDKC110.
>
> Signed-off-by: Naveen Krishna Ch 
> Signed-off-by: Kukjin Kim 
> ---
> Changes since v1:
> - Fixed the wrong name as per Kyungmin Park's comments
>
>  arch/arm/mach-s5pv210/Kconfig         |    8 
>  arch/arm/mach-s5pv210/mach-smdkc110.c |   28 
>  arch/arm/mach-s5pv210/mach-smdkv210.c |   29 +
>  3 files changed, 65 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-s5pv210/Kconfig b/arch/arm/mach-s5pv210/Kconfig
> index 0761eac..2a996d9 100644
> --- a/arch/arm/mach-s5pv210/Kconfig
> +++ b/arch/arm/mach-s5pv210/Kconfig
> @@ -72,9 +72,13 @@ config MACH_SMDKV210
>        select CPU_S5PV210
>        select ARCH_SPARSEMEM_ENABLE
>        select SAMSUNG_DEV_ADC
> +       select S3C_DEV_I2C1
> +       select S3C_DEV_I2C2
>        select SAMSUNG_DEV_TS
>        select S3C_DEV_WDT
>        select HAVE_S3C2410_WATCHDOG
> +       select S5PV210_SETUP_I2C1
> +       select S5PV210_SETUP_I2C2
>        help
>          Machine support for Samsung SMDKV210
>
> @@ -82,8 +86,12 @@ config MACH_SMDKC110
>        bool "SMDKC110"
>        select CPU_S5PV210
>        select ARCH_SPARSEMEM_ENABLE
> +       select S3C_DEV_I2C1
> +       select S3C_DEV_I2C2
>        select S3C_DEV_WDT
>        select HAVE_S3C2410_WATCHDOG
> +       select S5PV210_SETUP_I2C1
> +       select S5PV210_SETUP_I2C2
>        help
>          Machine support for Samsung SMDKC110
>          S5PC110(MCP) is one of package option of S5PV210
> diff --git a/arch/arm/mach-s5pv210/mach-smdkc110.c 
> b/arch/arm/mach-s5pv210/mach-smdkc110.c
> index 4c8903c..fcd475f 100644
> --- a/arch/arm/mach-s5pv210/mach-smdkc110.c
> +++ b/arch/arm/mach-s5pv210/mach-smdkc110.c
> @@ -12,6 +12,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
>
>  #include 
>  #include 
> @@ -25,6 +26,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
>
>  /* Following are default values for UCON, ULCON and UFCON UART registers */
>  #define S5PV210_UCON_DEFAULT   (S3C2410_UCON_TXILEVEL |        \
> @@ -74,9 +76,24 @@ static struct s3c2410_uartcfg smdkv210_uartcfgs[] 
> __initdata = {
>  static struct platform_device *smdkc110_devices[] __initdata = {
>        &s5pv210_device_iis0,
>        &s5pv210_device_ac97,
> +       &s3c_device_i2c0,
> +       &s3c_device_i2c1,
> +       &s3c_device_i2c2,
>        &s3c_device_wdt,
>  };
>
> +static struct i2c_board_info smdkc110_i2c_devs0[] __initdata = {
> +       { I2C_BOARD_INFO("24c08", 0x50), },     /* Samsung S524AD0XD1 */
> +};
> +
> +static struct i2c_board_info smdkc110_i2c_devs1[] __initdata = {
> +       /* To Be Updated */
> +};
> +
> +static struct i2c_board_info smdkc110_i2c_devs2[] __initdata = {
> +       /* To Be Updated */
> +};
> +
>  static void __init smdkc110_map_io(void)
>  {
>        s5p_init_io(NULL, 0, S5P_VA_CHIPID);
> @@ -86,6 +103,17 @@ static void __init smdkc110_map_io(void)
>
>  static void __init smdkc110_machine_init(void)
>  {
> +       /* I2C */
> +       s3c_i2c0_set_platdata(NULL);
> +       s3c_i2c1_set_platdata(NULL);
> +       s3c_i2c2_set_platdata(NULL);
> +       i2c_register_board_info(0, smdkc110_i2c_devs0,
> +                       ARRAY_SIZE(smdkc110_i2c_devs0));
> +       i2c_register_board_info(1, smdkc110_i2c_devs1,
> +                       ARRAY_SIZE(smdkc110_i2c_devs1));
> +       i2c_register_board_info(2, smdkc110_i2c_devs2,
> +                       ARRAY_SIZE(smdkc110_i2c_devs2));
> +
>        platform_add_devices(smdkc110_devices, ARRAY_SIZE(smdkc110_devices));
>  }
>
> diff --git a/arch/arm/mach-s5pv210/mach-smdkv210.c 
> b/arch/arm/mach-s5pv210/mach-smdkv210.c
> index 0d46279..765f47e 100644
> --- a/arch/arm/mach-s5pv210/mach-smdkv210.c
> +++ b/arch/arm/mach-s5pv210/mach-smdkv210.c
> @@ -10,6 +10,7 @@
>
>  #include 
>  #include 
> +#include 
>  #include 
>  #include 
>
> @@ -27,6 +28,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
>
>  /* Following are default values for UCON, ULCON and UFCON UART registers */
>  #define S5PV210_UCON_DEFAULT   (S3C2410_UCON_TXILEVEL |        \
> @@ -77,10 +79,25 @@ static struct platform_device *smdkv210_devices[] 
> __initdata = {
>        &s5pv210_device_iis0,
>        &s5pv210

Re: [PATCH] ARM: SAMSUNG: Make RTC driver dependency SoC specific instead of machine specific

2010-07-21 Thread Kyungmin Park
I don't see the Samsung SoCs don't have RTC feature.

I think S3C_RTC only depends on PLAT_SAMSUNG so PLAT_SAMSUNG select
HAVE_S3C_RTC is enough.

Thank you,
Kyungmin Park

On Wed, Jul 21, 2010 at 6:00 PM, Kukjin Kim  wrote:
> From: Atul Dahiya 
>
> This patch moves the dependency of RTC driver from MACH_XXX(board) to
> ARCH_XXX(SoC). This will enable all machines using Samsung S5P6440, S5PC100
> and S5PV210 SoCs to use RTC driver by default.
>
> Signed-off-by: Atul Dahiya 
> Signed-off-by: Kukjin Kim 
> ---
>  arch/arm/Kconfig              |    3 +++
>  arch/arm/mach-s5p6440/Kconfig |    1 -
>  arch/arm/mach-s5pc100/Kconfig |    1 -
>  arch/arm/mach-s5pv210/Kconfig |    2 --
>  4 files changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index 98922f7..ea668a4 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -672,6 +672,7 @@ config ARCH_S5P6440
>        select GENERIC_GPIO
>        select HAVE_CLK
>        select ARCH_USES_GETTIMEOFFSET
> +       select HAVE_S3C_RTC
>        help
>          Samsung S5P6440 CPU based systems
>
> @@ -691,6 +692,7 @@ config ARCH_S5PC100
>        select CPU_V7
>        select ARM_L1_CACHE_SHIFT_6
>        select ARCH_USES_GETTIMEOFFSET
> +       select HAVE_S3C_RTC
>        help
>          Samsung S5PC100 series based systems
>
> @@ -701,6 +703,7 @@ config ARCH_S5PV210
>        select HAVE_CLK
>        select ARM_L1_CACHE_SHIFT_6
>        select ARCH_USES_GETTIMEOFFSET
> +       select HAVE_S3C_RTC
>        help
>          Samsung S5PV210/S5PC110 series based systems
>
> diff --git a/arch/arm/mach-s5p6440/Kconfig b/arch/arm/mach-s5p6440/Kconfig
> index b2d4716..de8f08d 100644
> --- a/arch/arm/mach-s5p6440/Kconfig
> +++ b/arch/arm/mach-s5p6440/Kconfig
> @@ -20,7 +20,6 @@ config MACH_SMDK6440
>        select SAMSUNG_DEV_ADC
>        select S3C_DEV_RTC
>        select S3C_DEV_WDT
> -       select HAVE_S3C_RTC
>        select HAVE_S3C2410_WATCHDOG
>        help
>          Machine support for the Samsung SMDK6440
> diff --git a/arch/arm/mach-s5pc100/Kconfig b/arch/arm/mach-s5pc100/Kconfig
> index 2602895..e9c3d98 100644
> --- a/arch/arm/mach-s5pc100/Kconfig
> +++ b/arch/arm/mach-s5pc100/Kconfig
> @@ -48,7 +48,6 @@ config MACH_SMDKC100
>        select S5PC100_SETUP_FB_24BPP
>        select S5PC100_SETUP_I2C1
>        select S5PC100_SETUP_SDHCI
> -       select HAVE_S3C_RTC
>        help
>          Machine support for the Samsung SMDKC100
>
> diff --git a/arch/arm/mach-s5pv210/Kconfig b/arch/arm/mach-s5pv210/Kconfig
> index 04597cc..7f029d1 100644
> --- a/arch/arm/mach-s5pv210/Kconfig
> +++ b/arch/arm/mach-s5pv210/Kconfig
> @@ -75,7 +75,6 @@ config MACH_SMDKV210
>        select SAMSUNG_DEV_TS
>        select S3C_DEV_RTC
>        select S3C_DEV_WDT
> -       select HAVE_S3C_RTC
>        select HAVE_S3C2410_WATCHDOG
>        help
>          Machine support for Samsung SMDKV210
> @@ -86,7 +85,6 @@ config MACH_SMDKC110
>        select ARCH_SPARSEMEM_ENABLE
>        select S3C_DEV_RTC
>        select S3C_DEV_WDT
> -       select HAVE_S3C_RTC
>        select HAVE_S3C2410_WATCHDOG
>        help
>          Machine support for Samsung SMDKC110
> --
> 1.6.2.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" 
> in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v3 2/8] ARM: S5PV310: Add new CPU initialization support

2010-07-20 Thread Kyungmin Park
On Tue, Jul 20, 2010 at 9:11 PM, Kukjin Kim  wrote:
> From: Changhwan Youn 
>
> This patch adds Samsung S5PV310/S5PC210 CPU support.
> The S5PV310/S5PC210 integrates a ARM Cortex A9 multi-core.
>
> Signed-off-by: Changhwan Youn 
> Signed-off-by: Jongpill Lee 
> Signed-off-by: Jiseong Oh 
> Signed-off-by: Kukjin Kim 
> ---
> Changes since v2:
> - Re-model platsmp.c on the Versatile Express as per Russell King's 
> suggestion.
>  And tested on the board.
>
> - Compared Versatile Express SMP code with Realview SMP code and modified as 
> needed.
>
>  arch/arm/mach-s5pv310/cpu.c                      |  122 ++
>  arch/arm/mach-s5pv310/headsmp.S                  |   41 +
>  arch/arm/mach-s5pv310/include/mach/debug-macro.S |   36 
>  arch/arm/mach-s5pv310/include/mach/entry-macro.S |   84 ++
>  arch/arm/mach-s5pv310/include/mach/gpio.h        |  135 +++
>  arch/arm/mach-s5pv310/include/mach/hardware.h    |   18 ++
>  arch/arm/mach-s5pv310/include/mach/io.h          |   26 +++
>  arch/arm/mach-s5pv310/include/mach/map.h         |   66 
>  arch/arm/mach-s5pv310/include/mach/memory.h      |   22 +++
>  arch/arm/mach-s5pv310/include/mach/smp.h         |   29 
>  arch/arm/mach-s5pv310/include/mach/system.h      |   22 +++
>  arch/arm/mach-s5pv310/include/mach/timex.h       |   29 
>  arch/arm/mach-s5pv310/include/mach/uncompress.h  |   27 +++
>  arch/arm/mach-s5pv310/include/mach/vmalloc.h     |   22 +++
>  arch/arm/mach-s5pv310/init.c                     |   41 +
>  arch/arm/mach-s5pv310/platsmp.c                  |  192 
> ++
>  arch/arm/mach-s5pv310/setup-i2c0.c               |   20 +++
>  arch/arm/plat-s5p/cpu.c                          |   12 ++
>  arch/arm/plat-s5p/include/plat/map-s5p.h         |   12 ++
>  arch/arm/plat-s5p/include/plat/s5pv310.h         |   33 
>  20 files changed, 989 insertions(+), 0 deletions(-)
>  create mode 100644 arch/arm/mach-s5pv310/cpu.c
>  create mode 100644 arch/arm/mach-s5pv310/headsmp.S
>  create mode 100644 arch/arm/mach-s5pv310/include/mach/debug-macro.S
>  create mode 100644 arch/arm/mach-s5pv310/include/mach/entry-macro.S
>  create mode 100644 arch/arm/mach-s5pv310/include/mach/gpio.h
>  create mode 100644 arch/arm/mach-s5pv310/include/mach/hardware.h
>  create mode 100644 arch/arm/mach-s5pv310/include/mach/io.h
>  create mode 100644 arch/arm/mach-s5pv310/include/mach/map.h
>  create mode 100644 arch/arm/mach-s5pv310/include/mach/memory.h
>  create mode 100644 arch/arm/mach-s5pv310/include/mach/smp.h
>  create mode 100644 arch/arm/mach-s5pv310/include/mach/system.h
>  create mode 100644 arch/arm/mach-s5pv310/include/mach/timex.h
>  create mode 100644 arch/arm/mach-s5pv310/include/mach/uncompress.h
>  create mode 100644 arch/arm/mach-s5pv310/include/mach/vmalloc.h
>  create mode 100644 arch/arm/mach-s5pv310/init.c
>  create mode 100644 arch/arm/mach-s5pv310/platsmp.c
>  create mode 100644 arch/arm/mach-s5pv310/setup-i2c0.c
>  create mode 100644 arch/arm/plat-s5p/include/plat/s5pv310.h
>
> diff --git a/arch/arm/mach-s5pv310/cpu.c b/arch/arm/mach-s5pv310/cpu.c
> new file mode 100644
> index 000..196c9f1
> --- /dev/null
> +++ b/arch/arm/mach-s5pv310/cpu.c
> @@ -0,0 +1,122 @@
> +/* linux/arch/arm/mach-s5pv310/cpu.c
> + *
> + * Copyright (c) 2010 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 
> +
> +void __iomem *gic_cpu_base_addr;
> +
> +extern int combiner_init(unsigned int combiner_nr, void __iomem *base,
> +                        unsigned int irq_start);
> +extern void combiner_cascade_irq(unsigned int combiner_nr, unsigned int irq);
> +
> +/* Initial IO mappings */
> +static struct map_desc s5pv310_iodesc[] __initdata = {
> +       {
> +               .virtual        = (unsigned long)S5P_VA_COREPERI_BASE,
> +               .pfn            = __phys_to_pfn(S5PV310_PA_COREPERI),
> +               .length         = SZ_8K,
> +               .type           = MT_DEVICE,
> +       }, {
> +               .virtual        = (unsigned long)S5P_VA_COMBINER_BASE,
> +               .pfn            = __phys_to_pfn(S5PV310_PA_COMBINER),
> +               .length         = SZ_4K,
> +               .type           = MT_DEVICE,
> +       }, {
> +               .virtual        = (unsigned long)S5P_VA_L2CC,
> +               .pfn            = __phys_to_pfn(S5PV310_PA_L2CC),
> +               .length         = SZ_4K,
> +               .type           = MT_DEVICE,
> +       },
> +};
> +
> +static void s5pv310_idle(void)
> +{
> +       if (!need_resched())
> +               cpu_do_idle();
> +
> +       local_irq_enable();
> +}
> +
> +/* s5pv310_map_

Re: [PATCH v3 1/7] ARM: S5PV210: Add a Kconfig entry "S5PC110_EVT0_WORKAROUND"

2010-07-19 Thread Kyungmin Park
On Mon, Jul 19, 2010 at 4:59 PM, Kukjin Kim  wrote:
> MyungJoo Ham wrote:
>>
>> Early S5PC110 (EVT0) chip had some issues required workaround from a
>> kernel. We can add such workaround codes with this Kconfig entry.
>>
>> Signed-off-by: MyungJoo Ham 
>> Signed-off-by: Kyungmin Park 
>> ---
>>  arch/arm/mach-s5pv210/Kconfig |    7 +++
>>  1 files changed, 7 insertions(+), 0 deletions(-)
>>
>> diff --git a/arch/arm/mach-s5pv210/Kconfig b/arch/arm/mach-s5pv210/Kconfig
>> index 631019a..18802e7 100644
>> --- a/arch/arm/mach-s5pv210/Kconfig
>> +++ b/arch/arm/mach-s5pv210/Kconfig
>> @@ -101,4 +101,11 @@ config MACH_SMDKC110
>>         Machine support for Samsung SMDKC110
>>         S5PC110(MCP) is one of package option of S5PV210
>>
>> +config S5PC110_EVT0_WORKAROUND
>> +     bool "S5PC110 Early Chip Workaround (EVT0)"
>> +     help
>> +       Early S5PC110 (so called EVT0) has errata items that should be
>> +       addressed; otherwise the kernel may panic or be locked up. Enable
>> +       this option to execute workaround instructions.
>> +
>>  endif
>> --
>
> As I said earlier, EVT0 is not real chip and not for mass production.
>
> Why do you submit the EVT0 patch which can only available for you?
> It is better to not add code into mainline that is not going to be used.

Did you read the previous mail? I explain that.
The LSI focus the latest SoCs. but we got the early chip and used it.
You see the chip itself but I see the product which used the chips
whether for mass production or not.

Actually it's management and maintenance problem. you only show the
latest codes and chips to outside.
but I want to maintain our board at mainline.

Thank you,
Kyungmin Park
--
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 2/5] ARM: S5P: Added default pll values for APLL 800/1000MHz

2010-07-16 Thread Kyungmin Park
On Sat, Jul 17, 2010 at 12:43 PM, Jassi Brar  wrote:
> On Fri, Jul 16, 2010 at 9:22 PM, Kukjin Kim  wrote:
>> MyungJoo Ham wrote:
>>>
>>> CPUFREQ of S5PV210 uses different APLL settings and we provide
>>> such values for CPUFREQ at pll.h. We have been using differently
>>> between EVT0 and EVT1 machines. Although this version of kernel
>>> assumes that the CPU is EVT1, users may use code for EVT0 later.
>>>
>>> Note that at 1GHz of ARMCLK, APLL should be 1GHz and for other lower
>>> ARMCLK, APLL should be 800MHz.
>>>
>>> Signed-off-by: MyungJoo Ham 
>>> Signed-off-by: Kyungmin Park 
>>> ---
>>>  arch/arm/plat-s5p/include/plat/pll.h |    8 
>>>  1 files changed, 8 insertions(+), 0 deletions(-)
>>>
>>> diff --git a/arch/arm/plat-s5p/include/plat/pll.h
>> b/arch/arm/plat-s5p/include/plat/pll.h
>>> index 7db3227..3112aba 100644
>>> --- a/arch/arm/plat-s5p/include/plat/pll.h
>>> +++ b/arch/arm/plat-s5p/include/plat/pll.h
>>> @@ -21,6 +21,14 @@
>>>
>>>  #include 
>>>
>>> +#ifdef CONFIG_CPU_S5PC110_EVT0_ERRATA
>>
>> Actually, EVT0 is not real chip and not for mass production.
>> So don't use in here.
>
> That was my point in a thread few days ago when I suggested we
> be careful while pushing code upstream.
> Rather than flood mainline Samsung support with any hardware
> we can get our hands on, we need to strategically select
> SoCs (& their versions) and machines so that we have maximum
> overlap of features and, equally important, _users_ of that code.
> That will help us concentrate our efforts on support needed by most
> of the users and devices.

That's point of view from chip vendor. but in my side we made a
product using all chips from evt0, evt1, and fused evt1.
Some product used the evt0 chip already.

I don't say LSI need to support early chip. you focus on the your selected SoC.
The remaining will be done by us.

Thank you,
Kyungmin Park

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


Re: [PATCH v2 2/8] ARM: S5PV310: Add new CPU initialization support

2010-07-16 Thread Kyungmin Park
To Ben,

Now you are working on make a single kernel for s5p series at your git.
The v310 or c210 chip also included in these works.

Previous time Marek sent the mail if you are busy with other works, he
can help it.

Give your opinions.

TO Changhwan or Kukjin

Did you see the ben's work? If yes, can you make it similar way?

Thank you,
Kyungmin Park


On Fri, Jul 16, 2010 at 8:52 PM, Russell King - ARM Linux
 wrote:
> On Fri, Jul 16, 2010 at 05:58:28PM +0900, Kukjin Kim wrote:
>> diff --git a/arch/arm/mach-s5pv310/platsmp.c 
>> b/arch/arm/mach-s5pv310/platsmp.c
>> new file mode 100644
>> index 000..9325ac2
>> --- /dev/null
>> +++ b/arch/arm/mach-s5pv310/platsmp.c
>> @@ -0,0 +1,212 @@
>> +/* linux/arch/arm/mach-s5pv310/platsmp.c
>> + *
>> + * Copyright (c) 2010 Samsung Electronics Co., Ltd.
>> + *           http://www.samsung.com/
>> + *
>> + * Cloned from linux/arch/arm/mach-realview/platsmp.c
>> + *
>> + *  Copyright (C) 2002 ARM Ltd.
>> + *  All Rights Reserved
>> + *
>> + * 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 
>> +
>> +extern void s5pv310_secondary_startup(void);
>> +
>> +/*
>> + * control for which core is the next to come out of the secondary
>> + * boot "holding pen"
>> + */
>> +volatile int __cpuinitdata pen_release = -1;
>> +
>> +static void __iomem *scu_base_addr(void)
>> +{
>> +     return (void __iomem *)(S5P_VA_SCU);
>> +}
>> +
>> +static inline unsigned int get_core_count(void)
>> +{
>> +     void __iomem *scu_base = scu_base_addr();
>> +     if (scu_base)
>> +             return scu_get_core_count(scu_base);
>> +     return 1;
>> +}
>> +
>> +static DEFINE_SPINLOCK(boot_lock);
>> +
>> +void __cpuinit platform_secondary_init(unsigned int cpu)
>> +{
>> +     trace_hardirqs_off();
>> +
>> +     /*
>> +      * if any interrupts are already enabled for the primary
>> +      * core (e.g. timer irq), then they will not have been enabled
>> +      * for us: do so
>> +      */
>> +     gic_cpu_init(0, gic_cpu_base_addr);
>> +
>> +     /*
>> +      * let the primary processor know we're out of the
>> +      * pen, then head off into the C entry point
>> +      */
>> +     pen_release = -1;
>> +     smp_wmb();
>> +
>> +     /*
>> +      * Synchronise with the boot thread.
>> +      */
>> +     spin_lock(&boot_lock);
>> +     spin_unlock(&boot_lock);
>> +}
>> +
>> +int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle)
>> +{
>> +     unsigned long timeout;
>> +
>> +     /*
>> +      * set synchronisation state between this boot processor
>> +      * and the secondary one
>> +      */
>> +     spin_lock(&boot_lock);
>> +
>> +     /*
>> +      * The secondary processor is waiting to be released from
>> +      * the holding pen - release it, then wait for it to flag
>> +      * that it has been released by resetting pen_release.
>> +      *
>> +      * Note that "pen_release" is the hardware CPU ID, whereas
>> +      * "cpu" is Linux's internal ID.
>> +      */
>> +     pen_release = cpu;
>> +     flush_cache_all();
>> +
>> +     /*
>> +      * XXX
>> +      *
>> +      * This is a later addition to the booting protocol: the
>> +      * bootMonitor now puts secondary cores into WFI, so
>> +      * poke_milo() no longer gets the cores moving; we need
>> +      * to send a soft interrupt to wake the secondary core.
>> +      * Use smp_cross_call() for this, since there's little
>> +      * point duplicating the code here
>> +      */
>> +     smp_cross_call(cpumask_of(cpu));
>> +
>> +     timeout = jiffies + (1 * HZ);
>> +     while (time_before(jiffies, timeout)) {
>> +             smp_rmb();
>> +             if (pen_release == -1)
>> +                     break;
>> +
>> +             udelay(10);
>> +     }
>> +
>> +     /*
>> +      * now the secondary core is starting up let 

Re: [PATCH v2 2/5] ARM: S5P: Added default pll values for APLL 800/1000MHz

2010-07-16 Thread Kyungmin Park
On Fri, Jul 16, 2010 at 9:22 PM, Kukjin Kim  wrote:
> MyungJoo Ham wrote:
>>
>> CPUFREQ of S5PV210 uses different APLL settings and we provide
>> such values for CPUFREQ at pll.h. We have been using differently
>> between EVT0 and EVT1 machines. Although this version of kernel
>> assumes that the CPU is EVT1, users may use code for EVT0 later.
>>
>> Note that at 1GHz of ARMCLK, APLL should be 1GHz and for other lower
>> ARMCLK, APLL should be 800MHz.
>>
>> Signed-off-by: MyungJoo Ham 
>> Signed-off-by: Kyungmin Park 
>> ---
>>  arch/arm/plat-s5p/include/plat/pll.h |    8 
>>  1 files changed, 8 insertions(+), 0 deletions(-)
>>
>> diff --git a/arch/arm/plat-s5p/include/plat/pll.h
> b/arch/arm/plat-s5p/include/plat/pll.h
>> index 7db3227..3112aba 100644
>> --- a/arch/arm/plat-s5p/include/plat/pll.h
>> +++ b/arch/arm/plat-s5p/include/plat/pll.h
>> @@ -21,6 +21,14 @@
>>
>>  #include 
>>
>> +#ifdef CONFIG_CPU_S5PC110_EVT0_ERRATA
>
> Actually, EVT0 is not real chip and not for mass production.
> So don't use in here.

But we got too many board and want to use it. ARM core is also has
some workaround to fix internal bug. so you can regard it.

config S5PC110_WORKAROUND
help
Early s5pc110 has some errata blah blah ... To fix it you can enable it.

Thank you,
Kyungmin Park

>
>> +#define PLL45XX_APLL_VAL_1000        (1 << 31) | (0xfa<<16) | (0x6<<8) |
> (0x1)
>> +#define PLL45XX_APLL_VAL_800 (1 << 31) | (0xc8<<16) | (0x6<<8) | (0x1)
>> +#else
>> +#define PLL45XX_APLL_VAL_1000        (1 << 31) | (125<<16) | (3<<8) | (1)
>> +#define PLL45XX_APLL_VAL_800 (1 << 31) | (100<<16) | (3<<8) | (1)
>> +#endif
>> +
>>  enum pll45xx_type_t {
>>       pll_4500,
>>       pll_4502,
>> --
>
> And...I got the below result from scripts/checkpatch.pl.
>
> --
>
> ERROR: Macros with complex values should be enclosed in parenthesis
> #27: FILE: arch/arm/plat-s5p/include/plat/pll.h:25:
> +#define PLL45XX_APLL_VAL_1000  (1 << 31) | (0xfa<<16) | (0x6<<8) | (0x1)
>
> ERROR: Macros with complex values should be enclosed in parenthesis
> #28: FILE: arch/arm/plat-s5p/include/plat/pll.h:26:
> +#define PLL45XX_APLL_VAL_800   (1 << 31) | (0xc8<<16) | (0x6<<8) | (0x1)
>
> ERROR: Macros with complex values should be enclosed in parenthesis
> #30: FILE: arch/arm/plat-s5p/include/plat/pll.h:28:
> +#define PLL45XX_APLL_VAL_1000  (1 << 31) | (125<<16) | (3<<8) | (1)
>
> ERROR: Macros with complex values should be enclosed in parenthesis
> #31: FILE: arch/arm/plat-s5p/include/plat/pll.h:29:
> +#define PLL45XX_APLL_VAL_800   (1 << 31) | (100<<16) | (3<<8) | (1)
>
> total: 4 errors, 0 warnings, 14 lines checked
>
> --
>
> I already said to you about that :-(
> See the Documentation/SubmittingPatches...
>
> Thanks.
>
> Best regards,
> Kgene.
> --
> Kukjin Kim , Senior Engineer,
> SW Solution Development Team, Samsung Electronics Co., Ltd.
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" 
> in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2/3] ARM: S5PV210: Add support for I2C devices on SMDKV210 and SMDKC110

2010-07-16 Thread Kyungmin Park
On Fri, Jul 16, 2010 at 10:13 PM, Kukjin Kim  wrote:
> From: Naveen Krishna Ch 
>
> This patch adds support I2C-0/1/2 devices to the SMDKV210/SMDKC110.
>
> Signed-off-by: Naveen Krishna Ch 
> Signed-off-by: Kukjin Kim 
> ---
>  arch/arm/mach-s5pv210/Kconfig         |    8 
>  arch/arm/mach-s5pv210/mach-smdkc110.c |   28 
>  arch/arm/mach-s5pv210/mach-smdkv210.c |   29 +
>  3 files changed, 65 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-s5pv210/Kconfig b/arch/arm/mach-s5pv210/Kconfig
> index 0761eac..2a996d9 100644
> --- a/arch/arm/mach-s5pv210/Kconfig
> +++ b/arch/arm/mach-s5pv210/Kconfig
> @@ -72,9 +72,13 @@ config MACH_SMDKV210
>        select CPU_S5PV210
>        select ARCH_SPARSEMEM_ENABLE
>        select SAMSUNG_DEV_ADC
> +       select S3C_DEV_I2C1
> +       select S3C_DEV_I2C2
>        select SAMSUNG_DEV_TS
>        select S3C_DEV_WDT
>        select HAVE_S3C2410_WATCHDOG
> +       select S5PV210_SETUP_I2C1
> +       select S5PV210_SETUP_I2C2
>        help
>          Machine support for Samsung SMDKV210
>
> @@ -82,8 +86,12 @@ config MACH_SMDKC110
>        bool "SMDKC110"
>        select CPU_S5PV210
>        select ARCH_SPARSEMEM_ENABLE
> +       select S3C_DEV_I2C1
> +       select S3C_DEV_I2C2
>        select S3C_DEV_WDT
>        select HAVE_S3C2410_WATCHDOG
> +       select S5PV210_SETUP_I2C1
> +       select S5PV210_SETUP_I2C2
>        help
>          Machine support for Samsung SMDKC110
>          S5PC110(MCP) is one of package option of S5PV210
> diff --git a/arch/arm/mach-s5pv210/mach-smdkc110.c 
> b/arch/arm/mach-s5pv210/mach-smdkc110.c
> index 4c8903c..420f9a0 100644
> --- a/arch/arm/mach-s5pv210/mach-smdkc110.c
> +++ b/arch/arm/mach-s5pv210/mach-smdkc110.c
> @@ -12,6 +12,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
>
>  #include 
>  #include 
> @@ -25,6 +26,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
>
>  /* Following are default values for UCON, ULCON and UFCON UART registers */
>  #define S5PV210_UCON_DEFAULT   (S3C2410_UCON_TXILEVEL |        \
> @@ -74,9 +76,24 @@ static struct s3c2410_uartcfg smdkv210_uartcfgs[] 
> __initdata = {
>  static struct platform_device *smdkc110_devices[] __initdata = {
>        &s5pv210_device_iis0,
>        &s5pv210_device_ac97,
> +       &s3c_device_i2c0,
> +       &s3c_device_i2c1,
> +       &s3c_device_i2c2,
>        &s3c_device_wdt,
>  };
>
> +static struct i2c_board_info smdkc100_i2c_devs0[] __initdata = {
> +       { I2C_BOARD_INFO("24c08", 0x50), },     /* Samsung S524AD0XD1 */
> +};
> +

why smdkc100?

> +static struct i2c_board_info smdkc100_i2c_devs1[] __initdata = {
> +       /* To Be Updated */
> +};
> +
Ditto

> +static struct i2c_board_info smdkc100_i2c_devs2[] __initdata = {
> +       /* To Be Updated */
> +};
Ditto

Thank you,
Kyungmin Park
> +
>  static void __init smdkc110_map_io(void)
>  {
>        s5p_init_io(NULL, 0, S5P_VA_CHIPID);
> @@ -86,6 +103,17 @@ static void __init smdkc110_map_io(void)
>
>  static void __init smdkc110_machine_init(void)
>  {
> +       /* I2C */
> +       s3c_i2c0_set_platdata(NULL);
> +       s3c_i2c1_set_platdata(NULL);
> +       s3c_i2c2_set_platdata(NULL);
> +       i2c_register_board_info(0, smdkc100_i2c_devs0,
> +                       ARRAY_SIZE(smdkc100_i2c_devs0));
> +       i2c_register_board_info(1, smdkc100_i2c_devs1,
> +                       ARRAY_SIZE(smdkc100_i2c_devs1));
> +       i2c_register_board_info(2, smdkc100_i2c_devs2,
> +                       ARRAY_SIZE(smdkc100_i2c_devs2));
> +
>        platform_add_devices(smdkc110_devices, ARRAY_SIZE(smdkc110_devices));
>  }
>
> diff --git a/arch/arm/mach-s5pv210/mach-smdkv210.c 
> b/arch/arm/mach-s5pv210/mach-smdkv210.c
> index 0d46279..765f47e 100644
> --- a/arch/arm/mach-s5pv210/mach-smdkv210.c
> +++ b/arch/arm/mach-s5pv210/mach-smdkv210.c
> @@ -10,6 +10,7 @@
>
>  #include 
>  #include 
> +#include 
>  #include 
>  #include 
>
> @@ -27,6 +28,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
>
>  /* Following are default values for UCON, ULCON and UFCON UART registers */
>  #define S5PV210_UCON_DEFAULT   (S3C2410_UCON_TXILEVEL |        \
> @@ -77,10 +79,25 @@ static struct platform_device *smdkv210_devices[] 
> __initdata = {
>        &s5pv210_device_iis0,
>        &s5pv210_device_ac97,
>        &s3c_device_adc,
> +       &s3c_device_i2c0,
> +       &s3c_device_i2c1,
> +       &s3c_device_i2c2,
>        &s3c_device_ts,
>        &s3c_devic

Re: [PATCH 3/3] i2c/busses: Select I2C bus support for S5PV210 and S5P6440.

2010-07-16 Thread Kyungmin Park
On Fri, Jul 16, 2010 at 10:13 PM, Kukjin Kim  wrote:
> From: Naveen Krishna Ch 
>
> This patch is to select support I2C channels 0, 1 and 2 for S5PV210 and 
> S5P6440.
>
> Signed-off-by: Naveen Krishna Ch 
> Signed-off-by: Kukjin Kim 
> ---
>  drivers/i2c/busses/Kconfig |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig
> index bceafbf..e553fe8 100644
> --- a/drivers/i2c/busses/Kconfig
> +++ b/drivers/i2c/busses/Kconfig
> @@ -523,7 +523,7 @@ config I2C_PXA_SLAVE
>
>  config I2C_S3C2410
>        tristate "S3C2410 I2C Driver"
> -       depends on ARCH_S3C2410 || ARCH_S3C64XX
> +       depends on ARCH_S3C2410 || ARCH_S3C64XX || ARCH_S5PV210 || 
> ARCH_S5P6440

Are there any SoCs don't have i2c? If no, how about to just depends on
PLAT_SAMSUNG.

Thank you,
Kyungmin Park
>        help
>          Say Y here to include support for I2C controller in the
>          Samsung S3C2410 based System-on-Chip devices.
> --
> 1.6.2.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" 
> in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 0/3] Add support I2C devices on SMDK6440, SMDKC110 and SMDKV210

2010-07-16 Thread Kyungmin Park
Maybe it requires the s5pc210(s5pv310) support also.
As you know s5pc210 has 8 I2Cs. the problem is that current
implementation need each i2c device gpio setup and Kconfig
Do you think it's reasonable?

I think we need to find a good way to solve this issue. do you have any idea?

Thank you,
Kyungmin Park

On Fri, Jul 16, 2010 at 10:13 PM, Kukjin Kim  wrote:
> This patches is to support I2C devices on SMDK6440, SMDKC110 and SMDKV210.
> S5P6440 can support I2C channel 0 and 1, and S5PV210/S5PC110 can support
> I2C channel 0, 1 and 2.
>
> [PATCH 1/3] ARM: S5P6440: Add support for I2C channel 0 and 1 on SMDK6440
> [PATCH 2/3] ARM: S5PV210: Add support for I2C devices on SMDKV210 and SMDKC110
> [PATCH 3/3] i2c/busses: Select I2C bus support for S5PV210 and S5P6440.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" 
> in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 2/8] ARM: S5PV310: Add new CPU initialization support

2010-07-16 Thread Kyungmin Park
On Fri, Jul 16, 2010 at 5:58 PM, Kukjin Kim  wrote:
> From: Changhwan Youn 
>
> This patch adds Samsung's S5PV310/S5PC210 CPU support.
> The S5PV310/S5PC210 integrates a ARM Cortex A9 multi-core.
>
> Signed-off-by: Changhwan Youn 
> Signed-off-by: Jongpill Lee 
> Signed-off-by: Kukjin Kim 
> ---
>  arch/arm/mach-s5pv310/cpu.c                      |  122 +
>  arch/arm/mach-s5pv310/headsmp.S                  |   41 
>  arch/arm/mach-s5pv310/include/mach/debug-macro.S |   36 
>  arch/arm/mach-s5pv310/include/mach/entry-macro.S |   84 +
>  arch/arm/mach-s5pv310/include/mach/gpio.h        |  135 ++
>  arch/arm/mach-s5pv310/include/mach/hardware.h    |   18 ++
>  arch/arm/mach-s5pv310/include/mach/io.h          |   26 +++
>  arch/arm/mach-s5pv310/include/mach/map.h         |   66 +++
>  arch/arm/mach-s5pv310/include/mach/memory.h      |   22 +++
>  arch/arm/mach-s5pv310/include/mach/smp.h         |   29 +++
>  arch/arm/mach-s5pv310/include/mach/system.h      |   22 +++
>  arch/arm/mach-s5pv310/include/mach/timex.h       |   29 +++
>  arch/arm/mach-s5pv310/include/mach/uncompress.h  |   27 +++
>  arch/arm/mach-s5pv310/include/mach/vmalloc.h     |   22 +++
>  arch/arm/mach-s5pv310/init.c                     |   41 
>  arch/arm/mach-s5pv310/platsmp.c                  |  212 
> ++
>  arch/arm/mach-s5pv310/setup-i2c0.c               |   20 ++
>  arch/arm/plat-s5p/cpu.c                          |   12 ++
>  arch/arm/plat-s5p/include/plat/map-s5p.h         |   12 ++
>  arch/arm/plat-s5p/include/plat/s5pv310.h         |   33 
>  20 files changed, 1009 insertions(+), 0 deletions(-)
>  create mode 100644 arch/arm/mach-s5pv310/cpu.c
>  create mode 100644 arch/arm/mach-s5pv310/headsmp.S
>  create mode 100644 arch/arm/mach-s5pv310/include/mach/debug-macro.S
>  create mode 100644 arch/arm/mach-s5pv310/include/mach/entry-macro.S
>  create mode 100644 arch/arm/mach-s5pv310/include/mach/gpio.h
>  create mode 100644 arch/arm/mach-s5pv310/include/mach/hardware.h
>  create mode 100644 arch/arm/mach-s5pv310/include/mach/io.h
>  create mode 100644 arch/arm/mach-s5pv310/include/mach/map.h
>  create mode 100644 arch/arm/mach-s5pv310/include/mach/memory.h
>  create mode 100644 arch/arm/mach-s5pv310/include/mach/smp.h
>  create mode 100644 arch/arm/mach-s5pv310/include/mach/system.h
>  create mode 100644 arch/arm/mach-s5pv310/include/mach/timex.h
>  create mode 100644 arch/arm/mach-s5pv310/include/mach/uncompress.h
>  create mode 100644 arch/arm/mach-s5pv310/include/mach/vmalloc.h
>  create mode 100644 arch/arm/mach-s5pv310/init.c
>  create mode 100644 arch/arm/mach-s5pv310/platsmp.c
>  create mode 100644 arch/arm/mach-s5pv310/setup-i2c0.c
>  create mode 100644 arch/arm/plat-s5p/include/plat/s5pv310.h
>
> diff --git a/arch/arm/mach-s5pv310/cpu.c b/arch/arm/mach-s5pv310/cpu.c
> new file mode 100644
> index 000..196c9f1
> --- /dev/null
> +++ b/arch/arm/mach-s5pv310/cpu.c
> @@ -0,0 +1,122 @@
> +/* linux/arch/arm/mach-s5pv310/cpu.c
> + *
> + * Copyright (c) 2010 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 
> +
> +void __iomem *gic_cpu_base_addr;
> +
> +extern int combiner_init(unsigned int combiner_nr, void __iomem *base,
> +                        unsigned int irq_start);
> +extern void combiner_cascade_irq(unsigned int combiner_nr, unsigned int irq);
> +
> +/* Initial IO mappings */
> +static struct map_desc s5pv310_iodesc[] __initdata = {
> +       {
> +               .virtual        = (unsigned long)S5P_VA_COREPERI_BASE,
> +               .pfn            = __phys_to_pfn(S5PV310_PA_COREPERI),
> +               .length         = SZ_8K,
> +               .type           = MT_DEVICE,
> +       }, {
> +               .virtual        = (unsigned long)S5P_VA_COMBINER_BASE,
> +               .pfn            = __phys_to_pfn(S5PV310_PA_COMBINER),
> +               .length         = SZ_4K,
> +               .type           = MT_DEVICE,
> +       }, {
> +               .virtual        = (unsigned long)S5P_VA_L2CC,
> +               .pfn            = __phys_to_pfn(S5PV310_PA_L2CC),
> +               .length         = SZ_4K,
> +               .type           = MT_DEVICE,
> +       },
> +};
> +
> +static void s5pv310_idle(void)
> +{
> +       if (!need_resched())
> +               cpu_do_idle();
> +
> +       local_irq_enable();
> +}
> +
> +/* s5pv310_map_io
> + *
> + * register the standard cpu IO areas
> +*/
> +void __init s5pv310_map_io(void)
> +{
> +       iotable_init(s5pv310_iodesc, ARRAY_SIZE(s5pv310_iodesc));
> +}
> +
> +void __init s5pv310_init_clocks(int xtal)
> +{
> +       printk(KERN_DEBUG "%s: initi

Re: [PATCH v2 7/8] ARM: S5PV310: Add Board support file

2010-07-16 Thread Kyungmin Park
On Fri, Jul 16, 2010 at 5:58 PM, Kukjin Kim  wrote:
> From: Changhwan Youn 
>
> This patch adds Samsung SMDKV310 board support file.
>
> Signed-off-by: Changhwan Youn 
> Signed-off-by: Kukjin Kim 
> ---
>  arch/arm/mach-s5pv310/Makefile        |    4 ++
>  arch/arm/mach-s5pv310/mach-smdkv310.c |   92 
> +
>  2 files changed, 96 insertions(+), 0 deletions(-)
>  create mode 100644 arch/arm/mach-s5pv310/mach-smdkv310.c
>
> diff --git a/arch/arm/mach-s5pv310/Makefile b/arch/arm/mach-s5pv310/Makefile
> index 1b263a5..56e7693 100644
> --- a/arch/arm/mach-s5pv310/Makefile
> +++ b/arch/arm/mach-s5pv310/Makefile
> @@ -18,3 +18,7 @@ obj-$(CONFIG_CPU_S5PV310)     += setup-i2c0.o time.o
>  obj-$(CONFIG_SMP)              += platsmp.o headsmp.o
>  obj-$(CONFIG_LOCAL_TIMERS)     += localtimer.o
>  obj-$(CONFIG_HOTPLUG_CPU)      += hotplug.o
> +
> +# machine support
> +
> +obj-$(CONFIG_MACH_SMDKV310)    += mach-smdkv310.o
> diff --git a/arch/arm/mach-s5pv310/mach-smdkv310.c 
> b/arch/arm/mach-s5pv310/mach-smdkv310.c
> new file mode 100644
> index 000..0d6ab77
> --- /dev/null
> +++ b/arch/arm/mach-s5pv310/mach-smdkv310.c
> @@ -0,0 +1,92 @@
> +/* linux/arch/arm/mach-s5pv310/mach-smdkv310.c
> + *
> + * Copyright (c) 2010 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 
> +
> +/* Following are default values for UCON, ULCON and UFCON UART registers */
> +#define SMDKV310_UCON_DEFAULT  (S3C2410_UCON_TXILEVEL |        \
> +                                S3C2410_UCON_RXILEVEL |        \
> +                                S3C2410_UCON_TXIRQMODE |       \
> +                                S3C2410_UCON_RXIRQMODE |       \
> +                                S3C2410_UCON_RXFIFO_TOI |      \
> +                                S3C2443_UCON_RXERR_IRQEN)
> +
> +#define SMDKV310_ULCON_DEFAULT S3C2410_LCON_CS8
> +
> +#define SMDKV310_UFCON_DEFAULT (S3C2410_UFCON_FIFOMODE |       \
> +                                S5PV210_UFCON_TXTRIG4 |        \
> +                                S5PV210_UFCON_RXTRIG4)

UART supports the 16 triggers at 2/3. No need to setup the lower value.

> +
> +static struct s3c2410_uartcfg smdkv310_uartcfgs[] __initdata = {
> +       [0] = {
> +               .hwport         = 0,
> +               .flags          = 0,

Please remove unused flags filed.
Previous time Mr. Shim sent the related patch.

> +               .ucon           = SMDKV310_UCON_DEFAULT,
> +               .ulcon          = SMDKV310_ULCON_DEFAULT,
> +               .ufcon          = SMDKV310_UFCON_DEFAULT,
> +       },
> +       [1] = {
> +               .hwport         = 1,
> +               .flags          = 0,
> +               .ucon           = SMDKV310_UCON_DEFAULT,
> +               .ulcon          = SMDKV310_ULCON_DEFAULT,
> +               .ufcon          = SMDKV310_UFCON_DEFAULT,
> +       },
> +       [2] = {
> +               .hwport         = 2,
> +               .flags          = 0,
> +               .ucon           = SMDKV310_UCON_DEFAULT,
> +               .ulcon          = SMDKV310_ULCON_DEFAULT,
> +               .ufcon          = SMDKV310_UFCON_DEFAULT,
> +       },
> +       [3] = {
> +               .hwport         = 3,
> +               .flags          = 0,
> +               .ucon           = SMDKV310_UCON_DEFAULT,
> +               .ulcon          = SMDKV310_ULCON_DEFAULT,
> +               .ufcon          = SMDKV310_UFCON_DEFAULT,
> +       },
> +};
> +
> +static void __init smdkv310_map_io(void)
> +{
> +       s5p_init_io(NULL, 0, S5P_VA_CHIPID);
> +       s3c24xx_init_clocks(2400);
> +       s3c24xx_init_uarts(smdkv310_uartcfgs, ARRAY_SIZE(smdkv310_uartcfgs));
> +}
> +
> +static void __init smdkv310_machine_init(void)
> +{
> +#ifdef CONFIG_CACHE_L2X0
> +       l2x0_init(S5P_VA_L2CC, 1 << 28, 0x);
> +#endif
> +}
> +
> +MACHINE_START(SMDKV310, "SMDKV310")
> +       /* Maintainer: Kukjin Kim  */
> +       /* Maintainer: Changhwan Youn  */
> +       .phys_io        = S3C_PA_UART & 0xfff0,
> +       .io_pg_offst    = (((u32)S3C_VA_UART) >> 18) & 0xfffc,
> +       .boot_params    = S5P_PA_SDRAM + 0x100,
> +       .init_irq       = s5pv310_init_irq,
> +       .map_io         = smdkv310_map_io,
> +       .init_machine   = smdkv310_machine_init,
> +       .timer          = &s5pv310_timer,
> +MACHINE_END
> --
> 1.6.2.5
>
>
> ___
> linux-arm-kernel mailing list
> linux-arm-ker...@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.or

Re: [PATCH v2 5/8] ARM: S5PV310: Add Timer support

2010-07-16 Thread Kyungmin Park
On Fri, Jul 16, 2010 at 5:58 PM, Kukjin Kim  wrote:
> From: Changhwan Youn 
>
> This patch adds timer support for S5PV310.
> Until now, all S5P SoCs use CONFIG_ARCH_USES_GETTIMEOFFSET macro as a default
> configuration. Instead, S5PV310 implements clocksource and clock_event_device
> to support the high resolution timer and tickless system.
>
> Signed-off-by: Changhwan Youn 
> Signed-off-by: Hyuk Lee 
> Signed-off-by: Kukjin Kim 
> ---
>  arch/arm/mach-s5pv310/include/mach/pwm-clock.h |   70 ++
>  arch/arm/mach-s5pv310/localtimer.c             |   25 ++
>  arch/arm/mach-s5pv310/time.c                   |  287 
> 
>  arch/arm/plat-s5p/include/plat/s5pv310.h       |    1 +
>  arch/arm/plat-samsung/Makefile                 |    2 +-
>  5 files changed, 384 insertions(+), 1 deletions(-)
>  create mode 100644 arch/arm/mach-s5pv310/include/mach/pwm-clock.h
>  create mode 100644 arch/arm/mach-s5pv310/localtimer.c
>  create mode 100644 arch/arm/mach-s5pv310/time.c
>
> diff --git a/arch/arm/mach-s5pv310/include/mach/pwm-clock.h 
> b/arch/arm/mach-s5pv310/include/mach/pwm-clock.h
> new file mode 100644
> index 000..7e6da27
> --- /dev/null
> +++ b/arch/arm/mach-s5pv310/include/mach/pwm-clock.h
> @@ -0,0 +1,70 @@
> +/* linux/arch/arm/mach-s5pv310/include/mach/pwm-clock.h
> + *
> + * Copyright (c) 2010 Samsung Electronics Co., Ltd.
> + *             http://www.samsung.com/
> + *
> + * Copyright 2008 Openmoko, Inc.
> + * Copyright 2008 Simtec Electronics
> + *      Ben Dooks 
> + *      http://armlinux.simtec.co.uk/
> + *
> + * Based on arch/arm/mach-s3c64xx/include/mach/pwm-clock.h
> + *
> + * S5PV310 - pwm clock and timer 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.
> +*/
> +
> +#ifndef __ASM_ARCH_PWMCLK_H
> +#define __ASM_ARCH_PWMCLK_H __FILE__
> +
> +/**
> + * pwm_cfg_src_is_tclk() - return whether the given mux config is a tclk
> + * @tcfg: The timer TCFG1 register bits shifted down to 0.
> + *
> + * Return true if the given configuration from TCFG1 is a TCLK instead
> + * any of the TDIV clocks.
> + */
> +static inline int pwm_cfg_src_is_tclk(unsigned long tcfg)
> +{
> +       return tcfg == S3C64XX_TCFG1_MUX_TCLK;
> +}
> +
> +/**
> + * tcfg_to_divisor() - convert tcfg1 setting to a divisor
> + * @tcfg1: The tcfg1 setting, shifted down.
> + *
> + * Get the divisor value for the given tcfg1 setting. We assume the
> + * caller has already checked to see if this is not a TCLK source.
> + */
> +static inline unsigned long tcfg_to_divisor(unsigned long tcfg1)
> +{
> +       return 1 << tcfg1;
> +}
> +
> +/**
> + * pwm_tdiv_has_div1() - does the tdiv setting have a /1
> + *
> + * Return true if we have a /1 in the tdiv setting.
> + */
> +static inline unsigned int pwm_tdiv_has_div1(void)
> +{
> +       return 1;
> +}
> +
> +/**
> + * pwm_tdiv_div_bits() - calculate TCFG1 divisor value.
> + * @div: The divisor to calculate the bit information for.
> + *
> + * Turn a divisor into the necessary bit field for TCFG1.
> + */
> +static inline unsigned long pwm_tdiv_div_bits(unsigned int div)
> +{
> +       return ilog2(div);
> +}
> +
> +#define S3C_TCFG1_MUX_TCLK S3C64XX_TCFG1_MUX_TCLK
> +
> +#endif /* __ASM_ARCH_PWMCLK_H */
> diff --git a/arch/arm/mach-s5pv310/localtimer.c 
> b/arch/arm/mach-s5pv310/localtimer.c
> new file mode 100644
> index 000..2784036
> --- /dev/null
> +++ b/arch/arm/mach-s5pv310/localtimer.c
> @@ -0,0 +1,25 @@
> +/* linux/arch/arm/mach-s5pv310/localtimer.c
> + *
> + * Cloned from linux/arch/arm/mach-realview/localtimer.c
> + *
> + *  Copyright (C) 2002 ARM Ltd.
> + *  All Rights Reserved
> + *
> + * 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 
> +
> +/*
> + * Setup the local clock events for a CPU.
> + */
> +void __cpuinit local_timer_setup(struct clock_event_device *evt)
> +{
> +       evt->irq = IRQ_LOCALTIMER;
> +       twd_timer_setup(evt);
> +}
> diff --git a/arch/arm/mach-s5pv310/time.c b/arch/arm/mach-s5pv310/time.c
> new file mode 100644
> index 000..64accf8
> --- /dev/null
> +++ b/arch/arm/mach-s5pv310/time.c
> @@ -0,0 +1,287 @@
> +/* linux/arch/arm/mach-s5pv310/time.c
> + *
> + * Copyright (c) 2010 Samsung Electronics Co., Ltd.
> + *             http://www.samsung.com
>

Re: [PATCH v2] ARM: s5pv210_defconfig: Update for removing s5pc110_defconfig

2010-07-14 Thread Kyungmin Park
On Wed, Jul 14, 2010 at 10:15 PM, Marek Szyprowski
 wrote:
> Hello,
>
> On Tuesday, July 13, 2010 4:22 AM Kukjin Kim wrote:
>
>> Now that S5PC110 machines and S5PV210 machines can be built into
>> one kernel, update mach-s5pv210/Kconfig and s5pv210_defconfig.
>>
>> Tested on SMDKC110(S5PC110) and SMDKV210(S5PV210).
>> Note that GONI machine ID is not included in the kernel.
>
> Russell finally updated mach-types in his latest kernel tree:
> http://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-2.6-arm.git/
> (master branch).
>
> I've tested this patch with Aquila and GONI boards and it's ok.
>
>> Created and tested against linux-2.6.35-rc5.
>>
>> Signed-off-by: Kukjin Kim 
>
> Acked-by: Marek Szyprowski 
>
>> ---
>> Changes since v1:
>> - This patch re-based against linux-2.6.35-rc5 which includes
>>   'ARM: reduce defconfigs' from Uwe Kleine-Konig.

No need to update board_defconfig since the latest merge removes the
all arm *_defconfig.

Thank you,
Kyungmin Park

>>
>>  arch/arm/configs/s5pc110_defconfig |   66 
>> 
>>  arch/arm/configs/s5pv210_defconfig |    4 ++
>>  arch/arm/mach-s5pv210/Kconfig      |   28 +--
>>  3 files changed, 21 insertions(+), 77 deletions(-)
>>  delete mode 100644 arch/arm/configs/s5pc110_defconfig
>>
>> diff --git a/arch/arm/configs/s5pc110_defconfig
>> b/arch/arm/configs/s5pc110_defconfig
>> deleted file mode 100644
>> index 22c2d14..000
>> --- a/arch/arm/configs/s5pc110_defconfig
>> +++ /dev/null
>> @@ -1,66 +0,0 @@
>> -CONFIG_EXPERIMENTAL=y
>> -CONFIG_SYSFS_DEPRECATED_V2=y
>> -CONFIG_BLK_DEV_INITRD=y
>> -CONFIG_KALLSYMS_ALL=y
>> -CONFIG_MODULES=y
>> -CONFIG_MODULE_UNLOAD=y
>> -# CONFIG_BLK_DEV_BSG is not set
>> -CONFIG_ARCH_S5PV210=y
>> -CONFIG_S3C_LOWLEVEL_UART_PORT=1
>> -CONFIG_MACH_SMDKC110=y
>> -CONFIG_VMSPLIT_2G=y
>> -CONFIG_PREEMPT=y
>> -CONFIG_AEABI=y
>> -CONFIG_CMDLINE="root=/dev/ram0 rw ramdisk=8192 initrd=0x2080,8M
>> console=ttySAC1,115200 init=/linuxrc"
>> -CONFIG_VFP=y
>> -CONFIG_NEON=y
>> -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
>> -CONFIG_BLK_DEV_LOOP=y
>> -CONFIG_BLK_DEV_RAM=y
>> -CONFIG_BLK_DEV_RAM_SIZE=8192
>> -# CONFIG_MISC_DEVICES is not set
>> -CONFIG_SCSI=y
>> -CONFIG_BLK_DEV_SD=y
>> -CONFIG_CHR_DEV_SG=y
>> -CONFIG_INPUT_EVDEV=y
>> -# CONFIG_INPUT_KEYBOARD is not set
>> -# CONFIG_INPUT_MOUSE is not set
>> -CONFIG_INPUT_TOUCHSCREEN=y
>> -CONFIG_SERIAL_8250=y
>> -CONFIG_SERIAL_SAMSUNG=y
>> -CONFIG_SERIAL_SAMSUNG_CONSOLE=y
>> -CONFIG_HW_RANDOM=y
>> -# CONFIG_HWMON is not set
>> -# CONFIG_VGA_CONSOLE is not set
>> -# CONFIG_HID_SUPPORT is not set
>> -# CONFIG_USB_SUPPORT is not set
>> -CONFIG_EXT2_FS=y
>> -CONFIG_INOTIFY=y
>> -CONFIG_MSDOS_FS=y
>> -CONFIG_VFAT_FS=y
>> -CONFIG_TMPFS=y
>> -CONFIG_TMPFS_POSIX_ACL=y
>> -CONFIG_CRAMFS=y
>> -CONFIG_ROMFS_FS=y
>> -CONFIG_PARTITION_ADVANCED=y
>> -CONFIG_BSD_DISKLABEL=y
>> -CONFIG_SOLARIS_X86_PARTITION=y
>> -CONFIG_NLS_CODEPAGE_437=y
>> -CONFIG_NLS_ASCII=y
>> -CONFIG_NLS_ISO8859_1=y
>> -CONFIG_MAGIC_SYSRQ=y
>> -CONFIG_DEBUG_KERNEL=y
>> -# CONFIG_DEBUG_PREEMPT is not set
>> -CONFIG_DEBUG_RT_MUTEXES=y
>> -CONFIG_DEBUG_SPINLOCK=y
>> -CONFIG_DEBUG_MUTEXES=y
>> -CONFIG_DEBUG_SPINLOCK_SLEEP=y
>> -CONFIG_DEBUG_INFO=y
>> -# CONFIG_RCU_CPU_STALL_DETECTOR is not set
>> -CONFIG_SYSCTL_SYSCALL_CHECK=y
>> -CONFIG_DEBUG_USER=y
>> -CONFIG_DEBUG_ERRORS=y
>> -CONFIG_DEBUG_LL=y
>> -CONFIG_EARLY_PRINTK=y
>> -CONFIG_DEBUG_S3C_UART=1
>> -CONFIG_CRC_CCITT=y
>> diff --git a/arch/arm/configs/s5pv210_defconfig
>> b/arch/arm/configs/s5pv210_defconfig
>> index 1753836..b2fbbff 100644
>> --- a/arch/arm/configs/s5pv210_defconfig
>> +++ b/arch/arm/configs/s5pv210_defconfig
>> @@ -7,6 +7,10 @@ CONFIG_MODULE_UNLOAD=y
>>  # CONFIG_BLK_DEV_BSG is not set
>>  CONFIG_ARCH_S5PV210=y
>>  CONFIG_S3C_LOWLEVEL_UART_PORT=1
>> +CONFIG_S3C_DEV_FB=y
>> +CONFIG_S5PV210_SETUP_FB_24BPP=y
>> +CONFIG_MACH_AQUILA=y
>> +CONFIG_MACH_SMDKC110=y
>>  CONFIG_MACH_SMDKV210=y
>>  CONFIG_VMSPLIT_2G=y
>>  CONFIG_PREEMPT=y
>> diff --git a/arch/arm/mach-s5pv210/Kconfig b/arch/arm/mach-s5pv210/Kconfig
>> index 7e2e1eb..e7b98bf 100644
>> --- a/arch/arm/mach-s5pv210/Kconfig
>> +++ b/arch/arm/mach-s5pv210/Kconfig
>> @@ -43,10 +43,10 @@ config S5PV21

Re: [PATCH 1/3] arm: s5pv210: GONI: add support for framebuffer

2010-07-14 Thread Kyungmin Park
On Wed, Jul 14, 2010 at 4:30 PM, Marek Szyprowski
 wrote:
> Hello,
>
> On Wednesday, July 14, 2010 8:48 AM Kukjin Kim wrote:
>
>> Marek Szyprowski wrote:
>> >
>> > This patch adds required platform definitions to enable s3c-fb
>> > driver on GONI board. One framebuffer window in 480x800x16bpp mode is
>> > defined.
>> >
>> > Signed-off-by: Marek Szyprowski 
>> > Signed-off-by: Kyungmin Park 
>> > ---
>> >  arch/arm/mach-s5pv210/Kconfig     |    2 +
>> >  arch/arm/mach-s5pv210/mach-goni.c |   39
>> > +
>> >  2 files changed, 41 insertions(+), 0 deletions(-)
>> >
>> > diff --git a/arch/arm/mach-s5pv210/Kconfig b/arch/arm/mach-
>> s5pv210/Kconfig
>> > index 5e88941..8ab4bb0 100644
>> > --- a/arch/arm/mach-s5pv210/Kconfig
>> > +++ b/arch/arm/mach-s5pv210/Kconfig
>> > @@ -59,6 +59,8 @@ config MACH_GONI
>> >     bool "GONI"
>> >     select CPU_S5PV210
>> >     select ARCH_SPARSEMEM_ENABLE
>> > +   select S5PV210_SETUP_FB_24BPP
>> > +   select S3C_DEV_FB
>> >     select S5PC110_DEV_ONENAND
>> >     help
>> >       Machine support for Samsung GONI board
>> > diff --git a/arch/arm/mach-s5pv210/mach-goni.c
>> b/arch/arm/mach-s5pv210/mach-
>> > goni.c
>> > index 88c38e3..05b4a1a 100644
>> > --- a/arch/arm/mach-s5pv210/mach-goni.c
>> > +++ b/arch/arm/mach-s5pv210/mach-goni.c
>> > @@ -12,6 +12,9 @@
>> >  #include 
>> >  #include 
>> >  #include 
>> > +#include 
>> > +#include 
>>
>> need linux/delay.h in here?
>>
>> > +#include 
>>
>> same...need linux/clk.h?
>>
>> >
>> >  #include 
>> >  #include 
>> > @@ -20,11 +23,15 @@
>> >
>> >  #include 
>> >  #include 
>> > +#include 
>> > +#include 
>>
>> linux/gpio.h
>
> Ok.
>
>> >
>> > +#include 
>> >  #include 
>> >  #include 
>> >  #include 
>> >  #include 
>> > +#include 
>> >
>> >  /* Following are default values for UCON, ULCON and UFCON UART registers
>> */
>> >  #define S5PV210_UCON_DEFAULT       (S3C2410_UCON_TXILEVEL |        \
>> > @@ -73,7 +80,35 @@ static struct s3c2410_uartcfg goni_uartcfgs[]
>> __initdata = {
>> >     },
>> >  };
>> >
>> > +/* Frame Buffer */
>>
>> No need this comment because we know _fb_ means frame buffer...
>
> Comments in the source code are imho always welcome. As you know mach-*.c 
> files
> grows to very large sizes and it is much easier to read them if all 
> definitions
> and items are grouped and commented with a header on top of them (with such
> comments you easily can notice where one group starts and ends without reading
> the code).
>
>> > +static struct s3c_fb_pd_win goni_fb_win0 = {
>>
>> How about to use goni_fb_win[] array so that can be extended easily...
>
> I've just followed the style used in the other mach-*.c files. No problem to
> change it.
>
>>
>> > +   .win_mode = {
>> > +           .pixclock = 1ULL /
>> > ((16+16+2+480)*(28+3+2+800)*55),

Marugu(?) send the patch remove pixclock at fb mailing list. So If
>> > +           .left_margin = 16,
>> > +           .right_margin = 16,
>> > +           .upper_margin = 3,
>> > +           .lower_margin = 28,
>> > +           .hsync_len = 2,
>> > +           .vsync_len = 2,
>> > +           .xres = 480,
>> > +           .yres = 800,
>> > +           .refresh = 55,
>> > +   },
>> > +   .max_bpp = 32,
>> > +   .default_bpp = 16,
>>
>> If possible, please keep the align like below...for easily reading...
>> But...it depends on your taste...:-)
>
> Ok, no problem with this.
>
>>
>> +     .win_mode = {
>> +             .pixclock       = 1ULL /
>> ((16+16+2+480)*(28+3+2+800)*55),

Maurus send the patch remove pixclock calculation so I hope his patch
merge and we just remove it at here.

Thank you,
Kyungmin Park
>> +             .left_margin    = 16,
>> +             .right_margin   = 16,
>> +             .upper_margin   = 3,
>> +             .lower_margin   = 28,
>> +             .hsync_len      = 2,
>> +             .vsync_len      = 2,
>> +             .xres           = 480,
>> +             .yres           = 800,
>> +             .refresh       

Re: [PATCH v2] ARM: s5pv210_defconfig: Update for removing s5pc110_defconfig

2010-07-12 Thread Kyungmin Park
On Tue, Jul 13, 2010 at 3:17 PM, Kukjin Kim  wrote:
> Kyungmin Park wrote:
>>
>> Question?
>>
>> Are there difference between smdkc110 and smdkv210?
>
> Yes.
>
> The components on the board are different such as default LCD module,
> external memory, connector, and so on.

It seems to be handle at one board file. Maybe you register it as
different machine ID so you can handle it.
Look at current board files.

Thank you,
Kyungmin Park

>
>>
>> Thank you,
>> Kyungmin Park
>>
>> On Tue, Jul 13, 2010 at 11:22 AM, Kukjin Kim 
> wrote:
>> > Now that S5PC110 machines and S5PV210 machines can be built into
>> > one kernel, update mach-s5pv210/Kconfig and s5pv210_defconfig.
>> >
>> > Tested on SMDKC110(S5PC110) and SMDKV210(S5PV210).
>> > Note that GONI machine ID is not included in the kernel.
>> >
>> > Created and tested against linux-2.6.35-rc5.
>> >
>> > Signed-off-by: Kukjin Kim 
>> > ---
>> > Changes since v1:
>> > - This patch re-based against linux-2.6.35-rc5 which includes
>> >  'ARM: reduce defconfigs' from Uwe Kleine-Konig.
>> >
>> >  arch/arm/configs/s5pc110_defconfig |   66
> 
>> >  arch/arm/configs/s5pv210_defconfig |    4 ++
>> >  arch/arm/mach-s5pv210/Kconfig      |   28 +--
>> >  3 files changed, 21 insertions(+), 77 deletions(-)
>> >  delete mode 100644 arch/arm/configs/s5pc110_defconfig
>
> (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
>
--
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] ARM: s5pv210_defconfig: Update for removing s5pc110_defconfig

2010-07-12 Thread Kyungmin Park
Question?

Are there difference between smdkc110 and smdkv210?

Thank you,
Kyungmin Park

On Tue, Jul 13, 2010 at 11:22 AM, Kukjin Kim  wrote:
> Now that S5PC110 machines and S5PV210 machines can be built into
> one kernel, update mach-s5pv210/Kconfig and s5pv210_defconfig.
>
> Tested on SMDKC110(S5PC110) and SMDKV210(S5PV210).
> Note that GONI machine ID is not included in the kernel.
>
> Created and tested against linux-2.6.35-rc5.
>
> Signed-off-by: Kukjin Kim 
> ---
> Changes since v1:
> - This patch re-based against linux-2.6.35-rc5 which includes
>  'ARM: reduce defconfigs' from Uwe Kleine-Konig.
>
>  arch/arm/configs/s5pc110_defconfig |   66 
> 
>  arch/arm/configs/s5pv210_defconfig |    4 ++
>  arch/arm/mach-s5pv210/Kconfig      |   28 +--
>  3 files changed, 21 insertions(+), 77 deletions(-)
>  delete mode 100644 arch/arm/configs/s5pc110_defconfig
>
> diff --git a/arch/arm/configs/s5pc110_defconfig 
> b/arch/arm/configs/s5pc110_defconfig
> deleted file mode 100644
> index 22c2d14..000
> --- a/arch/arm/configs/s5pc110_defconfig
> +++ /dev/null
> @@ -1,66 +0,0 @@
> -CONFIG_EXPERIMENTAL=y
> -CONFIG_SYSFS_DEPRECATED_V2=y
> -CONFIG_BLK_DEV_INITRD=y
> -CONFIG_KALLSYMS_ALL=y
> -CONFIG_MODULES=y
> -CONFIG_MODULE_UNLOAD=y
> -# CONFIG_BLK_DEV_BSG is not set
> -CONFIG_ARCH_S5PV210=y
> -CONFIG_S3C_LOWLEVEL_UART_PORT=1
> -CONFIG_MACH_SMDKC110=y
> -CONFIG_VMSPLIT_2G=y
> -CONFIG_PREEMPT=y
> -CONFIG_AEABI=y
> -CONFIG_CMDLINE="root=/dev/ram0 rw ramdisk=8192 initrd=0x2080,8M 
> console=ttySAC1,115200 init=/linuxrc"
> -CONFIG_VFP=y
> -CONFIG_NEON=y
> -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
> -CONFIG_BLK_DEV_LOOP=y
> -CONFIG_BLK_DEV_RAM=y
> -CONFIG_BLK_DEV_RAM_SIZE=8192
> -# CONFIG_MISC_DEVICES is not set
> -CONFIG_SCSI=y
> -CONFIG_BLK_DEV_SD=y
> -CONFIG_CHR_DEV_SG=y
> -CONFIG_INPUT_EVDEV=y
> -# CONFIG_INPUT_KEYBOARD is not set
> -# CONFIG_INPUT_MOUSE is not set
> -CONFIG_INPUT_TOUCHSCREEN=y
> -CONFIG_SERIAL_8250=y
> -CONFIG_SERIAL_SAMSUNG=y
> -CONFIG_SERIAL_SAMSUNG_CONSOLE=y
> -CONFIG_HW_RANDOM=y
> -# CONFIG_HWMON is not set
> -# CONFIG_VGA_CONSOLE is not set
> -# CONFIG_HID_SUPPORT is not set
> -# CONFIG_USB_SUPPORT is not set
> -CONFIG_EXT2_FS=y
> -CONFIG_INOTIFY=y
> -CONFIG_MSDOS_FS=y
> -CONFIG_VFAT_FS=y
> -CONFIG_TMPFS=y
> -CONFIG_TMPFS_POSIX_ACL=y
> -CONFIG_CRAMFS=y
> -CONFIG_ROMFS_FS=y
> -CONFIG_PARTITION_ADVANCED=y
> -CONFIG_BSD_DISKLABEL=y
> -CONFIG_SOLARIS_X86_PARTITION=y
> -CONFIG_NLS_CODEPAGE_437=y
> -CONFIG_NLS_ASCII=y
> -CONFIG_NLS_ISO8859_1=y
> -CONFIG_MAGIC_SYSRQ=y
> -CONFIG_DEBUG_KERNEL=y
> -# CONFIG_DEBUG_PREEMPT is not set
> -CONFIG_DEBUG_RT_MUTEXES=y
> -CONFIG_DEBUG_SPINLOCK=y
> -CONFIG_DEBUG_MUTEXES=y
> -CONFIG_DEBUG_SPINLOCK_SLEEP=y
> -CONFIG_DEBUG_INFO=y
> -# CONFIG_RCU_CPU_STALL_DETECTOR is not set
> -CONFIG_SYSCTL_SYSCALL_CHECK=y
> -CONFIG_DEBUG_USER=y
> -CONFIG_DEBUG_ERRORS=y
> -CONFIG_DEBUG_LL=y
> -CONFIG_EARLY_PRINTK=y
> -CONFIG_DEBUG_S3C_UART=1
> -CONFIG_CRC_CCITT=y
> diff --git a/arch/arm/configs/s5pv210_defconfig 
> b/arch/arm/configs/s5pv210_defconfig
> index 1753836..b2fbbff 100644
> --- a/arch/arm/configs/s5pv210_defconfig
> +++ b/arch/arm/configs/s5pv210_defconfig
> @@ -7,6 +7,10 @@ CONFIG_MODULE_UNLOAD=y
>  # CONFIG_BLK_DEV_BSG is not set
>  CONFIG_ARCH_S5PV210=y
>  CONFIG_S3C_LOWLEVEL_UART_PORT=1
> +CONFIG_S3C_DEV_FB=y
> +CONFIG_S5PV210_SETUP_FB_24BPP=y
> +CONFIG_MACH_AQUILA=y
> +CONFIG_MACH_SMDKC110=y
>  CONFIG_MACH_SMDKV210=y
>  CONFIG_VMSPLIT_2G=y
>  CONFIG_PREEMPT=y
> diff --git a/arch/arm/mach-s5pv210/Kconfig b/arch/arm/mach-s5pv210/Kconfig
> index 7e2e1eb..e7b98bf 100644
> --- a/arch/arm/mach-s5pv210/Kconfig
> +++ b/arch/arm/mach-s5pv210/Kconfig
> @@ -43,10 +43,10 @@ config S5PV210_SETUP_SDHCI_GPIO
>        help
>          Common setup code for SDHCI gpio.
>
> -# machine support
> +menu "S5PC110 Machines"
>
>  config MACH_AQUILA
> -       bool "Samsung Aquila"
> +       bool "Aquila"
>        select CPU_S5PV210
>        select ARCH_SPARSEMEM_ENABLE
>        select S5PV210_SETUP_FB_24BPP
> @@ -64,11 +64,25 @@ config MACH_GONI
>          Machine support for Samsung GONI board
>          S5PC110(MCP) is one of package option of S5PV210
>
> +config MACH_SMDKC110
> +       bool "SMDKC110"
> +       select CPU_S5PV210
> +       select ARCH_SPARSEMEM_ENABLE
> +       select S3C_DEV_WDT
> +       select HAVE_S3C2410_WATCHDOG
> +       help
> +         Machine support for Samsung SMDKC110
> +         S5PC110(MCP) is one of package option o

Re: About SECTION_SIZE_BITS for Sparsemem

2010-07-12 Thread Kyungmin Park
On Mon, Jul 12, 2010 at 6:58 PM, Kukjin Kim  wrote:
> Kyungmin Park wrote:
>
>>
>> Interesting.
>>
>> I got tested with
>> #define MAX_PHYSMEM_BITS        31
>> #define SECTION_SIZE_BITS       27
>>
>> # cat /proc/sys/vm/min_free_kbytes
>> 1832
>> # echo 1828 > /proc/sys/vm/min_free_kbytes
>> # cat /proc/sys/vm/min_free_kbytes
>> 1828
>> # echo 1820 > /proc/sys/vm/min_free_kbytes
>> # cat /proc/sys/vm/min_free_kbytes
>> 1820
>> # echo 1700 > /proc/sys/vm/min_free_kbytes
>> # cat /proc/sys/vm/min_free_kbytes
>> 1700
>>
>> No kernel panic.
>>
>
> Thanks for your test on the board.
>
> But I need your environment for comparing.
>
> Please let me know.
> Following is my board environment.
>
> From boot-loader(u-boot).
>
> SMDKC110 # bdinfo
> arch_number = 0x0891
> env_t       = 0x
> boot_params = 0x2100
> DRAM bank   = 0x
> -> start    = 0x2000
> -> size     = 0x0500
> DRAM bank   = 0x0001
> -> start    = 0x4000
> -> size     = 0x1000
> DRAM bank   = 0x0002
> -> start    = 0x5000
> -> size     = 0x0800
>
> From kernel boot message.
>
> SMDKC110 # bootm c0008000
> Boot with zImage
>
> Starting kernel ...
>
> Uncompressing Linux... done, booting the kernel.
> Linux version 2.6.35-rc4-8-g98c749c (kg...@starstone) (gcc version 4.4.1
> (Sourcery G++ Lite 2009q3-67) ) #1 PREEMPT Mon Jul 12 18:47:04 KST 2010
> CPU: ARMv7 Processor [412fc082] revision 2 (ARMv7), cr=10c53c7f
> CPU: VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
> Machine: SMDKC110
> ...
> Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
> Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
> Memory: 80MB 256MB 128MB = 464MB total
> Memory: 459616k/459616k available, 15520k reserved, 0K highmem
> Virtual kernel memory layout:
>    vector  : 0x - 0x1000   (   4 kB)
>    fixmap  : 0xfff0 - 0xfffe   ( 896 kB)
>    DMA     : 0xff00 - 0xffe0   (  14 MB)
>    vmalloc : 0xb880 - 0xe000   ( 632 MB)
>    lowmem  : 0x8000 - 0xb800   ( 896 MB)
>    modules : 0x7f00 - 0x8000   (  16 MB)
>      .init : 0x80008000 - 0x8001e000   (  88 kB)
>      .text : 0x8001e000 - 0x801be000   (1664 kB)
>      .data : 0x801ce000 - 0x801e6600   (  98 kB)
> SLUB: Genslabs=9, HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
> Hierarchical RCU implementation.
>        RCU-based detection of stalled CPUs is disabled.
>        Verbose stalled-CPUs detection is disabled.
> ...
>
> And SECTION_SIZE_BITS is 28, not 27.

27 for our board. 28 for generic.

Note that I enabled HIGHMEM and modify the VMALLOC_END to 0xd000'
to test HIGHMEM.

Universal # bdinfo
arch_number = 0x0B2E
env_t   = 0x
boot_params = 0x3100
DRAM bank   = 0x
-> start= 0x3000
-> size = 0x0500
DRAM bank   = 0x0001
-> start= 0x4000
-> size = 0x1800
baudrate= 115200 bps
Universal # run bootcmd

OneNAND read: offset 0xc0, size 0x60
 6291456 bytes read: OK
## Booting kernel from Legacy Image at 30007fc0 ...
   Image Name:   Linux-2.6.35-rc4+
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:1548496 Bytes = 1.5 MiB
   Load Address: 30008000
   Entry Point:  30008000
   Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[0.00] Linux version 2.6.35-rc4+ (kmp...@july) (gcc version 4.4.1 (GCC)0
[0.00] CPU: ARMv7 Processor [412fc082] revision 2 (ARMv7), cr=10c53c7f
[0.00] CPU: VIPT nonaliasing data cache, VIPT nonaliasing instruction ce
[0.00] Machine: GONI
[0.00] Ignoring unrecognised tag 0x54410008
[0.00] Memory policy: ECC disabled, Data cache writeback
[0.00] CPU S5PV210/S5PC110 (id 0x43110200)
...
[0.00] PID hash table entries: 1024 (order: 0, 4096 bytes)
[0.00] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
[0.00] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
[0.00] Memory: 80MB 128MB 128MB 128MB = 464MB total
[0.00] Memory: 468224k/468224k available, 6912k reserved, 262144K highmm
[0.00] Virtual kernel memory layout:
[0.00] vector  : 0x - 0x1000   (   4 kB)
[0.00] fixmap  : 0xfff0 - 0xfffe   ( 896 kB)
[0.00] DMA : 0xff00 - 0xffe0   (  14 MB)
[0.00] vmalloc : 0xd880 - 0xe000   ( 120 MB)
[0.00] lowmem  : 0xc000 - 0xd800   ( 384 MB)
[0.00] pkmap   : 0xbfe0 - 0xc000   (   2 MB)
[0.00] modules : 0xbf

Re: About SECTION_SIZE_BITS for Sparsemem

2010-07-12 Thread Kyungmin Park
Interesting.

I got tested with
#define MAX_PHYSMEM_BITS31
#define SECTION_SIZE_BITS   27

# cat /proc/sys/vm/min_free_kbytes
1832
# echo 1828 > /proc/sys/vm/min_free_kbytes
# cat /proc/sys/vm/min_free_kbytes
1828
# echo 1820 > /proc/sys/vm/min_free_kbytes
# cat /proc/sys/vm/min_free_kbytes
1820
# echo 1700 > /proc/sys/vm/min_free_kbytes
# cat /proc/sys/vm/min_free_kbytes
1700

No kernel panic.

Thank you,
Kyungmin Park

On Mon, Jul 12, 2010 at 5:32 PM, Kukjin Kim  wrote:
> Russell,
>
> Hi,
>
> Kukjin Kim wrote:
>> Russell wrote:
>> > So, memory starts at 0x2000 and finishes at 0x2500.  That's
> fine.
>> > That doesn't mean the section size is 16MB.
>> >
>> > As I've already said, the section size has _nothing_ what so ever to do
>> > with the size of memory, or the granularity of the size of memory.  By
>> > way of illustration, it is perfectly legal to have a section size of
>> > 256MB but only have 1MB in a section and this is perfectly legal.  So
>> > sections do not have to be completely filled.
>> >
>> Actually, as you know, the hole's area of mem_map is freed from bootmem if
> a
>> section has a hole when initializing sparse memory.
>>
>> I identified that a section doesn't need to be a contiguous area of
> physical
>> memory when reading your comment with the fact that the mem_map of a
> section
>> can be smaller than the size of a section.
>>
>> I found, however, the kernel panics when modifying min_free_kbytes file in
>> the proc filesystem if a section has a hole.
>>
>> While processing the change of min_free_kbytes in the kernel, page
>> descriptors in a hole of an online section is accessed.
>
> As I said, following error happens.
> It would be helpful to me if any opinions or comments.
>
> ---
> When SECTION_SIZE_BITS is 24 (16MiB),
>
> [r...@samsung ~]# cat /proc/sys/vm/min_free_kbytes
> 2736
> [r...@samsung ~]# echo "2730" > /proc/sys/vm/min_free_kbytes
>
> [r...@samsung ~]# cat /proc/sys/vm/min_free_kbytes
> 2730
> [r...@samsung ~]#
>
>
> When SECTION_SIZE_BITS is 28 (256MiB),
>
> [r...@samsung ~]# cat /proc/sys/vm/min_free_kbytes
> 2736
> [r...@samsung ~]# echo "2730" > /proc/sys/vm/min_free_kbytes
> Unable to handle kernel NULL pointer dereference at virtual address 0004
> pgd = 80a14000
> [0004] *pgd=20a0b031, *pte=, *ppte=
> Internal error: Oops: 17 [#1] PREEMPT
> last sysfs file:
> Modules linked in:
> CPU: 0    Not tainted  (2.6.35-rc4-7-g9a59bf7-dirty #3)
> PC is at get_pageblock_flags_group+0x54/0xa8
> LR is at setup_per_zone_wmarks+0xfc/0x1d4
> pc : [<800686cc>]    lr : [<800691a0>]    psr: 6093
> sp : 80a03ed0  ip : 0001  fp : 00058000
> r10: 004a  r9 : 801e5fbc  r8 : 802c
> r7 : 0001c900  r6 : 00025000  r5 : 801e5fa4  r4 : 007e
> r3 : 0018  r2 : 0002  r1 :   r0 : 
> Flags: nZCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment user
> Control: 10c5387d  Table: 20a14019  DAC: 0015
> Process bash (pid: 888, stack limit = 0x80a022e8)
> Stack: (0x80a03ed0 to 0x80a04000)
> 3ec0:                                      801e5fa4 00025000
> 800691a0
> 3ee0: a013 02aa 0005 0001 801d8254 2aacb000 0005
> 0001
> 3f00: 80a02000 80a03f80 0001 80069354 80a03f80 0001 801d7900
> 800d2734
> 3f20: 80a03f80   0005 80a0903c 0005 b7c81c00
> 2aacb000
> 3f40: 80a03f80 0005  800d2760 0001 2aacb000 0005
> 8008ff74
> 3f60: b7c81c00 2aacb000 b7c81c00 2aacb000   0005
> 800900c8
> 3f80: 0005  0005  0005 2aacb000 2ac525f8
> 0004
> 3fa0: 8001f0e8 8001ef40 0005 2aacb000 0001 2aacb000 0005
> 
> 3fc0: 0005 2aacb000 2ac525f8 0004 0005 000babe0 
> 0001
> 3fe0: 2aacb000 7e88ca58 2ab99124 2abe643c 6010 0001 
> 
> [<800686cc>] (get_pageblock_flags_group+0x54/0xa8) from [<800691a0>]
> (setup_per_zone_wmarks+0xfc/0x1d4)
> [<800691a0>] (setup_per_zone_wmarks+0xfc/0x1d4) from [<80069354>]
> (min_free_kbytes_sysctl_handler+0x20/0x28)
> [<80069354>] (min_free_kbytes_sysctl_handler+0x20/0x28) from [<800d2734>]
> (proc_sys_call_handler+0x90/0xac)
> [<800d2734>] (proc_sys_call_handler+0x90/0xac) from [<800d2760>]
> (proc_sys_write+0x10/0x14)
> [<800d2760>] (proc_sys_write+0x10/0x14) from [<8008ff74>]
> (vfs_write+0xac/0x154)
> [<8008ff74>] (vfs_write+0xac/0x154) from [<800900c8>] (sys_write+0x3c/0x68)
>

Re: Requested features for next merge on s5pc110

2010-07-08 Thread Kyungmin Park
2010/7/9 Kukjin Kim :
> Kyungmin Park wrote:
>>
>> Hi Kukjin,
>>
> Hi,
>
>> Before next merge window, I hope these features will be included.
>> If your team is done already, please reply it. If not, our team will do
> it.
>>
>> 1. High-resolution timer using timer 4 and systimer.
>>     other timer 1, 2, 3, is used
>
> HR-Timer patch for S5P SoCs will be submitted in a few days. And maybe used
> 2 PWM Timers because S5P6440 does not have System Timer.
>
> Also, will be submitted specific SoC support HR-Timer together..but I'm not
> sure whether used timer4 and systimer.

Then make it configurable, In case of s5pc110, LSI guided to use the
RTC and systimer for deep sleep.
We will prepare it.

>
>>
>> 2. Basic suspend & resume feature.
>>     No clock gating, and cpufreq. Of course I hope it's included.
>>
> Now preparing re-submit..so maybe can be submitted soon.

Please see the Mr. Ham patch also.

>
>> 3. Aquila & goni board support.
>>     If possible all feature are included at current maineline kernel
>> implemented.
>>
>> If I'm missing one features, please let me know,
>>
>> Give your opinions.
>>
> Need to sort out items for merge window..and will inform soon.
>
> Thanks.
>
> Best regards,
> Kgene.
> --
> Kukjin Kim , Senior Engineer,
> SW Solution Development Team, Samsung Electronics Co., Ltd.
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" 
> in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
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: Requested features for next merge on s5pc110

2010-07-07 Thread Kyungmin Park
On Thu, Jul 8, 2010 at 12:39 PM, Jassi Brar  wrote:
> On Thu, Jul 8, 2010 at 12:05 PM, Kyungmin Park  wrote:
>
>> 3. Aquila & goni board support.
>>    If possible all feature are included at current maineline kernel
>> implemented.
>
> Without doubt it's pleasing to see so many people involved pushing support
> for Samsung's SoCs and machines based upon them.
> But it might be worthwhile to rethink if support for such
> 'not-so-popular' machines
> and 'transient' socs is necessary or even useful ?

It depends on the point of view.

Even though it's not sold from marker, others will be used. e.g., Limo.
We are planing to distribute mobile reference board to developer and
community that's reason to enable it at mainline.

Of course the best is sell the reference board from LSI like beagle
board from TI or other company.
you can enable these at smdk board.

I also want to know that which name of either s5pv210 or s5pc110 is
popular at outside? I think latter is well known since galaxy S and
wave phone uses it.

Anyway I hope to use mainline kernel as base kernel at our board.

To Jassi,

Can you post the sound related patches such as I2S?

Thank you,
Kyungmin Park
--
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


Requested features for next merge on s5pc110

2010-07-07 Thread Kyungmin Park
Hi Kukjin,

Before next merge window, I hope these features will be included.
If your team is done already, please reply it. If not, our team will do it.

1. High-resolution timer using timer 4 and systimer.
other timer 1, 2, 3, is used

2. Basic suspend & resume feature.
No clock gating, and cpufreq. Of course I hope it's included.

3. Aquila & goni board support.
If possible all feature are included at current maineline kernel
implemented.

If I'm missing one features, please let me know,

Give your opinions.

Thank you,
Kyungmin Park
--
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: S5PV210: Fix on SECTION_SIZE_BITS on S5PV210/S5PC110.

2010-07-06 Thread Kyungmin Park
On Wed, Jul 7, 2010 at 8:27 AM, Kukjin Kim  wrote:
> Russell King wrote:
>>
> Hi Russell :-)
>
>> On Tue, Jul 06, 2010 at 01:36:47PM +0900, Kukjin Kim wrote:
>> > This patch fixes on SECTION_SIZE_BITS for Sparsemem on S5PV210/S5PC110.
>> > Because smallest size of a bank on S5PV210/S5PC110 is aligned by 16MB.
>> > So each section's maximum size should be 16MB.
>>
>> What is the spacing of chunks of memory, and minimum alignment of those
>> chunks in physical address space?
>
> Some S5PC110(MCP D-type) has only available 80MiB in a bank.
> So the space accounts for 432MiB in a DMC0, but larger memory(256MiB +
> 128MiB) exists in a DMC1.

It's OneDRAM consists of 80MiB for AP, 16MiB for shared between AP and
CP, and last 32MiB for CP.
Even though we use the dedicated 80MiB for AP. we also use the shared
16MiB at AP side.
Then can we access the last 32MiB? the answer is no. But it's
connected physically. so we can't  use the last 32MiB area for other
case.

Additionally it's almost difficult to 16MiB align by Spec.

Memory Chip0 Configuration Register (MemConfig0, R/W,
Address=0xF000_0008, 0xF140_0008)

chip_mask [23:16] AXI Base Address Mask
Upper address bit mask to determine AXI offset address of memory chip0.
0 = Corresponding address bit is not to be used for comparison
1 = Corresponding address bit is to be used for comparison
For example, if chip_mask = 0xF8, then AXI offset address
becomes 0x_ ~ 0x07FF_. If AXI base address
of memory chip0 is 0x2000_, then memory chip0 has an
address range of 0x2000_ ~ 0x27FF_.

Thank you,
Kyungmin Park

>
> As you know, the size of a section should be a power of 2 and a physical
> address space of a section should be contiguous.
> If a section size is greater than 16MiB, a section have a hole. So the
> SECTION_SIZE_BITS should be 16MiB.
>
>>
>> Also, what is the maximum physical address which memory can be located?
>
> Following is memory map of S5PV210/S5PC110.
>
> 0x8000  ---
>            |          |
> 0x7000  |          |
>            |          |
> 0x6000  |  DMC 1  |  up to 1GiB
>            |          |
> 0x5000  |          |
>            |          |
> 0x4000  -
>            |          |
> 0x3000  |  DMC 0  |  up to 512MiB
>            |          |
> 0x2000  ---
>
>
> Thanks.
>
> Best regards,
> Kgene.
> --
> Kukjin Kim , Senior Engineer,
> SW Solution Development Team, Samsung Electronics Co., Ltd.
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" 
> in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] ARM: S5PV210: Fix on SECTION_SIZE_BITS on S5PV210/S5PC110.

2010-07-05 Thread Kyungmin Park
On Tue, Jul 6, 2010 at 1:36 PM, Kukjin Kim  wrote:
> This patch fixes on SECTION_SIZE_BITS for Sparsemem on S5PV210/S5PC110.
> Because smallest size of a bank on S5PV210/S5PC110 is aligned by 16MB.
> So each section's maximum size should be 16MB.

Could you explain what's the problem?

Even though 80MiB is used at logical size. it used the physical 128MiB
so. it's reasonable to use 128MiB align instead of 16MiB. Are there
boards use 64MiB or less?

I think if decrease the SECTIONS_SIZE_BITS, it wastes the memory.

Thank you,
Kyungmin Park

>
> Reported-by: Kyongho Cho 
> Signed-off-by: Kukjin Kim 
> ---
>  arch/arm/mach-s5pv210/include/mach/memory.h |    8 ++--
>  1 files changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/mach-s5pv210/include/mach/memory.h 
> b/arch/arm/mach-s5pv210/include/mach/memory.h
> index 379117e..4a372d8 100644
> --- a/arch/arm/mach-s5pv210/include/mach/memory.h
> +++ b/arch/arm/mach-s5pv210/include/mach/memory.h
> @@ -16,8 +16,12 @@
>  #define PHYS_OFFSET            UL(0x2000)
>  #define CONSISTENT_DMA_SIZE    (SZ_8M + SZ_4M + SZ_2M)
>
> -/* Maximum of 256MiB in one bank */
> +/* Sparsemem support. Each section is a maximum of 16MB.
> + * Because there are many different memory type on S5PC110(MCP),
> + * and there is a case that having 80MB, 128MB or 256MB in one
> + * bank.
> +*/
>  #define MAX_PHYSMEM_BITS       32
> -#define SECTION_SIZE_BITS      28
> +#define SECTION_SIZE_BITS      24
>
>  #endif /* __ASM_ARCH_MEMORY_H */
> --
> 1.6.2.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" 
> in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2] SDHCI-S3C fixes and enhancements (driver specific code)

2010-07-05 Thread Kyungmin Park
Hi Andrew,

I hope to merge it at next merge windows.

Others any comments?

Thank you,
Kyungmin Park

On Wed, Jun 16, 2010 at 3:49 PM, Marek Szyprowski
 wrote:
> Hello,
>
> This series includes various fixes to sdhci-s3c driver as well as a
> major feature enhancement. This patch series is prepared to get complete
> sdhci support on Samsung Aquila board.
>
> A quick overview on the patches:
>
> #1 - add missing sdhci_s3c_driver_remove() function
> #2 - introduce new sdhci quirk to get rid of anoying runtime warning and
>     possible problems with slow mmc/sd cards
> #3 - add support for various methods of notifying the host driver about
>     the card insertion/removal (should be compatible with existing code)
>
> Last patch requires changes to the Samsung platform setup code, which
> has been posted in a separate patch series for easier merging, please
> refer to the "[PATCH v2] SDHCI-S3C fixes and enhancements (platform
> specific code)" thread.
>
> Changes since V1:
> - added support for gpio external interrupt card based detect method
>  directly to sdhci-s3c driver
> - removed duplicate Kconfig patch
> - removed timeout patch (not really needed)
>
> A complete list of patches:
>
> [PATCH 1/3] sdhci-s3c: add missing remove function
> [PATCH 2/3] sdhci-s3c: add support for the non standard minimal clock value
> [PATCH 3/3] sdhci-s3c: add support for new card detection methods
>
> Best regards
> --
> Marek Szyprowski
> Samsung Poland R&D Center
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" 
> in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] ARM: S5P: Add PMU device

2010-07-05 Thread Kyungmin Park
On Tue, Jul 6, 2010 at 12:12 PM, Kukjin Kim  wrote:
> Kyungmin Park wrote:
>>
>> On Mon, Jul 5, 2010 at 9:57 PM, Kukjin Kim  wrote:
>> > Maurus Cuelenaere wrote:
>> >>
>> >>  Op 05-07-10 03:46, Joonyoung Shim schreef:
>> >> > This patch adds an initcall for the s5p platforms so that they
> register
>> >> > their PMU IRQs with the PMU framework in the Kernel.
>> >> >
>> >> > Signed-off-by: Joonyoung Shim 
>> >> > ---
>> >> >  arch/arm/mach-s5p6442/include/mach/irqs.h |    2 +-
>> >> >  arch/arm/mach-s5pc100/include/mach/irqs.h |    1 +
>> >> >  arch/arm/mach-s5pv210/include/mach/irqs.h |    1 +
>> >> >  arch/arm/plat-s5p/Makefile                |    1 +
>> >> >  arch/arm/plat-s5p/dev-pmu.c               |   37
>> >> +
>> >> >  5 files changed, 41 insertions(+), 1 deletions(-)
>> >> >  create mode 100644 arch/arm/plat-s5p/dev-pmu.c
>> >>
>> >> Wouldn't it be better if this was in plat-samsung? I can see that the
> S3C6410
>> >> datasheet mentions a PMU_IRQ_ENABLE bit in SYS_OTHERS so I suspect
>> that it
>> >> has
>> >> the same functionality (even though there's no mention of which
> interrupt this
>> >> is).
>> >>
>> > Yes, I also found PMU_IRQ_ENABLE bit in System Others register of
> S3C6410
>> datasheet. But as your comments, could not found the interrupt number and
> any
>> description...Actually, need to check whether it's available or not.
>> >
>> > And S5P6440 has it.
>> > So Joonyoung, it would be helpful if you could add 6440 PMUIRQ
> (VIC1[23]) in
>> this patch.
>>
>> It's another story. Can you explain the difference between 6440 and 6442?
>> As I heard it's same chip and type is difference. If true, how about
>> to delete the 6442 directory?
>> It makes a single kernel simple.
>>
>
> I remember, already explained about that.
> Hmm..Where did you hear wrong information that they are same? :-(
> Absolutely, they are different !! not same chip.
> ...
>
> But actually, I'm working on merge some S5P SoCs...

Can you tell me in details?
Now we start the merge the s5p6442 and s5pc110.
And how about to merge the s5pc100 with s3c6410?
it's not good decision to place the c100 at s5p with name prefix.
I think it's better to place the similar core at same directory instead of name.

Thank you,
Kyungmin Park

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


Re: [PATCH] ARM: S5P: Add PMU device

2010-07-05 Thread Kyungmin Park
On Mon, Jul 5, 2010 at 9:57 PM, Kukjin Kim  wrote:
> Maurus Cuelenaere wrote:
>>
>>  Op 05-07-10 03:46, Joonyoung Shim schreef:
>> > This patch adds an initcall for the s5p platforms so that they register
>> > their PMU IRQs with the PMU framework in the Kernel.
>> >
>> > Signed-off-by: Joonyoung Shim 
>> > ---
>> >  arch/arm/mach-s5p6442/include/mach/irqs.h |    2 +-
>> >  arch/arm/mach-s5pc100/include/mach/irqs.h |    1 +
>> >  arch/arm/mach-s5pv210/include/mach/irqs.h |    1 +
>> >  arch/arm/plat-s5p/Makefile                |    1 +
>> >  arch/arm/plat-s5p/dev-pmu.c               |   37
>> +
>> >  5 files changed, 41 insertions(+), 1 deletions(-)
>> >  create mode 100644 arch/arm/plat-s5p/dev-pmu.c
>>
>> Wouldn't it be better if this was in plat-samsung? I can see that the S3C6410
>> datasheet mentions a PMU_IRQ_ENABLE bit in SYS_OTHERS so I suspect that it
>> has
>> the same functionality (even though there's no mention of which interrupt 
>> this
>> is).
>>
> Yes, I also found PMU_IRQ_ENABLE bit in System Others register of S3C6410 
> datasheet. But as your comments, could not found the interrupt number and any 
> description...Actually, need to check whether it's available or not.
>
> And S5P6440 has it.
> So Joonyoung, it would be helpful if you could add 6440 PMUIRQ (VIC1[23]) in 
> this patch.

It's another story. Can you explain the difference between 6440 and 6442?
As I heard it's same chip and type is difference. If true, how about
to delete the 6442 directory?
It makes a single kernel simple.

Thank you,
Kyungmin Park


>
> Thanks.
>
> Best regards,
> Kgene.
> --
> Kukjin Kim , Senior Engineer,
> SW Solution Development Team, Samsung Electronics Co., Ltd.
>
>
> ___
> linux-arm-kernel mailing list
> linux-arm-ker...@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>
--
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: updates sdhci.h for Samsung SoCs

2010-07-05 Thread Kyungmin Park
Hi,

Instead of refactoring, how about to delete it and move to dev-hsmmc file.
We don't need to call each sdhci_setup at each cpu files. just set
platform data and register platform data.

Just focus the each dev-hsmmc file and no need to change header file anymore.

How do you think?

Thank you,
Kyungmin Park

On Mon, Jul 5, 2010 at 9:18 PM, Kukjin Kim  wrote:
> This patch updates sdhci.h as Maurus suggestion like following:
>
> From:
>        #ifdef ...
>        function()
>        {
>                blahblah;
>        }
>        #else
>        function() { }
>        #endif
>
> To:
>        function()
>        {
>        #ifdef ...
>                blahblah;
>        #endif
>        }
>
> And fixes a couple of typos.
>
> Signed-off-by: Kukjin Kim 
> ---
> Note: depends on previous v3 patch set, Add support HSMMC on Samsung SMDKV210
>
>  arch/arm/plat-samsung/include/plat/sdhci.h |   91 
> +---
>  1 files changed, 30 insertions(+), 61 deletions(-)
>
> diff --git a/arch/arm/plat-samsung/include/plat/sdhci.h 
> b/arch/arm/plat-samsung/include/plat/sdhci.h
> index 1314ffa..5ad1e94 100644
> --- a/arch/arm/plat-samsung/include/plat/sdhci.h
> +++ b/arch/arm/plat-samsung/include/plat/sdhci.h
> @@ -82,12 +82,11 @@ extern void s5pv210_setup_sdhci1_cfg_gpio(struct 
> platform_device *, int w);
>  extern void s5pv210_setup_sdhci2_cfg_gpio(struct platform_device *, int w);
>  extern void s5pv210_setup_sdhci3_cfg_gpio(struct platform_device *, int w);
>
> -/* S3C6400 SDHCI setup */
> +/* S3C64XX SDHCI setup */
>
>  #ifdef CONFIG_S3C64XX_SETUP_SDHCI
>  extern char *s3c64xx_hsmmc_clksrcs[4];
>
> -#ifdef CONFIG_S3C_DEV_HSMMC
>  extern void s3c6400_setup_sdhci_cfg_card(struct platform_device *dev,
>                                         void __iomem *r,
>                                         struct mmc_ios *ios,
> @@ -95,76 +94,62 @@ extern void s3c6400_setup_sdhci_cfg_card(struct 
> platform_device *dev,
>
>  static inline void s3c6400_default_sdhci0(void)
>  {
> +#ifdef CONFIG_S3C_DEV_HSMMC
>        s3c_hsmmc0_def_platdata.clocks = s3c64xx_hsmmc_clksrcs;
>        s3c_hsmmc0_def_platdata.cfg_gpio = s3c64xx_setup_sdhci0_cfg_gpio;
>        s3c_hsmmc0_def_platdata.cfg_card = s3c6400_setup_sdhci_cfg_card;
> +#endif
>  }
>
> -#else
> -static inline void s3c6400_default_sdhci0(void) { }
> -#endif  /* CONFIG_S3C_DEV_HSMMC */
> -
> -#ifdef CONFIG_S3C_DEV_HSMMC1
>  static inline void s3c6400_default_sdhci1(void)
>  {
> +#ifdef CONFIG_S3C_DEV_HSMMC1
>        s3c_hsmmc1_def_platdata.clocks = s3c64xx_hsmmc_clksrcs;
>        s3c_hsmmc1_def_platdata.cfg_gpio = s3c64xx_setup_sdhci1_cfg_gpio;
>        s3c_hsmmc1_def_platdata.cfg_card = s3c6400_setup_sdhci_cfg_card;
> +#endif
>  }
> -#else
> -static inline void s3c6400_default_sdhci1(void) { }
> -#endif /* CONFIG_S3C_DEV_HSMMC1 */
>
> -#ifdef CONFIG_S3C_DEV_HSMMC2
>  static inline void s3c6400_default_sdhci2(void)
>  {
> +#ifdef CONFIG_S3C_DEV_HSMMC2
>        s3c_hsmmc2_def_platdata.clocks = s3c64xx_hsmmc_clksrcs;
>        s3c_hsmmc2_def_platdata.cfg_gpio = s3c64xx_setup_sdhci2_cfg_gpio;
>        s3c_hsmmc2_def_platdata.cfg_card = s3c6400_setup_sdhci_cfg_card;
> +#endif
>  }
> -#else
> -static inline void s3c6400_default_sdhci2(void) { }
> -#endif /* CONFIG_S3C_DEV_HSMMC2 */
> -
> -/* S3C6410 SDHCI setup */
>
>  extern void s3c6410_setup_sdhci_cfg_card(struct platform_device *dev,
>                                         void __iomem *r,
>                                         struct mmc_ios *ios,
>                                         struct mmc_card *card);
>
> -#ifdef CONFIG_S3C_DEV_HSMMC
>  static inline void s3c6410_default_sdhci0(void)
>  {
> +#ifdef CONFIG_S3C_DEV_HSMMC
>        s3c_hsmmc0_def_platdata.clocks = s3c64xx_hsmmc_clksrcs;
>        s3c_hsmmc0_def_platdata.cfg_gpio = s3c64xx_setup_sdhci0_cfg_gpio;
>        s3c_hsmmc0_def_platdata.cfg_card = s3c6410_setup_sdhci_cfg_card;
> +#endif
>  }
> -#else
> -static inline void s3c6410_default_sdhci0(void) { }
> -#endif /* CONFIG_S3C_DEV_HSMMC */
>
> -#ifdef CONFIG_S3C_DEV_HSMMC1
>  static inline void s3c6410_default_sdhci1(void)
>  {
> +#ifdef CONFIG_S3C_DEV_HSMMC1
>        s3c_hsmmc1_def_platdata.clocks = s3c64xx_hsmmc_clksrcs;
>        s3c_hsmmc1_def_platdata.cfg_gpio = s3c64xx_setup_sdhci1_cfg_gpio;
>        s3c_hsmmc1_def_platdata.cfg_card = s3c6410_setup_sdhci_cfg_card;
> +#endif
>  }
> -#else
> -static inline void s3c6410_default_sdhci1(void) { }
> -#endif /* CONFIG_S3C_DEV_HSMMC1 */
>
> -#ifdef CONFIG_S3C_DEV_HSMMC2
>  static inline void s3c6410_default_sdhci2(void)
>  {
> +#ifdef CONFIG_S3C_DEV_HSMMC2

Re: [PATCH 8/8] ARM: S5PV310: Add serial port support

2010-07-01 Thread Kyungmin Park
Hi,

As previous description. it's also same except the udivslot
calculation and clock selection.
How about to just modify current v210 serial codes by just adding the
V310 or C210 type?

Thank you,
Kyungmin Park

On Fri, Jun 25, 2010 at 11:27 PM, Kukjin Kim  wrote:
> From: Changhwan Youn 
>
> This patch adds UART serial port support for S5PV310 CPU.
>
> Signed-off-by: Changhwan Youn 
> Signed-off-by: Kukjin Kim 
> ---
>  drivers/serial/Kconfig   |    8 +++
>  drivers/serial/Makefile  |    1 +
>  drivers/serial/s5pv310.c |  124 
> ++
>  3 files changed, 133 insertions(+), 0 deletions(-)
>  create mode 100644 drivers/serial/s5pv310.c
>
> diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig
> index 8b23165..b5ff41f 100644
> --- a/drivers/serial/Kconfig
> +++ b/drivers/serial/Kconfig
> @@ -550,6 +550,14 @@ config SERIAL_S5PV210
>        help
>          Serial port support for Samsung's S5P Family of SoC's
>
> +config SERIAL_S5PV310
> +       tristate "Samsung S5PV310 Serial port support"
> +       depends on SERIAL_SAMSUNG && CPU_S5PV310
> +       select SERIAL_SAMSUNG_UARTS_4
> +       default y
> +       help
> +         Serial port support for Samsung's S5P Family of SoC's
> +
>  config SERIAL_MAX3100
>        tristate "MAX3100 support"
>        depends on SPI
> diff --git a/drivers/serial/Makefile b/drivers/serial/Makefile
> index 208a855..bd32d3f 100644
> --- a/drivers/serial/Makefile
> +++ b/drivers/serial/Makefile
> @@ -45,6 +45,7 @@ obj-$(CONFIG_SERIAL_S3C2440) += s3c2440.o
>  obj-$(CONFIG_SERIAL_S3C24A0) += s3c24a0.o
>  obj-$(CONFIG_SERIAL_S3C6400) += s3c6400.o
>  obj-$(CONFIG_SERIAL_S5PV210) += s5pv210.o
> +obj-$(CONFIG_SERIAL_S5PV310) += s5pv310.o
>  obj-$(CONFIG_SERIAL_MAX3100) += max3100.o
>  obj-$(CONFIG_SERIAL_IP22_ZILOG) += ip22zilog.o
>  obj-$(CONFIG_SERIAL_MUX) += mux.o
> diff --git a/drivers/serial/s5pv310.c b/drivers/serial/s5pv310.c
> new file mode 100644
> index 000..1d466cf
> --- /dev/null
> +++ b/drivers/serial/s5pv310.c
> @@ -0,0 +1,124 @@
> +/* linux/drivers/serial/s5pv310.c
> + *
> + * Copyright (c) 2010 Samsung Electronics Co., Ltd.
> + *             http://www.samsung.com/
> + *
> + * Based on drivers/serial/s5pv210.c
> + *
> + * Driver for Samsung S5PV310 SoC UARTs.
> + *
> + * 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 "samsung.h"
> +
> +static int s5pv310_serial_setsource(struct uart_port *port,
> +                                   struct s3c24xx_uart_clksrc *clk)
> +{
> +       /* for s5pv310, serial clock source is only uclk1 */
> +       return 0;
> +};
> +
> +static int s5pv310_serial_getsource(struct uart_port *port,
> +                                   struct s3c24xx_uart_clksrc *clk)
> +{
> +       /* for s5pv310, serial clock source is only uclk1 */
> +       clk->divisor = 1;
> +       clk->name = "uclk1";
> +       return 0;
> +};
> +
> +static int s5pv310_serial_resetport(struct uart_port *port,
> +                                   struct s3c2410_uartcfg *cfg)
> +{
> +       wr_regl(port, S3C2410_UCON,  cfg->ucon);
> +       wr_regl(port, S3C2410_ULCON, cfg->ulcon);
> +
> +       /* reset both fifos */
> +       wr_regl(port, S3C2410_UFCON, cfg->ufcon | S3C2410_UFCON_RESETBOTH);
> +       wr_regl(port, S3C2410_UFCON, cfg->ufcon);
> +
> +       return 0;
> +}
> +
> +#define S5PV310_UART_DEFAULT_INFO(fifo_size)                   \
> +               .name           = "Samsung S5PV310 UART",       \
> +               .type           = PORT_S3C6400,                 \
> +               .fifosize       = fifo_size,                    \
> +               .has_fracval    = 1,                            \
> +               .rx_fifomask    = S5PV210_UFSTAT_RXMASK,        \
> +               .rx_fifoshift   = S5PV210_UFSTAT_RXSHIFT,       \
> +               .rx_fifofull    = S5PV210_UFSTAT_RXFULL,        \
> +               .tx_fifofull    = S5PV210_UFSTAT_TXFULL,        \
> +               .tx_fifomask    = S5PV210_UFSTAT_TXMASK,        \
> +               .tx_fifoshift   = S5PV210_UFSTAT_TXSHIFT,       \
> +               .get_clksrc     = s5pv310_serial_getsource,     \
> +               .set_clksrc     = s5pv310_serial_setsource,     \
> +               .reset_port     = s5pv310_serial_resetport
> +
> +static struct s3c24xx_uar

<    1   2   3   4   >