aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arc
diff options
context:
space:
mode:
authorVineet Gupta <vgupta@synopsys.com>2014-06-03 03:58:32 -0400
committerVineet Gupta <vgupta@synopsys.com>2014-06-03 03:58:32 -0400
commitc00bfd974fb0b7a5a501aebada2a94945e38a9a5 (patch)
treee36f63dce62f4a10beaadb6381f5b5693d7d6563 /arch/arc
parent26bc8a9fcf4f9b3a562daaf28cf3ebda4fb80c65 (diff)
ARC: [arcfpga] Get rid of legacy BVCI latency unit support
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Diffstat (limited to 'arch/arc')
-rw-r--r--arch/arc/plat-arcfpga/Kconfig32
-rw-r--r--arch/arc/plat-arcfpga/platform.c55
2 files changed, 0 insertions, 87 deletions
diff --git a/arch/arc/plat-arcfpga/Kconfig b/arch/arc/plat-arcfpga/Kconfig
index 33058aa40e77..e27bb5cc3c1e 100644
--- a/arch/arc/plat-arcfpga/Kconfig
+++ b/arch/arc/plat-arcfpga/Kconfig
@@ -48,36 +48,4 @@ config ARC_SERIAL_BAUD
48 help 48 help
49 Baud rate for the ARC UART 49 Baud rate for the ARC UART
50 50
51menuconfig ARC_HAS_BVCI_LAT_UNIT
52 bool "BVCI Bus Latency Unit"
53 depends on ARC_BOARD_ML509 || ARC_BOARD_ANGEL4
54 help
55 IP to add artificial latency to BVCI Bus Based FPGA builds.
56 The default latency (even worst case) for FPGA is non-realistic
57 (~10 SDRAM, ~5 SSRAM).
58
59config BVCI_LAT_UNITS
60 hex "Latency Unit(s) Bitmap"
61 default "0x0"
62 depends on ARC_HAS_BVCI_LAT_UNIT
63 help
64 There are multiple Latency Units corresponding to the many
65 interfaces of the system bus arbiter (both CPU side as well as
66 the peripheral side).
67 To add latency to ALL memory transaction, choose Unit 0, otherwise
68 for finer grainer - interface wise latency, specify a bitmap (1 bit
69 per unit) of all units. e.g. 1,2,12 will be 0x1003
70
71 Unit 0 - System Arb and Mem Controller
72 Unit 1 - I$ and System Bus
73 Unit 2 - D$ and System Bus
74 ..
75 Unit 12 - IDE Disk controller and System Bus
76
77config BVCI_LAT_CYCLES
78 int "Latency Value in cycles"
79 range 0 63
80 default "30"
81 depends on ARC_HAS_BVCI_LAT_UNIT
82
83endif 51endif
diff --git a/arch/arc/plat-arcfpga/platform.c b/arch/arc/plat-arcfpga/platform.c
index 213394a15cd2..f09e771b4bbd 100644
--- a/arch/arc/plat-arcfpga/platform.c
+++ b/arch/arc/plat-arcfpga/platform.c
@@ -22,59 +22,6 @@
22#include <plat/smp.h> 22#include <plat/smp.h>
23#include <plat/irq.h> 23#include <plat/irq.h>
24 24
25/*-----------------------BVCI Latency Unit -----------------------------*/
26
27#ifdef CONFIG_ARC_HAS_BVCI_LAT_UNIT
28
29int lat_cycles = CONFIG_BVCI_LAT_CYCLES;
30
31/* BVCI Bus Profiler: Latency Unit */
32static void __init setup_bvci_lat_unit(void)
33{
34#define MAX_BVCI_UNITS 12
35
36 unsigned int i;
37 unsigned int *base = (unsigned int *)BVCI_LAT_UNIT_BASE;
38 const unsigned long units_req = CONFIG_BVCI_LAT_UNITS;
39 const unsigned int REG_UNIT = 21;
40 const unsigned int REG_VAL = 22;
41
42 /*
43 * There are multiple Latency Units corresponding to the many
44 * interfaces of the system bus arbiter (both CPU side as well as
45 * the peripheral side).
46 *
47 * Unit 0 - System Arb and Mem Controller - adds latency to all
48 * memory trasactions
49 * Unit 1 - I$ and System Bus
50 * Unit 2 - D$ and System Bus
51 * ..
52 * Unit 12 - IDE Disk controller and System Bus
53 *
54 * The programmers model requires writing to lat_unit reg first
55 * and then the latency value (cycles) to lat_value reg
56 */
57
58 if (CONFIG_BVCI_LAT_UNITS == 0) {
59 writel(0, base + REG_UNIT);
60 writel(lat_cycles, base + REG_VAL);
61 pr_info("BVCI Latency for all Memory Transactions %d cycles\n",
62 lat_cycles);
63 } else {
64 for_each_set_bit(i, &units_req, MAX_BVCI_UNITS) {
65 writel(i + 1, base + REG_UNIT); /* loop is 0 based */
66 writel(lat_cycles, base + REG_VAL);
67 pr_info("BVCI Latency for Unit[%d] = %d cycles\n",
68 (i + 1), lat_cycles);
69 }
70 }
71}
72#else
73static void __init setup_bvci_lat_unit(void)
74{
75}
76#endif
77
78/*----------------------- Platform Devices -----------------------------*/ 25/*----------------------- Platform Devices -----------------------------*/
79 26
80#if IS_ENABLED(CONFIG_SERIAL_ARC) 27#if IS_ENABLED(CONFIG_SERIAL_ARC)
@@ -165,8 +112,6 @@ static void __init plat_fpga_early_init(void)
165{ 112{
166 pr_info("[plat-arcfpga]: registering early dev resources\n"); 113 pr_info("[plat-arcfpga]: registering early dev resources\n");
167 114
168 setup_bvci_lat_unit();
169
170 arc_fpga_serial_init(); 115 arc_fpga_serial_init();
171 116
172#ifdef CONFIG_ISS_SMP_EXTN 117#ifdef CONFIG_ISS_SMP_EXTN