Skip to contentSkip to conversation

S3C64XX SPI updates

PATCH New Ben Dooks 1 participant 5 messages Jan 18, 2010

Subsystems (3)
lore
Share & tools
lore

Ben Dooks

author
#0 lore raw

Current S3C64XX SPI platform updates in next-jassi-spi

author
#1 lore raw

PATCH 1/1 ARM: S3C64XX: SPI: Add SPI controller register base

From: Jassi Brar <[email protected]>

Added SPI controller register base.

---
 arch/arm/mach-s3c6400/include/mach/map.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
arch/arm/mach-s3c6400/include/mach/map.h +2 -0
index 3e17adf..801c1c0 100644
@@ -64,6 +64,8 @@
 #define S3C64XX_PA_IIS1		(0x7F003000)
 #define S3C64XX_PA_TIMER	(0x7F006000)
 #define S3C64XX_PA_IIC0		(0x7F004000)
+#define S3C64XX_PA_SPI0		(0x7F00B000)
+#define S3C64XX_PA_SPI1		(0x7F00C000)
 #define S3C64XX_PA_PCM0		(0x7F009000)
 #define S3C64XX_PA_PCM1		(0x7F00A000)
 #define S3C64XX_PA_IISV4	(0x7F00D000)
Signature · 1 line
1.6.0.4
author
#2 lore raw

PATCH 1/1 ARM: S3C64XX: SPI: Define SPI-48M clock sources

In reply to Ben Dooks

From: Jassi Brar <[email protected]>

Defined special 48MHz clock sources for SPI-0,1.

---
 arch/arm/plat-s3c64xx/clock.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
arch/arm/plat-s3c64xx/clock.c +12 -0
index ae5883c..2989c3a 100644
@@ -141,6 +141,18 @@ static struct clk init_clocks_disable[] = {
 		.enable		= s3c64xx_pclk_ctrl,
 		.ctrlbit	= S3C_CLKCON_PCLK_SPI1,
 	}, {
+		.name		= "spi_48m",
+		.id		= 0,
+		.parent		= &clk_48m,
+		.enable		= s3c64xx_sclk_ctrl,
+		.ctrlbit	= S3C_CLKCON_SCLK_SPI0_48,
+	}, {
+		.name		= "spi_48m",
+		.id		= 1,
+		.parent		= &clk_48m,
+		.enable		= s3c64xx_sclk_ctrl,
+		.ctrlbit	= S3C_CLKCON_SCLK_SPI1_48,
+	}, {
 		.name		= "48m",
 		.id		= 0,
 		.parent		= &clk_48m,
Signature · 1 line
1.6.0.4
author
#3 lore raw

PATCH 1/1 ARM: S3C64XX: SPI: Header for passing platform data

In reply to Ben Dooks

From: Jassi Brar <[email protected]>

We need a way to pass controller specific information to the SPI driver. For that purpose new headers are made.

SPI Controller is assumed 'type-s3c64xx' and can be defined for newer SoCs.
Hence, that part is placed under plat-samsung to be shared across newer SoCs.

SoC specific part - spi source clocks, will be placed under plat-<soc>/include/plat/

---
 arch/arm/plat-s3c64xx/include/plat/spi-clocks.h  |   18 ++++++
 arch/arm/plat-samsung/include/plat/s3c64xx-spi.h |   67 ++++++++++++++++++++++
 2 files changed, 85 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/plat-s3c64xx/include/plat/spi-clocks.h
 create mode 100644 arch/arm/plat-samsung/include/plat/s3c64xx-spi.h
arch/arm/plat-s3c64xx/include/plat/spi-clocks.h new file +18 -0
new file mode 100644
index 0000000..524bdae
@@ -0,0 +1,18 @@
+/* linux/arch/arm/plat-s3c64xx/include/plat/spi-clocks.h
+ *
+ * Copyright (C) 2009 Samsung Electronics Ltd.
+ *	Jaswinder Singh <[email protected]>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#ifndef __S3C64XX_PLAT_SPI_CLKS_H
+#define __S3C64XX_PLAT_SPI_CLKS_H __FILE__
+
+#define S3C64XX_SPI_SRCCLK_PCLK		0
+#define S3C64XX_SPI_SRCCLK_SPIBUS	1
+#define S3C64XX_SPI_SRCCLK_48M		2
+
+#endif /* __S3C64XX_PLAT_SPI_CLKS_H */
arch/arm/plat-samsung/include/plat/s3c64xx-spi.h new file +67 -0

67 lines not on this page · raw message

Signature · 1 line
1.6.0.4
author
#4 lore raw

PATCH 1/1 ARM: S3C64XX: SPI: Define SPI controller devices

In reply to Ben Dooks

From: Jassi Brar <[email protected]>

Platform devices for SPI Controller of S3C64XX are defined and exported for machines to include. Also, controller setup helper functions are defined for machine code to set runtime configuration of the controller and the bus.

---
 arch/arm/plat-s3c/include/plat/devs.h |    3 +
 arch/arm/plat-s3c64xx/Makefile        |    1 +
 arch/arm/plat-s3c64xx/dev-spi.c       |  180 +++++++++++++++++++++++++++++++++
 3 files changed, 184 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/plat-s3c64xx/dev-spi.c
arch/arm/plat-s3c/include/plat/devs.h +3 -0
index 8a4153b..f4a7e57 100644
@@ -29,6 +29,9 @@ extern struct platform_device s3c64xx_device_iis0;
 extern struct platform_device s3c64xx_device_iis1;
 extern struct platform_device s3c64xx_device_iisv4;
 
+extern struct platform_device s3c64xx_device_spi0;
+extern struct platform_device s3c64xx_device_spi1;
+
 extern struct platform_device s3c64xx_device_pcm0;
 extern struct platform_device s3c64xx_device_pcm1;
 
arch/arm/plat-s3c64xx/Makefile +1 -0
index b241f36..80255a5 100644
@@ -47,3 +47,4 @@ obj-$(CONFIG_S3C64XX_SETUP_I2C1) += setup-i2c1.o
 obj-$(CONFIG_S3C64XX_SETUP_FB_24BPP) += setup-fb-24bpp.o
 obj-$(CONFIG_S3C64XX_SETUP_SDHCI_GPIO) += setup-sdhci-gpio.o
 obj-$(CONFIG_SND_S3C24XX_SOC) += dev-audio.o
+obj-$(CONFIG_SPI_S3C64XX) += dev-spi.o
arch/arm/plat-s3c64xx/dev-spi.c new file +180 -0

180 lines not on this page · raw message

Signature · 1 line
1.6.0.4