]> git.ipfire.org Git - people/ms/u-boot.git/blame - arch/powerpc/include/asm/ppc.h
powerpc: remove 4xx support
[people/ms/u-boot.git] / arch / powerpc / include / asm / ppc.h
CommitLineData
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
85043159
SG
16#ifdef CONFIG_MPC86xx
17#include <mpc86xx.h>
18#include <asm/immap_86xx.h>
19#endif
20#ifdef CONFIG_MPC85xx
21#include <mpc85xx.h>
22#include <asm/immap_85xx.h>
23#endif
24#ifdef CONFIG_MPC83xx
25#include <mpc83xx.h>
26#include <asm/immap_83xx.h>
27#endif
85043159
SG
28#ifdef CONFIG_SOC_DA8XX
29#include <asm/arch/hardware.h>
30#endif
31#ifdef CONFIG_FSL_LSCH3
32#include <asm/arch/immap_lsch3.h>
33#endif
34#ifdef CONFIG_FSL_LSCH2
35#include <asm/arch/immap_lsch2.h>
36#endif
37
6e2941d7
SG
38uint get_pvr(void);
39uint get_svr(void);
40uint rd_ic_cst(void);
41void wr_ic_cst(uint);
42void wr_ic_adr(uint);
43uint rd_dc_cst(void);
44void wr_dc_cst(uint);
45void wr_dc_adr(uint);
46
98f705c9 47#if defined(CONFIG_MPC85xx) || \
6e2941d7
SG
48 defined(CONFIG_MPC86xx) || \
49 defined(CONFIG_MPC83xx)
50unsigned char in8(unsigned int);
51void out8(unsigned int, unsigned char);
52unsigned short in16(unsigned int);
53unsigned short in16r(unsigned int);
54void out16(unsigned int, unsigned short value);
55void out16r(unsigned int, unsigned short value);
56unsigned long in32(unsigned int);
57unsigned long in32r(unsigned int);
58void out32(unsigned int, unsigned long value);
59void out32r(unsigned int, unsigned long value);
60void ppcDcbf(unsigned long value);
61void ppcDcbi(unsigned long value);
62void ppcSync(void);
63void ppcDcbz(unsigned long value);
64#endif
65#if defined(CONFIG_MPC83xx)
66void ppcDWload(unsigned int *addr, unsigned int *ret);
67void ppcDWstore(unsigned int *addr, unsigned int *value);
68void disable_addr_trans(void);
69void enable_addr_trans(void);
70#if defined(CONFIG_DDR_ECC) && !defined(CONFIG_ECC_INIT_VIA_DDRCONTROLLER)
71void ddr_enable_ecc(unsigned int dram_size);
72#endif
73#endif
74
6e2941d7
SG
75#if defined(CONFIG_MPC85xx)
76typedef MPC85xx_SYS_INFO sys_info_t;
77void get_sys_info(sys_info_t *);
78void ft_fixup_cpu(void *, u64);
79void ft_fixup_num_cores(void *);
80#endif
81#if defined(CONFIG_MPC86xx)
82ulong get_bus_freq(ulong);
83typedef MPC86xx_SYS_INFO sys_info_t;
84void get_sys_info(sys_info_t *);
85static inline ulong get_ddr_freq(ulong dummy)
86{
87 return get_bus_freq(dummy);
88}
89#else
90ulong get_ddr_freq(ulong);
91#endif
92
85043159
SG
93#endif /* !__ASSEMBLY__ */
94
6e2941d7
SG
95#ifdef CONFIG_PPC
96/*
97 * Has to be included outside of the #ifndef __ASSEMBLY__ section.
98 * Otherwise might lead to compilation errors in assembler files.
99 */
100#include <asm/cache.h>
101#endif
102
85043159 103#endif