1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * Ugly header containing required header files. This could be adjusted
4 * so that including asm/arch/hardware includes the correct file.
6 * (C) Copyright 2000-2009
7 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
15 #if defined(CONFIG_MPC8xx)
16 #include <asm/immap_8xx.h>
20 #include <asm/immap_85xx.h>
24 #include <asm/immap_83xx.h>
26 #ifdef CONFIG_SOC_DA8XX
27 #include <asm/arch/hardware.h>
29 #ifdef CONFIG_FSL_LSCH3
30 #include <asm/arch/immap_lsch3.h>
32 #ifdef CONFIG_FSL_LSCH2
33 #include <asm/arch/immap_lsch2.h>
36 #include <asm/processor.h>
38 static inline uint get_immr(void)
40 return mfspr(SPRN_IMMR);
43 static inline uint get_pvr(void)
48 static inline uint get_svr(void)
53 #if defined(CONFIG_MPC85xx) || \
54 defined(CONFIG_MPC86xx) || \
55 defined(CONFIG_MPC83xx)
56 unsigned char in8(unsigned int);
57 void out8(unsigned int, unsigned char);
58 unsigned short in16(unsigned int);
59 unsigned short in16r(unsigned int);
60 void out16(unsigned int, unsigned short value);
61 void out16r(unsigned int, unsigned short value);
62 unsigned long in32(unsigned int);
63 unsigned long in32r(unsigned int);
64 void out32(unsigned int, unsigned long value);
65 void out32r(unsigned int, unsigned long value);
66 void ppcDcbf(unsigned long value);
67 void ppcDcbi(unsigned long value);
69 void ppcDcbz(unsigned long value);
71 #if defined(CONFIG_MPC83xx)
72 void ppcDWload(unsigned int *addr, unsigned int *ret);
73 void ppcDWstore(unsigned int *addr, unsigned int *value);
74 void disable_addr_trans(void);
75 void enable_addr_trans(void);
76 #if defined(CONFIG_DDR_ECC) && !defined(CONFIG_ECC_INIT_VIA_DDRCONTROLLER)
77 void ddr_enable_ecc(unsigned int dram_size);
81 #if defined(CONFIG_MPC85xx)
82 typedef MPC85xx_SYS_INFO sys_info_t;
83 void get_sys_info(sys_info_t *);
84 void ft_fixup_cpu(void *, u64);
85 void ft_fixup_num_cores(void *);
87 #if defined(CONFIG_MPC86xx)
88 ulong get_bus_freq(ulong);
89 typedef MPC86xx_SYS_INFO sys_info_t;
90 void get_sys_info(sys_info_t *);
91 static inline ulong get_ddr_freq(ulong dummy)
93 return get_bus_freq(dummy);
96 ulong get_ddr_freq(ulong);
99 static inline unsigned long get_msr(void)
103 asm volatile ("mfmsr %0" : "=r" (msr) : );
108 static inline void set_msr(unsigned long msr)
110 asm volatile ("mtmsr %0" : : "r" (msr));
113 #ifdef CONFIG_CMD_REGINFO
114 void print_reginfo(void);
117 void interrupt_init_cpu(unsigned *);
118 void timer_interrupt_cpu(struct pt_regs *);
119 unsigned long search_exception_table(unsigned long addr);
120 void upmconfig(uint upm, uint *table, uint size);
122 #endif /* !__ASSEMBLY__ */
126 * Has to be included outside of the #ifndef __ASSEMBLY__ section.
127 * Otherwise might lead to compilation errors in assembler files.
129 #include <asm/cache.h>