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 #ifdef CONFIG_CLK_MPC83XX
36 /* There are other clocks in the MPC83XX */
38 # if defined(CONFIG_ARCH_MPC8308) || defined(CONFIG_ARCH_MPC831X) || \
39 defined(CONFIG_ARCH_MPC834X) || defined(CONFIG_MPC837x)
43 # elif defined(CONFIG_ARCH_MPC8309)
46 # if defined(CONFIG_ARCH_MPC834X)
48 # endif /* CONFIG_ARCH_MPC834X */
49 # if defined(CONFIG_ARCH_MPC8315)
56 # if defined(CONFIG_ARCH_MPC8308) || defined(CONFIG_ARCH_MPC831X) || \
57 defined(CONFIG_MPC837x)
61 # if defined(CONFIG_MPC837x) || defined(CONFIG_ARCH_MPC8315)
64 # if defined(CONFIG_ARCH_MPC8360)
66 # endif /* CONFIG_ARCH_MPC8360 */
69 #if defined(CONFIG_MPC85xx) || defined(CONFIG_MPC86xx)
72 #endif /* CONFIG_MPC85xx || CONFIG_MPC86xx */
73 #if defined(CONFIG_MPC83xx) || defined(CONFIG_MPC85xx) || \
74 defined(CONFIG_MPC86xx)
78 #if defined(CONFIG_QE)
83 #endif /* CONFIG_QE */
84 #if defined(CONFIG_FSL_LAW)
87 #if defined(CONFIG_E500)
88 u32 used_tlb_cams[(CONFIG_SYS_NUM_TLBCAMS+31)/32];
90 unsigned long reset_status; /* reset status register at boot */
91 #if defined(CONFIG_MPC83xx)
92 unsigned long arbiter_event_attributes;
93 unsigned long arbiter_event_address;
95 #if defined(CONFIG_CPM2)
96 unsigned int dp_alloc_base;
97 unsigned int dp_alloc_top;
99 #ifdef CONFIG_SYS_FPGA_COUNT
100 unsigned fpga_state[CONFIG_SYS_FPGA_COUNT];
102 #if defined(CONFIG_WD_MAX_RATE)
103 unsigned long long wdt_last; /* trace watch-dog triggering rate */
105 #if defined(CONFIG_LWMON5)
106 unsigned long kbd_status;
110 #include <asm-generic/global_data.h>
113 #define DECLARE_GLOBAL_DATA_PTR register volatile gd_t *gd asm ("r2")
114 #else /* We could use plain global data, but the resulting code is bigger */
115 #define XTRN_DECLARE_GLOBAL_DATA_PTR extern
116 #define DECLARE_GLOBAL_DATA_PTR XTRN_DECLARE_GLOBAL_DATA_PTR \
120 #endif /* __ASM_GBL_DATA_H */