3cda858cf9c2ef20f6c611c8f9dd9d94e1e7ea1a
[openwrt.git] / target / linux / generic / files / include / linux / routerboot.h
1 /*
2  *  Mikrotik's RouterBOOT definitions
3  *
4  *  Copyright (C) 2007-2008 Gabor Juhos <juhosg@openwrt.org>
5  *
6  *  This program is free software; you can redistribute it and/or modify it
7  *  under the terms of the GNU General Public License version 2 as published
8  *  by the Free Software Foundation.
9  *
10  */
11
12 #ifndef _ROUTERBOOT_H
13 #define _ROUTERBOOT_H
14
15 #define RB_MAC_SIZE             6
16
17 /*
18  * Magic numbers
19  */
20 #define RB_MAGIC_HARD   0x64726148 /* "Hard" */
21 #define RB_MAGIC_SOFT   0x74666F53 /* "Soft" */
22 #define RB_MAGIC_DAWN   0x6E776144 /* "Dawn" */
23
24 #define RB_ID_TERMINATOR        0
25
26 /*
27  * ID values for Hardware settings
28  */
29 #define RB_ID_HARD_01           1
30 #define RB_ID_HARD_02           2
31 #define RB_ID_FLASH_INFO        3
32 #define RB_ID_MAC_ADDRESS_PACK  4
33 #define RB_ID_BOARD_NAME        5
34 #define RB_ID_BIOS_VERSION      6
35 #define RB_ID_HARD_07           7
36 #define RB_ID_SDRAM_TIMINGS     8
37 #define RB_ID_DEVICE_TIMINGS    9
38 #define RB_ID_SOFTWARE_ID       10
39 #define RB_ID_SERIAL_NUMBER     11
40 #define RB_ID_HARD_12           12
41 #define RB_ID_MEMORY_SIZE       13
42 #define RB_ID_MAC_ADDRESS_COUNT 14
43 #define RB_ID_HW_OPTIONS        21
44 #define RB_ID_WLAN_DATA         22
45
46 /*
47  * ID values for Software settings
48  */
49 #define RB_ID_UART_SPEED        1
50 #define RB_ID_BOOT_DELAY        2
51 #define RB_ID_BOOT_DEVICE       3
52 #define RB_ID_BOOT_KEY          4
53 #define RB_ID_CPU_MODE          5
54 #define RB_ID_FW_VERSION        6
55 #define RB_ID_SOFT_07           7
56 #define RB_ID_SOFT_08           8
57 #define RB_ID_BOOT_PROTOCOL     9
58 #define RB_ID_SOFT_10           10
59 #define RB_ID_SOFT_11           11
60
61 /*
62  * UART_SPEED values
63  */
64 #define RB_UART_SPEED_115200    0
65 #define RB_UART_SPEED_57600     1
66 #define RB_UART_SPEED_38400     2
67 #define RB_UART_SPEED_19200     3
68 #define RB_UART_SPEED_9600      4
69 #define RB_UART_SPEED_4800      5
70 #define RB_UART_SPEED_2400      6
71 #define RB_UART_SPEED_1200      7
72
73 /*
74  * BOOT_DELAY values
75  */
76 #define RB_BOOT_DELAY_0SEC      0
77 #define RB_BOOT_DELAY_1SEC      1
78 #define RB_BOOT_DELAY_2SEC      2
79
80 /*
81  * BOOT_DEVICE values
82  */
83 #define RB_BOOT_DEVICE_ETHER    0
84 #define RB_BOOT_DEVICE_NANDETH  1
85 #define RB_BOOT_DEVICE_ETHONCE  2
86 #define RB_BOOT_DEVICE_NANDONLY 3
87
88 /*
89  * BOOT_KEY values
90  */
91 #define RB_BOOT_KEY_ANY         0
92 #define RB_BOOT_KEY_DEL         1
93
94 /*
95  * CPU_MODE values
96  */
97 #define RB_CPU_MODE_POWERSAVE   0
98 #define RB_CPU_MODE_REGULAR     1
99
100 /*
101  * BOOT_PROTOCOL values
102  */
103 #define RB_BOOT_PROTOCOL_BOOTP  0
104 #define RB_BOOT_PROTOCOL_DHCP   1
105
106 #endif /* _ROUTERBOOT_H */