1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * Copyright (C) 2008, cozybit Inc.
4 * Copyright (C) 2003-2006, Marvell International Ltd.
6 #include <linux/wait.h>
7 #include <linux/timer.h>
12 * This file contains definition for USB interface.
14 #define CMD_TYPE_REQUEST 0xF00DFACE
15 #define CMD_TYPE_DATA 0xBEADC0DE
16 #define CMD_TYPE_INDICATION 0xBEEFFACE
18 #define BOOT_CMD_FW_BY_USB 0x01
19 #define BOOT_CMD_FW_IN_EEPROM 0x02
20 #define BOOT_CMD_UPDATE_BOOT2 0x03
21 #define BOOT_CMD_UPDATE_FW 0x04
22 #define BOOT_CMD_MAGIC_NUMBER 0x4C56524D /* LVRM */
30 #define BOOT_CMD_RESP_OK 0x0001
31 #define BOOT_CMD_RESP_FAIL 0x0000
40 /** USB card description structure*/
42 struct usb_device
*udev
;
43 struct urb
*rx_urb
, *tx_urb
, *cmd_urb
;
44 struct lbtf_private
*priv
;
46 struct sk_buff
*rx_skb
;
58 const struct firmware
*fw
;
59 struct timer_list fw_timeout
;
60 wait_queue_head_t fw_wq
;
63 uint32_t fwlastblksent
;
79 #define FW_MAX_DATA_BLK_SIZE 600
93 #define FW_HAS_DATA_TO_RECV 0x00000001
94 #define FW_HAS_LAST_BLOCK 0x00000004