linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/6] S3C24XX: Add support for HSSPI on S3C2416/S3C2443
@ 2012-03-04 18:02 Heiko Stübner
  0 siblings, 0 replies; 14+ messages in thread
From: Heiko Stübner @ 2012-03-04 18:02 UTC (permalink / raw)
  To: linux-arm-kernel

The S3C2416/S3C2443/S3C2450 SoCs contain HSSPI controllers compatible
with the ones in the S3C64xx and later.

The second patch modifying the dma selection depends on the series
enabling the dma support on the S3C2416, but as the whole s3c64xx-spi
driver needs dma support this should be ok.

Tested on an Asus DR-900 ebook reader with a Marvell MR8686 using the
libertas driver.

Heiko Stuebner (6):
  ARM: S3C24XX: Add forgotten clock lookup table to S3C2443
  ARM: S3C24XX: claim spi channels for hsspi in dma-s3c2443
  ARM: S3C24XX: Add map entries needed by the s3c64xx-spi devices
  ARM: S3C24XX: Add clock-lookup entries required by s3c64xx-spi
  ARM: S3C24XX: Add HSSPI setup callback for s3c64xx-spi driver
  spi/s3c64xx: Allow usage for ARCH_S3C24XX

 arch/arm/mach-s3c24xx/Kconfig            |    5 ++++
 arch/arm/mach-s3c24xx/Makefile           |    1 +
 arch/arm/mach-s3c24xx/clock-s3c2416.c    |    1 +
 arch/arm/mach-s3c24xx/clock-s3c2443.c    |    6 ++++
 arch/arm/mach-s3c24xx/common-s3c2443.c   |   15 +++++++----
 arch/arm/mach-s3c24xx/dma-s3c2443.c      |   16 +++++++++---
 arch/arm/mach-s3c24xx/include/mach/dma.h |    4 +++
 arch/arm/mach-s3c24xx/include/mach/map.h |    5 ++++
 arch/arm/mach-s3c24xx/setup-spi.c        |   39 ++++++++++++++++++++++++++++++
 drivers/spi/Kconfig                      |    2 +-
 10 files changed, 84 insertions(+), 10 deletions(-)
 create mode 100644 arch/arm/mach-s3c24xx/setup-spi.c

-- 
1.7.2.3

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

* [PATCH 0/6] S3C24XX: Add support for HSSPI on S3C2416/S3C2443
@ 2012-03-12 18:59 Heiko Stübner
  2012-03-12 19:00 ` [PATCH 1/6] ARM: S3C24XX: Add forgotten clock lookup table to S3C2443 Heiko Stübner
                   ` (6 more replies)
  0 siblings, 7 replies; 14+ messages in thread
From: Heiko Stübner @ 2012-03-12 18:59 UTC (permalink / raw)
  To: linux-arm-kernel

The S3C2416/S3C2443/S3C2450 SoCs contain HSSPI controllers compatible
with the ones in the S3C64xx and later.

The second patch modifying the dma selection depends on the series
enabling the dma support on the S3C2416, but as the whole s3c64xx-spi
driver needs dma support this should be ok.

Tested on an Asus DR-900 ebook reader with a Marvell MR8686 using the
libertas driver.


This is a repost of the series adapted to changes resulting from the
other cleanup series.


Heiko Stuebner (6):
  ARM: S3C24XX: Add forgotten clock lookup table to S3C2443
  ARM: S3C24XX: claim spi channels for hsspi in dma-s3c2443
  ARM: S3C24XX: Add map entries needed by the s3c64xx-spi devices
  ARM: S3C24XX: Add clock-lookup entries required by s3c64xx-spi
  ARM: S3C24XX: Add HSSPI setup callback for s3c64xx-spi driver
  spi/s3c64xx: Allow usage for ARCH_S3C24XX

 arch/arm/mach-s3c24xx/Kconfig            |    5 ++++
 arch/arm/mach-s3c24xx/Makefile           |    1 +
 arch/arm/mach-s3c24xx/clock-s3c2416.c    |    1 +
 arch/arm/mach-s3c24xx/clock-s3c2443.c    |    6 ++++
 arch/arm/mach-s3c24xx/common-s3c2443.c   |   15 +++++++----
 arch/arm/mach-s3c24xx/dma-s3c2443.c      |   16 +++++++++---
 arch/arm/mach-s3c24xx/include/mach/dma.h |    4 +++
 arch/arm/mach-s3c24xx/include/mach/map.h |    5 ++++
 arch/arm/mach-s3c24xx/setup-spi.c        |   39 ++++++++++++++++++++++++++++++
 drivers/spi/Kconfig                      |    2 +-
 10 files changed, 84 insertions(+), 10 deletions(-)
 create mode 100644 arch/arm/mach-s3c24xx/setup-spi.c

-- 
1.7.2.3

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

* [PATCH 1/6] ARM: S3C24XX: Add forgotten clock lookup table to S3C2443
  2012-03-12 18:59 [PATCH 0/6] S3C24XX: Add support for HSSPI on S3C2416/S3C2443 Heiko Stübner
@ 2012-03-12 19:00 ` Heiko Stübner
  2012-04-02 21:08   ` Kukjin Kim
  2012-03-12 19:01 ` [PATCH 2/6] ARM: S3C24XX: claim spi channels for hsspi in dma-s3c2443 Heiko Stübner
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 14+ messages in thread
From: Heiko Stübner @ 2012-03-12 19:00 UTC (permalink / raw)
  To: linux-arm-kernel

When the hsmmc clock lookup was changed to be lookup tables based,
it seems the S3C2443 was forgotten.

As subsequent patches will want to add more lookups to it, this
patch adds the base table with the missing hsmmc lookup.

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

diff --git a/arch/arm/mach-s3c24xx/clock-s3c2443.c b/arch/arm/mach-s3c24xx/clock-s3c2443.c
index efb3ac3..bce1cd3 100644
--- a/arch/arm/mach-s3c24xx/clock-s3c2443.c
+++ b/arch/arm/mach-s3c24xx/clock-s3c2443.c
@@ -179,6 +179,10 @@ static struct clk *clks[] __initdata = {
 	&clk_hsmmc,
 };
 
+static struct clk_lookup s3c2443_clk_lookup[] = {
+	CLKDEV_INIT("s3c-sdhci.1", "mmc_busclk.2", &clk_hsmmc),
+};
+
 void __init s3c2443_init_clocks(int xtal)
 {
 	unsigned long epllcon = __raw_readl(S3C2443_EPLLCON);
@@ -210,6 +214,7 @@ void __init s3c2443_init_clocks(int xtal)
 
 	s3c_register_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off));
 	s3c_disable_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off));
+	clkdev_add_table(s3c2443_clk_lookup, ARRAY_SIZE(s3c2443_clk_lookup));
 
 	s3c_pwmclk_init();
 }
-- 
1.7.2.3

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

* [PATCH 2/6] ARM: S3C24XX: claim spi channels for hsspi in dma-s3c2443
  2012-03-12 18:59 [PATCH 0/6] S3C24XX: Add support for HSSPI on S3C2416/S3C2443 Heiko Stübner
  2012-03-12 19:00 ` [PATCH 1/6] ARM: S3C24XX: Add forgotten clock lookup table to S3C2443 Heiko Stübner
@ 2012-03-12 19:01 ` Heiko Stübner
  2012-03-12 19:01 ` [PATCH 3/6] ARM: S3C24XX: Add map entries needed by the s3c64xx-spi devices Heiko Stübner
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 14+ messages in thread
From: Heiko Stübner @ 2012-03-12 19:01 UTC (permalink / raw)
  To: linux-arm-kernel

SoCs starting with the S3C2443 contain SPI controllers compatible with the
spi-s3c64xx driver and therefore need separate dma channels for rx and tx.

This patch introduces dma channel declarations for these and changes the
dma-s3c2443.c accordingly.

None of the older SoCs use the spi-dma at all. Most boards bitbang their
spi use and the spi-s3c24xx driver also does not use the dma system.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
 arch/arm/mach-s3c24xx/dma-s3c2443.c      |   16 ++++++++++++----
 arch/arm/mach-s3c24xx/include/mach/dma.h |    4 ++++
 2 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-s3c24xx/dma-s3c2443.c b/arch/arm/mach-s3c24xx/dma-s3c2443.c
index e227c47..2d94228 100644
--- a/arch/arm/mach-s3c24xx/dma-s3c2443.c
+++ b/arch/arm/mach-s3c24xx/dma-s3c2443.c
@@ -55,12 +55,20 @@ static struct s3c24xx_dma_map __initdata s3c2443_dma_mappings[] = {
 		.name		= "sdi",
 		.channels	= MAP(S3C2443_DMAREQSEL_SDI),
 	},
-	[DMACH_SPI0] = {
-		.name		= "spi0",
+	[DMACH_SPI0_RX] = {
+		.name		= "spi0-rx",
+		.channels	= MAP(S3C2443_DMAREQSEL_SPI0RX),
+	},
+	[DMACH_SPI0_TX] = {
+		.name		= "spi0-tx",
 		.channels	= MAP(S3C2443_DMAREQSEL_SPI0TX),
 	},
-	[DMACH_SPI1] = { /* only on S3C2443/S3C2450 */
-		.name		= "spi1",
+	[DMACH_SPI1_RX] = { /* only on S3C2443/S3C2450 */
+		.name		= "spi1-rx",
+		.channels	= MAP(S3C2443_DMAREQSEL_SPI1RX),
+	},
+	[DMACH_SPI1_TX] = { /* only on S3C2443/S3C2450 */
+		.name		= "spi1-tx",
 		.channels	= MAP(S3C2443_DMAREQSEL_SPI1TX),
 	},
 	[DMACH_UART0] = {
diff --git a/arch/arm/mach-s3c24xx/include/mach/dma.h b/arch/arm/mach-s3c24xx/include/mach/dma.h
index acbdfec..454831b 100644
--- a/arch/arm/mach-s3c24xx/include/mach/dma.h
+++ b/arch/arm/mach-s3c24xx/include/mach/dma.h
@@ -47,6 +47,10 @@ enum dma_ch {
 	DMACH_UART2_SRC2,
 	DMACH_UART3,		/* s3c2443 has extra uart */
 	DMACH_UART3_SRC2,
+	DMACH_SPI0_TX,		/* s3c2443/2416/2450 hsspi0 */
+	DMACH_SPI0_RX,		/* s3c2443/2416/2450 hsspi0 */
+	DMACH_SPI1_TX,		/* s3c2443/2450 hsspi1 */
+	DMACH_SPI1_RX,		/* s3c2443/2450 hsspi1 */
 	DMACH_MAX,		/* the end entry */
 };
 
-- 
1.7.2.3

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

* [PATCH 3/6] ARM: S3C24XX: Add map entries needed by the s3c64xx-spi devices
  2012-03-12 18:59 [PATCH 0/6] S3C24XX: Add support for HSSPI on S3C2416/S3C2443 Heiko Stübner
  2012-03-12 19:00 ` [PATCH 1/6] ARM: S3C24XX: Add forgotten clock lookup table to S3C2443 Heiko Stübner
  2012-03-12 19:01 ` [PATCH 2/6] ARM: S3C24XX: claim spi channels for hsspi in dma-s3c2443 Heiko Stübner
@ 2012-03-12 19:01 ` Heiko Stübner
  2012-03-12 19:02 ` [PATCH 4/6] ARM: S3C24XX: Add clock-lookup entries required by s3c64xx-spi Heiko Stübner
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 14+ messages in thread
From: Heiko Stübner @ 2012-03-12 19:01 UTC (permalink / raw)
  To: linux-arm-kernel

The S3C_PA_SPIx constants are only used by the s3c64xx-spi driver
and don't conflict with the older SoCs as they don't support hsspi.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
 arch/arm/mach-s3c24xx/include/mach/map.h |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-s3c24xx/include/mach/map.h b/arch/arm/mach-s3c24xx/include/mach/map.h
index 78ae807..8ba381f 100644
--- a/arch/arm/mach-s3c24xx/include/mach/map.h
+++ b/arch/arm/mach-s3c24xx/include/mach/map.h
@@ -98,6 +98,8 @@
 
 /* SPI */
 #define S3C2410_PA_SPI	   (0x59000000)
+#define S3C2443_PA_SPI0		(0x52000000)
+#define S3C2443_PA_SPI1		S3C2410_PA_SPI
 
 /* SDI */
 #define S3C2410_PA_SDI	   (0x5A000000)
@@ -162,4 +164,7 @@
 #define S3C_PA_WDT	    S3C2410_PA_WATCHDOG
 #define S3C_PA_NAND	    S3C24XX_PA_NAND
 
+#define S3C_PA_SPI0		S3C2443_PA_SPI0
+#define S3C_PA_SPI1		S3C2443_PA_SPI1
+
 #endif /* __ASM_ARCH_MAP_H */
-- 
1.7.2.3

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

* [PATCH 4/6] ARM: S3C24XX: Add clock-lookup entries required by s3c64xx-spi
  2012-03-12 18:59 [PATCH 0/6] S3C24XX: Add support for HSSPI on S3C2416/S3C2443 Heiko Stübner
                   ` (2 preceding siblings ...)
  2012-03-12 19:01 ` [PATCH 3/6] ARM: S3C24XX: Add map entries needed by the s3c64xx-spi devices Heiko Stübner
@ 2012-03-12 19:02 ` Heiko Stübner
  2012-03-12 19:03 ` [PATCH v2 5/6] ARM: S3C24XX: Add HSSPI setup callback for s3c64xx-spi driver Heiko Stübner
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 14+ messages in thread
From: Heiko Stübner @ 2012-03-12 19:02 UTC (permalink / raw)
  To: linux-arm-kernel

Currently usable are busclk0 and busclk2.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
 arch/arm/mach-s3c24xx/clock-s3c2416.c  |    1 +
 arch/arm/mach-s3c24xx/clock-s3c2443.c  |    1 +
 arch/arm/mach-s3c24xx/common-s3c2443.c |   15 ++++++++++-----
 3 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/arch/arm/mach-s3c24xx/clock-s3c2416.c b/arch/arm/mach-s3c24xx/clock-s3c2416.c
index dbc9ab4..8702ecf 100644
--- a/arch/arm/mach-s3c24xx/clock-s3c2416.c
+++ b/arch/arm/mach-s3c24xx/clock-s3c2416.c
@@ -144,6 +144,7 @@ static struct clk_lookup s3c2416_clk_lookup[] = {
 	CLKDEV_INIT("s3c-sdhci.0", "mmc_busclk.0", &hsmmc0_clk),
 	CLKDEV_INIT("s3c-sdhci.0", "mmc_busclk.2", &hsmmc_mux0.clk),
 	CLKDEV_INIT("s3c-sdhci.1", "mmc_busclk.2", &hsmmc_mux1.clk),
+	CLKDEV_INIT("s3c64xx-spi.0", "spi_busclk2", &hsspi_mux.clk),
 };
 
 void __init s3c2416_init_clocks(int xtal)
diff --git a/arch/arm/mach-s3c24xx/clock-s3c2443.c b/arch/arm/mach-s3c24xx/clock-s3c2443.c
index bce1cd3..bb3231d 100644
--- a/arch/arm/mach-s3c24xx/clock-s3c2443.c
+++ b/arch/arm/mach-s3c24xx/clock-s3c2443.c
@@ -181,6 +181,7 @@ static struct clk *clks[] __initdata = {
 
 static struct clk_lookup s3c2443_clk_lookup[] = {
 	CLKDEV_INIT("s3c-sdhci.1", "mmc_busclk.2", &clk_hsmmc),
+	CLKDEV_INIT("s3c64xx-spi.0", "spi_busclk2", &clk_hsspi.clk),
 };
 
 void __init s3c2443_init_clocks(int xtal)
diff --git a/arch/arm/mach-s3c24xx/common-s3c2443.c b/arch/arm/mach-s3c24xx/common-s3c2443.c
index 4604315..aeeb2be 100644
--- a/arch/arm/mach-s3c24xx/common-s3c2443.c
+++ b/arch/arm/mach-s3c24xx/common-s3c2443.c
@@ -424,11 +424,6 @@ static struct clk init_clocks_off[] = {
 		.enable		= s3c2443_clkcon_enable_p,
 		.ctrlbit	= S3C2443_PCLKCON_IIS,
 	}, {
-		.name		= "hsspi",
-		.parent		= &clk_p,
-		.enable		= s3c2443_clkcon_enable_p,
-		.ctrlbit	= S3C2443_PCLKCON_HSSPI,
-	}, {
 		.name		= "adc",
 		.parent		= &clk_p,
 		.enable		= s3c2443_clkcon_enable_p,
@@ -562,6 +557,14 @@ static struct clk hsmmc1_clk = {
 	.ctrlbit	= S3C2443_HCLKCON_HSMMC,
 };
 
+static struct clk hsspi_clk = {
+	.name		= "spi",
+	.devname	= "s3c64xx-spi.0",
+	.parent		= &clk_p,
+	.enable		= s3c2443_clkcon_enable_p,
+	.ctrlbit	= S3C2443_PCLKCON_HSSPI,
+};
+
 /* EPLLCON compatible enough to get on/off information */
 
 void __init_or_cpufreq s3c2443_common_setup_clocks(pll_fn get_mpll)
@@ -612,6 +615,7 @@ static struct clk *clks[] __initdata = {
 	&clk_usb_bus,
 	&clk_armdiv,
 	&hsmmc1_clk,
+	&hsspi_clk,
 };
 
 static struct clksrc_clk *clksrcs[] __initdata = {
@@ -629,6 +633,7 @@ static struct clk_lookup s3c2443_clk_lookup[] = {
 	CLKDEV_INIT(NULL, "clk_uart_baud2", &clk_p),
 	CLKDEV_INIT(NULL, "clk_uart_baud3", &clk_esys_uart.clk),
 	CLKDEV_INIT("s3c-sdhci.1", "mmc_busclk.0", &hsmmc1_clk),
+	CLKDEV_INIT("s3c64xx-spi.0", "spi_busclk0", &hsspi_clk),
 };
 
 void __init s3c2443_common_init_clocks(int xtal, pll_fn get_mpll,
-- 
1.7.2.3

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

* [PATCH v2 5/6] ARM: S3C24XX: Add HSSPI setup callback for s3c64xx-spi driver
  2012-03-12 18:59 [PATCH 0/6] S3C24XX: Add support for HSSPI on S3C2416/S3C2443 Heiko Stübner
                   ` (3 preceding siblings ...)
  2012-03-12 19:02 ` [PATCH 4/6] ARM: S3C24XX: Add clock-lookup entries required by s3c64xx-spi Heiko Stübner
@ 2012-03-12 19:03 ` Heiko Stübner
  2012-03-12 19:03 ` [PATCH 6/6] spi/s3c64xx: Allow usage for ARCH_S3C24XX Heiko Stübner
  2012-04-02 19:25 ` [PATCH 0/6] S3C24XX: Add support for HSSPI on S3C2416/S3C2443 Heiko Stübner
  6 siblings, 0 replies; 14+ messages in thread
From: Heiko Stübner @ 2012-03-12 19:03 UTC (permalink / raw)
  To: linux-arm-kernel

This lets the s3c64xx-spi driver know the specifics of the controller-
variant and also setups the gpios and the misccr bit.

This setup is valid for all S3C24XX SoCs containing a HSSPI controller
(i.e. S3C2416/2450 and S3C2443)

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
changes since v1: adapt to changes in Makefile

 arch/arm/mach-s3c24xx/Kconfig     |    5 ++++
 arch/arm/mach-s3c24xx/Makefile    |    1 +
 arch/arm/mach-s3c24xx/setup-spi.c |   39 +++++++++++++++++++++++++++++++++++++
 3 files changed, 45 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-s3c24xx/setup-spi.c

diff --git a/arch/arm/mach-s3c24xx/Kconfig b/arch/arm/mach-s3c24xx/Kconfig
index 0f3a327..38e6b30 100644
--- a/arch/arm/mach-s3c24xx/Kconfig
+++ b/arch/arm/mach-s3c24xx/Kconfig
@@ -518,6 +518,11 @@ config S3C2443_DMA
 	help
 	  Internal config node for S3C2443 DMA support
 
+config S3C2443_SETUP_SPI
+	bool
+	help
+	  Common setup code for SPI GPIO configurations
+
 endif	# CPU_S3C2443 || CPU_S3C2416
 
 if CPU_S3C2443
diff --git a/arch/arm/mach-s3c24xx/Makefile b/arch/arm/mach-s3c24xx/Makefile
index 3518fe8..d0f3a92 100644
--- a/arch/arm/mach-s3c24xx/Makefile
+++ b/arch/arm/mach-s3c24xx/Makefile
@@ -91,5 +91,6 @@ obj-$(CONFIG_MACH_OSIRIS_DVS)		+= mach-osiris-dvs.o
 # device setup
 
 obj-$(CONFIG_S3C2416_SETUP_SDHCI_GPIO)	+= setup-sdhci-gpio.o
+obj-$(CONFIG_S3C2443_SETUP_SPI)		+= setup-spi.o
 obj-$(CONFIG_ARCH_S3C24XX)		+= setup-i2c.o
 obj-$(CONFIG_S3C24XX_SETUP_TS)		+= setup-ts.o
diff --git a/arch/arm/mach-s3c24xx/setup-spi.c b/arch/arm/mach-s3c24xx/setup-spi.c
new file mode 100644
index 0000000..5712c85
--- /dev/null
+++ b/arch/arm/mach-s3c24xx/setup-spi.c
@@ -0,0 +1,39 @@
+/*
+ * HS-SPI device setup for S3C2443/S3C2416
+ *
+ * Copyright (C) 2011 Samsung Electronics Ltd.
+ *		http://www.samsung.com/
+ *
+ * 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.
+ */
+
+#include <linux/gpio.h>
+#include <linux/platform_device.h>
+
+#include <plat/gpio-cfg.h>
+#include <plat/s3c64xx-spi.h>
+
+#include <mach/hardware.h>
+#include <mach/regs-gpio.h>
+
+#ifdef CONFIG_S3C64XX_DEV_SPI0
+struct s3c64xx_spi_info s3c64xx_spi0_pdata __initdata = {
+	.fifo_lvl_mask	= 0x7f,
+	.rx_lvl_offset	= 13,
+	.tx_st_done	= 21,
+	.high_speed	= 1,
+};
+
+int s3c64xx_spi0_cfg_gpio(struct platform_device *pdev)
+{
+	/* enable hsspi bit in misccr */
+	s3c2410_modify_misccr(S3C2416_MISCCR_HSSPI_EN2, 1);
+
+	s3c_gpio_cfgall_range(S3C2410_GPE(11), 3,
+			      S3C_GPIO_SFN(2), S3C_GPIO_PULL_UP);
+
+	return 0;
+}
+#endif
-- 
1.7.2.3

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

* [PATCH 6/6] spi/s3c64xx: Allow usage for ARCH_S3C24XX
  2012-03-12 18:59 [PATCH 0/6] S3C24XX: Add support for HSSPI on S3C2416/S3C2443 Heiko Stübner
                   ` (4 preceding siblings ...)
  2012-03-12 19:03 ` [PATCH v2 5/6] ARM: S3C24XX: Add HSSPI setup callback for s3c64xx-spi driver Heiko Stübner
@ 2012-03-12 19:03 ` Heiko Stübner
  2012-04-02 19:25 ` [PATCH 0/6] S3C24XX: Add support for HSSPI on S3C2416/S3C2443 Heiko Stübner
  6 siblings, 0 replies; 14+ messages in thread
From: Heiko Stübner @ 2012-03-12 19:03 UTC (permalink / raw)
  To: linux-arm-kernel

Newer SoCs from the S3C24XX line, namely S3C2416/2443/2450 contain
hsspi-controllers compatible with the s3c64xx type.

The previous patches enabled platform support for it, so make the
driver also usable for the S3C24xx architecture.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
---
 drivers/spi/Kconfig |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig
index 004e6d1..e981fe6 100644
--- a/drivers/spi/Kconfig
+++ b/drivers/spi/Kconfig
@@ -305,7 +305,7 @@ config SPI_S3C24XX_FIQ
 
 config SPI_S3C64XX
 	tristate "Samsung S3C64XX series type SPI"
-	depends on (ARCH_S3C64XX || ARCH_S5P64X0 || ARCH_EXYNOS)
+	depends on (ARCH_S3C24XX || ARCH_S3C64XX || ARCH_S5P64X0 || ARCH_EXYNOS)
 	select S3C64XX_DMA if ARCH_S3C64XX
 	help
 	  SPI driver for Samsung S3C64XX and newer SoCs.
-- 
1.7.2.3

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

* [PATCH 0/6] S3C24XX: Add support for HSSPI on S3C2416/S3C2443
  2012-03-12 18:59 [PATCH 0/6] S3C24XX: Add support for HSSPI on S3C2416/S3C2443 Heiko Stübner
                   ` (5 preceding siblings ...)
  2012-03-12 19:03 ` [PATCH 6/6] spi/s3c64xx: Allow usage for ARCH_S3C24XX Heiko Stübner
@ 2012-04-02 19:25 ` Heiko Stübner
  2012-04-02 21:00   ` Kukjin Kim
  6 siblings, 1 reply; 14+ messages in thread
From: Heiko Stübner @ 2012-04-02 19:25 UTC (permalink / raw)
  To: linux-arm-kernel

Am Montag 12 M?rz 2012, 19:59:32 schrieb Heiko St?bner:
> The S3C2416/S3C2443/S3C2450 SoCs contain HSSPI controllers compatible
> with the ones in the S3C64xx and later.
> 
> The second patch modifying the dma selection depends on the series
> enabling the dma support on the S3C2416, but as the whole s3c64xx-spi
> driver needs dma support this should be ok.
> 
> Tested on an Asus DR-900 ebook reader with a Marvell MR8686 using the
> libertas driver.
> 
> 
> This is a repost of the series adapted to changes resulting from the
> other cleanup series.

ping :-)

Thanks
Heiko

> 
> Heiko Stuebner (6):
>   ARM: S3C24XX: Add forgotten clock lookup table to S3C2443
>   ARM: S3C24XX: claim spi channels for hsspi in dma-s3c2443
>   ARM: S3C24XX: Add map entries needed by the s3c64xx-spi devices
>   ARM: S3C24XX: Add clock-lookup entries required by s3c64xx-spi
>   ARM: S3C24XX: Add HSSPI setup callback for s3c64xx-spi driver
>   spi/s3c64xx: Allow usage for ARCH_S3C24XX
> 
>  arch/arm/mach-s3c24xx/Kconfig            |    5 ++++
>  arch/arm/mach-s3c24xx/Makefile           |    1 +
>  arch/arm/mach-s3c24xx/clock-s3c2416.c    |    1 +
>  arch/arm/mach-s3c24xx/clock-s3c2443.c    |    6 ++++
>  arch/arm/mach-s3c24xx/common-s3c2443.c   |   15 +++++++----
>  arch/arm/mach-s3c24xx/dma-s3c2443.c      |   16 +++++++++---
>  arch/arm/mach-s3c24xx/include/mach/dma.h |    4 +++
>  arch/arm/mach-s3c24xx/include/mach/map.h |    5 ++++
>  arch/arm/mach-s3c24xx/setup-spi.c        |   39
> ++++++++++++++++++++++++++++++ drivers/spi/Kconfig                      | 
>   2 +-
>  10 files changed, 84 insertions(+), 10 deletions(-)
>  create mode 100644 arch/arm/mach-s3c24xx/setup-spi.c

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

* [PATCH 0/6] S3C24XX: Add support for HSSPI on S3C2416/S3C2443
  2012-04-02 19:25 ` [PATCH 0/6] S3C24XX: Add support for HSSPI on S3C2416/S3C2443 Heiko Stübner
@ 2012-04-02 21:00   ` Kukjin Kim
  2012-04-25  1:37     ` Kukjin Kim
  0 siblings, 1 reply; 14+ messages in thread
From: Kukjin Kim @ 2012-04-02 21:00 UTC (permalink / raw)
  To: linux-arm-kernel

Heiko St?bner wrote:
> Am Montag 12 M?rz 2012, 19:59:32 schrieb Heiko St?bner:
>> The S3C2416/S3C2443/S3C2450 SoCs contain HSSPI controllers compatible
>> with the ones in the S3C64xx and later.
>>
>> The second patch modifying the dma selection depends on the series
>> enabling the dma support on the S3C2416, but as the whole s3c64xx-spi
>> driver needs dma support this should be ok.
>>
>> Tested on an Asus DR-900 ebook reader with a Marvell MR8686 using the
>> libertas driver.
>>
>>
>> This is a repost of the series adapted to changes resulting from the
>> other cleanup series.
>
> ping :-)
>
Thanks for your reminder ;)
Let me review it soon.

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.

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

* [PATCH 1/6] ARM: S3C24XX: Add forgotten clock lookup table to S3C2443
  2012-03-12 19:00 ` [PATCH 1/6] ARM: S3C24XX: Add forgotten clock lookup table to S3C2443 Heiko Stübner
@ 2012-04-02 21:08   ` Kukjin Kim
  2012-04-02 22:37     ` Heiko Stübner
  0 siblings, 1 reply; 14+ messages in thread
From: Kukjin Kim @ 2012-04-02 21:08 UTC (permalink / raw)
  To: linux-arm-kernel

Heiko St?bner wrote:
> When the hsmmc clock lookup was changed to be lookup tables based,
> it seems the S3C2443 was forgotten.
>
> As subsequent patches will want to add more lookups to it, this
> patch adds the base table with the missing hsmmc lookup.
>
> Signed-off-by: Heiko Stuebner<heiko@sntech.de>
> ---
>   arch/arm/mach-s3c24xx/clock-s3c2443.c |    5 +++++
>   1 files changed, 5 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-s3c24xx/clock-s3c2443.c b/arch/arm/mach-s3c24xx/clock-s3c2443.c
> index efb3ac3..bce1cd3 100644
> --- a/arch/arm/mach-s3c24xx/clock-s3c2443.c
> +++ b/arch/arm/mach-s3c24xx/clock-s3c2443.c
> @@ -179,6 +179,10 @@ static struct clk *clks[] __initdata = {
>   	&clk_hsmmc,
>   };
>
> +static struct clk_lookup s3c2443_clk_lookup[] = {
> +	CLKDEV_INIT("s3c-sdhci.1", "mmc_busclk.2",&clk_hsmmc),
> +};
> +
>   void __init s3c2443_init_clocks(int xtal)
>   {
>   	unsigned long epllcon = __raw_readl(S3C2443_EPLLCON);
> @@ -210,6 +214,7 @@ void __init s3c2443_init_clocks(int xtal)
>
>   	s3c_register_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off));
>   	s3c_disable_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off));
> +	clkdev_add_table(s3c2443_clk_lookup, ARRAY_SIZE(s3c2443_clk_lookup));
>
>   	s3c_pwmclk_init();
>   }

Uhm..how about mach-s3c24xx/common-s3c2443.c?

I think, we need to sort out some files in mach-s3c24xx/ and some 
remained mach-s3c24.. directories, actually, as you know, we didn't have 
much time to do it last time :)

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.

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

* [PATCH 1/6] ARM: S3C24XX: Add forgotten clock lookup table to S3C2443
  2012-04-02 21:08   ` Kukjin Kim
@ 2012-04-02 22:37     ` Heiko Stübner
  2012-04-25  1:36       ` Kukjin Kim
  0 siblings, 1 reply; 14+ messages in thread
From: Heiko Stübner @ 2012-04-02 22:37 UTC (permalink / raw)
  To: linux-arm-kernel

Am Montag 02 April 2012, 23:08:10 schrieb Kukjin Kim:
> Heiko St?bner wrote:
> > When the hsmmc clock lookup was changed to be lookup tables based,
> > it seems the S3C2443 was forgotten.
> > 
> > As subsequent patches will want to add more lookups to it, this
> > patch adds the base table with the missing hsmmc lookup.
> > 
> > Signed-off-by: Heiko Stuebner<heiko@sntech.de>
> > ---
> > 
> >   arch/arm/mach-s3c24xx/clock-s3c2443.c |    5 +++++
> >   1 files changed, 5 insertions(+), 0 deletions(-)
> > 
> > diff --git a/arch/arm/mach-s3c24xx/clock-s3c2443.c
> > b/arch/arm/mach-s3c24xx/clock-s3c2443.c index efb3ac3..bce1cd3 100644
> > --- a/arch/arm/mach-s3c24xx/clock-s3c2443.c
> > +++ b/arch/arm/mach-s3c24xx/clock-s3c2443.c
> > @@ -179,6 +179,10 @@ static struct clk *clks[] __initdata = {
> > 
> >   	&clk_hsmmc,
> >   
> >   };
> > 
> > +static struct clk_lookup s3c2443_clk_lookup[] = {
> > +	CLKDEV_INIT("s3c-sdhci.1", "mmc_busclk.2",&clk_hsmmc),
> > +};
> > +
> > 
> >   void __init s3c2443_init_clocks(int xtal)
> >   {
> >   
> >   	unsigned long epllcon = __raw_readl(S3C2443_EPLLCON);
> > 
> > @@ -210,6 +214,7 @@ void __init s3c2443_init_clocks(int xtal)
> > 
> >   	s3c_register_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off));
> >   	s3c_disable_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off));
> > 
> > +	clkdev_add_table(s3c2443_clk_lookup, ARRAY_SIZE(s3c2443_clk_lookup));
> > 
> >   	s3c_pwmclk_init();
> >   
> >   }
> 
> Uhm..how about mach-s3c24xx/common-s3c2443.c?

Nope. This clock is really specific to only the s3c2443. There is only one 
hsmmc clock that is identical on both the s3c2443 and s3c2416/2450 and this 
one already is in common-s3c2443.c .

common-s3c2443.c was meant for stuff common to s3c2443 _and newer_, i.e. 
common clocks and so on.

> I think, we need to sort out some files in mach-s3c24xx/ and some
> remained mach-s3c24.. directories, actually, as you know, we didn't have
> much time to do it last time :)

yeah, we did cut it quite close :-), but it also doesn't seem to have produced 
much fall-out. I moved my s3c2416 based development code to 3.4-rc1 without 
major hickups.

Getting rid of the remaining mach-directories and also the plat-s3c24xx would 
be good. But I'm not sure what you would want to change in mach-s3c24xx 
directory itself.

I don't know the earlier SoCs, but the s3c2443 and s3c2416/2450 SoCs currently 
don't have redundancies and in the current layout it's quite easy to 
understand what belongs to which SoC.


Heiko

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

* [PATCH 1/6] ARM: S3C24XX: Add forgotten clock lookup table to S3C2443
  2012-04-02 22:37     ` Heiko Stübner
@ 2012-04-25  1:36       ` Kukjin Kim
  0 siblings, 0 replies; 14+ messages in thread
From: Kukjin Kim @ 2012-04-25  1:36 UTC (permalink / raw)
  To: linux-arm-kernel

Heiko St?bner wrote:
> Am Montag 02 April 2012, 23:08:10 schrieb Kukjin Kim:
>> Heiko St?bner wrote:
>>> When the hsmmc clock lookup was changed to be lookup tables based,
>>> it seems the S3C2443 was forgotten.
>>>
>>> As subsequent patches will want to add more lookups to it, this
>>> patch adds the base table with the missing hsmmc lookup.
>>>
>>> Signed-off-by: Heiko Stuebner<heiko@sntech.de>
>>> ---
>>>
>>>    arch/arm/mach-s3c24xx/clock-s3c2443.c |    5 +++++
>>>    1 files changed, 5 insertions(+), 0 deletions(-)
>>>
>>> diff --git a/arch/arm/mach-s3c24xx/clock-s3c2443.c
>>> b/arch/arm/mach-s3c24xx/clock-s3c2443.c index efb3ac3..bce1cd3 100644
>>> --- a/arch/arm/mach-s3c24xx/clock-s3c2443.c
>>> +++ b/arch/arm/mach-s3c24xx/clock-s3c2443.c
>>> @@ -179,6 +179,10 @@ static struct clk *clks[] __initdata = {
>>>
>>>    	&clk_hsmmc,
>>>
>>>    };
>>>
>>> +static struct clk_lookup s3c2443_clk_lookup[] = {
>>> +	CLKDEV_INIT("s3c-sdhci.1", "mmc_busclk.2",&clk_hsmmc),
>>> +};
>>> +
>>>
>>>    void __init s3c2443_init_clocks(int xtal)
>>>    {
>>>
>>>    	unsigned long epllcon = __raw_readl(S3C2443_EPLLCON);
>>>
>>> @@ -210,6 +214,7 @@ void __init s3c2443_init_clocks(int xtal)
>>>
>>>    	s3c_register_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off));
>>>    	s3c_disable_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off));
>>>
>>> +	clkdev_add_table(s3c2443_clk_lookup, ARRAY_SIZE(s3c2443_clk_lookup));
>>>
>>>    	s3c_pwmclk_init();
>>>
>>>    }
>>
>> Uhm..how about mach-s3c24xx/common-s3c2443.c?
>
> Nope. This clock is really specific to only the s3c2443. There is only one
> hsmmc clock that is identical on both the s3c2443 and s3c2416/2450 and this
> one already is in common-s3c2443.c .
>
OK, you're right, I forgot s3c2443_common_init_clocks() is for s3c2416 
and s3c2443 :-)

> common-s3c2443.c was meant for stuff common to s3c2443 _and newer_, i.e.
> common clocks and so on.
>
>> I think, we need to sort out some files in mach-s3c24xx/ and some
>> remained mach-s3c24.. directories, actually, as you know, we didn't have
>> much time to do it last time :)
>
> yeah, we did cut it quite close :-), but it also doesn't seem to have produced
> much fall-out. I moved my s3c2416 based development code to 3.4-rc1 without
> major hickups.
>
> Getting rid of the remaining mach-directories and also the plat-s3c24xx would
> be good. But I'm not sure what you would want to change in mach-s3c24xx
> directory itself.
>
> I don't know the earlier SoCs, but the s3c2443 and s3c2416/2450 SoCs currently
> don't have redundancies and in the current layout it's quite easy to
> understand what belongs to which SoC.
>
Hmm...I'm sorting that out and if any updates, let you know.

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.

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

* [PATCH 0/6] S3C24XX: Add support for HSSPI on S3C2416/S3C2443
  2012-04-02 21:00   ` Kukjin Kim
@ 2012-04-25  1:37     ` Kukjin Kim
  0 siblings, 0 replies; 14+ messages in thread
From: Kukjin Kim @ 2012-04-25  1:37 UTC (permalink / raw)
  To: linux-arm-kernel

Kukjin Kim wrote:
> Heiko St?bner wrote:
>> Am Montag 12 M?rz 2012, 19:59:32 schrieb Heiko St?bner:
>>> The S3C2416/S3C2443/S3C2450 SoCs contain HSSPI controllers compatible
>>> with the ones in the S3C64xx and later.
>>>
>>> The second patch modifying the dma selection depends on the series
>>> enabling the dma support on the S3C2416, but as the whole s3c64xx-spi
>>> driver needs dma support this should be ok.
>>>
>>> Tested on an Asus DR-900 ebook reader with a Marvell MR8686 using the
>>> libertas driver.
>>>
>>>
>>> This is a repost of the series adapted to changes resulting from the
>>> other cleanup series.
>>
>> ping :-)
>>
> Thanks for your reminder ;)
> Let me review it soon.
>
Heiko, sorry for late.
Looks ok to me, will apply.

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.

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

end of thread, other threads:[~2012-04-25  1:37 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-12 18:59 [PATCH 0/6] S3C24XX: Add support for HSSPI on S3C2416/S3C2443 Heiko Stübner
2012-03-12 19:00 ` [PATCH 1/6] ARM: S3C24XX: Add forgotten clock lookup table to S3C2443 Heiko Stübner
2012-04-02 21:08   ` Kukjin Kim
2012-04-02 22:37     ` Heiko Stübner
2012-04-25  1:36       ` Kukjin Kim
2012-03-12 19:01 ` [PATCH 2/6] ARM: S3C24XX: claim spi channels for hsspi in dma-s3c2443 Heiko Stübner
2012-03-12 19:01 ` [PATCH 3/6] ARM: S3C24XX: Add map entries needed by the s3c64xx-spi devices Heiko Stübner
2012-03-12 19:02 ` [PATCH 4/6] ARM: S3C24XX: Add clock-lookup entries required by s3c64xx-spi Heiko Stübner
2012-03-12 19:03 ` [PATCH v2 5/6] ARM: S3C24XX: Add HSSPI setup callback for s3c64xx-spi driver Heiko Stübner
2012-03-12 19:03 ` [PATCH 6/6] spi/s3c64xx: Allow usage for ARCH_S3C24XX Heiko Stübner
2012-04-02 19:25 ` [PATCH 0/6] S3C24XX: Add support for HSSPI on S3C2416/S3C2443 Heiko Stübner
2012-04-02 21:00   ` Kukjin Kim
2012-04-25  1:37     ` Kukjin Kim
  -- strict thread matches above, loose matches on Subject: below --
2012-03-04 18:02 Heiko Stübner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).