aboutsummaryrefslogtreecommitdiffstats
path: root/arch/c6x/platforms
diff options
context:
space:
mode:
authorKen Cox <jkc@redhat.com>2012-07-18 23:19:10 -0400
committerMark Salter <msalter@redhat.com>2012-07-18 23:52:31 -0400
commitdbe91a2e6e53aa85efa0aac86e3a22ba95f8b85f (patch)
treeb4c4275ea7fa1797c0ff66df5661bbfaa81f91b6 /arch/c6x/platforms
parentf84f1f462bfaf0e45511f97ef54068b8539a7af6 (diff)
C6X: add basic support for TMS320C6678 SoC
This patch adds support for the TMS320C6678 SoC on an EVMC6678LE evaluation board. The 6678 is a C66x family CPU which is very similar to the already supported C64x CPUs with the addition of floating point instructions. Signed-off-by: Ken Cox <jkc@redhat.com> Signed-off-by: Mark Salter <msalter@redhat.com> CC: Aurelien Jacquiot <a-jacquiot@ti.com> CC: linux-c6x-dev@linux-c6x.org
Diffstat (limited to 'arch/c6x/platforms')
-rw-r--r--arch/c6x/platforms/Kconfig4
-rw-r--r--arch/c6x/platforms/plldata.c65
2 files changed, 69 insertions, 0 deletions
diff --git a/arch/c6x/platforms/Kconfig b/arch/c6x/platforms/Kconfig
index 401ee678fd01..c4a0fad89aaf 100644
--- a/arch/c6x/platforms/Kconfig
+++ b/arch/c6x/platforms/Kconfig
@@ -14,3 +14,7 @@ config SOC_TMS320C6472
14config SOC_TMS320C6474 14config SOC_TMS320C6474
15 bool "TMS320C6474" 15 bool "TMS320C6474"
16 default n 16 default n
17
18config SOC_TMS320C6678
19 bool "TMS320C6678"
20 default n
diff --git a/arch/c6x/platforms/plldata.c b/arch/c6x/platforms/plldata.c
index 2cfd6f42968f..755359eb6286 100644
--- a/arch/c6x/platforms/plldata.c
+++ b/arch/c6x/platforms/plldata.c
@@ -335,6 +335,68 @@ static void __init c6474_setup_clocks(struct device_node *node)
335} 335}
336#endif /* CONFIG_SOC_TMS320C6474 */ 336#endif /* CONFIG_SOC_TMS320C6474 */
337 337
338#ifdef CONFIG_SOC_TMS320C6678
339static struct clk_lookup c6678_clks[] = {
340 CLK(NULL, "pll1", &c6x_soc_pll1.sysclks[0]),
341 CLK(NULL, "pll1_refclk", &c6x_soc_pll1.sysclks[1]),
342 CLK(NULL, "pll1_sysclk2", &c6x_soc_pll1.sysclks[2]),
343 CLK(NULL, "pll1_sysclk3", &c6x_soc_pll1.sysclks[3]),
344 CLK(NULL, "pll1_sysclk4", &c6x_soc_pll1.sysclks[4]),
345 CLK(NULL, "pll1_sysclk5", &c6x_soc_pll1.sysclks[5]),
346 CLK(NULL, "pll1_sysclk6", &c6x_soc_pll1.sysclks[6]),
347 CLK(NULL, "pll1_sysclk7", &c6x_soc_pll1.sysclks[7]),
348 CLK(NULL, "pll1_sysclk8", &c6x_soc_pll1.sysclks[8]),
349 CLK(NULL, "pll1_sysclk9", &c6x_soc_pll1.sysclks[9]),
350 CLK(NULL, "pll1_sysclk10", &c6x_soc_pll1.sysclks[10]),
351 CLK(NULL, "pll1_sysclk11", &c6x_soc_pll1.sysclks[11]),
352 CLK(NULL, "core", &c6x_core_clk),
353 CLK("", NULL, NULL)
354};
355
356static void __init c6678_setup_clocks(struct device_node *node)
357{
358 struct pll_data *pll = &c6x_soc_pll1;
359 struct clk *sysclks = pll->sysclks;
360
361 pll->flags = PLL_HAS_MUL;
362
363 sysclks[1].flags |= FIXED_DIV_PLL;
364 sysclks[1].div = 1;
365
366 sysclks[2].div = PLLDIV2;
367
368 sysclks[3].flags |= FIXED_DIV_PLL;
369 sysclks[3].div = 2;
370
371 sysclks[4].flags |= FIXED_DIV_PLL;
372 sysclks[4].div = 3;
373
374 sysclks[5].div = PLLDIV5;
375
376 sysclks[6].flags |= FIXED_DIV_PLL;
377 sysclks[6].div = 64;
378
379 sysclks[7].flags |= FIXED_DIV_PLL;
380 sysclks[7].div = 6;
381
382 sysclks[8].div = PLLDIV8;
383
384 sysclks[9].flags |= FIXED_DIV_PLL;
385 sysclks[9].div = 12;
386
387 sysclks[10].flags |= FIXED_DIV_PLL;
388 sysclks[10].div = 3;
389
390 sysclks[11].flags |= FIXED_DIV_PLL;
391 sysclks[11].div = 6;
392
393 c6x_core_clk.parent = &sysclks[0];
394 c6x_i2c_clk.parent = &sysclks[7];
395
396 c6x_clks_init(c6678_clks);
397}
398#endif /* CONFIG_SOC_TMS320C6678 */
399
338static struct of_device_id c6x_clkc_match[] __initdata = { 400static struct of_device_id c6x_clkc_match[] __initdata = {
339#ifdef CONFIG_SOC_TMS320C6455 401#ifdef CONFIG_SOC_TMS320C6455
340 { .compatible = "ti,c6455-pll", .data = c6455_setup_clocks }, 402 { .compatible = "ti,c6455-pll", .data = c6455_setup_clocks },
@@ -348,6 +410,9 @@ static struct of_device_id c6x_clkc_match[] __initdata = {
348#ifdef CONFIG_SOC_TMS320C6474 410#ifdef CONFIG_SOC_TMS320C6474
349 { .compatible = "ti,c6474-pll", .data = c6474_setup_clocks }, 411 { .compatible = "ti,c6474-pll", .data = c6474_setup_clocks },
350#endif 412#endif
413#ifdef CONFIG_SOC_TMS320C6678
414 { .compatible = "ti,c6678-pll", .data = c6678_setup_clocks },
415#endif
351 { .compatible = "ti,c64x+pll" }, 416 { .compatible = "ti,c64x+pll" },
352 {} 417 {}
353}; 418};