2 * (C) Copyright 2002-2010
3 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
5 * SPDX-License-Identifier: GPL-2.0+
8 #ifndef __ASM_GBL_DATA_H
9 #define __ASM_GBL_DATA_H
12 #include "asm/types.h"
14 /* Architecture-specific global data */
15 struct arch_global_data {
16 #if defined(CONFIG_FSL_ESDHC)
19 #if defined(CONFIG_8xx)
20 unsigned long brg_clk;
22 #if defined(CONFIG_CPM2)
23 /* There are many clocks on the MPC8260 - see page 9-5 */
24 unsigned long vco_out;
25 unsigned long cpm_clk;
26 unsigned long scc_clk;
27 unsigned long brg_clk;
29 /* TODO: sjg@chromium.org: Should these be unslgned long? */
30 #if defined(CONFIG_MPC83xx)
31 /* There are other clocks in the MPC83XX */
33 # if defined(CONFIG_MPC8308) || defined(CONFIG_MPC831x) || \
34 defined(CONFIG_MPC834x) || defined(CONFIG_MPC837x)
38 # elif defined(CONFIG_MPC8309)
41 # if defined(CONFIG_MPC834x)
43 # endif /* CONFIG_MPC834x */
44 # if defined(CONFIG_MPC8315)
51 # if defined(CONFIG_MPC8308) || defined(CONFIG_MPC831x) || \
52 defined(CONFIG_MPC837x)
56 # if defined(CONFIG_MPC837x) || defined(CONFIG_MPC8315)
59 # if defined(CONFIG_MPC8360)
61 # endif /* CONFIG_MPC8360 */
63 #if defined(CONFIG_MPC85xx) || defined(CONFIG_MPC86xx)
66 #endif /* CONFIG_MPC85xx || CONFIG_MPC86xx */
67 #if defined(CONFIG_MPC83xx) || defined(CONFIG_MPC85xx) || \
68 defined(CONFIG_MPC86xx)
72 #if defined(CONFIG_QE)
77 #endif /* CONFIG_QE */
78 #if defined(CONFIG_FSL_LAW)
81 #if defined(CONFIG_E500)
82 u32 used_tlb_cams[(CONFIG_SYS_NUM_TLBCAMS+31)/32];
84 #if defined(CONFIG_MPC5xxx)
85 unsigned long ipb_clk;
87 #if defined(CONFIG_MPC512X)
90 #endif /* CONFIG_MPC512X */
91 unsigned long reset_status; /* reset status register at boot */
92 #if defined(CONFIG_MPC83xx)
93 unsigned long arbiter_event_attributes;
94 unsigned long arbiter_event_address;
96 #if defined(CONFIG_SYS_ALLOC_DPRAM) || defined(CONFIG_CPM2)
97 unsigned int dp_alloc_base;
98 unsigned int dp_alloc_top;
100 #if defined(CONFIG_4xx)
102 #endif /* CONFIG_4xx */
103 #ifdef CONFIG_SYS_FPGA_COUNT
104 unsigned fpga_state[CONFIG_SYS_FPGA_COUNT];
106 #if defined(CONFIG_WD_MAX_RATE)
107 unsigned long long wdt_last; /* trace watch-dog triggering rate */
109 #if defined(CONFIG_LWMON5)
110 unsigned long kbd_status;
114 #include <asm-generic/global_data.h>
117 #define DECLARE_GLOBAL_DATA_PTR register volatile gd_t *gd asm ("r2")
118 #else /* We could use plain global data, but the resulting code is bigger */
119 #define XTRN_DECLARE_GLOBAL_DATA_PTR extern
120 #define DECLARE_GLOBAL_DATA_PTR XTRN_DECLARE_GLOBAL_DATA_PTR \
124 #endif /* __ASM_GBL_DATA_H */