diff options
author | Jaswinder Singh Rajput <jaswinderrajput@gmail.com> | 2009-01-04 19:11:25 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-01-04 19:11:25 -0500 |
commit | 077f849de42e58172e25ccb24df4c1a13e82420c (patch) | |
tree | 223c2acab3292f19f21e85ecfeff8c66818b87dc /drivers/net/tg3.c | |
parent | 949b42544a20fb22800e244a004ff45bd359a21b (diff) |
firmware: convert tg3 driver to request_firmware()
Firmware blob looks like this...
u8 firmware_major
u8 firmware_minor
u8 firmware_fix
u8 pad
__be32 start_address
__be32 length (total, including BSS sections to be zeroed)
data... (in __be32 words, which is native for the firmware)
Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/tg3.c')
-rw-r--r-- | drivers/net/tg3.c | 792 |
1 files changed, 94 insertions, 698 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 04ae1e86aeaa..5e2dbaee125b 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
@@ -40,6 +40,7 @@ | |||
40 | #include <linux/workqueue.h> | 40 | #include <linux/workqueue.h> |
41 | #include <linux/prefetch.h> | 41 | #include <linux/prefetch.h> |
42 | #include <linux/dma-mapping.h> | 42 | #include <linux/dma-mapping.h> |
43 | #include <linux/firmware.h> | ||
43 | 44 | ||
44 | #include <net/checksum.h> | 45 | #include <net/checksum.h> |
45 | #include <net/ip.h> | 46 | #include <net/ip.h> |
@@ -137,6 +138,10 @@ | |||
137 | 138 | ||
138 | #define TG3_NUM_TEST 6 | 139 | #define TG3_NUM_TEST 6 |
139 | 140 | ||
141 | #define FIRMWARE_TG3 "tigon/tg3.bin" | ||
142 | #define FIRMWARE_TG3TSO "tigon/tg3_tso.bin" | ||
143 | #define FIRMWARE_TG3TSO5 "tigon/tg3_tso5.bin" | ||
144 | |||
140 | static char version[] __devinitdata = | 145 | static char version[] __devinitdata = |
141 | DRV_MODULE_NAME ".c:v" DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n"; | 146 | DRV_MODULE_NAME ".c:v" DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n"; |
142 | 147 | ||
@@ -144,6 +149,10 @@ MODULE_AUTHOR("David S. Miller (davem@redhat.com) and Jeff Garzik (jgarzik@pobox | |||
144 | MODULE_DESCRIPTION("Broadcom Tigon3 ethernet driver"); | 149 | MODULE_DESCRIPTION("Broadcom Tigon3 ethernet driver"); |
145 | MODULE_LICENSE("GPL"); | 150 | MODULE_LICENSE("GPL"); |
146 | MODULE_VERSION(DRV_MODULE_VERSION); | 151 | MODULE_VERSION(DRV_MODULE_VERSION); |
152 | MODULE_FIRMWARE(FIRMWARE_TG3); | ||
153 | MODULE_FIRMWARE(FIRMWARE_TG3TSO); | ||
154 | MODULE_FIRMWARE(FIRMWARE_TG3TSO5); | ||
155 | |||
147 | 156 | ||
148 | static int tg3_debug = -1; /* -1 == use TG3_DEF_MSG_ENABLE as value */ | 157 | static int tg3_debug = -1; /* -1 == use TG3_DEF_MSG_ENABLE as value */ |
149 | module_param(tg3_debug, int, 0); | 158 | module_param(tg3_debug, int, 0); |
@@ -6205,130 +6214,6 @@ static int tg3_halt(struct tg3 *tp, int kind, int silent) | |||
6205 | return 0; | 6214 | return 0; |
6206 | } | 6215 | } |
6207 | 6216 | ||
6208 | #define TG3_FW_RELEASE_MAJOR 0x0 | ||
6209 | #define TG3_FW_RELASE_MINOR 0x0 | ||
6210 | #define TG3_FW_RELEASE_FIX 0x0 | ||
6211 | #define TG3_FW_START_ADDR 0x08000000 | ||
6212 | #define TG3_FW_TEXT_ADDR 0x08000000 | ||
6213 | #define TG3_FW_TEXT_LEN 0x9c0 | ||
6214 | #define TG3_FW_RODATA_ADDR 0x080009c0 | ||
6215 | #define TG3_FW_RODATA_LEN 0x60 | ||
6216 | #define TG3_FW_DATA_ADDR 0x08000a40 | ||
6217 | #define TG3_FW_DATA_LEN 0x20 | ||
6218 | #define TG3_FW_SBSS_ADDR 0x08000a60 | ||
6219 | #define TG3_FW_SBSS_LEN 0xc | ||
6220 | #define TG3_FW_BSS_ADDR 0x08000a70 | ||
6221 | #define TG3_FW_BSS_LEN 0x10 | ||
6222 | |||
6223 | static const u32 tg3FwText[(TG3_FW_TEXT_LEN / sizeof(u32)) + 1] = { | ||
6224 | 0x00000000, 0x10000003, 0x00000000, 0x0000000d, 0x0000000d, 0x3c1d0800, | ||
6225 | 0x37bd3ffc, 0x03a0f021, 0x3c100800, 0x26100000, 0x0e000018, 0x00000000, | ||
6226 | 0x0000000d, 0x3c1d0800, 0x37bd3ffc, 0x03a0f021, 0x3c100800, 0x26100034, | ||
6227 | 0x0e00021c, 0x00000000, 0x0000000d, 0x00000000, 0x00000000, 0x00000000, | ||
6228 | 0x27bdffe0, 0x3c1cc000, 0xafbf0018, 0xaf80680c, 0x0e00004c, 0x241b2105, | ||
6229 | 0x97850000, 0x97870002, 0x9782002c, 0x9783002e, 0x3c040800, 0x248409c0, | ||
6230 | 0xafa00014, 0x00021400, 0x00621825, 0x00052c00, 0xafa30010, 0x8f860010, | ||
6231 | 0x00e52825, 0x0e000060, 0x24070102, 0x3c02ac00, 0x34420100, 0x3c03ac01, | ||
6232 | 0x34630100, 0xaf820490, 0x3c02ffff, 0xaf820494, 0xaf830498, 0xaf82049c, | ||
6233 | 0x24020001, 0xaf825ce0, 0x0e00003f, 0xaf825d00, 0x0e000140, 0x00000000, | ||
6234 | 0x8fbf0018, 0x03e00008, 0x27bd0020, 0x2402ffff, 0xaf825404, 0x8f835400, | ||
6235 | 0x34630400, 0xaf835400, 0xaf825404, 0x3c020800, 0x24420034, 0xaf82541c, | ||
6236 | 0x03e00008, 0xaf805400, 0x00000000, 0x00000000, 0x3c020800, 0x34423000, | ||
6237 | 0x3c030800, 0x34633000, 0x3c040800, 0x348437ff, 0x3c010800, 0xac220a64, | ||
6238 | 0x24020040, 0x3c010800, 0xac220a68, 0x3c010800, 0xac200a60, 0xac600000, | ||
6239 | 0x24630004, 0x0083102b, 0x5040fffd, 0xac600000, 0x03e00008, 0x00000000, | ||
6240 | 0x00804821, 0x8faa0010, 0x3c020800, 0x8c420a60, 0x3c040800, 0x8c840a68, | ||
6241 | 0x8fab0014, 0x24430001, 0x0044102b, 0x3c010800, 0xac230a60, 0x14400003, | ||
6242 | 0x00004021, 0x3c010800, 0xac200a60, 0x3c020800, 0x8c420a60, 0x3c030800, | ||
6243 | 0x8c630a64, 0x91240000, 0x00021140, 0x00431021, 0x00481021, 0x25080001, | ||
6244 | 0xa0440000, 0x29020008, 0x1440fff4, 0x25290001, 0x3c020800, 0x8c420a60, | ||
6245 | 0x3c030800, 0x8c630a64, 0x8f84680c, 0x00021140, 0x00431021, 0xac440008, | ||
6246 | 0xac45000c, 0xac460010, 0xac470014, 0xac4a0018, 0x03e00008, 0xac4b001c, | ||
6247 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
6248 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
6249 | 0, 0, 0, 0, 0, 0, | ||
6250 | 0x02000008, 0x00000000, 0x0a0001e3, 0x3c0a0001, 0x0a0001e3, 0x3c0a0002, | ||
6251 | 0x0a0001e3, 0x00000000, 0x0a0001e3, 0x00000000, 0x0a0001e3, 0x00000000, | ||
6252 | 0x0a0001e3, 0x00000000, 0x0a0001e3, 0x00000000, 0x0a0001e3, 0x00000000, | ||
6253 | 0x0a0001e3, 0x00000000, 0x0a0001e3, 0x00000000, 0x0a0001e3, 0x00000000, | ||
6254 | 0x0a0001e3, 0x3c0a0007, 0x0a0001e3, 0x3c0a0008, 0x0a0001e3, 0x3c0a0009, | ||
6255 | 0x0a0001e3, 0x00000000, 0x0a0001e3, 0x00000000, 0x0a0001e3, 0x3c0a000b, | ||
6256 | 0x0a0001e3, 0x3c0a000c, 0x0a0001e3, 0x3c0a000d, 0x0a0001e3, 0x00000000, | ||
6257 | 0x0a0001e3, 0x00000000, 0x0a0001e3, 0x3c0a000e, 0x0a0001e3, 0x00000000, | ||
6258 | 0x0a0001e3, 0x00000000, 0x0a0001e3, 0x00000000, 0x0a0001e3, 0x00000000, | ||
6259 | 0x0a0001e3, 0x00000000, 0x0a0001e3, 0x00000000, 0x0a0001e3, 0x00000000, | ||
6260 | 0x0a0001e3, 0x00000000, 0x0a0001e3, 0x3c0a0013, 0x0a0001e3, 0x3c0a0014, | ||
6261 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
6262 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
6263 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
6264 | 0x27bdffe0, 0x00001821, 0x00001021, 0xafbf0018, 0xafb10014, 0xafb00010, | ||
6265 | 0x3c010800, 0x00220821, 0xac200a70, 0x3c010800, 0x00220821, 0xac200a74, | ||
6266 | 0x3c010800, 0x00220821, 0xac200a78, 0x24630001, 0x1860fff5, 0x2442000c, | ||
6267 | 0x24110001, 0x8f906810, 0x32020004, 0x14400005, 0x24040001, 0x3c020800, | ||
6268 | 0x8c420a78, 0x18400003, 0x00002021, 0x0e000182, 0x00000000, 0x32020001, | ||
6269 | 0x10400003, 0x00000000, 0x0e000169, 0x00000000, 0x0a000153, 0xaf915028, | ||
6270 | 0x8fbf0018, 0x8fb10014, 0x8fb00010, 0x03e00008, 0x27bd0020, 0x3c050800, | ||
6271 | 0x8ca50a70, 0x3c060800, 0x8cc60a80, 0x3c070800, 0x8ce70a78, 0x27bdffe0, | ||
6272 | 0x3c040800, 0x248409d0, 0xafbf0018, 0xafa00010, 0x0e000060, 0xafa00014, | ||
6273 | 0x0e00017b, 0x00002021, 0x8fbf0018, 0x03e00008, 0x27bd0020, 0x24020001, | ||
6274 | 0x8f836810, 0x00821004, 0x00021027, 0x00621824, 0x03e00008, 0xaf836810, | ||
6275 | 0x27bdffd8, 0xafbf0024, 0x1080002e, 0xafb00020, 0x8f825cec, 0xafa20018, | ||
6276 | 0x8f825cec, 0x3c100800, 0x26100a78, 0xafa2001c, 0x34028000, 0xaf825cec, | ||
6277 | 0x8e020000, 0x18400016, 0x00000000, 0x3c020800, 0x94420a74, 0x8fa3001c, | ||
6278 | 0x000221c0, 0xac830004, 0x8fa2001c, 0x3c010800, 0x0e000201, 0xac220a74, | ||
6279 | 0x10400005, 0x00000000, 0x8e020000, 0x24420001, 0x0a0001df, 0xae020000, | ||
6280 | 0x3c020800, 0x8c420a70, 0x00021c02, 0x000321c0, 0x0a0001c5, 0xafa2001c, | ||
6281 | 0x0e000201, 0x00000000, 0x1040001f, 0x00000000, 0x8e020000, 0x8fa3001c, | ||
6282 | 0x24420001, 0x3c010800, 0xac230a70, 0x3c010800, 0xac230a74, 0x0a0001df, | ||
6283 | 0xae020000, 0x3c100800, 0x26100a78, 0x8e020000, 0x18400028, 0x00000000, | ||
6284 | 0x0e000201, 0x00000000, 0x14400024, 0x00000000, 0x8e020000, 0x3c030800, | ||
6285 | 0x8c630a70, 0x2442ffff, 0xafa3001c, 0x18400006, 0xae020000, 0x00031402, | ||
6286 | 0x000221c0, 0x8c820004, 0x3c010800, 0xac220a70, 0x97a2001e, 0x2442ff00, | ||
6287 | 0x2c420300, 0x1440000b, 0x24024000, 0x3c040800, 0x248409dc, 0xafa00010, | ||
6288 | 0xafa00014, 0x8fa6001c, 0x24050008, 0x0e000060, 0x00003821, 0x0a0001df, | ||
6289 | 0x00000000, 0xaf825cf8, 0x3c020800, 0x8c420a40, 0x8fa3001c, 0x24420001, | ||
6290 | 0xaf835cf8, 0x3c010800, 0xac220a40, 0x8fbf0024, 0x8fb00020, 0x03e00008, | ||
6291 | 0x27bd0028, 0x27bdffe0, 0x3c040800, 0x248409e8, 0x00002821, 0x00003021, | ||
6292 | 0x00003821, 0xafbf0018, 0xafa00010, 0x0e000060, 0xafa00014, 0x8fbf0018, | ||
6293 | 0x03e00008, 0x27bd0020, 0x8f82680c, 0x8f85680c, 0x00021827, 0x0003182b, | ||
6294 | 0x00031823, 0x00431024, 0x00441021, 0x00a2282b, 0x10a00006, 0x00000000, | ||
6295 | 0x00401821, 0x8f82680c, 0x0043102b, 0x1440fffd, 0x00000000, 0x03e00008, | ||
6296 | 0x00000000, 0x3c040800, 0x8c840000, 0x3c030800, 0x8c630a40, 0x0064102b, | ||
6297 | 0x54400002, 0x00831023, 0x00641023, 0x2c420008, 0x03e00008, 0x38420001, | ||
6298 | 0x27bdffe0, 0x00802821, 0x3c040800, 0x24840a00, 0x00003021, 0x00003821, | ||
6299 | 0xafbf0018, 0xafa00010, 0x0e000060, 0xafa00014, 0x0a000216, 0x00000000, | ||
6300 | 0x8fbf0018, 0x03e00008, 0x27bd0020, 0x00000000, 0x27bdffe0, 0x3c1cc000, | ||
6301 | 0xafbf0018, 0x0e00004c, 0xaf80680c, 0x3c040800, 0x24840a10, 0x03802821, | ||
6302 | 0x00003021, 0x00003821, 0xafa00010, 0x0e000060, 0xafa00014, 0x2402ffff, | ||
6303 | 0xaf825404, 0x3c0200aa, 0x0e000234, 0xaf825434, 0x8fbf0018, 0x03e00008, | ||
6304 | 0x27bd0020, 0x00000000, 0x00000000, 0x00000000, 0x27bdffe8, 0xafb00010, | ||
6305 | 0x24100001, 0xafbf0014, 0x3c01c003, 0xac200000, 0x8f826810, 0x30422000, | ||
6306 | 0x10400003, 0x00000000, 0x0e000246, 0x00000000, 0x0a00023a, 0xaf905428, | ||
6307 | 0x8fbf0014, 0x8fb00010, 0x03e00008, 0x27bd0018, 0x27bdfff8, 0x8f845d0c, | ||
6308 | 0x3c0200ff, 0x3c030800, 0x8c630a50, 0x3442fff8, 0x00821024, 0x1043001e, | ||
6309 | 0x3c0500ff, 0x34a5fff8, 0x3c06c003, 0x3c074000, 0x00851824, 0x8c620010, | ||
6310 | 0x3c010800, 0xac230a50, 0x30420008, 0x10400005, 0x00871025, 0x8cc20000, | ||
6311 | 0x24420001, 0xacc20000, 0x00871025, 0xaf825d0c, 0x8fa20000, 0x24420001, | ||
6312 | 0xafa20000, 0x8fa20000, 0x8fa20000, 0x24420001, 0xafa20000, 0x8fa20000, | ||
6313 | 0x8f845d0c, 0x3c030800, 0x8c630a50, 0x00851024, 0x1443ffe8, 0x00851824, | ||
6314 | 0x27bd0008, 0x03e00008, 0x00000000, 0x00000000, 0x00000000 | ||
6315 | }; | ||
6316 | |||
6317 | static const u32 tg3FwRodata[(TG3_FW_RODATA_LEN / sizeof(u32)) + 1] = { | ||
6318 | 0x35373031, 0x726c7341, 0x00000000, 0x00000000, 0x53774576, 0x656e7430, | ||
6319 | 0x00000000, 0x726c7045, 0x76656e74, 0x31000000, 0x556e6b6e, 0x45766e74, | ||
6320 | 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x66617461, 0x6c457272, | ||
6321 | 0x00000000, 0x00000000, 0x4d61696e, 0x43707542, 0x00000000, 0x00000000, | ||
6322 | 0x00000000 | ||
6323 | }; | ||
6324 | |||
6325 | #if 0 /* All zeros, don't eat up space with it. */ | ||
6326 | u32 tg3FwData[(TG3_FW_DATA_LEN / sizeof(u32)) + 1] = { | ||
6327 | 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, | ||
6328 | 0x00000000, 0x00000000, 0x00000000, 0x00000000 | ||
6329 | }; | ||
6330 | #endif | ||
6331 | |||
6332 | #define RX_CPU_SCRATCH_BASE 0x30000 | 6217 | #define RX_CPU_SCRATCH_BASE 0x30000 |
6333 | #define RX_CPU_SCRATCH_SIZE 0x04000 | 6218 | #define RX_CPU_SCRATCH_SIZE 0x04000 |
6334 | #define TX_CPU_SCRATCH_BASE 0x34000 | 6219 | #define TX_CPU_SCRATCH_BASE 0x34000 |
@@ -6383,15 +6268,9 @@ static int tg3_halt_cpu(struct tg3 *tp, u32 offset) | |||
6383 | } | 6268 | } |
6384 | 6269 | ||
6385 | struct fw_info { | 6270 | struct fw_info { |
6386 | unsigned int text_base; | 6271 | unsigned int fw_base; |
6387 | unsigned int text_len; | 6272 | unsigned int fw_len; |
6388 | const u32 *text_data; | 6273 | const __be32 *fw_data; |
6389 | unsigned int rodata_base; | ||
6390 | unsigned int rodata_len; | ||
6391 | const u32 *rodata_data; | ||
6392 | unsigned int data_base; | ||
6393 | unsigned int data_len; | ||
6394 | const u32 *data_data; | ||
6395 | }; | 6274 | }; |
6396 | 6275 | ||
6397 | /* tp->lock is held. */ | 6276 | /* tp->lock is held. */ |
@@ -6428,24 +6307,11 @@ static int tg3_load_firmware_cpu(struct tg3 *tp, u32 cpu_base, u32 cpu_scratch_b | |||
6428 | write_op(tp, cpu_scratch_base + i, 0); | 6307 | write_op(tp, cpu_scratch_base + i, 0); |
6429 | tw32(cpu_base + CPU_STATE, 0xffffffff); | 6308 | tw32(cpu_base + CPU_STATE, 0xffffffff); |
6430 | tw32(cpu_base + CPU_MODE, tr32(cpu_base+CPU_MODE)|CPU_MODE_HALT); | 6309 | tw32(cpu_base + CPU_MODE, tr32(cpu_base+CPU_MODE)|CPU_MODE_HALT); |
6431 | for (i = 0; i < (info->text_len / sizeof(u32)); i++) | 6310 | for (i = 0; i < (info->fw_len / sizeof(u32)); i++) |
6432 | write_op(tp, (cpu_scratch_base + | ||
6433 | (info->text_base & 0xffff) + | ||
6434 | (i * sizeof(u32))), | ||
6435 | (info->text_data ? | ||
6436 | info->text_data[i] : 0)); | ||
6437 | for (i = 0; i < (info->rodata_len / sizeof(u32)); i++) | ||
6438 | write_op(tp, (cpu_scratch_base + | ||
6439 | (info->rodata_base & 0xffff) + | ||
6440 | (i * sizeof(u32))), | ||
6441 | (info->rodata_data ? | ||
6442 | info->rodata_data[i] : 0)); | ||
6443 | for (i = 0; i < (info->data_len / sizeof(u32)); i++) | ||
6444 | write_op(tp, (cpu_scratch_base + | 6311 | write_op(tp, (cpu_scratch_base + |
6445 | (info->data_base & 0xffff) + | 6312 | (info->fw_base & 0xffff) + |
6446 | (i * sizeof(u32))), | 6313 | (i * sizeof(u32))), |
6447 | (info->data_data ? | 6314 | be32_to_cpu(info->fw_data[i])); |
6448 | info->data_data[i] : 0)); | ||
6449 | 6315 | ||
6450 | err = 0; | 6316 | err = 0; |
6451 | 6317 | ||
@@ -6457,17 +6323,20 @@ out: | |||
6457 | static int tg3_load_5701_a0_firmware_fix(struct tg3 *tp) | 6323 | static int tg3_load_5701_a0_firmware_fix(struct tg3 *tp) |
6458 | { | 6324 | { |
6459 | struct fw_info info; | 6325 | struct fw_info info; |
6326 | const __be32 *fw_data; | ||
6460 | int err, i; | 6327 | int err, i; |
6461 | 6328 | ||
6462 | info.text_base = TG3_FW_TEXT_ADDR; | 6329 | fw_data = (void *)tp->fw->data; |
6463 | info.text_len = TG3_FW_TEXT_LEN; | 6330 | |
6464 | info.text_data = &tg3FwText[0]; | 6331 | /* Firmware blob starts with version numbers, followed by |
6465 | info.rodata_base = TG3_FW_RODATA_ADDR; | 6332 | start address and length. We are setting complete length. |
6466 | info.rodata_len = TG3_FW_RODATA_LEN; | 6333 | length = end_address_of_bss - start_address_of_text. |
6467 | info.rodata_data = &tg3FwRodata[0]; | 6334 | Remainder is the blob to be loaded contiguously |
6468 | info.data_base = TG3_FW_DATA_ADDR; | 6335 | from start address. */ |
6469 | info.data_len = TG3_FW_DATA_LEN; | 6336 | |
6470 | info.data_data = NULL; | 6337 | info.fw_base = be32_to_cpu(fw_data[1]); |
6338 | info.fw_len = tp->fw->size - 12; | ||
6339 | info.fw_data = &fw_data[3]; | ||
6471 | 6340 | ||
6472 | err = tg3_load_firmware_cpu(tp, RX_CPU_BASE, | 6341 | err = tg3_load_firmware_cpu(tp, RX_CPU_BASE, |
6473 | RX_CPU_SCRATCH_BASE, RX_CPU_SCRATCH_SIZE, | 6342 | RX_CPU_SCRATCH_BASE, RX_CPU_SCRATCH_SIZE, |
@@ -6483,21 +6352,21 @@ static int tg3_load_5701_a0_firmware_fix(struct tg3 *tp) | |||
6483 | 6352 | ||
6484 | /* Now startup only the RX cpu. */ | 6353 | /* Now startup only the RX cpu. */ |
6485 | tw32(RX_CPU_BASE + CPU_STATE, 0xffffffff); | 6354 | tw32(RX_CPU_BASE + CPU_STATE, 0xffffffff); |
6486 | tw32_f(RX_CPU_BASE + CPU_PC, TG3_FW_TEXT_ADDR); | 6355 | tw32_f(RX_CPU_BASE + CPU_PC, info.fw_base); |
6487 | 6356 | ||
6488 | for (i = 0; i < 5; i++) { | 6357 | for (i = 0; i < 5; i++) { |
6489 | if (tr32(RX_CPU_BASE + CPU_PC) == TG3_FW_TEXT_ADDR) | 6358 | if (tr32(RX_CPU_BASE + CPU_PC) == info.fw_base) |
6490 | break; | 6359 | break; |
6491 | tw32(RX_CPU_BASE + CPU_STATE, 0xffffffff); | 6360 | tw32(RX_CPU_BASE + CPU_STATE, 0xffffffff); |
6492 | tw32(RX_CPU_BASE + CPU_MODE, CPU_MODE_HALT); | 6361 | tw32(RX_CPU_BASE + CPU_MODE, CPU_MODE_HALT); |
6493 | tw32_f(RX_CPU_BASE + CPU_PC, TG3_FW_TEXT_ADDR); | 6362 | tw32_f(RX_CPU_BASE + CPU_PC, info.fw_base); |
6494 | udelay(1000); | 6363 | udelay(1000); |
6495 | } | 6364 | } |
6496 | if (i >= 5) { | 6365 | if (i >= 5) { |
6497 | printk(KERN_ERR PFX "tg3_load_firmware fails for %s " | 6366 | printk(KERN_ERR PFX "tg3_load_firmware fails for %s " |
6498 | "to set RX CPU PC, is %08x should be %08x\n", | 6367 | "to set RX CPU PC, is %08x should be %08x\n", |
6499 | tp->dev->name, tr32(RX_CPU_BASE + CPU_PC), | 6368 | tp->dev->name, tr32(RX_CPU_BASE + CPU_PC), |
6500 | TG3_FW_TEXT_ADDR); | 6369 | info.fw_base); |
6501 | return -ENODEV; | 6370 | return -ENODEV; |
6502 | } | 6371 | } |
6503 | tw32(RX_CPU_BASE + CPU_STATE, 0xffffffff); | 6372 | tw32(RX_CPU_BASE + CPU_STATE, 0xffffffff); |
@@ -6506,547 +6375,36 @@ static int tg3_load_5701_a0_firmware_fix(struct tg3 *tp) | |||
6506 | return 0; | 6375 | return 0; |
6507 | } | 6376 | } |
6508 | 6377 | ||
6509 | |||
6510 | #define TG3_TSO_FW_RELEASE_MAJOR 0x1 | ||
6511 | #define TG3_TSO_FW_RELASE_MINOR 0x6 | ||
6512 | #define TG3_TSO_FW_RELEASE_FIX 0x0 | ||
6513 | #define TG3_TSO_FW_START_ADDR 0x08000000 | ||
6514 | #define TG3_TSO_FW_TEXT_ADDR 0x08000000 | ||
6515 | #define TG3_TSO_FW_TEXT_LEN 0x1aa0 | ||
6516 | #define TG3_TSO_FW_RODATA_ADDR 0x08001aa0 | ||
6517 | #define TG3_TSO_FW_RODATA_LEN 0x60 | ||
6518 | #define TG3_TSO_FW_DATA_ADDR 0x08001b20 | ||
6519 | #define TG3_TSO_FW_DATA_LEN 0x30 | ||
6520 | #define TG3_TSO_FW_SBSS_ADDR 0x08001b50 | ||
6521 | #define TG3_TSO_FW_SBSS_LEN 0x2c | ||
6522 | #define TG3_TSO_FW_BSS_ADDR 0x08001b80 | ||
6523 | #define TG3_TSO_FW_BSS_LEN 0x894 | ||
6524 | |||
6525 | static const u32 tg3TsoFwText[(TG3_TSO_FW_TEXT_LEN / 4) + 1] = { | ||
6526 | 0x0e000003, 0x00000000, 0x08001b24, 0x00000000, 0x10000003, 0x00000000, | ||
6527 | 0x0000000d, 0x0000000d, 0x3c1d0800, 0x37bd4000, 0x03a0f021, 0x3c100800, | ||
6528 | 0x26100000, 0x0e000010, 0x00000000, 0x0000000d, 0x27bdffe0, 0x3c04fefe, | ||
6529 | 0xafbf0018, 0x0e0005d8, 0x34840002, 0x0e000668, 0x00000000, 0x3c030800, | ||
6530 | 0x90631b68, 0x24020002, 0x3c040800, 0x24841aac, 0x14620003, 0x24050001, | ||
6531 | 0x3c040800, 0x24841aa0, 0x24060006, 0x00003821, 0xafa00010, 0x0e00067c, | ||
6532 | 0xafa00014, 0x8f625c50, 0x34420001, 0xaf625c50, 0x8f625c90, 0x34420001, | ||
6533 | 0xaf625c90, 0x2402ffff, 0x0e000034, 0xaf625404, 0x8fbf0018, 0x03e00008, | ||
6534 | 0x27bd0020, 0x00000000, 0x00000000, 0x00000000, 0x27bdffe0, 0xafbf001c, | ||
6535 | 0xafb20018, 0xafb10014, 0x0e00005b, 0xafb00010, 0x24120002, 0x24110001, | ||
6536 | 0x8f706820, 0x32020100, 0x10400003, 0x00000000, 0x0e0000bb, 0x00000000, | ||
6537 | 0x8f706820, 0x32022000, 0x10400004, 0x32020001, 0x0e0001f0, 0x24040001, | ||
6538 | 0x32020001, 0x10400003, 0x00000000, 0x0e0000a3, 0x00000000, 0x3c020800, | ||
6539 | 0x90421b98, 0x14520003, 0x00000000, 0x0e0004c0, 0x00000000, 0x0a00003c, | ||
6540 | 0xaf715028, 0x8fbf001c, 0x8fb20018, 0x8fb10014, 0x8fb00010, 0x03e00008, | ||
6541 | 0x27bd0020, 0x27bdffe0, 0x3c040800, 0x24841ac0, 0x00002821, 0x00003021, | ||
6542 | 0x00003821, 0xafbf0018, 0xafa00010, 0x0e00067c, 0xafa00014, 0x3c040800, | ||
6543 | 0x248423d8, 0xa4800000, 0x3c010800, 0xa0201b98, 0x3c010800, 0xac201b9c, | ||
6544 | 0x3c010800, 0xac201ba0, 0x3c010800, 0xac201ba4, 0x3c010800, 0xac201bac, | ||
6545 | 0x3c010800, 0xac201bb8, 0x3c010800, 0xac201bbc, 0x8f624434, 0x3c010800, | ||
6546 | 0xac221b88, 0x8f624438, 0x3c010800, 0xac221b8c, 0x8f624410, 0xac80f7a8, | ||
6547 | 0x3c010800, 0xac201b84, 0x3c010800, 0xac2023e0, 0x3c010800, 0xac2023c8, | ||
6548 | 0x3c010800, 0xac2023cc, 0x3c010800, 0xac202400, 0x3c010800, 0xac221b90, | ||
6549 | 0x8f620068, 0x24030007, 0x00021702, 0x10430005, 0x00000000, 0x8f620068, | ||
6550 | 0x00021702, 0x14400004, 0x24020001, 0x3c010800, 0x0a000097, 0xac20240c, | ||
6551 | 0xac820034, 0x3c040800, 0x24841acc, 0x3c050800, 0x8ca5240c, 0x00003021, | ||
6552 | 0x00003821, 0xafa00010, 0x0e00067c, 0xafa00014, 0x8fbf0018, 0x03e00008, | ||
6553 | 0x27bd0020, 0x27bdffe0, 0x3c040800, 0x24841ad8, 0x00002821, 0x00003021, | ||
6554 | 0x00003821, 0xafbf0018, 0xafa00010, 0x0e00067c, 0xafa00014, 0x0e00005b, | ||
6555 | 0x00000000, 0x0e0000b4, 0x00002021, 0x8fbf0018, 0x03e00008, 0x27bd0020, | ||
6556 | 0x24020001, 0x8f636820, 0x00821004, 0x00021027, 0x00621824, 0x03e00008, | ||
6557 | 0xaf636820, 0x27bdffd0, 0xafbf002c, 0xafb60028, 0xafb50024, 0xafb40020, | ||
6558 | 0xafb3001c, 0xafb20018, 0xafb10014, 0xafb00010, 0x8f675c5c, 0x3c030800, | ||
6559 | 0x24631bbc, 0x8c620000, 0x14470005, 0x3c0200ff, 0x3c020800, 0x90421b98, | ||
6560 | 0x14400119, 0x3c0200ff, 0x3442fff8, 0x00e28824, 0xac670000, 0x00111902, | ||
6561 | 0x306300ff, 0x30e20003, 0x000211c0, 0x00622825, 0x00a04021, 0x00071602, | ||
6562 | 0x3c030800, 0x90631b98, 0x3044000f, 0x14600036, 0x00804821, 0x24020001, | ||
6563 | 0x3c010800, 0xa0221b98, 0x00051100, 0x00821025, 0x3c010800, 0xac201b9c, | ||
6564 | 0x3c010800, 0xac201ba0, 0x3c010800, 0xac201ba4, 0x3c010800, 0xac201bac, | ||
6565 | 0x3c010800, 0xac201bb8, 0x3c010800, 0xac201bb0, 0x3c010800, 0xac201bb4, | ||
6566 | 0x3c010800, 0xa42223d8, 0x9622000c, 0x30437fff, 0x3c010800, 0xa4222410, | ||
6567 | 0x30428000, 0x3c010800, 0xa4231bc6, 0x10400005, 0x24020001, 0x3c010800, | ||
6568 | 0xac2223f4, 0x0a000102, 0x2406003e, 0x24060036, 0x3c010800, 0xac2023f4, | ||
6569 | 0x9622000a, 0x3c030800, 0x94631bc6, 0x3c010800, 0xac2023f0, 0x3c010800, | ||
6570 | 0xac2023f8, 0x00021302, 0x00021080, 0x00c21021, 0x00621821, 0x3c010800, | ||
6571 | 0xa42223d0, 0x3c010800, 0x0a000115, 0xa4231b96, 0x9622000c, 0x3c010800, | ||
6572 | 0xa42223ec, 0x3c040800, 0x24841b9c, 0x8c820000, 0x00021100, 0x3c010800, | ||
6573 | 0x00220821, 0xac311bc8, 0x8c820000, 0x00021100, 0x3c010800, 0x00220821, | ||
6574 | 0xac271bcc, 0x8c820000, 0x25030001, 0x306601ff, 0x00021100, 0x3c010800, | ||
6575 | 0x00220821, 0xac261bd0, 0x8c820000, 0x00021100, 0x3c010800, 0x00220821, | ||
6576 | 0xac291bd4, 0x96230008, 0x3c020800, 0x8c421bac, 0x00432821, 0x3c010800, | ||
6577 | 0xac251bac, 0x9622000a, 0x30420004, 0x14400018, 0x00061100, 0x8f630c14, | ||
6578 | 0x3063000f, 0x2c620002, 0x1440000b, 0x3c02c000, 0x8f630c14, 0x3c020800, | ||
6579 | 0x8c421b40, 0x3063000f, 0x24420001, 0x3c010800, 0xac221b40, 0x2c620002, | ||
6580 | 0x1040fff7, 0x3c02c000, 0x00e21825, 0xaf635c5c, 0x8f625c50, 0x30420002, | ||
6581 | 0x10400014, 0x00000000, 0x0a000147, 0x00000000, 0x3c030800, 0x8c631b80, | ||
6582 | 0x3c040800, 0x94841b94, 0x01221025, 0x3c010800, 0xa42223da, 0x24020001, | ||
6583 | 0x3c010800, 0xac221bb8, 0x24630001, 0x0085202a, 0x3c010800, 0x10800003, | ||
6584 | 0xac231b80, 0x3c010800, 0xa4251b94, 0x3c060800, 0x24c61b9c, 0x8cc20000, | ||
6585 | 0x24420001, 0xacc20000, 0x28420080, 0x14400005, 0x00000000, 0x0e000656, | ||
6586 | 0x24040002, 0x0a0001e6, 0x00000000, 0x3c020800, 0x8c421bb8, 0x10400078, | ||
6587 | 0x24020001, 0x3c050800, 0x90a51b98, 0x14a20072, 0x00000000, 0x3c150800, | ||
6588 | 0x96b51b96, 0x3c040800, 0x8c841bac, 0x32a3ffff, 0x0083102a, 0x1440006c, | ||
6589 | 0x00000000, 0x14830003, 0x00000000, 0x3c010800, 0xac2523f0, 0x1060005c, | ||
6590 | 0x00009021, 0x24d60004, 0x0060a021, 0x24d30014, 0x8ec20000, 0x00028100, | ||
6591 | 0x3c110800, 0x02308821, 0x0e000625, 0x8e311bc8, 0x00402821, 0x10a00054, | ||
6592 | 0x00000000, 0x9628000a, 0x31020040, 0x10400005, 0x2407180c, 0x8e22000c, | ||
6593 | 0x2407188c, 0x00021400, 0xaca20018, 0x3c030800, 0x00701821, 0x8c631bd0, | ||
6594 | 0x3c020800, 0x00501021, 0x8c421bd4, 0x00031d00, 0x00021400, 0x00621825, | ||
6595 | 0xaca30014, 0x8ec30004, 0x96220008, 0x00432023, 0x3242ffff, 0x3083ffff, | ||
6596 | 0x00431021, 0x0282102a, 0x14400002, 0x02b23023, 0x00803021, 0x8e620000, | ||
6597 | 0x30c4ffff, 0x00441021, 0xae620000, 0x8e220000, 0xaca20000, 0x8e220004, | ||
6598 | 0x8e63fff4, 0x00431021, 0xaca20004, 0xa4a6000e, 0x8e62fff4, 0x00441021, | ||
6599 | 0xae62fff4, 0x96230008, 0x0043102a, 0x14400005, 0x02469021, 0x8e62fff0, | ||
6600 | 0xae60fff4, 0x24420001, 0xae62fff0, 0xaca00008, 0x3242ffff, 0x14540008, | ||
6601 | 0x24020305, 0x31020080, 0x54400001, 0x34e70010, 0x24020905, 0xa4a2000c, | ||
6602 | 0x0a0001cb, 0x34e70020, 0xa4a2000c, 0x3c020800, 0x8c4223f0, 0x10400003, | ||
6603 | 0x3c024b65, 0x0a0001d3, 0x34427654, 0x3c02b49a, 0x344289ab, 0xaca2001c, | ||
6604 | 0x30e2ffff, 0xaca20010, 0x0e0005a2, 0x00a02021, 0x3242ffff, 0x0054102b, | ||
6605 | 0x1440ffa9, 0x00000000, 0x24020002, 0x3c010800, 0x0a0001e6, 0xa0221b98, | ||
6606 | 0x8ec2083c, 0x24420001, 0x0a0001e6, 0xaec2083c, 0x0e0004c0, 0x00000000, | ||
6607 | 0x8fbf002c, 0x8fb60028, 0x8fb50024, 0x8fb40020, 0x8fb3001c, 0x8fb20018, | ||
6608 | 0x8fb10014, 0x8fb00010, 0x03e00008, 0x27bd0030, 0x27bdffd0, 0xafbf0028, | ||
6609 | 0xafb30024, 0xafb20020, 0xafb1001c, 0xafb00018, 0x8f725c9c, 0x3c0200ff, | ||
6610 | 0x3442fff8, 0x3c070800, 0x24e71bb4, 0x02428824, 0x9623000e, 0x8ce20000, | ||
6611 | 0x00431021, 0xace20000, 0x8e220010, 0x30420020, 0x14400011, 0x00809821, | ||
6612 | 0x0e00063b, 0x02202021, 0x3c02c000, 0x02421825, 0xaf635c9c, 0x8f625c90, | ||
6613 | 0x30420002, 0x1040011e, 0x00000000, 0xaf635c9c, 0x8f625c90, 0x30420002, | ||
6614 | 0x10400119, 0x00000000, 0x0a00020d, 0x00000000, 0x8e240008, 0x8e230014, | ||
6615 | 0x00041402, 0x000231c0, 0x00031502, 0x304201ff, 0x2442ffff, 0x3042007f, | ||
6616 | 0x00031942, 0x30637800, 0x00021100, 0x24424000, 0x00624821, 0x9522000a, | ||
6617 | 0x3084ffff, 0x30420008, 0x104000b0, 0x000429c0, 0x3c020800, 0x8c422400, | ||
6618 | 0x14400024, 0x24c50008, 0x94c20014, 0x3c010800, 0xa42223d0, 0x8cc40010, | ||
6619 | 0x00041402, 0x3c010800, 0xa42223d2, 0x3c010800, 0xa42423d4, 0x94c2000e, | ||
6620 | 0x3083ffff, 0x00431023, 0x3c010800, 0xac222408, 0x94c2001a, 0x3c010800, | ||
6621 | 0xac262400, 0x3c010800, 0xac322404, 0x3c010800, 0xac2223fc, 0x3c02c000, | ||
6622 | 0x02421825, 0xaf635c9c, 0x8f625c90, 0x30420002, 0x104000e5, 0x00000000, | ||
6623 | 0xaf635c9c, 0x8f625c90, 0x30420002, 0x104000e0, 0x00000000, 0x0a000246, | ||
6624 | 0x00000000, 0x94c2000e, 0x3c030800, 0x946323d4, 0x00434023, 0x3103ffff, | ||
6625 | 0x2c620008, 0x1040001c, 0x00000000, 0x94c20014, 0x24420028, 0x00a22821, | ||
6626 | 0x00031042, 0x1840000b, 0x00002021, 0x24e60848, 0x00403821, 0x94a30000, | ||
6627 | 0x8cc20000, 0x24840001, 0x00431021, 0xacc20000, 0x0087102a, 0x1440fff9, | ||
6628 | 0x24a50002, 0x31020001, 0x1040001f, 0x3c024000, 0x3c040800, 0x248423fc, | ||
6629 | 0xa0a00001, 0x94a30000, 0x8c820000, 0x00431021, 0x0a000285, 0xac820000, | ||
6630 | 0x8f626800, 0x3c030010, 0x00431024, 0x10400009, 0x00000000, 0x94c2001a, | ||
6631 | 0x3c030800, 0x8c6323fc, 0x00431021, 0x3c010800, 0xac2223fc, 0x0a000286, | ||
6632 | 0x3c024000, 0x94c2001a, 0x94c4001c, 0x3c030800, 0x8c6323fc, 0x00441023, | ||
6633 | 0x00621821, 0x3c010800, 0xac2323fc, 0x3c024000, 0x02421825, 0xaf635c9c, | ||
6634 | 0x8f625c90, 0x30420002, 0x1440fffc, 0x00000000, 0x9522000a, 0x30420010, | ||
6635 | 0x1040009b, 0x00000000, 0x3c030800, 0x946323d4, 0x3c070800, 0x24e72400, | ||
6636 | 0x8ce40000, 0x8f626800, 0x24630030, 0x00832821, 0x3c030010, 0x00431024, | ||
6637 | 0x1440000a, 0x00000000, 0x94a20004, 0x3c040800, 0x8c842408, 0x3c030800, | ||
6638 | 0x8c6323fc, 0x00441023, 0x00621821, 0x3c010800, 0xac2323fc, 0x3c040800, | ||
6639 | 0x8c8423fc, 0x00041c02, 0x3082ffff, 0x00622021, 0x00041402, 0x00822021, | ||
6640 | 0x00041027, 0xa4a20006, 0x3c030800, 0x8c632404, 0x3c0200ff, 0x3442fff8, | ||
6641 | 0x00628824, 0x96220008, 0x24050001, 0x24034000, 0x000231c0, 0x00801021, | ||
6642 | 0xa4c2001a, 0xa4c0001c, 0xace00000, 0x3c010800, 0xac251b60, 0xaf635cb8, | ||
6643 | 0x8f625cb0, 0x30420002, 0x10400003, 0x00000000, 0x3c010800, 0xac201b60, | ||
6644 | 0x8e220008, 0xaf625cb8, 0x8f625cb0, 0x30420002, 0x10400003, 0x00000000, | ||
6645 | 0x3c010800, 0xac201b60, 0x3c020800, 0x8c421b60, 0x1040ffec, 0x00000000, | ||
6646 | 0x3c040800, 0x0e00063b, 0x8c842404, 0x0a00032a, 0x00000000, 0x3c030800, | ||
6647 | 0x90631b98, 0x24020002, 0x14620003, 0x3c034b65, 0x0a0002e1, 0x00008021, | ||
6648 | 0x8e22001c, 0x34637654, 0x10430002, 0x24100002, 0x24100001, 0x00c02021, | ||
6649 | 0x0e000350, 0x02003021, 0x24020003, 0x3c010800, 0xa0221b98, 0x24020002, | ||
6650 | 0x1202000a, 0x24020001, 0x3c030800, 0x8c6323f0, 0x10620006, 0x00000000, | ||
6651 | 0x3c020800, 0x944223d8, 0x00021400, 0x0a00031f, 0xae220014, 0x3c040800, | ||
6652 | 0x248423da, 0x94820000, 0x00021400, 0xae220014, 0x3c020800, 0x8c421bbc, | ||
6653 | 0x3c03c000, 0x3c010800, 0xa0201b98, 0x00431025, 0xaf625c5c, 0x8f625c50, | ||
6654 | 0x30420002, 0x10400009, 0x00000000, 0x2484f7e2, 0x8c820000, 0x00431025, | ||
6655 | 0xaf625c5c, 0x8f625c50, 0x30420002, 0x1440fffa, 0x00000000, 0x3c020800, | ||
6656 | 0x24421b84, 0x8c430000, 0x24630001, 0xac430000, 0x8f630c14, 0x3063000f, | ||
6657 | 0x2c620002, 0x1440000c, 0x3c024000, 0x8f630c14, 0x3c020800, 0x8c421b40, | ||
6658 | 0x3063000f, 0x24420001, 0x3c010800, 0xac221b40, 0x2c620002, 0x1040fff7, | ||
6659 | 0x00000000, 0x3c024000, 0x02421825, 0xaf635c9c, 0x8f625c90, 0x30420002, | ||
6660 | 0x1440fffc, 0x00000000, 0x12600003, 0x00000000, 0x0e0004c0, 0x00000000, | ||
6661 | 0x8fbf0028, 0x8fb30024, 0x8fb20020, 0x8fb1001c, 0x8fb00018, 0x03e00008, | ||
6662 | 0x27bd0030, 0x8f634450, 0x3c040800, 0x24841b88, 0x8c820000, 0x00031c02, | ||
6663 | 0x0043102b, 0x14400007, 0x3c038000, 0x8c840004, 0x8f624450, 0x00021c02, | ||
6664 | 0x0083102b, 0x1040fffc, 0x3c038000, 0xaf634444, 0x8f624444, 0x00431024, | ||
6665 | 0x1440fffd, 0x00000000, 0x8f624448, 0x03e00008, 0x3042ffff, 0x3c024000, | ||
6666 | 0x00822025, 0xaf645c38, 0x8f625c30, 0x30420002, 0x1440fffc, 0x00000000, | ||
6667 | 0x03e00008, 0x00000000, 0x27bdffe0, 0x00805821, 0x14c00011, 0x256e0008, | ||
6668 | 0x3c020800, 0x8c4223f4, 0x10400007, 0x24020016, 0x3c010800, 0xa42223d2, | ||
6669 | 0x2402002a, 0x3c010800, 0x0a000364, 0xa42223d4, 0x8d670010, 0x00071402, | ||
6670 | 0x3c010800, 0xa42223d2, 0x3c010800, 0xa42723d4, 0x3c040800, 0x948423d4, | ||
6671 | 0x3c030800, 0x946323d2, 0x95cf0006, 0x3c020800, 0x944223d0, 0x00832023, | ||
6672 | 0x01e2c023, 0x3065ffff, 0x24a20028, 0x01c24821, 0x3082ffff, 0x14c0001a, | ||
6673 | 0x01226021, 0x9582000c, 0x3042003f, 0x3c010800, 0xa42223d6, 0x95820004, | ||
6674 | 0x95830006, 0x3c010800, 0xac2023e4, 0x3c010800, 0xac2023e8, 0x00021400, | ||
6675 | 0x00431025, 0x3c010800, 0xac221bc0, 0x95220004, 0x3c010800, 0xa4221bc4, | ||
6676 | 0x95230002, 0x01e51023, 0x0043102a, 0x10400010, 0x24020001, 0x3c010800, | ||
6677 | 0x0a000398, 0xac2223f8, 0x3c030800, 0x8c6323e8, 0x3c020800, 0x94421bc4, | ||
6678 | 0x00431021, 0xa5220004, 0x3c020800, 0x94421bc0, 0xa5820004, 0x3c020800, | ||
6679 | 0x8c421bc0, 0xa5820006, 0x3c020800, 0x8c4223f0, 0x3c0d0800, 0x8dad23e4, | ||
6680 | 0x3c0a0800, 0x144000e5, 0x8d4a23e8, 0x3c020800, 0x94421bc4, 0x004a1821, | ||
6681 | 0x3063ffff, 0x0062182b, 0x24020002, 0x10c2000d, 0x01435023, 0x3c020800, | ||
6682 | 0x944223d6, 0x30420009, 0x10400008, 0x00000000, 0x9582000c, 0x3042fff6, | ||
6683 | 0xa582000c, 0x3c020800, 0x944223d6, 0x30420009, 0x01a26823, 0x3c020800, | ||
6684 | 0x8c4223f8, 0x1040004a, 0x01203821, 0x3c020800, 0x944223d2, 0x00004021, | ||
6685 | 0xa520000a, 0x01e21023, 0xa5220002, 0x3082ffff, 0x00021042, 0x18400008, | ||
6686 | 0x00003021, 0x00401821, 0x94e20000, 0x25080001, 0x00c23021, 0x0103102a, | ||
6687 | 0x1440fffb, 0x24e70002, 0x00061c02, 0x30c2ffff, 0x00623021, 0x00061402, | ||
6688 | 0x00c23021, 0x00c02821, 0x00061027, 0xa522000a, 0x00003021, 0x2527000c, | ||
6689 | 0x00004021, 0x94e20000, 0x25080001, 0x00c23021, 0x2d020004, 0x1440fffb, | ||
6690 | 0x24e70002, 0x95220002, 0x00004021, 0x91230009, 0x00442023, 0x01803821, | ||
6691 | 0x3082ffff, 0xa4e00010, 0x00621821, 0x00021042, 0x18400010, 0x00c33021, | ||
6692 | 0x00404821, 0x94e20000, 0x24e70002, 0x00c23021, 0x30e2007f, 0x14400006, | ||
6693 | 0x25080001, 0x8d630000, 0x3c02007f, 0x3442ff80, 0x00625824, 0x25670008, | ||
6694 | 0x0109102a, 0x1440fff3, 0x00000000, 0x30820001, 0x10400005, 0x00061c02, | ||
6695 | 0xa0e00001, 0x94e20000, 0x00c23021, 0x00061c02, 0x30c2ffff, 0x00623021, | ||
6696 | 0x00061402, 0x00c23021, 0x0a00047d, 0x30c6ffff, 0x24020002, 0x14c20081, | ||
6697 | 0x00000000, 0x3c020800, 0x8c42240c, 0x14400007, 0x00000000, 0x3c020800, | ||
6698 | 0x944223d2, 0x95230002, 0x01e21023, 0x10620077, 0x00000000, 0x3c020800, | ||
6699 | 0x944223d2, 0x01e21023, 0xa5220002, 0x3c020800, 0x8c42240c, 0x1040001a, | ||
6700 | 0x31e3ffff, 0x8dc70010, 0x3c020800, 0x94421b96, 0x00e04021, 0x00072c02, | ||
6701 | 0x00aa2021, 0x00431023, 0x00823823, 0x00072402, 0x30e2ffff, 0x00823821, | ||
6702 | 0x00071027, 0xa522000a, 0x3102ffff, 0x3c040800, 0x948423d4, 0x00453023, | ||
6703 | 0x00e02821, 0x00641823, 0x006d1821, 0x00c33021, 0x00061c02, 0x30c2ffff, | ||
6704 | 0x0a00047d, 0x00623021, 0x01203821, 0x00004021, 0x3082ffff, 0x00021042, | ||
6705 | 0x18400008, 0x00003021, 0x00401821, 0x94e20000, 0x25080001, 0x00c23021, | ||
6706 | 0x0103102a, 0x1440fffb, 0x24e70002, 0x00061c02, 0x30c2ffff, 0x00623021, | ||
6707 | 0x00061402, 0x00c23021, 0x00c02821, 0x00061027, 0xa522000a, 0x00003021, | ||
6708 | 0x2527000c, 0x00004021, 0x94e20000, 0x25080001, 0x00c23021, 0x2d020004, | ||
6709 | 0x1440fffb, 0x24e70002, 0x95220002, 0x00004021, 0x91230009, 0x00442023, | ||
6710 | 0x01803821, 0x3082ffff, 0xa4e00010, 0x3c040800, 0x948423d4, 0x00621821, | ||
6711 | 0x00c33021, 0x00061c02, 0x30c2ffff, 0x00623021, 0x00061c02, 0x3c020800, | ||
6712 | 0x944223d0, 0x00c34821, 0x00441023, 0x00021fc2, 0x00431021, 0x00021043, | ||
6713 | 0x18400010, 0x00003021, 0x00402021, 0x94e20000, 0x24e70002, 0x00c23021, | ||
6714 | 0x30e2007f, 0x14400006, 0x25080001, 0x8d630000, 0x3c02007f, 0x3442ff80, | ||
6715 | 0x00625824, 0x25670008, 0x0104102a, 0x1440fff3, 0x00000000, 0x3c020800, | ||
6716 | 0x944223ec, 0x00c23021, 0x3122ffff, 0x00c23021, 0x00061c02, 0x30c2ffff, | ||
6717 | 0x00623021, 0x00061402, 0x00c23021, 0x00c04021, 0x00061027, 0xa5820010, | ||
6718 | 0xadc00014, 0x0a00049d, 0xadc00000, 0x8dc70010, 0x00e04021, 0x11400007, | ||
6719 | 0x00072c02, 0x00aa3021, 0x00061402, 0x30c3ffff, 0x00433021, 0x00061402, | ||
6720 | 0x00c22821, 0x00051027, 0xa522000a, 0x3c030800, 0x946323d4, 0x3102ffff, | ||
6721 | 0x01e21021, 0x00433023, 0x00cd3021, 0x00061c02, 0x30c2ffff, 0x00623021, | ||
6722 | 0x00061402, 0x00c23021, 0x00c04021, 0x00061027, 0xa5820010, 0x3102ffff, | ||
6723 | 0x00051c00, 0x00431025, 0xadc20010, 0x3c020800, 0x8c4223f4, 0x10400005, | ||
6724 | 0x2de205eb, 0x14400002, 0x25e2fff2, 0x34028870, 0xa5c20034, 0x3c030800, | ||
6725 | 0x246323e8, 0x8c620000, 0x24420001, 0xac620000, 0x3c040800, 0x8c8423e4, | ||
6726 | 0x3c020800, 0x8c421bc0, 0x3303ffff, 0x00832021, 0x00431821, 0x0062102b, | ||
6727 | 0x3c010800, 0xac2423e4, 0x10400003, 0x2482ffff, 0x3c010800, 0xac2223e4, | ||
6728 | 0x3c010800, 0xac231bc0, 0x03e00008, 0x27bd0020, 0x27bdffb8, 0x3c050800, | ||
6729 | 0x24a51b96, 0xafbf0044, 0xafbe0040, 0xafb7003c, 0xafb60038, 0xafb50034, | ||
6730 | 0xafb40030, 0xafb3002c, 0xafb20028, 0xafb10024, 0xafb00020, 0x94a90000, | ||
6731 | 0x3c020800, 0x944223d0, 0x3c030800, 0x8c631bb0, 0x3c040800, 0x8c841bac, | ||
6732 | 0x01221023, 0x0064182a, 0xa7a9001e, 0x106000be, 0xa7a20016, 0x24be0022, | ||
6733 | 0x97b6001e, 0x24b3001a, 0x24b70016, 0x8fc20000, 0x14400008, 0x00000000, | ||
6734 | 0x8fc2fff8, 0x97a30016, 0x8fc4fff4, 0x00431021, 0x0082202a, 0x148000b0, | ||
6735 | 0x00000000, 0x97d50818, 0x32a2ffff, 0x104000a3, 0x00009021, 0x0040a021, | ||
6736 | 0x00008821, 0x0e000625, 0x00000000, 0x00403021, 0x14c00007, 0x00000000, | ||
6737 | 0x3c020800, 0x8c4223dc, 0x24420001, 0x3c010800, 0x0a000596, 0xac2223dc, | ||
6738 | 0x3c100800, 0x02118021, 0x8e101bc8, 0x9608000a, 0x31020040, 0x10400005, | ||
6739 | 0x2407180c, 0x8e02000c, 0x2407188c, 0x00021400, 0xacc20018, 0x31020080, | ||
6740 | 0x54400001, 0x34e70010, 0x3c020800, 0x00511021, 0x8c421bd0, 0x3c030800, | ||
6741 | 0x00711821, 0x8c631bd4, 0x00021500, 0x00031c00, 0x00431025, 0xacc20014, | ||
6742 | 0x96040008, 0x3242ffff, 0x00821021, 0x0282102a, 0x14400002, 0x02b22823, | ||
6743 | 0x00802821, 0x8e020000, 0x02459021, 0xacc20000, 0x8e020004, 0x00c02021, | ||
6744 | 0x26310010, 0xac820004, 0x30e2ffff, 0xac800008, 0xa485000e, 0xac820010, | ||
6745 | 0x24020305, 0x0e0005a2, 0xa482000c, 0x3242ffff, 0x0054102b, 0x1440ffc5, | ||
6746 | 0x3242ffff, 0x0a00058e, 0x00000000, 0x8e620000, 0x8e63fffc, 0x0043102a, | ||
6747 | 0x10400067, 0x00000000, 0x8e62fff0, 0x00028900, 0x3c100800, 0x02118021, | ||
6748 | 0x0e000625, 0x8e101bc8, 0x00403021, 0x14c00005, 0x00000000, 0x8e62082c, | ||
6749 | 0x24420001, 0x0a000596, 0xae62082c, 0x9608000a, 0x31020040, 0x10400005, | ||
6750 | 0x2407180c, 0x8e02000c, 0x2407188c, 0x00021400, 0xacc20018, 0x3c020800, | ||
6751 | 0x00511021, 0x8c421bd0, 0x3c030800, 0x00711821, 0x8c631bd4, 0x00021500, | ||
6752 | 0x00031c00, 0x00431025, 0xacc20014, 0x8e63fff4, 0x96020008, 0x00432023, | ||
6753 | 0x3242ffff, 0x3083ffff, 0x00431021, 0x02c2102a, 0x10400003, 0x00802821, | ||
6754 | 0x97a9001e, 0x01322823, 0x8e620000, 0x30a4ffff, 0x00441021, 0xae620000, | ||
6755 | 0xa4c5000e, 0x8e020000, 0xacc20000, 0x8e020004, 0x8e63fff4, 0x00431021, | ||
6756 | 0xacc20004, 0x8e63fff4, 0x96020008, 0x00641821, 0x0062102a, 0x14400006, | ||
6757 | 0x02459021, 0x8e62fff0, 0xae60fff4, 0x24420001, 0x0a000571, 0xae62fff0, | ||
6758 | 0xae63fff4, 0xacc00008, 0x3242ffff, 0x10560003, 0x31020004, 0x10400006, | ||
6759 | 0x24020305, 0x31020080, 0x54400001, 0x34e70010, 0x34e70020, 0x24020905, | ||
6760 | 0xa4c2000c, 0x8ee30000, 0x8ee20004, 0x14620007, 0x3c02b49a, 0x8ee20860, | ||
6761 | 0x54400001, 0x34e70400, 0x3c024b65, 0x0a000588, 0x34427654, 0x344289ab, | ||
6762 | 0xacc2001c, 0x30e2ffff, 0xacc20010, 0x0e0005a2, 0x00c02021, 0x3242ffff, | ||
6763 | 0x0056102b, 0x1440ff9b, 0x00000000, 0x8e620000, 0x8e63fffc, 0x0043102a, | ||
6764 | 0x1440ff48, 0x00000000, 0x8fbf0044, 0x8fbe0040, 0x8fb7003c, 0x8fb60038, | ||
6765 | 0x8fb50034, 0x8fb40030, 0x8fb3002c, 0x8fb20028, 0x8fb10024, 0x8fb00020, | ||
6766 | 0x03e00008, 0x27bd0048, 0x27bdffe8, 0xafbf0014, 0xafb00010, 0x8f624450, | ||
6767 | 0x8f634410, 0x0a0005b1, 0x00808021, 0x8f626820, 0x30422000, 0x10400003, | ||
6768 | 0x00000000, 0x0e0001f0, 0x00002021, 0x8f624450, 0x8f634410, 0x3042ffff, | ||
6769 | 0x0043102b, 0x1440fff5, 0x00000000, 0x8f630c14, 0x3063000f, 0x2c620002, | ||
6770 | 0x1440000b, 0x00000000, 0x8f630c14, 0x3c020800, 0x8c421b40, 0x3063000f, | ||
6771 | 0x24420001, 0x3c010800, 0xac221b40, 0x2c620002, 0x1040fff7, 0x00000000, | ||
6772 | 0xaf705c18, 0x8f625c10, 0x30420002, 0x10400009, 0x00000000, 0x8f626820, | ||
6773 | 0x30422000, 0x1040fff8, 0x00000000, 0x0e0001f0, 0x00002021, 0x0a0005c4, | ||
6774 | 0x00000000, 0x8fbf0014, 0x8fb00010, 0x03e00008, 0x27bd0018, 0x00000000, | ||
6775 | 0x00000000, 0x00000000, 0x27bdffe8, 0x3c1bc000, 0xafbf0014, 0xafb00010, | ||
6776 | 0xaf60680c, 0x8f626804, 0x34420082, 0xaf626804, 0x8f634000, 0x24020b50, | ||
6777 | 0x3c010800, 0xac221b54, 0x24020b78, 0x3c010800, 0xac221b64, 0x34630002, | ||
6778 | 0xaf634000, 0x0e000605, 0x00808021, 0x3c010800, 0xa0221b68, 0x304200ff, | ||
6779 | 0x24030002, 0x14430005, 0x00000000, 0x3c020800, 0x8c421b54, 0x0a0005f8, | ||
6780 | 0xac5000c0, 0x3c020800, 0x8c421b54, 0xac5000bc, 0x8f624434, 0x8f634438, | ||
6781 | 0x8f644410, 0x3c010800, 0xac221b5c, 0x3c010800, 0xac231b6c, 0x3c010800, | ||
6782 | 0xac241b58, 0x8fbf0014, 0x8fb00010, 0x03e00008, 0x27bd0018, 0x3c040800, | ||
6783 | 0x8c870000, 0x3c03aa55, 0x3463aa55, 0x3c06c003, 0xac830000, 0x8cc20000, | ||
6784 | 0x14430007, 0x24050002, 0x3c0355aa, 0x346355aa, 0xac830000, 0x8cc20000, | ||
6785 | 0x50430001, 0x24050001, 0x3c020800, 0xac470000, 0x03e00008, 0x00a01021, | ||
6786 | 0x27bdfff8, 0x18800009, 0x00002821, 0x8f63680c, 0x8f62680c, 0x1043fffe, | ||
6787 | 0x00000000, 0x24a50001, 0x00a4102a, 0x1440fff9, 0x00000000, 0x03e00008, | ||
6788 | 0x27bd0008, 0x8f634450, 0x3c020800, 0x8c421b5c, 0x00031c02, 0x0043102b, | ||
6789 | 0x14400008, 0x3c038000, 0x3c040800, 0x8c841b6c, 0x8f624450, 0x00021c02, | ||
6790 | 0x0083102b, 0x1040fffc, 0x3c038000, 0xaf634444, 0x8f624444, 0x00431024, | ||
6791 | 0x1440fffd, 0x00000000, 0x8f624448, 0x03e00008, 0x3042ffff, 0x3082ffff, | ||
6792 | 0x2442e000, 0x2c422001, 0x14400003, 0x3c024000, 0x0a000648, 0x2402ffff, | ||
6793 | 0x00822025, 0xaf645c38, 0x8f625c30, 0x30420002, 0x1440fffc, 0x00001021, | ||
6794 | 0x03e00008, 0x00000000, 0x8f624450, 0x3c030800, 0x8c631b58, 0x0a000651, | ||
6795 | 0x3042ffff, 0x8f624450, 0x3042ffff, 0x0043102b, 0x1440fffc, 0x00000000, | ||
6796 | 0x03e00008, 0x00000000, 0x27bdffe0, 0x00802821, 0x3c040800, 0x24841af0, | ||
6797 | 0x00003021, 0x00003821, 0xafbf0018, 0xafa00010, 0x0e00067c, 0xafa00014, | ||
6798 | 0x0a000660, 0x00000000, 0x8fbf0018, 0x03e00008, 0x27bd0020, 0x00000000, | ||
6799 | 0x00000000, 0x00000000, 0x3c020800, 0x34423000, 0x3c030800, 0x34633000, | ||
6800 | 0x3c040800, 0x348437ff, 0x3c010800, 0xac221b74, 0x24020040, 0x3c010800, | ||
6801 | 0xac221b78, 0x3c010800, 0xac201b70, 0xac600000, 0x24630004, 0x0083102b, | ||
6802 | 0x5040fffd, 0xac600000, 0x03e00008, 0x00000000, 0x00804821, 0x8faa0010, | ||
6803 | 0x3c020800, 0x8c421b70, 0x3c040800, 0x8c841b78, 0x8fab0014, 0x24430001, | ||
6804 | 0x0044102b, 0x3c010800, 0xac231b70, 0x14400003, 0x00004021, 0x3c010800, | ||
6805 | 0xac201b70, 0x3c020800, 0x8c421b70, 0x3c030800, 0x8c631b74, 0x91240000, | ||
6806 | 0x00021140, 0x00431021, 0x00481021, 0x25080001, 0xa0440000, 0x29020008, | ||
6807 | 0x1440fff4, 0x25290001, 0x3c020800, 0x8c421b70, 0x3c030800, 0x8c631b74, | ||
6808 | 0x8f64680c, 0x00021140, 0x00431021, 0xac440008, 0xac45000c, 0xac460010, | ||
6809 | 0xac470014, 0xac4a0018, 0x03e00008, 0xac4b001c, 0x00000000, 0x00000000, | ||
6810 | }; | ||
6811 | |||
6812 | static const u32 tg3TsoFwRodata[] = { | ||
6813 | 0x4d61696e, 0x43707542, 0x00000000, 0x4d61696e, 0x43707541, 0x00000000, | ||
6814 | 0x00000000, 0x00000000, 0x73746b6f, 0x66666c64, 0x496e0000, 0x73746b6f, | ||
6815 | 0x66662a2a, 0x00000000, 0x53774576, 0x656e7430, 0x00000000, 0x00000000, | ||
6816 | 0x00000000, 0x00000000, 0x66617461, 0x6c457272, 0x00000000, 0x00000000, | ||
6817 | 0x00000000, | ||
6818 | }; | ||
6819 | |||
6820 | static const u32 tg3TsoFwData[] = { | ||
6821 | 0x00000000, 0x73746b6f, 0x66666c64, 0x5f76312e, 0x362e3000, 0x00000000, | ||
6822 | 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, | ||
6823 | 0x00000000, | ||
6824 | }; | ||
6825 | |||
6826 | /* 5705 needs a special version of the TSO firmware. */ | 6378 | /* 5705 needs a special version of the TSO firmware. */ |
6827 | #define TG3_TSO5_FW_RELEASE_MAJOR 0x1 | ||
6828 | #define TG3_TSO5_FW_RELASE_MINOR 0x2 | ||
6829 | #define TG3_TSO5_FW_RELEASE_FIX 0x0 | ||
6830 | #define TG3_TSO5_FW_START_ADDR 0x00010000 | ||
6831 | #define TG3_TSO5_FW_TEXT_ADDR 0x00010000 | ||
6832 | #define TG3_TSO5_FW_TEXT_LEN 0xe90 | ||
6833 | #define TG3_TSO5_FW_RODATA_ADDR 0x00010e90 | ||
6834 | #define TG3_TSO5_FW_RODATA_LEN 0x50 | ||
6835 | #define TG3_TSO5_FW_DATA_ADDR 0x00010f00 | ||
6836 | #define TG3_TSO5_FW_DATA_LEN 0x20 | ||
6837 | #define TG3_TSO5_FW_SBSS_ADDR 0x00010f20 | ||
6838 | #define TG3_TSO5_FW_SBSS_LEN 0x28 | ||
6839 | #define TG3_TSO5_FW_BSS_ADDR 0x00010f50 | ||
6840 | #define TG3_TSO5_FW_BSS_LEN 0x88 | ||
6841 | |||
6842 | static const u32 tg3Tso5FwText[(TG3_TSO5_FW_TEXT_LEN / 4) + 1] = { | ||
6843 | 0x0c004003, 0x00000000, 0x00010f04, 0x00000000, 0x10000003, 0x00000000, | ||
6844 | 0x0000000d, 0x0000000d, 0x3c1d0001, 0x37bde000, 0x03a0f021, 0x3c100001, | ||
6845 | 0x26100000, 0x0c004010, 0x00000000, 0x0000000d, 0x27bdffe0, 0x3c04fefe, | ||
6846 | 0xafbf0018, 0x0c0042e8, 0x34840002, 0x0c004364, 0x00000000, 0x3c030001, | ||
6847 | 0x90630f34, 0x24020002, 0x3c040001, 0x24840e9c, 0x14620003, 0x24050001, | ||
6848 | 0x3c040001, 0x24840e90, 0x24060002, 0x00003821, 0xafa00010, 0x0c004378, | ||
6849 | 0xafa00014, 0x0c00402c, 0x00000000, 0x8fbf0018, 0x03e00008, 0x27bd0020, | ||
6850 | 0x00000000, 0x00000000, 0x27bdffe0, 0xafbf001c, 0xafb20018, 0xafb10014, | ||
6851 | 0x0c0042d4, 0xafb00010, 0x3c128000, 0x24110001, 0x8f706810, 0x32020400, | ||
6852 | 0x10400007, 0x00000000, 0x8f641008, 0x00921024, 0x14400003, 0x00000000, | ||
6853 | 0x0c004064, 0x00000000, 0x3c020001, 0x90420f56, 0x10510003, 0x32020200, | ||
6854 | 0x1040fff1, 0x00000000, 0x0c0041b4, 0x00000000, 0x08004034, 0x00000000, | ||
6855 | 0x8fbf001c, 0x8fb20018, 0x8fb10014, 0x8fb00010, 0x03e00008, 0x27bd0020, | ||
6856 | 0x27bdffe0, 0x3c040001, 0x24840eb0, 0x00002821, 0x00003021, 0x00003821, | ||
6857 | 0xafbf0018, 0xafa00010, 0x0c004378, 0xafa00014, 0x0000d021, 0x24020130, | ||
6858 | 0xaf625000, 0x3c010001, 0xa4200f50, 0x3c010001, 0xa0200f57, 0x8fbf0018, | ||
6859 | 0x03e00008, 0x27bd0020, 0x00000000, 0x00000000, 0x3c030001, 0x24630f60, | ||
6860 | 0x90620000, 0x27bdfff0, 0x14400003, 0x0080c021, 0x08004073, 0x00004821, | ||
6861 | 0x3c022000, 0x03021024, 0x10400003, 0x24090002, 0x08004073, 0xa0600000, | ||
6862 | 0x24090001, 0x00181040, 0x30431f80, 0x346f8008, 0x1520004b, 0x25eb0028, | ||
6863 | 0x3c040001, 0x00832021, 0x8c848010, 0x3c050001, 0x24a50f7a, 0x00041402, | ||
6864 | 0xa0a20000, 0x3c010001, 0xa0240f7b, 0x3c020001, 0x00431021, 0x94428014, | ||
6865 | 0x3c010001, 0xa0220f7c, 0x3c0c0001, 0x01836021, 0x8d8c8018, 0x304200ff, | ||
6866 | 0x24420008, 0x000220c3, 0x24020001, 0x3c010001, 0xa0220f60, 0x0124102b, | ||
6867 | 0x1040000c, 0x00003821, 0x24a6000e, 0x01602821, 0x8ca20000, 0x8ca30004, | ||
6868 | 0x24a50008, 0x24e70001, 0xacc20000, 0xacc30004, 0x00e4102b, 0x1440fff8, | ||
6869 | 0x24c60008, 0x00003821, 0x3c080001, 0x25080f7b, 0x91060000, 0x3c020001, | ||
6870 | 0x90420f7c, 0x2503000d, 0x00c32821, 0x00461023, 0x00021fc2, 0x00431021, | ||
6871 | 0x00021043, 0x1840000c, 0x00002021, 0x91020001, 0x00461023, 0x00021fc2, | ||
6872 | 0x00431021, 0x00021843, 0x94a20000, 0x24e70001, 0x00822021, 0x00e3102a, | ||
6873 | 0x1440fffb, 0x24a50002, 0x00041c02, 0x3082ffff, 0x00622021, 0x00041402, | ||
6874 | 0x00822021, 0x3c02ffff, 0x01821024, 0x3083ffff, 0x00431025, 0x3c010001, | ||
6875 | 0x080040fa, 0xac220f80, 0x3c050001, 0x24a50f7c, 0x90a20000, 0x3c0c0001, | ||
6876 | 0x01836021, 0x8d8c8018, 0x000220c2, 0x1080000e, 0x00003821, 0x01603021, | ||
6877 | 0x24a5000c, 0x8ca20000, 0x8ca30004, 0x24a50008, 0x24e70001, 0xacc20000, | ||
6878 | 0xacc30004, 0x00e4102b, 0x1440fff8, 0x24c60008, 0x3c050001, 0x24a50f7c, | ||
6879 | 0x90a20000, 0x30430007, 0x24020004, 0x10620011, 0x28620005, 0x10400005, | ||
6880 | 0x24020002, 0x10620008, 0x000710c0, 0x080040fa, 0x00000000, 0x24020006, | ||
6881 | 0x1062000e, 0x000710c0, 0x080040fa, 0x00000000, 0x00a21821, 0x9463000c, | ||
6882 | 0x004b1021, 0x080040fa, 0xa4430000, 0x000710c0, 0x00a21821, 0x8c63000c, | ||
6883 | 0x004b1021, 0x080040fa, 0xac430000, 0x00a21821, 0x8c63000c, 0x004b2021, | ||
6884 | 0x00a21021, 0xac830000, 0x94420010, 0xa4820004, 0x95e70006, 0x3c020001, | ||
6885 | 0x90420f7c, 0x3c030001, 0x90630f7a, 0x00e2c823, 0x3c020001, 0x90420f7b, | ||
6886 | 0x24630028, 0x01e34021, 0x24420028, 0x15200012, 0x01e23021, 0x94c2000c, | ||
6887 | 0x3c010001, 0xa4220f78, 0x94c20004, 0x94c30006, 0x3c010001, 0xa4200f76, | ||
6888 | 0x3c010001, 0xa4200f72, 0x00021400, 0x00431025, 0x3c010001, 0xac220f6c, | ||
6889 | 0x95020004, 0x3c010001, 0x08004124, 0xa4220f70, 0x3c020001, 0x94420f70, | ||
6890 | 0x3c030001, 0x94630f72, 0x00431021, 0xa5020004, 0x3c020001, 0x94420f6c, | ||
6891 | 0xa4c20004, 0x3c020001, 0x8c420f6c, 0xa4c20006, 0x3c040001, 0x94840f72, | ||
6892 | 0x3c020001, 0x94420f70, 0x3c0a0001, 0x954a0f76, 0x00441821, 0x3063ffff, | ||
6893 | 0x0062182a, 0x24020002, 0x1122000b, 0x00832023, 0x3c030001, 0x94630f78, | ||
6894 | 0x30620009, 0x10400006, 0x3062fff6, 0xa4c2000c, 0x3c020001, 0x94420f78, | ||
6895 | 0x30420009, 0x01425023, 0x24020001, 0x1122001b, 0x29220002, 0x50400005, | ||
6896 | 0x24020002, 0x11200007, 0x31a2ffff, 0x08004197, 0x00000000, 0x1122001d, | ||
6897 | 0x24020016, 0x08004197, 0x31a2ffff, 0x3c0e0001, 0x95ce0f80, 0x10800005, | ||
6898 | 0x01806821, 0x01c42021, 0x00041c02, 0x3082ffff, 0x00627021, 0x000e1027, | ||
6899 | 0xa502000a, 0x3c030001, 0x90630f7b, 0x31a2ffff, 0x00e21021, 0x0800418d, | ||
6900 | 0x00432023, 0x3c020001, 0x94420f80, 0x00442021, 0x00041c02, 0x3082ffff, | ||
6901 | 0x00622021, 0x00807021, 0x00041027, 0x08004185, 0xa502000a, 0x3c050001, | ||
6902 | 0x24a50f7a, 0x90a30000, 0x14620002, 0x24e2fff2, 0xa5e20034, 0x90a20000, | ||
6903 | 0x00e21023, 0xa5020002, 0x3c030001, 0x94630f80, 0x3c020001, 0x94420f5a, | ||
6904 | 0x30e5ffff, 0x00641821, 0x00451023, 0x00622023, 0x00041c02, 0x3082ffff, | ||
6905 | 0x00622021, 0x00041027, 0xa502000a, 0x3c030001, 0x90630f7c, 0x24620001, | ||
6906 | 0x14a20005, 0x00807021, 0x01631021, 0x90420000, 0x08004185, 0x00026200, | ||
6907 | 0x24620002, 0x14a20003, 0x306200fe, 0x004b1021, 0x944c0000, 0x3c020001, | ||
6908 | 0x94420f82, 0x3183ffff, 0x3c040001, 0x90840f7b, 0x00431021, 0x00e21021, | ||
6909 | 0x00442023, 0x008a2021, 0x00041c02, 0x3082ffff, 0x00622021, 0x00041402, | ||
6910 | 0x00822021, 0x00806821, 0x00041027, 0xa4c20010, 0x31a2ffff, 0x000e1c00, | ||
6911 | 0x00431025, 0x3c040001, 0x24840f72, 0xade20010, 0x94820000, 0x3c050001, | ||
6912 | 0x94a50f76, 0x3c030001, 0x8c630f6c, 0x24420001, 0x00b92821, 0xa4820000, | ||
6913 | 0x3322ffff, 0x00622021, 0x0083182b, 0x3c010001, 0xa4250f76, 0x10600003, | ||
6914 | 0x24a2ffff, 0x3c010001, 0xa4220f76, 0x3c024000, 0x03021025, 0x3c010001, | ||
6915 | 0xac240f6c, 0xaf621008, 0x03e00008, 0x27bd0010, 0x3c030001, 0x90630f56, | ||
6916 | 0x27bdffe8, 0x24020001, 0xafbf0014, 0x10620026, 0xafb00010, 0x8f620cf4, | ||
6917 | 0x2442ffff, 0x3042007f, 0x00021100, 0x8c434000, 0x3c010001, 0xac230f64, | ||
6918 | 0x8c434008, 0x24444000, 0x8c5c4004, 0x30620040, 0x14400002, 0x24020088, | ||
6919 | 0x24020008, 0x3c010001, 0xa4220f68, 0x30620004, 0x10400005, 0x24020001, | ||
6920 | 0x3c010001, 0xa0220f57, 0x080041d5, 0x00031402, 0x3c010001, 0xa0200f57, | ||
6921 | 0x00031402, 0x3c010001, 0xa4220f54, 0x9483000c, 0x24020001, 0x3c010001, | ||
6922 | 0xa4200f50, 0x3c010001, 0xa0220f56, 0x3c010001, 0xa4230f62, 0x24020001, | ||
6923 | 0x1342001e, 0x00000000, 0x13400005, 0x24020003, 0x13420067, 0x00000000, | ||
6924 | 0x080042cf, 0x00000000, 0x3c020001, 0x94420f62, 0x241a0001, 0x3c010001, | ||
6925 | 0xa4200f5e, 0x3c010001, 0xa4200f52, 0x304407ff, 0x00021bc2, 0x00031823, | ||
6926 | 0x3063003e, 0x34630036, 0x00021242, 0x3042003c, 0x00621821, 0x3c010001, | ||
6927 | 0xa4240f58, 0x00832021, 0x24630030, 0x3c010001, 0xa4240f5a, 0x3c010001, | ||
6928 | 0xa4230f5c, 0x3c060001, 0x24c60f52, 0x94c50000, 0x94c30002, 0x3c040001, | ||
6929 | 0x94840f5a, 0x00651021, 0x0044102a, 0x10400013, 0x3c108000, 0x00a31021, | ||
6930 | 0xa4c20000, 0x3c02a000, 0xaf620cf4, 0x3c010001, 0xa0200f56, 0x8f641008, | ||
6931 | 0x00901024, 0x14400003, 0x00000000, 0x0c004064, 0x00000000, 0x8f620cf4, | ||
6932 | 0x00501024, 0x104000b7, 0x00000000, 0x0800420f, 0x00000000, 0x3c030001, | ||
6933 | 0x94630f50, 0x00851023, 0xa4c40000, 0x00621821, 0x3042ffff, 0x3c010001, | ||
6934 | 0xa4230f50, 0xaf620ce8, 0x3c020001, 0x94420f68, 0x34420024, 0xaf620cec, | ||
6935 | 0x94c30002, 0x3c020001, 0x94420f50, 0x14620012, 0x3c028000, 0x3c108000, | ||
6936 | 0x3c02a000, 0xaf620cf4, 0x3c010001, 0xa0200f56, 0x8f641008, 0x00901024, | ||
6937 | 0x14400003, 0x00000000, 0x0c004064, 0x00000000, 0x8f620cf4, 0x00501024, | ||
6938 | 0x1440fff7, 0x00000000, 0x080042cf, 0x241a0003, 0xaf620cf4, 0x3c108000, | ||
6939 | 0x8f641008, 0x00901024, 0x14400003, 0x00000000, 0x0c004064, 0x00000000, | ||
6940 | 0x8f620cf4, 0x00501024, 0x1440fff7, 0x00000000, 0x080042cf, 0x241a0003, | ||
6941 | 0x3c070001, 0x24e70f50, 0x94e20000, 0x03821021, 0xaf620ce0, 0x3c020001, | ||
6942 | 0x8c420f64, 0xaf620ce4, 0x3c050001, 0x94a50f54, 0x94e30000, 0x3c040001, | ||
6943 | 0x94840f58, 0x3c020001, 0x94420f5e, 0x00a32823, 0x00822023, 0x30a6ffff, | ||
6944 | 0x3083ffff, 0x00c3102b, 0x14400043, 0x00000000, 0x3c020001, 0x94420f5c, | ||
6945 | 0x00021400, 0x00621025, 0xaf620ce8, 0x94e20000, 0x3c030001, 0x94630f54, | ||
6946 | 0x00441021, 0xa4e20000, 0x3042ffff, 0x14430021, 0x3c020008, 0x3c020001, | ||
6947 | 0x90420f57, 0x10400006, 0x3c03000c, 0x3c020001, 0x94420f68, 0x34630624, | ||
6948 | 0x0800427c, 0x0000d021, 0x3c020001, 0x94420f68, 0x3c030008, 0x34630624, | ||
6949 | 0x00431025, 0xaf620cec, 0x3c108000, 0x3c02a000, 0xaf620cf4, 0x3c010001, | ||
6950 | 0xa0200f56, 0x8f641008, 0x00901024, 0x14400003, 0x00000000, 0x0c004064, | ||
6951 | 0x00000000, 0x8f620cf4, 0x00501024, 0x10400015, 0x00000000, 0x08004283, | ||
6952 | 0x00000000, 0x3c030001, 0x94630f68, 0x34420624, 0x3c108000, 0x00621825, | ||
6953 | 0x3c028000, 0xaf630cec, 0xaf620cf4, 0x8f641008, 0x00901024, 0x14400003, | ||
6954 | 0x00000000, 0x0c004064, 0x00000000, 0x8f620cf4, 0x00501024, 0x1440fff7, | ||
6955 | 0x00000000, 0x3c010001, 0x080042cf, 0xa4200f5e, 0x3c020001, 0x94420f5c, | ||
6956 | 0x00021400, 0x00c21025, 0xaf620ce8, 0x3c020001, 0x90420f57, 0x10400009, | ||
6957 | 0x3c03000c, 0x3c020001, 0x94420f68, 0x34630624, 0x0000d021, 0x00431025, | ||
6958 | 0xaf620cec, 0x080042c1, 0x3c108000, 0x3c020001, 0x94420f68, 0x3c030008, | ||
6959 | 0x34630604, 0x00431025, 0xaf620cec, 0x3c020001, 0x94420f5e, 0x00451021, | ||
6960 | 0x3c010001, 0xa4220f5e, 0x3c108000, 0x3c02a000, 0xaf620cf4, 0x3c010001, | ||
6961 | 0xa0200f56, 0x8f641008, 0x00901024, 0x14400003, 0x00000000, 0x0c004064, | ||
6962 | 0x00000000, 0x8f620cf4, 0x00501024, 0x1440fff7, 0x00000000, 0x8fbf0014, | ||
6963 | 0x8fb00010, 0x03e00008, 0x27bd0018, 0x00000000, 0x27bdffe0, 0x3c040001, | ||
6964 | 0x24840ec0, 0x00002821, 0x00003021, 0x00003821, 0xafbf0018, 0xafa00010, | ||
6965 | 0x0c004378, 0xafa00014, 0x0000d021, 0x24020130, 0xaf625000, 0x3c010001, | ||
6966 | 0xa4200f50, 0x3c010001, 0xa0200f57, 0x8fbf0018, 0x03e00008, 0x27bd0020, | ||
6967 | 0x27bdffe8, 0x3c1bc000, 0xafbf0014, 0xafb00010, 0xaf60680c, 0x8f626804, | ||
6968 | 0x34420082, 0xaf626804, 0x8f634000, 0x24020b50, 0x3c010001, 0xac220f20, | ||
6969 | 0x24020b78, 0x3c010001, 0xac220f30, 0x34630002, 0xaf634000, 0x0c004315, | ||
6970 | 0x00808021, 0x3c010001, 0xa0220f34, 0x304200ff, 0x24030002, 0x14430005, | ||
6971 | 0x00000000, 0x3c020001, 0x8c420f20, 0x08004308, 0xac5000c0, 0x3c020001, | ||
6972 | 0x8c420f20, 0xac5000bc, 0x8f624434, 0x8f634438, 0x8f644410, 0x3c010001, | ||
6973 | 0xac220f28, 0x3c010001, 0xac230f38, 0x3c010001, 0xac240f24, 0x8fbf0014, | ||
6974 | 0x8fb00010, 0x03e00008, 0x27bd0018, 0x03e00008, 0x24020001, 0x27bdfff8, | ||
6975 | 0x18800009, 0x00002821, 0x8f63680c, 0x8f62680c, 0x1043fffe, 0x00000000, | ||
6976 | 0x24a50001, 0x00a4102a, 0x1440fff9, 0x00000000, 0x03e00008, 0x27bd0008, | ||
6977 | 0x8f634450, 0x3c020001, 0x8c420f28, 0x00031c02, 0x0043102b, 0x14400008, | ||
6978 | 0x3c038000, 0x3c040001, 0x8c840f38, 0x8f624450, 0x00021c02, 0x0083102b, | ||
6979 | 0x1040fffc, 0x3c038000, 0xaf634444, 0x8f624444, 0x00431024, 0x1440fffd, | ||
6980 | 0x00000000, 0x8f624448, 0x03e00008, 0x3042ffff, 0x3082ffff, 0x2442e000, | ||
6981 | 0x2c422001, 0x14400003, 0x3c024000, 0x08004347, 0x2402ffff, 0x00822025, | ||
6982 | 0xaf645c38, 0x8f625c30, 0x30420002, 0x1440fffc, 0x00001021, 0x03e00008, | ||
6983 | 0x00000000, 0x8f624450, 0x3c030001, 0x8c630f24, 0x08004350, 0x3042ffff, | ||
6984 | 0x8f624450, 0x3042ffff, 0x0043102b, 0x1440fffc, 0x00000000, 0x03e00008, | ||
6985 | 0x00000000, 0x27bdffe0, 0x00802821, 0x3c040001, 0x24840ed0, 0x00003021, | ||
6986 | 0x00003821, 0xafbf0018, 0xafa00010, 0x0c004378, 0xafa00014, 0x0800435f, | ||
6987 | 0x00000000, 0x8fbf0018, 0x03e00008, 0x27bd0020, 0x3c020001, 0x3442d600, | ||
6988 | 0x3c030001, 0x3463d600, 0x3c040001, 0x3484ddff, 0x3c010001, 0xac220f40, | ||
6989 | 0x24020040, 0x3c010001, 0xac220f44, 0x3c010001, 0xac200f3c, 0xac600000, | ||
6990 | 0x24630004, 0x0083102b, 0x5040fffd, 0xac600000, 0x03e00008, 0x00000000, | ||
6991 | 0x00804821, 0x8faa0010, 0x3c020001, 0x8c420f3c, 0x3c040001, 0x8c840f44, | ||
6992 | 0x8fab0014, 0x24430001, 0x0044102b, 0x3c010001, 0xac230f3c, 0x14400003, | ||
6993 | 0x00004021, 0x3c010001, 0xac200f3c, 0x3c020001, 0x8c420f3c, 0x3c030001, | ||
6994 | 0x8c630f40, 0x91240000, 0x00021140, 0x00431021, 0x00481021, 0x25080001, | ||
6995 | 0xa0440000, 0x29020008, 0x1440fff4, 0x25290001, 0x3c020001, 0x8c420f3c, | ||
6996 | 0x3c030001, 0x8c630f40, 0x8f64680c, 0x00021140, 0x00431021, 0xac440008, | ||
6997 | 0xac45000c, 0xac460010, 0xac470014, 0xac4a0018, 0x03e00008, 0xac4b001c, | ||
6998 | 0x00000000, 0x00000000, 0x00000000, | ||
6999 | }; | ||
7000 | |||
7001 | static const u32 tg3Tso5FwRodata[(TG3_TSO5_FW_RODATA_LEN / 4) + 1] = { | ||
7002 | 0x4d61696e, 0x43707542, 0x00000000, 0x4d61696e, 0x43707541, 0x00000000, | ||
7003 | 0x00000000, 0x00000000, 0x73746b6f, 0x66666c64, 0x00000000, 0x00000000, | ||
7004 | 0x73746b6f, 0x66666c64, 0x00000000, 0x00000000, 0x66617461, 0x6c457272, | ||
7005 | 0x00000000, 0x00000000, 0x00000000, | ||
7006 | }; | ||
7007 | |||
7008 | static const u32 tg3Tso5FwData[(TG3_TSO5_FW_DATA_LEN / 4) + 1] = { | ||
7009 | 0x00000000, 0x73746b6f, 0x66666c64, 0x5f76312e, 0x322e3000, 0x00000000, | ||
7010 | 0x00000000, 0x00000000, 0x00000000, | ||
7011 | }; | ||
7012 | 6379 | ||
7013 | /* tp->lock is held. */ | 6380 | /* tp->lock is held. */ |
7014 | static int tg3_load_tso_firmware(struct tg3 *tp) | 6381 | static int tg3_load_tso_firmware(struct tg3 *tp) |
7015 | { | 6382 | { |
7016 | struct fw_info info; | 6383 | struct fw_info info; |
6384 | const __be32 *fw_data; | ||
7017 | unsigned long cpu_base, cpu_scratch_base, cpu_scratch_size; | 6385 | unsigned long cpu_base, cpu_scratch_base, cpu_scratch_size; |
7018 | int err, i; | 6386 | int err, i; |
7019 | 6387 | ||
7020 | if (tp->tg3_flags2 & TG3_FLG2_HW_TSO) | 6388 | if (tp->tg3_flags2 & TG3_FLG2_HW_TSO) |
7021 | return 0; | 6389 | return 0; |
7022 | 6390 | ||
6391 | fw_data = (void *)tp->fw->data; | ||
6392 | |||
6393 | /* Firmware blob starts with version numbers, followed by | ||
6394 | start address and length. We are setting complete length. | ||
6395 | length = end_address_of_bss - start_address_of_text. | ||
6396 | Remainder is the blob to be loaded contiguously | ||
6397 | from start address. */ | ||
6398 | |||
6399 | info.fw_base = be32_to_cpu(fw_data[1]); | ||
6400 | cpu_scratch_size = tp->fw_len; | ||
6401 | info.fw_len = tp->fw->size - 12; | ||
6402 | info.fw_data = &fw_data[3]; | ||
6403 | |||
7023 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705) { | 6404 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705) { |
7024 | info.text_base = TG3_TSO5_FW_TEXT_ADDR; | ||
7025 | info.text_len = TG3_TSO5_FW_TEXT_LEN; | ||
7026 | info.text_data = &tg3Tso5FwText[0]; | ||
7027 | info.rodata_base = TG3_TSO5_FW_RODATA_ADDR; | ||
7028 | info.rodata_len = TG3_TSO5_FW_RODATA_LEN; | ||
7029 | info.rodata_data = &tg3Tso5FwRodata[0]; | ||
7030 | info.data_base = TG3_TSO5_FW_DATA_ADDR; | ||
7031 | info.data_len = TG3_TSO5_FW_DATA_LEN; | ||
7032 | info.data_data = &tg3Tso5FwData[0]; | ||
7033 | cpu_base = RX_CPU_BASE; | 6405 | cpu_base = RX_CPU_BASE; |
7034 | cpu_scratch_base = NIC_SRAM_MBUF_POOL_BASE5705; | 6406 | cpu_scratch_base = NIC_SRAM_MBUF_POOL_BASE5705; |
7035 | cpu_scratch_size = (info.text_len + | ||
7036 | info.rodata_len + | ||
7037 | info.data_len + | ||
7038 | TG3_TSO5_FW_SBSS_LEN + | ||
7039 | TG3_TSO5_FW_BSS_LEN); | ||
7040 | } else { | 6407 | } else { |
7041 | info.text_base = TG3_TSO_FW_TEXT_ADDR; | ||
7042 | info.text_len = TG3_TSO_FW_TEXT_LEN; | ||
7043 | info.text_data = &tg3TsoFwText[0]; | ||
7044 | info.rodata_base = TG3_TSO_FW_RODATA_ADDR; | ||
7045 | info.rodata_len = TG3_TSO_FW_RODATA_LEN; | ||
7046 | info.rodata_data = &tg3TsoFwRodata[0]; | ||
7047 | info.data_base = TG3_TSO_FW_DATA_ADDR; | ||
7048 | info.data_len = TG3_TSO_FW_DATA_LEN; | ||
7049 | info.data_data = &tg3TsoFwData[0]; | ||
7050 | cpu_base = TX_CPU_BASE; | 6408 | cpu_base = TX_CPU_BASE; |
7051 | cpu_scratch_base = TX_CPU_SCRATCH_BASE; | 6409 | cpu_scratch_base = TX_CPU_SCRATCH_BASE; |
7052 | cpu_scratch_size = TX_CPU_SCRATCH_SIZE; | 6410 | cpu_scratch_size = TX_CPU_SCRATCH_SIZE; |
@@ -7060,21 +6418,21 @@ static int tg3_load_tso_firmware(struct tg3 *tp) | |||
7060 | 6418 | ||
7061 | /* Now startup the cpu. */ | 6419 | /* Now startup the cpu. */ |
7062 | tw32(cpu_base + CPU_STATE, 0xffffffff); | 6420 | tw32(cpu_base + CPU_STATE, 0xffffffff); |
7063 | tw32_f(cpu_base + CPU_PC, info.text_base); | 6421 | tw32_f(cpu_base + CPU_PC, info.fw_base); |
7064 | 6422 | ||
7065 | for (i = 0; i < 5; i++) { | 6423 | for (i = 0; i < 5; i++) { |
7066 | if (tr32(cpu_base + CPU_PC) == info.text_base) | 6424 | if (tr32(cpu_base + CPU_PC) == info.fw_base) |
7067 | break; | 6425 | break; |
7068 | tw32(cpu_base + CPU_STATE, 0xffffffff); | 6426 | tw32(cpu_base + CPU_STATE, 0xffffffff); |
7069 | tw32(cpu_base + CPU_MODE, CPU_MODE_HALT); | 6427 | tw32(cpu_base + CPU_MODE, CPU_MODE_HALT); |
7070 | tw32_f(cpu_base + CPU_PC, info.text_base); | 6428 | tw32_f(cpu_base + CPU_PC, info.fw_base); |
7071 | udelay(1000); | 6429 | udelay(1000); |
7072 | } | 6430 | } |
7073 | if (i >= 5) { | 6431 | if (i >= 5) { |
7074 | printk(KERN_ERR PFX "tg3_load_tso_firmware fails for %s " | 6432 | printk(KERN_ERR PFX "tg3_load_tso_firmware fails for %s " |
7075 | "to set CPU PC, is %08x should be %08x\n", | 6433 | "to set CPU PC, is %08x should be %08x\n", |
7076 | tp->dev->name, tr32(cpu_base + CPU_PC), | 6434 | tp->dev->name, tr32(cpu_base + CPU_PC), |
7077 | info.text_base); | 6435 | info.fw_base); |
7078 | return -ENODEV; | 6436 | return -ENODEV; |
7079 | } | 6437 | } |
7080 | tw32(cpu_base + CPU_STATE, 0xffffffff); | 6438 | tw32(cpu_base + CPU_STATE, 0xffffffff); |
@@ -7299,11 +6657,7 @@ static int tg3_reset_hw(struct tg3 *tp, int reset_phy) | |||
7299 | else if (tp->tg3_flags2 & TG3_FLG2_TSO_CAPABLE) { | 6657 | else if (tp->tg3_flags2 & TG3_FLG2_TSO_CAPABLE) { |
7300 | int fw_len; | 6658 | int fw_len; |
7301 | 6659 | ||
7302 | fw_len = (TG3_TSO5_FW_TEXT_LEN + | 6660 | fw_len = tp->fw_len; |
7303 | TG3_TSO5_FW_RODATA_LEN + | ||
7304 | TG3_TSO5_FW_DATA_LEN + | ||
7305 | TG3_TSO5_FW_SBSS_LEN + | ||
7306 | TG3_TSO5_FW_BSS_LEN); | ||
7307 | fw_len = (fw_len + (0x80 - 1)) & ~(0x80 - 1); | 6661 | fw_len = (fw_len + (0x80 - 1)) & ~(0x80 - 1); |
7308 | tw32(BUFMGR_MB_POOL_ADDR, | 6662 | tw32(BUFMGR_MB_POOL_ADDR, |
7309 | NIC_SRAM_MBUF_POOL_BASE5705 + fw_len); | 6663 | NIC_SRAM_MBUF_POOL_BASE5705 + fw_len); |
@@ -13580,6 +12934,7 @@ static int __devinit tg3_init_one(struct pci_dev *pdev, | |||
13580 | struct net_device *dev; | 12934 | struct net_device *dev; |
13581 | struct tg3 *tp; | 12935 | struct tg3 *tp; |
13582 | int err, pm_cap; | 12936 | int err, pm_cap; |
12937 | const char *fw_name = NULL; | ||
13583 | char str[40]; | 12938 | char str[40]; |
13584 | u64 dma_mask, persist_dma_mask; | 12939 | u64 dma_mask, persist_dma_mask; |
13585 | 12940 | ||
@@ -13735,6 +13090,9 @@ static int __devinit tg3_init_one(struct pci_dev *pdev, | |||
13735 | 13090 | ||
13736 | tg3_init_bufmgr_config(tp); | 13091 | tg3_init_bufmgr_config(tp); |
13737 | 13092 | ||
13093 | if (tp->pci_chip_rev_id == CHIPREV_ID_5701_A0) | ||
13094 | fw_name = FIRMWARE_TG3; | ||
13095 | |||
13738 | if (tp->tg3_flags2 & TG3_FLG2_HW_TSO) { | 13096 | if (tp->tg3_flags2 & TG3_FLG2_HW_TSO) { |
13739 | tp->tg3_flags2 |= TG3_FLG2_TSO_CAPABLE; | 13097 | tp->tg3_flags2 |= TG3_FLG2_TSO_CAPABLE; |
13740 | } | 13098 | } |
@@ -13747,6 +13105,37 @@ static int __devinit tg3_init_one(struct pci_dev *pdev, | |||
13747 | } else { | 13105 | } else { |
13748 | tp->tg3_flags2 |= TG3_FLG2_TSO_CAPABLE | TG3_FLG2_TSO_BUG; | 13106 | tp->tg3_flags2 |= TG3_FLG2_TSO_CAPABLE | TG3_FLG2_TSO_BUG; |
13749 | } | 13107 | } |
13108 | if (tp->tg3_flags2 & TG3_FLG2_TSO_CAPABLE) { | ||
13109 | if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705) | ||
13110 | fw_name = FIRMWARE_TG3TSO5; | ||
13111 | else | ||
13112 | fw_name = FIRMWARE_TG3TSO; | ||
13113 | } | ||
13114 | |||
13115 | if (fw_name) { | ||
13116 | const __be32 *fw_data; | ||
13117 | |||
13118 | err = request_firmware(&tp->fw, fw_name, &tp->pdev->dev); | ||
13119 | if (err) { | ||
13120 | printk(KERN_ERR "tg3: Failed to load firmware \"%s\"\n", | ||
13121 | fw_name); | ||
13122 | goto err_out_iounmap; | ||
13123 | } | ||
13124 | |||
13125 | fw_data = (void *)tp->fw->data; | ||
13126 | |||
13127 | /* Firmware blob starts with version numbers, followed by | ||
13128 | start address and _full_ length including BSS sections | ||
13129 | (which must be longer than the actual data, of course */ | ||
13130 | |||
13131 | tp->fw_len = be32_to_cpu(fw_data[2]); /* includes bss */ | ||
13132 | if (tp->fw_len < (tp->fw->size - 12)) { | ||
13133 | printk(KERN_ERR "tg3: bogus length %d in \"%s\"\n", | ||
13134 | tp->fw_len, fw_name); | ||
13135 | err = -EINVAL; | ||
13136 | goto err_out_fw; | ||
13137 | } | ||
13138 | } | ||
13750 | 13139 | ||
13751 | /* TSO is on by default on chips that support hardware TSO. | 13140 | /* TSO is on by default on chips that support hardware TSO. |
13752 | * Firmware TSO on older chips gives lower performance, so it | 13141 | * Firmware TSO on older chips gives lower performance, so it |
@@ -13778,7 +13167,7 @@ static int __devinit tg3_init_one(struct pci_dev *pdev, | |||
13778 | if (err) { | 13167 | if (err) { |
13779 | printk(KERN_ERR PFX "Could not obtain valid ethernet address, " | 13168 | printk(KERN_ERR PFX "Could not obtain valid ethernet address, " |
13780 | "aborting.\n"); | 13169 | "aborting.\n"); |
13781 | goto err_out_iounmap; | 13170 | goto err_out_fw; |
13782 | } | 13171 | } |
13783 | 13172 | ||
13784 | if (tp->tg3_flags3 & TG3_FLG3_ENABLE_APE) { | 13173 | if (tp->tg3_flags3 & TG3_FLG3_ENABLE_APE) { |
@@ -13787,7 +13176,7 @@ static int __devinit tg3_init_one(struct pci_dev *pdev, | |||
13787 | printk(KERN_ERR PFX "Cannot map APE registers, " | 13176 | printk(KERN_ERR PFX "Cannot map APE registers, " |
13788 | "aborting.\n"); | 13177 | "aborting.\n"); |
13789 | err = -ENOMEM; | 13178 | err = -ENOMEM; |
13790 | goto err_out_iounmap; | 13179 | goto err_out_fw; |
13791 | } | 13180 | } |
13792 | 13181 | ||
13793 | tg3_ape_lock_init(tp); | 13182 | tg3_ape_lock_init(tp); |
@@ -13867,6 +13256,10 @@ err_out_apeunmap: | |||
13867 | tp->aperegs = NULL; | 13256 | tp->aperegs = NULL; |
13868 | } | 13257 | } |
13869 | 13258 | ||
13259 | err_out_fw: | ||
13260 | if (tp->fw) | ||
13261 | release_firmware(tp->fw); | ||
13262 | |||
13870 | err_out_iounmap: | 13263 | err_out_iounmap: |
13871 | if (tp->regs) { | 13264 | if (tp->regs) { |
13872 | iounmap(tp->regs); | 13265 | iounmap(tp->regs); |
@@ -13892,6 +13285,9 @@ static void __devexit tg3_remove_one(struct pci_dev *pdev) | |||
13892 | if (dev) { | 13285 | if (dev) { |
13893 | struct tg3 *tp = netdev_priv(dev); | 13286 | struct tg3 *tp = netdev_priv(dev); |
13894 | 13287 | ||
13288 | if (tp->fw) | ||
13289 | release_firmware(tp->fw); | ||
13290 | |||
13895 | flush_scheduled_work(); | 13291 | flush_scheduled_work(); |
13896 | 13292 | ||
13897 | if (tp->tg3_flags3 & TG3_FLG3_USE_PHYLIB) { | 13293 | if (tp->tg3_flags3 & TG3_FLG3_USE_PHYLIB) { |