Skip to contentSkip to conversation

ARM: S3C2443: SPI clock channel setup is fixed

PATCH Applied Alexander Varnin 2 participants 5 messages Nov 19, 2012 – Nov 22, 2012

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: S3C2443: SPI clock channel setup is fixed

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.

---
 arch/arm/mach-s3c24xx/clock-s3c2443.c |    6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)
(quoted diff) +0 -0

b/arch/arm/mach-s3c24xx/clock-s3c2443.c
index 7f689ce..bdaba59 100644

arch/arm/mach-s3c24xx/clock-s3c2443.c +0 -6
@@ -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,
 	}
 };
Signature · 1 line
1.7.2.5
Applied
#1 lore raw
Quoted 31 lines · 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.

---
 arch/arm/mach-s3c24xx/clock-s3c2443.c |    6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)
arch/arm/mach-s3c24xx/clock-s3c2443.c +0 -7
index 7f689ce..bdaba59 100644
@@ -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,
 	}
 };
--
Quoted 1 line

1.7.2.5

Applied, thanks.

K-Gene <[email protected]>

#2 lore raw

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 пишет:

Quoted 40 lines
Quoted 30 lines · 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.

---
  arch/arm/mach-s3c24xx/clock-s3c2443.c |    6 ------
  1 files changed, 0 insertions(+), 6 deletions(-)
arch/arm/mach-s3c24xx/clock-s3c2443.c +0 -7
index 7f689ce..bdaba59 100644
@@ -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,
  	}
  };
--
Quoted 1 line

1.7.2.5

Applied, thanks.

K-Gene <[email protected]>

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#3 lore raw

Alexander Varnin

Quoted 3 lines

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...

Quoted 3 lines

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<--------------------------------

arch/arm/mach-s3c24xx/s3c2443.c +4 -0
index 165b6a6..22eead3 100644
@@ -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 <[email protected]>

#4 lore raw

22.11.2012 12:22, Kukjin Kim пишет:

Quoted 24 lines
Quoted 3 lines

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<--------------------------------

arch/arm/mach-s3c24xx/s3c2443.c +4 -0
index 165b6a6..22eead3 100644
@@ -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<--------------------------------

Quoted 2 lines

K-Gene <[email protected]>

Yes, that is a fix. Thanks.