Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Alexey Brodkin and committed by
Vineet Gupta
6e9318d1 20c7dbbd

+1 -51
-22
arch/arc/include/asm/clk.h
··· 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 */ 13 - extern unsigned long core_freq; 14 - 15 - static inline unsigned long arc_get_core_freq(void) 16 - { 17 - return core_freq; 18 - } 19 - 20 - extern int arc_set_core_freq(unsigned long); 21 - 22 - #endif
+1 -1
arch/arc/kernel/Makefile
··· 9 9 CFLAGS_ptrace.o += -DUTS_MACHINE='"$(UTS_MACHINE)"' 10 10 11 11 obj-y := arcksyms.o setup.o irq.o time.o reset.o ptrace.o process.o devtree.o 12 - obj-y += signal.o traps.o sys.o troubleshoot.o stacktrace.o disasm.o clk.o 12 + obj-y += signal.o traps.o sys.o troubleshoot.o stacktrace.o disasm.o 13 13 obj-$(CONFIG_ISA_ARCOMPACT) += entry-compact.o intc-compact.o 14 14 obj-$(CONFIG_ISA_ARCV2) += entry-arcv2.o intc-arcv2.o 15 15 obj-$(CONFIG_PCI) += pcibios.o
-21
arch/arc/kernel/clk.c
··· 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 - 11 - unsigned 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 - */ 17 - int arc_set_core_freq(unsigned long freq) 18 - { 19 - core_freq = freq; 20 - return 0; 21 - }
-7
arch/arc/kernel/devtree.c
··· 14 14 #include <linux/memblock.h> 15 15 #include <linux/of.h> 16 16 #include <linux/of_fdt.h> 17 - #include <asm/clk.h> 18 17 #include <asm/mach_desc.h> 19 18 20 19 #ifdef CONFIG_SERIAL_EARLYCON ··· 62 63 { 63 64 const struct machine_desc *mdesc; 64 65 unsigned long dt_root; 65 - const void *clk; 66 - int len; 67 66 68 67 if (!early_init_dt_scan(dt)) 69 68 return NULL; ··· 71 74 machine_halt(); 72 75 73 76 dt_root = of_get_flat_dt_root(); 74 - clk = of_get_flat_dt_prop(dt_root, "clock-frequency", &len); 75 - if (clk) 76 - arc_set_core_freq(of_read_ulong(clk, len/4)); 77 - 78 77 arc_set_early_base_baud(dt_root); 79 78 80 79 return mdesc;