]>
Commit | Line | Data |
---|---|---|
85043159 SG |
1 | /* |
2 | * Ugly header containing required header files. This could be adjusted | |
3 | * so that including asm/arch/hardware includes the correct file. | |
4 | * | |
5 | * (C) Copyright 2000-2009 | |
6 | * Wolfgang Denk, DENX Software Engineering, wd@denx.de. | |
7 | * | |
8 | * SPDX-License-Identifier: GPL-2.0+ | |
9 | */ | |
10 | ||
11 | #ifndef __ASM_PPC_H | |
12 | #define __ASM_PPC_H | |
13 | ||
14 | #ifndef __ASSEMBLY__ | |
15 | ||
907208c4 CL |
16 | #if defined(CONFIG_8xx) |
17 | #include <asm/8xx_immap.h> | |
18 | #if defined(CONFIG_MPC866) | |
19 | # define CONFIG_MPC866_FAMILY 1 | |
20 | #elif defined(CONFIG_MPC885) | |
21 | # define CONFIG_MPC885_FAMILY 1 | |
22 | #endif | |
23 | #endif | |
85043159 SG |
24 | #ifdef CONFIG_MPC86xx |
25 | #include <mpc86xx.h> | |
26 | #include <asm/immap_86xx.h> | |
27 | #endif | |
28 | #ifdef CONFIG_MPC85xx | |
29 | #include <mpc85xx.h> | |
30 | #include <asm/immap_85xx.h> | |
31 | #endif | |
32 | #ifdef CONFIG_MPC83xx | |
33 | #include <mpc83xx.h> | |
34 | #include <asm/immap_83xx.h> | |
35 | #endif | |
85043159 SG |
36 | #ifdef CONFIG_SOC_DA8XX |
37 | #include <asm/arch/hardware.h> | |
38 | #endif | |
39 | #ifdef CONFIG_FSL_LSCH3 | |
40 | #include <asm/arch/immap_lsch3.h> | |
41 | #endif | |
42 | #ifdef CONFIG_FSL_LSCH2 | |
43 | #include <asm/arch/immap_lsch2.h> | |
44 | #endif | |
45 | ||
907208c4 CL |
46 | #if defined(CONFIG_8xx) |
47 | uint get_immr(uint); | |
48 | #endif | |
6e2941d7 SG |
49 | uint get_pvr(void); |
50 | uint get_svr(void); | |
51 | uint rd_ic_cst(void); | |
52 | void wr_ic_cst(uint); | |
53 | void wr_ic_adr(uint); | |
54 | uint rd_dc_cst(void); | |
55 | void wr_dc_cst(uint); | |
56 | void wr_dc_adr(uint); | |
57 | ||
98f705c9 | 58 | #if defined(CONFIG_MPC85xx) || \ |
6e2941d7 SG |
59 | defined(CONFIG_MPC86xx) || \ |
60 | defined(CONFIG_MPC83xx) | |
61 | unsigned char in8(unsigned int); | |
62 | void out8(unsigned int, unsigned char); | |
63 | unsigned short in16(unsigned int); | |
64 | unsigned short in16r(unsigned int); | |
65 | void out16(unsigned int, unsigned short value); | |
66 | void out16r(unsigned int, unsigned short value); | |
67 | unsigned long in32(unsigned int); | |
68 | unsigned long in32r(unsigned int); | |
69 | void out32(unsigned int, unsigned long value); | |
70 | void out32r(unsigned int, unsigned long value); | |
71 | void ppcDcbf(unsigned long value); | |
72 | void ppcDcbi(unsigned long value); | |
73 | void ppcSync(void); | |
74 | void ppcDcbz(unsigned long value); | |
75 | #endif | |
76 | #if defined(CONFIG_MPC83xx) | |
77 | void ppcDWload(unsigned int *addr, unsigned int *ret); | |
78 | void ppcDWstore(unsigned int *addr, unsigned int *value); | |
79 | void disable_addr_trans(void); | |
80 | void enable_addr_trans(void); | |
81 | #if defined(CONFIG_DDR_ECC) && !defined(CONFIG_ECC_INIT_VIA_DDRCONTROLLER) | |
82 | void ddr_enable_ecc(unsigned int dram_size); | |
83 | #endif | |
84 | #endif | |
85 | ||
6e2941d7 SG |
86 | #if defined(CONFIG_MPC85xx) |
87 | typedef MPC85xx_SYS_INFO sys_info_t; | |
88 | void get_sys_info(sys_info_t *); | |
89 | void ft_fixup_cpu(void *, u64); | |
90 | void ft_fixup_num_cores(void *); | |
91 | #endif | |
92 | #if defined(CONFIG_MPC86xx) | |
93 | ulong get_bus_freq(ulong); | |
94 | typedef MPC86xx_SYS_INFO sys_info_t; | |
95 | void get_sys_info(sys_info_t *); | |
96 | static inline ulong get_ddr_freq(ulong dummy) | |
97 | { | |
98 | return get_bus_freq(dummy); | |
99 | } | |
100 | #else | |
101 | ulong get_ddr_freq(ulong); | |
102 | #endif | |
103 | ||
85043159 SG |
104 | #endif /* !__ASSEMBLY__ */ |
105 | ||
6e2941d7 SG |
106 | #ifdef CONFIG_PPC |
107 | /* | |
108 | * Has to be included outside of the #ifndef __ASSEMBLY__ section. | |
109 | * Otherwise might lead to compilation errors in assembler files. | |
110 | */ | |
111 | #include <asm/cache.h> | |
112 | #endif | |
113 | ||
85043159 | 114 | #endif |