2 * from: FreeBSD: src/sys/tools/fw_stub.awk,v 1.6 2007/03/02 11:42:53 flz
8 #include <sys/kernel.h>
9 #include <sys/module.h>
10 #include <sys/linker.h>
11 #include <sys/firmware.h>
12 #include <sys/systm.h>
13 #include <cxgb_t3fw.h>
14 #include <t3b_protocol_sram.h>
15 #include <t3b_tp_eeprom.h>
16 #include <t3c_protocol_sram.h>
17 #include <t3c_tp_eeprom.h>
20 cxgb_t3fw_modevent(module_t mod, int type, void *unused)
22 const struct firmware *fp, *parent;
27 fp = firmware_register("cxgb_t3fw", t3fw,
37 error = firmware_unregister("cxgb_t3fw");
43 static moduledata_t cxgb_t3fw_mod = {
48 DECLARE_MODULE(cxgb_t3fw, cxgb_t3fw_mod, SI_SUB_DRIVERS, SI_ORDER_FIRST);
49 MODULE_VERSION(cxgb_t3fw, 1);
50 MODULE_DEPEND(cxgb_t3fw, firmware, 1, 1, 1);
53 cxgb_t3b_protocol_sram_modevent(module_t mod, int type, void *unused)
55 const struct firmware *fp, *parent;
60 fp = firmware_register("cxgb_t3b_protocol_sram", t3b_protocol_sram,
61 (size_t)t3b_protocol_sram_length,
70 error = firmware_unregister("cxgb_t3b_protocol_sram");
76 static moduledata_t cxgb_t3b_protocol_sram_mod = {
77 "cxgb_t3b_protocol_sram",
78 cxgb_t3b_protocol_sram_modevent,
81 DECLARE_MODULE(cxgb_t3b_protocol_sram, cxgb_t3b_protocol_sram_mod, SI_SUB_DRIVERS, SI_ORDER_FIRST);
82 MODULE_VERSION(cxgb_t3b_protocol_sram, 1);
83 MODULE_DEPEND(cxgb_t3b_protocol_sram, firmware, 1, 1, 1);
86 cxgb_t3b_tp_eeprom_modevent(module_t mod, int type, void *unused)
88 const struct firmware *fp, *parent;
93 fp = firmware_register("cxgb_t3b_tp_eeprom", t3b_tp_eeprom,
94 (size_t)t3b_tp_eeprom_length,
103 error = firmware_unregister("cxgb_t3b_tp_eeprom");
109 static moduledata_t cxgb_t3b_tp_eeprom_mod = {
110 "cxgb_t3b_tp_eeprom",
111 cxgb_t3b_tp_eeprom_modevent,
114 DECLARE_MODULE(cxgb_t3b_tp_eeprom, cxgb_t3b_tp_eeprom_mod, SI_SUB_DRIVERS, SI_ORDER_FIRST);
115 MODULE_VERSION(cxgb_t3b_tp_eeprom, 1);
116 MODULE_DEPEND(cxgb_t3b_tp_eeprom, firmware, 1, 1, 1);
119 cxgb_t3c_protocol_sram_modevent(module_t mod, int type, void *unused)
121 const struct firmware *fp, *parent;
126 fp = firmware_register("cxgb_t3c_protocol_sram", t3c_protocol_sram,
127 (size_t)t3c_protocol_sram_length,
136 error = firmware_unregister("cxgb_t3c_protocol_sram");
142 static moduledata_t cxgb_t3c_protocol_sram_mod = {
143 "cxgb_t3c_protocol_sram",
144 cxgb_t3c_protocol_sram_modevent,
147 DECLARE_MODULE(cxgb_t3c_protocol_sram, cxgb_t3c_protocol_sram_mod, SI_SUB_DRIVERS, SI_ORDER_FIRST);
148 MODULE_VERSION(cxgb_t3c_protocol_sram, 1);
149 MODULE_DEPEND(cxgb_t3c_protocol_sram, firmware, 1, 1, 1);
152 cxgb_t3c_tp_eeprom_modevent(module_t mod, int type, void *unused)
154 const struct firmware *fp, *parent;
159 fp = firmware_register("cxgb_t3c_tp_eeprom", t3c_tp_eeprom,
160 (size_t)t3c_tp_eeprom_length,
169 error = firmware_unregister("cxgb_t3c_tp_eeprom");
175 static moduledata_t cxgb_t3c_tp_eeprom_mod = {
176 "cxgb_t3c_tp_eeprom",
177 cxgb_t3c_tp_eeprom_modevent,
180 DECLARE_MODULE(cxgb_t3c_tp_eeprom, cxgb_t3c_tp_eeprom_mod, SI_SUB_DRIVERS, SI_ORDER_FIRST);
181 MODULE_VERSION(cxgb_t3c_tp_eeprom, 1);
182 MODULE_DEPEND(cxgb_t3c_tp_eeprom, firmware, 1, 1, 1);