diff options
author | Jiaxun Yang <jiaxun.yang@flygoat.com> | 2021-07-23 10:25:42 +0800 |
---|---|---|
committer | Thomas Bogendoerfer <tsbogend@alpha.franken.de> | 2021-08-12 16:01:50 +0200 |
commit | 104f942b2832ab1340dab34ae2dad8b31b772788 (patch) | |
tree | 933c6ff1712ab32b18cf60e8aeabb7b686dc2ccd /arch/mips/pistachio/time.c | |
parent | 917b64f1df2b9cec0a0859bd8d96b24679038f78 (diff) |
MIPS: Retire MACH_PISTACHIO
Now it can be replaced by generic kernel.
Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Diffstat (limited to 'arch/mips/pistachio/time.c')
-rw-r--r-- | arch/mips/pistachio/time.c | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/arch/mips/pistachio/time.c b/arch/mips/pistachio/time.c deleted file mode 100644 index de64751dec40..000000000000 --- a/arch/mips/pistachio/time.c +++ /dev/null @@ -1,55 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-only -/* - * Pistachio clocksource/timer setup - * - * Copyright (C) 2014 Google, Inc. - */ - -#include <linux/clk.h> -#include <linux/clocksource.h> -#include <linux/init.h> -#include <linux/of.h> -#include <linux/of_clk.h> - -#include <asm/mips-cps.h> -#include <asm/time.h> - -unsigned int get_c0_compare_int(void) -{ - return gic_get_c0_compare_int(); -} - -int get_c0_perfcount_int(void) -{ - return gic_get_c0_perfcount_int(); -} -EXPORT_SYMBOL_GPL(get_c0_perfcount_int); - -int get_c0_fdc_int(void) -{ - return gic_get_c0_fdc_int(); -} - -void __init plat_time_init(void) -{ - struct device_node *np; - struct clk *clk; - - of_clk_init(NULL); - timer_probe(); - - np = of_get_cpu_node(0, NULL); - if (!np) { - pr_err("Failed to get CPU node\n"); - return; - } - - clk = of_clk_get(np, 0); - if (IS_ERR(clk)) { - pr_err("Failed to get CPU clock: %ld\n", PTR_ERR(clk)); - return; - } - - mips_hpt_frequency = clk_get_rate(clk) / 2; - clk_put(clk); -} |