blob: 6c50149218b49c4a3004f0b70d622825fec8973d [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 */
Atish Patra111b8042020-04-21 11:15:01 -070018 phys_addr_t firmware_fdt_addr;
Bin Mengb6ee5e12018-12-12 06:12:30 -080019#ifdef CONFIG_SIFIVE_CLINT
20 void __iomem *clint; /* clint base address */
21#endif
Rick Chen6df4ed02019-04-02 15:56:39 +080022#ifdef CONFIG_ANDES_PLIC
23 void __iomem *plic; /* plic base address */
24#endif
Rick Chen73766772019-04-02 15:56:40 +080025#ifdef CONFIG_ANDES_PLMT
26 void __iomem *plmt; /* plmt base address */
27#endif
Bin Mengb161f902020-04-16 08:09:30 -070028#if CONFIG_IS_ENABLED(SMP)
Lukas Auer83d573d2019-03-17 19:28:32 +010029 struct ipi_data ipi[CONFIG_NR_CPUS];
30#endif
Rick Chene5e6c362019-04-30 13:49:33 +080031#ifndef CONFIG_XIP
Lukas Auer83d573d2019-03-17 19:28:32 +010032 ulong available_harts;
Rick Chene5e6c362019-04-30 13:49:33 +080033#endif
Rick Chen76c0a242017-12-26 13:55:51 +080034};
35
36#include <asm-generic/global_data.h>
37
Rick Chenb34b4b92018-02-12 11:10:04 +080038#define DECLARE_GLOBAL_DATA_PTR register gd_t *gd asm ("gp")
Rick Chen76c0a242017-12-26 13:55:51 +080039
40#endif /* __ASM_GBL_DATA_H */