diff options
author | David S. Miller <davem@davemloft.net> | 2020-08-23 11:48:27 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-08-23 11:48:27 -0700 |
commit | 7611cbb900b4b9a6fe5eca12fb12645c0576a015 (patch) | |
tree | 9c8c8e1fa991e4728d25a19b86c974c8e49ee1b7 /arch/riscv/kernel/clint.c | |
parent | d7223aa5867134b9923b42e1245801bd790a1d8c (diff) | |
parent | cb95712138ec5e480db5160b41172bbc6f6494cc (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Diffstat (limited to 'arch/riscv/kernel/clint.c')
-rw-r--r-- | arch/riscv/kernel/clint.c | 44 |
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); -} |