blob: b74bd7e738bb778d964f78823f0ced5f18282db5 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Rick Chen76c0a242017-12-26 13:55:51 +08002/*
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 Chen76c0a242017-12-26 13:55:51 +08008 */
9
10#ifndef __ASM_GBL_DATA_H
11#define __ASM_GBL_DATA_H
12
Lukas Auer83d573d2019-03-17 19:28:32 +010013#include <asm/smp.h>
14
Rick Chen76c0a242017-12-26 13:55:51 +080015/* Architecture-specific global data */
16struct arch_global_data {
Bin Meng89681a72018-12-12 06:12:45 -080017 long boot_hart; /* boot hart id */
Bin Mengb6ee5e12018-12-12 06:12:30 -080018#ifdef CONFIG_SIFIVE_CLINT
19 void __iomem *clint; /* clint base address */
20#endif
Rick Chen6df4ed02019-04-02 15:56:39 +080021#ifdef CONFIG_ANDES_PLIC
22 void __iomem *plic; /* plic base address */
23#endif
Rick Chen73766772019-04-02 15:56:40 +080024#ifdef CONFIG_ANDES_PLMT
25 void __iomem *plmt; /* plmt base address */
26#endif
Lukas Auer83d573d2019-03-17 19:28:32 +010027#ifdef CONFIG_SMP
28 struct ipi_data ipi[CONFIG_NR_CPUS];
29#endif
Rick Chene5e6c362019-04-30 13:49:33 +080030#ifndef CONFIG_XIP
Lukas Auer83d573d2019-03-17 19:28:32 +010031 ulong available_harts;
Rick Chene5e6c362019-04-30 13:49:33 +080032#endif
Rick Chen76c0a242017-12-26 13:55:51 +080033};
34
35#include <asm-generic/global_data.h>
36
Rick Chenb34b4b92018-02-12 11:10:04 +080037#define DECLARE_GLOBAL_DATA_PTR register gd_t *gd asm ("gp")
Rick Chen76c0a242017-12-26 13:55:51 +080038
39#endif /* __ASM_GBL_DATA_H */