2 * Copyright (C) 2008, cozybit Inc.
3 * Copyright (C) 2003-2006, Marvell International Ltd.
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or (at
8 * your option) any later version.
10 #include <linux/wait.h>
11 #include <linux/timer.h>
16 * This file contains definition for USB interface.
18 #define CMD_TYPE_REQUEST 0xF00DFACE
19 #define CMD_TYPE_DATA 0xBEADC0DE
20 #define CMD_TYPE_INDICATION 0xBEEFFACE
22 #define BOOT_CMD_FW_BY_USB 0x01
23 #define BOOT_CMD_FW_IN_EEPROM 0x02
24 #define BOOT_CMD_UPDATE_BOOT2 0x03
25 #define BOOT_CMD_UPDATE_FW 0x04
26 #define BOOT_CMD_MAGIC_NUMBER 0x4C56524D /* LVRM */
34 #define BOOT_CMD_RESP_OK 0x0001
35 #define BOOT_CMD_RESP_FAIL 0x0000
44 /** USB card description structure*/
46 struct usb_device
*udev
;
47 struct urb
*rx_urb
, *tx_urb
, *cmd_urb
;
48 struct lbtf_private
*priv
;
50 struct sk_buff
*rx_skb
;
62 const struct firmware
*fw
;
63 struct timer_list fw_timeout
;
64 wait_queue_head_t fw_wq
;
67 uint32_t fwlastblksent
;
83 #define FW_MAX_DATA_BLK_SIZE 600
97 #define FW_HAS_DATA_TO_RECV 0x00000001
98 #define FW_HAS_LAST_BLOCK 0x00000004