diff options
author | Vineet Gupta <vgupta@synopsys.com> | 2015-08-03 08:57:56 -0400 |
---|---|---|
committer | Vineet Gupta <vgupta@synopsys.com> | 2015-08-03 23:56:30 -0400 |
commit | 6de7abfbad1c6a45893a47a17c2ac91b551aa90d (patch) | |
tree | 11d53df8337ba1f498dcfb4d08a10c41d5e638ed | |
parent | e13c42ecbe580509451e021ba2586871e5b47640 (diff) |
ARCv2: [axs103_smp] Reduce clk for Quad FPGA configs
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
-rw-r--r-- | arch/arc/plat-axs10x/axs10x.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/arc/plat-axs10x/axs10x.c b/arch/arc/plat-axs10x/axs10x.c index 99f7da513a48..e7769c3ab5f2 100644 --- a/arch/arc/plat-axs10x/axs10x.c +++ b/arch/arc/plat-axs10x/axs10x.c | |||
@@ -389,6 +389,21 @@ axs103_set_freq(unsigned int id, unsigned int fd, unsigned int od) | |||
389 | 389 | ||
390 | static void __init axs103_early_init(void) | 390 | static void __init axs103_early_init(void) |
391 | { | 391 | { |
392 | /* | ||
393 | * AXS103 configurations for SMP/QUAD configurations share device tree | ||
394 | * which defaults to 90 MHz. However recent failures of Quad config | ||
395 | * revealed P&R timing violations so clamp it down to safe 50 MHz | ||
396 | * Instead of duplicating defconfig/DT for SMP/QUAD, add a small hack | ||
397 | * | ||
398 | * This hack is really hacky as of now. Fix it properly by getting the | ||
399 | * number of cores as return value of platform's early SMP callback | ||
400 | */ | ||
401 | #ifdef CONFIG_ARC_MCIP | ||
402 | unsigned int num_cores = (read_aux_reg(ARC_REG_MCIP_BCR) >> 16) & 0x3F; | ||
403 | if (num_cores > 2) | ||
404 | arc_set_core_freq(50 * 1000000); | ||
405 | #endif | ||
406 | |||
392 | switch (arc_get_core_freq()/1000000) { | 407 | switch (arc_get_core_freq()/1000000) { |
393 | case 33: | 408 | case 33: |
394 | axs103_set_freq(1, 1, 1); | 409 | axs103_set_freq(1, 1, 1); |