diff options
author | Padmavathi Venna <padma.v@samsung.com> | 2011-11-02 07:04:08 -0400 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2011-12-22 20:10:41 -0500 |
commit | 8c4b8e718c9462c1beaa7db734bf5ec0b317ac8b (patch) | |
tree | 68783a048738d30a4a0c2f3921f94e74a45d8618 /arch/arm/mach-s5pv210 | |
parent | c596704f733f10686a10e494d947762803555270 (diff) |
ARM: S5PV210: Add SPI clkdev support
Registered the SPI bus clocks with clkdev using generic
connection id.
Signed-off-by: Padmavathi Venna <padma.v@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm/mach-s5pv210')
-rw-r--r-- | arch/arm/mach-s5pv210/clock.c | 50 |
1 files changed, 30 insertions, 20 deletions
diff --git a/arch/arm/mach-s5pv210/clock.c b/arch/arm/mach-s5pv210/clock.c index dc4586b2b322..cead51321b29 100644 --- a/arch/arm/mach-s5pv210/clock.c +++ b/arch/arm/mach-s5pv210/clock.c | |||
@@ -911,26 +911,6 @@ static struct clksrc_clk clksrcs[] = { | |||
911 | .reg_div = { .reg = S5P_CLK_DIV1, .shift = 28, .size = 4 }, | 911 | .reg_div = { .reg = S5P_CLK_DIV1, .shift = 28, .size = 4 }, |
912 | }, { | 912 | }, { |
913 | .clk = { | 913 | .clk = { |
914 | .name = "sclk_spi", | ||
915 | .devname = "s3c64xx-spi.0", | ||
916 | .enable = s5pv210_clk_mask0_ctrl, | ||
917 | .ctrlbit = (1 << 16), | ||
918 | }, | ||
919 | .sources = &clkset_group2, | ||
920 | .reg_src = { .reg = S5P_CLK_SRC5, .shift = 0, .size = 4 }, | ||
921 | .reg_div = { .reg = S5P_CLK_DIV5, .shift = 0, .size = 4 }, | ||
922 | }, { | ||
923 | .clk = { | ||
924 | .name = "sclk_spi", | ||
925 | .devname = "s3c64xx-spi.1", | ||
926 | .enable = s5pv210_clk_mask0_ctrl, | ||
927 | .ctrlbit = (1 << 17), | ||
928 | }, | ||
929 | .sources = &clkset_group2, | ||
930 | .reg_src = { .reg = S5P_CLK_SRC5, .shift = 4, .size = 4 }, | ||
931 | .reg_div = { .reg = S5P_CLK_DIV5, .shift = 4, .size = 4 }, | ||
932 | }, { | ||
933 | .clk = { | ||
934 | .name = "sclk_pwi", | 914 | .name = "sclk_pwi", |
935 | .enable = s5pv210_clk_mask0_ctrl, | 915 | .enable = s5pv210_clk_mask0_ctrl, |
936 | .ctrlbit = (1 << 29), | 916 | .ctrlbit = (1 << 29), |
@@ -1046,6 +1026,31 @@ static struct clksrc_clk clk_sclk_mmc3 = { | |||
1046 | .reg_div = { .reg = S5P_CLK_DIV4, .shift = 12, .size = 4 }, | 1026 | .reg_div = { .reg = S5P_CLK_DIV4, .shift = 12, .size = 4 }, |
1047 | }; | 1027 | }; |
1048 | 1028 | ||
1029 | static struct clksrc_clk clk_sclk_spi0 = { | ||
1030 | .clk = { | ||
1031 | .name = "sclk_spi", | ||
1032 | .devname = "s3c64xx-spi.0", | ||
1033 | .enable = s5pv210_clk_mask0_ctrl, | ||
1034 | .ctrlbit = (1 << 16), | ||
1035 | }, | ||
1036 | .sources = &clkset_group2, | ||
1037 | .reg_src = { .reg = S5P_CLK_SRC5, .shift = 0, .size = 4 }, | ||
1038 | .reg_div = { .reg = S5P_CLK_DIV5, .shift = 0, .size = 4 }, | ||
1039 | }; | ||
1040 | |||
1041 | static struct clksrc_clk clk_sclk_spi1 = { | ||
1042 | .clk = { | ||
1043 | .name = "sclk_spi", | ||
1044 | .devname = "s3c64xx-spi.1", | ||
1045 | .enable = s5pv210_clk_mask0_ctrl, | ||
1046 | .ctrlbit = (1 << 17), | ||
1047 | }, | ||
1048 | .sources = &clkset_group2, | ||
1049 | .reg_src = { .reg = S5P_CLK_SRC5, .shift = 4, .size = 4 }, | ||
1050 | .reg_div = { .reg = S5P_CLK_DIV5, .shift = 4, .size = 4 }, | ||
1051 | }; | ||
1052 | |||
1053 | |||
1049 | static struct clksrc_clk *clksrc_cdev[] = { | 1054 | static struct clksrc_clk *clksrc_cdev[] = { |
1050 | &clk_sclk_uart0, | 1055 | &clk_sclk_uart0, |
1051 | &clk_sclk_uart1, | 1056 | &clk_sclk_uart1, |
@@ -1055,6 +1060,8 @@ static struct clksrc_clk *clksrc_cdev[] = { | |||
1055 | &clk_sclk_mmc1, | 1060 | &clk_sclk_mmc1, |
1056 | &clk_sclk_mmc2, | 1061 | &clk_sclk_mmc2, |
1057 | &clk_sclk_mmc3, | 1062 | &clk_sclk_mmc3, |
1063 | &clk_sclk_spi0, | ||
1064 | &clk_sclk_spi1, | ||
1058 | }; | 1065 | }; |
1059 | 1066 | ||
1060 | static struct clk *clk_cdev[] = { | 1067 | static struct clk *clk_cdev[] = { |
@@ -1317,6 +1324,9 @@ static struct clk_lookup s5pv210_clk_lookup[] = { | |||
1317 | CLKDEV_INIT("s3c-sdhci.1", "mmc_busclk.2", &clk_sclk_mmc1.clk), | 1324 | CLKDEV_INIT("s3c-sdhci.1", "mmc_busclk.2", &clk_sclk_mmc1.clk), |
1318 | CLKDEV_INIT("s3c-sdhci.2", "mmc_busclk.2", &clk_sclk_mmc2.clk), | 1325 | CLKDEV_INIT("s3c-sdhci.2", "mmc_busclk.2", &clk_sclk_mmc2.clk), |
1319 | CLKDEV_INIT("s3c-sdhci.3", "mmc_busclk.2", &clk_sclk_mmc3.clk), | 1326 | CLKDEV_INIT("s3c-sdhci.3", "mmc_busclk.2", &clk_sclk_mmc3.clk), |
1327 | CLKDEV_INIT(NULL, "spi_busclk0", &clk_p), | ||
1328 | CLKDEV_INIT("s3c64xx-spi.0", "spi_busclk1", &clk_sclk_spi0.clk), | ||
1329 | CLKDEV_INIT("s3c64xx-spi.1", "spi_busclk1", &clk_sclk_spi1.clk), | ||
1320 | }; | 1330 | }; |
1321 | 1331 | ||
1322 | void __init s5pv210_register_clocks(void) | 1332 | void __init s5pv210_register_clocks(void) |