blob: ef4fca68ee95a14d7a9aa35aefe3f2466d5e2bfd [file] [log] [blame]
wdenkc6097192002-11-03 00:24:07 +00001/*
2 * (C) Copyright 2002
3 * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
4 * Marius Groeger <mgroeger@sysgo.de>
5 *
6 * (C) Copyright 2002
7 * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
8 * Alex Zuepke <azu@sysgo.de>
9 *
Wolfgang Denkd79de1d2013-07-08 09:37:19 +020010 * SPDX-License-Identifier: GPL-2.0+
wdenkc6097192002-11-03 00:24:07 +000011 */
12
13#ifndef _U_BOOT_ARM_H_
14#define _U_BOOT_ARM_H_ 1
15
Simon Glass4ef529e2017-05-17 08:22:50 -060016#ifndef __ASSEMBLY__
17
wdenkc6097192002-11-03 00:24:07 +000018/* for the following variables, see start.S */
wdenkc6097192002-11-03 00:24:07 +000019extern ulong IRQ_STACK_START; /* top of IRQ stack */
20extern ulong FIQ_STACK_START; /* top of FIQ stack */
Albert Aribaud6d1fcb12010-10-11 13:13:28 +020021extern ulong _datarel_start_ofs;
22extern ulong _datarelrolocal_start_ofs;
23extern ulong _datarellocal_start_ofs;
24extern ulong _datarelro_start_ofs;
Heiko Schocheraeb29912010-09-17 13:10:39 +020025extern ulong IRQ_STACK_START_IN; /* 8 bytes in IRQ stack */
wdenkc6097192002-11-03 00:24:07 +000026
27/* cpu/.../cpu.c */
28int cpu_init(void);
29int cleanup_before_linux(void);
30
Simon Glass277e3082011-11-05 03:56:51 +000031/* Set up ARMv7 MMU, caches and TLBs */
32void cpu_init_cp15(void);
33
Jean-Christophe PLAGNIOL-VILLARD23164f12009-04-16 21:30:44 +020034/* cpu/.../arch/cpu.c */
35int arch_cpu_init(void);
Prafulla Wadaskar98196702009-05-31 14:53:20 +020036int arch_misc_init(void);
Fabio Estevam4310ecc2012-04-02 11:19:45 +000037int arch_early_init_r(void);
Jean-Christophe PLAGNIOL-VILLARD23164f12009-04-16 21:30:44 +020038
wdenkc6097192002-11-03 00:24:07 +000039/* board/.../... */
40int board_init(void);
Alexander Graf2ebeb442016-11-17 01:02:57 +010041void board_quiesce_devices(void);
wdenkc6097192002-11-03 00:24:07 +000042
wdenkc6097192002-11-03 00:24:07 +000043/* cpu/.../interrupt.c */
Jean-Christophe PLAGNIOL-VILLARDda7b3db2009-05-09 13:21:18 +020044int arch_interrupt_init (void);
wdenkc6097192002-11-03 00:24:07 +000045void reset_timer_masked (void);
46ulong get_timer_masked (void);
47void udelay_masked (unsigned long usec);
48
Jeroen Hofsteea9641332014-10-08 22:57:59 +020049/* calls to c from vectors.S */
Simon Glass30db7742017-05-17 08:22:59 -060050struct pt_regs;
51
Jeroen Hofsteea9641332014-10-08 22:57:59 +020052void bad_mode(void);
53void do_undefined_instruction(struct pt_regs *pt_regs);
54void do_software_interrupt(struct pt_regs *pt_regs);
55void do_prefetch_abort(struct pt_regs *pt_regs);
56void do_data_abort(struct pt_regs *pt_regs);
57void do_not_used(struct pt_regs *pt_regs);
58#ifdef CONFIG_ARM64
59void do_fiq(struct pt_regs *pt_regs, unsigned int esr);
60void do_irq(struct pt_regs *pt_regs, unsigned int esr);
61#else
62void do_fiq(struct pt_regs *pt_regs);
63void do_irq(struct pt_regs *pt_regswq);
64#endif
65
Simon Glass4ef529e2017-05-17 08:22:50 -060066#endif /* __ASSEMBLY__ */
67
wdenkc6097192002-11-03 00:24:07 +000068#endif /* _U_BOOT_ARM_H_ */