Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Macpaul Lin | 0b9b59a | 2011-10-11 22:33:15 +0000 | [diff] [blame] | 2 | /* |
| 3 | * (C) Copyright 2002 |
| 4 | * Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
| 5 | * |
| 6 | * Copyright (C) 2011 Andes Technology Corporation |
| 7 | * Shawn Lin, Andes Technology Corporation <nobuhiro@andestech.com> |
| 8 | * Macpaul Lin, Andes Technology Corporation <macpaul@andestech.com> |
Macpaul Lin | 0b9b59a | 2011-10-11 22:33:15 +0000 | [diff] [blame] | 9 | */ |
| 10 | |
| 11 | /************************************************************** |
| 12 | * CAUTION: |
| 13 | * - do not implement for NDS32 Arch yet. |
| 14 | * - so far no one uses the macros defined in this head file. |
| 15 | **************************************************************/ |
| 16 | |
| 17 | #ifndef __ASM_GBL_DATA_H |
| 18 | #define __ASM_GBL_DATA_H |
Simon Glass | 3ac47d7 | 2012-12-13 20:48:30 +0000 | [diff] [blame] | 19 | |
Tom Rini | 5dc7f61 | 2021-06-03 09:39:02 -0400 | [diff] [blame^] | 20 | #include <config.h> |
| 21 | |
Simon Glass | 3ac47d7 | 2012-12-13 20:48:30 +0000 | [diff] [blame] | 22 | /* Architecture-specific global data */ |
| 23 | struct arch_global_data { |
| 24 | }; |
| 25 | |
Simon Glass | f62b94d | 2012-12-13 20:49:20 +0000 | [diff] [blame] | 26 | #include <asm-generic/global_data.h> |
Macpaul Lin | 0b9b59a | 2011-10-11 22:33:15 +0000 | [diff] [blame] | 27 | |
| 28 | #ifdef CONFIG_GLOBAL_DATA_NOT_REG10 |
| 29 | extern volatile gd_t g_gd; |
| 30 | #define DECLARE_GLOBAL_DATA_PTR static volatile gd_t *gd = &g_gd |
| 31 | #else |
| 32 | #define DECLARE_GLOBAL_DATA_PTR register volatile gd_t *gd asm ("$r10") |
| 33 | #endif |
| 34 | |
| 35 | #endif /* __ASM_GBL_DATA_H */ |