[PATCH 0/7] ARM: SAMSUNG: Cleanup SPI platform specific code
This patchset does the following: 1. Move duplicated code to common place [PATCH 1/7] ARM: SAMSUNG: Move SPI device definitions to plat-samsung SPI platform devices are defined in respective machine folder of Samsung S3C64XX and S5P series SoCs.This is duplicated for every SoC. So all SPI platform devices are moved to a common place. [PATCH 2/7] ARM: SAMSUNG: Define common macro for SPI physical address [PATCH 3/7] ARM: SAMSUNG: Add SPI clock definitions for SAMSUNG SoCs Each SoC has it's own set of clock sources for SPI.So they are defined in respective machine folder. [PATCH 4/7] ARM: SAMSUNG: Create SPI device setup files in respective machine folder [PATCH 5/7] ARM: SAMSUNG: Add SPI platform specific code As SPI platform devices are moved to common place some platform specific code need to be initialized in the respective machine file. [PATCH 6/7] SPI: S5PC100: Enable the SPI driver for S5PC100 [PATCH 7/7] SPI: S5PV210: Enable the SPI driver for S5PV210 arch/arm/mach-s3c64xx/Kconfig| 14 ++ arch/arm/mach-s3c64xx/Makefile |3 +- arch/arm/mach-s3c64xx/dev-spi.c | 177 - arch/arm/mach-s3c64xx/include/mach/map.h |2 + arch/arm/mach-s3c64xx/include/mach/spi-clocks.h |6 + arch/arm/mach-s3c64xx/mach-smdk6410.c| 11 + arch/arm/mach-s3c64xx/setup-spi0.c | 21 ++ arch/arm/mach-s3c64xx/setup-spi1.c | 21 ++ arch/arm/mach-s5p64x0/Kconfig| 20 ++- arch/arm/mach-s5p64x0/Makefile |3 +- arch/arm/mach-s5p64x0/dev-spi.c | 222 - arch/arm/mach-s5p64x0/include/mach/map.h |2 + arch/arm/mach-s5p64x0/include/mach/spi-clocks.h |5 + arch/arm/mach-s5p64x0/mach-smdk6440.c| 11 + arch/arm/mach-s5p64x0/mach-smdk6450.c| 11 + arch/arm/mach-s5p64x0/setup-spi0.c | 31 +++ arch/arm/mach-s5p64x0/setup-spi1.c | 31 +++ arch/arm/mach-s5pc100/Kconfig| 21 ++ arch/arm/mach-s5pc100/Makefile |4 +- arch/arm/mach-s5pc100/dev-spi.c | 223 -- arch/arm/mach-s5pc100/include/mach/map.h |3 + arch/arm/mach-s5pc100/include/mach/spi-clocks.h |6 + arch/arm/mach-s5pc100/mach-smdkc100.c| 19 ++ arch/arm/mach-s5pc100/setup-spi0.c | 21 ++ arch/arm/mach-s5pc100/setup-spi1.c | 21 ++ arch/arm/mach-s5pc100/setup-spi2.c | 23 +++ arch/arm/mach-s5pv210/Kconfig| 14 ++ arch/arm/mach-s5pv210/Makefile |3 +- arch/arm/mach-s5pv210/dev-spi.c | 173 - arch/arm/mach-s5pv210/include/mach/map.h |2 + arch/arm/mach-s5pv210/include/mach/spi-clocks.h |5 + arch/arm/mach-s5pv210/mach-smdkv210.c| 12 ++ arch/arm/mach-s5pv210/setup-spi0.c | 23 +++ arch/arm/mach-s5pv210/setup-spi1.c | 23 +++ arch/arm/plat-samsung/Kconfig| 15 ++- arch/arm/plat-samsung/Makefile |3 + arch/arm/plat-samsung/dev-spi0.c | 87 + arch/arm/plat-samsung/dev-spi1.c | 87 + arch/arm/plat-samsung/dev-spi2.c | 87 + arch/arm/plat-samsung/include/plat/devs.h| 12 +- arch/arm/plat-samsung/include/plat/s3c64xx-spi.h | 18 ++- drivers/spi/Kconfig |3 +- 42 files changed, 677 insertions(+), 822 deletions(-) delete mode 100644 arch/arm/mach-s3c64xx/dev-spi.c create mode 100644 arch/arm/mach-s3c64xx/setup-spi0.c create mode 100644 arch/arm/mach-s3c64xx/setup-spi1.c delete mode 100644 arch/arm/mach-s5p64x0/dev-spi.c create mode 100644 arch/arm/mach-s5p64x0/setup-spi0.c create mode 100644 arch/arm/mach-s5p64x0/setup-spi1.c delete mode 100644 arch/arm/mach-s5pc100/dev-spi.c create mode 100644 arch/arm/mach-s5pc100/setup-spi0.c create mode 100644 arch/arm/mach-s5pc100/setup-spi1.c create mode 100644 arch/arm/mach-s5pc100/setup-spi2.c delete mode 100644 arch/arm/mach-s5pv210/dev-spi.c create mode 100644 arch/arm/mach-s5pv210/setup-spi0.c create mode 100644 arch/arm/mach-s5pv210/setup-spi1.c create mode 100644 arch/arm/plat-samsung/dev-spi0.c create mode 100644 arch/arm/plat-samsung/dev-spi1.c create mode 100644 arch/arm/plat-samsung/dev-spi2.c -- To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 0/7] ARM: SAMSUNG: Cleanup SPI platform specific code
On Thu, Jun 30, 2011 at 5:55 PM, Padmavathi Venna padm...@samsung.com wrote: This patchset does the following: 1. Move duplicated code to common place [PATCH 1/7] ARM: SAMSUNG: Move SPI device definitions to plat-samsung SPI platform devices are defined in respective machine folder of Samsung S3C64XX and S5P series SoCs.This is duplicated for every SoC. So all SPI platform devices are moved to a common place. The machine specific code is put in machine specific location for some reason. And the code is not duplicated, it's mostly data structures initialized with machine specific values. Have you considered if it would still be possible to build kernel image supporting more than 1 soc after your changes ? -- To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [PATCH 0/7] ARM: SAMSUNG: Cleanup SPI platform specific code
Hello, On Thursday, June 30, 2011 2:25 PM Padmavathi Venna wrote: This patchset does the following: 1. Move duplicated code to common place [PATCH 1/7] ARM: SAMSUNG: Move SPI device definitions to plat-samsung SPI platform devices are defined in respective machine folder of Samsung S3C64XX and S5P series SoCs.This is duplicated for every SoC. So all SPI platform devices are moved to a common place. [PATCH 2/7] ARM: SAMSUNG: Define common macro for SPI physical address [PATCH 3/7] ARM: SAMSUNG: Add SPI clock definitions for SAMSUNG SoCs Each SoC has it's own set of clock sources for SPI.So they are defined in respective machine folder. [PATCH 4/7] ARM: SAMSUNG: Create SPI device setup files in respective machine folder [PATCH 5/7] ARM: SAMSUNG: Add SPI platform specific code As SPI platform devices are moved to common place some platform specific code need to be initialized in the respective machine file. [PATCH 6/7] SPI: S5PC100: Enable the SPI driver for S5PC100 [PATCH 7/7] SPI: S5PV210: Enable the SPI driver for S5PV210 These patch set improves a bit platform part of SPI driver, but I really wonder if we really need to pass so many SoC version specific data with platform data. Are all these data (clock list, fifo parameters) specific to SoC version or particular board configuration/implementation? Maybe it will be much easier to convert the SPI driver to use driver id feature and use different platform id's for each SoC version? (please refer to drivers/video/s3c-fb.c and plat-samsung/include/plat/fb-core.h for more information). This will remove the need for SoC specific parameters in platform data and will group all version dependent information in the driver. Best regards -- Marek Szyprowski Samsung Poland RD Center -- To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 0/7] ARM: SAMSUNG: Cleanup SPI platform specific code
Hi, On Thu, Jun 30, 2011 at 1:01 PM, Jassi Brar jassisinghb...@gmail.com wrote: On Thu, Jun 30, 2011 at 5:55 PM, Padmavathi Venna padm...@samsung.com wrote: This patchset does the following: 1. Move duplicated code to common place [PATCH 1/7] ARM: SAMSUNG: Move SPI device definitions to plat-samsung SPI platform devices are defined in respective machine folder of Samsung S3C64XX and S5P series SoCs.This is duplicated for every SoC. So all SPI platform devices are moved to a common place. The machine specific code is put in machine specific location for some reason. And the code is not duplicated, it's mostly data structures initialized with machine specific values. Have you considered if it would still be possible to build kernel image supporting more than 1 soc after your changes ? I didn't consider the single image scenario. Because as far as I know, the existing Samsung code doesn't have support for building a single kernel image for multiple SoCs. The intention behind my changes were 1) To reuse the dev-spi files for all the SoCs, as this reduces the code size. Also future SoCs with SPI can use the same file. 2) To be in line with other IPs like i2c,sdhci etc -- To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ThanksRegards Padma -- To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 0/7] ARM: SAMSUNG: Cleanup SPI platform specific code
On Thu, Jun 30, 2011 at 2:57 PM, padma venkat padma@gmail.com wrote: Hi, On Thu, Jun 30, 2011 at 1:01 PM, Jassi Brar jassisinghb...@gmail.com wrote: On Thu, Jun 30, 2011 at 5:55 PM, Padmavathi Venna padm...@samsung.com wrote: This patchset does the following: 1. Move duplicated code to common place [PATCH 1/7] ARM: SAMSUNG: Move SPI device definitions to plat-samsung SPI platform devices are defined in respective machine folder of Samsung S3C64XX and S5P series SoCs.This is duplicated for every SoC. So all SPI platform devices are moved to a common place. The machine specific code is put in machine specific location for some reason. And the code is not duplicated, it's mostly data structures initialized with machine specific values. Have you considered if it would still be possible to build kernel image supporting more than 1 soc after your changes ? I didn't consider the single image scenario. Because as far as I know, the existing Samsung code doesn't have support for building a single kernel image for multiple SoCs. Samsung did use to support during 24xx days. Unfortunately not much with new generation SoCs. This patch-set only takes us further away from having multiple SoCs supported in a single kernel image some day. The intention behind my changes were 1) To reuse the dev-spi files for all the SoCs, as this reduces the code size. I already decided in favor of being able to support multiple SoCs in single image. Also future SoCs with SPI can use the same file. Only if they have _exactly_ same SPI block. Then most probably they'll have most other blocks identical too (not sure if I can name such examples in public) and can be supported under the same SoC name. Otherwise different SoCs spanning last 5yrs are already supported by the same SPI driver. We must provide SoC specific bits to the driver either via one place or the other. -j -- To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 0/7] ARM: SAMSUNG: Cleanup SPI platform specific code
Hi Marek, On Thu, Jun 30, 2011 at 2:55 PM, Marek Szyprowski m.szyprow...@samsung.com wrote: Hello, On Thursday, June 30, 2011 2:25 PM Padmavathi Venna wrote: This patchset does the following: 1. Move duplicated code to common place [PATCH 1/7] ARM: SAMSUNG: Move SPI device definitions to plat-samsung SPI platform devices are defined in respective machine folder of Samsung S3C64XX and S5P series SoCs.This is duplicated for every SoC. So all SPI platform devices are moved to a common place. [PATCH 2/7] ARM: SAMSUNG: Define common macro for SPI physical address [PATCH 3/7] ARM: SAMSUNG: Add SPI clock definitions for SAMSUNG SoCs Each SoC has it's own set of clock sources for SPI.So they are defined in respective machine folder. [PATCH 4/7] ARM: SAMSUNG: Create SPI device setup files in respective machine folder [PATCH 5/7] ARM: SAMSUNG: Add SPI platform specific code As SPI platform devices are moved to common place some platform specific code need to be initialized in the respective machine file. [PATCH 6/7] SPI: S5PC100: Enable the SPI driver for S5PC100 [PATCH 7/7] SPI: S5PV210: Enable the SPI driver for S5PV210 These patch set improves a bit platform part of SPI driver, but I really wonder if we really need to pass so many SoC version specific data with platform data. Are all these data (clock list, fifo parameters) specific to SoC version or particular board configuration/implementation? Maybe it will be much easier to convert the SPI driver to use driver id feature and use different platform id's for each SoC version? (please refer to drivers/video/s3c-fb.c and plat-samsung/include/plat/fb-core.h for more information). This will remove the need for SoC specific parameters in platform data and will group all version dependent information in the driver. Thanks for your suggestion. I will consider your comments for the next patch set based on clkdev code. ThanksRegards Padma Best regards -- Marek Szyprowski Samsung Poland RD Center -- To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html