aboutsummaryrefslogtreecommitdiff
path: root/arch/riscv/kernel/clint.c
diff options
context:
space:
mode:
authorGravatar Linus Torvalds <torvalds@linux-foundation.org> 2020-08-21 12:32:42 -0700
committerGravatar Linus Torvalds <torvalds@linux-foundation.org> 2020-08-21 12:32:42 -0700
commitf22c5579a7d600fa03f8c1d150cf78188f8709b6 (patch)
tree9865bd0b054c4407029bbb1d411b14091fc8d9bf /arch/riscv/kernel/clint.c
parentMerge tag 'for-linus-5.9-rc2-tag' of git://git.kernel.org/pub/scm/linux/kerne... (diff)
parentriscv: Add SiFive drivers to rv32_defconfig (diff)
downloadlinux-f22c5579a7d600fa03f8c1d150cf78188f8709b6.tar.gz
linux-f22c5579a7d600fa03f8c1d150cf78188f8709b6.tar.bz2
linux-f22c5579a7d600fa03f8c1d150cf78188f8709b6.zip
Merge tag 'riscv-for-linus-5.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux
Pull RISC-V fixes from Palmer Dabbelt: - The CLINT driver has been split in two: one to handle the M-mode CLINT (memory mapped and used on NOMMU systems) and one to handle the S-mode CLINT (via SBI). - The addition of SiFive's drivers to rv32_defconfig * tag 'riscv-for-linus-5.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: riscv: Add SiFive drivers to rv32_defconfig dt-bindings: timer: Add CLINT bindings RISC-V: Remove CLINT related code from timer and arch clocksource/drivers: Add CLINT timer driver RISC-V: Add mechanism to provide custom IPI operations
Diffstat (limited to 'arch/riscv/kernel/clint.c')
-rw-r--r--arch/riscv/kernel/clint.c44
1 files changed, 0 insertions, 44 deletions
diff --git a/arch/riscv/kernel/clint.c b/arch/riscv/kernel/clint.c
deleted file mode 100644
index 3647980d14c3..000000000000
--- a/arch/riscv/kernel/clint.c
+++ /dev/null
@@ -1,44 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-/*
- * Copyright (c) 2019 Christoph Hellwig.
- */
-
-#include <linux/io.h>
-#include <linux/of_address.h>
-#include <linux/types.h>
-#include <asm/clint.h>
-#include <asm/csr.h>
-#include <asm/timex.h>
-#include <asm/smp.h>
-
-/*
- * This is the layout used by the SiFive clint, which is also shared by the qemu
- * virt platform, and the Kendryte KD210 at least.
- */
-#define CLINT_IPI_OFF 0
-#define CLINT_TIME_CMP_OFF 0x4000
-#define CLINT_TIME_VAL_OFF 0xbff8
-
-u32 __iomem *clint_ipi_base;
-
-void clint_init_boot_cpu(void)
-{
- struct device_node *np;
- void __iomem *base;
-
- np = of_find_compatible_node(NULL, NULL, "riscv,clint0");
- if (!np) {
- panic("clint not found");
- return;
- }
-
- base = of_iomap(np, 0);
- if (!base)
- panic("could not map CLINT");
-
- clint_ipi_base = base + CLINT_IPI_OFF;
- riscv_time_cmp = base + CLINT_TIME_CMP_OFF;
- riscv_time_val = base + CLINT_TIME_VAL_OFF;
-
- clint_clear_ipi(boot_cpu_hartid);
-}