Path: blob/master/drivers/misc/iwmc3200top/fw-msg.h
15111 views
/*1* iwmc3200top - Intel Wireless MultiCom 3200 Top Driver2* drivers/misc/iwmc3200top/fw-msg.h3*4* Copyright (C) 2009 Intel Corporation. All rights reserved.5*6* This program is free software; you can redistribute it and/or7* modify it under the terms of the GNU General Public License version8* 2 as published by the Free Software Foundation.9*10* This program is distributed in the hope that it will be useful,11* but WITHOUT ANY WARRANTY; without even the implied warranty of12* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the13* GNU General Public License for more details.14*15* You should have received a copy of the GNU General Public License16* along with this program; if not, write to the Free Software17* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA18* 02110-1301, USA.19*20*21* Author Name: Maxim Grabarnik <[email protected]>22* -23*24*/2526#ifndef __FWMSG_H__27#define __FWMSG_H__2829#define COMM_TYPE_D2H 0xFF30#define COMM_TYPE_H2D 0xEE3132#define COMM_CATEGORY_OPERATIONAL 0x0033#define COMM_CATEGORY_DEBUG 0x0134#define COMM_CATEGORY_TESTABILITY 0x0235#define COMM_CATEGORY_DIAGNOSTICS 0x033637#define OP_DBG_ZSTR_MSG cpu_to_le16(0x1A)3839#define FW_LOG_SRC_MAX 3240#define FW_LOG_SRC_ALL 2554142#define FW_STRING_TABLE_ADDR cpu_to_le32(0x0C000000)4344#define CMD_DBG_LOG_LEVEL cpu_to_le16(0x0001)45#define CMD_TST_DEV_RESET cpu_to_le16(0x0060)46#define CMD_TST_FUNC_RESET cpu_to_le16(0x0062)47#define CMD_TST_IFACE_RESET cpu_to_le16(0x0064)48#define CMD_TST_CPU_UTILIZATION cpu_to_le16(0x0065)49#define CMD_TST_TOP_DEEP_SLEEP cpu_to_le16(0x0080)50#define CMD_TST_WAKEUP cpu_to_le16(0x0081)51#define CMD_TST_FUNC_WAKEUP cpu_to_le16(0x0082)52#define CMD_TST_FUNC_DEEP_SLEEP_REQUEST cpu_to_le16(0x0083)53#define CMD_TST_GET_MEM_DUMP cpu_to_le16(0x0096)5455#define OP_OPR_ALIVE cpu_to_le16(0x0010)56#define OP_OPR_CMD_ACK cpu_to_le16(0x001F)57#define OP_OPR_CMD_NACK cpu_to_le16(0x0020)58#define OP_TST_MEM_DUMP cpu_to_le16(0x0043)5960#define CMD_FLAG_PADDING_256 0x806162#define FW_HCMD_BLOCK_SIZE 2566364struct msg_hdr {65u8 type;66u8 category;67__le16 opcode;68u8 seqnum;69u8 flags;70__le16 length;71} __attribute__((__packed__));7273struct log_hdr {74__le32 timestamp;75u8 severity;76u8 logsource;77__le16 reserved;78} __attribute__((__packed__));7980struct mdump_hdr {81u8 dmpid;82u8 frag;83__le16 size;84__le32 addr;85} __attribute__((__packed__));8687struct top_msg {88struct msg_hdr hdr;89union {90/* D2H messages */91struct {92struct log_hdr log_hdr;93u8 data[1];94} __attribute__((__packed__)) log;9596struct {97struct log_hdr log_hdr;98struct mdump_hdr md_hdr;99u8 data[1];100} __attribute__((__packed__)) mdump;101102/* H2D messages */103struct {104u8 logsource;105u8 sevmask;106} __attribute__((__packed__)) logdefs[FW_LOG_SRC_MAX];107struct mdump_hdr mdump_req;108} u;109} __attribute__((__packed__));110111112#endif /* __FWMSG_H__ */113114115