aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexey Brodkin <abrodkin@synopsys.com>2016-02-01 09:30:17 -0500
committerVineet Gupta <vgupta@synopsys.com>2016-05-09 00:02:31 -0400
commit6e9318d1be83714e004a0ac795a936df4d2bed3e (patch)
tree1fbb8f936c5fd675de8d7462a22fafea37612e65
parent20c7dbbdbe12db75f9e9ac3fd0d713ab95549623 (diff)
ARC: RIP arc_{get|set}_core_freq() clk API
There are no more users of this - so RIP! Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> [vgupta: update changelog] Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
-rw-r--r--arch/arc/include/asm/clk.h22
-rw-r--r--arch/arc/kernel/Makefile2
-rw-r--r--arch/arc/kernel/clk.c21
-rw-r--r--arch/arc/kernel/devtree.c7
4 files changed, 1 insertions, 51 deletions
diff --git a/arch/arc/include/asm/clk.h b/arch/arc/include/asm/clk.h
deleted file mode 100644
index bf9d29f5bd53..000000000000
--- a/arch/arc/include/asm/clk.h
+++ /dev/null
@@ -1,22 +0,0 @@
1/*
2 * Copyright (C) 2012 Synopsys, Inc. (www.synopsys.com)
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 */
8
9#ifndef _ASM_ARC_CLK_H
10#define _ASM_ARC_CLK_H
11
12/* Although we can't really hide core_freq, the accessor is still better way */
13extern unsigned long core_freq;
14
15static inline unsigned long arc_get_core_freq(void)
16{
17 return core_freq;
18}
19
20extern int arc_set_core_freq(unsigned long);
21
22#endif
diff --git a/arch/arc/kernel/Makefile b/arch/arc/kernel/Makefile
index 1bc2036b19d7..cfcdedf52ff8 100644
--- a/arch/arc/kernel/Makefile
+++ b/arch/arc/kernel/Makefile
@@ -9,7 +9,7 @@
9CFLAGS_ptrace.o += -DUTS_MACHINE='"$(UTS_MACHINE)"' 9CFLAGS_ptrace.o += -DUTS_MACHINE='"$(UTS_MACHINE)"'
10 10
11obj-y := arcksyms.o setup.o irq.o time.o reset.o ptrace.o process.o devtree.o 11obj-y := arcksyms.o setup.o irq.o time.o reset.o ptrace.o process.o devtree.o
12obj-y += signal.o traps.o sys.o troubleshoot.o stacktrace.o disasm.o clk.o 12obj-y += signal.o traps.o sys.o troubleshoot.o stacktrace.o disasm.o
13obj-$(CONFIG_ISA_ARCOMPACT) += entry-compact.o intc-compact.o 13obj-$(CONFIG_ISA_ARCOMPACT) += entry-compact.o intc-compact.o
14obj-$(CONFIG_ISA_ARCV2) += entry-arcv2.o intc-arcv2.o 14obj-$(CONFIG_ISA_ARCV2) += entry-arcv2.o intc-arcv2.o
15obj-$(CONFIG_PCI) += pcibios.o 15obj-$(CONFIG_PCI) += pcibios.o
diff --git a/arch/arc/kernel/clk.c b/arch/arc/kernel/clk.c
deleted file mode 100644
index 10c7b0b5a079..000000000000
--- a/arch/arc/kernel/clk.c
+++ /dev/null
@@ -1,21 +0,0 @@
1/*
2 * Copyright (C) 2012 Synopsys, Inc. (www.synopsys.com)
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 */
8
9#include <asm/clk.h>
10
11unsigned long core_freq = 80000000;
12
13/*
14 * As of now we default to device-tree provided clock
15 * In future we can determine this in early boot
16 */
17int arc_set_core_freq(unsigned long freq)
18{
19 core_freq = freq;
20 return 0;
21}
diff --git a/arch/arc/kernel/devtree.c b/arch/arc/kernel/devtree.c
index fecbc96df828..f1e07c2344f8 100644
--- a/arch/arc/kernel/devtree.c
+++ b/arch/arc/kernel/devtree.c
@@ -14,7 +14,6 @@
14#include <linux/memblock.h> 14#include <linux/memblock.h>
15#include <linux/of.h> 15#include <linux/of.h>
16#include <linux/of_fdt.h> 16#include <linux/of_fdt.h>
17#include <asm/clk.h>
18#include <asm/mach_desc.h> 17#include <asm/mach_desc.h>
19 18
20#ifdef CONFIG_SERIAL_EARLYCON 19#ifdef CONFIG_SERIAL_EARLYCON
@@ -63,8 +62,6 @@ const struct machine_desc * __init setup_machine_fdt(void *dt)
63{ 62{
64 const struct machine_desc *mdesc; 63 const struct machine_desc *mdesc;
65 unsigned long dt_root; 64 unsigned long dt_root;
66 const void *clk;
67 int len;
68 65
69 if (!early_init_dt_scan(dt)) 66 if (!early_init_dt_scan(dt))
70 return NULL; 67 return NULL;
@@ -74,10 +71,6 @@ const struct machine_desc * __init setup_machine_fdt(void *dt)
74 machine_halt(); 71 machine_halt();
75 72
76 dt_root = of_get_flat_dt_root(); 73 dt_root = of_get_flat_dt_root();
77 clk = of_get_flat_dt_prop(dt_root, "clock-frequency", &len);
78 if (clk)
79 arc_set_core_freq(of_read_ulong(clk, len/4));
80
81 arc_set_early_base_baud(dt_root); 74 arc_set_early_base_baud(dt_root);
82 75
83 return mdesc; 76 return mdesc;