diff mbox

[05/17] pwm: samsung: remove s5p64x0 related pwm codes

Message ID 1404163947-3105-6-git-send-email-kgene.kim@samsung.com (mailing list archive)
State New, archived
Headers show

Commit Message

Kim Kukjin June 30, 2014, 9:32 p.m. UTC
This patch removes supporting s5p64x0 related pwm codes because of
no more support for S5P6440 and S5P6450 SoCs. And this patch changes
the name of s5p6440-pwm to exynos-pwm instead.

Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Cc: Thierry Reding <thierry.reding@gmail.com>
---
 Documentation/devicetree/bindings/pwm/pwm-samsung.txt |    1 -
 arch/arm/boot/dts/exynos4210-universal_c210.dts       |    2 +-
 drivers/clocksource/samsung_pwm_timer.c               |   13 -------------
 drivers/pwm/pwm-samsung.c                             |    5 ++---
 4 files changed, 3 insertions(+), 18 deletions(-)

Comments

Tomasz Figa July 4, 2014, 8:10 a.m. UTC | #1
Hi Kukjin,

On 30.06.2014 23:32, Kukjin Kim wrote:
> This patch removes supporting s5p64x0 related pwm codes because of
> no more support for S5P6440 and S5P6450 SoCs. And this patch changes
> the name of s5p6440-pwm to exynos-pwm instead.
> 
> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
> Cc: Thierry Reding <thierry.reding@gmail.com>
> ---
>  Documentation/devicetree/bindings/pwm/pwm-samsung.txt |    1 -
>  arch/arm/boot/dts/exynos4210-universal_c210.dts       |    2 +-
>  drivers/clocksource/samsung_pwm_timer.c               |   13 -------------
>  drivers/pwm/pwm-samsung.c                             |    5 ++---
>  4 files changed, 3 insertions(+), 18 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/pwm/pwm-samsung.txt b/Documentation/devicetree/bindings/pwm/pwm-samsung.txt
> index 5538de9..43925d3 100644
> --- a/Documentation/devicetree/bindings/pwm/pwm-samsung.txt
> +++ b/Documentation/devicetree/bindings/pwm/pwm-samsung.txt
> @@ -11,7 +11,6 @@ Required properties:
>  - compatible : should be one of following:
>      samsung,s3c2410-pwm - for 16-bit timers present on S3C24xx SoCs
>      samsung,s3c6400-pwm - for 32-bit timers present on S3C64xx SoCs
> -    samsung,s5p6440-pwm - for 32-bit timers present on S5P64x0 SoCs
>      samsung,s5pc100-pwm - for 32-bit timers present on S5PC100, S5PV210,
>  			  Exynos4210 rev0 SoCs
>      samsung,exynos4210-pwm - for 32-bit timers present on Exynos4210,
> diff --git a/arch/arm/boot/dts/exynos4210-universal_c210.dts b/arch/arm/boot/dts/exynos4210-universal_c210.dts
> index d50eb3a..0ca26e0 100644
> --- a/arch/arm/boot/dts/exynos4210-universal_c210.dts
> +++ b/arch/arm/boot/dts/exynos4210-universal_c210.dts
> @@ -461,7 +461,7 @@
>  	};
>  
>  	pwm@139D0000 {
> -		compatible = "samsung,s5p6440-pwm";
> +		compatible = "samsung,exynos4210-pwm";

There is a reason to use a different compatible string for Exynos4210
rev0. The PWM block is used as a timer there, while on newer revs MCT is
used. Sorry, but I have to NAK this patch.

As I explained in my reply to patch 11/17, I'd suggest keeping the PWM
drivers as is, because there is no need to remove support for DT
compatible strings.

Best regards,
Tomasz
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Kim Kukjin July 7, 2014, 10:23 p.m. UTC | #2
On 07/04/14 17:10, Tomasz Figa wrote:
> Hi Kukjin,
>
Tomasz,

> On 30.06.2014 23:32, Kukjin Kim wrote:
>> This patch removes supporting s5p64x0 related pwm codes because of
>> no more support for S5P6440 and S5P6450 SoCs. And this patch changes
>> the name of s5p6440-pwm to exynos-pwm instead.
>>
>> Signed-off-by: Kukjin Kim<kgene.kim@samsung.com>
>> Cc: Thierry Reding<thierry.reding@gmail.com>
>> ---
>>   Documentation/devicetree/bindings/pwm/pwm-samsung.txt |    1 -
>>   arch/arm/boot/dts/exynos4210-universal_c210.dts       |    2 +-
>>   drivers/clocksource/samsung_pwm_timer.c               |   13 -------------
>>   drivers/pwm/pwm-samsung.c                             |    5 ++---
>>   4 files changed, 3 insertions(+), 18 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/pwm/pwm-samsung.txt b/Documentation/devicetree/bindings/pwm/pwm-samsung.txt
>> index 5538de9..43925d3 100644
>> --- a/Documentation/devicetree/bindings/pwm/pwm-samsung.txt
>> +++ b/Documentation/devicetree/bindings/pwm/pwm-samsung.txt
>> @@ -11,7 +11,6 @@ Required properties:
>>   - compatible : should be one of following:
>>       samsung,s3c2410-pwm - for 16-bit timers present on S3C24xx SoCs
>>       samsung,s3c6400-pwm - for 32-bit timers present on S3C64xx SoCs
>> -    samsung,s5p6440-pwm - for 32-bit timers present on S5P64x0 SoCs
>>       samsung,s5pc100-pwm - for 32-bit timers present on S5PC100, S5PV210,
>>   			  Exynos4210 rev0 SoCs
>>       samsung,exynos4210-pwm - for 32-bit timers present on Exynos4210,
>> diff --git a/arch/arm/boot/dts/exynos4210-universal_c210.dts b/arch/arm/boot/dts/exynos4210-universal_c210.dts
>> index d50eb3a..0ca26e0 100644
>> --- a/arch/arm/boot/dts/exynos4210-universal_c210.dts
>> +++ b/arch/arm/boot/dts/exynos4210-universal_c210.dts
>> @@ -461,7 +461,7 @@
>>   	};
>>
>>   	pwm@139D0000 {
>> -		compatible = "samsung,s5p6440-pwm";
>> +		compatible = "samsung,exynos4210-pwm";
>
> There is a reason to use a different compatible string for Exynos4210
> rev0. The PWM block is used as a timer there, while on newer revs MCT is
> used. Sorry, but I have to NAK this patch.
>
I remember why exynos4210-universal_c210 uses PWM...OK.

> As I explained in my reply to patch 11/17, I'd suggest keeping the PWM
> drivers as is, because there is no need to remove support for DT
> compatible strings.
>
OK, let me remove pwm related patches in this series but I think need to 
update the compatible strings, at least remove non-support SoC in doc?...

Thanks,
Kukjin
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Tomasz Figa July 8, 2014, 3:43 p.m. UTC | #3
Kukjin,

On 08.07.2014 00:23, Kukjin Kim wrote:
> On 07/04/14 17:10, Tomasz Figa wrote:
>> Hi Kukjin,
>>
> Tomasz,
> 
>> On 30.06.2014 23:32, Kukjin Kim wrote:
>>> This patch removes supporting s5p64x0 related pwm codes because of
>>> no more support for S5P6440 and S5P6450 SoCs. And this patch changes
>>> the name of s5p6440-pwm to exynos-pwm instead.
>>>
>>> Signed-off-by: Kukjin Kim<kgene.kim@samsung.com>
>>> Cc: Thierry Reding<thierry.reding@gmail.com>
>>> ---
>>>   Documentation/devicetree/bindings/pwm/pwm-samsung.txt |    1 -
>>>   arch/arm/boot/dts/exynos4210-universal_c210.dts       |    2 +-
>>>   drivers/clocksource/samsung_pwm_timer.c               |   13 -------------
>>>   drivers/pwm/pwm-samsung.c                             |    5 ++---
>>>   4 files changed, 3 insertions(+), 18 deletions(-)
>>>
>>> diff --git a/Documentation/devicetree/bindings/pwm/pwm-samsung.txt b/Documentation/devicetree/bindings/pwm/pwm-samsung.txt
>>> index 5538de9..43925d3 100644
>>> --- a/Documentation/devicetree/bindings/pwm/pwm-samsung.txt
>>> +++ b/Documentation/devicetree/bindings/pwm/pwm-samsung.txt
>>> @@ -11,7 +11,6 @@ Required properties:
>>>   - compatible : should be one of following:
>>>       samsung,s3c2410-pwm - for 16-bit timers present on S3C24xx SoCs
>>>       samsung,s3c6400-pwm - for 32-bit timers present on S3C64xx SoCs
>>> -    samsung,s5p6440-pwm - for 32-bit timers present on S5P64x0 SoCs
>>>       samsung,s5pc100-pwm - for 32-bit timers present on S5PC100, S5PV210,
>>>   			  Exynos4210 rev0 SoCs
>>>       samsung,exynos4210-pwm - for 32-bit timers present on Exynos4210,
>>> diff --git a/arch/arm/boot/dts/exynos4210-universal_c210.dts b/arch/arm/boot/dts/exynos4210-universal_c210.dts
>>> index d50eb3a..0ca26e0 100644
>>> --- a/arch/arm/boot/dts/exynos4210-universal_c210.dts
>>> +++ b/arch/arm/boot/dts/exynos4210-universal_c210.dts
>>> @@ -461,7 +461,7 @@
>>>   	};
>>>
>>>   	pwm@139D0000 {
>>> -		compatible = "samsung,s5p6440-pwm";
>>> +		compatible = "samsung,exynos4210-pwm";
>>
>> There is a reason to use a different compatible string for Exynos4210
>> rev0. The PWM block is used as a timer there, while on newer revs MCT is
>> used. Sorry, but I have to NAK this patch.
>>
> I remember why exynos4210-universal_c210 uses PWM...OK.
> 
>> As I explained in my reply to patch 11/17, I'd suggest keeping the PWM
>> drivers as is, because there is no need to remove support for DT
>> compatible strings.
>>
> OK, let me remove pwm related patches in this series but I think need to 
> update the compatible strings, at least remove non-support SoC in doc?...

Device tree bindings are defined according to the first SoC in which
given hardware variant appeared and since they are stable, they should
stay as is. I don't think it will have any negative effects on
maintenance costs and it doesn't imply that the SoC is still supported.

(Anyway, with DT you can boot virtually any SoC, without the kernel
being aware of it, as long as it supports all the necessary IP blocks.)

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

Patch

diff --git a/Documentation/devicetree/bindings/pwm/pwm-samsung.txt b/Documentation/devicetree/bindings/pwm/pwm-samsung.txt
index 5538de9..43925d3 100644
--- a/Documentation/devicetree/bindings/pwm/pwm-samsung.txt
+++ b/Documentation/devicetree/bindings/pwm/pwm-samsung.txt
@@ -11,7 +11,6 @@  Required properties:
 - compatible : should be one of following:
     samsung,s3c2410-pwm - for 16-bit timers present on S3C24xx SoCs
     samsung,s3c6400-pwm - for 32-bit timers present on S3C64xx SoCs
-    samsung,s5p6440-pwm - for 32-bit timers present on S5P64x0 SoCs
     samsung,s5pc100-pwm - for 32-bit timers present on S5PC100, S5PV210,
 			  Exynos4210 rev0 SoCs
     samsung,exynos4210-pwm - for 32-bit timers present on Exynos4210,
diff --git a/arch/arm/boot/dts/exynos4210-universal_c210.dts b/arch/arm/boot/dts/exynos4210-universal_c210.dts
index d50eb3a..0ca26e0 100644
--- a/arch/arm/boot/dts/exynos4210-universal_c210.dts
+++ b/arch/arm/boot/dts/exynos4210-universal_c210.dts
@@ -461,7 +461,7 @@ 
 	};
 
 	pwm@139D0000 {
-		compatible = "samsung,s5p6440-pwm";
+		compatible = "samsung,exynos4210-pwm";
 		status = "okay";
 	};
 
diff --git a/drivers/clocksource/samsung_pwm_timer.c b/drivers/clocksource/samsung_pwm_timer.c
index 5645cfc..e35a9b7 100644
--- a/drivers/clocksource/samsung_pwm_timer.c
+++ b/drivers/clocksource/samsung_pwm_timer.c
@@ -480,19 +480,6 @@  static void __init s3c64xx_pwm_clocksource_init(struct device_node *np)
 }
 CLOCKSOURCE_OF_DECLARE(s3c6400_pwm, "samsung,s3c6400-pwm", s3c64xx_pwm_clocksource_init);
 
-static const struct samsung_pwm_variant s5p64x0_variant = {
-	.bits		= 32,
-	.div_base	= 0,
-	.has_tint_cstat	= true,
-	.tclk_mask	= 0,
-};
-
-static void __init s5p64x0_pwm_clocksource_init(struct device_node *np)
-{
-	samsung_pwm_alloc(np, &s5p64x0_variant);
-}
-CLOCKSOURCE_OF_DECLARE(s5p6440_pwm, "samsung,s5p6440-pwm", s5p64x0_pwm_clocksource_init);
-
 static const struct samsung_pwm_variant s5p_variant = {
 	.bits		= 32,
 	.div_base	= 0,
diff --git a/drivers/pwm/pwm-samsung.c b/drivers/pwm/pwm-samsung.c
index ba6b650..68f3471 100644
--- a/drivers/pwm/pwm-samsung.c
+++ b/drivers/pwm/pwm-samsung.c
@@ -404,7 +404,7 @@  static const struct samsung_pwm_variant s3c64xx_variant = {
 	.tclk_mask	= BIT(7) | BIT(6) | BIT(5),
 };
 
-static const struct samsung_pwm_variant s5p64x0_variant = {
+static const struct samsung_pwm_variant exynos4210_variant = {
 	.bits		= 32,
 	.div_base	= 0,
 	.has_tint_cstat	= true,
@@ -421,9 +421,8 @@  static const struct samsung_pwm_variant s5pc100_variant = {
 static const struct of_device_id samsung_pwm_matches[] = {
 	{ .compatible = "samsung,s3c2410-pwm", .data = &s3c24xx_variant },
 	{ .compatible = "samsung,s3c6400-pwm", .data = &s3c64xx_variant },
-	{ .compatible = "samsung,s5p6440-pwm", .data = &s5p64x0_variant },
 	{ .compatible = "samsung,s5pc100-pwm", .data = &s5pc100_variant },
-	{ .compatible = "samsung,exynos4210-pwm", .data = &s5p64x0_variant },
+	{ .compatible = "samsung,exynos4210-pwm", .data = &exynos4210_variant },
 	{},
 };