2 * Ugly header containing required header files. This could be adjusted
3 * so that including asm/arch/hardware includes the correct file.
5 * (C) Copyright 2000-2009
6 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
8 * SPDX-License-Identifier: GPL-2.0+
16 #if defined(CONFIG_8xx)
17 #include <asm/8xx_immap.h>
21 #include <asm/immap_86xx.h>
25 #include <asm/immap_85xx.h>
29 #include <asm/immap_83xx.h>
31 #ifdef CONFIG_SOC_DA8XX
32 #include <asm/arch/hardware.h>
34 #ifdef CONFIG_FSL_LSCH3
35 #include <asm/arch/immap_lsch3.h>
37 #ifdef CONFIG_FSL_LSCH2
38 #include <asm/arch/immap_lsch2.h>
41 #include <asm/processor.h>
43 #if defined(CONFIG_8xx)
44 static inline uint
get_immr(uint mask
)
46 uint immr
= mfspr(SPRN_IMMR
);
48 return mask
? (immr
& mask
) : immr
;
51 static inline uint
get_pvr(void)
56 static inline uint
get_svr(void)
61 #if defined(CONFIG_MPC85xx) || \
62 defined(CONFIG_MPC86xx) || \
63 defined(CONFIG_MPC83xx)
64 unsigned char in8(unsigned int);
65 void out8(unsigned int, unsigned char);
66 unsigned short in16(unsigned int);
67 unsigned short in16r(unsigned int);
68 void out16(unsigned int, unsigned short value
);
69 void out16r(unsigned int, unsigned short value
);
70 unsigned long in32(unsigned int);
71 unsigned long in32r(unsigned int);
72 void out32(unsigned int, unsigned long value
);
73 void out32r(unsigned int, unsigned long value
);
74 void ppcDcbf(unsigned long value
);
75 void ppcDcbi(unsigned long value
);
77 void ppcDcbz(unsigned long value
);
79 #if defined(CONFIG_MPC83xx)
80 void ppcDWload(unsigned int *addr
, unsigned int *ret
);
81 void ppcDWstore(unsigned int *addr
, unsigned int *value
);
82 void disable_addr_trans(void);
83 void enable_addr_trans(void);
84 #if defined(CONFIG_DDR_ECC) && !defined(CONFIG_ECC_INIT_VIA_DDRCONTROLLER)
85 void ddr_enable_ecc(unsigned int dram_size
);
89 #if defined(CONFIG_MPC85xx)
90 typedef MPC85xx_SYS_INFO sys_info_t
;
91 void get_sys_info(sys_info_t
*);
92 void ft_fixup_cpu(void *, u64
);
93 void ft_fixup_num_cores(void *);
95 #if defined(CONFIG_MPC86xx)
96 ulong
get_bus_freq(ulong
);
97 typedef MPC86xx_SYS_INFO sys_info_t
;
98 void get_sys_info(sys_info_t
*);
99 static inline ulong
get_ddr_freq(ulong dummy
)
101 return get_bus_freq(dummy
);
104 ulong
get_ddr_freq(ulong
);
107 static inline unsigned long get_msr(void)
111 asm volatile ("mfmsr %0" : "=r" (msr
) : );
116 static inline void set_msr(unsigned long msr
)
118 asm volatile ("mtmsr %0" : : "r" (msr
));
121 #ifdef CONFIG_CMD_REGINFO
122 void print_reginfo(void);
125 void interrupt_init_cpu(unsigned *);
126 void timer_interrupt_cpu(struct pt_regs
*);
127 unsigned long search_exception_table(unsigned long addr
);
129 #endif /* !__ASSEMBLY__ */
133 * Has to be included outside of the #ifndef __ASSEMBLY__ section.
134 * Otherwise might lead to compilation errors in assembler files.
136 #include <asm/cache.h>