80e3165e397b2c41dbffec0725132b007cd8d6a1
[platform/kernel/u-boot.git] / arch / riscv / include / asm / global_data.h
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * (C) Copyright 2002
4  * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
5  *
6  * Copyright (c) 2017 Microsemi Corporation.
7  * Padmarao Begari, Microsemi Corporation <padmarao.begari@microsemi.com>
8  */
9
10 #ifndef __ASM_GBL_DATA_H
11 #define __ASM_GBL_DATA_H
12
13 #include <asm/smp.h>
14
15 /* Architecture-specific global data */
16 struct arch_global_data {
17         long boot_hart;         /* boot hart id */
18 #ifdef CONFIG_SIFIVE_CLINT
19         void __iomem *clint;    /* clint base address */
20 #endif
21 #ifdef CONFIG_SMP
22         struct ipi_data ipi[CONFIG_NR_CPUS];
23 #endif
24         ulong available_harts;
25 };
26
27 #include <asm-generic/global_data.h>
28
29 #define DECLARE_GLOBAL_DATA_PTR register gd_t *gd asm ("gp")
30
31 #endif /* __ASM_GBL_DATA_H */