blob: cc828c45045c369919b26ebe883e47bca6d81a3a [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
wdenkc6097192002-11-03 00:24:07 +00002/*
3 * (C) Copyright 2002
4 * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
5 * Marius Groeger <mgroeger@sysgo.de>
6 *
7 * (C) Copyright 2002
8 * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
9 * Alex Zuepke <azu@sysgo.de>
wdenkc6097192002-11-03 00:24:07 +000010 */
11
12#ifndef _U_BOOT_ARM_H_
13#define _U_BOOT_ARM_H_ 1
14
Simon Glass4ef529e2017-05-17 08:22:50 -060015#ifndef __ASSEMBLY__
16
wdenkc6097192002-11-03 00:24:07 +000017/* for the following variables, see start.S */
wdenkc6097192002-11-03 00:24:07 +000018extern ulong IRQ_STACK_START; /* top of IRQ stack */
19extern ulong FIQ_STACK_START; /* top of FIQ stack */
Albert Aribaud6d1fcb12010-10-11 13:13:28 +020020extern ulong _datarel_start_ofs;
21extern ulong _datarelrolocal_start_ofs;
22extern ulong _datarellocal_start_ofs;
23extern ulong _datarelro_start_ofs;
Heiko Schocheraeb29912010-09-17 13:10:39 +020024extern ulong IRQ_STACK_START_IN; /* 8 bytes in IRQ stack */
wdenkc6097192002-11-03 00:24:07 +000025
26/* cpu/.../cpu.c */
27int cpu_init(void);
28int cleanup_before_linux(void);
29
Simon Glass277e3082011-11-05 03:56:51 +000030/* Set up ARMv7 MMU, caches and TLBs */
31void cpu_init_cp15(void);
32
Jean-Christophe PLAGNIOL-VILLARD23164f12009-04-16 21:30:44 +020033/* cpu/.../arch/cpu.c */
34int arch_cpu_init(void);
Prafulla Wadaskar98196702009-05-31 14:53:20 +020035int arch_misc_init(void);
Fabio Estevam4310ecc2012-04-02 11:19:45 +000036int arch_early_init_r(void);
Jean-Christophe PLAGNIOL-VILLARD23164f12009-04-16 21:30:44 +020037
wdenkc6097192002-11-03 00:24:07 +000038/* board/.../... */
39int board_init(void);
wdenkc6097192002-11-03 00:24:07 +000040
wdenkc6097192002-11-03 00:24:07 +000041/* cpu/.../interrupt.c */
Jean-Christophe PLAGNIOL-VILLARDda7b3db2009-05-09 13:21:18 +020042int arch_interrupt_init (void);
wdenkc6097192002-11-03 00:24:07 +000043void reset_timer_masked (void);
44ulong get_timer_masked (void);
45void udelay_masked (unsigned long usec);
46
Jeroen Hofsteea9641332014-10-08 22:57:59 +020047/* calls to c from vectors.S */
Simon Glass30db7742017-05-17 08:22:59 -060048struct pt_regs;
49
Jeroen Hofsteea9641332014-10-08 22:57:59 +020050void bad_mode(void);
51void do_undefined_instruction(struct pt_regs *pt_regs);
52void do_software_interrupt(struct pt_regs *pt_regs);
53void do_prefetch_abort(struct pt_regs *pt_regs);
54void do_data_abort(struct pt_regs *pt_regs);
55void do_not_used(struct pt_regs *pt_regs);
56#ifdef CONFIG_ARM64
57void do_fiq(struct pt_regs *pt_regs, unsigned int esr);
58void do_irq(struct pt_regs *pt_regs, unsigned int esr);
59#else
60void do_fiq(struct pt_regs *pt_regs);
61void do_irq(struct pt_regs *pt_regswq);
62#endif
63
Simon Glass4ef529e2017-05-17 08:22:50 -060064#endif /* __ASSEMBLY__ */
65
wdenkc6097192002-11-03 00:24:07 +000066#endif /* _U_BOOT_ARM_H_ */