barebox/arch/ppc/include/asm/common.h
Renaud Barbier bd20ba6798 Preparation stage to support multiple PPC architectures
arch/ppc/Kconfig is reworked to make the configuration environment
architecture neutral. All MPC5200 configuration is moved to the
MPC5200 architecture specific configuration file. These modifications
are reflected in the PCM030 board support.

arch/ppc/Makefile compilation directives are updated in preparation
for the introduction of future cpus/machines.

lib/time.c is moved to the architecture specific directory and the
building instructions updated in the Make files. The file is
cleaned up of unused code.

The definition of L1_CACHE_... is updated and CACHELINE_SIZE is
defined in ppc/include/asm/cache.h for future use by the mpc85xx.
The file mach-mpc5xxx/pci_mpc5200.c and mach-mpc5xxx/start.S are
updated accordingly.

The declaration of search_exception_table is moved in
include/asm/common.h because it is used across architectures.
mach-mpc5xxx/traps.c is also updated to reflect this change.

The definition of exception in asm/ppc_asm.tmpl is updated for future
use by the mpc85xx. The file starts.S in mach-mpc5xxx is updated
accordingly.

Signed-off-by: Renaud Barbier <renaud.barbier@ge.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-02 10:16:30 +02:00

36 lines
585 B
C

#ifndef __ASM_COMMON_H
#define __ASM_COMMON_H
#include <asm/barebox.h>
extern unsigned long _text_base;
unsigned long long get_ticks(void);
int cpu_init (void);
uint get_pvr (void);
uint get_svr (void);
void trap_init (ulong);
static inline unsigned long get_pc(void)
{
unsigned long pc;
__asm__ __volatile__(
" mflr 0\n"
" bl 1f\n"
"1:\n"
" mflr %0\n"
" mtlr 0\n"
: "=r" (pc)
:
: "0", "memory");
return pc;
}
extern unsigned long search_exception_table(unsigned long);
#endif /* __ASM_COMMON_H */