SPI platform device consolidation
Subsystems (3)
cover SPI platform device consolidation
SPI platform devices are defined in respective machine folder of Samsung S3C64XX and S5P series SoCs.This patchset moves S3C64XX and S5P series of SPI platform devices to a common place plat-samsung. This patchset also creates SPI setup files for GPIO configurations and initializes the platform specific data in the corresponding machine file.
Padmavathi Venna (6):
ARM: SAMSUNG: Consolidation of SPI platform devices to
plat-samsung
ARM: S3C64XX: Modified files for SPI consolidation work
ARM: S5PC100: Modified files for SPI consolidation work.
ARM: S5P64X0: Modified files for SPI consolidation work
ARM: S5PV210: Modified files for SPI consolidation work
The following patch make the corresponding SPI changes required for Wolfson Cragganmore S3C6410 variant. This patch is only build tested.
ARM: S3C64XX: Modified according to SPI consolidation work.
arch/arm/mach-s3c64xx/Kconfig | 8 +- arch/arm/mach-s3c64xx/Makefile | 2 +- arch/arm/mach-s3c64xx/dev-spi.c | 172 ----------------- arch/arm/mach-s3c64xx/include/mach/map.h | 2 + arch/arm/mach-s3c64xx/mach-crag6410.c | 9 + arch/arm/mach-s3c64xx/mach-smdk6410.c | 19 ++ arch/arm/mach-s3c64xx/setup-spi.c | 32 +++ arch/arm/mach-s5p64x0/Kconfig | 7 +- arch/arm/mach-s5p64x0/Makefile | 2 +- arch/arm/mach-s5p64x0/dev-spi.c | 218 --------------------- arch/arm/mach-s5p64x0/include/mach/map.h | 3 + arch/arm/mach-s5p64x0/mach-smdk6440.c | 19 ++ arch/arm/mach-s5p64x0/mach-smdk6450.c | 19 ++ arch/arm/mach-s5p64x0/setup-spi.c | 42 ++++ arch/arm/mach-s5pc100/Kconfig | 5 + arch/arm/mach-s5pc100/Makefile | 2 +- arch/arm/mach-s5pc100/dev-spi.c | 220 ---------------------- arch/arm/mach-s5pc100/include/mach/map.h | 3 + arch/arm/mach-s5pc100/mach-smdkc100.c | 31 +++ arch/arm/mach-s5pc100/setup-spi.c | 43 +++++ arch/arm/mach-s5pv210/Kconfig | 5 + arch/arm/mach-s5pv210/Makefile | 2 +- arch/arm/mach-s5pv210/dev-spi.c | 169 ----------------- arch/arm/mach-s5pv210/include/mach/map.h | 2 + arch/arm/mach-s5pv210/mach-smdkv210.c | 21 ++ arch/arm/mach-s5pv210/setup-spi.c | 36 ++++ arch/arm/plat-samsung/Kconfig | 14 ++- arch/arm/plat-samsung/devs.c | 112 +++++++++++ arch/arm/plat-samsung/include/plat/devs.h | 8 +- arch/arm/plat-samsung/include/plat/s3c64xx-spi.h | 16 +- 30 files changed, 444 insertions(+), 799 deletions(-) delete mode 100644 arch/arm/mach-s3c64xx/dev-spi.c create mode 100644 arch/arm/mach-s3c64xx/setup-spi.c delete mode 100644 arch/arm/mach-s5p64x0/dev-spi.c create mode 100644 arch/arm/mach-s5p64x0/setup-spi.c delete mode 100644 arch/arm/mach-s5pc100/dev-spi.c create mode 100644 arch/arm/mach-s5pc100/setup-spi.c delete mode 100644 arch/arm/mach-s5pv210/dev-spi.c create mode 100644 arch/arm/mach-s5pv210/setup-spi.c
PATCH 1/6 ARM: SAMSUNG: Consolidation of SPI platform devices to plat-samsung
SPI platform device definitions consolidated from respective machine folder to plat-samsung
--- arch/arm/mach-s3c64xx/Makefile | 1 - arch/arm/mach-s3c64xx/dev-spi.c | 172 ----------------- arch/arm/mach-s5p64x0/Makefile | 1 - arch/arm/mach-s5p64x0/dev-spi.c | 218 --------------------- arch/arm/mach-s5pc100/Makefile | 1 - arch/arm/mach-s5pc100/dev-spi.c | 220 ---------------------- arch/arm/mach-s5pv210/Makefile | 1 - arch/arm/mach-s5pv210/dev-spi.c | 169 ----------------- arch/arm/plat-samsung/Kconfig | 14 ++- arch/arm/plat-samsung/devs.c | 112 +++++++++++ arch/arm/plat-samsung/include/plat/devs.h | 8 +- arch/arm/plat-samsung/include/plat/s3c64xx-spi.h | 13 +- 12 files changed, 133 insertions(+), 797 deletions(-) delete mode 100644 arch/arm/mach-s3c64xx/dev-spi.c delete mode 100644 arch/arm/mach-s5p64x0/dev-spi.c delete mode 100644 arch/arm/mach-s5pc100/dev-spi.c delete mode 100644 arch/arm/mach-s5pv210/dev-spi.c
arch/arm/mach-s3c64xx/Makefile +0 -1
@@ -59,4 +59,3 @@ obj-$(CONFIG_MACH_WLF_CRAGG_6410) += mach-crag6410.o mach-crag6410-module.o obj-y += dev-uart.o obj-y += dev-audio.o -obj-$(CONFIG_S3C64XX_DEV_SPI) += dev-spi.o
arch/arm/mach-s3c64xx/dev-spi.c deleted +0 -172
172 lines not on this page · raw message
arch/arm/mach-s5p64x0/Makefile +0 -1
@@ -26,7 +26,6 @@ obj-$(CONFIG_MACH_SMDK6450) += mach-smdk6450.o # device support obj-y += dev-audio.o -obj-$(CONFIG_S3C64XX_DEV_SPI) += dev-spi.o obj-$(CONFIG_S5P64X0_SETUP_I2C1) += setup-i2c1.o obj-$(CONFIG_S5P64X0_SETUP_FB_24BPP) += setup-fb-24bpp.o
arch/arm/mach-s5p64x0/dev-spi.c deleted +0 -218
218 lines not on this page · raw message
arch/arm/mach-s5pc100/Makefile +0 -1
@@ -25,7 +25,6 @@ obj-$(CONFIG_S5PC100_SETUP_SDHCI_GPIO) += setup-sdhci-gpio.o # device support obj-y += dev-audio.o -obj-$(CONFIG_S3C64XX_DEV_SPI) += dev-spi.o # machine support
arch/arm/mach-s5pc100/dev-spi.c deleted +0 -220
220 lines not on this page · raw message
arch/arm/mach-s5pv210/Makefile +0 -1
@@ -27,7 +27,6 @@ obj-$(CONFIG_MACH_TORBRECK) += mach-torbreck.o # device support obj-y += dev-audio.o -obj-$(CONFIG_S3C64XX_DEV_SPI) += dev-spi.o obj-$(CONFIG_S5PV210_SETUP_FB_24BPP) += setup-fb-24bpp.o obj-$(CONFIG_S5PV210_SETUP_FIMC) += setup-fimc.o
arch/arm/mach-s5pv210/dev-spi.c deleted +0 -169
169 lines not on this page · raw message
arch/arm/plat-samsung/Kconfig +13 -1
@@ -226,7 +226,19 @@ config SAMSUNG_DEV_IDE help Compile in platform device definitions for IDE -config S3C64XX_DEV_SPI +config S3C64XX_DEV_SPI0 + bool + help + Compile in platform device definitions for S3C64XX's type + SPI controllers. + +config S3C64XX_DEV_SPI1 + bool + help + Compile in platform device definitions for S3C64XX's type + SPI controllers. + +config S3C64XX_DEV_SPI2 bool help Compile in platform device definitions for S3C64XX's type
arch/arm/plat-samsung/devs.c +112 -0
121 lines not on this page · raw message
arch/arm/plat-samsung/include/plat/devs.h +1 -7
@@ -39,6 +39,7 @@ extern struct platform_device s3c64xx_device_pcm0;extern struct platform_device s3c64xx_device_pcm1;extern struct platform_device s3c64xx_device_spi0;extern struct platform_device s3c64xx_device_spi1; +extern struct platform_device s3c64xx_device_spi2;extern struct platform_device s3c_device_adc;extern struct platform_device s3c_device_cfcon;
@@ -98,8 +99,6 @@ extern struct platform_device s5p6450_device_iis1;extern struct platform_device s5p6450_device_iis2;extern struct platform_device s5p6450_device_pcm0; -extern struct platform_device s5p64x0_device_spi0; -extern struct platform_device s5p64x0_device_spi1;extern struct platform_device s5pc100_device_ac97;extern struct platform_device s5pc100_device_iis0;
@@ -108,9 +107,6 @@ extern struct platform_device s5pc100_device_iis2;extern struct platform_device s5pc100_device_pcm0;extern struct platform_device s5pc100_device_pcm1;extern struct platform_device s5pc100_device_spdif; -extern struct platform_device s5pc100_device_spi0; -extern struct platform_device s5pc100_device_spi1; -extern struct platform_device s5pc100_device_spi2;extern struct platform_device s5pv210_device_ac97;extern struct platform_device s5pv210_device_iis0;
@@ -120,8 +116,6 @@ extern struct platform_device s5pv210_device_pcm0;extern struct platform_device s5pv210_device_pcm1;extern struct platform_device s5pv210_device_pcm2;extern struct platform_device s5pv210_device_spdif; -extern struct platform_device s5pv210_device_spi0; -extern struct platform_device s5pv210_device_spi1;extern struct platform_device exynos4_device_ac97;extern struct platform_device exynos4_device_ahci;
arch/arm/plat-samsung/include/plat/s3c64xx-spi.h +7 -6
@@ -58,16 +58,17 @@ struct s3c64xx_spi_info {/** * s3c64xx_spi_set_info - SPI Controller configure callback by the board * initialization code. -* @cntrlr: SPI controller number the configuration is for. +* @pd: SPI platform data to set. * @src_clk_nr: Clock the SPI controller is to use to generate SPI clocks. * @num_cs: Number of elements in the 'cs' array. * * Call this from machine init code for each SPI Controller that * has some chips attached to it. */ -extern void s3c64xx_spi_set_info (int cntrlr,int src_clk_nr,int num_cs); -extern void s5pc100_spi_set_info (int cntrlr,int src_clk_nr,int num_cs); -extern void s5pv210_spi_set_info (int cntrlr,int src_clk_nr,int num_cs); -extern void s5p64x0_spi_set_info (int cntrlr,int src_clk_nr,int num_cs); - +extern void s3c64xx_spi0_set_info (struct s3c64xx_spi_info *pd,int src_clk_nr, +int num_cs); +extern void s3c64xx_spi1_set_info (struct s3c64xx_spi_info *pd,int src_clk_nr, +int num_cs); +extern void s3c64xx_spi2_set_info (struct s3c64xx_spi_info *pd,int src_clk_nr, +int num_cs);#endif /* __S3C64XX_PLAT_SPI_H */
Signature · 1 line
1.7.0.4
PATCH 1/6 ARM: SAMSUNG: Consolidation of SPI platform devices to plat-samsung
Quoted 10 lines · Padmavathi Venna
SPI platform device definitions consolidated from respective machine folder to plat-samsung
Signed-off-by Padmavathi Venna <[email protected]>--- arch/arm/mach-s3c64xx/Makefile | 1 - arch/arm/mach-s3c64xx/dev-spi.c | 172 ----------------- arch/arm/mach-s5p64x0/Makefile | 1 - arch/arm/mach-s5p64x0/dev-spi.c | 218
---------------------
Quoted 2 lines
arch/arm/mach-s5pc100/Makefile | 1 - arch/arm/mach-s5pc100/dev-spi.c | 220
----------------------
Quoted 12 lines
arch/arm/mach-s5pv210/Makefile | 1 - arch/arm/mach-s5pv210/dev-spi.c | 169 ----------------- arch/arm/plat-samsung/Kconfig | 14 ++- arch/arm/plat-samsung/devs.c | 112 +++++++++++ arch/arm/plat-samsung/include/plat/devs.h | 8 +- arch/arm/plat-samsung/include/plat/s3c64xx-spi.h | 13 +- 12 files changed, 133 insertions(+), 797 deletions(-) delete mode 100644 arch/arm/mach-s3c64xx/dev-spi.c delete mode 100644 arch/arm/mach-s5p64x0/dev-spi.c delete mode 100644 arch/arm/mach-s5pc100/dev-spi.c delete mode 100644 arch/arm/mach-s5pv210/dev-spi.c
Hi Padma,
Basically, looks good and there are some comments below.
(snip)
Quoted 12 lines
arch/arm/plat-samsung/Kconfig +3
-1@@ -226,7 +226,19 @@ config SAMSUNG_DEV_IDE help Compile in platform device definitions for IDE -config S3C64XX_DEV_SPI +config S3C64XX_DEV_SPI0 + bool + help
arch/arm/plat-samsung/Kconfig config SAMSUNG_DEV_IDE · line 241
Quoted 10 lines
arch/arm/plat-samsung/Kconfig +10
-0+ Compile in platform device definitions for S3C64XX's type + SPI controllers. + +config S3C64XX_DEV_SPI1 + bool + help + Compile in platform device definitions for S3C64XX's type + SPI controllers. + +config S3C64XX_DEV_SPI2
Yeah, needs above config to check the channel now...but I'm thinking need to sort out it anyway.
Quoted 31 lines
arch/arm/plat-samsung/Kconfig +0
-0bool help Compile in platform device definitions for S3C64XX's typearch/arm/plat-samsung/devs.c +13
-0@@ -61,6 +61,7 @@#include <plat/regs-iic.h> #include <plat/regs-serial.h> #include <plat/regs-spi.h> +#include <plat/s3c64xx-spi.h> static u64 samsung_device_dma_mask =DMA_BIT_MASK (32 );@@ -1461,3 +1462,114 @@ struct platform_device s3c_device_wdt = { .resource = s3c_wdt_resource, };#endif /* CONFIG_S3C_DEV_WDT */ + +#ifdef CONFIG_S3C64XX_DEV_SPI0 +static struct resource s3c64xx_spi0_resource[] = { + [0 ] =DEFINE_RES_MEM (S3C_PA_SPI0 ,SZ_256 ), + [1 ] =DEFINE_RES_DMA (DMACH_SPI0_TX ), + [2 ] =DEFINE_RES_DMA (DMACH_SPI0_RX ), + [3 ] =DEFINE_RES_IRQ (IRQ_SPI0 ), +}; + +struct platform_device s3c64xx_device_spi0 = { + .name ="s3c64xx-spi" , + .id = 0,
arch/arm/plat-samsung/devs.c struct platform_device s3c_device_wdt = { · line 1486
Quoted 10 lines
arch/arm/plat-samsung/devs.c +10
-0+ .num_resources = ARRAY_SIZE(s3c64xx_spi0_resource), + .resource = s3c64xx_spi0_resource, + .dev = { + .dma_mask = &samsung_device_dma_mask, + .coherent_dma_mask = DMA_BIT_MASK(32), + }, +}; + +void __init s3c64xx_spi0_set_info (struct s3c64xx_spi_info *pd, +int src_clk_nr,int num_cs)
How about 's3c64xx_spi_set_platdata' like others in plat-samsung/devs.c?
arch/arm/plat-samsung/devs.c struct platform_device s3c_device_wdt = { · line 1491
Quoted 5 lines
arch/arm/plat-samsung/devs.c +5
-0+{ +if (!pd) { +pr_err ("%s:Need to pass platform data\n" , __func__); +return ; + }
Needs empty line here.
arch/arm/plat-samsung/devs.c struct platform_device s3c_device_wdt = { · line 1496
Quoted 5 lines
arch/arm/plat-samsung/devs.c +5
-0+/* Reject invalid configuration */ +if (!num_cs || src_clk_nr <0 ) { +pr_err ("%s: Invalid SPI configuration\n" , __func__); +return ; + }
Same as above.
arch/arm/plat-samsung/devs.c struct platform_device s3c_device_wdt = { · line 1499
Quoted 3 lines
arch/arm/plat-samsung/devs.c +3
-0+ pd->num_cs = num_cs; + pd->src_clk_nr = src_clk_nr; +s3c_set_platdata (pd,sizeof (*pd), &s3c64xx_device_spi0);
If we know the SPI controller number here, we can merge this function to just one. So how about to add it to the 'struct s3c64xx_spi_info'?
arch/arm/plat-samsung/devs.c struct platform_device s3c_device_wdt = { · line 1500
Quoted 1 line
arch/arm/plat-samsung/devs.c +1
-0+}
(snip)
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
PATCH 1/6 ARM: SAMSUNG: Consolidation of SPI platform devices to plat-samsung
Hi Kukjin,
Quoted 104 lines · Kukjin Kim
Quoted 10 lines · Padmavathi Venna
SPI platform device definitions consolidated from respective machine folder to plat-samsung
Signed-off-by Padmavathi Venna <[email protected]>---
?arch/arm/mach-s3c64xx/Makefile ? ? ? ? ? ? ? ? ? | ? ?1 - ?arch/arm/mach-s3c64xx/dev-spi.c ? ? ? ? ? ? ? ? ?| ?172 ----------------- ?arch/arm/mach-s5p64x0/Makefile ? ? ? ? ? ? ? ? ? | ? ?1 - ?arch/arm/mach-s5p64x0/dev-spi.c ? ? ? ? ? ? ? ? ?| ?218---------------------
Quoted 2 lines
?arch/arm/mach-s5pc100/Makefile ? ? ? ? ? ? ? ? ? | ? ?1 - ?arch/arm/mach-s5pc100/dev-spi.c ? ? ? ? ? ? ? ? ?| ?220
----------------------
Quoted 6 lines
?arch/arm/mach-s5pv210/Makefile ? ? ? ? ? ? ? ? ? | ? ?1 - ?arch/arm/mach-s5pv210/dev-spi.c ? ? ? ? ? ? ? ? ?| ?169 ----------------- ?arch/arm/plat-samsung/Kconfig ? ? ? ? ? ? ? ? ? ?| ? 14 ++- ?arch/arm/plat-samsung/devs.c ? ? ? ? ? ? ? ? ? ? | ?112 +++++++++++ ?arch/arm/plat-samsung/include/plat/devs.h ? ? ? ?| ? ?8 +- ?arch/arm/plat-samsung/include/plat/s3c64xx-spi.h | ? 13 +-Quoted 6 lines
?12 files changed, 133 insertions(+), 797 deletions(-) ?delete mode 100644
arch/arm/mach-s3c64xx/dev-spi.c?delete mode 100644arch/arm/mach-s5p64x0/dev-spi.c?delete mode 100644arch/arm/mach-s5pc100/dev-spi.c?delete mode 100644arch/arm/mach-s5pv210/dev-spi.cHi Padma,
Basically, looks good and there are some comments below.
(snip)
Quoted 12 lines
arch/arm/plat-samsung/Kconfig +0
-0@@ -226,7 +226,19 @@ config SAMSUNG_DEV_IDE? ? ? help
? ? ? ? Compile in platform device definitions for IDEarch/arm/plat-samsung/Kconfig +3
-1-config S3C64XX_DEV_SPI +config S3C64XX_DEV_SPI0 + ? ? bool + ? ? helparch/arm/plat-samsung/Kconfig
Quoted 10 lines
arch/arm/plat-samsung/Kconfig +10
-0+ ? ? ? Compile in platform device definitions for S3C64XX's type + ? ? ? SPI controllers. + +config S3C64XX_DEV_SPI1 + ? ? bool + ? ? help + ? ? ? Compile in platform device definitions for S3C64XX's type + ? ? ? SPI controllers. + +config S3C64XX_DEV_SPI2Yeah, needs above config to check the channel now...but I'm thinking need to sort out it anyway.
Quoted 31 lines
? ? ? bool
? ? ? help
? ? ? ? Compile in platform device definitions for S3C64XX's typearch/arm/plat-samsung/devs.c +0
-0@@ -61,6 +61,7 @@?#include <
plat/regs-iic.h>
?#include <plat/regs-serial.h>
?#include <plat/regs-spi.h>
+#include <plat/s3c64xx-spi.h>?static u64
samsung_device_dma_mask=DMA_BIT_MASK(32);arch/arm/plat-samsung/devs.c +0
-0@@ -1461,3 +1462,114 @@ struct platform_device s3c_device_wdt = { ? ? ? .resource ? ? ? = s3c_wdt_resource, ?};?#endif /*
CONFIG_S3C_DEV_WDT*/arch/arm/plat-samsung/devs.c +12
-0+ +#ifdef CONFIG_S3C64XX_DEV_SPI0 +static struct resource s3c64xx_spi0_resource[] = { + ? ? [0] = DEFINE_RES_MEM(S3C_PA_SPI0, SZ_256), + ? ? [1] = DEFINE_RES_DMA(DMACH_SPI0_TX), + ? ? [2] = DEFINE_RES_DMA(DMACH_SPI0_RX), + ? ? [3] = DEFINE_RES_IRQ(IRQ_SPI0), +}; + +struct platform_device s3c64xx_device_spi0 = { + ? ? .name ? ? ? ? ? = "s3c64xx-spi", + ? ? .id ? ? ? ? ? ? = 0,arch/arm/plat-samsung/devs.c
Quoted 10 lines
arch/arm/plat-samsung/devs.c +10
-0+ ? ? .num_resources ?= ARRAY_SIZE(s3c64xx_spi0_resource), + ? ? .resource ? ? ? = s3c64xx_spi0_resource, + ? ? .dev = { + ? ? ? ? ? ? .dma_mask ? ? ? ? ? ? ? = &samsung_device_dma_mask, + ? ? ? ? ? ? .coherent_dma_mask ? ? ?= DMA_BIT_MASK(32), + ? ? }, +}; + +void __init s3c64xx_spi0_set_info(struct s3c64xx_spi_info *pd, + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? int src_clk_nr, int num_cs)How about '
s3c64xx_spi_set_platdata' like others inplat-samsung/devs.c?
Quoted 7 lines
Quoted 5 lines
+{
+ ? ? if (!pd) {
+ ? ? ? ? ? ?pr_err("%s:Need to pass platform data\n", __func__);
+ ? ? ? ? ? ? return;
+ ? ? }Needs empty line here.
Okey.
Quoted 8 lines
Quoted 6 lines
+ ? ? /* Reject invalid configuration */
+ ? ? if (!num_cs ||src_clk_nr< 0) {
+ ? ? ? ? ? ?pr_err("%s: Invalid SPI configuration\n", __func__);
+ ? ? ? ? ? ? return;
+ ? ? }Same as above.
Okey.
Quoted 7 lines
Quoted 4 lines
+ ? ?
pd->num_cs=num_cs;
+ ? ?pd->src_clk_nr=src_clk_nr;
+ ? ?s3c_set_platdata(pd, sizeof(*pd), &s3c64xx_device_spi0);If we know the SPI controller number here, we can merge this function to just one. So how about to add it to the 'struct
s3c64xx_spi_info'?
Yes. It is good to have the controller number in the SPI Controller defining structure.
So I will rebase the patches based on latest for-next branch and submit the patches.
Thanks&Regards
Padma
Quoted 13 lines
Quoted 1 line
+}
(snip)
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
PATCH 2/6 ARM: S3C64XX: Modified files for SPI consolidation work
In reply to Padmavathi VennaAs SPI platform devices are consolidated to plat-samsung, some corresponding changes are required in the respective machine folder. Setup files are added for SPI GPIO configurations.
SPI platform specific data is initialized in the corresponding machine file.
--- arch/arm/mach-s3c64xx/Kconfig | 5 +++ arch/arm/mach-s3c64xx/Makefile | 1 + arch/arm/mach-s3c64xx/include/mach/map.h | 2 + arch/arm/mach-s3c64xx/mach-smdk6410.c | 19 +++++++++++++ arch/arm/mach-s3c64xx/setup-spi.c | 32 ++++++++++++++++++++++ arch/arm/plat-samsung/include/plat/s3c64xx-spi.h | 4 +++ 6 files changed, 63 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-s3c64xx/setup-spi.c
arch/arm/mach-s3c64xx/Kconfig +5 -0
@@ -77,6 +77,11 @@ config S3C64XX_SETUP_SDHCI_GPIO help Common setup code for S3C64XX SDHCI GPIO configurations +config S3C64XX_SETUP_SPI + bool + help + Common setup code for SPI GPIO configurations + # S36400 Macchine support config MACH_SMDK6400
arch/arm/mach-s3c64xx/Makefile +1 -0
@@ -34,6 +34,7 @@ obj-$(CONFIG_S3C64XX_SETUP_IDE) += setup-ide.o obj-$(CONFIG_S3C64XX_SETUP_KEYPAD) += setup-keypad.o obj-$(CONFIG_S3C64XX_SETUP_FB_24BPP) += setup-fb-24bpp.o obj-$(CONFIG_S3C64XX_SETUP_SDHCI_GPIO) += setup-sdhci-gpio.o +obj-$(CONFIG_S3C64XX_SETUP_SPI) += setup-spi.o # PM
arch/arm/mach-s3c64xx/include/mach/map.h +2 -0
@@ -115,6 +115,8 @@#define S3C_PA_USB_HSOTG S3C64XX_PA_USB_HSOTG#define S3C_PA_RTC S3C64XX_PA_RTC#define S3C_PA_WDT S3C64XX_PA_WATCHDOG +#define S3C_PA_SPI0 S3C64XX_PA_SPI0 +#define S3C_PA_SPI1 S3C64XX_PA_SPI1#define SAMSUNG_PA_ADC S3C64XX_PA_ADC#define SAMSUNG_PA_CFCON S3C64XX_PA_CFCON
arch/arm/mach-s3c64xx/mach-smdk6410.c +19 -0
@@ -72,6 +72,7 @@#include <plat/keypad.h> #include <plat/backlight.h> #include <plat/regs-fb-v4.h> +#include <plat/s3c64xx-spi.h> #define UCON S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK#define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB
@@ -262,6 +263,24 @@ static struct samsung_keypad_platdata smdk6410_keypad_data __initdata = { .cols = 8, }; +#ifdef CONFIG_S3C64XX_DEV_SPI0 +static struct s3c64xx_spi_info smdk6410_spi0_pdata__initdata = { + .cfg_gpio = s3c64xx_spi0_cfg_gpio, + .fifo_lvl_mask =0x7f , + .rx_lvl_offset =13 , + .tx_st_done =21 , +}; +#endif + +#ifdef CONFIG_S3C64XX_DEV_SPI1 +static struct s3c64xx_spi_info smdk6410_spi1_pdata__initdata = { + .cfg_gpio = s3c64xx_spi1_cfg_gpio, + .fifo_lvl_mask =0x7f , + .rx_lvl_offset =13 , + .tx_st_done =21 , +}; +#endif +static struct map_desc smdk6410_iodesc[] = {};static struct platform_device *smdk6410_devices[]__initdata = {
arch/arm/mach-s3c64xx/setup-spi.c new file +32 -0
@@ -0,0 +1,32 @@ +/* linux/arch/arm/mach-s3c64xx/setup-spi.c +* +* 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> + +#ifdef CONFIG_S3C64XX_DEV_SPI0 +int s3c64xx_spi0_cfg_gpio (struct platform_device *dev) +{ +s3c_gpio_cfgall_range (S3C64XX_GPC (0 ),3 , +S3C_GPIO_SFN (2 ),S3C_GPIO_PULL_UP ); +return 0 ; +} +#endif + +#ifdef CONFIG_S3C64XX_DEV_SPI1 +int s3c64xx_spi1_cfg_gpio (struct platform_device *dev) +{ +s3c_gpio_cfgall_range (S3C64XX_GPC (4 ),3 , +S3C_GPIO_SFN (2 ),S3C_GPIO_PULL_UP ); +return 0 ; +} +#endif
arch/arm/plat-samsung/include/plat/s3c64xx-spi.h +4 -0
@@ -71,4 +71,8 @@ extern void s3c64xx_spi1_set_info(struct s3c64xx_spi_info *pd, int src_clk_nr, int num_cs);extern void s3c64xx_spi2_set_info (struct s3c64xx_spi_info *pd,int src_clk_nr,int num_cs); + +/* defined by architecture to configure gpio */ +extern int s3c64xx_spi0_cfg_gpio (struct platform_device *dev); +extern int s3c64xx_spi1_cfg_gpio (struct platform_device *dev);#endif /* __S3C64XX_PLAT_SPI_H */
Signature · 1 line
1.7.0.4
PATCH 3/6 ARM: S5PC100: Modified files for SPI consolidation work.
In reply to Padmavathi VennaAs SPI platform devices are consolidated to plat-samsung, some corresponding changes are required in the respective machine folder. Setup files are added for SPI GPIO configurations.
SPI platform specific data is initialized in the corresponding machine file.
--- arch/arm/mach-s5pc100/Kconfig | 5 +++ arch/arm/mach-s5pc100/Makefile | 1 + arch/arm/mach-s5pc100/include/mach/map.h | 3 ++ arch/arm/mach-s5pc100/mach-smdkc100.c | 31 ++++++++++++++++ arch/arm/mach-s5pc100/setup-spi.c | 43 ++++++++++++++++++++++ arch/arm/plat-samsung/include/plat/s3c64xx-spi.h | 1 + 6 files changed, 84 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-s5pc100/setup-spi.c
arch/arm/mach-s5pc100/Kconfig +5 -0
@@ -45,6 +45,11 @@ config S5PC100_SETUP_SDHCI_GPIO help Common setup code for SDHCI gpio. +config S5PC100_SETUP_SPI + bool + help + Common setup code for SPI GPIO configurations. + config MACH_SMDKC100 bool "SMDKC100" select CPU_S5PC100
arch/arm/mach-s5pc100/Makefile +1 -0
@@ -22,6 +22,7 @@ obj-$(CONFIG_S5PC100_SETUP_I2C1) += setup-i2c1.o obj-$(CONFIG_S5PC100_SETUP_IDE) += setup-ide.o obj-$(CONFIG_S5PC100_SETUP_KEYPAD) += setup-keypad.o obj-$(CONFIG_S5PC100_SETUP_SDHCI_GPIO) += setup-sdhci-gpio.o +obj-$(CONFIG_S5PC100_SETUP_SPI) += setup-spi.o # device support obj-y += dev-audio.o
arch/arm/mach-s5pc100/include/mach/map.h +3 -0
@@ -100,6 +100,9 @@#define S3C_PA_USB_HSOTG S5PC100_PA_USB_HSOTG#define S3C_PA_USB_HSPHY S5PC100_PA_USB_HSPHY#define S3C_PA_WDT S5PC100_PA_WATCHDOG +#define S3C_PA_SPI0 S5PC100_PA_SPI0 +#define S3C_PA_SPI1 S5PC100_PA_SPI1 +#define S3C_PA_SPI2 S5PC100_PA_SPI2#define S5P_PA_CHIPID S5PC100_PA_CHIPID#define S5P_PA_FIMC0 S5PC100_PA_FIMC0
arch/arm/mach-s5pc100/mach-smdkc100.c +31 -0
@@ -52,6 +52,7 @@#include <plat/audio.h> #include <plat/backlight.h> #include <plat/regs-fb-v4.h> +#include <plat/s3c64xx-spi.h> /* Following are default values for UCON, ULCON and UFCON UART registers */ #define SMDKC100_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \
@@ -180,6 +181,36 @@ static struct samsung_keypad_platdata smdkc100_keypad_data __initdata = { .cols = 8, }; +#ifdef CONFIG_S3C64XX_DEV_SPI0 +static struct s3c64xx_spi_info smdkc100_spi0_pdata__initdata = { + .cfg_gpio = s3c64xx_spi0_cfg_gpio, + .fifo_lvl_mask =0x7f , + .rx_lvl_offset =13 , + .high_speed =1 , + .tx_st_done =21 , +}; +#endif + +#ifdef CONFIG_S3C64XX_DEV_SPI1 +static struct s3c64xx_spi_info smdkc100_spi1_pdata__initdata = { + .cfg_gpio = s3c64xx_spi1_cfg_gpio, + .fifo_lvl_mask =0x7f , + .rx_lvl_offset =13 , + .high_speed =1 , + .tx_st_done =21 , +}; +#endif + +#ifdef CONFIG_S3C64XX_DEV_SPI2 +static struct s3c64xx_spi_info smdkc100_spi2_pdata__initdata = { + .cfg_gpio = s3c64xx_spi2_cfg_gpio, + .fifo_lvl_mask =0x7f , + .rx_lvl_offset =13 , + .high_speed =1 , + .tx_st_done =21 , +}; +#endif +static struct platform_device *smdkc100_devices[]__initdata = { &s3c_device_adc, &s3c_device_cfcon,
arch/arm/mach-s5pc100/setup-spi.c new file +43 -0
43 lines not on this page · raw message
arch/arm/plat-samsung/include/plat/s3c64xx-spi.h +1 -0
@@ -75,4 +75,5 @@ extern void s3c64xx_spi2_set_info(struct s3c64xx_spi_info *pd, int src_clk_nr,/* defined by architecture to configure gpio */ extern int s3c64xx_spi0_cfg_gpio (struct platform_device *dev);extern int s3c64xx_spi1_cfg_gpio (struct platform_device *dev); +extern int s3c64xx_spi2_cfg_gpio (struct platform_device *dev);#endif /* __S3C64XX_PLAT_SPI_H */
Signature · 1 line
1.7.0.4
PATCH 4/6 ARM: S5P64X0: Modified files for SPI consolidation work
In reply to Padmavathi VennaAs SPI platform devices are consolidated to plat-samsung, some corresponding changes are required in the respective machine folder. Setup files are added for SPI GPIO configurations.
SPI platform specific data is initialized in the corresponding machine file.
--- arch/arm/mach-s5p64x0/Kconfig | 7 +++- arch/arm/mach-s5p64x0/Makefile | 1 + arch/arm/mach-s5p64x0/include/mach/map.h | 3 ++ arch/arm/mach-s5p64x0/mach-smdk6440.c | 19 +++++++++++++ arch/arm/mach-s5p64x0/mach-smdk6450.c | 19 +++++++++++++ arch/arm/mach-s5p64x0/setup-spi.c | 42 ++++++++++++++++++++++++++++++ 6 files changed, 89 insertions(+), 2 deletions(-) create mode 100644 arch/arm/mach-s5p64x0/setup-spi.c
arch/arm/mach-s5p64x0/Kconfig +5 -2
@@ -36,6 +36,11 @@ config S5P64X0_SETUP_I2C1 help Common setup code for i2c bus 1. +config S5P64X0_SETUP_SPI + bool + help + Common setup code for SPI GPIO configurations + # machine support config MACH_SMDK6440
@@ -45,7 +50,6 @@ config MACH_SMDK6440 select S3C_DEV_I2C1 select S3C_DEV_RTC select S3C_DEV_WDT - select S3C64XX_DEV_SPI select SAMSUNG_DEV_ADC select SAMSUNG_DEV_BACKLIGHT select SAMSUNG_DEV_PWM
@@ -62,7 +66,6 @@ config MACH_SMDK6450 select S3C_DEV_I2C1 select S3C_DEV_RTC select S3C_DEV_WDT - select S3C64XX_DEV_SPI select SAMSUNG_DEV_ADC select SAMSUNG_DEV_BACKLIGHT select SAMSUNG_DEV_PWM
arch/arm/mach-s5p64x0/Makefile +1 -0
@@ -29,3 +29,4 @@ obj-y += dev-audio.o obj-$(CONFIG_S5P64X0_SETUP_I2C1) += setup-i2c1.o obj-$(CONFIG_S5P64X0_SETUP_FB_24BPP) += setup-fb-24bpp.o +obj-$(CONFIG_S5P64X0_SETUP_SPI) += setup-spi.o
arch/arm/mach-s5p64x0/include/mach/map.h +3 -0
@@ -67,6 +67,8 @@#define S3C_PA_RTC S5P64X0_PA_RTC#define S3C_PA_WDT S5P64X0_PA_WDT#define S3C_PA_FB S5P64X0_PA_FB +#define S3C_PA_SPI0 S5P64X0_PA_SPI0 +#define S3C_PA_SPI1 S5P64X0_PA_SPI1#define S5P_PA_CHIPID S5P64X0_PA_CHIPID#define S5P_PA_SROMC S5P64X0_PA_SROMC
@@ -75,6 +77,7 @@#define SAMSUNG_PA_ADC S5P64X0_PA_ADC +/* UART */ #define S5P6440_PA_UART (x) (0xEC000000 + ((x) * S3C_UART_OFFSET))
arch/arm/mach-s5p64x0/mach-smdk6440.c +19 -0
@@ -52,6 +52,7 @@#include <plat/backlight.h> #include <plat/fb.h> #include <plat/regs-fb.h> +#include <plat/s3c64xx-spi.h> #define SMDK6440_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ S3C2410_UCON_RXILEVEL | \
@@ -199,6 +200,24 @@ static struct platform_pwm_backlight_data smdk6440_bl_data = { .pwm_id = 1, }; +#ifdef CONFIG_S3C64XX_DEV_SPI0 +static struct s3c64xx_spi_info smdk6440_spi0_pdata__initdata = { + .cfg_gpio = s3c64xx_spi0_cfg_gpio, + .fifo_lvl_mask =0x1ff , + .rx_lvl_offset =15 , + .tx_st_done =25 , +}; +#endif + +#ifdef CONFIG_S3C64XX_DEV_SPI1 +static struct s3c64xx_spi_info smdk6440_spi1_pdata__initdata = { + .cfg_gpio = s3c64xx_spi1_cfg_gpio, + .fifo_lvl_mask =0x7f , + .rx_lvl_offset =15 , + .tx_st_done =25 , +}; +#endif +static void __init smdk6440_map_io (void ) {s5p_init_io (NULL ,0 ,S5P64X0_SYS_ID );
arch/arm/mach-s5p64x0/mach-smdk6450.c +19 -0
@@ -52,6 +52,7 @@#include <plat/backlight.h> #include <plat/fb.h> #include <plat/regs-fb.h> +#include <plat/s3c64xx-spi.h> #define SMDK6450_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ S3C2410_UCON_RXILEVEL | \
@@ -219,6 +220,24 @@ static struct platform_pwm_backlight_data smdk6450_bl_data = { .pwm_id = 1, }; +#ifdef CONFIG_S3C64XX_DEV_SPI0 +static struct s3c64xx_spi_info smdk6450_spi0_pdata__initdata = { + .cfg_gpio = s3c64xx_spi0_cfg_gpio, + .fifo_lvl_mask =0x1ff , + .rx_lvl_offset =15 , + .tx_st_done =25 , +}; +#endif + +#ifdef CONFIG_S3C64XX_DEV_SPI1 +static struct s3c64xx_spi_info smdk6450_spi1_pdata__initdata = { + .cfg_gpio = s3c64xx_spi1_cfg_gpio, + .fifo_lvl_mask =0x7f , + .rx_lvl_offset =15 , + .tx_st_done =25 , +}; +#endif +static void __init smdk6450_map_io (void ) {s5p_init_io (NULL ,0 ,S5P64X0_SYS_ID );
arch/arm/mach-s5p64x0/setup-spi.c new file +42 -0
42 lines not on this page · raw message
Signature · 1 line
1.7.0.4
PATCH 5/6 ARM: S5PV210: Modified files for SPI consolidation work
In reply to Padmavathi VennaAs SPI platform devices are consolidated to plat-samsung, some corresponding changes are required in the respective machine folder. Setup files are added for SPI GPIO configurations.
SPI platform specific data is initialized in the corresponding machine file.
--- arch/arm/mach-s5pv210/Kconfig | 5 ++++ arch/arm/mach-s5pv210/Makefile | 1 + arch/arm/mach-s5pv210/include/mach/map.h | 2 + arch/arm/mach-s5pv210/mach-smdkv210.c | 21 +++++++++++++++++ arch/arm/mach-s5pv210/setup-spi.c | 36 ++++++++++++++++++++++++++++++ 5 files changed, 65 insertions(+), 0 deletions(-) create mode 100644 arch/arm/mach-s5pv210/setup-spi.c
arch/arm/mach-s5pv210/Kconfig +5 -0
@@ -60,6 +60,11 @@ config S5PV210_SETUP_FIMC help Common setup code for the camera interfaces. +config S5PV210_SETUP_SPI + bool + help + Common setup code for SPI GPIO configurations. + menu "S5PC110 Machines" config MACH_AQUILA
arch/arm/mach-s5pv210/Makefile +1 -0
@@ -35,3 +35,4 @@ obj-$(CONFIG_S5PV210_SETUP_I2C2) += setup-i2c2.o obj-$(CONFIG_S5PV210_SETUP_IDE) += setup-ide.o obj-$(CONFIG_S5PV210_SETUP_KEYPAD) += setup-keypad.o obj-$(CONFIG_S5PV210_SETUP_SDHCI_GPIO) += setup-sdhci-gpio.o +obj-$(CONFIG_S5PV210_SETUP_SPI) += setup-spi.o
arch/arm/mach-s5pv210/include/mach/map.h +2 -0
@@ -109,6 +109,8 @@#define S3C_PA_RTC S5PV210_PA_RTC#define S3C_PA_USB_HSOTG S5PV210_PA_HSOTG#define S3C_PA_WDT S5PV210_PA_WATCHDOG +#define S3C_PA_SPI0 S5PV210_PA_SPI0 +#define S3C_PA_SPI1 S5PV210_PA_SPI1#define S5P_PA_CHIPID S5PV210_PA_CHIPID#define S5P_PA_FIMC0 S5PV210_PA_FIMC0
arch/arm/mach-s5pv210/mach-smdkv210.c +21 -0
@@ -46,6 +46,7 @@#include <plat/s5p-time.h> #include <plat/backlight.h> #include <plat/regs-fb-v4.h> +#include <plat/s3c64xx-spi.h> /* Following are default values for UCON, ULCON and UFCON UART registers */ #define SMDKV210_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \
@@ -275,6 +276,26 @@ static struct platform_pwm_backlight_data smdkv210_bl_data = { .pwm_id = 3, }; +#ifdef CONFIG_S3C64XX_DEV_SPI0 +static struct s3c64xx_spi_info smdkv210_spi0_pdata = { + .cfg_gpio = s3c64xx_spi0_cfg_gpio, + .fifo_lvl_mask =0x1ff , + .rx_lvl_offset =15 , + .high_speed =1 , + .tx_st_done =25 , +}; +#endif + +#ifdef CONFIG_S3C64XX_DEV_SPI1 +static struct s3c64xx_spi_info smdkv210_spi1_pdata = { + .cfg_gpio = s3c64xx_spi1_cfg_gpio, + .fifo_lvl_mask =0x7f , + .rx_lvl_offset =15 , + .high_speed =1 , + .tx_st_done =25 , +}; +#endif +static void __init smdkv210_map_io (void ) {s5p_init_io (NULL ,0 ,S5P_VA_CHIPID );
arch/arm/mach-s5pv210/setup-spi.c new file +36 -0
@@ -0,0 +1,36 @@ +/* linux/arch/arm/mach-s5pv210/setup-spi0.c +* +* 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> + +#ifdef CONFIG_S3C64XX_DEV_SPI0 +int s3c64xx_spi0_cfg_gpio (struct platform_device *dev) +{ +s3c_gpio_cfgpin (S5PV210_GPB (0 ),S3C_GPIO_SFN (2 )); +s3c_gpio_setpull (S5PV210_GPB (0 ),S3C_GPIO_PULL_UP ); +s3c_gpio_cfgall_range (S5PV210_GPB (2 ),2 , +S3C_GPIO_SFN (2 ),S3C_GPIO_PULL_UP ); +return 0 ; +} +#endif + +#ifdef CONFIG_S3C64XX_DEV_SPI1 +int s3c64xx_spi1_cfg_gpio (struct platform_device *dev) +{ +s3c_gpio_cfgpin (S5PV210_GPB (4 ),S3C_GPIO_SFN (2 )); +s3c_gpio_setpull (S5PV210_GPB (4 ),S3C_GPIO_PULL_UP ); +s3c_gpio_cfgall_range (S5PV210_GPB (6 ),2 , +S3C_GPIO_SFN (2 ),S3C_GPIO_PULL_UP ); +return 0 ; +} +#endif
Signature · 1 line
1.7.0.4
PATCH 6/6 ARM: S3C64XX: Modified according to SPI consolidation work.
In reply to Padmavathi VennaAs SPI platform devices are consolidated to plat-samsung, some corresponding changes are required in the respective machine file. SPI platform specific data is initialized in the corresponding machine file.
--- arch/arm/mach-s3c64xx/Kconfig | 3 ++- arch/arm/mach-s3c64xx/mach-crag6410.c | 9 +++++++++ 2 files changed, 11 insertions(+), 1 deletions(-)
arch/arm/mach-s3c64xx/Kconfig +2 -1
@@ -281,6 +281,7 @@ config MACH_WLF_CRAGG_6410 select S3C64XX_SETUP_IDE select S3C64XX_SETUP_FB_24BPP select S3C64XX_SETUP_KEYPAD + select S3C64XX_SETUP_SPI select SAMSUNG_DEV_ADC select SAMSUNG_DEV_KEYPAD select S3C_DEV_USB_HOST
@@ -291,7 +292,7 @@ config MACH_WLF_CRAGG_6410 select S3C_DEV_I2C1 select S3C_DEV_WDT select S3C_DEV_RTC - select S3C64XX_DEV_SPI + select S3C64XX_DEV_SPI0 select S3C24XX_GPIO_EXTRA128 select I2C help
arch/arm/mach-s3c64xx/mach-crag6410.c +9 -0
@@ -669,6 +669,15 @@ static struct s3c_sdhci_platdata crag6410_hsmmc0_pdata = { .cfg_gpio = crag6410_cfg_sdhci0, }; +#ifdef CONFIG_S3C64XX_DEV_SPI0 +static struct s3c64xx_spi_info crag6410_spi0_pdata__initdata = { + .cfg_gpio = s3c64xx_spi0_cfg_gpio, + .fifo_lvl_mask =0x7f , + .rx_lvl_offset =13 , + .tx_st_done =21 , +}; +#endif +static void __init crag6410_machine_init (void ) {/* Open drain IRQs need pullups */
Signature · 1 line
1.7.0.4
PATCH 6/6 ARM: S3C64XX: Modified according to SPI consolidation work.
arch/arm/mach-s3c64xx/mach-crag6410.c static struct s3c_sdhci_platdata crag6410_hsmmc0_pdata = { · line 679
Quoted 8 lines · Padmavathi Venna
arch/arm/mach-s3c64xx/mach-crag6410.c +8
-0+#ifdef CONFIG_S3C64XX_DEV_SPI0 +static struct s3c64xx_spi_info crag6410_spi0_pdata__initdata = { + .cfg_gpio = s3c64xx_spi0_cfg_gpio, + .fifo_lvl_mask =0x7f , + .rx_lvl_offset =13 , + .tx_st_done =21 , +}; +#endif
It seems like a step backwards to have all this stuff in the individual machines - most of this (everything except cfg_gpio pretty much) is a property of the SoC silicon so should be somewhere central for the SoC.
A message that is not in the archive (sent off-list or not yet received): CAAgF-Bcj3vm50YOU4Sq4cGrOE8EHixjOuFrQq-MR6FVLf7Dekg@mail.gmail.com
PATCH 6/6 ARM: S3C64XX: Modified according to SPI consolidation work.
Quoted 2 lines · padma venkat
Hi Mark,
On Fri, Nov 4, 2011 at 4:27 PM, Mark Brown
Quoted 16 lines · <[email protected]> wrote:
arch/arm/mach-s3c64xx/mach-crag6410.c static struct s3c_sdhci_platdata crag6410_hsmmc0_pdata = { · line 679
Quoted 8 lines · Padmavathi Venna
arch/arm/mach-s3c64xx/mach-crag6410.c +8
-0+#ifdef CONFIG_S3C64XX_DEV_SPI0 +static struct s3c64xx_spi_info crag6410_spi0_pdata__initdata = { + ? ? .cfg_gpio ? ? ? = s3c64xx_spi0_cfg_gpio, + ? ? .fifo_lvl_mask ?= 0x7f, + ? ? .rx_lvl_offset ?= 13, + ? ? .tx_st_done ? ? = 21, +}; +#endif It seems like a step backwards to have all this stuff in the individual machines - most of this (everything except
cfg_gpiopretty much) is a property of the SoC silicon so should be somewhere central for the SoC. I Will?move this stuff to SPI setup files and resend the patches. Thanks
Padma
Hi Padma,
Please send text-typed e-mail when you reply :)
And I agree with Mark, how was going on?
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
PATCH 6/6 ARM: S3C64XX: Modified according to SPI consolidation work.
Hi Kukjin,
Quoted 22 lines · Kukjin Kim
Quoted 2 lines · padma venkat
Hi Mark,
On Fri, Nov 4, 2011 at 4:27 PM, Mark BrownQuoted 16 lines · <[email protected]> wrote:
arch/arm/mach-s3c64xx/mach-crag6410.c static struct s3c_sdhci_platdata crag6410_hsmmc0_pdata = { · line 679
Quoted 8 lines · Padmavathi Venna
arch/arm/mach-s3c64xx/mach-crag6410.c +8
-0+#ifdef CONFIG_S3C64XX_DEV_SPI0 +static struct s3c64xx_spi_info crag6410_spi0_pdata__initdata = { + ? ? .cfg_gpio ? ? ? = s3c64xx_spi0_cfg_gpio, + ? ? .fifo_lvl_mask ?= 0x7f, + ? ? .rx_lvl_offset ?= 13, + ? ? .tx_st_done ? ? = 21, +}; +#endif It seems like a step backwards to have all this stuff in the individual machines - most of this (everything except
cfg_gpiopretty much) is a property of the SoC silicon so should be somewhere central for the SoC. I Will?move this stuff to SPI setup files and resend the patches. Thanks
Padma
Quoted 3 lines
Hi Padma,
Please send text-typed e-mail when you reply :)
Okey.
Quoted 2 lines
And I agree with Mark, how was going on?
I will send the patches by tomorrow.
Thanks&Regards
Padma
Quoted 10 lines
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.
cover SPI platform device consolidation
In reply to Padmavathi VennaQuoted 20 lines · Padmavathi Venna
SPI platform devices are defined in respective machine folder of Samsung S3C64XX and S5P series SoCs.This patchset moves S3C64XX and S5P series of SPI platform devices to a common place plat-samsung. This patchset also creates SPI setup files for GPIO configurations and initializes the platform specific data in the corresponding machine file.
Padmavathi Venna (6):
ARM: SAMSUNG: Consolidation of SPI platform devices to
plat-samsung
ARM: S3C64XX: Modified files for SPI consolidation work
ARM: S5PC100: Modified files for SPI consolidation work.
ARM: S5P64X0: Modified files for SPI consolidation work
ARM: S5PV210: Modified files for SPI consolidation workThe following patch make the corresponding SPI changes required for Wolfson Cragganmore S3C6410 variant. This patch is only build tested.
ARM: S3C64XX: Modified according to SPI consolidation work.
Quoted 10 lines
arch/arm/mach-s3c64xx/Kconfig | 8 +- arch/arm/mach-s3c64xx/Makefile | 2 +- arch/arm/mach-s3c64xx/dev-spi.c | 172 ----------------- arch/arm/mach-s3c64xx/include/mach/map.h | 2 + arch/arm/mach-s3c64xx/mach-crag6410.c | 9 + arch/arm/mach-s3c64xx/mach-smdk6410.c | 19 ++ arch/arm/mach-s3c64xx/setup-spi.c | 32 +++ arch/arm/mach-s5p64x0/Kconfig | 7 +- arch/arm/mach-s5p64x0/Makefile | 2 +- arch/arm/mach-s5p64x0/dev-spi.c | 218
---------------------
Quoted 7 lines
arch/arm/mach-s5p64x0/include/mach/map.h | 3 + arch/arm/mach-s5p64x0/mach-smdk6440.c | 19 ++ arch/arm/mach-s5p64x0/mach-smdk6450.c | 19 ++ arch/arm/mach-s5p64x0/setup-spi.c | 42 ++++ arch/arm/mach-s5pc100/Kconfig | 5 + arch/arm/mach-s5pc100/Makefile | 2 +- arch/arm/mach-s5pc100/dev-spi.c | 220
----------------------
Quoted 14 lines
arch/arm/mach-s5pc100/include/mach/map.h | 3 + arch/arm/mach-s5pc100/mach-smdkc100.c | 31 +++ arch/arm/mach-s5pc100/setup-spi.c | 43 +++++ arch/arm/mach-s5pv210/Kconfig | 5 + arch/arm/mach-s5pv210/Makefile | 2 +- arch/arm/mach-s5pv210/dev-spi.c | 169 ----------------- arch/arm/mach-s5pv210/include/mach/map.h | 2 + arch/arm/mach-s5pv210/mach-smdkv210.c | 21 ++ arch/arm/mach-s5pv210/setup-spi.c | 36 ++++ arch/arm/plat-samsung/Kconfig | 14 ++- arch/arm/plat-samsung/devs.c | 112 +++++++++++ arch/arm/plat-samsung/include/plat/devs.h | 8 +- arch/arm/plat-samsung/include/plat/s3c64xx-spi.h | 16 +- 30 files changed, 444 insertions(+), 799 deletions(-)
Quoted 8 lines
delete mode 100644 arch/arm/mach-s3c64xx/dev-spi.c create mode 100644 arch/arm/mach-s3c64xx/setup-spi.c delete mode 100644 arch/arm/mach-s5p64x0/dev-spi.c create mode 100644 arch/arm/mach-s5p64x0/setup-spi.c delete mode 100644 arch/arm/mach-s5pc100/dev-spi.c create mode 100644 arch/arm/mach-s5pc100/setup-spi.c delete mode 100644 arch/arm/mach-s5pv210/dev-spi.c create mode 100644 arch/arm/mach-s5pv210/setup-spi.c
Looks good to consolidate work, but it's merge window so will be back on this after that.
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.