linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V2 0/3] Add TVOUT support for SMDKV310
@ 2011-09-21  5:44 Hatim Ali
  2011-09-21  5:44 ` [PATCH V2 1/3] ARM: EXYNOS4: " Hatim Ali
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Hatim Ali @ 2011-09-21  5:44 UTC (permalink / raw)
  To: linux-arm-kernel

This is v2 of the TVOUT patch set for SMDKV310.
v1 is available at below link.
(http://www.spinics.net/lists/arm-kernel/msg138054.html)

Patch 1 has been modified according to the comments received from
Tomasz Stanislawski.
Patches 2 and 3 are RESENDs.

Hatim Ali (3):
  ARM: EXYNOS4: Add TVOUT support for SMDKV310
  ARM: EXYNOS4: Update consistent DMA size to 8MB
  s5p-tv: Add PM_RUNTIME dependency

 arch/arm/mach-exynos4/Kconfig               |    2 ++
 arch/arm/mach-exynos4/include/mach/memory.h |    2 ++
 arch/arm/mach-exynos4/mach-smdkv310.c       |   25 +++++++++++++++++++++++++
 drivers/media/video/s5p-tv/Kconfig          |    2 +-
 4 files changed, 30 insertions(+), 1 deletions(-)

-- 
1.7.2.3

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH V2 1/3] ARM: EXYNOS4: Add TVOUT support for SMDKV310
  2011-09-21  5:44 [PATCH V2 0/3] Add TVOUT support for SMDKV310 Hatim Ali
@ 2011-09-21  5:44 ` Hatim Ali
  2011-09-21 12:06   ` Kukjin Kim
  2011-09-21 13:05   ` Sylwester Nawrocki
  2011-09-21  5:44 ` [RESEND PATCH 2/3] ARM: EXYNOS4: Update consistent DMA size to 8MB Hatim Ali
  2011-09-21  5:44 ` [RESEND PATCH 3/3] s5p-tv: Add PM_RUNTIME dependency Hatim Ali
  2 siblings, 2 replies; 11+ messages in thread
From: Hatim Ali @ 2011-09-21  5:44 UTC (permalink / raw)
  To: linux-arm-kernel

Add support for TVOUT on SMDKV310 board.

Signed-off-by: Hatim Ali <hatim.rv@samsung.com>
---
Changes since V1:
Incorporated changes as suggested by Tomasz Stanislawski
- Added  GPIO settings for hot-plug detection.
- Added setting hdmi and mixer's parent for TV power domain.

 arch/arm/mach-exynos4/Kconfig         |    2 ++
 arch/arm/mach-exynos4/mach-smdkv310.c |   25 +++++++++++++++++++++++++
 2 files changed, 27 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-exynos4/Kconfig b/arch/arm/mach-exynos4/Kconfig
index 3b594fe..0bf0fe04 100644
--- a/arch/arm/mach-exynos4/Kconfig
+++ b/arch/arm/mach-exynos4/Kconfig
@@ -131,6 +131,7 @@ config MACH_SMDKV310
 	select S3C_DEV_RTC
 	select S3C_DEV_WDT
 	select S3C_DEV_I2C1
+	select S5P_DEV_I2C_HDMIPHY
 	select S5P_DEV_MFC
 	select S3C_DEV_HSMMC
 	select S3C_DEV_HSMMC1
@@ -140,6 +141,7 @@ config MACH_SMDKV310
 	select EXYNOS4_DEV_AHCI
 	select SAMSUNG_DEV_KEYPAD
 	select EXYNOS4_DEV_PD
+	select S5P_DEV_TV
 	select SAMSUNG_DEV_PWM
 	select EXYNOS4_DEV_SYSMMU
 	select EXYNOS4_SETUP_FIMD0
diff --git a/arch/arm/mach-exynos4/mach-smdkv310.c b/arch/arm/mach-exynos4/mach-smdkv310.c
index 7ce4d8b..50de270 100644
--- a/arch/arm/mach-exynos4/mach-smdkv310.c
+++ b/arch/arm/mach-exynos4/mach-smdkv310.c
@@ -239,6 +239,7 @@ static struct platform_device *smdkv310_devices[] __initdata = {
 	&s3c_device_hsmmc2,
 	&s3c_device_hsmmc3,
 	&s3c_device_i2c1,
+	&s5p_device_i2c_hdmiphy,
 	&s3c_device_rtc,
 	&s3c_device_wdt,
 	&exynos4_device_ac97,
@@ -262,6 +263,8 @@ static struct platform_device *smdkv310_devices[] __initdata = {
 	&smdkv310_lcd_lte480wv,
 	&smdkv310_smsc911x,
 	&exynos4_device_ahci,
+	&s5p_device_hdmi,
+	&s5p_device_mixer,
 };
 
 static void __init smdkv310_smsc911x_init(void)
@@ -298,6 +301,25 @@ static struct platform_pwm_backlight_data smdkv310_bl_data = {
 	.pwm_period_ns  = 1000,
 };
 
+static void s5p_tv_setup(void)
+{
+	int ret;
+
+	/* direct HPD to HDMI chip */
+	ret = gpio_request(EXYNOS4_GPX3(7), "hpd-plug");
+
+	if (!ret) {
+		gpio_direction_input(EXYNOS4_GPX3(7));
+		s3c_gpio_cfgpin_range(EXYNOS4_GPX3(7),
+					1, S3C_GPIO_SFN(3));
+	} else
+		pr_err("Failed to request gpio for hpd: %d\n", ret);
+
+	/* setup dependencies between TV devices */
+	s5p_device_hdmi.dev.parent = &exynos4_device_pd[PD_TV].dev;
+	s5p_device_mixer.dev.parent = &exynos4_device_pd[PD_TV].dev;
+}
+
 static void __init smdkv310_map_io(void)
 {
 	s5p_init_io(NULL, 0, S5P_VA_CHIPID);
@@ -327,6 +349,9 @@ static void __init smdkv310_machine_init(void)
 	samsung_bl_set(&smdkv310_bl_gpio_info, &smdkv310_bl_data);
 	s5p_fimd0_set_platdata(&smdkv310_lcd0_pdata);
 
+	s5p_tv_setup();
+	s5p_i2c_hdmiphy_set_platdata(NULL);
+
 	platform_add_devices(smdkv310_devices, ARRAY_SIZE(smdkv310_devices));
 	s5p_device_mfc.dev.parent = &exynos4_device_pd[PD_MFC].dev;
 }
-- 
1.7.2.3

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [RESEND PATCH 2/3] ARM: EXYNOS4: Update consistent DMA size to 8MB
  2011-09-21  5:44 [PATCH V2 0/3] Add TVOUT support for SMDKV310 Hatim Ali
  2011-09-21  5:44 ` [PATCH V2 1/3] ARM: EXYNOS4: " Hatim Ali
@ 2011-09-21  5:44 ` Hatim Ali
  2011-09-21  6:25   ` Kyungmin Park
  2011-09-21 11:57   ` Kukjin Kim
  2011-09-21  5:44 ` [RESEND PATCH 3/3] s5p-tv: Add PM_RUNTIME dependency Hatim Ali
  2 siblings, 2 replies; 11+ messages in thread
From: Hatim Ali @ 2011-09-21  5:44 UTC (permalink / raw)
  To: linux-arm-kernel

Change the consistent DMA allocation to 8MB to support the
TVOUT driver.

NOTE: Once CMA support is merged into mainline, we will use it for memory
allocation.

Signed-off-by: Hatim Ali <hatim.rv@samsung.com>
---
 arch/arm/mach-exynos4/include/mach/memory.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-exynos4/include/mach/memory.h b/arch/arm/mach-exynos4/include/mach/memory.h
index 374ef2c..7549742 100644
--- a/arch/arm/mach-exynos4/include/mach/memory.h
+++ b/arch/arm/mach-exynos4/include/mach/memory.h
@@ -15,6 +15,8 @@
 
 #define PLAT_PHYS_OFFSET		UL(0x40000000)
 
+#define CONSISTENT_DMA_SIZE		SZ_8M
+
 /* Maximum of 256MiB in one bank */
 #define MAX_PHYSMEM_BITS	32
 #define SECTION_SIZE_BITS	28
-- 
1.7.2.3

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [RESEND PATCH 3/3] s5p-tv: Add PM_RUNTIME dependency
  2011-09-21  5:44 [PATCH V2 0/3] Add TVOUT support for SMDKV310 Hatim Ali
  2011-09-21  5:44 ` [PATCH V2 1/3] ARM: EXYNOS4: " Hatim Ali
  2011-09-21  5:44 ` [RESEND PATCH 2/3] ARM: EXYNOS4: Update consistent DMA size to 8MB Hatim Ali
@ 2011-09-21  5:44 ` Hatim Ali
  2 siblings, 0 replies; 11+ messages in thread
From: Hatim Ali @ 2011-09-21  5:44 UTC (permalink / raw)
  To: linux-arm-kernel

The TVOUT driver requires PM_RUNTIME support for proper clock
enabling.

Signed-off-by: Hatim Ali <hatim.rv@samsung.com>
---
 drivers/media/video/s5p-tv/Kconfig |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/media/video/s5p-tv/Kconfig b/drivers/media/video/s5p-tv/Kconfig
index 9c37dee..f2a0977 100644
--- a/drivers/media/video/s5p-tv/Kconfig
+++ b/drivers/media/video/s5p-tv/Kconfig
@@ -8,7 +8,7 @@
 
 config VIDEO_SAMSUNG_S5P_TV
 	bool "Samsung TV driver for S5P platform (experimental)"
-	depends on PLAT_S5P
+	depends on PLAT_S5P && PM_RUNTIME
 	depends on EXPERIMENTAL
 	default n
 	---help---
-- 
1.7.2.3

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [RESEND PATCH 2/3] ARM: EXYNOS4: Update consistent DMA size to 8MB
  2011-09-21  5:44 ` [RESEND PATCH 2/3] ARM: EXYNOS4: Update consistent DMA size to 8MB Hatim Ali
@ 2011-09-21  6:25   ` Kyungmin Park
  2011-09-21 11:57   ` Kukjin Kim
  1 sibling, 0 replies; 11+ messages in thread
From: Kyungmin Park @ 2011-09-21  6:25 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

As I know,  CONSISTENT_DMA_SIZE is removed, please use the updated APIs.

Thank you,
Kyungmin Park

On Wed, Sep 21, 2011 at 2:44 PM, Hatim Ali <hatim.rv@samsung.com> wrote:
> Change the consistent DMA allocation to 8MB to support the
> TVOUT driver.
>
> NOTE: Once CMA support is merged into mainline, we will use it for memory
> allocation.
>
> Signed-off-by: Hatim Ali <hatim.rv@samsung.com>
> ---
> ?arch/arm/mach-exynos4/include/mach/memory.h | ? ?2 ++
> ?1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-exynos4/include/mach/memory.h b/arch/arm/mach-exynos4/include/mach/memory.h
> index 374ef2c..7549742 100644
> --- a/arch/arm/mach-exynos4/include/mach/memory.h
> +++ b/arch/arm/mach-exynos4/include/mach/memory.h
> @@ -15,6 +15,8 @@
>
> ?#define PLAT_PHYS_OFFSET ? ? ? ? ? ? ? UL(0x40000000)
>
> +#define CONSISTENT_DMA_SIZE ? ? ? ? ? ?SZ_8M
> +
> ?/* Maximum of 256MiB in one bank */
> ?#define MAX_PHYSMEM_BITS ? ? ? 32
> ?#define SECTION_SIZE_BITS ? ? ?28
> --
> 1.7.2.3
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at ?http://vger.kernel.org/majordomo-info.html
>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [RESEND PATCH 2/3] ARM: EXYNOS4: Update consistent DMA size to 8MB
  2011-09-21  5:44 ` [RESEND PATCH 2/3] ARM: EXYNOS4: Update consistent DMA size to 8MB Hatim Ali
  2011-09-21  6:25   ` Kyungmin Park
@ 2011-09-21 11:57   ` Kukjin Kim
  1 sibling, 0 replies; 11+ messages in thread
From: Kukjin Kim @ 2011-09-21 11:57 UTC (permalink / raw)
  To: linux-arm-kernel

Hatim Ali wrote:
> 
> Change the consistent DMA allocation to 8MB to support the
> TVOUT driver.
> 
Probably, this conflicts with 'Remove define CONSISTENT_DMA_SIZE'. 

As other guy said, we need to check the progress of it before this.

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.


> NOTE: Once CMA support is merged into mainline, we will use it for memory
> allocation.
> 
> Signed-off-by: Hatim Ali <hatim.rv@samsung.com>
> ---
>  arch/arm/mach-exynos4/include/mach/memory.h |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mach-exynos4/include/mach/memory.h b/arch/arm/mach-
> exynos4/include/mach/memory.h
> index 374ef2c..7549742 100644
> --- a/arch/arm/mach-exynos4/include/mach/memory.h
> +++ b/arch/arm/mach-exynos4/include/mach/memory.h
> @@ -15,6 +15,8 @@
> 
>  #define PLAT_PHYS_OFFSET		UL(0x40000000)
> 
> +#define CONSISTENT_DMA_SIZE		SZ_8M
> +
>  /* Maximum of 256MiB in one bank */
>  #define MAX_PHYSMEM_BITS	32
>  #define SECTION_SIZE_BITS	28
> --
> 1.7.2.3

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH V2 1/3] ARM: EXYNOS4: Add TVOUT support for SMDKV310
  2011-09-21  5:44 ` [PATCH V2 1/3] ARM: EXYNOS4: " Hatim Ali
@ 2011-09-21 12:06   ` Kukjin Kim
  2011-09-21 12:44     ` Tomasz Stanislawski
  2011-09-21 13:05   ` Sylwester Nawrocki
  1 sibling, 1 reply; 11+ messages in thread
From: Kukjin Kim @ 2011-09-21 12:06 UTC (permalink / raw)
  To: linux-arm-kernel

Hatim Ali wrote:
> 
> Add support for TVOUT on SMDKV310 board.
> 
> Signed-off-by: Hatim Ali <hatim.rv@samsung.com>
> ---
> Changes since V1:
> Incorporated changes as suggested by Tomasz Stanislawski
> - Added  GPIO settings for hot-plug detection.
> - Added setting hdmi and mixer's parent for TV power domain.
> 
>  arch/arm/mach-exynos4/Kconfig         |    2 ++
>  arch/arm/mach-exynos4/mach-smdkv310.c |   25
> +++++++++++++++++++++++++
>  2 files changed, 27 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mach-exynos4/Kconfig b/arch/arm/mach-exynos4/Kconfig
> index 3b594fe..0bf0fe04 100644
> --- a/arch/arm/mach-exynos4/Kconfig
> +++ b/arch/arm/mach-exynos4/Kconfig
> @@ -131,6 +131,7 @@ config MACH_SMDKV310
>  	select S3C_DEV_RTC
>  	select S3C_DEV_WDT
>  	select S3C_DEV_I2C1
> +	select S5P_DEV_I2C_HDMIPHY
>  	select S5P_DEV_MFC
>  	select S3C_DEV_HSMMC
>  	select S3C_DEV_HSMMC1
> @@ -140,6 +141,7 @@ config MACH_SMDKV310
>  	select EXYNOS4_DEV_AHCI
>  	select SAMSUNG_DEV_KEYPAD
>  	select EXYNOS4_DEV_PD
> +	select S5P_DEV_TV
>  	select SAMSUNG_DEV_PWM
>  	select EXYNOS4_DEV_SYSMMU
>  	select EXYNOS4_SETUP_FIMD0
> diff --git a/arch/arm/mach-exynos4/mach-smdkv310.c b/arch/arm/mach-
> exynos4/mach-smdkv310.c
> index 7ce4d8b..50de270 100644
> --- a/arch/arm/mach-exynos4/mach-smdkv310.c
> +++ b/arch/arm/mach-exynos4/mach-smdkv310.c
> @@ -239,6 +239,7 @@ static struct platform_device *smdkv310_devices[]
> __initdata = {
>  	&s3c_device_hsmmc2,
>  	&s3c_device_hsmmc3,
>  	&s3c_device_i2c1,
> +	&s5p_device_i2c_hdmiphy,
>  	&s3c_device_rtc,
>  	&s3c_device_wdt,
>  	&exynos4_device_ac97,
> @@ -262,6 +263,8 @@ static struct platform_device *smdkv310_devices[]
> __initdata = {
>  	&smdkv310_lcd_lte480wv,
>  	&smdkv310_smsc911x,
>  	&exynos4_device_ahci,
> +	&s5p_device_hdmi,
> +	&s5p_device_mixer,
>  };
> 
>  static void __init smdkv310_smsc911x_init(void)
> @@ -298,6 +301,25 @@ static struct platform_pwm_backlight_data
> smdkv310_bl_data = {
>  	.pwm_period_ns  = 1000,
>  };
> 
> +static void s5p_tv_setup(void)
> +{
> +	int ret;
> +
> +	/* direct HPD to HDMI chip */
> +	ret = gpio_request(EXYNOS4_GPX3(7), "hpd-plug");
> +
> +	if (!ret) {
> +		gpio_direction_input(EXYNOS4_GPX3(7));
> +		s3c_gpio_cfgpin_range(EXYNOS4_GPX3(7),
> +					1, S3C_GPIO_SFN(3));

Why do you use 's3c_gpio_cfgpin_range()' for just one gpio pin not range...?

> +	} else
> +		pr_err("Failed to request gpio for hpd: %d\n", ret);

According to coding style, should be added { and } around above.

> +
> +	/* setup dependencies between TV devices */
> +	s5p_device_hdmi.dev.parent = &exynos4_device_pd[PD_TV].dev;
> +	s5p_device_mixer.dev.parent = &exynos4_device_pd[PD_TV].dev;
> +}
> +
>  static void __init smdkv310_map_io(void)
>  {
>  	s5p_init_io(NULL, 0, S5P_VA_CHIPID);
> @@ -327,6 +349,9 @@ static void __init smdkv310_machine_init(void)
>  	samsung_bl_set(&smdkv310_bl_gpio_info, &smdkv310_bl_data);
>  	s5p_fimd0_set_platdata(&smdkv310_lcd0_pdata);
> 
> +	s5p_tv_setup();
> +	s5p_i2c_hdmiphy_set_platdata(NULL);
> +
>  	platform_add_devices(smdkv310_devices,
> ARRAY_SIZE(smdkv310_devices));
>  	s5p_device_mfc.dev.parent = &exynos4_device_pd[PD_MFC].dev;
>  }
> --
> 1.7.2.3

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH V2 1/3] ARM: EXYNOS4: Add TVOUT support for SMDKV310
  2011-09-21 12:06   ` Kukjin Kim
@ 2011-09-21 12:44     ` Tomasz Stanislawski
  2011-09-21 13:46       ` Hatim R.V.
  0 siblings, 1 reply; 11+ messages in thread
From: Tomasz Stanislawski @ 2011-09-21 12:44 UTC (permalink / raw)
  To: linux-arm-kernel

On 09/21/2011 02:06 PM, Kukjin Kim wrote:
> Hatim Ali wrote:
>> Add support for TVOUT on SMDKV310 board.
>>
>> Signed-off-by: Hatim Ali<hatim.rv@samsung.com>
>> ---
>> Changes since V1:
>> Incorporated changes as suggested by Tomasz Stanislawski
>> - Added  GPIO settings for hot-plug detection.
>> - Added setting hdmi and mixer's parent for TV power domain.
>>
>>   arch/arm/mach-exynos4/Kconfig         |    2 ++
>>   arch/arm/mach-exynos4/mach-smdkv310.c |   25
>> +++++++++++++++++++++++++
>>   2 files changed, 27 insertions(+), 0 deletions(-)
>>
>> diff --git a/arch/arm/mach-exynos4/Kconfig b/arch/arm/mach-exynos4/Kconfig
>> index 3b594fe..0bf0fe04 100644
>> --- a/arch/arm/mach-exynos4/Kconfig
>> +++ b/arch/arm/mach-exynos4/Kconfig
>> @@ -131,6 +131,7 @@ config MACH_SMDKV310
>>   	select S3C_DEV_RTC
>>   	select S3C_DEV_WDT
>>   	select S3C_DEV_I2C1
>> +	select S5P_DEV_I2C_HDMIPHY
>>   	select S5P_DEV_MFC
>>   	select S3C_DEV_HSMMC
>>   	select S3C_DEV_HSMMC1
>> @@ -140,6 +141,7 @@ config MACH_SMDKV310
>>   	select EXYNOS4_DEV_AHCI
>>   	select SAMSUNG_DEV_KEYPAD
>>   	select EXYNOS4_DEV_PD
>> +	select S5P_DEV_TV
>>   	select SAMSUNG_DEV_PWM
>>   	select EXYNOS4_DEV_SYSMMU
>>   	select EXYNOS4_SETUP_FIMD0
>> diff --git a/arch/arm/mach-exynos4/mach-smdkv310.c b/arch/arm/mach-
>> exynos4/mach-smdkv310.c
>> index 7ce4d8b..50de270 100644
>> --- a/arch/arm/mach-exynos4/mach-smdkv310.c
>> +++ b/arch/arm/mach-exynos4/mach-smdkv310.c
>> @@ -239,6 +239,7 @@ static struct platform_device *smdkv310_devices[]
>> __initdata = {
>>   	&s3c_device_hsmmc2,
>>   	&s3c_device_hsmmc3,
>>   	&s3c_device_i2c1,
>> +	&s5p_device_i2c_hdmiphy,
>>   	&s3c_device_rtc,
>>   	&s3c_device_wdt,
>>   	&exynos4_device_ac97,
>> @@ -262,6 +263,8 @@ static struct platform_device *smdkv310_devices[]
>> __initdata = {
>>   	&smdkv310_lcd_lte480wv,
>>   	&smdkv310_smsc911x,
>>   	&exynos4_device_ahci,
>> +	&s5p_device_hdmi,
>> +	&s5p_device_mixer,
>>   };
>>
>>   static void __init smdkv310_smsc911x_init(void)
>> @@ -298,6 +301,25 @@ static struct platform_pwm_backlight_data
>> smdkv310_bl_data = {
>>   	.pwm_period_ns  = 1000,
>>   };
>>
>> +static void s5p_tv_setup(void)
>> +{
>> +	int ret;
>> +
>> +	/* direct HPD to HDMI chip */
>> +	ret = gpio_request(EXYNOS4_GPX3(7), "hpd-plug");
>> +
>> +	if (!ret) {
Maybe we should generate WARN_ON(1) here. Failure of gpio request 
indicate that
board was configued not correctly.
>> +		gpio_direction_input(EXYNOS4_GPX3(7));
>> +		s3c_gpio_cfgpin_range(EXYNOS4_GPX3(7),
>> +					1, S3C_GPIO_SFN(3));
> Why do you use 's3c_gpio_cfgpin_range()' for just one gpio pin not range...?
>
>> +	} else
>> +		pr_err("Failed to request gpio for hpd: %d\n", ret);
> According to coding style, should be added { and } around above.
>
>> +
>> +	/* setup dependencies between TV devices */
>> +	s5p_device_hdmi.dev.parent =&exynos4_device_pd[PD_TV].dev;
>> +	s5p_device_mixer.dev.parent =&exynos4_device_pd[PD_TV].dev;
>> +}
>> +
>>   static void __init smdkv310_map_io(void)
>>   {
>>   	s5p_init_io(NULL, 0, S5P_VA_CHIPID);
>> @@ -327,6 +349,9 @@ static void __init smdkv310_machine_init(void)
>>   	samsung_bl_set(&smdkv310_bl_gpio_info,&smdkv310_bl_data);
>>   	s5p_fimd0_set_platdata(&smdkv310_lcd0_pdata);
>>
>> +	s5p_tv_setup();
>> +	s5p_i2c_hdmiphy_set_platdata(NULL);
>> +
>>   	platform_add_devices(smdkv310_devices,
>> ARRAY_SIZE(smdkv310_devices));
>>   	s5p_device_mfc.dev.parent =&exynos4_device_pd[PD_MFC].dev;
>>   }
>> --
>> 1.7.2.3
> Thanks.
>
> Best regards,
> Kgene.
> --
> Kukjin Kim<kgene.kim@samsung.com>, Senior Engineer,
> SW Solution Development Team, Samsung Electronics Co., Ltd.
>
>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH V2 1/3] ARM: EXYNOS4: Add TVOUT support for SMDKV310
  2011-09-21  5:44 ` [PATCH V2 1/3] ARM: EXYNOS4: " Hatim Ali
  2011-09-21 12:06   ` Kukjin Kim
@ 2011-09-21 13:05   ` Sylwester Nawrocki
  2011-09-21 13:48     ` Hatim R.V.
  1 sibling, 1 reply; 11+ messages in thread
From: Sylwester Nawrocki @ 2011-09-21 13:05 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Hatim,

On 09/21/2011 07:44 AM, Hatim Ali wrote:
> Add support for TVOUT on SMDKV310 board.
> 
> Signed-off-by: Hatim Ali <hatim.rv@samsung.com>
> ---
...
> diff --git a/arch/arm/mach-exynos4/mach-smdkv310.c b/arch/arm/mach-exynos4/mach-smdkv310.c
> index 7ce4d8b..50de270 100644
> --- a/arch/arm/mach-exynos4/mach-smdkv310.c
> +++ b/arch/arm/mach-exynos4/mach-smdkv310.c
> @@ -239,6 +239,7 @@ static struct platform_device *smdkv310_devices[] __initdata = {
>  	&s3c_device_hsmmc2,
>  	&s3c_device_hsmmc3,
>  	&s3c_device_i2c1,
> +	&s5p_device_i2c_hdmiphy,
>  	&s3c_device_rtc,
>  	&s3c_device_wdt,
>  	&exynos4_device_ac97,
> @@ -262,6 +263,8 @@ static struct platform_device *smdkv310_devices[] __initdata = {
>  	&smdkv310_lcd_lte480wv,
>  	&smdkv310_smsc911x,
>  	&exynos4_device_ahci,
> +	&s5p_device_hdmi,
> +	&s5p_device_mixer,
>  };
>  
>  static void __init smdkv310_smsc911x_init(void)
> @@ -298,6 +301,25 @@ static struct platform_pwm_backlight_data smdkv310_bl_data = {
>  	.pwm_period_ns  = 1000,
>  };
>  
> +static void s5p_tv_setup(void)
> +{
> +	int ret;
> +
> +	/* direct HPD to HDMI chip */
> +	ret = gpio_request(EXYNOS4_GPX3(7), "hpd-plug");
> +
> +	if (!ret) {
> +		gpio_direction_input(EXYNOS4_GPX3(7));

Since you're probably going to be reworking this anyway, I think gpio_request_one
could be used here for simplicity.  

--
Regards,
Sylwester

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH V2 1/3] ARM: EXYNOS4: Add TVOUT support for SMDKV310
  2011-09-21 12:44     ` Tomasz Stanislawski
@ 2011-09-21 13:46       ` Hatim R.V.
  0 siblings, 0 replies; 11+ messages in thread
From: Hatim R.V. @ 2011-09-21 13:46 UTC (permalink / raw)
  To: linux-arm-kernel

Hello Tomasz Stanislawski,

On Wed, Sep 21, 2011 at 6:14 PM, Tomasz Stanislawski
<t.stanislaws@samsung.com> wrote:
> On 09/21/2011 02:06 PM, Kukjin Kim wrote:
>>
>> Hatim Ali wrote:
>>>
>>> Add support for TVOUT on SMDKV310 board.
>>>
>>> Signed-off-by: Hatim Ali<hatim.rv@samsung.com>
>>> ---
>>> Changes since V1:
>>> Incorporated changes as suggested by Tomasz Stanislawski
>>> - Added ?GPIO settings for hot-plug detection.
>>> - Added setting hdmi and mixer's parent for TV power domain.
>>>
>>> ?arch/arm/mach-exynos4/Kconfig ? ? ? ? | ? ?2 ++
>>> ?arch/arm/mach-exynos4/mach-smdkv310.c | ? 25
>>> +++++++++++++++++++++++++
>>> ?2 files changed, 27 insertions(+), 0 deletions(-)
>>>
>>> diff --git a/arch/arm/mach-exynos4/Kconfig
>>> b/arch/arm/mach-exynos4/Kconfig
>>> index 3b594fe..0bf0fe04 100644
>>> --- a/arch/arm/mach-exynos4/Kconfig
>>> +++ b/arch/arm/mach-exynos4/Kconfig
>>> @@ -131,6 +131,7 @@ config MACH_SMDKV310
>>> ? ? ? ?select S3C_DEV_RTC
>>> ? ? ? ?select S3C_DEV_WDT
>>> ? ? ? ?select S3C_DEV_I2C1
>>> + ? ? ? select S5P_DEV_I2C_HDMIPHY
>>> ? ? ? ?select S5P_DEV_MFC
>>> ? ? ? ?select S3C_DEV_HSMMC
>>> ? ? ? ?select S3C_DEV_HSMMC1
>>> @@ -140,6 +141,7 @@ config MACH_SMDKV310
>>> ? ? ? ?select EXYNOS4_DEV_AHCI
>>> ? ? ? ?select SAMSUNG_DEV_KEYPAD
>>> ? ? ? ?select EXYNOS4_DEV_PD
>>> + ? ? ? select S5P_DEV_TV
>>> ? ? ? ?select SAMSUNG_DEV_PWM
>>> ? ? ? ?select EXYNOS4_DEV_SYSMMU
>>> ? ? ? ?select EXYNOS4_SETUP_FIMD0
>>> diff --git a/arch/arm/mach-exynos4/mach-smdkv310.c b/arch/arm/mach-
>>> exynos4/mach-smdkv310.c
>>> index 7ce4d8b..50de270 100644
>>> --- a/arch/arm/mach-exynos4/mach-smdkv310.c
>>> +++ b/arch/arm/mach-exynos4/mach-smdkv310.c
>>> @@ -239,6 +239,7 @@ static struct platform_device *smdkv310_devices[]
>>> __initdata = {
>>> ? ? ? ?&s3c_device_hsmmc2,
>>> ? ? ? ?&s3c_device_hsmmc3,
>>> ? ? ? ?&s3c_device_i2c1,
>>> + ? ? ? &s5p_device_i2c_hdmiphy,
>>> ? ? ? ?&s3c_device_rtc,
>>> ? ? ? ?&s3c_device_wdt,
>>> ? ? ? ?&exynos4_device_ac97,
>>> @@ -262,6 +263,8 @@ static struct platform_device *smdkv310_devices[]
>>> __initdata = {
>>> ? ? ? ?&smdkv310_lcd_lte480wv,
>>> ? ? ? ?&smdkv310_smsc911x,
>>> ? ? ? ?&exynos4_device_ahci,
>>> + ? ? ? &s5p_device_hdmi,
>>> + ? ? ? &s5p_device_mixer,
>>> ?};
>>>
>>> ?static void __init smdkv310_smsc911x_init(void)
>>> @@ -298,6 +301,25 @@ static struct platform_pwm_backlight_data
>>> smdkv310_bl_data = {
>>> ? ? ? ?.pwm_period_ns ?= 1000,
>>> ?};
>>>
>>> +static void s5p_tv_setup(void)
>>> +{
>>> + ? ? ? int ret;
>>> +
>>> + ? ? ? /* direct HPD to HDMI chip */
>>> + ? ? ? ret = gpio_request(EXYNOS4_GPX3(7), "hpd-plug");
>>> +
>>> + ? ? ? if (!ret) {
>
> Maybe we should generate WARN_ON(1) here. Failure of gpio request indicate
> that
> board was configued not correctly.

Ok. will add this in my next patch.
>>>
>>> + ? ? ? ? ? ? ? gpio_direction_input(EXYNOS4_GPX3(7));
>>> + ? ? ? ? ? ? ? s3c_gpio_cfgpin_range(EXYNOS4_GPX3(7),
>>> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 1, S3C_GPIO_SFN(3));
>>
>> Why do you use 's3c_gpio_cfgpin_range()' for just one gpio pin not
>> range...?
>>
>>> + ? ? ? } else
>>> + ? ? ? ? ? ? ? pr_err("Failed to request gpio for hpd: %d\n", ret);
>>
>> According to coding style, should be added { and } around above.
>>
>>> +
>>> + ? ? ? /* setup dependencies between TV devices */
>>> + ? ? ? s5p_device_hdmi.dev.parent =&exynos4_device_pd[PD_TV].dev;
>>> + ? ? ? s5p_device_mixer.dev.parent =&exynos4_device_pd[PD_TV].dev;
>>> +}
>>> +
>>> ?static void __init smdkv310_map_io(void)
>>> ?{
>>> ? ? ? ?s5p_init_io(NULL, 0, S5P_VA_CHIPID);
>>> @@ -327,6 +349,9 @@ static void __init smdkv310_machine_init(void)
>>> ? ? ? ?samsung_bl_set(&smdkv310_bl_gpio_info,&smdkv310_bl_data);
>>> ? ? ? ?s5p_fimd0_set_platdata(&smdkv310_lcd0_pdata);
>>>
>>> + ? ? ? s5p_tv_setup();
>>> + ? ? ? s5p_i2c_hdmiphy_set_platdata(NULL);
>>> +
>>> ? ? ? ?platform_add_devices(smdkv310_devices,
>>> ARRAY_SIZE(smdkv310_devices));
>>> ? ? ? ?s5p_device_mfc.dev.parent =&exynos4_device_pd[PD_MFC].dev;
>>> ?}
>>> --
>>> 1.7.2.3
>>
>> Thanks.
>>
>> Best regards,
>> Kgene.
>> --
>> Kukjin Kim<kgene.kim@samsung.com>, 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 majordomo at vger.kernel.org
> More majordomo info at ?http://vger.kernel.org/majordomo-info.html
>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH V2 1/3] ARM: EXYNOS4: Add TVOUT support for SMDKV310
  2011-09-21 13:05   ` Sylwester Nawrocki
@ 2011-09-21 13:48     ` Hatim R.V.
  0 siblings, 0 replies; 11+ messages in thread
From: Hatim R.V. @ 2011-09-21 13:48 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Sylwester,

On Wed, Sep 21, 2011 at 6:35 PM, Sylwester Nawrocki
<s.nawrocki@samsung.com> wrote:
> Hi Hatim,
>
> On 09/21/2011 07:44 AM, Hatim Ali wrote:
>> Add support for TVOUT on SMDKV310 board.
>>
>> Signed-off-by: Hatim Ali <hatim.rv@samsung.com>
>> ---
> ...
>> diff --git a/arch/arm/mach-exynos4/mach-smdkv310.c b/arch/arm/mach-exynos4/mach-smdkv310.c
>> index 7ce4d8b..50de270 100644
>> --- a/arch/arm/mach-exynos4/mach-smdkv310.c
>> +++ b/arch/arm/mach-exynos4/mach-smdkv310.c
>> @@ -239,6 +239,7 @@ static struct platform_device *smdkv310_devices[] __initdata = {
>> ? ? ? &s3c_device_hsmmc2,
>> ? ? ? &s3c_device_hsmmc3,
>> ? ? ? &s3c_device_i2c1,
>> + ? ? &s5p_device_i2c_hdmiphy,
>> ? ? ? &s3c_device_rtc,
>> ? ? ? &s3c_device_wdt,
>> ? ? ? &exynos4_device_ac97,
>> @@ -262,6 +263,8 @@ static struct platform_device *smdkv310_devices[] __initdata = {
>> ? ? ? &smdkv310_lcd_lte480wv,
>> ? ? ? &smdkv310_smsc911x,
>> ? ? ? &exynos4_device_ahci,
>> + ? ? &s5p_device_hdmi,
>> + ? ? &s5p_device_mixer,
>> ?};
>>
>> ?static void __init smdkv310_smsc911x_init(void)
>> @@ -298,6 +301,25 @@ static struct platform_pwm_backlight_data smdkv310_bl_data = {
>> ? ? ? .pwm_period_ns ?= 1000,
>> ?};
>>
>> +static void s5p_tv_setup(void)
>> +{
>> + ? ? int ret;
>> +
>> + ? ? /* direct HPD to HDMI chip */
>> + ? ? ret = gpio_request(EXYNOS4_GPX3(7), "hpd-plug");
>> +
>> + ? ? if (!ret) {
>> + ? ? ? ? ? ? gpio_direction_input(EXYNOS4_GPX3(7));
>
> Since you're probably going to be reworking this anyway, I think gpio_request_one
> could be used here for simplicity.

Thanks for your suggestion. Will change accordingly.


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

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2011-09-21 13:48 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-21  5:44 [PATCH V2 0/3] Add TVOUT support for SMDKV310 Hatim Ali
2011-09-21  5:44 ` [PATCH V2 1/3] ARM: EXYNOS4: " Hatim Ali
2011-09-21 12:06   ` Kukjin Kim
2011-09-21 12:44     ` Tomasz Stanislawski
2011-09-21 13:46       ` Hatim R.V.
2011-09-21 13:05   ` Sylwester Nawrocki
2011-09-21 13:48     ` Hatim R.V.
2011-09-21  5:44 ` [RESEND PATCH 2/3] ARM: EXYNOS4: Update consistent DMA size to 8MB Hatim Ali
2011-09-21  6:25   ` Kyungmin Park
2011-09-21 11:57   ` Kukjin Kim
2011-09-21  5:44 ` [RESEND PATCH 3/3] s5p-tv: Add PM_RUNTIME dependency Hatim Ali

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).