Message ID | 1309436723-662-4-git-send-email-padma.v@samsung.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Thu, Jun 30, 2011 at 3:00 PM, Russell King - ARM Linux <linux@arm.linux.org.uk> wrote: > On Thu, Jun 30, 2011 at 08:25:19AM -0400, Padmavathi Venna wrote: >> SPI Clocks were defined in dev-spi.c of machine specific folder. >> To make SPI devices common across all SoCs,dev-spi.c is moved >> from machine specific folder to plat-samsung. So SPI clock >> definitions has been moved from dev-spi.c to SoC specific machine >> folder for S3C64XX,S5P64X0,S5PC100 and S5PV210 > > This just shows how sick the Samsung code is by abusing the clk API. > If it stopped that abuse and switched over to clkdev none of this would > be necessary. I am anyways not for the patch set. Though this 'sickness' predates clkdev, and I agree it should be changed now.
Hi Russell,Jassi On Thu, Jun 30, 2011 at 3:13 PM, Jassi Brar <jassisinghbrar@gmail.com> wrote: > On Thu, Jun 30, 2011 at 3:00 PM, Russell King - ARM Linux > <linux@arm.linux.org.uk> wrote: >> On Thu, Jun 30, 2011 at 08:25:19AM -0400, Padmavathi Venna wrote: >>> SPI Clocks were defined in dev-spi.c of machine specific folder. >>> To make SPI devices common across all SoCs,dev-spi.c is moved >>> from machine specific folder to plat-samsung. So SPI clock >>> definitions has been moved from dev-spi.c to SoC specific machine >>> folder for S3C64XX,S5P64X0,S5PC100 and S5PV210 >> >> This just shows how sick the Samsung code is by abusing the clk API. >> If it stopped that abuse and switched over to clkdev none of this would >> be necessary. > I am anyways not for the patch set. > Though this 'sickness' predates clkdev, and I agree it should be changed now. I will prepare new set of patches based on clkdev code and send for review. Thanks&Regards Padma > -- > To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html >
diff --git a/arch/arm/mach-s3c64xx/include/mach/spi-clocks.h b/arch/arm/mach-s3c64xx/include/mach/spi-clocks.h index 9d0c43b..525f96b 100644 --- a/arch/arm/mach-s3c64xx/include/mach/spi-clocks.h +++ b/arch/arm/mach-s3c64xx/include/mach/spi-clocks.h @@ -15,4 +15,10 @@ #define S3C64XX_SPI_SRCCLK_SPIBUS 1 #define S3C64XX_SPI_SRCCLK_48M 2 +static char *spi_src_clks[] = { + [S3C64XX_SPI_SRCCLK_PCLK] = "pclk", + [S3C64XX_SPI_SRCCLK_SPIBUS] = "spi-bus", + [S3C64XX_SPI_SRCCLK_48M] = "spi_48m", +}; + #endif /* __S3C64XX_PLAT_SPI_CLKS_H */ diff --git a/arch/arm/mach-s5p64x0/include/mach/spi-clocks.h b/arch/arm/mach-s5p64x0/include/mach/spi-clocks.h index 170a20a..3995de1 100644 --- a/arch/arm/mach-s5p64x0/include/mach/spi-clocks.h +++ b/arch/arm/mach-s5p64x0/include/mach/spi-clocks.h @@ -17,4 +17,9 @@ #define S5P64X0_SPI_SRCCLK_PCLK 0 #define S5P64X0_SPI_SRCCLK_SCLK 1 +static char *spi_src_clks[] = { + [S5P64X0_SPI_SRCCLK_PCLK] = "pclk", + [S5P64X0_SPI_SRCCLK_SCLK] = "sclk_spi", +}; + #endif /* __ASM_ARCH_SPI_CLKS_H */ diff --git a/arch/arm/mach-s5pc100/include/mach/spi-clocks.h b/arch/arm/mach-s5pc100/include/mach/spi-clocks.h index 65e4263..c182b02 100644 --- a/arch/arm/mach-s5pc100/include/mach/spi-clocks.h +++ b/arch/arm/mach-s5pc100/include/mach/spi-clocks.h @@ -15,4 +15,10 @@ #define S5PC100_SPI_SRCCLK_48M 1 #define S5PC100_SPI_SRCCLK_SPIBUS 2 +static char *spi_src_clks[] = { + [S5PC100_SPI_SRCCLK_PCLK] = "pclk", + [S5PC100_SPI_SRCCLK_48M] = "spi_48m", + [S5PC100_SPI_SRCCLK_SPIBUS] = "spi_bus", +}; + #endif /* __S5PC100_PLAT_SPI_CLKS_H */ diff --git a/arch/arm/mach-s5pv210/include/mach/spi-clocks.h b/arch/arm/mach-s5pv210/include/mach/spi-clocks.h index 02acded..fa17815 100644 --- a/arch/arm/mach-s5pv210/include/mach/spi-clocks.h +++ b/arch/arm/mach-s5pv210/include/mach/spi-clocks.h @@ -14,4 +14,9 @@ #define S5PV210_SPI_SRCCLK_PCLK 0 #define S5PV210_SPI_SRCCLK_SCLK 1 +static char *spi_src_clks[] = { + [S5PV210_SPI_SRCCLK_PCLK] = "pclk", + [S5PV210_SPI_SRCCLK_SCLK] = "sclk_spi", +}; + #endif /* __S5PV210_PLAT_SPI_CLKS_H */
SPI Clocks were defined in dev-spi.c of machine specific folder. To make SPI devices common across all SoCs,dev-spi.c is moved from machine specific folder to plat-samsung. So SPI clock definitions has been moved from dev-spi.c to SoC specific machine folder for S3C64XX,S5P64X0,S5PC100 and S5PV210 Signed-off-by: Padmavathi Venna <padma.v@samsung.com> --- arch/arm/mach-s3c64xx/include/mach/spi-clocks.h | 6 ++++++ arch/arm/mach-s5p64x0/include/mach/spi-clocks.h | 5 +++++ arch/arm/mach-s5pc100/include/mach/spi-clocks.h | 6 ++++++ arch/arm/mach-s5pv210/include/mach/spi-clocks.h | 5 +++++ 4 files changed, 22 insertions(+), 0 deletions(-)