unbreak allmodconfig KCONFIG_ALLCONFIG=...
[carl9170fw.git] / carlfw / include / rom.h
1 /*
2  * carl9170 firmware - used by the ar9170 wireless device
3  *
4  * ROM layout
5  *
6  * Copyright (c) 2000-2005 ZyDAS Technology Corporation
7  * Copyright (c) 2007-2009 Atheros Communications, Inc.
8  * Copyright    2009    Johannes Berg <johannes@sipsolutions.net>
9  * Copyright 2009-2011  Christian Lamparter <chunkeey@googlemail.com>
10  *
11  * This program is free software; you can redistribute it and/or modify
12  * it under the terms of the GNU General Public License as published by
13  * the Free Software Foundation; either version 2 of the License, or
14  * (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License along
22  * with this program; If not, see <http://www.gnu.org/licenses/>.
23  */
24
25 #ifndef __CARL9170FW_ROM_H
26 #define __CARL9170FW_ROM_H
27
28 #include "types.h"
29 #include "config.h"
30 #include "compiler.h"
31 #include "usb.h"
32 #include "eeprom.h"
33
34 struct ar9170_hwtype {
35         /* 0x00001370 */
36         uint8_t data[4];
37
38         /* 0x00001374 */
39         struct ar9170_led_mode led_mode[AR9170_NUM_LEDS];
40
41         /* 0x00001378 */
42         uint8_t nulldata[2];
43
44         struct {
45                 /* 0x0000137a */
46                 struct usb_device_descriptor device_desc;
47
48                 /* 0x0000138c */
49                 uint8_t string0_desc[4];
50
51                 /* 0x00001390 */
52                 uint8_t string1_desc[32];
53
54                 /* 0x000013b0 */
55                 uint8_t string2_desc[48];
56
57                 /* 0x000013e0 */
58                 uint8_t string3_desc[32];
59         } usb;
60 } __packed;
61
62 struct ar9170_rom {
63         /* 0x00000000 */
64         uint32_t *irq_table[2];
65
66         /* 0x00000008 */
67         uint8_t bootcode[4968];
68
69         /* 0x00001370 */
70         struct ar9170_hwtype hw;
71
72         /* 0x00001400 */
73         uint8_t data[512];
74
75         /* eeprom */
76         struct ar9170_eeprom sys;
77 } __packed;
78
79 static const struct ar9170_rom rom __in_section(eeprom);
80
81 #endif /* __CARL9170FW_ROM_H */