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

2012-09-18 Thread Thomas Abraham
On 18 September 2012 07:22, Thomas Abraham  wrote:
> On 17 September 2012 23:46, Thomas Abraham  wrote:
>> This series add device tree support for Synopsis Designware IP - Mobile 
>> Storage
>> Host Controller (MSHC). I had addressed all comments for the v5 version of 
>> this
>> patch series and had reposted only those patches that were modified. The 
>> version
>> number of those reposted patches was maintained as v5 as the changes did not
>> need any major rework.
>>
>> This is mainly a repost of the v5 patches with all patches marked as v6. The
>> only new change in this series is adding a comment about bus_hz in platform
>> data structure of the driver as suggested by Seungwon Jeon.
>>
>> Thomas Abraham (9):
>>   mmc: dw_mmc: convert copy of struct device in struct dw_mci to a reference
>>   mmc: dw_mmc: Use devm_* functions in dw_mmc platform driver
>>   mmc: dw_mmc: allow probe to succeed even if one slot is initialized
>>   mmc: dw_mmc: lookup for optional biu and ciu clocks
>>   mmc: dw_mmc: add quirk to indicate missing write protect line
>>   mmc: dw_mmc: add device tree support
>>   mmc: dw_mmc: prepare functions in dw_mmc-pltfm for reuse
>>   mmc: dw_mmc: add support for implementation specific callbacks
>>   mmc: dw_mmc: add support for exynos specific implementation of dw-mshc
>>
>>  .../devicetree/bindings/mmc/exynos-dw-mshc.txt |   87 ++
>>  .../devicetree/bindings/mmc/synposis-dw-mshc.txt   |   79 +
>>  drivers/mmc/host/Kconfig   |9 +
>>  drivers/mmc/host/Makefile  |1 +
>>  drivers/mmc/host/dw_mmc-exynos.c   |  253 
>>  drivers/mmc/host/dw_mmc-pci.c  |2 +-
>>  drivers/mmc/host/dw_mmc-pltfm.c|   60 +++--
>>  drivers/mmc/host/dw_mmc-pltfm.h|   20 ++
>>  drivers/mmc/host/dw_mmc.c  |  308 
>> +---
>>  drivers/mmc/host/dw_mmc.h  |   24 ++
>>  include/linux/mmc/dw_mmc.h |   15 +-
>>  11 files changed, 782 insertions(+), 76 deletions(-)
>>  create mode 100644 Documentation/devicetree/bindings/mmc/exynos-dw-mshc.txt
>>  create mode 100644 
>> Documentation/devicetree/bindings/mmc/synposis-dw-mshc.txt
>>  create mode 100644 drivers/mmc/host/dw_mmc-exynos.c
>>  create mode 100644 drivers/mmc/host/dw_mmc-pltfm.h
>
> 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 ?

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

2012-09-18 Thread Chris Ball
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.
-- 
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 2/3] mmc: sdhci-s3c: Fix crash on module insertion for second time

2012-09-18 Thread Chris Ball
Hi,

On Fri, Sep 14 2012, Chander Kashyap wrote:
> If sdhci-s3c driver is built as module, it gives following error if inserted
> again after removing. This was happening as pm_runtime_use_autosuspend() is
> called in sdhci_s3c_probe() function but in sdhci_s3c_remove() its 
> complementry
> pm_runtime_dont_use_autosuspend() is not called.
>
> BUG: spinlock bad magic on CPU#1, insmod/955
>  lock: 0xee771368, .magic: , .owner: insmod/955, .owner_cpu: 1
> [] (unwind_backtrace+0x0/0xf8) from [] 
> (do_raw_spin_unlock+0xa4/0xe4)
> [] (do_raw_spin_unlock+0xa4/0xe4) from [] 
> (_raw_spin_unlock_irqrestore+0xc/0x38)
> [] (_raw_spin_unlock_irqrestore+0xc/0x38) from [] 
> (sdhci_runtime_suspend_host+0x54/0x80)
> [] (sdhci_runtime_suspend_host+0x54/0x80) from [] 
> (sdhci_s3c_runtime_suspend+0x14/0x38 [sdhci_s3c])
> [] (sdhci_s3c_runtime_suspend+0x14/0x38 [sdhci_s3c]) from 
> [] (pm_generic_runtime_suspend+0x2c/0x40)
> [] (pm_generic_runtime_suspend+0x2c/0x40) from [] 
> (__rpm_callback+0x70/0x98)
> [] (__rpm_callback+0x70/0x98) from [] 
> (rpm_suspend+0xf0/0x534)
> [] (rpm_suspend+0xf0/0x534) from [] 
> (__pm_runtime_suspend+0x5c/0x74)
> [] (__pm_runtime_suspend+0x5c/0x74) from [] 
> (pm_generic_runtime_idle+0x44/0x4c)
> [] (pm_generic_runtime_idle+0x44/0x4c) from [] 
> (__rpm_callback+0x70/0x98)
> [] (__rpm_callback+0x70/0x98) from [] 
> (rpm_idle+0xdc/0x18c)
> [] (rpm_idle+0xdc/0x18c) from [] 
> (pm_runtime_set_autosuspend_delay+0x30/0x3c)
> [] (pm_runtime_set_autosuspend_delay+0x30/0x3c) from [] 
> (sdhci_s3c_probe+0x35c/0x52c [sdhci_s3c])
> [] (sdhci_s3c_probe+0x35c/0x52c [sdhci_s3c]) from [] 
> (platform_drv_probe+0x18/0x1c)
>
> Signed-off-by: Chander Kashyap 
> ---
>  drivers/mmc/host/sdhci-s3c.c |1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/mmc/host/sdhci-s3c.c b/drivers/mmc/host/sdhci-s3c.c
> index 0cbb4c2..3f4518d 100644
> --- a/drivers/mmc/host/sdhci-s3c.c
> +++ b/drivers/mmc/host/sdhci-s3c.c
> @@ -658,6 +658,7 @@ static int __devexit sdhci_s3c_remove(struct 
> platform_device *pdev)
>  
>   sdhci_remove_host(host, 1);
>  
> + pm_runtime_dont_use_autosuspend(&pdev->dev);
>   pm_runtime_disable(&pdev->dev);
>  
>   clk_disable(sc->clk_bus[sc->cur_clk]);

Thanks, pushed to mmc-next for 3.7.

- 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 1/3] mmc: sdhci-s3c: Enable only required bus clock

2012-09-18 Thread Chris Ball
Hi,

On Fri, Sep 14 2012, Chander Kashyap wrote:
> In case of multiple bus clock sources, all the clock sources were
> getting enabled. As only one clock source is needed at the time hence
> enable only the required bus clock.
>
> This patch does as follows:
> 1.In sdhci_s3c_probe enable only required bus clock source.
>
> 2.Handle the disabling of old bus clock and enables the
>   best clock selected in sdhci_s3c_set_clock().
>
> Signed-off-by: Chander Kashyap 

Thanks, pushed to mmc-next for 3.7.

- 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-18 Thread Chris Ball
Hi,

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.
>
> Cc: Ben Dooks 
> Cc: Chris Ball 
> CC: linux-...@vger.kernel.org
> Signed-off-by: Tomasz Figa 
> Signed-off-by: Kyungmin Park 
> ---
>  Documentation/devicetree/bindings/mmc/mmc.txt | 1 +
>  drivers/mmc/host/sdhci-s3c.c  | 3 +++
>  2 files changed, 4 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/mmc/mmc.txt 
> b/Documentation/devicetree/bindings/mmc/mmc.txt
> index 8a6811f..ecbde68 100644
> --- a/Documentation/devicetree/bindings/mmc/mmc.txt
> +++ b/Documentation/devicetree/bindings/mmc/mmc.txt
> @@ -16,6 +16,7 @@ Optional properties:
>  - wp-inverted: when present, polarity on the wp gpio line is inverted
>  - non-removable: non-removable slot (like eMMC)
>  - max-frequency: maximum operating clock frequency
> +- broken-voltage: vmmc regulator does not allow voltage control
>  
>  Example:
>  
> diff --git a/drivers/mmc/host/sdhci-s3c.c b/drivers/mmc/host/sdhci-s3c.c
> index 445910e..39715b8 100644
> --- a/drivers/mmc/host/sdhci-s3c.c
> +++ b/drivers/mmc/host/sdhci-s3c.c
> @@ -443,6 +443,9 @@ static int __devinit sdhci_s3c_parse_dt(struct device 
> *dev,
>   if (!ourhost->gpios)
>   return -ENOMEM;
>  
> + if (of_get_property(node, "broken-voltage", 0))
> + pdata->host_caps2 |= MMC_CAP2_BROKEN_VOLTAGE;
> +
>   /* get the card detection method */
>   if (of_get_property(node, "broken-cd", 0)) {
>   pdata->cd_type = S3C_SDHCI_CD_NONE;

Is there a reason we can't make this a property on the regulator instead?

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: [GIT PULL] Samsung fixes-3 for v3.6

2012-09-18 Thread Olof Johansson
On Tue, Sep 18, 2012 at 6:24 AM, Kukjin Kim  wrote:
> Hi Arnd, Olof
>
> This is re-sending Samsung fixes-3 I talked to Olof before.
>
> The branch is including two commits are using spin_lock_{irqsave,
> irqrestore} in clk_set_parent() and clk_set_rate() to avoid spinlock
> recursion/locking.
>
> 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
> v3.6-samsung-fixes-3

Thanks, pulled!


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


[GIT PULL] Samsung fixes-3 for v3.6

2012-09-18 Thread Kukjin Kim

Hi Arnd, Olof

This is re-sending Samsung fixes-3 I talked to Olof before.

The branch is including two commits are using spin_lock_{irqsave, 
irqrestore} in clk_set_parent() and clk_set_rate() to avoid spinlock 
recursion/locking.


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 
v3.6-samsung-fixes-3


Mandeep Singh Baines (1):
  ARM: SAMSUNG: use spin_lock_irqsave() in clk_set_parent

Tushar Behera (1):
  ARM: SAMSUNG: Use spin_lock_{irqsave,irqrestore} in clk_set_rate

 arch/arm/plat-samsung/clock.c |   10 ++
 1 files changed, 6 insertions(+), 4 deletions(-)
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

2012-09-18 Thread Leela Krishna Amudala
This patch adds match table for drm platform device.

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),
},
 };
 
-- 
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


[PATCH 3/3] ARM: EXYNOS: Add drm-device node to the dtsi file

2012-09-18 Thread Leela Krishna Amudala
This patch adds platform drm-device node to the dtsi file

Signed-off-by: Leela Krishna Amudala 
---
 arch/arm/boot/dts/exynos5250.dtsi |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boot/dts/exynos5250.dtsi 
b/arch/arm/boot/dts/exynos5250.dtsi
index 6d27ca4..b1fa93e 100644
--- a/arch/arm/boot/dts/exynos5250.dtsi
+++ b/arch/arm/boot/dts/exynos5250.dtsi
@@ -495,4 +495,8 @@
reg = <0x1440 0x4>;
interrupts = <18 5>, <18 4>, <18 6>;
};
+
+   drm-device {
+   compatible = "samsung,exynos-drm-device";
+   };
 };
-- 
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


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

2012-09-18 Thread Leela Krishna Amudala
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_CSIS1  0x1189
 
 #define EXYNOS4_PA_FIMD0   0x11C0
+#define EXYNOS5_PA_FIMD0x1440
 
 #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


[PATCH 1/3] ARM: EXYNOS5: Add fimd node to the exynos5250 dtsi file

2012-09-18 Thread Leela Krishna Amudala
This patch adds the fimd node with compatibility string, hardware address,
interrupt line numbers to the exynos5250 dtsi file.

Signed-off-by: Leela Krishna Amudala 
---
 arch/arm/boot/dts/exynos5250.dtsi |7 +++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boot/dts/exynos5250.dtsi 
b/arch/arm/boot/dts/exynos5250.dtsi
index b55794b..6d27ca4 100644
--- a/arch/arm/boot/dts/exynos5250.dtsi
+++ b/arch/arm/boot/dts/exynos5250.dtsi
@@ -488,4 +488,11 @@
reg = <0x13e3 0x1000>;
interrupts = <0 88 0>;
};
+
+   fimd {
+   compatible = "samsung,exynos5-drm";
+   interrupt-parent = <&combiner>;
+   reg = <0x1440 0x4>;
+   interrupts = <18 5>, <18 4>, <18 6>;
+   };
 };
-- 
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


[PATCH 0/3] Add device tree based discovery support for drm-fimd

2012-09-18 Thread Leela Krishna Amudala
This patch set adds arch side support for device tree based discovery
for drm-fimd.

The patches are created against "for-next" branch of Kukjin Kim's tree on 
3.6-rc6 at:
 git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung.git

This patchset has been tested on smdk5250 board and seen the bootup logo on LCD
using the patchset http://www.spinics.net/lists/arm-kernel/msg193348.html which 
was 
applied on inki-dae's next branch

Leela Krishna Amudala (3):
  ARM: EXYNOS5: Add fimd node to the exynos5250 dtsi file
  ARM: EXYNOS: add device tree based discovery support for FIMD
  ARM: EXYNOS: Add drm-device node to the dtsi file

 arch/arm/boot/dts/exynos5250-smdk5250.dts |   16 
 arch/arm/boot/dts/exynos5250.dtsi |   11 +++
 arch/arm/mach-exynos/include/mach/map.h   |1 +
 arch/arm/mach-exynos/mach-exynos5-dt.c|2 ++
 4 files changed, 30 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


[PATCH] ARM: dts: exynos4210-origen: Enable on-board keys as wakeup source

2012-09-18 Thread Tushar Behera
On board keys on Origen board can serve as wakeup sources, hence they
are marked accordingly in the device tree file.

Signed-off-by: Tushar Behera 
---
 arch/arm/boot/dts/exynos4210-origen.dts |5 +
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/arch/arm/boot/dts/exynos4210-origen.dts 
b/arch/arm/boot/dts/exynos4210-origen.dts
index 0c49caa..e867eb7 100644
--- a/arch/arm/boot/dts/exynos4210-origen.dts
+++ b/arch/arm/boot/dts/exynos4210-origen.dts
@@ -64,30 +64,35 @@
label = "Up";
gpios = <&gpx2 0 0 0 2>;
linux,code = <103>;
+   gpio-key,wakeup;
};
 
down {
label = "Down";
gpios = <&gpx2 1 0 0 2>;
linux,code = <108>;
+   gpio-key,wakeup;
};
 
back {
label = "Back";
gpios = <&gpx1 7 0 0 2>;
linux,code = <158>;
+   gpio-key,wakeup;
};
 
home {
label = "Home";
gpios = <&gpx1 6 0 0 2>;
linux,code = <102>;
+   gpio-key,wakeup;
};
 
menu {
label = "Menu";
gpios = <&gpx1 5 0 0 2>;
linux,code = <139>;
+   gpio-key,wakeup;
};
};
 
-- 
1.7.4.1

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


Re: [PATCH] video: exynos_dp: Add device tree support to DP driver

2012-09-18 Thread Leela Krishna Amudala
Hello,

Please post the documentation for the bindings.

Thanks,
Leela Krishna Amudala.

On Fri, Sep 14, 2012 at 12:09 AM, Ajay Kumar  wrote:
>
> This patch enables device tree based discovery support for DP driver.
> The driver is modified to handle platform data in both the cases:
> with DT and non-DT.
>
> DP-PHY should be regarded as a seperate device node while
> being passed from device tree list, and device node for
> DP should contain DP-PHY as child node with property name "dp-phy"
> associated with it.
>
> Signed-off-by: Ajay Kumar 
> ---
>  drivers/video/exynos/exynos_dp_core.c |  156 
> +++--
>  drivers/video/exynos/exynos_dp_core.h |2 +
>  2 files changed, 151 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/video/exynos/exynos_dp_core.c 
> b/drivers/video/exynos/exynos_dp_core.c
> index f57c915..15887bd 100644
> --- a/drivers/video/exynos/exynos_dp_core.c
> +++ b/drivers/video/exynos/exynos_dp_core.c
> @@ -18,6 +18,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
>
>  #include 
>
> @@ -856,20 +857,117 @@ static irqreturn_t exynos_dp_irq_handler(int irq, void 
> *arg)
> return IRQ_HANDLED;
>  }
>
> +#ifdef CONFIG_OF
> +struct exynos_dp_platdata *exynos_dp_dt_parse_pdata(struct device *dev)
> +{
> +   struct device_node *dp_node = dev->of_node;
> +   struct exynos_dp_platdata *pd;
> +   struct video_info *dp_video_config;
> +
> +   pd = devm_kzalloc(dev, sizeof(*pd), GFP_KERNEL);
> +   if (!pd) {
> +   dev_err(dev, "memory allocation for pdata failed\n");
> +   return ERR_PTR(-ENOMEM);
> +   }
> +   dp_video_config = devm_kzalloc(dev,
> +   sizeof(*dp_video_config), GFP_KERNEL);
> +
> +   if (!dp_video_config) {
> +   dev_err(dev, "memory allocation for video config failed\n");
> +   return ERR_PTR(-ENOMEM);
> +   }
> +   pd->video_info = dp_video_config;
> +
> +   if (of_get_property(dp_node, "samsung,h-sync-polarity", NULL))
> +   dp_video_config->h_sync_polarity = 1;
> +
> +   if (of_get_property(dp_node, "samsung,v-sync-polarity", NULL))
> +   dp_video_config->v_sync_polarity = 1;
> +
> +   if (of_get_property(dp_node, "samsung,interlaced", NULL))
> +   dp_video_config->interlaced = 1;
> +
> +   of_property_read_u32(dp_node, "samsung,color_space",
> +   &dp_video_config->color_space);
> +
> +   of_property_read_u32(dp_node, "samsung,dynamic_range",
> +   &dp_video_config->dynamic_range);
> +
> +   of_property_read_u32(dp_node, "samsung,ycbcr_coeff",
> +   &dp_video_config->ycbcr_coeff);
> +
> +   of_property_read_u32(dp_node, "samsung,color_depth",
> +   &dp_video_config->color_depth);
> +
> +   of_property_read_u32(dp_node, "samsung,link_rate",
> +   &dp_video_config->link_rate);
> +
> +   of_property_read_u32(dp_node, "samsung,lane_count",
> +   &dp_video_config->lane_count);
> +   return pd;
> +}
> +
> +void exynos_dp_dt_parse_phydata(struct exynos_dp_device *dp)
> +{
> +   struct device_node *dp_phy_node;
> +
> +   const __be32 *parp;
> +
> +   u32 phy_base;
> +
> +   void *virt_phy_base;
> +
> +   parp = of_get_property(dp->dev->of_node, "dp_phy", NULL);
> +   if (!parp) {
> +   dp->dp_phy_addr = NULL;
> +   return;
> +   }
> +
> +   dp_phy_node = of_find_node_by_phandle(be32_to_cpup(parp));
> +   if (!dp_phy_node) {
> +   dp->dp_phy_addr = NULL;
> +   return;
> +   }
> +
> +   of_property_read_u32(dp_phy_node, "samsung,dptx_phy_reg", &phy_base);
> +   of_property_read_u32(dp_phy_node, "samsung,enable_bit",
> +   &dp->enable_bit);
> +   virt_phy_base = ioremap(phy_base, SZ_4);
> +   if (!virt_phy_base) {
> +   dev_err(dp->dev, "failed to ioremap dp-phy\n");
> +   dp->dp_phy_addr = NULL;
> +   return;
> +   }
> +   dp->dp_phy_addr = virt_phy_base;
> +}
> +
> +void dp_phy_init(struct exynos_dp_device *dp)
> +{
> +   u32 reg;
> +
> +   reg = __raw_readl(dp->dp_phy_addr);
> +   reg |= dp->enable_bit;
> +   __raw_writel(reg, dp->dp_phy_addr);
> +}
> +
> +void dp_phy_exit(struct exynos_dp_device *dp)
> +{
> +   u32 reg;
> +
> +   reg = __raw_readl(dp->dp_phy_addr);
> +   reg &= ~(dp->enable_bit);
> +   __raw_writel(reg, dp->dp_phy_addr);
> +}
> +#endif /* CONFIG_OF */
> +
>  static int __devinit exynos_dp_probe(struct platform_device *pdev)
>  {
> struct resource *res;
> struct exynos_dp_device *dp;
> -   struct exynos_dp_platdata *pdata;
> +   struct exynos_dp_platdata *pdata = pdev->dev.platform_data;
>
> int ret = 0;
>
> -  

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

2012-09-18 Thread Leela Krishna Amudala
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

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