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)
18 #if defined(CONFIG_FSL_ESDHC_ADAPTER_IDENT)
22 #if defined(CONFIG_8xx)
23 unsigned long brg_clk;
25 #if defined(CONFIG_CPM2)
26 /* There are many clocks on the MPC8260 - see page 9-5 */
27 unsigned long vco_out;
28 unsigned long cpm_clk;
29 unsigned long scc_clk;
30 unsigned long brg_clk;
32 /* TODO: sjg@chromium.org: Should these be unslgned long? */
33 #if defined(CONFIG_MPC83xx)
34 /* There are other clocks in the MPC83XX */
36 # if defined(CONFIG_MPC8308) || defined(CONFIG_MPC831x) || \
37 defined(CONFIG_MPC834x) || defined(CONFIG_MPC837x)
41 # elif defined(CONFIG_MPC8309)
44 # if defined(CONFIG_MPC834x)
46 # endif /* CONFIG_MPC834x */
47 # if defined(CONFIG_MPC8315)
54 # if defined(CONFIG_MPC8308) || defined(CONFIG_MPC831x) || \
55 defined(CONFIG_MPC837x)
59 # if defined(CONFIG_MPC837x) || defined(CONFIG_MPC8315)
62 # if defined(CONFIG_MPC8360)
64 # endif /* CONFIG_MPC8360 */
66 #if defined(CONFIG_MPC85xx) || defined(CONFIG_MPC86xx)
69 #endif /* CONFIG_MPC85xx || CONFIG_MPC86xx */
70 #if defined(CONFIG_MPC83xx) || defined(CONFIG_MPC85xx) || \
71 defined(CONFIG_MPC86xx)
75 #if defined(CONFIG_QE)
80 #endif /* CONFIG_QE */
81 #if defined(CONFIG_FSL_LAW)
84 #if defined(CONFIG_E500)
85 u32 used_tlb_cams[(CONFIG_SYS_NUM_TLBCAMS+31)/32];
87 #if defined(CONFIG_MPC5xxx)
88 unsigned long ipb_clk;
90 #if defined(CONFIG_MPC512X)
93 #endif /* CONFIG_MPC512X */
94 unsigned long reset_status; /* reset status register at boot */
95 #if defined(CONFIG_MPC83xx)
96 unsigned long arbiter_event_attributes;
97 unsigned long arbiter_event_address;
99 #if defined(CONFIG_SYS_ALLOC_DPRAM) || defined(CONFIG_CPM2)
100 unsigned int dp_alloc_base;
101 unsigned int dp_alloc_top;
103 #if defined(CONFIG_4xx)
105 #endif /* CONFIG_4xx */
106 #ifdef CONFIG_SYS_FPGA_COUNT
107 unsigned fpga_state[CONFIG_SYS_FPGA_COUNT];
109 #if defined(CONFIG_WD_MAX_RATE)
110 unsigned long long wdt_last; /* trace watch-dog triggering rate */
112 #if defined(CONFIG_LWMON5)
113 unsigned long kbd_status;
117 #include <asm-generic/global_data.h>
120 #define DECLARE_GLOBAL_DATA_PTR register volatile gd_t *gd asm ("r2")
121 #else /* We could use plain global data, but the resulting code is bigger */
122 #define XTRN_DECLARE_GLOBAL_DATA_PTR extern
123 #define DECLARE_GLOBAL_DATA_PTR XTRN_DECLARE_GLOBAL_DATA_PTR \
127 #endif /* __ASM_GBL_DATA_H */