Setting up repository
[linux-libre-firmware.git] / carl9170fw / 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, write to the Free Software Foundation, Inc.,
23  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24  */
25
26 #ifndef __CARL9170FW_ROM_H
27 #define __CARL9170FW_ROM_H
28
29 #include "types.h"
30 #include "config.h"
31 #include "compiler.h"
32 #include "usb.h"
33 #include "eeprom.h"
34
35 struct ar9170_hwtype {
36         /* 0x00001370 */
37         uint8_t data[4];
38
39         /* 0x00001374 */
40         struct ar9170_led_mode led_mode[AR9170_NUM_LEDS];
41
42         /* 0x00001378 */
43         uint8_t nulldata[2];
44
45         struct {
46                 /* 0x0000137a */
47                 struct usb_device_descriptor device_desc;
48
49                 /* 0x0000138c */
50                 uint8_t string0_desc[4];
51
52                 /* 0x00001390 */
53                 uint8_t string1_desc[32];
54
55                 /* 0x000013b0 */
56                 uint8_t string2_desc[48];
57
58                 /* 0x000013e0 */
59                 uint8_t string3_desc[32];
60         } usb;
61 } __packed;
62
63 struct ar9170_rom {
64         /* 0x00000000 */
65         uint32_t *irq_table[2];
66
67         /* 0x00000008 */
68         uint8_t bootcode[4968];
69
70         /* 0x00001370 */
71         struct ar9170_hwtype hw;
72
73         /* 0x00001400 */
74         uint8_t data[512];
75
76         /* eeprom */
77         struct ar9170_eeprom sys;
78 } __packed;
79
80 static const struct ar9170_rom rom __section(eeprom);
81
82 #endif /* __CARL9170FW_ROM_H */