Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Rick Chen | 76c0a24 | 2017-12-26 13:55:51 +0800 | [diff] [blame] | 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> |
Rick Chen | 76c0a24 | 2017-12-26 13:55:51 +0800 | [diff] [blame] | 8 | */ |
| 9 | |
| 10 | #ifndef __ASM_GBL_DATA_H |
| 11 | #define __ASM_GBL_DATA_H |
| 12 | |
Lukas Auer | 83d573d | 2019-03-17 19:28:32 +0100 | [diff] [blame] | 13 | #include <asm/smp.h> |
| 14 | |
Rick Chen | 76c0a24 | 2017-12-26 13:55:51 +0800 | [diff] [blame] | 15 | /* Architecture-specific global data */ |
| 16 | struct arch_global_data { |
Bin Meng | 89681a7 | 2018-12-12 06:12:45 -0800 | [diff] [blame] | 17 | long boot_hart; /* boot hart id */ |
Bin Meng | b6ee5e1 | 2018-12-12 06:12:30 -0800 | [diff] [blame] | 18 | #ifdef CONFIG_SIFIVE_CLINT |
| 19 | void __iomem *clint; /* clint base address */ |
| 20 | #endif |
Rick Chen | 6df4ed0 | 2019-04-02 15:56:39 +0800 | [diff] [blame] | 21 | #ifdef CONFIG_ANDES_PLIC |
| 22 | void __iomem *plic; /* plic base address */ |
| 23 | #endif |
Rick Chen | 7376677 | 2019-04-02 15:56:40 +0800 | [diff] [blame] | 24 | #ifdef CONFIG_ANDES_PLMT |
| 25 | void __iomem *plmt; /* plmt base address */ |
| 26 | #endif |
Lukas Auer | 83d573d | 2019-03-17 19:28:32 +0100 | [diff] [blame] | 27 | #ifdef CONFIG_SMP |
| 28 | struct ipi_data ipi[CONFIG_NR_CPUS]; |
| 29 | #endif |
Rick Chen | e5e6c36 | 2019-04-30 13:49:33 +0800 | [diff] [blame] | 30 | #ifndef CONFIG_XIP |
Lukas Auer | 83d573d | 2019-03-17 19:28:32 +0100 | [diff] [blame] | 31 | ulong available_harts; |
Rick Chen | e5e6c36 | 2019-04-30 13:49:33 +0800 | [diff] [blame] | 32 | #endif |
Rick Chen | 76c0a24 | 2017-12-26 13:55:51 +0800 | [diff] [blame] | 33 | }; |
| 34 | |
| 35 | #include <asm-generic/global_data.h> |
| 36 | |
Rick Chen | b34b4b9 | 2018-02-12 11:10:04 +0800 | [diff] [blame] | 37 | #define DECLARE_GLOBAL_DATA_PTR register gd_t *gd asm ("gp") |
Rick Chen | 76c0a24 | 2017-12-26 13:55:51 +0800 | [diff] [blame] | 38 | |
| 39 | #endif /* __ASM_GBL_DATA_H */ |