Re: [PATCH v6 0/9] mmc: dw_mmc: add support for device tree based instantiation

2012-09-19 Thread Chris Ball
Hi Thomas,

On Wed, Sep 19 2012, Thomas Abraham wrote:
>> Hi Jaehoon, Seungwon,
>>
>> All the changes you have suggested for this patch series has been
>> completed. If you could ack this series, it would be great.
>>
>> Thanks,
>> Thomas.
>
> Hi Chris,
>
> I have addressed all the comments received for the v5 of the dw-mmc
> device tree support patch series. Will Newton has acked this patch
> series. Can this series be merged for v3.7 ?

Yes, looks good; pushed to mmc-next for 3.7.  Jaehoon and Seungwon,
if you reply soon with your ACK then I'll add it to this patchset.

Thanks,

- Chris.
-- 
Chris Ball  
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


Re: [PATCH v6 0/9] mmc: dw_mmc: add support for device tree based instantiation

2012-09-19 Thread Thomas Abraham
On 19 September 2012 12:35, Chris Ball  wrote:
> Hi Thomas,
>
> On Wed, Sep 19 2012, Thomas Abraham wrote:
>>> Hi Jaehoon, Seungwon,
>>>
>>> All the changes you have suggested for this patch series has been
>>> completed. If you could ack this series, it would be great.
>>>
>>> Thanks,
>>> Thomas.
>>
>> Hi Chris,
>>
>> I have addressed all the comments received for the v5 of the dw-mmc
>> device tree support patch series. Will Newton has acked this patch
>> series. Can this series be merged for v3.7 ?
>
> Yes, looks good; pushed to mmc-next for 3.7.  Jaehoon and Seungwon,
> if you reply soon with your ACK then I'll add it to this patchset.

Thanks Chris.

Regards,
Thomas.
--
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] mmc: sdhci-s3c: Add clk_(enable/disable) in runtime suspend/resume

2012-09-19 Thread Jaehoon Chung
Looks good to me.

Acked-by: Jaehoon Chung 

On 09/19/2012 03:14 PM, Chris Ball wrote:
> Hi Jaehoon, Girish,
> 
> On Fri, Sep 14 2012, Chander Kashyap wrote:
>> Perform clock disable/enable in runtime suspend/resume.
>>
>> Signed-off-by: Chander Kashyap 
>> ---
>>  drivers/mmc/host/sdhci-s3c.c |   25 +++--
>>  1 file changed, 23 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/mmc/host/sdhci-s3c.c b/drivers/mmc/host/sdhci-s3c.c
>> index 3f4518d..d51 100644
>> --- a/drivers/mmc/host/sdhci-s3c.c
>> +++ b/drivers/mmc/host/sdhci-s3c.c
>> @@ -513,7 +513,9 @@ static int __devinit sdhci_s3c_probe(struct 
>> platform_device *pdev)
>>  goto err_no_busclks;
>>  }
>>  
>> +#ifndef CONFIG_PM_RUNTIME
>>  clk_enable(sc->clk_bus[sc->cur_clk]);
>> +#endif
>>  
>>  res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>>  host->ioaddr = devm_request_and_ioremap(&pdev->dev, res);
>> @@ -620,10 +622,13 @@ static int __devinit sdhci_s3c_probe(struct 
>> platform_device *pdev)
>>  gpio_is_valid(pdata->ext_cd_gpio))
>>  sdhci_s3c_setup_card_detect_gpio(sc);
>>  
>> +clk_disable(sc->clk_io);
>>  return 0;
>>  
>>   err_req_regs:
>> +#ifndef CONFIG_PM_RUNTIME
>>  clk_disable(sc->clk_bus[sc->cur_clk]);
>> +#endif
>>  for (ptr = 0; ptr < MAX_BUS_CLK; ptr++) {
>>  if (sc->clk_bus[ptr]) {
>>  clk_put(sc->clk_bus[ptr]);
>> @@ -656,12 +661,15 @@ static int __devexit sdhci_s3c_remove(struct 
>> platform_device *pdev)
>>  if (gpio_is_valid(sc->ext_cd_gpio))
>>  gpio_free(sc->ext_cd_gpio);
>>  
>> +clk_enable(sc->clk_io);
>>  sdhci_remove_host(host, 1);
>>  
>>  pm_runtime_dont_use_autosuspend(&pdev->dev);
>>  pm_runtime_disable(&pdev->dev);
>>  
>> +#ifndef CONFIG_PM_RUNTIME
>>  clk_disable(sc->clk_bus[sc->cur_clk]);
>> +#endif
>>  for (ptr = 0; ptr < 3; ptr++) {
>>  if (sc->clk_bus[ptr]) {
>>  clk_put(sc->clk_bus[ptr]);
>> @@ -696,15 +704,28 @@ static int sdhci_s3c_resume(struct device *dev)
>>  static int sdhci_s3c_runtime_suspend(struct device *dev)
>>  {
>>  struct sdhci_host *host = dev_get_drvdata(dev);
>> +struct sdhci_s3c *ourhost = to_s3c(host);
>> +struct clk *busclk = ourhost->clk_io;
>> +int ret;
>> +
>> +ret = sdhci_runtime_suspend_host(host);
>>  
>> -return sdhci_runtime_suspend_host(host);
>> +clk_disable(ourhost->clk_bus[ourhost->cur_clk]);
>> +clk_disable(busclk);
>> +return ret;
>>  }
>>  
>>  static int sdhci_s3c_runtime_resume(struct device *dev)
>>  {
>>  struct sdhci_host *host = dev_get_drvdata(dev);
>> +struct sdhci_s3c *ourhost = to_s3c(host);
>> +struct clk *busclk = ourhost->clk_io;
>> +int ret;
>>  
>> -return sdhci_runtime_resume_host(host);
>> +clk_enable(busclk);
>> +clk_enable(ourhost->clk_bus[ourhost->cur_clk]);
>> +ret = sdhci_runtime_resume_host(host);
>> +return ret;
>>  }
>>  #endif
> 
> Could I get an ACK on this patch from one of you, please?
> 
> - Chris.
> 

--
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] mmc: sdhci-s3c: Add clk_(enable/disable) in runtime suspend/resume

2012-09-19 Thread Chris Ball
Hi,

On Wed, Sep 19 2012, Jaehoon Chung wrote:
> Looks good to me.
>
> Acked-by: Jaehoon Chung 

Thanks, pushed to mmc-next for 3.7.  (The patch didn't merge cleanly
so I applied it by hand; let me know if anything looks wrong.)

- Chris.
-- 
Chris Ball  
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


Re: [PATCH] video: drm: Add match table for drm platform device

2012-09-19 Thread Paul Menzel
Dear Leela,


thank you for your patch.


Am Mittwoch, den 19.09.2012, 00:05 +0530 schrieb Leela Krishna Amudala:
> This patch adds match table for drm platform device.

Please drop that line as it is the same as in the subject line.

It would be better,

1. if you explain for what this will be used,
2. if this can be tested somehow,
3. if this fixes a bug,
4. why CONFIG_OF is needed.

> Signed-off-by: Leela Krishna Amudala 
> ---
>  drivers/gpu/drm/exynos/exynos_drm_drv.c |9 +
>  1 files changed, 9 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.c 
> b/drivers/gpu/drm/exynos/exynos_drm_drv.c
> index d070719..18abdcc 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_drv.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_drv.c
> @@ -294,12 +294,21 @@ static int exynos_drm_platform_remove(struct 
> platform_device *pdev)
>   return 0;
>  }
>  
> +#ifdef CONFIG_OF
> +static const struct of_device_id drm_device_dt_match[] = {
> + { .compatible = "samsung,exynos-drm-device"},
> + {},
> +};
> +MODULE_DEVICE_TABLE(of, drm_device_dt_match);
> +#endif
> +
>  static struct platform_driver exynos_drm_platform_driver = {
>   .probe  = exynos_drm_platform_probe,
>   .remove = __devexit_p(exynos_drm_platform_remove),
>   .driver = {
>   .owner  = THIS_MODULE,
>   .name   = "exynos-drm",
> + .of_match_table = of_match_ptr(drm_device_dt_match),
>   },
>  };


Thanks,

Paul


signature.asc
Description: This is a digitally signed message part


Re: [PATCH v3] ARM: EXYNOS: Add MFC device tree support

2012-09-19 Thread Karol Lewandowski
On 09/14/2012 05:38 PM, Arun Kumar K wrote:

> This patch adds device tree entry for MFC v6 in the Exynos5
> SoC. Makes the required changes in the clock files and adds
> MFC to the DT device list.


Hi!

Thanks for working on this patch. Please allow me to add few
comments.


> diff --git a/arch/arm/boot/dts/exynos5250.dtsi 
> b/arch/arm/boot/dts/exynos5250.dtsi
> index b55794b..5df2f99 100644
> --- a/arch/arm/boot/dts/exynos5250.dtsi
> +++ b/arch/arm/boot/dts/exynos5250.dtsi
> @@ -62,6 +62,12 @@
>   interrupts = <0 42 0>;
>   };
>  
> + mfc {


Nitpick - shouldn't node names be generic?  MFC is strictly
samsung specific, something like "codec"/"video-codec" would make
more sense (IMVHO). I would prefer to see address too (e.g.
codec@0x1100).

However, I do see that rtc below doesn't specify address in node too,
so maybe I'm missing something here.


>  
> +struct mfc_dt_meminfo {
> + unsigned long loff;
> + unsigned long lsize;
> + unsigned long roff;
> + unsigned long rsize;


  char *compatible;

> +};
> +
> +int fdt_find_mfc_mem(unsigned long node, const char *uname, int depth,
> + void *data)
> +{
> + __be32 *prop;
> + unsigned long len;
> + struct mfc_dt_meminfo *mfc_mem = data;
> +
> + if (!of_flat_dt_is_compatible(node, "samsung,mfc-v6"))
> + return 0;


  if (!of_flat_dt_is_compatible(node, mfc_mem->compatible))
return 0;

> +
> + prop = of_get_flat_dt_prop(node, "samsung,mfc-l", &len);
> + if (!prop)
> + return 0;
> + mfc_mem->loff = of_read_ulong(prop, len/4);
> +
> + prop = of_get_flat_dt_prop(node, "samsung,mfc-l-size", &len);
> + if (!prop)
> + return 0;
> + mfc_mem->lsize = of_read_ulong(prop, len/4);
> +
> + prop = of_get_flat_dt_prop(node, "samsung,mfc-r", &len);
> + if (!prop)
> + return 0;
> + mfc_mem->roff = of_read_ulong(prop, len/4);
> +
> + prop = of_get_flat_dt_prop(node, "samsung,mfc-r-size", &len);
> + if (!prop)
> + return 0;
> + mfc_mem->rsize = of_read_ulong(prop, len/4);
> +
> + return 1;
> +}


Above function could be reused for mfc-v5 (exynos4-dt.c) if compatible
string weren't hardcoded. Thus, please consider changing that and
moving this function to some common(.c?) file - you can see one possible
solution inline.

> +
> +static void __init exynos5_reserve(void)
> +{
> + struct mfc_dt_meminfo mfc_mem;


mfc_mem.compatible = "samsung,mfc-v6";

> +
> + /* Reserve memory for MFC only if it's available */
> + if (of_scan_flat_dt(fdt_find_mfc_mem, &mfc_mem))
> + s5p_mfc_reserve_mem(mfc_mem.roff, mfc_mem.rsize, mfc_mem.loff,
> + mfc_mem.lsize);
> +}
> +
>  DT_MACHINE_START(EXYNOS5_DT, "SAMSUNG EXYNOS5 (Flattened Device Tree)")
>   /* Maintainer: Kukjin Kim  */
>   .init_irq   = exynos5_init_irq,
> @@ -94,4 +148,5 @@ DT_MACHINE_START(EXYNOS5_DT, "SAMSUNG EXYNOS5 (Flattened 
> Device Tree)")
>   .timer  = &exynos4_timer,
>   .dt_compat  = exynos5250_dt_compat,
>   .restart= exynos5_restart,
> + .reserve= exynos5_reserve,
>  MACHINE_END


Regards,
-- 
Karol Lewandowski | Samsung Poland R&D Center | Linux/Platform
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 4/5] ARM: EXYNOS: Add support for Exynos secure firmware

2012-09-19 Thread Tomasz Figa
Hi Olof,

On Saturday 15 of September 2012 17:44:55 Olof Johansson wrote:
> On Thu, Sep 13, 2012 at 10:13:37AM +0200, Tomasz Figa wrote:
> > +static void __iomem *exynos_cpu_boot_reg(int cpu)
> > +{
> > +   return S5P_VA_SYSRAM_NS + 0x1c + 4*cpu;
> > +}
> 
> This communication area in sysram should probably be seen as a part of
> the firmware interface. It should thus be defined as part of the binding
> instead, i.e.  through a reg property or similar there. That also would
> make it easy to convert to using ioremap() instead of iodesc tables,
> which always a nice thing.

The problem with SYSRAM_NS is that it might be also used in other code, not 
related to firmware only. I don't know exactly all the use cases for it.

Is it really a big problem or we could let it be for now, merge the patches 
for firmware and then convert SYSRAM_NS to dynamic mapping when its 
situation clarifies?

Best regards,
-- 
Tomasz Figa
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


Re: [PATCH v2 1/5] mmc: host: sdhci-s3c: Add broken-voltage DT property for broken voltage quirk

2012-09-19 Thread Tomasz Figa
Hi Chris,

On Wednesday 19 of September 2012 01:42:01 Chris Ball wrote:
> On Tue, Sep 04 2012, Tomasz Figa wrote:
> > Some boards use fixed voltage regulator for vmmc supply (e.g. for eMMC
> > memories). MMC_CAP2_BROKEN_VOLTAGE must be enabled for them to operate
> > correctly.
>>
> Is there a reason we can't make this a property on the regulator instead?

Is there a reason we can't make this a property of the mmc subsystem? ;)

Now, seriously, could you elaborate on this a bit more? Do you mean that a 
regulator should provide a dummy set voltage operation that would accept 
any voltage?

Best regards,
-- 
Tomasz Figa
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


Re: [PATCH v2 1/5] mmc: host: sdhci-s3c: Add broken-voltage DT property for broken voltage quirk

2012-09-19 Thread Chris Ball
Hi Tomasz,

On Wed, Sep 19 2012, Tomasz Figa wrote:
> Hi Chris,
>
> On Wednesday 19 of September 2012 01:42:01 Chris Ball wrote:
>> On Tue, Sep 04 2012, Tomasz Figa wrote:
>> > Some boards use fixed voltage regulator for vmmc supply (e.g. for eMMC
>> > memories). MMC_CAP2_BROKEN_VOLTAGE must be enabled for them to operate
>> > correctly.
>>>
>> Is there a reason we can't make this a property on the regulator instead?
>
> Is there a reason we can't make this a property of the mmc subsystem? ;)
>
> Now, seriously, could you elaborate on this a bit more? Do you mean that a 
> regulator should provide a dummy set voltage operation that would accept 
> any voltage?

Sorry for the terseness.

It seems like we're encoding exactly the same information twice in two
different subsystems -- I don't see the point, so I'd like to think
about how we could do better.

For example, if we're only concerned about fixed regulators, could we
just detect a fixed regulator in the driver and avoid the failing call
to regulator_set_voltage() directly, without needing to go via this
capability?  Seems like the capability doesn't tell us anything we
couldn't already have known.

Thanks,

- Chris.
-- 
Chris Ball  
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


Re: [PATCH v2 1/5] mmc: host: sdhci-s3c: Add broken-voltage DT property for broken voltage quirk

2012-09-19 Thread Tomasz Figa
Hi Chris,

On Wednesday 19 of September 2012 06:24:46 Chris Ball wrote:
> Hi Tomasz,
> 
> On Wed, Sep 19 2012, Tomasz Figa wrote:
> > Hi Chris,
> > 
> > On Wednesday 19 of September 2012 01:42:01 Chris Ball wrote:
> >> On Tue, Sep 04 2012, Tomasz Figa wrote:
> >> > Some boards use fixed voltage regulator for vmmc supply (e.g. for
> >> > eMMC
> >> > memories). MMC_CAP2_BROKEN_VOLTAGE must be enabled for them to
> >> > operate
> >> > correctly.
> >> 
> >> Is there a reason we can't make this a property on the regulator
> >> instead?> 
> > Is there a reason we can't make this a property of the mmc subsystem?
> > ;)
> > 
> > Now, seriously, could you elaborate on this a bit more? Do you mean
> > that a regulator should provide a dummy set voltage operation that
> > would accept any voltage?
> 
> Sorry for the terseness.
> 
> It seems like we're encoding exactly the same information twice in two
> different subsystems -- I don't see the point, so I'd like to think
> about how we could do better.
> 
> For example, if we're only concerned about fixed regulators, could we
> just detect a fixed regulator in the driver and avoid the failing call
> to regulator_set_voltage() directly, without needing to go via this
> capability?  Seems like the capability doesn't tell us anything we
> couldn't already have known.

We could just check if the regulator provides the capability to change the 
voltage.

I don't see any direct way of querying the regulator for provided 
capabilities (correct me if I'm just blind), but calling 
regulator_count_voltages() on the regulator and checking if the returned 
value is 1 should be enough to assume that the regulator is fixed.

What do you think?

Best regards,
-- 
Tomasz Figa
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


Re: [PATCH v2 1/5] mmc: host: sdhci-s3c: Add broken-voltage DT property for broken voltage quirk

2012-09-19 Thread Chris Ball
Hi,

On Wed, Sep 19 2012, Tomasz Figa wrote:
> We could just check if the regulator provides the capability to change the 
> voltage.
>
> I don't see any direct way of querying the regulator for provided 
> capabilities (correct me if I'm just blind), but calling 
> regulator_count_voltages() on the regulator and checking if the returned 
> value is 1 should be enough to assume that the regulator is fixed.

Sounds good, I agree.  Are you able to test that the obvious patch below
works on your fixed-regulator board?

Jaehoon and Adrian, can you think of any reason why we shouldn't replace
MMC_CAP2_BROKEN_VOLTAGE with the regulator_count_voltages() call below?
Thanks.


diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index 044cd01..a3cc740 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -1132,7 +1132,7 @@ int mmc_regulator_set_ocr(struct mmc_host *mmc,
 */
voltage = regulator_get_voltage(supply);
 
-   if (mmc->caps2 & MMC_CAP2_BROKEN_VOLTAGE)
+   if (regulator_count_voltages(supply) == 1)
min_uV = max_uV = voltage;
 
if (voltage < 0)

-- 
Chris Ball  
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


Re: [PATCH v2 1/5] mmc: host: sdhci-s3c: Add broken-voltage DT property for broken voltage quirk

2012-09-19 Thread Tomasz Figa
hi,

On Wednesday 19 of September 2012 06:47:02 Chris Ball wrote:
> Hi,
> 
> On Wed, Sep 19 2012, Tomasz Figa wrote:
> > We could just check if the regulator provides the capability to change
> > the voltage.
> > 
> > I don't see any direct way of querying the regulator for provided
> > capabilities (correct me if I'm just blind), but calling
> > regulator_count_voltages() on the regulator and checking if the
> > returned
> > value is 1 should be enough to assume that the regulator is fixed.
> 
> Sounds good, I agree.  Are you able to test that the obvious patch below
> works on your fixed-regulator board?

Yes. I will report the result as soon as I test it.

Best regards,
-- 
Tomasz Figa
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


Re: [PATCH v2 1/5] mmc: host: sdhci-s3c: Add broken-voltage DT property for broken voltage quirk

2012-09-19 Thread Jaehoon Chung
Hi,

On 09/19/2012 07:47 PM, Chris Ball wrote:
> Hi,
> 
> On Wed, Sep 19 2012, Tomasz Figa wrote:
>> We could just check if the regulator provides the capability to change the 
>> voltage.
>>
>> I don't see any direct way of querying the regulator for provided 
>> capabilities (correct me if I'm just blind), but calling 
>> regulator_count_voltages() on the regulator and checking if the returned 
>> value is 1 should be enough to assume that the regulator is fixed.
> 
> Sounds good, I agree.  Are you able to test that the obvious patch below
> works on your fixed-regulator board?
> 
> Jaehoon and Adrian, can you think of any reason why we shouldn't replace
> MMC_CAP2_BROKEN_VOLTAGE with the regulator_count_voltages() call below?
> Thanks.
I think this is better than using MMC_CAP2_BROKEN_VOLTAGE.
I tested with this..and working fine.

Best Regards,
Jaehoon Chung
> 
> 
> diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
> index 044cd01..a3cc740 100644
> --- a/drivers/mmc/core/core.c
> +++ b/drivers/mmc/core/core.c
> @@ -1132,7 +1132,7 @@ int mmc_regulator_set_ocr(struct mmc_host *mmc,
>*/
>   voltage = regulator_get_voltage(supply);
>  
> - if (mmc->caps2 & MMC_CAP2_BROKEN_VOLTAGE)
> + if (regulator_count_voltages(supply) == 1)
>   min_uV = max_uV = voltage;
>  
>   if (voltage < 0)
> 

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


Re: [PATCH 0/3] ARM: EXYNOS: Power domain DT support extension

2012-09-19 Thread Tomasz Figa
Hi,

On Thursday 06 of September 2012 11:38:03 Tomasz Figa wrote:
> This patch series fixes two issues with existing DT support for Exynos
> power domains and extends it with the ability of binding devices to
> domains, basically making it possible to use power domains when using
> DT.
> 
> Tomasz Figa (3):
>   ARM: EXYNOS: pm_domain: Detect domain state on registration from DT
>   ARM: EXYNOS: pm_domain: Fix power domain name initialization
>   ARM: EXYNOS: pm_domain: Bind devices to power domains using DT
> 
>  .../bindings/arm/exynos/power_domain.txt   | 15 +++-
>  arch/arm/mach-exynos/pm_domains.c  | 93
> +- 2 files changed, 100 insertions(+), 8
> deletions(-)

Any further comments for this series? Could we merge it for 3.7?

Best regards,
-- 
Tomasz Figa
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


Re: [PATCH 0/5] ARM: EXYNOS: Add secure firmware support

2012-09-19 Thread Tomasz Figa
Hi,

On Thursday 13 of September 2012 10:13:33 Tomasz Figa wrote:
> Some Exynos-based boards are running with secure firmware running in
> TrustZone secure world, which changes the way some things have to be
> initialized.
> 
> This series adds support for specifying firmware operations, implements
> some firmware operations for Exynos secure firmware and adds a method of
> enabling secure firmware operations on Exynos-based boards through board
> file and device tree.
> 
> This is a continuation of the patch series by Kyungmin Park:
> [PATCH v5 1/2] ARM: Make a compile firmware conditionally
> http://thread.gmane.org/gmane.linux.ports.arm.kernel/183607
> [PATCH v5 2/2] ARM: EXYNOS: SMC instruction (aka firmware) support
> http://thread.gmane.org/gmane.linux.ports.arm.kernel/183608/focus=184109
> 
> Tomasz Figa (5):
>   ARM: EXYNOS: Add IO mapping for non-secure SYSRAM.
>   ARM: Add interface for registering and calling firmware-specific
> operations
>   ARM: EXYNOS: Add support for secure monitor calls
>   ARM: EXYNOS: Add support for Exynos secure firmware
>   ARM: EXYNOS: Add secure firmware support to secondary CPU bring-up
> 
>  .../devicetree/bindings/arm/samsung-boards.txt |  8 
>  arch/arm/common/Makefile   |  2 +
>  arch/arm/common/firmware.c | 18 
>  arch/arm/include/asm/firmware.h| 30 +
>  arch/arm/mach-exynos/Makefile  |  6 +++
>  arch/arm/mach-exynos/common.c  | 34 ++
>  arch/arm/mach-exynos/common.h  |  2 +
>  arch/arm/mach-exynos/exynos-smc.S  | 22 +
>  arch/arm/mach-exynos/firmware.c| 52
> ++ arch/arm/mach-exynos/include/mach/map.h  
>  |  3 ++
>  arch/arm/mach-exynos/mach-exynos4-dt.c |  1 +
>  arch/arm/mach-exynos/platsmp.c |  8 
>  arch/arm/mach-exynos/smc.h | 31 +
>  arch/arm/plat-samsung/include/plat/map-s5p.h   |  1 +
>  14 files changed, 218 insertions(+)
>  create mode 100644 arch/arm/common/firmware.c
>  create mode 100644 arch/arm/include/asm/firmware.h
>  create mode 100644 arch/arm/mach-exynos/exynos-smc.S
>  create mode 100644 arch/arm/mach-exynos/firmware.c
>  create mode 100644 arch/arm/mach-exynos/smc.h

Any further comments for this series? Maybe we could merge it for 3.7?

Best regards,
-- 
Tomasz Figa
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


RE: [PATCH v6 0/9] mmc: dw_mmc: add support for device tree based instantiation

2012-09-19 Thread Seungwon Jeon
> Hi Thomas,
> 
> On Wed, Sep 19 2012, Thomas Abraham wrote:
> >> Hi Jaehoon, Seungwon,
> >>
> >> All the changes you have suggested for this patch series has been
> >> completed. If you could ack this series, it would be great.
> >>
> >> Thanks,
> >> Thomas.
> >
> > Hi Chris,
> >
> > I have addressed all the comments received for the v5 of the dw-mmc
> > device tree support patch series. Will Newton has acked this patch
> > series. Can this series be merged for v3.7 ?
> 
> Yes, looks good; pushed to mmc-next for 3.7.  Jaehoon and Seungwon,
> if you reply soon with your ACK then I'll add it to this patchset.


Also, looks good to me.
But please check several patches before merging.
Sorry for late review.

Thanks,
Seungwon Jeon

> 
> Thanks,
> 
> - Chris.
> --
> Chris Ball  
> One Laptop Per Child
> --
> 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 v6 6/9] mmc: dw_mmc: add device tree support

2012-09-19 Thread Seungwon Jeon
On Tuesday, September 18, 2012, Thomas Abraham  
wrote:
> +#ifdef CONFIG_OF
> +/* given a slot id, find out the device node representing that slot */
> +static struct device_node *dw_mci_of_find_slot_node(struct device *dev, u8 
> slot)
> +{
> + struct device_node *np;
> + const __be32 *addr;
> + int len;
> +
> + if (!dev || !dev->of_node)
> + return NULL;
> +
> + for_each_child_of_node(dev->of_node, np) {
> + addr = of_get_property(np, "reg", &len);
> + if (!addr || (len < sizeof(int)))
> + continue;
> + if (be32_to_cpup(addr) == slot)
> + return np;
> + }
> + return NULL;
> +}
> +
> +/* find out bus-width for a given slot */
> +static u32 dw_mci_of_get_bus_wd(struct device *dev, u8 slot)
> +{
> + struct device_node *np = dw_mci_of_find_slot_node(dev, slot);
> + u32 bus_wd = 1;
> +
> + if (!np)
> + return 1;
> +
> + if (of_property_read_u32(np, "bus-width", &bus_wd))
> + dev_err(dev, "bus-width property not found, assuming width"
> +" as 1\n");
> + return bus_wd;
> +}
> +#else /* CONFIG_OF */
> +static u32 dw_mci_of_get_bus_wd(struct device *dev, u8 slot)
> +{
> + return 1;
> +}
> +static struct device_node *dw_mci_of_find_slot_node(struct device *dev, u8 
> slot)
> +{
> + return NULL;
> +}
> +#endif /* CONFIG_OF */
> +
>  static int dw_mci_init_slot(struct dw_mci *host, unsigned int id)
>  {
>   struct mmc_host *mmc;
>   struct dw_mci_slot *slot;
> + u8 bus_width;
> 
>   mmc = mmc_alloc_host(sizeof(struct dw_mci_slot), host->dev);
>   if (!mmc)
> @@ -1782,6 +1830,7 @@ static int dw_mci_init_slot(struct dw_mci *host, 
> unsigned int id)
>   slot->id = id;
>   slot->mmc = mmc;
>   slot->host = host;
> + host->slot[id] = slot;
> 
>   mmc->ops = &dw_mci_ops;
>   mmc->f_min = DIV_ROUND_UP(host->bus_hz, 510);
> @@ -1806,8 +1855,18 @@ static int dw_mci_init_slot(struct dw_mci *host, 
> unsigned int id)
>   mmc->caps2 = host->pdata->caps2;
> 
>   if (host->pdata->get_bus_wd)
> - if (host->pdata->get_bus_wd(slot->id) >= 4)
> - mmc->caps |= MMC_CAP_4_BIT_DATA;
> + bus_width = host->pdata->get_bus_wd(slot->id);
> + else if (host->dev->of_node)
> + bus_width = dw_mci_of_get_bus_wd(host->dev, slot->id);
> + else
> + bus_width = 1;
> +
> + switch (bus_width) {
> + case 8:
> + mmc->caps |= MMC_CAP_8_BIT_DATA;
> + case 4:
> + mmc->caps |= MMC_CAP_4_BIT_DATA;
> + }
> 
>   if (host->pdata->quirks & DW_MCI_QUIRK_HIGHSPEED)
>   mmc->caps |= MMC_CAP_SD_HIGHSPEED | MMC_CAP_MMC_HIGHSPEED;
> @@ -1852,7 +1911,6 @@ static int dw_mci_init_slot(struct dw_mci *host, 
> unsigned int id)
>   else
>   clear_bit(DW_MMC_CARD_PRESENT, &slot->flags);
> 
> - host->slot[id] = slot;
>   mmc_add_host(mmc);
> 
>  #if defined(CONFIG_DEBUG_FS)
> @@ -1944,16 +2002,74 @@ static bool mci_wait_reset(struct device *dev, struct 
> dw_mci *host)
>   return false;
>  }
> 
The following CONFIG_OF block can be put together in upper CONFIG_OF .

> +#ifdef CONFIG_OF
> +static struct dw_mci_of_quirks {
> + char *quirk;
> + int id;
> +} of_quirks[] = {
> + {
> + .quirk  = "supports-highspeed",
> + .id = DW_MCI_QUIRK_HIGHSPEED,
> + }, {
> + .quirk  = "broken-cd",
> + .id = DW_MCI_QUIRK_BROKEN_CARD_DETECTION,
> + },
> +};
> +
> +static struct dw_mci_board *dw_mci_parse_dt(struct dw_mci *host)
> +{
> + struct dw_mci_board *pdata;
> + struct device *dev = host->dev;
> + struct device_node *np = dev->of_node;
> + int idx;
> +
> + pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL);
> + if (!pdata) {
> + dev_err(dev, "could not allocate memory for pdata\n");
> + return ERR_PTR(-ENOMEM);
> + }
> +
> + /* find out number of slots supported */
> + if (of_property_read_u32(dev->of_node, "num-slots",
> + &pdata->num_slots)) {
> + dev_info(dev, "num-slots property not found, "
> + "assuming 1 slot is available\n");
> + pdata->num_slots = 1;
> + }
> +
> + /* get quirks */
> + for (idx = 0; idx < ARRAY_SIZE(of_quirks); idx++)
> + if (of_get_property(np, of_quirks[idx].quirk, NULL))
> + pdata->quirks |= of_quirks[idx].id;
> +
> + if (of_property_read_u32(np, "fifo-depth", &pdata->fifo_depth))
> + dev_info(dev, "fifo-depth property not found, using "
> + "value of FIFOTH register as default\n");
> +
> + of_property_read_u32(np, "card-detect-delay", &pdata->detect_delay_ms);
> +
> + return pdata;
> +}
> +
> +#else /* CONFIG_OF */
> +static struct dw_mci_board *

RE: [PATCH v6 8/9] mmc: dw_mmc: add support for implementation specific callbacks

2012-09-19 Thread Seungwon Jeon
On Tuesday, September 18, 2012, Thomas Abraham  
wrote:
> -int dw_mci_pltfm_register(struct platform_device *pdev)
> +int dw_mci_pltfm_register(struct platform_device *pdev,
> + struct dw_mci_drv_data *drv_data)
>  {
>   struct dw_mci *host;
>   struct resource *regs;
> @@ -41,6 +42,7 @@ int dw_mci_pltfm_register(struct platform_device *pdev)
>   if (host->irq < 0)
>   return host->irq;
> 
> + host->drv_data = drv_data;
>   host->dev = &pdev->dev;
>   host->irq_flags = 0;
>   host->pdata = pdev->dev.platform_data;
> @@ -48,6 +50,12 @@ int dw_mci_pltfm_register(struct platform_device *pdev)
>   if (!host->regs)
>   return -ENOMEM;
> 
> + if (host->drv_data->init) {
In non-Exynos platform, host->drv_data has NULL.

Thanks,
Seungwon Jeon

> + ret = host->drv_data->init(host);
> + if (ret)
> + return ret;
> + }
> +
>   platform_set_drvdata(pdev, host);
>   ret = dw_mci_probe(host);
>   return ret;
> @@ -56,7 +64,7 @@ EXPORT_SYMBOL_GPL(dw_mci_pltfm_register);
> 
>  static int __devinit dw_mci_pltfm_probe(struct platform_device *pdev)
>  {
> - return dw_mci_pltfm_register(pdev);
> + return dw_mci_pltfm_register(pdev, NULL);
>  }
> 
>  static int __devexit dw_mci_pltfm_remove(struct platform_device *pdev)
> diff --git a/drivers/mmc/host/dw_mmc-pltfm.h b/drivers/mmc/host/dw_mmc-pltfm.h
> index 6c065d9..301f245 100644
> --- a/drivers/mmc/host/dw_mmc-pltfm.h
> +++ b/drivers/mmc/host/dw_mmc-pltfm.h
> @@ -12,7 +12,8 @@
>  #ifndef _DW_MMC_PLTFM_H_
>  #define _DW_MMC_PLTFM_H_
> 
> -extern int dw_mci_pltfm_register(struct platform_device *pdev);
> +extern int dw_mci_pltfm_register(struct platform_device *pdev,
> + struct dw_mci_drv_data *drv_data);
>  extern int __devexit dw_mci_pltfm_remove(struct platform_device *pdev);
>  extern const struct dev_pm_ops dw_mci_pltfm_pmops;
> 
> diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
> index c792466..9f8e487 100644
> --- a/drivers/mmc/host/dw_mmc.c
> +++ b/drivers/mmc/host/dw_mmc.c
> @@ -231,6 +231,7 @@ static void dw_mci_set_timeout(struct dw_mci *host)
>  static u32 dw_mci_prepare_command(struct mmc_host *mmc, struct mmc_command 
> *cmd)
>  {
>   struct mmc_data *data;
> + struct dw_mci_slot *slot = mmc_priv(mmc);
>   u32 cmdr;
>   cmd->error = -EINPROGRESS;
> 
> @@ -260,6 +261,9 @@ static u32 dw_mci_prepare_command(struct mmc_host *mmc, 
> struct mmc_command *cmd)
>   cmdr |= SDMMC_CMD_DAT_WR;
>   }
> 
> + if (slot->host->drv_data->prepare_command)
> + slot->host->drv_data->prepare_command(slot->host, &cmdr);
> +
>   return cmdr;
>  }
> 
> @@ -815,6 +819,9 @@ static void dw_mci_set_ios(struct mmc_host *mmc, struct 
> mmc_ios *ios)
>   slot->clock = ios->clock;
>   }
> 
> + if (slot->host->drv_data->set_ios)
> + slot->host->drv_data->set_ios(slot->host, ios);
> +
>   switch (ios->power_mode) {
>   case MMC_POWER_UP:
>   set_bit(DW_MMC_CARD_NEED_INIT, &slot->flags);
> @@ -1820,6 +1827,7 @@ static int dw_mci_init_slot(struct dw_mci *host, 
> unsigned int id)
>  {
>   struct mmc_host *mmc;
>   struct dw_mci_slot *slot;
> + int ctrl_id, ret;
>   u8 bus_width;
> 
>   mmc = mmc_alloc_host(sizeof(struct dw_mci_slot), host->dev);
> @@ -1851,6 +1859,16 @@ static int dw_mci_init_slot(struct dw_mci *host, 
> unsigned int id)
>   if (host->pdata->caps)
>   mmc->caps = host->pdata->caps;
> 
> + if (host->dev->of_node) {
> + ctrl_id = of_alias_get_id(host->dev->of_node, "mshc");
> + if (ctrl_id < 0)
> + ctrl_id = 0;
> + } else {
> + ctrl_id = to_platform_device(host->dev)->id;
> + }
> + if (host->drv_data && host->drv_data->caps)
> + mmc->caps |= host->drv_data->caps[ctrl_id];
> +
>   if (host->pdata->caps2)
>   mmc->caps2 = host->pdata->caps2;
> 
> @@ -1861,6 +1879,14 @@ static int dw_mci_init_slot(struct dw_mci *host, 
> unsigned int id)
>   else
>   bus_width = 1;
> 
> + if (host->drv_data->setup_bus) {
> + struct device_node *slot_np;
> + slot_np = dw_mci_of_find_slot_node(host->dev, slot->id);
> + ret = host->drv_data->setup_bus(host, slot_np, bus_width);
> + if (ret)
> + goto err_setup_bus;
> + }
> +
>   switch (bus_width) {
>   case 8:
>   mmc->caps |= MMC_CAP_8_BIT_DATA;
> @@ -1927,6 +1953,10 @@ static int dw_mci_init_slot(struct dw_mci *host, 
> unsigned int id)
>   queue_work(host->card_workqueue, &host->card_work);
> 
>   return 0;
> +
> +err_setup_bus:
> + mmc_free_host(mmc);
> + return -EINVAL;
>  }
> 
>  static void dw_mci_cleanup_slot(struct dw_mci_slot *slot, unsigned int id)
> @@ -2021,7 +2051,7 @@ static

RE: [PATCH v6 9/9] mmc: dw_mmc: add support for exynos specific implementation of dw-mshc

2012-09-19 Thread Seungwon Jeon
On Tuesday, September 18, 2012, Thomas Abraham  
wrote:
> +int dw_mci_exynos_probe(struct platform_device *pdev)
> +{
> + struct dw_mci_drv_data *drv_data;
> + const struct of_device_id *match;
> +
> + match = of_match_node(dw_mci_exynos_match, pdev->dev.of_node);
> + drv_data = match->data;
In non-dt case, match has NULL.
Needed to check "pdev->dev.of_node"

Thanks,
Seungwon Jeon
> + return dw_mci_pltfm_register(pdev, drv_data);
> +}
> +
> +static struct platform_driver dw_mci_exynos_pltfm_driver = {
> + .probe  = dw_mci_exynos_probe,
> + .remove = __exit_p(dw_mci_pltfm_remove),
> + .driver = {
> + .name   = "dwmmc_exynos",
> + .of_match_table = of_match_ptr(dw_mci_exynos_match),
> + .pm = &dw_mci_pltfm_pmops,
> + },
> +};
> +
> +module_platform_driver(dw_mci_exynos_pltfm_driver);
> +
> +MODULE_DESCRIPTION("Samsung Specific DW-MSHC Driver Extension");
> +MODULE_AUTHOR("Thomas Abraham  +MODULE_LICENSE("GPL v2");
> +MODULE_ALIAS("platform:dwmmc-exynos");
> diff --git a/include/linux/mmc/dw_mmc.h b/include/linux/mmc/dw_mmc.h
> index 6cb043e..7c6a113 100644
> --- a/include/linux/mmc/dw_mmc.h
> +++ b/include/linux/mmc/dw_mmc.h
> @@ -227,7 +227,7 @@ struct dw_mci_board {
>   u32 num_slots;
> 
>   u32 quirks; /* Workaround / Quirk flags */
> - unsigned int bus_hz; /* Bus speed */
> + unsigned int bus_hz; /* Clock speed at the cclk_in pad */
> 
>   unsigned int caps;  /* Capabilities */
>   unsigned int caps2; /* More capabilities */
> --
> 1.6.6.rc2

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


Re: [PATCH 3/3] mmc: sdhci-s3c: Add clk_(enable/disable) in runtime suspend/resume

2012-09-19 Thread Chander Kashyap
Hi Chris,

On 19 September 2012 13:13, Jaehoon Chung  wrote:
> Looks good to me.
>
> Acked-by: Jaehoon Chung 
>
> On 09/19/2012 03:14 PM, Chris Ball wrote:
>> Hi Jaehoon, Girish,
>>
>> On Fri, Sep 14 2012, Chander Kashyap wrote:
>>> Perform clock disable/enable in runtime suspend/resume.
>>>
>>> Signed-off-by: Chander Kashyap 
>>> ---
>>>  drivers/mmc/host/sdhci-s3c.c |   25 +++--
>>>  1 file changed, 23 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/drivers/mmc/host/sdhci-s3c.c b/drivers/mmc/host/sdhci-s3c.c
>>> index 3f4518d..d51 100644
>>> --- a/drivers/mmc/host/sdhci-s3c.c
>>> +++ b/drivers/mmc/host/sdhci-s3c.c
>>> @@ -513,7 +513,9 @@ static int __devinit sdhci_s3c_probe(struct 
>>> platform_device *pdev)
>>>  goto err_no_busclks;
>>>  }
>>>
>>> +#ifndef CONFIG_PM_RUNTIME
>>>  clk_enable(sc->clk_bus[sc->cur_clk]);
>>> +#endif
>>>
>>>  res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>>>  host->ioaddr = devm_request_and_ioremap(&pdev->dev, res);
>>> @@ -620,10 +622,13 @@ static int __devinit sdhci_s3c_probe(struct 
>>> platform_device *pdev)
>>>  gpio_is_valid(pdata->ext_cd_gpio))
>>>  sdhci_s3c_setup_card_detect_gpio(sc);
>>>
>>> +clk_disable(sc->clk_io);
This should be in #ifndef CONFIG_PM_RUNTIME check
>>>  return 0;
>>>
>>>   err_req_regs:
>>> +#ifndef CONFIG_PM_RUNTIME
>>>  clk_disable(sc->clk_bus[sc->cur_clk]);
>>> +#endif
>>>  for (ptr = 0; ptr < MAX_BUS_CLK; ptr++) {
>>>  if (sc->clk_bus[ptr]) {
>>>  clk_put(sc->clk_bus[ptr]);
>>> @@ -656,12 +661,15 @@ static int __devexit sdhci_s3c_remove(struct 
>>> platform_device *pdev)
>>>  if (gpio_is_valid(sc->ext_cd_gpio))
>>>  gpio_free(sc->ext_cd_gpio);
>>>
>>> +clk_enable(sc->clk_io);
This should be in #ifndef CONFIG_PM_RUNTIME check
>>>  sdhci_remove_host(host, 1);
>>>
>>>  pm_runtime_dont_use_autosuspend(&pdev->dev);
>>>  pm_runtime_disable(&pdev->dev);
>>>
>>> +#ifndef CONFIG_PM_RUNTIME
>>>  clk_disable(sc->clk_bus[sc->cur_clk]);
>>> +#endif
>>>  for (ptr = 0; ptr < 3; ptr++) {
>>>  if (sc->clk_bus[ptr]) {
>>>  clk_put(sc->clk_bus[ptr]);
>>> @@ -696,15 +704,28 @@ static int sdhci_s3c_resume(struct device *dev)
>>>  static int sdhci_s3c_runtime_suspend(struct device *dev)
>>>  {
>>>  struct sdhci_host *host = dev_get_drvdata(dev);
>>> +struct sdhci_s3c *ourhost = to_s3c(host);
>>> +struct clk *busclk = ourhost->clk_io;
>>> +int ret;
>>> +
>>> +ret = sdhci_runtime_suspend_host(host);
>>>
>>> -return sdhci_runtime_suspend_host(host);
>>> +clk_disable(ourhost->clk_bus[ourhost->cur_clk]);
>>> +clk_disable(busclk);
>>> +return ret;
>>>  }
>>>
>>>  static int sdhci_s3c_runtime_resume(struct device *dev)
>>>  {
>>>  struct sdhci_host *host = dev_get_drvdata(dev);
>>> +struct sdhci_s3c *ourhost = to_s3c(host);
>>> +struct clk *busclk = ourhost->clk_io;
>>> +int ret;
>>>
>>> -return sdhci_runtime_resume_host(host);
>>> +clk_enable(busclk);
>>> +clk_enable(ourhost->clk_bus[ourhost->cur_clk]);
>>> +ret = sdhci_runtime_resume_host(host);
>>> +return ret;
>>>  }
>>>  #endif
>>
>> Could I get an ACK on this patch from one of you, please?
>>
>> - Chris.
>>
>
I will resend this patch after fixing the issue.


-- 
with warm regards,
Chander Kashyap
--
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] mmc: sdhci-s3c: Add clk_(enable/disable) in runtime suspend/resume

2012-09-19 Thread Chris Ball
Hi,

On Wed, Sep 19 2012, Chander Kashyap wrote:
> I will resend this patch after fixing the issue.

Thanks; please base your new patch against current mmc-next.

- Chris.
-- 
Chris Ball  
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


Re: [PATCH 3/3] mmc: sdhci-s3c: Add clk_(enable/disable) in runtime suspend/resume

2012-09-19 Thread Chander Kashyap
Thanks Chris ,
Sure i will do.

On 19 September 2012 19:51, Chris Ball  wrote:
> Hi,
>
> On Wed, Sep 19 2012, Chander Kashyap wrote:
>> I will resend this patch after fixing the issue.
>
> Thanks; please base your new patch against current mmc-next.
>
> - Chris.
> --
> Chris Ball  
> 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



-- 
with warm regards,
Chander Kashyap
--
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 1/5] mmc: host: sdhci-s3c: Add broken-voltage DT property for broken voltage quirk

2012-09-19 Thread Chris Ball
Hi,

On Wed, Sep 19 2012, Jaehoon Chung wrote:
>> On Wed, Sep 19 2012, Tomasz Figa wrote:
>>> We could just check if the regulator provides the capability to change the 
>>> voltage.
>>>
>>> I don't see any direct way of querying the regulator for provided 
>>> capabilities (correct me if I'm just blind), but calling 
>>> regulator_count_voltages() on the regulator and checking if the returned 
>>> value is 1 should be enough to assume that the regulator is fixed.
>> 
>> Sounds good, I agree.  Are you able to test that the obvious patch below
>> works on your fixed-regulator board?
>> 
>> Jaehoon and Adrian, can you think of any reason why we shouldn't replace
>> MMC_CAP2_BROKEN_VOLTAGE with the regulator_count_voltages() call below?
>> Thanks.
>
> I think this is better than using MMC_CAP2_BROKEN_VOLTAGE.
> I tested with this..and working fine.

Great, here's the patch.  Jaehoon, once this is merged, maybe you could
help remove the uses of MMC_CAP2_BROKEN_VOLTAGE from arch/arm/mach-exynos
and arch/arm/mach-s5pv210 now that they're no longer needed?

Thanks,

- Chris.


Subject: [PATCH] mmc: core: Replace MMC_CAP2_BROKEN_VOLTAGE with test for fixed 
regulator

Before this patch, we were using MMC_CAP2_BROKEN_VOLTAGE as a way to
avoid calling regulator_set_voltage() on a fixed regulator, but that's
just duplicating information that already exists -- we should test
whether the regulator is fixed directly, instead of via a capability.

This patch implements that test.  We can't reclaim the capability bit
just yet, since there are still boards in arch/arm/ that reference it;
those references can be removed now.

Reported-by: Tomasz Figa 
Signed-off-by: Chris Ball 
---
 drivers/mmc/core/core.c | 10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index 044cd01..6612163 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -1113,7 +1113,8 @@ int mmc_regulator_set_ocr(struct mmc_host *mmc,
int tmp;
int voltage;
 
-   /* REVISIT mmc_vddrange_to_ocrmask() may have set some
+   /*
+* REVISIT mmc_vddrange_to_ocrmask() may have set some
 * bits this regulator doesn't quite support ... don't
 * be too picky, most cards and regulators are OK with
 * a 0.1V range goof (it's a small error percentage).
@@ -1127,12 +1128,13 @@ int mmc_regulator_set_ocr(struct mmc_host *mmc,
max_uV = min_uV + 100 * 1000;
}
 
-   /* avoid needless changes to this voltage; the regulator
-* might not allow this operation
+   /*
+* If we're using a fixed/static regulator, don't call
+* regulator_set_voltage; it would fail.
 */
voltage = regulator_get_voltage(supply);
 
-   if (mmc->caps2 & MMC_CAP2_BROKEN_VOLTAGE)
+   if (regulator_count_voltages(supply) == 1)
min_uV = max_uV = voltage;
 
if (voltage < 0)
-- 
Chris Ball  
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


RE: [PATCH] ARM: dts: use uart2 for console on smdkv310 and smdk5250

2012-09-19 Thread Kukjin Kim
Thomas Abraham wrote:
> 
> On 17 September 2012 17:16, Kukjin Kim  wrote:
> >
> > Cc: Thomas Abraham 
> > Signed-off-by: Kukjin Kim 
> > ---
> >  arch/arm/boot/dts/exynos4210-smdkv310.dts |2 +-
> >  arch/arm/boot/dts/exynos5250-smdk5250.dts |2 +-
> >  2 files changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/arch/arm/boot/dts/exynos4210-smdkv310.dts
> b/arch/arm/boot/dts/exynos4210-smdkv310.dts
> > index 1beccc8..cb01e3d 100644
> > --- a/arch/arm/boot/dts/exynos4210-smdkv310.dts
> > +++ b/arch/arm/boot/dts/exynos4210-smdkv310.dts
> > @@ -26,7 +26,7 @@
> > };
> >
> > chosen {
> > -   bootargs = "root=/dev/ram0 rw ramdisk=8192
> initrd=0x4100,8M console=ttySAC1,115200 init=/linuxrc";
> > +   bootargs = "root=/dev/ram0 rw ramdisk=8192
> initrd=0x4100,8M console=ttySAC2,115200 init=/linuxrc";
> > };
> 
> Dear Mr. Kim,
> 
> What is the reason for changing the console port to 2 for smdkv310 board?
> 
Since uart1 can be used for other purpose, we changed the default console
port to use uart2 a few month ago for all of SMDKs. And if required, I will
change it for current defconfigs.

Thanks.

K-Gene 

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


[GIT PULL 1/7] Samsung cleanup for v3.7

2012-09-19 Thread Kukjin Kim
Hi Arnd, Olof

Here, there are cleanup patches for Samsung v3.7 and most of them are
related to cleanup Samsung specific gpio API.

If any problem, please kindly let me know.

Thanks.

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

The following changes since commit fea7a08acb13524b47711625eebea40a0ede69a0:

  Linux 3.6-rc3 (2012-08-22 13:29:06 -0700)

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

Jonghwan Choi (1):
  ARM: EXYNOS: cleanup unused code related to GPS

Sachin Kamat (2):
  ARM: S3C24XX: Use module_platform_driver macro in h1940-bluetooth.c
  ARM: S3C24XX: Use module_platform_driver macro in mach-osiris-dvs.c

Sylwester Nawrocki (4):
  ARM: S3C24XX: Convert users of s3c2410_gpio_setpin to gpiolib API
  ARM: S3C24XX: Remove obsolete GPIO API declarations
  gpio-samsung: Remove now unused s3c2410_gpio* API
  gpio: samsung: Update documentation

 Documentation/arm/Samsung-S3C24XX/GPIO.txt|   82 +++---
 Documentation/arm/Samsung/GPIO.txt|8 +--
 arch/arm/mach-exynos/clock-exynos5.c  |9 ---
 arch/arm/mach-exynos/include/mach/map.h   |1 -
 arch/arm/mach-s3c24xx/h1940-bluetooth.c   |   14 +
 arch/arm/mach-s3c24xx/mach-anubis.c   |3 +-
 arch/arm/mach-s3c24xx/mach-jive.c |   12 ++--
 arch/arm/mach-s3c24xx/mach-mini2440.c |4 +-
 arch/arm/mach-s3c24xx/mach-nexcoder.c |   22 +++---
 arch/arm/mach-s3c24xx/mach-osiris-dvs.c   |   13 +---
 arch/arm/mach-s3c24xx/mach-osiris.c   |7 +-
 arch/arm/plat-samsung/include/plat/gpio-fns.h |   97
-
 drivers/gpio/gpio-samsung.c   |   40 --
 13 files changed, 55 insertions(+), 257 deletions(-)

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


[GIT PULL 2/7] Samsung gpio for v3.7

2012-09-19 Thread Kukjin Kim
Hi Arnd, Olof

This is for supporting DT gpio for Samsung S3C24XX.

Since there are many changes for gpio-samsung in my tree, this has been
included in my tree with Linus' agreement.

If any problems, please kindly let me know.

Thanks.

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

The following changes since commit 4cbe5a555fa58a79b6ecbb6c531b8bab0650778d:

  Linux 3.6-rc4 (2012-09-01 10:39:58 -0700)

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

Heiko Stuebner (1):
  gpio: samsung: add devicetree init for s3c24xx arches

 .../devicetree/bindings/gpio/gpio-samsung.txt  |   43 +
 drivers/gpio/gpio-samsung.c|   63

 2 files changed, 106 insertions(+), 0 deletions(-)

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


[GIT PULL 3/7] Samsung pinctrl for v3.7

2012-09-19 Thread Kukjin Kim
Hi Arnd, Olof

This branch is for supporting pinctrl for Samsung EXYNOS. Now this can
support EXYNOS4210 and other EXYNOS SoCs such as EXYNOS4X12 will be
supported next time.

If any problems, please kindly let me know.

Thanks.

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

The following changes since commit 4cbe5a555fa58a79b6ecbb6c531b8bab0650778d:

  Linux 3.6-rc4 (2012-09-01 10:39:58 -0700)

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

Thomas Abraham (6):
  pinctrl: add samsung pinctrl and gpiolib driver
  pinctrl: add exynos4210 specific extensions for samsung pinctrl driver
  gpio: exynos4: skip gpiolib registration if pinctrl driver is used
  ARM: EXYNOS: skip wakeup interrupt setup if pinctrl driver is used
  ARM: dts: Add pinctrl node entries for SAMSUNG EXYNOS4210 SoC
  ARM: EXYNOS: Enable pinctrl driver support for EXYNOS4 device tree
enabled platform

 .../bindings/pinctrl/samsung-pinctrl.txt   |  196 +
 arch/arm/boot/dts/exynos4210-pinctrl.dtsi  |  457 ++
 arch/arm/boot/dts/exynos4210.dtsi  |   37 +
 arch/arm/mach-exynos/Kconfig   |2 +
 arch/arm/mach-exynos/common.c  |   26 +
 drivers/gpio/gpio-samsung.c|   21 +
 drivers/pinctrl/Kconfig|9 +
 drivers/pinctrl/Makefile   |2 +
 drivers/pinctrl/pinctrl-exynos.c   |  560 
 drivers/pinctrl/pinctrl-exynos.h   |  217 +
 drivers/pinctrl/pinctrl-samsung.c  |  888

 drivers/pinctrl/pinctrl-samsung.h  |  239 ++
 12 files changed, 2654 insertions(+), 0 deletions(-)
 create mode 100644
Documentation/devicetree/bindings/pinctrl/samsung-pinctrl.txt
 create mode 100644 arch/arm/boot/dts/exynos4210-pinctrl.dtsi
 create mode 100644 drivers/pinctrl/pinctrl-exynos.c
 create mode 100644 drivers/pinctrl/pinctrl-exynos.h
 create mode 100644 drivers/pinctrl/pinctrl-samsung.c
 create mode 100644 drivers/pinctrl/pinctrl-samsung.h

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


[GIT PULL 4/7] Samsung gscaler for v3.7

2012-09-19 Thread Kukjin Kim
Hi Arnd, Olof

Here is G-Scaler DT for supporting EXYNOS5 SoCs.

If any problems, please kindly let me know.

Thanks.

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

The following changes since commit 4cbe5a555fa58a79b6ecbb6c531b8bab0650778d:

  Linux 3.6-rc4 (2012-09-01 10:39:58 -0700)

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

Shaik Ameer Basha (2):
  ARM: EXYNOS: Add clock support for G-Scaler
  ARM: EXYNOS: Adds G-Scaler device from Device Tree

 .../devicetree/bindings/media/exynos5-gsc.txt  |   30 +++
 arch/arm/boot/dts/exynos5250.dtsi  |   28 +++
 arch/arm/mach-exynos/clock-exynos5.c   |   86

 arch/arm/mach-exynos/include/mach/map.h|5 +
 arch/arm/mach-exynos/mach-exynos5-dt.c |8 ++
 5 files changed, 157 insertions(+), 0 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/media/exynos5-gsc.txt

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


[GIT PULL 5/7] Samsung board for v3.7

2012-09-19 Thread Kukjin Kim
Hi Arnd, Olof,

This is for updating non-DT Samsung board files for v3.7, there are adding
generic PWM lookup support and some updates.

If any problems, please kindly let me know.

Thanks.

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

The following changes since commit 0d7614f09c1ebdbaa1599a5aba7593f147bf96ee:

  Linux 3.6-rc1 (2012-08-02 16:38:10 -0700)

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

Mark Brown (2):
  ARM: S3C64XX: Update configuration for WM5102 module on Cragganmore
  ARM: S3C64XX: Register audio platform devices for Bells on Cragganmore

Sachin Kamat (4):
  ARM: dts: Use active low flag for gpio-keys on Origen
  ARM: dts: Add heartbeat gpio-leds support to Origen
  ARM: EXYNOS: Add generic PWM lookup support for SMDK4X12
  ARM: EXYNOS: Add generic PWM lookup support for SMDKV310

Tushar Behera (1):
  ARM: EXYNOS: Use generic pwm driver in Origen board

 arch/arm/boot/dts/exynos4210-origen.dts  |   18 +---
 arch/arm/mach-exynos/Kconfig |3 ++
 arch/arm/mach-exynos/mach-origen.c   |6 
 arch/arm/mach-exynos/mach-smdk4x12.c |6 
 arch/arm/mach-exynos/mach-smdkv310.c |7 +
 arch/arm/mach-s3c64xx/mach-crag6410-module.c |   36
++---
 arch/arm/mach-s3c64xx/mach-crag6410.c|   12 
 7 files changed, 78 insertions(+), 10 deletions(-)

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


[GIT PULL 6/7] Samsung cleanup fimd header for v3.7

2012-09-19 Thread Kukjin Kim
Hi Arnd, Olof.

This is for moving header file is related to fimd from platform to
include/video.

Since this touches many Samsung stuff, it is included in samsung tree and I
requested to pull into Florian's tree and he already agreed. So its name is
'v3.7-for-florian'.

If any problems, please kindly let me know.

Thanks.

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

The following changes since commit 0d7614f09c1ebdbaa1599a5aba7593f147bf96ee:

  Linux 3.6-rc1 (2012-08-02 16:38:10 -0700)

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

Leela Krishna Amudala (2):
  include/video: move fimd register headers from platform to
include/video
  include/video: Add register offsets for FIMD version 8

 arch/arm/mach-exynos/mach-nuri.c   |2 +-
 arch/arm/mach-exynos/mach-origen.c |2 +-
 arch/arm/mach-exynos/mach-smdk4x12.c   |2 +-
 arch/arm/mach-exynos/mach-smdkv310.c   |2 +-
 arch/arm/mach-exynos/mach-universal_c210.c |2 +-
 arch/arm/mach-exynos/setup-fimd0.c |2 +-
 arch/arm/mach-s3c24xx/mach-smdk2416.c  |2 +-
 arch/arm/mach-s3c64xx/mach-anw6410.c   |2 +-
 arch/arm/mach-s3c64xx/mach-crag6410.c  |2 +-
 arch/arm/mach-s3c64xx/mach-hmt.c   |2 +-
 arch/arm/mach-s3c64xx/mach-mini6410.c  |2 +-
 arch/arm/mach-s3c64xx/mach-ncp.c   |2 +-
 arch/arm/mach-s3c64xx/mach-real6410.c  |2 +-
 arch/arm/mach-s3c64xx/mach-smartq5.c   |2 +-
 arch/arm/mach-s3c64xx/mach-smartq7.c   |2 +-
 arch/arm/mach-s3c64xx/mach-smdk6410.c  |2 +-
 arch/arm/mach-s5p64x0/mach-smdk6440.c  |2 +-
 arch/arm/mach-s5p64x0/mach-smdk6450.c  |2 +-
 arch/arm/mach-s5pc100/mach-smdkc100.c  |2 +-
 arch/arm/mach-s5pv210/mach-aquila.c|2 +-
 arch/arm/mach-s5pv210/mach-goni.c  |2 +-
 arch/arm/mach-s5pv210/mach-smdkv210.c  |2 +-
 arch/arm/plat-samsung/include/plat/regs-fb-v4.h|  159

 drivers/gpu/drm/exynos/exynos_drm_fimd.c   |2 +-
 drivers/video/s3c-fb.c |2 +-
 .../plat/regs-fb.h => include/video/samsung_fimd.h |  152
+--
 26 files changed, 165 insertions(+), 194 deletions(-)
 delete mode 100644 arch/arm/plat-samsung/include/plat/regs-fb-v4.h
 rename arch/arm/plat-samsung/include/plat/regs-fb.h =>
include/video/samsung_fimd.h (73%)

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


[GIT PULL 7/7] Samsung for v3.7

2012-09-19 Thread Kukjin Kim
Hi Arnd, Olof

This is for updating s3c6400_defconfig to build every s3c64xx stuff.

This helps to know at least building error before merging them.

Note that I'm still sorting out some Samsung stuff for v3.7 and it will be
sent to you soon.

Thanks.

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

The following changes since commit 0d7614f09c1ebdbaa1599a5aba7593f147bf96ee:

  Linux 3.6-rc1 (2012-08-02 16:38:10 -0700)

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

Kukjin Kim (1):
  ARM: s3c6400_defconfig: enable more boards in defconfig

 arch/arm/configs/s3c6400_defconfig |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

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


RE: [PATCH V5] ARM: EXYNOS5: Add bus clock for FIMD

2012-09-19 Thread Kukjin Kim
Leela Krishna Amudala wrote:
> 
> This patch adds the bus clock for FIMD and changes the device name for lcd
> clock
> 
> Signed-off-by: Leela Krishna Amudala 
> ---
>  arch/arm/mach-exynos/clock-exynos5.c |   32
++
> --
>  1 files changed, 22 insertions(+), 10 deletions(-)
> 
> diff --git a/arch/arm/mach-exynos/clock-exynos5.c b/arch/arm/mach-
> exynos/clock-exynos5.c
> index 774533c..404c53d 100644
> --- a/arch/arm/mach-exynos/clock-exynos5.c
> +++ b/arch/arm/mach-exynos/clock-exynos5.c
> @@ -891,6 +891,13 @@ static struct clk exynos5_clk_mdma1 = {
>   .ctrlbit= (1 << 4),
>  };
> 
> +static struct clk exynos5_clk_fimd1 = {
> + .name   = "fimd",
> + .devname= "exynos5-fb.1",
> + .enable = exynos5_clk_ip_disp1_ctrl,
> + .ctrlbit= (1 << 0),
> +};
> +
>  struct clk *exynos5_clkset_group_list[] = {
>   [0] = &clk_ext_xtal_mux,
>   [1] = NULL,
> @@ -1120,6 +1127,18 @@ static struct clksrc_clk exynos5_clk_sclk_spi2 = {
>   .reg_div = { .reg = EXYNOS5_CLKDIV_PERIC2, .shift = 8, .size = 8 },
>  };
> 
> +struct clksrc_clk exynos5_clk_sclk_fimd1 = {
> + .clk= {
> + .name   = "sclk_fimd",
> + .devname= "exynos5-fb.1",
> + .enable = exynos5_clksrc_mask_disp1_0_ctrl,
> + .ctrlbit= (1 << 0),
> + },
> + .sources = &exynos5_clkset_group,
> + .reg_src = { .reg = EXYNOS5_CLKSRC_DISP1_0, .shift = 0, .size = 4 },
> + .reg_div = { .reg = EXYNOS5_CLKDIV_DISP1_0, .shift = 0, .size = 4 },
> +};
> +
>  static struct clksrc_clk exynos5_clksrcs[] = {
>   {
>   .clk= {
> @@ -1131,16 +1150,6 @@ static struct clksrc_clk exynos5_clksrcs[] = {
>   .reg_div = { .reg = EXYNOS5_CLKDIV_FSYS3, .shift = 8, .size
> = 8 },
>   }, {
>   .clk= {
> - .name   = "sclk_fimd",
> - .devname= "s3cfb.1",
> - .enable = exynos5_clksrc_mask_disp1_0_ctrl,
> - .ctrlbit= (1 << 0),
> - },
> - .sources = &exynos5_clkset_group,
> - .reg_src = { .reg = EXYNOS5_CLKSRC_DISP1_0, .shift =
> 0, .size = 4 },
> - .reg_div = { .reg = EXYNOS5_CLKDIV_DISP1_0, .shift =
> 0, .size = 4 },
> - }, {
> - .clk= {
>   .name   = "aclk_266_gscl",
>   },
>   .sources = &clk_src_gscl_266,
> @@ -1240,12 +1249,14 @@ static struct clksrc_clk *exynos5_sysclks[] = {
>   &exynos5_clk_mdout_spi0,
>   &exynos5_clk_mdout_spi1,
>   &exynos5_clk_mdout_spi2,
> + &exynos5_clk_sclk_fimd1,
>  };
> 
>  static struct clk *exynos5_clk_cdev[] = {
>   &exynos5_clk_pdma0,
>   &exynos5_clk_pdma1,
>   &exynos5_clk_mdma1,
> + &exynos5_clk_fimd1,
>  };
> 
>  static struct clksrc_clk *exynos5_clksrc_cdev[] = {
> @@ -1274,6 +1285,7 @@ static struct clk_lookup exynos5_clk_lookup[] = {
>   CLKDEV_INIT("dma-pl330.0", "apb_pclk", &exynos5_clk_pdma0),
>   CLKDEV_INIT("dma-pl330.1", "apb_pclk", &exynos5_clk_pdma1),
>   CLKDEV_INIT("dma-pl330.2", "apb_pclk", &exynos5_clk_mdma1),
> + CLKDEV_INIT("exynos5-fb.1", "lcd", &exynos5_clk_fimd1),
>  };
> 
>  static unsigned long exynos5_epll_get_rate(struct clk *clk)
> --
> 1.7.0.4

Looks OK to me, will apply with Jingoo's ack(Or review?).

Thanks.

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

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


RE: [PATCH 2/2] ARM: SAMSUNG: Add check for NULL in clock interface

2012-09-19 Thread Kukjin Kim
Thomas Abraham wrote:
> 
> On 6 September 2012 19:55, Chander Kashyap 
> wrote:
> > The clock instance parameter in Samsung clock interface is not being
> checked
> > for NULL pointers. Add checks for NULL pointers.
> >
> > Signed-off-by: Chander Kashyap 
> > ---
> >  arch/arm/plat-samsung/clock.c |8 
> >  1 file changed, 4 insertions(+), 4 deletions(-)
> >
> > diff --git a/arch/arm/plat-samsung/clock.c b/arch/arm/plat-
> samsung/clock.c
> > index 65c5eca..7938fbc 100644
> > --- a/arch/arm/plat-samsung/clock.c
> > +++ b/arch/arm/plat-samsung/clock.c
> > @@ -119,7 +119,7 @@ void clk_disable(struct clk *clk)
> >
> >  unsigned long clk_get_rate(struct clk *clk)
> >  {
> > -   if (IS_ERR(clk))
> > +   if (IS_ERR_OR_NULL(clk))
> > return 0;
> >
> > if (clk->rate != 0)
> > @@ -136,7 +136,7 @@ unsigned long clk_get_rate(struct clk *clk)
> >
> >  long clk_round_rate(struct clk *clk, unsigned long rate)
> >  {
> > -   if (!IS_ERR(clk) && clk->ops && clk->ops->round_rate)
> > +   if (!IS_ERR_OR_NULL(clk) && clk->ops && clk->ops->round_rate)
> > return (clk->ops->round_rate)(clk, rate);
> >
> > return rate;
> > @@ -146,7 +146,7 @@ int clk_set_rate(struct clk *clk, unsigned long
rate)
> >  {
> > int ret;
> >
> > -   if (IS_ERR(clk))
> > +   if (IS_ERR_OR_NULL(clk))
> > return -EINVAL;
> >
> > /* We do not default just do a clk->rate = rate as
> > @@ -175,7 +175,7 @@ int clk_set_parent(struct clk *clk, struct clk
> *parent)
> >  {
> > int ret = 0;
> >
> > -   if (IS_ERR(clk))
> > +   if (IS_ERR_OR_NULL(clk) || IS_ERR_OR_NULL(parent))
> > return -EINVAL;
> >
> > spin_lock(&clocks_lock);
> > --
> > 1.7.9.5
> 
> Acked-by: Thomas Abraham 

Looks OK, will apply.

Thanks.

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

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


RE: [PATCH 1/2] ARM: Exynos4: Put PCM, Slimbus, Spdif clocks to off state

2012-09-19 Thread Kukjin Kim
Thomas Abraham wrote:
> 
> On 6 September 2012 19:46, Chander Kashyap 
> wrote:
> > The clocks for PCM, Slimbus, Spdif added to off list in order
> > to turn them off at boot time.
> >
> > Signed-off-by: Chander Kashyap 
> > ---
> >  arch/arm/mach-exynos/clock-exynos4.c |   19 +++
> >  1 file changed, 19 insertions(+)
> >
> > diff --git a/arch/arm/mach-exynos/clock-exynos4.c b/arch/arm/mach-
> exynos/clock-exynos4.c
> > index 7cc5491..6a45c9a 100644
> > --- a/arch/arm/mach-exynos/clock-exynos4.c
> > +++ b/arch/arm/mach-exynos/clock-exynos4.c
> > @@ -627,6 +627,25 @@ static struct clk exynos4_init_clocks_off[] = {
> > .enable = exynos4_clk_ip_peril_ctrl,
> > .ctrlbit= (1 << 21),
> > }, {
> > +   .name   = "pcm",
> > +   .devname= "samsung-pcm.1",
> > +   .enable = exynos4_clk_ip_peril_ctrl,
> > +   .ctrlbit= (1 << 22),
> > +   }, {
> > +   .name   = "pcm",
> > +   .devname= "samsung-pcm.2",
> > +   .enable = exynos4_clk_ip_peril_ctrl,
> > +   .ctrlbit= (1 << 23),
> > +   }, {
> > +   .name   = "slimbus",
> > +   .enable = exynos4_clk_ip_peril_ctrl,
> > +   .ctrlbit= (1 << 25),
> > +   }, {
> > +   .name   = "spdif",
> > +   .devname= "samsung-spdif",
> > +   .enable = exynos4_clk_ip_peril_ctrl,
> > +   .ctrlbit= (1 << 26),
> > +   }, {
> > .name   = "ac97",
> > .devname= "samsung-ac97",
> > .enable = exynos4_clk_ip_peril_ctrl,
> > --
> > 1.7.9.5
> 
> Acked-by: Thomas Abraham 

Sangbeom, could you please check this one more?

Thanks.

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

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


RE: [PATCH v3] ARM: S3C24XX: Add WIZnet W5300E01-ARM board support

2012-09-19 Thread Kukjin Kim
Taehun Kim wrote:
> 
> - The gpio routines are changed to use the gpio_request() functions from
>   comments of Vasily and Sylwester.
> - The mistake of adding a character by my email client automatically is
> fixed.
> 
> Please review this patch and apply it if do not have any problems.
> 

Taehun,

Above area is for adding comments like 'This patch adds WIZnet W5300E01 board' 
because it will be remained in its git log and nobody want to see your old 
request in there. If any comments which are not related to changes just put it 
after '---' around your sign. It doesn't hurt your patch.

And you need to update this against on for-next of my tree because some S3C2410 
gpio APIs have been gone.(See the Sylwester's comments) Please re-send this.

Thanks.

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


> Signed-off-by: Taehun Kim 
> ---
>  arch/arm/mach-s3c24xx/Kconfig |5 +
>  arch/arm/mach-s3c24xx/Makefile|1 +
>  arch/arm/mach-s3c24xx/mach-w5300e01.c |  193
> +
>  3 files changed, 199 insertions(+)
>  create mode 100644 arch/arm/mach-s3c24xx/mach-w5300e01.c
>  
[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


RE: [PATCH v2 5/5] ARM: Exynos: Add basic dts file for Samsung Trats board

2012-09-19 Thread Kukjin Kim
Tomasz Figa wrote:
> 
> Hi Kgene,
> 
> On Saturday 08 of September 2012 11:47:15 Kukjin Kim wrote:
> > > > > +   memory {
> > > > > +   reg =  <0x4000 0x2000
> > > > > +   0x6000 0x2000>;
> > > > > +   };
> > > >
> > > > Why does this have to be split. Why not have a single entry with the
> > > > size as 0x4000?
> > >
> > > The memory node corresponds to struct meminfo and each entry (with two
> > > values) makes one struct membank defining a memory bank.
> >
> > Well...
> >
> > > I've been talking with Kyungmin about this. Originally bootloaders
> used
> > > to report 4 banks of 256 MiB, but it turned out that real bank
> > > configuration on Trats is 2 banks of 512 MiB.
> >
> > I think, following should ok here.
> >
> > memory {
> > reg = <0x4000 0x4000>;
> > };
> 
> This will not boot with CONFIG_SPARSEMEM, unless maximum section size is
> increased to 1024MiB.
> 
Well, see other Origen board. As I know, it works well under environment you
said but I'm not sure about its boot-loader environment. Anyway, please
check one more and let me know. Then, if you still have same problem, let's
use double entries for memory temporary.

Thanks.

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

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


RE: [PATCH 1/2] ARM: Exynos4: Put PCM, Slimbus, Spdif clocks to off state

2012-09-19 Thread Sangbeom Kim
Hi!
On Thursday, Sep 20, 2012 at 08:24 AM, Kukjin Kim wrote:

> > > The clocks for PCM, Slimbus, Spdif added to off list in order
> > > to turn them off at boot time.
> > >
> > > Signed-off-by: Chander Kashyap 
> > Acked-by: Thomas Abraham 

Acked-by: Sangbeom Kim 

Thanks,
Sangbeom.

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


RE: [PATCH 1/2] ARM: Exynos4: Put PCM, Slimbus, Spdif clocks to off state

2012-09-19 Thread Kukjin Kim
Sangbeom Kim wrote:
> 
> Hi!
> On Thursday, Sep 20, 2012 at 08:24 AM, Kukjin Kim wrote:
> 
> > > > The clocks for PCM, Slimbus, Spdif added to off list in order
> > > > to turn them off at boot time.
> > > >
> > > > Signed-off-by: Chander Kashyap 
> > > Acked-by: Thomas Abraham 
> 
> Acked-by: Sangbeom Kim 
> 
Thanks, will apply.

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

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


RE: [PATCH] ARM: EXYNOS: no duplicate mask/unmask in eint0_15

2012-09-19 Thread Kukjin Kim
Doug Anderson wrote:
> 
> On Thu, Sep 6, 2012 at 8:21 AM, Daniel Kurtz  wrote:
> > chained_irq_enter/exit() already mask&ack/unmask the chained interrupt.
> > There is no need to also explicitly do it in the handler.
> >
> > Signed-off-by: Daniel Kurtz 
> > ---
> >  arch/arm/mach-exynos/common.c |7 ---
> >  1 files changed, 0 insertions(+), 7 deletions(-)
> >
> > diff --git a/arch/arm/mach-exynos/common.c b/arch/arm/mach-
> exynos/common.c
> > index 4eb39cd..0a85aec 100644
> > --- a/arch/arm/mach-exynos/common.c
> > +++ b/arch/arm/mach-exynos/common.c
> > @@ -965,14 +965,7 @@ static void exynos_irq_eint0_15(unsigned int irq,
> struct irq_desc *desc)
> > struct irq_chip *chip = irq_get_chip(irq);
> >
> > chained_irq_enter(chip, desc);
> > -   chip->irq_mask(&desc->irq_data);
> > -
> > -   if (chip->irq_ack)
> > -   chip->irq_ack(&desc->irq_data);
> > -
> > generic_handle_irq(*irq_data);
> > -
> > -   chip->irq_unmask(&desc->irq_data);
> > chained_irq_exit(chip, desc);
> >  }
> >
> > --
> > 1.7.7.3
> >
> 
> Acked-by: Doug Anderson 

Yes, will apply.
Thanks.

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

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


Re: [PATCH V4] ARM: EXYNOS5: Add bus clock and set parent clock for FIMD

2012-09-19 Thread Jingoo Han
On Monday, September 17, 2012 7:37 PM Kukjin Kim wrote
> 
> Jingoo Han wrote:
> >
> > On Monday, September 17, 2012 11:43 PM Leela Krishna Amudala wrote
> > >
> > > This patch adds the bus clock for FIMD and changes the device name for
> > lcd clock
> > > also sets mout_mpll_user as parent clock to fimd
> > >
> > > Signed-off-by: Leela Krishna Amudala 
> >
> > Acked-by: Jingoo Han 
> >
> In this case, since Leela addressed comments from you, seems it should be
> 'Reviewed-by'?
> 

According to 'Documentation/SubmittingPatches',

402 Acked-by: is often used by the maintainer of the affected code when that
403 maintainer neither contributed to nor forwarded the patch.

I just use 'Acked-by' as Samsung Framebuffer maintainer, because
this patch affects Samsung Framebuffer driver directly.

Good luck.



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


Re: [PATCH V5] ARM: EXYNOS5: Add bus clock for FIMD

2012-09-19 Thread Jingoo Han
On Tuesday, September 18, 2012 11:25 PM Leela Krishna Amudala wrote
> 
> This patch adds the bus clock for FIMD and changes the device name for lcd 
> clock
> 
> Signed-off-by: Leela Krishna Amudala 

Reviewed-by: Jingoo Han 


> ---
>  arch/arm/mach-exynos/clock-exynos5.c |   32 ++--
>  1 files changed, 22 insertions(+), 10 deletions(-)
> 
> diff --git a/arch/arm/mach-exynos/clock-exynos5.c 
> b/arch/arm/mach-exynos/clock-exynos5.c
> index 774533c..404c53d 100644
> --- a/arch/arm/mach-exynos/clock-exynos5.c
> +++ b/arch/arm/mach-exynos/clock-exynos5.c
> @@ -891,6 +891,13 @@ static struct clk exynos5_clk_mdma1 = {
>   .ctrlbit= (1 << 4),
>  };
> 
> +static struct clk exynos5_clk_fimd1 = {
> + .name   = "fimd",
> + .devname= "exynos5-fb.1",
> + .enable = exynos5_clk_ip_disp1_ctrl,
> + .ctrlbit= (1 << 0),
> +};
> +
>  struct clk *exynos5_clkset_group_list[] = {
>   [0] = &clk_ext_xtal_mux,
>   [1] = NULL,
> @@ -1120,6 +1127,18 @@ static struct clksrc_clk exynos5_clk_sclk_spi2 = {
>   .reg_div = { .reg = EXYNOS5_CLKDIV_PERIC2, .shift = 8, .size = 8 },
>  };
> 
> +struct clksrc_clk exynos5_clk_sclk_fimd1 = {
> + .clk= {
> + .name   = "sclk_fimd",
> + .devname= "exynos5-fb.1",
> + .enable = exynos5_clksrc_mask_disp1_0_ctrl,
> + .ctrlbit= (1 << 0),
> + },
> + .sources = &exynos5_clkset_group,
> + .reg_src = { .reg = EXYNOS5_CLKSRC_DISP1_0, .shift = 0, .size = 4 },
> + .reg_div = { .reg = EXYNOS5_CLKDIV_DISP1_0, .shift = 0, .size = 4 },
> +};
> +
>  static struct clksrc_clk exynos5_clksrcs[] = {
>   {
>   .clk= {
> @@ -1131,16 +1150,6 @@ static struct clksrc_clk exynos5_clksrcs[] = {
>   .reg_div = { .reg = EXYNOS5_CLKDIV_FSYS3, .shift = 8, .size = 8 
> },
>   }, {
>   .clk= {
> - .name   = "sclk_fimd",
> - .devname= "s3cfb.1",
> - .enable = exynos5_clksrc_mask_disp1_0_ctrl,
> - .ctrlbit= (1 << 0),
> - },
> - .sources = &exynos5_clkset_group,
> - .reg_src = { .reg = EXYNOS5_CLKSRC_DISP1_0, .shift = 0, .size = 
> 4 },
> - .reg_div = { .reg = EXYNOS5_CLKDIV_DISP1_0, .shift = 0, .size = 
> 4 },
> - }, {
> - .clk= {
>   .name   = "aclk_266_gscl",
>   },
>   .sources = &clk_src_gscl_266,
> @@ -1240,12 +1249,14 @@ static struct clksrc_clk *exynos5_sysclks[] = {
>   &exynos5_clk_mdout_spi0,
>   &exynos5_clk_mdout_spi1,
>   &exynos5_clk_mdout_spi2,
> + &exynos5_clk_sclk_fimd1,
>  };
> 
>  static struct clk *exynos5_clk_cdev[] = {
>   &exynos5_clk_pdma0,
>   &exynos5_clk_pdma1,
>   &exynos5_clk_mdma1,
> + &exynos5_clk_fimd1,
>  };
> 
>  static struct clksrc_clk *exynos5_clksrc_cdev[] = {
> @@ -1274,6 +1285,7 @@ static struct clk_lookup exynos5_clk_lookup[] = {
>   CLKDEV_INIT("dma-pl330.0", "apb_pclk", &exynos5_clk_pdma0),
>   CLKDEV_INIT("dma-pl330.1", "apb_pclk", &exynos5_clk_pdma1),
>   CLKDEV_INIT("dma-pl330.2", "apb_pclk", &exynos5_clk_mdma1),
> + CLKDEV_INIT("exynos5-fb.1", "lcd", &exynos5_clk_fimd1),
>  };
> 
>  static unsigned long exynos5_epll_get_rate(struct clk *clk)
> --
> 1.7.0.4

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


Re: [PATCH v6 6/9] mmc: dw_mmc: add device tree support

2012-09-19 Thread Thomas Abraham
On 19 September 2012 19:09, Seungwon Jeon  wrote:
> On Tuesday, September 18, 2012, Thomas Abraham  
> wrote:
>> +#ifdef CONFIG_OF
>> +/* given a slot id, find out the device node representing that slot */
>> +static struct device_node *dw_mci_of_find_slot_node(struct device *dev, u8 
>> slot)
>> +{
>> + struct device_node *np;
>> + const __be32 *addr;
>> + int len;
>> +
>> + if (!dev || !dev->of_node)
>> + return NULL;
>> +
>> + for_each_child_of_node(dev->of_node, np) {
>> + addr = of_get_property(np, "reg", &len);
>> + if (!addr || (len < sizeof(int)))
>> + continue;
>> + if (be32_to_cpup(addr) == slot)
>> + return np;
>> + }
>> + return NULL;
>> +}
>> +
>> +/* find out bus-width for a given slot */
>> +static u32 dw_mci_of_get_bus_wd(struct device *dev, u8 slot)
>> +{
>> + struct device_node *np = dw_mci_of_find_slot_node(dev, slot);
>> + u32 bus_wd = 1;
>> +
>> + if (!np)
>> + return 1;
>> +
>> + if (of_property_read_u32(np, "bus-width", &bus_wd))
>> + dev_err(dev, "bus-width property not found, assuming width"
>> +" as 1\n");
>> + return bus_wd;
>> +}
>> +#else /* CONFIG_OF */
>> +static u32 dw_mci_of_get_bus_wd(struct device *dev, u8 slot)
>> +{
>> + return 1;
>> +}
>> +static struct device_node *dw_mci_of_find_slot_node(struct device *dev, u8 
>> slot)
>> +{
>> + return NULL;
>> +}
>> +#endif /* CONFIG_OF */
>> +
>>  static int dw_mci_init_slot(struct dw_mci *host, unsigned int id)
>>  {
>>   struct mmc_host *mmc;
>>   struct dw_mci_slot *slot;
>> + u8 bus_width;
>>
>>   mmc = mmc_alloc_host(sizeof(struct dw_mci_slot), host->dev);
>>   if (!mmc)
>> @@ -1782,6 +1830,7 @@ static int dw_mci_init_slot(struct dw_mci *host, 
>> unsigned int id)
>>   slot->id = id;
>>   slot->mmc = mmc;
>>   slot->host = host;
>> + host->slot[id] = slot;
>>
>>   mmc->ops = &dw_mci_ops;
>>   mmc->f_min = DIV_ROUND_UP(host->bus_hz, 510);
>> @@ -1806,8 +1855,18 @@ static int dw_mci_init_slot(struct dw_mci *host, 
>> unsigned int id)
>>   mmc->caps2 = host->pdata->caps2;
>>
>>   if (host->pdata->get_bus_wd)
>> - if (host->pdata->get_bus_wd(slot->id) >= 4)
>> - mmc->caps |= MMC_CAP_4_BIT_DATA;
>> + bus_width = host->pdata->get_bus_wd(slot->id);
>> + else if (host->dev->of_node)
>> + bus_width = dw_mci_of_get_bus_wd(host->dev, slot->id);
>> + else
>> + bus_width = 1;
>> +
>> + switch (bus_width) {
>> + case 8:
>> + mmc->caps |= MMC_CAP_8_BIT_DATA;
>> + case 4:
>> + mmc->caps |= MMC_CAP_4_BIT_DATA;
>> + }
>>
>>   if (host->pdata->quirks & DW_MCI_QUIRK_HIGHSPEED)
>>   mmc->caps |= MMC_CAP_SD_HIGHSPEED | MMC_CAP_MMC_HIGHSPEED;
>> @@ -1852,7 +1911,6 @@ static int dw_mci_init_slot(struct dw_mci *host, 
>> unsigned int id)
>>   else
>>   clear_bit(DW_MMC_CARD_PRESENT, &slot->flags);
>>
>> - host->slot[id] = slot;
>>   mmc_add_host(mmc);
>>
>>  #if defined(CONFIG_DEBUG_FS)
>> @@ -1944,16 +2002,74 @@ static bool mci_wait_reset(struct device *dev, 
>> struct dw_mci *host)
>>   return false;
>>  }
>>
> The following CONFIG_OF block can be put together in upper CONFIG_OF .

The placement of device tree related code is considering the logical
structure and flow of the code. So maybe we can just retain the below
code here for now.

>
>> +#ifdef CONFIG_OF
>> +static struct dw_mci_of_quirks {
>> + char *quirk;
>> + int id;
>> +} of_quirks[] = {
>> + {
>> + .quirk  = "supports-highspeed",
>> + .id = DW_MCI_QUIRK_HIGHSPEED,
>> + }, {
>> + .quirk  = "broken-cd",
>> + .id = DW_MCI_QUIRK_BROKEN_CARD_DETECTION,
>> + },
>> +};
>> +
>> +static struct dw_mci_board *dw_mci_parse_dt(struct dw_mci *host)
>> +{
>> + struct dw_mci_board *pdata;
>> + struct device *dev = host->dev;
>> + struct device_node *np = dev->of_node;
>> + int idx;
>> +
>> + pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL);
>> + if (!pdata) {
>> + dev_err(dev, "could not allocate memory for pdata\n");
>> + return ERR_PTR(-ENOMEM);
>> + }
>> +
>> + /* find out number of slots supported */
>> + if (of_property_read_u32(dev->of_node, "num-slots",
>> + &pdata->num_slots)) {
>> + dev_info(dev, "num-slots property not found, "
>> + "assuming 1 slot is available\n");
>> + pdata->num_slots = 1;
>> + }
>> +
>> + /* get quirks */
>> + for (idx = 0; idx < ARRAY_SIZE(of_quirks); idx++)
>> + if (of_get_property(np, of_quirks[idx].quirk, NULL))
>> + pdata->quirks |= of_quirks[idx].id;
>> +
>> + if (of_property_read_u32(np, "f

Re: [PATCH v6 8/9] mmc: dw_mmc: add support for implementation specific callbacks

2012-09-19 Thread Thomas Abraham
On 19 September 2012 19:10, Seungwon Jeon  wrote:
> On Tuesday, September 18, 2012, Thomas Abraham  
> wrote:
>> -int dw_mci_pltfm_register(struct platform_device *pdev)
>> +int dw_mci_pltfm_register(struct platform_device *pdev,
>> + struct dw_mci_drv_data *drv_data)
>>  {
>>   struct dw_mci *host;
>>   struct resource *regs;
>> @@ -41,6 +42,7 @@ int dw_mci_pltfm_register(struct platform_device *pdev)
>>   if (host->irq < 0)
>>   return host->irq;
>>
>> + host->drv_data = drv_data;
>>   host->dev = &pdev->dev;
>>   host->irq_flags = 0;
>>   host->pdata = pdev->dev.platform_data;
>> @@ -48,6 +50,12 @@ int dw_mci_pltfm_register(struct platform_device *pdev)
>>   if (!host->regs)
>>   return -ENOMEM;
>>
>> + if (host->drv_data->init) {
> In non-Exynos platform, host->drv_data has NULL.

Yes, sorry, I missed that.

Chris, should I fix this and send the updated patch or shall I send a
separate fix patch.

Thanks,
Thomas.

[...]
--
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 v6 9/9] mmc: dw_mmc: add support for exynos specific implementation of dw-mshc

2012-09-19 Thread Thomas Abraham
On 19 September 2012 19:12, Seungwon Jeon  wrote:
> On Tuesday, September 18, 2012, Thomas Abraham  
> wrote:
>> +int dw_mci_exynos_probe(struct platform_device *pdev)
>> +{
>> + struct dw_mci_drv_data *drv_data;
>> + const struct of_device_id *match;
>> +
>> + match = of_match_node(dw_mci_exynos_match, pdev->dev.of_node);
>> + drv_data = match->data;
> In non-dt case, match has NULL.
> Needed to check "pdev->dev.of_node"

Since all current users in mainline of this driver on Exynos platforms
are device tree based, and since Exynos4 and Exynos5 have device tree
support, I have mainly been adding device tree support here. Only for
non-exynos portions of the code, I have ensured that both dt and
legacy modes are supported.

Thanks,
Thomas.

[...]
--
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 v6 0/9] mmc: dw_mmc: add support for device tree based instantiation

2012-09-19 Thread Thomas Abraham
On 19 September 2012 19:09, Seungwon Jeon  wrote:
>> Hi Thomas,
>>
>> On Wed, Sep 19 2012, Thomas Abraham wrote:
>> >> Hi Jaehoon, Seungwon,
>> >>
>> >> All the changes you have suggested for this patch series has been
>> >> completed. If you could ack this series, it would be great.
>> >>
>> >> Thanks,
>> >> Thomas.
>> >
>> > Hi Chris,
>> >
>> > I have addressed all the comments received for the v5 of the dw-mmc
>> > device tree support patch series. Will Newton has acked this patch
>> > series. Can this series be merged for v3.7 ?
>>
>> Yes, looks good; pushed to mmc-next for 3.7.  Jaehoon and Seungwon,
>> if you reply soon with your ACK then I'll add it to this patchset.
>
>
> Also, looks good to me.
> But please check several patches before merging.
> Sorry for late review.

Thank you Seungwon for your review.

Regards,
Thomas.
--
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: dts: use uart2 for console on smdkv310 and smdk5250

2012-09-19 Thread Thomas Abraham
On 20 September 2012 04:48, Kukjin Kim  wrote:
> Thomas Abraham wrote:
>>
>> On 17 September 2012 17:16, Kukjin Kim  wrote:
>> >
>> > Cc: Thomas Abraham 
>> > Signed-off-by: Kukjin Kim 
>> > ---
>> >  arch/arm/boot/dts/exynos4210-smdkv310.dts |2 +-
>> >  arch/arm/boot/dts/exynos5250-smdk5250.dts |2 +-
>> >  2 files changed, 2 insertions(+), 2 deletions(-)
>> >
>> > diff --git a/arch/arm/boot/dts/exynos4210-smdkv310.dts
>> b/arch/arm/boot/dts/exynos4210-smdkv310.dts
>> > index 1beccc8..cb01e3d 100644
>> > --- a/arch/arm/boot/dts/exynos4210-smdkv310.dts
>> > +++ b/arch/arm/boot/dts/exynos4210-smdkv310.dts
>> > @@ -26,7 +26,7 @@
>> > };
>> >
>> > chosen {
>> > -   bootargs = "root=/dev/ram0 rw ramdisk=8192
>> initrd=0x4100,8M console=ttySAC1,115200 init=/linuxrc";
>> > +   bootargs = "root=/dev/ram0 rw ramdisk=8192
>> initrd=0x4100,8M console=ttySAC2,115200 init=/linuxrc";
>> > };
>>
>> Dear Mr. Kim,
>>
>> What is the reason for changing the console port to 2 for smdkv310 board?
>>
> Since uart1 can be used for other purpose, we changed the default console
> port to use uart2 a few month ago for all of SMDKs. And if required, I will
> change it for current defconfigs.

Ok, thanks for the information.

Regards,
Thomas.
--
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: EXYNOS: add device tree based discovery support for FIMD

2012-09-19 Thread Jingoo Han
On Wednesday, September 19, 2012 3:22 AM Leela Krishna Amudala wrote
> 
> This patch adds support for device tree based discovery for Samsung's
> display controller. Adds DRM-Fimd plat data for smdk5250
> evt1 to the corresponding dts file
> 
> Signed-off-by: Leela Krishna Amudala 
> ---
>  arch/arm/boot/dts/exynos5250-smdk5250.dts |   16 
>  arch/arm/mach-exynos/include/mach/map.h   |1 +
>  arch/arm/mach-exynos/mach-exynos5-dt.c|2 ++
>  3 files changed, 19 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/exynos5250-smdk5250.dts 
> b/arch/arm/boot/dts/exynos5250-smdk5250.dts
> index 8a5e348..c8d32f5 100644
> --- a/arch/arm/boot/dts/exynos5250-smdk5250.dts
> +++ b/arch/arm/boot/dts/exynos5250-smdk5250.dts
> @@ -109,4 +109,20 @@
>   spi_2: spi@12d4 {
>   status = "disabled";
>   };
> +
> + lcd_fimd0: lcd_panel0 {
> + lcd-htiming = <4 4 4 1280>;
> + lcd-vtiming = <4 4 4 800>;
> + supports-mipi-panel;
> + };
> +
> + fimd {
> + samsung,fimd-display = <&lcd_fimd0>;
> + samsung,fimd-vidout-rgb;
> + samsung,fimd-inv-vclk;
> + samsung,fimd-frame-rate = <60>;
> + samsung,default-window = <0>;
> + samsung,fimd-win-bpp = <32>;
> + };
> +
>  };
> diff --git a/arch/arm/mach-exynos/include/mach/map.h 
> b/arch/arm/mach-exynos/include/mach/map.h
> index b2021bd..dd9cea3 100644
> --- a/arch/arm/mach-exynos/include/mach/map.h
> +++ b/arch/arm/mach-exynos/include/mach/map.h
> @@ -174,6 +174,7 @@
>  #define EXYNOS4_PA_MIPI_CSIS10x1189
> 
>  #define EXYNOS4_PA_FIMD0 0x11C0
> +#define EXYNOS5_PA_FIMD  0x1440

CC'ed Thomas Abraham

Please, replace EXYNOS5_PA_FIMD with EXYNOS5_PA_FIMD1.

As I mentioned before, Other Exynos5 SoCs can have 2 FIMD IPs.
Also, Exynos5250 uses FIMD1.


> 
>  #define EXYNOS4_PA_HSMMC(x)  (0x1251 + ((x) * 0x1))
>  #define EXYNOS4_PA_DWMCI 0x1255
> diff --git a/arch/arm/mach-exynos/mach-exynos5-dt.c 
> b/arch/arm/mach-exynos/mach-exynos5-dt.c
> index e707eb1..0d35d31 100644
> --- a/arch/arm/mach-exynos/mach-exynos5-dt.c
> +++ b/arch/arm/mach-exynos/mach-exynos5-dt.c
> @@ -64,6 +64,8 @@ static const struct of_dev_auxdata 
> exynos5250_auxdata_lookup[] __initconst = {
>   "exynos-gsc.2", NULL),
>   OF_DEV_AUXDATA("samsung,exynos5-gsc", EXYNOS5_PA_GSC3,
>   "exynos-gsc.3", NULL),
> + OF_DEV_AUXDATA("samsung,exynos5-fimd", EXYNOS5_PA_FIMD,
> + "exynos5-fb.1", NULL),
>   {},
>  };
> 
> --
> 1.7.0.4

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


Re: [PATCH 2/3] ARM: EXYNOS: add device tree based discovery support for FIMD

2012-09-19 Thread Leela Krishna Amudala
Hi Jingoo Han,

On Thu, Sep 20, 2012 at 10:32 AM, Jingoo Han  wrote:
> On Wednesday, September 19, 2012 3:22 AM Leela Krishna Amudala wrote
>>
>> This patch adds support for device tree based discovery for Samsung's
>> display controller. Adds DRM-Fimd plat data for smdk5250
>> evt1 to the corresponding dts file
>>
>> Signed-off-by: Leela Krishna Amudala 
>> ---
>>  arch/arm/boot/dts/exynos5250-smdk5250.dts |   16 
>>  arch/arm/mach-exynos/include/mach/map.h   |1 +
>>  arch/arm/mach-exynos/mach-exynos5-dt.c|2 ++
>>  3 files changed, 19 insertions(+), 0 deletions(-)
>>
>> diff --git a/arch/arm/boot/dts/exynos5250-smdk5250.dts 
>> b/arch/arm/boot/dts/exynos5250-smdk5250.dts
>> index 8a5e348..c8d32f5 100644
>> --- a/arch/arm/boot/dts/exynos5250-smdk5250.dts
>> +++ b/arch/arm/boot/dts/exynos5250-smdk5250.dts
>> @@ -109,4 +109,20 @@
>>   spi_2: spi@12d4 {
>>   status = "disabled";
>>   };
>> +
>> + lcd_fimd0: lcd_panel0 {
>> + lcd-htiming = <4 4 4 1280>;
>> + lcd-vtiming = <4 4 4 800>;
>> + supports-mipi-panel;
>> + };
>> +
>> + fimd {
>> + samsung,fimd-display = <&lcd_fimd0>;
>> + samsung,fimd-vidout-rgb;
>> + samsung,fimd-inv-vclk;
>> + samsung,fimd-frame-rate = <60>;
>> + samsung,default-window = <0>;
>> + samsung,fimd-win-bpp = <32>;
>> + };
>> +
>>  };
>> diff --git a/arch/arm/mach-exynos/include/mach/map.h 
>> b/arch/arm/mach-exynos/include/mach/map.h
>> index b2021bd..dd9cea3 100644
>> --- a/arch/arm/mach-exynos/include/mach/map.h
>> +++ b/arch/arm/mach-exynos/include/mach/map.h
>> @@ -174,6 +174,7 @@
>>  #define EXYNOS4_PA_MIPI_CSIS10x1189
>>
>>  #define EXYNOS4_PA_FIMD0 0x11C0
>> +#define EXYNOS5_PA_FIMD  0x1440
>
> CC'ed Thomas Abraham
>
> Please, replace EXYNOS5_PA_FIMD with EXYNOS5_PA_FIMD1.
>
> As I mentioned before, Other Exynos5 SoCs can have 2 FIMD IPs.
> Also, Exynos5250 uses FIMD1.
>
>

As per Joonyoung Shim's comment on my previous patches I renamed it
from EXYNOS5_PA_FIMD1 to EXYNOS5_PA_FIMD. Will change it in next
version.
Thanks for reviewing the patch set.

Best Wishes,
Leela Krishna Amudala.

>>
>>  #define EXYNOS4_PA_HSMMC(x)  (0x1251 + ((x) * 0x1))
>>  #define EXYNOS4_PA_DWMCI 0x1255
>> diff --git a/arch/arm/mach-exynos/mach-exynos5-dt.c 
>> b/arch/arm/mach-exynos/mach-exynos5-dt.c
>> index e707eb1..0d35d31 100644
>> --- a/arch/arm/mach-exynos/mach-exynos5-dt.c
>> +++ b/arch/arm/mach-exynos/mach-exynos5-dt.c
>> @@ -64,6 +64,8 @@ static const struct of_dev_auxdata 
>> exynos5250_auxdata_lookup[] __initconst = {
>>   "exynos-gsc.2", NULL),
>>   OF_DEV_AUXDATA("samsung,exynos5-gsc", EXYNOS5_PA_GSC3,
>>   "exynos-gsc.3", NULL),
>> + OF_DEV_AUXDATA("samsung,exynos5-fimd", EXYNOS5_PA_FIMD,
>> + "exynos5-fb.1", NULL),
>>   {},
>>  };
>>
>> --
>> 1.7.0.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" 
> in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
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 1/5] mmc: host: sdhci-s3c: Add broken-voltage DT property for broken voltage quirk

2012-09-19 Thread Jaehoon Chung
On 09/19/2012 11:39 PM, Chris Ball wrote:
> Hi,
> 
> On Wed, Sep 19 2012, Jaehoon Chung wrote:
>>> On Wed, Sep 19 2012, Tomasz Figa wrote:
 We could just check if the regulator provides the capability to change the 
 voltage.

 I don't see any direct way of querying the regulator for provided 
 capabilities (correct me if I'm just blind), but calling 
 regulator_count_voltages() on the regulator and checking if the returned 
 value is 1 should be enough to assume that the regulator is fixed.
>>>
>>> Sounds good, I agree.  Are you able to test that the obvious patch below
>>> works on your fixed-regulator board?
>>>
>>> Jaehoon and Adrian, can you think of any reason why we shouldn't replace
>>> MMC_CAP2_BROKEN_VOLTAGE with the regulator_count_voltages() call below?
>>> Thanks.
>>
>> I think this is better than using MMC_CAP2_BROKEN_VOLTAGE.
>> I tested with this..and working fine.
> 
> Great, here's the patch.  Jaehoon, once this is merged, maybe you could
> help remove the uses of MMC_CAP2_BROKEN_VOLTAGE from arch/arm/mach-exynos
> and arch/arm/mach-s5pv210 now that they're no longer needed?
Right, I will remove them and send the patch.

Best Regards,
Jaehoon Chung
> 
> Thanks,
> 
> - Chris.
> 
> 
> Subject: [PATCH] mmc: core: Replace MMC_CAP2_BROKEN_VOLTAGE with test for 
> fixed regulator
> 
> Before this patch, we were using MMC_CAP2_BROKEN_VOLTAGE as a way to
> avoid calling regulator_set_voltage() on a fixed regulator, but that's
> just duplicating information that already exists -- we should test
> whether the regulator is fixed directly, instead of via a capability.
> 
> This patch implements that test.  We can't reclaim the capability bit
> just yet, since there are still boards in arch/arm/ that reference it;
> those references can be removed now.
> 
> Reported-by: Tomasz Figa 
> Signed-off-by: Chris Ball 
> ---
>  drivers/mmc/core/core.c | 10 ++
>  1 file changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
> index 044cd01..6612163 100644
> --- a/drivers/mmc/core/core.c
> +++ b/drivers/mmc/core/core.c
> @@ -1113,7 +1113,8 @@ int mmc_regulator_set_ocr(struct mmc_host *mmc,
>   int tmp;
>   int voltage;
>  
> - /* REVISIT mmc_vddrange_to_ocrmask() may have set some
> + /*
> +  * REVISIT mmc_vddrange_to_ocrmask() may have set some
>* bits this regulator doesn't quite support ... don't
>* be too picky, most cards and regulators are OK with
>* a 0.1V range goof (it's a small error percentage).
> @@ -1127,12 +1128,13 @@ int mmc_regulator_set_ocr(struct mmc_host *mmc,
>   max_uV = min_uV + 100 * 1000;
>   }
>  
> - /* avoid needless changes to this voltage; the regulator
> -  * might not allow this operation
> + /*
> +  * If we're using a fixed/static regulator, don't call
> +  * regulator_set_voltage; it would fail.
>*/
>   voltage = regulator_get_voltage(supply);
>  
> - if (mmc->caps2 & MMC_CAP2_BROKEN_VOLTAGE)
> + if (regulator_count_voltages(supply) == 1)
>   min_uV = max_uV = voltage;
>  
>   if (voltage < 0)
> 

--
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 2/2] video: drm: exynos: Add device tree support

2012-09-19 Thread Inki Dae
Hi,

I had merged this patch set but I realizes this patch has no
descriptions enough so please add the descriptions what is this patch.


2012/9/6 Leela Krishna Amudala :
> Add device tree based discovery support for DRM-FIMD driver.
>
> Signed-off-by: Leela Krishna Amudala 
> ---
>  Documentation/devicetree/bindings/fb/drm-fimd.txt |   80 +

and, how about making drm folder instead of fb? so like below;
 Documentation/devicetree/bindings/drm/exynos/fimd.txt

Thanks,
Inki Dae

>  drivers/gpu/drm/exynos/exynos_drm_fimd.c  |   95 
> -
>  2 files changed, 173 insertions(+), 2 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/fb/drm-fimd.txt
>
> diff --git a/Documentation/devicetree/bindings/fb/drm-fimd.txt 
> b/Documentation/devicetree/bindings/fb/drm-fimd.txt
> new file mode 100644
> index 000..4ff1829
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/fb/drm-fimd.txt
> @@ -0,0 +1,80 @@
> +* Samsung Display Controller using DRM frame work
> +
> +The display controller is used to transfer image data from memory to an
> +external LCD driver interface. It supports various color formats such as
> +rgb and yuv.
> +
> +Required properties:
> + - compatible: Should be "samsung,exynos5-fimd" or "samsung,exynos4-fb" for
> +   fimd using DRM frame work.
> + - reg: physical base address of the controller and length of memory
> +   mapped region.
> + - interrupts: Three interrupts should be specified. The interrupts should be
> +   specified in the following order.
> +   - VSYNC interrupt
> +   - FIFO level interrupt
> +   - FIMD System Interrupt
> +
> + - samsung,fimd-display: This property should specify the phandle of the
> +   display device node which holds the video interface timing with the
> +   below mentioned properties.
> +
> +   - lcd-htiming: Specifies the horizontal timing for the overlay. The
> + horizontal timing includes four parameters in the following order.
> +
> + - horizontal back porch (in number of lcd clocks)
> + - horizontal front porch (in number of lcd clocks)
> + - hsync pulse width (in number of lcd clocks)
> + - Display panels X resolution.
> +
> +   - lcd-vtiming: Specifies the vertical timing for the overlay. The
> + vertical timing includes four parameters in the following order.
> +
> + - vertical back porch (in number of lcd lines)
> + - vertical front porch (in number of lcd lines)
> + - vsync pulse width (in number of lcd clocks)
> + - Display panels Y resolution.
> +
> +
> + - samsung,default-window: Specifies the default window number of the fimd 
> controller.
> +
> + - samsung,fimd-win-bpp: Specifies the bits per pixel.
> +
> +Optional properties:
> + - samsung,fimd-vidout-rgb: Video output format is RGB.
> + - samsung,fimd-inv-vclk: invert video clock polarity.
> + - samsung,fimd-frame-rate: Number of video frames per second.
> +
> +Example:
> +
> +   The following is an example for the fimd controller is split into
> +   two portions. The SoC specific portion can be specified in the SoC
> +   specific dts file. The board specific portion can be specified in the
> +   board specific dts file.
> +
> +   - SoC Specific portion
> +
> +   fimd {
> +   compatible = "samsung,exynos5-fimd";
> +   interrupt-parent = <&combiner>;
> +   reg = <0x1440 0x4>;
> +   interrupts = <18 5>, <18 4>, <18 6>;
> +   };
> +
> +   - Board Specific portion
> +
> +   lcd_fimd0: lcd_panel0 {
> +   lcd-htiming = <4 4 4 480>;
> +   lcd-vtiming = <4 4 4 320>;
> +   supports-mipi-panel;
> +   };
> +
> +   fimd {
> +   samsung,fimd-display = <&lcd_fimd0>;
> +   samsung,fimd-vidout-rgb;
> +   samsung,fimd-inv-vclk;
> +   samsung,fimd-frame-rate = <60>;
> +   samsung,default-window = <0>;
> +   samsung,fimd-win-bpp = <32>;
> +   };
> +
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c 
> b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
> index 3701fbe..a4fa8e9 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
> @@ -18,6 +18,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
>
>  #include 
>  #include 
> @@ -103,9 +104,18 @@ struct fimd_context {
> struct exynos_drm_panel_info *panel;
>  };
>
> +static const struct of_device_id fimd_dt_match[];
> +
>  static inline struct fimd_driver_data *drm_fimd_get_driver_data(
> struct platform_device *pdev)
>  {
> +#ifdef CONFIG_OF
> +   if (pdev->dev.of_node) {
> +   const struct of_device_id *match;
> +   match = of_match_ptr(fimd_dt_match);
> +   return (struct fimd_driver_data *)match->data;
> +   }
> +#endif
> return (struct fimd_driver_data *)
> platform_get_de

[PATCH] samsung: clock: Modify for the case with the only parent

2012-09-19 Thread In-Bae Jeong
'camera' clock has the only parent and thus has no reg_src.
It has a parent clock but it prints 'No parent clock specified' message.
This patch is to deal with the case with the only parent clock.
---
 arch/arm/plat-samsung/clock-clksrc.c |   17 +
 1 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/arch/arm/plat-samsung/clock-clksrc.c 
b/arch/arm/plat-samsung/clock-clksrc.c
index 786a410..c00bd86 100644
--- a/arch/arm/plat-samsung/clock-clksrc.c
+++ b/arch/arm/plat-samsung/clock-clksrc.c
@@ -131,18 +131,19 @@ void __init_or_cpufreq s3c_set_clksrc(struct clksrc_clk 
*clk, bool announce)
 {
struct clksrc_sources *srcs = clk->sources;
u32 mask = bit_mask(clk->reg_src.shift, clk->reg_src.size);
-   u32 clksrc;
+   u32 clksrc = 0;
 
-   if (!clk->reg_src.reg) {
-   if (!clk->clk.parent)
-   printk(KERN_ERR "%s: no parent clock specified\n",
-   clk->clk.name);
+   if (!clk->reg_src.reg && !clk->clk.parent && !srcs->nr_sources) {
+   printk(KERN_ERR "%s: no parent clock specified\n",
+  clk->clk.name);
return;
}
 
-   clksrc = __raw_readl(clk->reg_src.reg);
-   clksrc &= mask;
-   clksrc >>= clk->reg_src.shift;
+   if (srcs->nr_sources > 1) {
+   clksrc = __raw_readl(clk->reg_src.reg);
+   clksrc &= mask;
+   clksrc >>= clk->reg_src.shift;
+   }
 
if (clksrc > srcs->nr_sources || !srcs->sources[clksrc]) {
printk(KERN_ERR "%s: bad source %d\n",
-- 
1.7.8.6

--
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