* [PATCH 0/2] ARM: SAMSUNG: Add platform data support for s5p-tv driver
@ 2012-04-05 8:24 Tushar Behera
2012-04-05 8:24 ` [PATCH 1/2] ARM: SAMSUNG: Add API to set platform data " Tushar Behera
2012-04-05 8:24 ` [PATCH 2/2] ARM: EXYNOS: Set HDMI platform data in Origen board Tushar Behera
0 siblings, 2 replies; 7+ messages in thread
From: Tushar Behera @ 2012-04-05 8:24 UTC (permalink / raw)
To: linux-samsung-soc; +Cc: kgene.kim, t.stanislaws, patches
s5p-tv driver in 3.4-rc1 makes device platform data mandatory. This patchset
adds the related platform data in plat-samsung.
Tushar Behera (2):
ARM: SAMSUNG: Add API to set platform data for s5p-tv driver
ARM: EXYNOS: Set HDMI platform data in Origen board
arch/arm/mach-exynos/mach-origen.c | 7 +++++++
arch/arm/plat-samsung/devs.c | 25 +++++++++++++++++++++++++
arch/arm/plat-samsung/include/plat/hdmi.h | 16 ++++++++++++++++
3 files changed, 48 insertions(+), 0 deletions(-)
create mode 100644 arch/arm/plat-samsung/include/plat/hdmi.h
--
1.7.4.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/2] ARM: SAMSUNG: Add API to set platform data for s5p-tv driver
2012-04-05 8:24 [PATCH 0/2] ARM: SAMSUNG: Add platform data support for s5p-tv driver Tushar Behera
@ 2012-04-05 8:24 ` Tushar Behera
2012-04-05 9:26 ` Tomasz Stanislawski
2012-04-05 8:24 ` [PATCH 2/2] ARM: EXYNOS: Set HDMI platform data in Origen board Tushar Behera
1 sibling, 1 reply; 7+ messages in thread
From: Tushar Behera @ 2012-04-05 8:24 UTC (permalink / raw)
To: linux-samsung-soc; +Cc: kgene.kim, t.stanislaws, patches
Commit 350f2f4dad64 ("[media] v4l: s5p-tv: hdmi: add support for
platform data") makes the presence of platform data mandatory for s5p-tv
driver. Adding an API to plat-samsung for this purpose.
Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
---
arch/arm/plat-samsung/devs.c | 25 +++++++++++++++++++++++++
arch/arm/plat-samsung/include/plat/hdmi.h | 16 ++++++++++++++++
2 files changed, 41 insertions(+), 0 deletions(-)
create mode 100644 arch/arm/plat-samsung/include/plat/hdmi.h
diff --git a/arch/arm/plat-samsung/devs.c b/arch/arm/plat-samsung/devs.c
index 8b928f9..0ac3884 100644
--- a/arch/arm/plat-samsung/devs.c
+++ b/arch/arm/plat-samsung/devs.c
@@ -31,6 +31,8 @@
#include <linux/ioport.h>
#include <linux/platform_data/s3c-hsudc.h>
+#include <media/s5p_hdmi.h>
+
#include <asm/irq.h>
#include <asm/pmu.h>
#include <asm/mach/arch.h>
@@ -770,6 +772,29 @@ void __init s5p_i2c_hdmiphy_set_platdata(struct s3c2410_platform_i2c *pd)
npd = s3c_set_platdata(pd, sizeof(struct s3c2410_platform_i2c),
&s5p_device_i2c_hdmiphy);
}
+
+struct s5p_hdmi_platform_data s5p_hdmi_def_platdata;
+
+void __init s5p_hdmi_set_platdata(struct i2c_board_info *hdmiphy_info,
+ struct i2c_board_info *mhl_info, int mhl_bus)
+{
+ struct s5p_hdmi_platform_data *pd = &s5p_hdmi_def_platdata;
+
+ if (soc_is_exynos4210())
+ pd->hdmiphy_bus = 8;
+ else if (soc_is_s5pv210())
+ pd->hdmiphy_bus = 3;
+ else
+ pd->hdmiphy_bus = 0;
+
+ pd->hdmiphy_info = hdmiphy_info;
+ pd->mhl_info = mhl_info;
+ pd->mhl_bus = mhl_bus;
+
+ s3c_set_platdata(pd, sizeof(struct s5p_hdmi_platform_data),
+ &s5p_device_hdmi);
+}
+
#endif /* CONFIG_S5P_DEV_I2C_HDMIPHY */
/* I2S */
diff --git a/arch/arm/plat-samsung/include/plat/hdmi.h b/arch/arm/plat-samsung/include/plat/hdmi.h
new file mode 100644
index 0000000..5dc7347
--- /dev/null
+++ b/arch/arm/plat-samsung/include/plat/hdmi.h
@@ -0,0 +1,16 @@
+/*
+ * Copyright (C) 2012 Samsung Electronics Co.Ltd
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ */
+
+#ifndef __PLAT_SAMSUNG_HDMI_H
+#define __PLAT_SAMSUNG_HDMI_H __FILE__
+
+extern void s5p_hdmi_set_platdata(struct i2c_board_info *hdmiphy_info,
+ struct i2c_board_info *mhl_info, int mhl_bus);
+
+#endif /* __PLAT_SAMSUNG_HDMI_H */
--
1.7.4.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/2] ARM: EXYNOS: Set HDMI platform data in Origen board
2012-04-05 8:24 [PATCH 0/2] ARM: SAMSUNG: Add platform data support for s5p-tv driver Tushar Behera
2012-04-05 8:24 ` [PATCH 1/2] ARM: SAMSUNG: Add API to set platform data " Tushar Behera
@ 2012-04-05 8:24 ` Tushar Behera
2012-04-05 9:37 ` Tomasz Stanislawski
1 sibling, 1 reply; 7+ messages in thread
From: Tushar Behera @ 2012-04-05 8:24 UTC (permalink / raw)
To: linux-samsung-soc; +Cc: kgene.kim, t.stanislaws, patches
Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
---
arch/arm/mach-exynos/mach-origen.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-exynos/mach-origen.c b/arch/arm/mach-exynos/mach-origen.c
index 878d4c9..ac6f78f 100644
--- a/arch/arm/mach-exynos/mach-origen.c
+++ b/arch/arm/mach-exynos/mach-origen.c
@@ -41,6 +41,7 @@
#include <plat/pd.h>
#include <plat/fb.h>
#include <plat/mfc.h>
+#include <plat/hdmi.h>
#include <mach/ohci.h>
#include <mach/map.h>
@@ -671,6 +672,11 @@ static void __init origen_bt_setup(void)
s3c_gpio_setpull(EXYNOS4_GPX2(2), S3C_GPIO_PULL_NONE);
}
+/* I2C module and id for HDMIPHY */
+static struct i2c_board_info hdmiphy_info = {
+ I2C_BOARD_INFO("hdmiphy", 0x38),
+};
+
static void s5p_tv_setup(void)
{
/* Direct HPD to HDMI chip */
@@ -718,6 +724,7 @@ static void __init origen_machine_init(void)
s5p_tv_setup();
s5p_i2c_hdmiphy_set_platdata(NULL);
+ s5p_hdmi_set_platdata(&hdmiphy_info, NULL, 0);
s5p_fimd0_set_platdata(&origen_lcd_pdata);
--
1.7.4.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] ARM: SAMSUNG: Add API to set platform data for s5p-tv driver
2012-04-05 8:24 ` [PATCH 1/2] ARM: SAMSUNG: Add API to set platform data " Tushar Behera
@ 2012-04-05 9:26 ` Tomasz Stanislawski
2012-04-05 13:13 ` Tushar Behera
0 siblings, 1 reply; 7+ messages in thread
From: Tomasz Stanislawski @ 2012-04-05 9:26 UTC (permalink / raw)
To: Tushar Behera; +Cc: linux-samsung-soc, kgene.kim, patches
Hi Tushbar Behera,
On 04/05/2012 10:24 AM, Tushar Behera wrote:
> Commit 350f2f4dad64 ("[media] v4l: s5p-tv: hdmi: add support for
> platform data") makes the presence of platform data mandatory for s5p-tv
> driver. Adding an API to plat-samsung for this purpose.
>
> Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
> ---
> arch/arm/plat-samsung/devs.c | 25 +++++++++++++++++++++++++
> arch/arm/plat-samsung/include/plat/hdmi.h | 16 ++++++++++++++++
> 2 files changed, 41 insertions(+), 0 deletions(-)
> create mode 100644 arch/arm/plat-samsung/include/plat/hdmi.h
>
> diff --git a/arch/arm/plat-samsung/devs.c b/arch/arm/plat-samsung/devs.c
> index 8b928f9..0ac3884 100644
> --- a/arch/arm/plat-samsung/devs.c
> +++ b/arch/arm/plat-samsung/devs.c
> @@ -31,6 +31,8 @@
> #include <linux/ioport.h>
> #include <linux/platform_data/s3c-hsudc.h>
>
> +#include <media/s5p_hdmi.h>
> +
> #include <asm/irq.h>
> #include <asm/pmu.h>
> #include <asm/mach/arch.h>
> @@ -770,6 +772,29 @@ void __init s5p_i2c_hdmiphy_set_platdata(struct s3c2410_platform_i2c *pd)
> npd = s3c_set_platdata(pd, sizeof(struct s3c2410_platform_i2c),
> &s5p_device_i2c_hdmiphy);
> }
> +
> +struct s5p_hdmi_platform_data s5p_hdmi_def_platdata;
> +
> +void __init s5p_hdmi_set_platdata(struct i2c_board_info *hdmiphy_info,
> + struct i2c_board_info *mhl_info, int mhl_bus)
> +{
> + struct s5p_hdmi_platform_data *pd = &s5p_hdmi_def_platdata;
> +
> + if (soc_is_exynos4210())
> + pd->hdmiphy_bus = 8;
I found that hdmiphy is installed on 8th controller on all probably all
chips from Exynos4*1* family not only 4210. It should be reflected here.
> + else if (soc_is_s5pv210())
> + pd->hdmiphy_bus = 3;
> + else
> + pd->hdmiphy_bus = 0;
> +
> + pd->hdmiphy_info = hdmiphy_info;
> + pd->mhl_info = mhl_info;
> + pd->mhl_bus = mhl_bus;
> +
> + s3c_set_platdata(pd, sizeof(struct s5p_hdmi_platform_data),
> + &s5p_device_hdmi);
> +}
> +
> #endif /* CONFIG_S5P_DEV_I2C_HDMIPHY */
>
> /* I2S */
> diff --git a/arch/arm/plat-samsung/include/plat/hdmi.h b/arch/arm/plat-samsung/include/plat/hdmi.h
> new file mode 100644
> index 0000000..5dc7347
> --- /dev/null
> +++ b/arch/arm/plat-samsung/include/plat/hdmi.h
> @@ -0,0 +1,16 @@
> +/*
> + * Copyright (C) 2012 Samsung Electronics Co.Ltd
> + *
> + * This program is free software; you can redistribute it and/or modify it
> + * under the terms of the GNU General Public License as published by the
> + * Free Software Foundation; either version 2 of the License, or (at your
> + * option) any later version.
> + */
> +
> +#ifndef __PLAT_SAMSUNG_HDMI_H
> +#define __PLAT_SAMSUNG_HDMI_H __FILE__
> +
> +extern void s5p_hdmi_set_platdata(struct i2c_board_info *hdmiphy_info,
> + struct i2c_board_info *mhl_info, int mhl_bus);
> +
> +#endif /* __PLAT_SAMSUNG_HDMI_H */
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] ARM: EXYNOS: Set HDMI platform data in Origen board
2012-04-05 8:24 ` [PATCH 2/2] ARM: EXYNOS: Set HDMI platform data in Origen board Tushar Behera
@ 2012-04-05 9:37 ` Tomasz Stanislawski
2012-04-05 13:11 ` Tushar Behera
0 siblings, 1 reply; 7+ messages in thread
From: Tomasz Stanislawski @ 2012-04-05 9:37 UTC (permalink / raw)
To: Tushar Behera; +Cc: linux-samsung-soc, kgene.kim, patches
Hi Tushar Behera,
On 04/05/2012 10:24 AM, Tushar Behera wrote:
> Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
> ---
> arch/arm/mach-exynos/mach-origen.c | 7 +++++++
> 1 files changed, 7 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-exynos/mach-origen.c b/arch/arm/mach-exynos/mach-origen.c
> index 878d4c9..ac6f78f 100644
> --- a/arch/arm/mach-exynos/mach-origen.c
> +++ b/arch/arm/mach-exynos/mach-origen.c
> @@ -41,6 +41,7 @@
> #include <plat/pd.h>
> #include <plat/fb.h>
> #include <plat/mfc.h>
> +#include <plat/hdmi.h>
>
> #include <mach/ohci.h>
> #include <mach/map.h>
> @@ -671,6 +672,11 @@ static void __init origen_bt_setup(void)
> s3c_gpio_setpull(EXYNOS4_GPX2(2), S3C_GPIO_PULL_NONE);
> }
>
> +/* I2C module and id for HDMIPHY */
> +static struct i2c_board_info hdmiphy_info = {
> + I2C_BOARD_INFO("hdmiphy", 0x38),
I warn you :) that the s5p-hdmiphy driver is going to use driver variant
to handle per-platform setup arrays for HDMIPHY. Refer to patch
http://thread.gmane.org/gmane.linux.drivers.video-input-infrastructure/45756/focus=45757
If the mentioned patch gets merged into the mainline then the support
for HDMI will be broken on your machine.
Regards,
Tomasz Stanislawski
> +};
> +
> static void s5p_tv_setup(void)
> {
> /* Direct HPD to HDMI chip */
> @@ -718,6 +724,7 @@ static void __init origen_machine_init(void)
>
> s5p_tv_setup();
> s5p_i2c_hdmiphy_set_platdata(NULL);
> + s5p_hdmi_set_platdata(&hdmiphy_info, NULL, 0);
>
> s5p_fimd0_set_platdata(&origen_lcd_pdata);
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] ARM: EXYNOS: Set HDMI platform data in Origen board
2012-04-05 9:37 ` Tomasz Stanislawski
@ 2012-04-05 13:11 ` Tushar Behera
0 siblings, 0 replies; 7+ messages in thread
From: Tushar Behera @ 2012-04-05 13:11 UTC (permalink / raw)
To: Tomasz Stanislawski; +Cc: linux-samsung-soc, kgene.kim, patches
On 04/05/2012 03:07 PM, Tomasz Stanislawski wrote:
> Hi Tushar Behera,
>
> On 04/05/2012 10:24 AM, Tushar Behera wrote:
>> Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
>> ---
>> arch/arm/mach-exynos/mach-origen.c | 7 +++++++
>> 1 files changed, 7 insertions(+), 0 deletions(-)
>>
>> diff --git a/arch/arm/mach-exynos/mach-origen.c b/arch/arm/mach-exynos/mach-origen.c
>> index 878d4c9..ac6f78f 100644
>> --- a/arch/arm/mach-exynos/mach-origen.c
>> +++ b/arch/arm/mach-exynos/mach-origen.c
>> @@ -41,6 +41,7 @@
>> #include <plat/pd.h>
>> #include <plat/fb.h>
>> #include <plat/mfc.h>
>> +#include <plat/hdmi.h>
>>
>> #include <mach/ohci.h>
>> #include <mach/map.h>
>> @@ -671,6 +672,11 @@ static void __init origen_bt_setup(void)
>> s3c_gpio_setpull(EXYNOS4_GPX2(2), S3C_GPIO_PULL_NONE);
>> }
>>
>> +/* I2C module and id for HDMIPHY */
>> +static struct i2c_board_info hdmiphy_info = {
>> + I2C_BOARD_INFO("hdmiphy", 0x38),
>
> I warn you :) that the s5p-hdmiphy driver is going to use driver variant
> to handle per-platform setup arrays for HDMIPHY. Refer to patch
>
> http://thread.gmane.org/gmane.linux.drivers.video-input-infrastructure/45756/focus=45757
>
> If the mentioned patch gets merged into the mainline then the support
> for HDMI will be broken on your machine.
>
Please correct me if I am wrong.
Above patch doesn't remove the usage of platform data, it is still
mandatory to pass platform data from board file. Hence I need to pass a
valid platform data structure to the driver.
With your current patch, won't it just ignore the hdmiphy_info passed
through the platform data and use driver variant to handle per-platform
setup arrays for HDMIPHY.
The reason I am worried is that the support for s5p-tv as such is broken
now because of mandatory usage of platform data. Had it not been the
case, the need for my patch won't have arised. :(
Nevertheless, what do you think is the best solution right now?
--
Tushar Behera
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] ARM: SAMSUNG: Add API to set platform data for s5p-tv driver
2012-04-05 9:26 ` Tomasz Stanislawski
@ 2012-04-05 13:13 ` Tushar Behera
0 siblings, 0 replies; 7+ messages in thread
From: Tushar Behera @ 2012-04-05 13:13 UTC (permalink / raw)
To: Tomasz Stanislawski; +Cc: linux-samsung-soc, kgene.kim, patches
On 04/05/2012 02:56 PM, Tomasz Stanislawski wrote:
> Hi Tushbar Behera,
>
> On 04/05/2012 10:24 AM, Tushar Behera wrote:
>> Commit 350f2f4dad64 ("[media] v4l: s5p-tv: hdmi: add support for
>> platform data") makes the presence of platform data mandatory for s5p-tv
>> driver. Adding an API to plat-samsung for this purpose.
>>
>> Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
>> ---
>> arch/arm/plat-samsung/devs.c | 25 +++++++++++++++++++++++++
>> arch/arm/plat-samsung/include/plat/hdmi.h | 16 ++++++++++++++++
>> 2 files changed, 41 insertions(+), 0 deletions(-)
>> create mode 100644 arch/arm/plat-samsung/include/plat/hdmi.h
>>
>> diff --git a/arch/arm/plat-samsung/devs.c b/arch/arm/plat-samsung/devs.c
>> index 8b928f9..0ac3884 100644
>> --- a/arch/arm/plat-samsung/devs.c
>> +++ b/arch/arm/plat-samsung/devs.c
>> @@ -31,6 +31,8 @@
>> #include <linux/ioport.h>
>> #include <linux/platform_data/s3c-hsudc.h>
>>
>> +#include <media/s5p_hdmi.h>
>> +
>> #include <asm/irq.h>
>> #include <asm/pmu.h>
>> #include <asm/mach/arch.h>
>> @@ -770,6 +772,29 @@ void __init s5p_i2c_hdmiphy_set_platdata(struct s3c2410_platform_i2c *pd)
>> npd = s3c_set_platdata(pd, sizeof(struct s3c2410_platform_i2c),
>> &s5p_device_i2c_hdmiphy);
>> }
>> +
>> +struct s5p_hdmi_platform_data s5p_hdmi_def_platdata;
>> +
>> +void __init s5p_hdmi_set_platdata(struct i2c_board_info *hdmiphy_info,
>> + struct i2c_board_info *mhl_info, int mhl_bus)
>> +{
>> + struct s5p_hdmi_platform_data *pd = &s5p_hdmi_def_platdata;
>> +
>> + if (soc_is_exynos4210())
>> + pd->hdmiphy_bus = 8;
>
> I found that hdmiphy is installed on 8th controller on all probably all
> chips from Exynos4*1* family not only 4210. It should be reflected here.
>
Thanks for pointing out ... I will update for other variants also.
>> + else if (soc_is_s5pv210())
>> + pd->hdmiphy_bus = 3;
>> + else
>> + pd->hdmiphy_bus = 0;
>> +
>> + pd->hdmiphy_info = hdmiphy_info;
>> + pd->mhl_info = mhl_info;
>> + pd->mhl_bus = mhl_bus;
>> +
>> + s3c_set_platdata(pd, sizeof(struct s5p_hdmi_platform_data),
>> + &s5p_device_hdmi);
>> +}
>> +
>> #endif /* CONFIG_S5P_DEV_I2C_HDMIPHY */
>>
>> /* I2S */
>> diff --git a/arch/arm/plat-samsung/include/plat/hdmi.h b/arch/arm/plat-samsung/include/plat/hdmi.h
>> new file mode 100644
>> index 0000000..5dc7347
>> --- /dev/null
>> +++ b/arch/arm/plat-samsung/include/plat/hdmi.h
>> @@ -0,0 +1,16 @@
>> +/*
>> + * Copyright (C) 2012 Samsung Electronics Co.Ltd
>> + *
>> + * This program is free software; you can redistribute it and/or modify it
>> + * under the terms of the GNU General Public License as published by the
>> + * Free Software Foundation; either version 2 of the License, or (at your
>> + * option) any later version.
>> + */
>> +
>> +#ifndef __PLAT_SAMSUNG_HDMI_H
>> +#define __PLAT_SAMSUNG_HDMI_H __FILE__
>> +
>> +extern void s5p_hdmi_set_platdata(struct i2c_board_info *hdmiphy_info,
>> + struct i2c_board_info *mhl_info, int mhl_bus);
>> +
>> +#endif /* __PLAT_SAMSUNG_HDMI_H */
>
--
Tushar Behera
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-04-05 13:13 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-05 8:24 [PATCH 0/2] ARM: SAMSUNG: Add platform data support for s5p-tv driver Tushar Behera
2012-04-05 8:24 ` [PATCH 1/2] ARM: SAMSUNG: Add API to set platform data " Tushar Behera
2012-04-05 9:26 ` Tomasz Stanislawski
2012-04-05 13:13 ` Tushar Behera
2012-04-05 8:24 ` [PATCH 2/2] ARM: EXYNOS: Set HDMI platform data in Origen board Tushar Behera
2012-04-05 9:37 ` Tomasz Stanislawski
2012-04-05 13:11 ` Tushar Behera
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.