Improve documentation by adding build notes to the a9m24x0 CPU cards
[barebox-mini2440.git] / include / init.h
blobeb606f3ce39ad05d4a4638714d299b66a23ab8b6
1 #ifndef _INIT_H
2 #define _INIT_H
4 typedef int (*initcall_t)(void);
6 #define __define_initcall(level,fn,id) \
7 static initcall_t __initcall_##fn##id __attribute__((__used__)) \
8 __attribute__((__section__(".initcall." level))) = fn
11 #define core_initcall(fn) __define_initcall("0",fn,0)
12 #define postcore_initcall(fn) __define_initcall("1",fn,1)
13 #define console_initcall(fn) __define_initcall("2",fn,2)
14 #define coredevice_initcall(fn) __define_initcall("4",fn,4)
15 #define fs_initcall(fn) __define_initcall("5",fn,5)
16 #define device_initcall(fn) __define_initcall("6",fn,6)
17 #define late_initcall(fn) __define_initcall("7",fn,7)
19 /* section for code used very early when
20 * - we're not running from where we linked at
21 * - bss not cleared
22 * - static variables not initialized
24 * Mainly useful for booting from NAND Controllers
26 #define __bare_init __section(.text_bare_init.text)
28 #endif /* _INIT_H */