RE: [PATCH] usb: ohci-exynos: use clk_prepare_enable and clk_disable_unprepare
On Wednesday, October 03, 2012 8:42 AM Thomas Abraham wrote Convert clk_enable/clk_disable to clk_prepare_enable/clk_disable_unprepare calls as required by common clock framework. Signed-off-by: Thomas Abraham thomas.abra...@linaro.org Acked-by: Jingoo Han jg1@samsung.com Best regards, Jingoo Han --- drivers/usb/host/ohci-exynos.c | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/usb/host/ohci-exynos.c b/drivers/usb/host/ohci-exynos.c index 20a5008..7bca600 100644 --- a/drivers/usb/host/ohci-exynos.c +++ b/drivers/usb/host/ohci-exynos.c @@ -123,7 +123,7 @@ static int __devinit exynos_ohci_probe(struct platform_device *pdev) goto fail_clk; } - err = clk_enable(exynos_ohci-clk); + err = clk_prepare_enable(exynos_ohci-clk); if (err) goto fail_clken; @@ -167,7 +167,7 @@ static int __devinit exynos_ohci_probe(struct platform_device *pdev) return 0; fail_io: - clk_disable(exynos_ohci-clk); + clk_disable_unprepare(exynos_ohci-clk); fail_clken: clk_put(exynos_ohci-clk); fail_clk: @@ -186,7 +186,7 @@ static int __devexit exynos_ohci_remove(struct platform_device *pdev) if (pdata pdata-phy_exit) pdata-phy_exit(pdev, S5P_USB_PHY_HOST); - clk_disable(exynos_ohci-clk); + clk_disable_unprepare(exynos_ohci-clk); clk_put(exynos_ohci-clk); usb_put_hcd(hcd); @@ -232,7 +232,7 @@ static int exynos_ohci_suspend(struct device *dev) if (pdata pdata-phy_exit) pdata-phy_exit(pdev, S5P_USB_PHY_HOST); - clk_disable(exynos_ohci-clk); + clk_disable_unprepare(exynos_ohci-clk); fail: spin_unlock_irqrestore(ohci-lock, flags); @@ -247,7 +247,7 @@ static int exynos_ohci_resume(struct device *dev) struct platform_device *pdev = to_platform_device(dev); struct exynos4_ohci_platdata *pdata = pdev-dev.platform_data; - clk_enable(exynos_ohci-clk); + clk_prepare_enable(exynos_ohci-clk); if (pdata pdata-phy_init) pdata-phy_init(pdev, S5P_USB_PHY_HOST); -- 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: s3c-fb: use clk_prepare_enable and clk_disable_unprepare
On Wednesday, October 03, 2012 8:58 AM Thomas Abraham wrote Convert clk_enable/clk_disable to clk_prepare_enable/clk_disable_unprepare calls as required by common clock framework. Signed-off-by: Thomas Abraham thomas.abra...@linaro.org It looks good. Also, I have tested this patch with Exynos4210. Acked-by: Jingoo Han jg1@samsung.com Best regards, Jingoo Han --- drivers/video/s3c-fb.c | 28 ++-- 1 files changed, 14 insertions(+), 14 deletions(-) diff --git a/drivers/video/s3c-fb.c b/drivers/video/s3c-fb.c index 52b744f..2ed7b63 100644 --- a/drivers/video/s3c-fb.c +++ b/drivers/video/s3c-fb.c @@ -1404,7 +1404,7 @@ static int __devinit s3c_fb_probe(struct platform_device *pdev) return PTR_ERR(sfb-bus_clk); } - clk_enable(sfb-bus_clk); + clk_prepare_enable(sfb-bus_clk); if (!sfb-variant.has_clksel) { sfb-lcd_clk = devm_clk_get(dev, sclk_fimd); @@ -1414,7 +1414,7 @@ static int __devinit s3c_fb_probe(struct platform_device *pdev) goto err_bus_clk; } - clk_enable(sfb-lcd_clk); + clk_prepare_enable(sfb-lcd_clk); } pm_runtime_enable(sfb-dev); @@ -1504,10 +1504,10 @@ err_lcd_clk: pm_runtime_disable(sfb-dev); if (!sfb-variant.has_clksel) - clk_disable(sfb-lcd_clk); + clk_disable_unprepare(sfb-lcd_clk); err_bus_clk: - clk_disable(sfb-bus_clk); + clk_disable_unprepare(sfb-bus_clk); return ret; } @@ -1531,9 +1531,9 @@ static int __devexit s3c_fb_remove(struct platform_device *pdev) s3c_fb_release_win(sfb, sfb-windows[win]); if (!sfb-variant.has_clksel) - clk_disable(sfb-lcd_clk); + clk_disable_unprepare(sfb-lcd_clk); - clk_disable(sfb-bus_clk); + clk_disable_unprepare(sfb-bus_clk); pm_runtime_put_sync(sfb-dev); pm_runtime_disable(sfb-dev); @@ -1561,9 +1561,9 @@ static int s3c_fb_suspend(struct device *dev) } if (!sfb-variant.has_clksel) - clk_disable(sfb-lcd_clk); + clk_disable_unprepare(sfb-lcd_clk); - clk_disable(sfb-bus_clk); + clk_disable_unprepare(sfb-bus_clk); pm_runtime_put_sync(sfb-dev); @@ -1581,10 +1581,10 @@ static int s3c_fb_resume(struct device *dev) pm_runtime_get_sync(sfb-dev); - clk_enable(sfb-bus_clk); + clk_prepare_enable(sfb-bus_clk); if (!sfb-variant.has_clksel) - clk_enable(sfb-lcd_clk); + clk_prepare_enable(sfb-lcd_clk); /* setup gpio and output polarity controls */ pd-setup_gpio(); @@ -1640,9 +1640,9 @@ static int s3c_fb_runtime_suspend(struct device *dev) struct s3c_fb *sfb = platform_get_drvdata(pdev); if (!sfb-variant.has_clksel) - clk_disable(sfb-lcd_clk); + clk_disable_unprepare(sfb-lcd_clk); - clk_disable(sfb-bus_clk); + clk_disable_unprepare(sfb-bus_clk); return 0; } @@ -1653,10 +1653,10 @@ static int s3c_fb_runtime_resume(struct device *dev) struct s3c_fb *sfb = platform_get_drvdata(pdev); struct s3c_fb_platdata *pd = sfb-pdata; - clk_enable(sfb-bus_clk); + clk_prepare_enable(sfb-bus_clk); if (!sfb-variant.has_clksel) - clk_enable(sfb-lcd_clk); + clk_prepare_enable(sfb-lcd_clk); /* setup gpio and output polarity controls */ pd-setup_gpio(); -- 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
[PATCH] video: exynos_dp: use clk_prepare_enable and clk_disable_unprepare
Convert clk_enable/clk_disable to clk_prepare_enable/clk_disable_unprepare calls as required by common clock framework. Signed-off-by: Jingoo Han jg1@samsung.com --- drivers/video/exynos/exynos_dp_core.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/video/exynos/exynos_dp_core.c b/drivers/video/exynos/exynos_dp_core.c index cdc1398..d55470e 100644 --- a/drivers/video/exynos/exynos_dp_core.c +++ b/drivers/video/exynos/exynos_dp_core.c @@ -885,7 +885,7 @@ static int __devinit exynos_dp_probe(struct platform_device *pdev) return PTR_ERR(dp-clock); } - clk_enable(dp-clock); + clk_prepare_enable(dp-clock); res = platform_get_resource(pdev, IORESOURCE_MEM, 0); @@ -956,7 +956,7 @@ static int __devexit exynos_dp_remove(struct platform_device *pdev) if (pdata pdata-phy_exit) pdata-phy_exit(); - clk_disable(dp-clock); + clk_disable_unprepare(dp-clock); return 0; } @@ -971,7 +971,7 @@ static int exynos_dp_suspend(struct device *dev) if (pdata pdata-phy_exit) pdata-phy_exit(); - clk_disable(dp-clock); + clk_disable_unprepare(dp-clock); return 0; } @@ -985,7 +985,7 @@ static int exynos_dp_resume(struct device *dev) if (pdata pdata-phy_init) pdata-phy_init(); - clk_enable(dp-clock); + clk_prepare_enable(dp-clock); exynos_dp_init_dp(dp); -- 1.7.1 -- To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] input: samsung-keypad: add clk_prepare and clk_unprepare
On Wed, Oct 03, 2012 at 08:31:52AM +0900, Thomas Abraham wrote: Add calls to clk_prepare and clk_unprepare as required by commom clock framework. Signed-off-by: Thomas Abraham thomas.abra...@linaro.org Applied, thank you Thomas. --- drivers/input/keyboard/samsung-keypad.c | 11 ++- 1 files changed, 10 insertions(+), 1 deletions(-) diff --git a/drivers/input/keyboard/samsung-keypad.c b/drivers/input/keyboard/samsung-keypad.c index 277e26d..9d7a111 100644 --- a/drivers/input/keyboard/samsung-keypad.c +++ b/drivers/input/keyboard/samsung-keypad.c @@ -431,6 +431,12 @@ static int __devinit samsung_keypad_probe(struct platform_device *pdev) goto err_unmap_base; } + error = clk_prepare(keypad-clk); + if (error) { + dev_err(pdev-dev, keypad clock prepare failed\n); + goto err_put_clk; + } + keypad-input_dev = input_dev; keypad-pdev = pdev; keypad-row_shift = row_shift; @@ -461,7 +467,7 @@ static int __devinit samsung_keypad_probe(struct platform_device *pdev) keypad-keycodes, input_dev); if (error) { dev_err(pdev-dev, failed to build keymap\n); - goto err_put_clk; + goto err_unprepare_clk; } input_set_capability(input_dev, EV_MSC, MSC_SCAN); @@ -503,6 +509,8 @@ err_free_irq: pm_runtime_disable(pdev-dev); device_init_wakeup(pdev-dev, 0); platform_set_drvdata(pdev, NULL); +err_unprepare_clk: + clk_unprepare(keypad-clk); err_put_clk: clk_put(keypad-clk); samsung_keypad_dt_gpio_free(keypad); @@ -531,6 +539,7 @@ static int __devexit samsung_keypad_remove(struct platform_device *pdev) */ free_irq(keypad-irq, keypad); + clk_unprepare(keypad-clk); clk_put(keypad-clk); samsung_keypad_dt_gpio_free(keypad); -- 1.7.4.1 -- Dmitry -- To unsubscribe from this list: send the line unsubscribe linux-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/8] arm: exynos: add dt based support for exynos5 hdmi
This patch set adds the DT based support for Samsung's Exynos5250. It adds device tree nodes for hdmi, mixer, hdmiphy and hdmiddc. The name of these devices are changed to the one matching with drivers. Exynos-drm and exynos hdmi-drm-commmon devices are added as paltform devices. Apart from that hpd gpio function is configured during the machine init. This patchset is based on linux v3.6-rc5, branch dt-samsung-new at git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung.git Rahul Sharma (8): dts: exynos: add device tree support for exynos5 hdmi dts: exynos: add device tree support for exynos5 mixer dts: exynos: add device tree support for exynos5 hdmiphy dts: exynos: add device tree support for exynos5 hdmiddc arm: exynos: add clocks for exynos5 hdmi arm: exynos: config exynos5 hdmi-hpd gpio arm: exynos: add exynos5 drm framework platform device arm: exynos: add exynos5 drm-hdmi common platform device arch/arm/boot/dts/exynos5250-smdk5250.dts | 24 +++- arch/arm/boot/dts/exynos5250.dtsi | 23 +++ arch/arm/mach-exynos/clock-exynos5.c | 14 -- arch/arm/mach-exynos/dev-drm.c|5 + arch/arm/mach-exynos/include/mach/map.h |2 ++ arch/arm/mach-exynos/mach-exynos5-dt.c| 24 arch/arm/plat-samsung/include/plat/devs.h |1 + 7 files changed, 90 insertions(+), 3 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 1/8] dts: exynos: add device tree support for exynos5 hdmi
This patch adds support for device tree based discovery for exynos5 hdmi. Hdmi node is also renamed with exynos5-hdmi. Signed-off-by: Rahul Sharma rahul.sha...@samsung.com --- arch/arm/boot/dts/exynos5250-smdk5250.dts |4 arch/arm/boot/dts/exynos5250.dtsi |7 +++ arch/arm/mach-exynos/include/mach/map.h |1 + arch/arm/mach-exynos/mach-exynos5-dt.c|2 ++ 4 files changed, 14 insertions(+), 0 deletions(-) diff --git a/arch/arm/boot/dts/exynos5250-smdk5250.dts b/arch/arm/boot/dts/exynos5250-smdk5250.dts index a352df4..2a478ab 100644 --- a/arch/arm/boot/dts/exynos5250-smdk5250.dts +++ b/arch/arm/boot/dts/exynos5250-smdk5250.dts @@ -166,4 +166,8 @@ spi_2: spi@12d4 { status = disabled; }; + + hdmi { + hpd-gpio = gpx3 7 0xf 1 3; + }; }; diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi index f69e389..4e019b5 100644 --- a/arch/arm/boot/dts/exynos5250.dtsi +++ b/arch/arm/boot/dts/exynos5250.dtsi @@ -492,4 +492,11 @@ #gpio-cells = 4; }; }; + + hdmi { + compatible = samsung,exynos5-hdmi; + reg = 0x1453 0x10; + interrupts = 0 95 0; + version = 1.4; +}; }; diff --git a/arch/arm/mach-exynos/include/mach/map.h b/arch/arm/mach-exynos/include/mach/map.h index 5edbbe9..7b9efb2 100644 --- a/arch/arm/mach-exynos/include/mach/map.h +++ b/arch/arm/mach-exynos/include/mach/map.h @@ -201,6 +201,7 @@ #define EXYNOS4_PA_SDO 0x12C2 #define EXYNOS4_PA_HDMI0x12D0 #define EXYNOS4_PA_IIC_HDMIPHY 0x138E +#define EXYNOS5_PA_HDMI0x1453 #define EXYNOS4_PA_IIC(x) (0x1386 + ((x) * 0x1)) #define EXYNOS5_PA_IIC(x) (0x12C6 + ((x) * 0x1)) diff --git a/arch/arm/mach-exynos/mach-exynos5-dt.c b/arch/arm/mach-exynos/mach-exynos5-dt.c index ce82f30..43449fb 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 = { OF_DEV_AUXDATA(arm,pl330, EXYNOS5_PA_PDMA0, dma-pl330.0, NULL), OF_DEV_AUXDATA(arm,pl330, EXYNOS5_PA_PDMA1, dma-pl330.1, NULL), OF_DEV_AUXDATA(arm,pl330, EXYNOS5_PA_MDMA1, dma-pl330.2, NULL), + OF_DEV_AUXDATA(samsung,exynos5-hdmi, EXYNOS5_PA_HDMI, + exynos5-hdmi, 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 2/8] dts: exynos: add device tree support for exynos5 mixer
This patch adds support for device tree based discovery for exynos5 mixer. Mixer node is also renamed with exynos5-mixer. Signed-off-by: Rahul Sharma rahul.sha...@samsung.com --- arch/arm/boot/dts/exynos5250.dtsi |8 arch/arm/mach-exynos/include/mach/map.h |1 + arch/arm/mach-exynos/mach-exynos5-dt.c |2 ++ 3 files changed, 11 insertions(+), 0 deletions(-) diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi index 4e019b5..e4483bc 100644 --- a/arch/arm/boot/dts/exynos5250.dtsi +++ b/arch/arm/boot/dts/exynos5250.dtsi @@ -499,4 +499,12 @@ interrupts = 0 95 0; version = 1.4; }; + +mixer { + compatible = samsung,exynos5-mixer; + reg = 0x1445 0x1; + interrupts = 0 94 0; + version = 16.0.33.0; + vp-support = 0; +}; }; diff --git a/arch/arm/mach-exynos/include/mach/map.h b/arch/arm/mach-exynos/include/mach/map.h index 7b9efb2..314ee75 100644 --- a/arch/arm/mach-exynos/include/mach/map.h +++ b/arch/arm/mach-exynos/include/mach/map.h @@ -201,6 +201,7 @@ #define EXYNOS4_PA_SDO 0x12C2 #define EXYNOS4_PA_HDMI0x12D0 #define EXYNOS4_PA_IIC_HDMIPHY 0x138E +#define EXYNOS5_PA_MIXER 0x1445 #define EXYNOS5_PA_HDMI0x1453 #define EXYNOS4_PA_IIC(x) (0x1386 + ((x) * 0x1)) diff --git a/arch/arm/mach-exynos/mach-exynos5-dt.c b/arch/arm/mach-exynos/mach-exynos5-dt.c index 43449fb..cdad7c1 100644 --- a/arch/arm/mach-exynos/mach-exynos5-dt.c +++ b/arch/arm/mach-exynos/mach-exynos5-dt.c @@ -66,6 +66,8 @@ static const struct of_dev_auxdata exynos5250_auxdata_lookup[] __initconst = { OF_DEV_AUXDATA(arm,pl330, EXYNOS5_PA_MDMA1, dma-pl330.2, NULL), OF_DEV_AUXDATA(samsung,exynos5-hdmi, EXYNOS5_PA_HDMI, exynos5-hdmi, NULL), + OF_DEV_AUXDATA(samsung,exynos5-mixer, EXYNOS5_PA_MIXER, + exynos5-mixer, 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 3/8] dts: exynos: add device tree support for exynos5 hdmiphy
This patch adds support for device tree based discovery for exynos5 hdmiphy. Signed-off-by: Rahul Sharma rahul.sha...@samsung.com --- arch/arm/boot/dts/exynos5250-smdk5250.dts | 10 ++ arch/arm/boot/dts/exynos5250.dtsi |8 arch/arm/mach-exynos/mach-exynos5-dt.c|2 ++ 3 files changed, 20 insertions(+), 0 deletions(-) diff --git a/arch/arm/boot/dts/exynos5250-smdk5250.dts b/arch/arm/boot/dts/exynos5250-smdk5250.dts index 2a478ab..af9271c 100644 --- a/arch/arm/boot/dts/exynos5250-smdk5250.dts +++ b/arch/arm/boot/dts/exynos5250-smdk5250.dts @@ -79,6 +79,16 @@ status = disabled; }; +i2c@12CE { + samsung,i2c-sda-delay = 100; + samsung,i2c-max-bus-freq = 66000; + + hdmiphy { + compatible = samsung,exynos5-hdmiphy; + reg = 0x38; + }; + }; + dwmmc_0: dwmmc0@1220 { num-slots = 1; supports-highspeed; diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi index e4483bc..dd5a4c3 100644 --- a/arch/arm/boot/dts/exynos5250.dtsi +++ b/arch/arm/boot/dts/exynos5250.dtsi @@ -152,6 +152,14 @@ #size-cells = 0; }; + i2c@12CE { + compatible = samsung,s3c2440-hdmiphy-i2c; + reg = 0x12CE 0x1000; + interrupts = 0 64 0; + #address-cells = 1; + #size-cells = 0; + }; + spi_0: spi@12d2 { compatible = samsung,exynos4210-spi; reg = 0x12d2 0x100; diff --git a/arch/arm/mach-exynos/mach-exynos5-dt.c b/arch/arm/mach-exynos/mach-exynos5-dt.c index cdad7c1..3f129db 100644 --- a/arch/arm/mach-exynos/mach-exynos5-dt.c +++ b/arch/arm/mach-exynos/mach-exynos5-dt.c @@ -47,6 +47,8 @@ static const struct of_dev_auxdata exynos5250_auxdata_lookup[] __initconst = { s3c2440-i2c.0, NULL), OF_DEV_AUXDATA(samsung,s3c2440-i2c, EXYNOS5_PA_IIC(1), s3c2440-i2c.1, NULL), + OF_DEV_AUXDATA(samsung,s3c2440-hdmiphy-i2c, EXYNOS5_PA_IIC(8), + s3c2440-hdmiphy-i2c, NULL), OF_DEV_AUXDATA(samsung,exynos5250-dw-mshc, EXYNOS5_PA_DWMCI0, dw_mmc.0, NULL), OF_DEV_AUXDATA(samsung,exynos5250-dw-mshc, EXYNOS5_PA_DWMCI1, -- 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 4/8] dts: exynos: add device tree support for exynos5 hdmiddc
This patch adds support for device tree based discovery for exynos5 hdmi ddc. Signed-off-by: Rahul Sharma rahul.sha...@samsung.com --- arch/arm/boot/dts/exynos5250-smdk5250.dts | 10 +- arch/arm/mach-exynos/mach-exynos5-dt.c|2 ++ 2 files changed, 11 insertions(+), 1 deletions(-) diff --git a/arch/arm/boot/dts/exynos5250-smdk5250.dts b/arch/arm/boot/dts/exynos5250-smdk5250.dts index af9271c..be22a83 100644 --- a/arch/arm/boot/dts/exynos5250-smdk5250.dts +++ b/arch/arm/boot/dts/exynos5250-smdk5250.dts @@ -56,7 +56,15 @@ }; i2c@12C8 { - status = disabled; + samsung,i2c-sda-delay = 100; + samsung,i2c-max-bus-freq = 66000; + gpios = gpa0 6 3 3 0, + gpa0 7 3 3 0; + + hdmiddc { + compatible = samsung,exynos5-hdmiddc; + reg = 0x50; + }; }; i2c@12C9 { diff --git a/arch/arm/mach-exynos/mach-exynos5-dt.c b/arch/arm/mach-exynos/mach-exynos5-dt.c index 3f129db..003963c 100644 --- a/arch/arm/mach-exynos/mach-exynos5-dt.c +++ b/arch/arm/mach-exynos/mach-exynos5-dt.c @@ -47,6 +47,8 @@ static const struct of_dev_auxdata exynos5250_auxdata_lookup[] __initconst = { s3c2440-i2c.0, NULL), OF_DEV_AUXDATA(samsung,s3c2440-i2c, EXYNOS5_PA_IIC(1), s3c2440-i2c.1, NULL), + OF_DEV_AUXDATA(samsung,s3c2440-i2c, EXYNOS5_PA_IIC(2), + s3c2440-i2c.2, NULL), OF_DEV_AUXDATA(samsung,s3c2440-hdmiphy-i2c, EXYNOS5_PA_IIC(8), s3c2440-hdmiphy-i2c, NULL), OF_DEV_AUXDATA(samsung,exynos5250-dw-mshc, EXYNOS5_PA_DWMCI0, -- 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 5/8] arm: exynos: add clocks for exynos5 hdmi
This patch adds support for clocks for hdmi, hdmiphy and mixer. Signed-off-by: Rahul Sharma rahul.sha...@samsung.com --- arch/arm/mach-exynos/clock-exynos5.c | 14 -- 1 files changed, 12 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-exynos/clock-exynos5.c b/arch/arm/mach-exynos/clock-exynos5.c index 17e6c77..ec2a4da 100644 --- a/arch/arm/mach-exynos/clock-exynos5.c +++ b/arch/arm/mach-exynos/clock-exynos5.c @@ -201,6 +201,11 @@ static int exynos5_clk_ip_isp1_ctrl(struct clk *clk, int enable) return s5p_gatectrl(EXYNOS5_CLKGATE_IP_ISP1, clk, enable); } +static int exynos5_clk_hdmiphy_ctrl(struct clk *clk, int enable) +{ + return s5p_gatectrl(S5P_HDMI_PHY_CONTROL, clk, enable); +} + /* Core list of CMU_CPU side */ static struct clksrc_clk exynos5_clk_mout_apll = { @@ -612,12 +617,17 @@ static struct clk exynos5_init_clocks_off[] = { .ctrlbit= (1 0), }, { .name = hdmi, - .devname= exynos4-hdmi, + .devname= exynos5-hdmi, .enable = exynos5_clk_ip_disp1_ctrl, .ctrlbit= (1 6), }, { + .name = hdmiphy, + .devname= exynos5-hdmi, + .enable = exynos5_clk_hdmiphy_ctrl, + .ctrlbit= (1 0), + }, { .name = mixer, - .devname= s5p-mixer, + .devname= exynos5-mixer, .enable = exynos5_clk_ip_disp1_ctrl, .ctrlbit= (1 5), }, { -- 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 6/8] arm: exynos: config exynos5 hdmi-hpd gpio
This patch adds support for the configuration of exynos5 hdmi-hpd gpio. It sets the gpio fucntion to EINT which is required for recieving external hpd interrupt in drm hdmi driver. Signed-off-by: Rahul Sharma rahul.sha...@samsung.com --- arch/arm/mach-exynos/mach-exynos5-dt.c |9 + 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-exynos/mach-exynos5-dt.c b/arch/arm/mach-exynos/mach-exynos5-dt.c index 003963c..9a6d569 100644 --- a/arch/arm/mach-exynos/mach-exynos5-dt.c +++ b/arch/arm/mach-exynos/mach-exynos5-dt.c @@ -11,6 +11,7 @@ #include linux/of_platform.h #include linux/serial_core.h +#include linux/gpio.h #include asm/mach/arch.h #include asm/hardware/gic.h @@ -18,6 +19,7 @@ #include plat/cpu.h #include plat/regs-serial.h +#include plat/gpio-cfg.h #include common.h @@ -81,10 +83,17 @@ static void __init exynos5250_dt_map_io(void) s3c24xx_init_clocks(2400); } +static void smdk_hpd_setup(void) +{ + s3c_gpio_cfgpin(EXYNOS5_GPX3(7), S3C_GPIO_SFN(0xf)); + s3c_gpio_setpull(EXYNOS5_GPX3(7), S3C_GPIO_PULL_DOWN); +} + static void __init exynos5250_dt_machine_init(void) { of_platform_populate(NULL, of_default_bus_match_table, exynos5250_auxdata_lookup, NULL); + smdk_hpd_setup(); } static char const *exynos5250_dt_compat[] __initdata = { -- 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 8/8] arm: exynos: add exynos5 drm-hdmi common platform device
This patch adds drm-hdmi-common platform device which abstracts hdmi and mixer device. This is software module hence not palced as device tree node. Signed-off-by: Rahul Sharma rahul.sha...@samsung.com --- arch/arm/mach-exynos/dev-drm.c|5 + arch/arm/mach-exynos/mach-exynos5-dt.c|2 ++ arch/arm/plat-samsung/include/plat/devs.h |1 + 3 files changed, 8 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-exynos/dev-drm.c b/arch/arm/mach-exynos/dev-drm.c index 17c9c6e..ca811de 100644 --- a/arch/arm/mach-exynos/dev-drm.c +++ b/arch/arm/mach-exynos/dev-drm.c @@ -27,3 +27,8 @@ struct platform_device exynos_device_drm = { .coherent_dma_mask = DMA_BIT_MASK(32), } }; + +/* common drm-hdmi device which abstracts hdmi and mixer dev*/ +struct platform_device exynos_drm_hdmi_device = { + .name = exynos-drm-hdmi, +}; diff --git a/arch/arm/mach-exynos/mach-exynos5-dt.c b/arch/arm/mach-exynos/mach-exynos5-dt.c index db3447c..db7092e 100644 --- a/arch/arm/mach-exynos/mach-exynos5-dt.c +++ b/arch/arm/mach-exynos/mach-exynos5-dt.c @@ -79,8 +79,10 @@ static const struct of_dev_auxdata exynos5250_auxdata_lookup[] __initconst = { }; static struct platform_device *exynos5_devices[] __initdata = { + exynos_drm_hdmi_device, exynos_device_drm, }; + static void __init exynos5250_dt_map_io(void) { exynos_init_io(NULL, 0); diff --git a/arch/arm/plat-samsung/include/plat/devs.h b/arch/arm/plat-samsung/include/plat/devs.h index 5da4b4f..cda177e 100644 --- a/arch/arm/plat-samsung/include/plat/devs.h +++ b/arch/arm/plat-samsung/include/plat/devs.h @@ -134,6 +134,7 @@ extern struct platform_device exynos4_device_pcm2; extern struct platform_device exynos4_device_spdif; extern struct platform_device exynos_device_drm; +extern struct platform_device exynos_drm_hdmi_device; extern struct platform_device samsung_asoc_dma; extern struct platform_device samsung_asoc_idma; -- 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 7/8] arm: exynos: add exynos5 drm framework platform device
This patch adds drm framework platform device. This device is a software device, hence not made part of device tree file. Signed-off-by: Rahul Sharma rahul.sha...@samsung.com --- arch/arm/mach-exynos/mach-exynos5-dt.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-exynos/mach-exynos5-dt.c b/arch/arm/mach-exynos/mach-exynos5-dt.c index 9a6d569..db3447c 100644 --- a/arch/arm/mach-exynos/mach-exynos5-dt.c +++ b/arch/arm/mach-exynos/mach-exynos5-dt.c @@ -17,6 +17,7 @@ #include asm/hardware/gic.h #include mach/map.h +#include plat/devs.h #include plat/cpu.h #include plat/regs-serial.h #include plat/gpio-cfg.h @@ -77,6 +78,9 @@ static const struct of_dev_auxdata exynos5250_auxdata_lookup[] __initconst = { {}, }; +static struct platform_device *exynos5_devices[] __initdata = { + exynos_device_drm, +}; static void __init exynos5250_dt_map_io(void) { exynos_init_io(NULL, 0); @@ -94,6 +98,7 @@ static void __init exynos5250_dt_machine_init(void) of_platform_populate(NULL, of_default_bus_match_table, exynos5250_auxdata_lookup, NULL); smdk_hpd_setup(); + platform_add_devices(exynos5_devices, ARRAY_SIZE(exynos5_devices)); } static char const *exynos5250_dt_compat[] __initdata = { -- 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 6/8] arm: exynos: config exynos5 hdmi-hpd gpio
On 10/5/12, Rahul Sharma rahul.sha...@samsung.com wrote: This patch adds support for the configuration of exynos5 hdmi-hpd gpio. It sets the gpio fucntion to EINT which is required for recieving external hpd interrupt in drm hdmi driver. Signed-off-by: Rahul Sharma rahul.sha...@samsung.com --- arch/arm/mach-exynos/mach-exynos5-dt.c |9 + 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-exynos/mach-exynos5-dt.c b/arch/arm/mach-exynos/mach-exynos5-dt.c index 003963c..9a6d569 100644 --- a/arch/arm/mach-exynos/mach-exynos5-dt.c +++ b/arch/arm/mach-exynos/mach-exynos5-dt.c @@ -11,6 +11,7 @@ #include linux/of_platform.h #include linux/serial_core.h +#include linux/gpio.h #include asm/mach/arch.h #include asm/hardware/gic.h @@ -18,6 +19,7 @@ #include plat/cpu.h #include plat/regs-serial.h +#include plat/gpio-cfg.h #include common.h @@ -81,10 +83,17 @@ static void __init exynos5250_dt_map_io(void) s3c24xx_init_clocks(2400); } +static void smdk_hpd_setup(void) +{ + s3c_gpio_cfgpin(EXYNOS5_GPX3(7), S3C_GPIO_SFN(0xf)); + s3c_gpio_setpull(EXYNOS5_GPX3(7), S3C_GPIO_PULL_DOWN); +} these should be described at dts file instead of here. and name is not good. smdk... Thank you, Kyungmin Park + static void __init exynos5250_dt_machine_init(void) { of_platform_populate(NULL, of_default_bus_match_table, exynos5250_auxdata_lookup, NULL); + smdk_hpd_setup(); } static char const *exynos5250_dt_compat[] __initdata = { -- 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 v6 8/9] mmc: dw_mmc: add support for implementation specific callbacks
Monday, September 24, Chris Ball c...@laptop.org Hi, On Thu, Sep 20 2012, Thomas Abraham wrote: 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. A separate fix patch would be good, please. (I'd normally take an updated patch but Stephen Rothwell's asked for people to hold off rebasing now that -rc7 is out, which is reasonable.) Thomas, Is there any work for fix? Thanks, Seungwon Jeon Thanks, - Chris. -- Chris Ball c...@laptop.org http://printf.net/ 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
[PATCH 14/24] USB: ohci: merge ohci_finish_controller_resume with ohci_resume
Merge ohci_finish_controller_resume with ohci_resume as suggested by Alan Stern. Since ohci_finish_controller_resume no longer exists, update the various OHCI drivers to call ohci_resume() instead. Some drivers used to set themselves the bit HCD_FLAG_HW_ACCESSIBLE, which is now handled by ohci_resume(). Signed-off-by: Florian Fainelli flor...@openwrt.org --- drivers/usb/host/ohci-at91.c |2 +- drivers/usb/host/ohci-ep93xx.c |2 +- drivers/usb/host/ohci-exynos.c |5 + drivers/usb/host/ohci-hcd.c | 41 +++-- drivers/usb/host/ohci-hub.c | 42 -- drivers/usb/host/ohci-omap.c |2 +- drivers/usb/host/ohci-platform.c |2 +- drivers/usb/host/ohci-pxa27x.c |2 +- drivers/usb/host/ohci-s3c2410.c |3 +-- drivers/usb/host/ohci-spear.c|2 +- drivers/usb/host/ohci-tmio.c |2 +- 11 files changed, 48 insertions(+), 57 deletions(-) diff --git a/drivers/usb/host/ohci-at91.c b/drivers/usb/host/ohci-at91.c index 0bf72f9..908d84a 100644 --- a/drivers/usb/host/ohci-at91.c +++ b/drivers/usb/host/ohci-at91.c @@ -705,7 +705,7 @@ static int ohci_hcd_at91_drv_resume(struct platform_device *pdev) if (!clocked) at91_start_clock(); - ohci_finish_controller_resume(hcd); + ohci_resume(hcd, false); return 0; } #else diff --git a/drivers/usb/host/ohci-ep93xx.c b/drivers/usb/host/ohci-ep93xx.c index dbfbd1d..a982f04 100644 --- a/drivers/usb/host/ohci-ep93xx.c +++ b/drivers/usb/host/ohci-ep93xx.c @@ -194,7 +194,7 @@ static int ohci_hcd_ep93xx_drv_resume(struct platform_device *pdev) ep93xx_start_hc(pdev-dev); - ohci_finish_controller_resume(hcd); + ohci_resume(hcd, false); return 0; } #endif diff --git a/drivers/usb/host/ohci-exynos.c b/drivers/usb/host/ohci-exynos.c index fc3091b..53c5a989 100644 --- a/drivers/usb/host/ohci-exynos.c +++ b/drivers/usb/host/ohci-exynos.c @@ -252,10 +252,7 @@ static int exynos_ohci_resume(struct device *dev) if (pdata pdata-phy_init) pdata-phy_init(pdev, S5P_USB_PHY_HOST); - /* Mark hardware accessible again as we are out of D3 state by now */ - set_bit(HCD_FLAG_HW_ACCESSIBLE, hcd-flags); - - ohci_finish_controller_resume(hcd); + ohci_resume(hcd, false); return 0; } diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c index 5d30992..568bdb3 100644 --- a/drivers/usb/host/ohci-hcd.c +++ b/drivers/usb/host/ohci-hcd.c @@ -1003,13 +1003,50 @@ static int __maybe_unused ohci_suspend(struct usb_hcd *hcd, bool do_wakeup) static int __maybe_unused ohci_resume(struct usb_hcd *hcd, bool hibernated) { + struct ohci_hcd *ohci = hcd_to_ohci(hcd); + int port; + boolneed_reinit = false; + set_bit(HCD_FLAG_HW_ACCESSIBLE, hcd-flags); /* Make sure resume from hibernation re-enumerates everything */ if (hibernated) - ohci_usb_reset(hcd_to_ohci(hcd)); + ohci_usb_reset(ohci); + + /* See if the controller is already running or has been reset */ + ohci-hc_control = ohci_readl(ohci, ohci-regs-control); + if (ohci-hc_control (OHCI_CTRL_IR | OHCI_SCHED_ENABLES)) { + need_reinit = true; + } else { + switch (ohci-hc_control OHCI_CTRL_HCFS) { + case OHCI_USB_OPER: + case OHCI_USB_RESET: + need_reinit = true; + } + } + + /* If needed, reinitialize and suspend the root hub */ + if (need_reinit) { + spin_lock_irq(ohci-lock); + ohci_rh_resume(ohci); + ohci_rh_suspend(ohci, 0); + spin_unlock_irq(ohci-lock); + } + + /* Normally just turn on port power and enable interrupts */ + else { + ohci_dbg(ohci, powerup ports\n); + for (port = 0; port ohci-num_ports; port++) + ohci_writel(ohci, RH_PS_PPS, + ohci-regs-roothub.portstatus[port]); + + ohci_writel(ohci, OHCI_INTR_MIE, ohci-regs-intrenable); + ohci_readl(ohci, ohci-regs-intrenable); + msleep(20); + } + + usb_hcd_resume_root_hub(hcd); - ohci_finish_controller_resume(hcd); return 0; } diff --git a/drivers/usb/host/ohci-hub.c b/drivers/usb/host/ohci-hub.c index 2f3619e..db09dae 100644 --- a/drivers/usb/host/ohci-hub.c +++ b/drivers/usb/host/ohci-hub.c @@ -316,48 +316,6 @@ static int ohci_bus_resume (struct usb_hcd *hcd) return rc; } -/* Carry out the final steps of resuming the controller device */ -static void __maybe_unused ohci_finish_controller_resume(struct usb_hcd *hcd) -{ - struct ohci_hcd *ohci = hcd_to_ohci(hcd); - int port; - bool
Re: Re: [PATCH 6/8] arm: exynos: config exynos5 hdmi-hpd gpio
Sure Mr. park, I will correct this in v2. I want to request you for reviewing the other patches in the set. regards, Rahul Sharma On Thu, Oct 4, 2012 at 1:45 PM, Kyungmin Park kyungmin.p...@samsung.com wrote: On 10/5/12, Rahul Sharma rahul.sha...@samsung.com wrote: This patch adds support for the configuration of exynos5 hdmi-hpd gpio. It sets the gpio fucntion to EINT which is required for recieving external hpd interrupt in drm hdmi driver. Signed-off-by: Rahul Sharma rahul.sha...@samsung.com --- arch/arm/mach-exynos/mach-exynos5-dt.c |9 + 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-exynos/mach-exynos5-dt.c b/arch/arm/mach-exynos/mach-exynos5-dt.c index 003963c..9a6d569 100644 --- a/arch/arm/mach-exynos/mach-exynos5-dt.c +++ b/arch/arm/mach-exynos/mach-exynos5-dt.c @@ -11,6 +11,7 @@ #include linux/of_platform.h #include linux/serial_core.h +#include linux/gpio.h #include asm/mach/arch.h #include asm/hardware/gic.h @@ -18,6 +19,7 @@ #include plat/cpu.h #include plat/regs-serial.h +#include plat/gpio-cfg.h #include common.h @@ -81,10 +83,17 @@ static void __init exynos5250_dt_map_io(void) s3c24xx_init_clocks(2400); } +static void smdk_hpd_setup(void) +{ + s3c_gpio_cfgpin(EXYNOS5_GPX3(7), S3C_GPIO_SFN(0xf)); + s3c_gpio_setpull(EXYNOS5_GPX3(7), S3C_GPIO_PULL_DOWN); +} these should be described at dts file instead of here. and name is not good. smdk... Thank you, Kyungmin Park + static void __init exynos5250_dt_machine_init(void) { of_platform_populate(NULL, of_default_bus_match_table, exynos5250_auxdata_lookup, NULL); + smdk_hpd_setup(); } static char const *exynos5250_dt_compat[] __initdata = { -- 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