1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * (C) Copyright 2002-2010
4 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
7 #ifndef __ASM_GBL_DATA_H
8 #define __ASM_GBL_DATA_H
11 #include "asm/types.h"
13 /* Architecture-specific global data */
14 struct arch_global_data {
15 #if defined(CONFIG_FSL_ESDHC)
17 #if defined(CONFIG_FSL_ESDHC_ADAPTER_IDENT)
21 #if defined(CONFIG_MPC8xx)
22 unsigned long brg_clk;
24 #if defined(CONFIG_CPM2)
25 /* There are many clocks on the MPC8260 - see page 9-5 */
26 unsigned long vco_out;
27 unsigned long cpm_clk;
28 unsigned long scc_clk;
29 unsigned long brg_clk;
31 /* TODO: sjg@chromium.org: Should these be unslgned long? */
32 #if defined(CONFIG_MPC83xx)
33 /* There are other clocks in the MPC83XX */
35 # if defined(CONFIG_MPC8308) || defined(CONFIG_MPC831x) || \
36 defined(CONFIG_MPC834x) || defined(CONFIG_MPC837x)
40 # elif defined(CONFIG_MPC8309)
43 # if defined(CONFIG_MPC834x)
45 # endif /* CONFIG_MPC834x */
46 # if defined(CONFIG_MPC8315)
53 # if defined(CONFIG_MPC8308) || defined(CONFIG_MPC831x) || \
54 defined(CONFIG_MPC837x)
58 # if defined(CONFIG_MPC837x) || defined(CONFIG_MPC8315)
61 # if defined(CONFIG_MPC8360)
63 # endif /* CONFIG_MPC8360 */
65 #if defined(CONFIG_MPC85xx) || defined(CONFIG_MPC86xx)
68 #endif /* CONFIG_MPC85xx || CONFIG_MPC86xx */
69 #if defined(CONFIG_MPC83xx) || defined(CONFIG_MPC85xx) || \
70 defined(CONFIG_MPC86xx)
74 #if defined(CONFIG_QE)
79 #endif /* CONFIG_QE */
80 #if defined(CONFIG_FSL_LAW)
83 #if defined(CONFIG_E500)
84 u32 used_tlb_cams[(CONFIG_SYS_NUM_TLBCAMS+31)/32];
86 unsigned long reset_status; /* reset status register at boot */
87 #if defined(CONFIG_MPC83xx)
88 unsigned long arbiter_event_attributes;
89 unsigned long arbiter_event_address;
91 #if defined(CONFIG_CPM2)
92 unsigned int dp_alloc_base;
93 unsigned int dp_alloc_top;
95 #ifdef CONFIG_SYS_FPGA_COUNT
96 unsigned fpga_state[CONFIG_SYS_FPGA_COUNT];
98 #if defined(CONFIG_WD_MAX_RATE)
99 unsigned long long wdt_last; /* trace watch-dog triggering rate */
101 #if defined(CONFIG_LWMON5)
102 unsigned long kbd_status;
106 #include <asm-generic/global_data.h>
109 #define DECLARE_GLOBAL_DATA_PTR register volatile gd_t *gd asm ("r2")
110 #else /* We could use plain global data, but the resulting code is bigger */
111 #define XTRN_DECLARE_GLOBAL_DATA_PTR extern
112 #define DECLARE_GLOBAL_DATA_PTR XTRN_DECLARE_GLOBAL_DATA_PTR \
116 #endif /* __ASM_GBL_DATA_H */