All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ARM: S3C2443: SPI clock channel setup is fixed
@ 2012-11-19 14:33 Alexander Varnin
  2012-11-19 21:32 ` Heiko Stübner
  0 siblings, 1 reply; 7+ messages in thread
From: Alexander Varnin @ 2012-11-19 14:33 UTC (permalink / raw)
  To: linux-samsung-soc; +Cc: Alexander Varnin

Actually, SPI channel 0 on 2443 is mapped to HS SPI controller,
and to enable s3c2410-spi controller, we should power on channel
1 in PCLKCON. There is no channel 0 SPI on s3c2443, so delete its
clock.

Signed-off-by: Alexander Varnin <fenixk19@mail.ru>
---
 arch/arm/mach-s3c24xx/clock-s3c2443.c |    6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mach-s3c24xx/clock-s3c2443.c b/arch/arm/mach-s3c24xx/clock-s3c2443.c
index 7f689ce..bdaba59 100644
--- a/arch/arm/mach-s3c24xx/clock-s3c2443.c
+++ b/arch/arm/mach-s3c24xx/clock-s3c2443.c
@@ -158,12 +158,6 @@ static struct clk init_clocks_off[] = {
 		.devname	= "s3c2410-spi.0",
 		.parent		= &clk_p,
 		.enable		= s3c2443_clkcon_enable_p,
-		.ctrlbit	= S3C2443_PCLKCON_SPI0,
-	}, {
-		.name		= "spi",
-		.devname	= "s3c2410-spi.1",
-		.parent		= &clk_p,
-		.enable		= s3c2443_clkcon_enable_p,
 		.ctrlbit	= S3C2443_PCLKCON_SPI1,
 	}
 };
-- 
1.7.2.5

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

* Re: [PATCH] ARM: S3C2443: SPI clock channel setup is fixed
  2012-11-19 14:33 Alexander Varnin
@ 2012-11-19 21:32 ` Heiko Stübner
  0 siblings, 0 replies; 7+ messages in thread
From: Heiko Stübner @ 2012-11-19 21:32 UTC (permalink / raw)
  To: Alexander Varnin; +Cc: linux-samsung-soc

Am Montag, 19. November 2012, 15:33:57 schrieb Alexander Varnin:
> Actually, SPI channel 0 on 2443 is mapped to HS SPI controller,
> and to enable s3c2410-spi controller, we should power on channel
> 1 in PCLKCON. There is no channel 0 SPI on s3c2443, so delete its
> clock.
> 
> Signed-off-by: Alexander Varnin <fenixk19@mail.ru>

You're right of course. The second spi channel (pclkcon_spi1) even uses the 
registers for the first s3c24xx-spi channel.

Reviewed-by: Heiko Stuebner <heiko@sntech.de>


But you might want to resend your patch and include 

	Kukjin Kim <kgene.kim@samsung.com>

(the maintainer of Samsung code) as recipient, because I don't know if he'll 
see it otherwise.


> ---
>  arch/arm/mach-s3c24xx/clock-s3c2443.c |    6 ------
>  1 files changed, 0 insertions(+), 6 deletions(-)
> 
> diff --git a/arch/arm/mach-s3c24xx/clock-s3c2443.c
> b/arch/arm/mach-s3c24xx/clock-s3c2443.c index 7f689ce..bdaba59 100644
> --- a/arch/arm/mach-s3c24xx/clock-s3c2443.c
> +++ b/arch/arm/mach-s3c24xx/clock-s3c2443.c
> @@ -158,12 +158,6 @@ static struct clk init_clocks_off[] = {
>  		.devname	= "s3c2410-spi.0",
>  		.parent		= &clk_p,
>  		.enable		= s3c2443_clkcon_enable_p,
> -		.ctrlbit	= S3C2443_PCLKCON_SPI0,
> -	}, {
> -		.name		= "spi",
> -		.devname	= "s3c2410-spi.1",
> -		.parent		= &clk_p,
> -		.enable		= s3c2443_clkcon_enable_p,
>  		.ctrlbit	= S3C2443_PCLKCON_SPI1,
>  	}
>  };

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

* [PATCH] ARM: S3C2443: SPI clock channel setup is fixed
@ 2012-11-19 21:55 Alexander Varnin
  2012-11-20 11:46 ` Kukjin Kim
  0 siblings, 1 reply; 7+ messages in thread
From: Alexander Varnin @ 2012-11-19 21:55 UTC (permalink / raw)
  To: linux-samsung-soc; +Cc: Alexander Varnin, Kukjin Kim

[-- Attachment #1: Type: text/plain, Size: 980 bytes --]

Actually, SPI channel 0 on 2443 is mapped to HS SPI controller,
and to enable s3c2410-spi controller, we should power on channel
1 in PCLKCON. There is no channel 0 SPI on s3c2443, so delete its
clock.

Signed-off-by: Alexander Varnin <fenixk19@mail.ru>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
---
 arch/arm/mach-s3c24xx/clock-s3c2443.c |    6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mach-s3c24xx/clock-s3c2443.c
b/arch/arm/mach-s3c24xx/clock-s3c2443.c
index 7f689ce..bdaba59 100644
--- a/arch/arm/mach-s3c24xx/clock-s3c2443.c
+++ b/arch/arm/mach-s3c24xx/clock-s3c2443.c
@@ -158,12 +158,6 @@ static struct clk init_clocks_off[] = {
 		.devname	= "s3c2410-spi.0",
 		.parent		= &clk_p,
 		.enable		= s3c2443_clkcon_enable_p,
-		.ctrlbit	= S3C2443_PCLKCON_SPI0,
-	}, {
-		.name		= "spi",
-		.devname	= "s3c2410-spi.1",
-		.parent		= &clk_p,
-		.enable		= s3c2443_clkcon_enable_p,
 		.ctrlbit	= S3C2443_PCLKCON_SPI1,
 	}
 };
-- 
1.7.2.5

[-- Attachment #2: Часть вложенного сообщения --]
[-- Type: text/plain, Size: 0 bytes --]



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

* RE: [PATCH] ARM: S3C2443: SPI clock channel setup is fixed
  2012-11-19 21:55 [PATCH] ARM: S3C2443: SPI clock channel setup is fixed Alexander Varnin
@ 2012-11-20 11:46 ` Kukjin Kim
  2012-11-22  7:57   ` Alexander Varnin
  0 siblings, 1 reply; 7+ messages in thread
From: Kukjin Kim @ 2012-11-20 11:46 UTC (permalink / raw)
  To: 'Alexander Varnin', linux-samsung-soc

Alexander Varnin wrote:
> 
> Actually, SPI channel 0 on 2443 is mapped to HS SPI controller,
> and to enable s3c2410-spi controller, we should power on channel
> 1 in PCLKCON. There is no channel 0 SPI on s3c2443, so delete its
> clock.
> 
> Signed-off-by: Alexander Varnin <fenixk19@mail.ru>
> Reviewed-by: Heiko Stuebner <heiko@sntech.de>
> ---
>  arch/arm/mach-s3c24xx/clock-s3c2443.c |    6 ------
>  1 files changed, 0 insertions(+), 6 deletions(-)
> 
> diff --git a/arch/arm/mach-s3c24xx/clock-s3c2443.c
> b/arch/arm/mach-s3c24xx/clock-s3c2443.c
> index 7f689ce..bdaba59 100644
> --- a/arch/arm/mach-s3c24xx/clock-s3c2443.c
> +++ b/arch/arm/mach-s3c24xx/clock-s3c2443.c
> @@ -158,12 +158,6 @@ static struct clk init_clocks_off[] = {
>  		.devname	= "s3c2410-spi.0",
>  		.parent		= &clk_p,
>  		.enable		= s3c2443_clkcon_enable_p,
> -		.ctrlbit	= S3C2443_PCLKCON_SPI0,
> -	}, {
> -		.name		= "spi",
> -		.devname	= "s3c2410-spi.1",
> -		.parent		= &clk_p,
> -		.enable		= s3c2443_clkcon_enable_p,
>  		.ctrlbit	= S3C2443_PCLKCON_SPI1,
>  	}
>  };
> --
> 1.7.2.5

Applied, thanks.

K-Gene <kgene@kernel.org>

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

* Re: [PATCH] ARM: S3C2443: SPI clock channel setup is fixed
  2012-11-20 11:46 ` Kukjin Kim
@ 2012-11-22  7:57   ` Alexander Varnin
  2012-11-22  8:22     ` Kukjin Kim
  0 siblings, 1 reply; 7+ messages in thread
From: Alexander Varnin @ 2012-11-22  7:57 UTC (permalink / raw)
  To: Kukjin Kim; +Cc: linux-samsung-soc

I also want to point, that irq resource in arch/arm/plat-samsung/devs.c 
for s3c2410-spi driver on S3C2443 points to wrong IRQ (SPI0 instead of 
SPI1). I've solved it with board specific code, but it is not most 
correct way, i think.

20.11.2012 15:46, Kukjin Kim пишет:
> Alexander Varnin wrote:
>> Actually, SPI channel 0 on 2443 is mapped to HS SPI controller,
>> and to enable s3c2410-spi controller, we should power on channel
>> 1 in PCLKCON. There is no channel 0 SPI on s3c2443, so delete its
>> clock.
>>
>> Signed-off-by: Alexander Varnin <fenixk19@mail.ru>
>> Reviewed-by: Heiko Stuebner <heiko@sntech.de>
>> ---
>>   arch/arm/mach-s3c24xx/clock-s3c2443.c |    6 ------
>>   1 files changed, 0 insertions(+), 6 deletions(-)
>>
>> diff --git a/arch/arm/mach-s3c24xx/clock-s3c2443.c
>> b/arch/arm/mach-s3c24xx/clock-s3c2443.c
>> index 7f689ce..bdaba59 100644
>> --- a/arch/arm/mach-s3c24xx/clock-s3c2443.c
>> +++ b/arch/arm/mach-s3c24xx/clock-s3c2443.c
>> @@ -158,12 +158,6 @@ static struct clk init_clocks_off[] = {
>>   		.devname	= "s3c2410-spi.0",
>>   		.parent		= &clk_p,
>>   		.enable		= s3c2443_clkcon_enable_p,
>> -		.ctrlbit	= S3C2443_PCLKCON_SPI0,
>> -	}, {
>> -		.name		= "spi",
>> -		.devname	= "s3c2410-spi.1",
>> -		.parent		= &clk_p,
>> -		.enable		= s3c2443_clkcon_enable_p,
>>   		.ctrlbit	= S3C2443_PCLKCON_SPI1,
>>   	}
>>   };
>> --
>> 1.7.2.5
> Applied, thanks.
>
> K-Gene <kgene@kernel.org>
>
> --
> 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

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

* RE: [PATCH] ARM: S3C2443: SPI clock channel setup is fixed
  2012-11-22  7:57   ` Alexander Varnin
@ 2012-11-22  8:22     ` Kukjin Kim
  2012-11-22  8:29       ` Alexander Varnin
  0 siblings, 1 reply; 7+ messages in thread
From: Kukjin Kim @ 2012-11-22  8:22 UTC (permalink / raw)
  To: 'Alexander Varnin', 'Kukjin Kim'; +Cc: linux-samsung-soc

Alexander Varnin
> 
> I also want to point, that irq resource in arch/arm/plat-samsung/devs.c
> for s3c2410-spi driver on S3C2443 points to wrong IRQ (SPI0 instead of

Sounds that you cannot use platform_device in plat-samsung/devs.c for SPI on S3C2443. Yes, could be...

> SPI1). I've solved it with board specific code, but it is not most
> correct way, i think.
> 
Hmm, if provided platform_device is in plat-samsung/devs.c cannot support, we can do as you said temporarily but we know it's wrong way because the value depends on SoC not board. 

How about following?

8<--------------------------------
diff --git a/arch/arm/mach-s3c24xx/s3c2443.c b/arch/arm/mach-s3c24xx/s3c2443.c
index 165b6a6..22eead3 100644
--- a/arch/arm/mach-s3c24xx/s3c2443.c
+++ b/arch/arm/mach-s3c24xx/s3c2443.c
@@ -82,6 +82,10 @@ int __init s3c2443_init(void)
 	s3c_device_wdt.resource[1].start = IRQ_S3C2443_WDT;
 	s3c_device_wdt.resource[1].end   = IRQ_S3C2443_WDT;

+	/* change SPI IRQ number */
+	s3c_device_spi0.resource[1].start = IRQ_SPI1;
+	s3c_device_spi0.resource[1].end = IRQ_SPI1;
+
 	return device_register(&s3c2443_dev);
 }
8<--------------------------------

K-Gene <kgene@kernel.org>

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

* Re: [PATCH] ARM: S3C2443: SPI clock channel setup is fixed
  2012-11-22  8:22     ` Kukjin Kim
@ 2012-11-22  8:29       ` Alexander Varnin
  0 siblings, 0 replies; 7+ messages in thread
From: Alexander Varnin @ 2012-11-22  8:29 UTC (permalink / raw)
  To: Kukjin Kim; +Cc: linux-samsung-soc

22.11.2012 12:22, Kukjin Kim пишет:
>> SPI1). I've solved it with board specific code, but it is not most
>> correct way, i think.
>>
> Hmm, if provided platform_device is in plat-samsung/devs.c cannot support, we can do as you said temporarily but we know it's wrong way because the value depends on SoC not board.
>
> How about following?
>
> 8<--------------------------------
> diff --git a/arch/arm/mach-s3c24xx/s3c2443.c b/arch/arm/mach-s3c24xx/s3c2443.c
> index 165b6a6..22eead3 100644
> --- a/arch/arm/mach-s3c24xx/s3c2443.c
> +++ b/arch/arm/mach-s3c24xx/s3c2443.c
> @@ -82,6 +82,10 @@ int __init s3c2443_init(void)
>   	s3c_device_wdt.resource[1].start = IRQ_S3C2443_WDT;
>   	s3c_device_wdt.resource[1].end   = IRQ_S3C2443_WDT;
>
> +	/* change SPI IRQ number */
> +	s3c_device_spi0.resource[1].start = IRQ_SPI1;
> +	s3c_device_spi0.resource[1].end = IRQ_SPI1;
> +
>   	return device_register(&s3c2443_dev);
>   }
> 8<--------------------------------
>
> K-Gene <kgene@kernel.org>
>
Yes, that is a fix. Thanks.

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

end of thread, other threads:[~2012-11-22 18:50 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-19 21:55 [PATCH] ARM: S3C2443: SPI clock channel setup is fixed Alexander Varnin
2012-11-20 11:46 ` Kukjin Kim
2012-11-22  7:57   ` Alexander Varnin
2012-11-22  8:22     ` Kukjin Kim
2012-11-22  8:29       ` Alexander Varnin
  -- strict thread matches above, loose matches on Subject: below --
2012-11-19 14:33 Alexander Varnin
2012-11-19 21:32 ` Heiko Stübner

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.