bfi.h 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539
  1. /*
  2. * Linux network driver for Brocade Converged Network Adapter.
  3. *
  4. * This program is free software; you can redistribute it and/or modify it
  5. * under the terms of the GNU General Public License (GPL) Version 2 as
  6. * published by the Free Software Foundation
  7. *
  8. * This program is distributed in the hope that it will be useful, but
  9. * WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. * General Public License for more details.
  12. */
  13. /*
  14. * Copyright (c) 2005-2010 Brocade Communications Systems, Inc.
  15. * All rights reserved
  16. * www.brocade.com
  17. */
  18. #ifndef __BFI_H__
  19. #define __BFI_H__
  20. #include "bfa_defs.h"
  21. #pragma pack(1)
  22. /* BFI FW image type */
  23. #define BFI_FLASH_CHUNK_SZ 256 /*!< Flash chunk size */
  24. #define BFI_FLASH_CHUNK_SZ_WORDS (BFI_FLASH_CHUNK_SZ/sizeof(u32))
  25. /* Msg header common to all msgs */
  26. struct bfi_mhdr {
  27. u8 msg_class; /*!< @ref enum bfi_mclass */
  28. u8 msg_id; /*!< msg opcode with in the class */
  29. union {
  30. struct {
  31. u8 qid;
  32. u8 fn_lpu; /*!< msg destination */
  33. } h2i;
  34. u16 i2htok; /*!< token in msgs to host */
  35. } mtag;
  36. };
  37. #define bfi_fn_lpu(__fn, __lpu) ((__fn) << 1 | (__lpu))
  38. #define bfi_mhdr_2_fn(_mh) ((_mh)->mtag.h2i.fn_lpu >> 1)
  39. #define bfi_mhdr_2_qid(_mh) ((_mh)->mtag.h2i.qid)
  40. #define bfi_h2i_set(_mh, _mc, _op, _fn_lpu) do { \
  41. (_mh).msg_class = (_mc); \
  42. (_mh).msg_id = (_op); \
  43. (_mh).mtag.h2i.fn_lpu = (_fn_lpu); \
  44. } while (0)
  45. #define bfi_i2h_set(_mh, _mc, _op, _i2htok) do { \
  46. (_mh).msg_class = (_mc); \
  47. (_mh).msg_id = (_op); \
  48. (_mh).mtag.i2htok = (_i2htok); \
  49. } while (0)
  50. /*
  51. * Message opcodes: 0-127 to firmware, 128-255 to host
  52. */
  53. #define BFI_I2H_OPCODE_BASE 128
  54. #define BFA_I2HM(_x) ((_x) + BFI_I2H_OPCODE_BASE)
  55. /****************************************************************************
  56. *
  57. * Scatter Gather Element and Page definition
  58. *
  59. ****************************************************************************
  60. */
  61. /* DMA addresses */
  62. union bfi_addr_u {
  63. struct {
  64. u32 addr_lo;
  65. u32 addr_hi;
  66. } a32;
  67. };
  68. /* Generic DMA addr-len pair. */
  69. struct bfi_alen {
  70. union bfi_addr_u al_addr; /* DMA addr of buffer */
  71. u32 al_len; /* length of buffer */
  72. };
  73. /*
  74. * Large Message structure - 128 Bytes size Msgs
  75. */
  76. #define BFI_LMSG_SZ 128
  77. #define BFI_LMSG_PL_WSZ \
  78. ((BFI_LMSG_SZ - sizeof(struct bfi_mhdr)) / 4)
  79. /* Mailbox message structure */
  80. #define BFI_MBMSG_SZ 7
  81. struct bfi_mbmsg {
  82. struct bfi_mhdr mh;
  83. u32 pl[BFI_MBMSG_SZ];
  84. };
  85. /* Supported PCI function class codes (personality) */
  86. enum bfi_pcifn_class {
  87. BFI_PCIFN_CLASS_FC = 0x0c04,
  88. BFI_PCIFN_CLASS_ETH = 0x0200,
  89. };
  90. /* Message Classes */
  91. enum bfi_mclass {
  92. BFI_MC_IOC = 1, /*!< IO Controller (IOC) */
  93. BFI_MC_DIAG = 2, /*!< Diagnostic Msgs */
  94. BFI_MC_FLASH = 3, /*!< Flash message class */
  95. BFI_MC_CEE = 4, /*!< CEE */
  96. BFI_MC_FCPORT = 5, /*!< FC port */
  97. BFI_MC_IOCFC = 6, /*!< FC - IO Controller (IOC) */
  98. BFI_MC_LL = 7, /*!< Link Layer */
  99. BFI_MC_UF = 8, /*!< Unsolicited frame receive */
  100. BFI_MC_FCXP = 9, /*!< FC Transport */
  101. BFI_MC_LPS = 10, /*!< lport fc login services */
  102. BFI_MC_RPORT = 11, /*!< Remote port */
  103. BFI_MC_ITNIM = 12, /*!< I-T nexus (Initiator mode) */
  104. BFI_MC_IOIM_READ = 13, /*!< read IO (Initiator mode) */
  105. BFI_MC_IOIM_WRITE = 14, /*!< write IO (Initiator mode) */
  106. BFI_MC_IOIM_IO = 15, /*!< IO (Initiator mode) */
  107. BFI_MC_IOIM = 16, /*!< IO (Initiator mode) */
  108. BFI_MC_IOIM_IOCOM = 17, /*!< good IO completion */
  109. BFI_MC_TSKIM = 18, /*!< Initiator Task management */
  110. BFI_MC_SBOOT = 19, /*!< SAN boot services */
  111. BFI_MC_IPFC = 20, /*!< IP over FC Msgs */
  112. BFI_MC_PORT = 21, /*!< Physical port */
  113. BFI_MC_SFP = 22, /*!< SFP module */
  114. BFI_MC_MSGQ = 23, /*!< MSGQ */
  115. BFI_MC_ENET = 24, /*!< ENET commands/responses */
  116. BFI_MC_PHY = 25, /*!< External PHY message class */
  117. BFI_MC_NBOOT = 26, /*!< Network Boot */
  118. BFI_MC_TIO_READ = 27, /*!< read IO (Target mode) */
  119. BFI_MC_TIO_WRITE = 28, /*!< write IO (Target mode) */
  120. BFI_MC_TIO_DATA_XFERED = 29, /*!< ds transferred (target mode) */
  121. BFI_MC_TIO_IO = 30, /*!< IO (Target mode) */
  122. BFI_MC_TIO = 31, /*!< IO (target mode) */
  123. BFI_MC_MFG = 32, /*!< MFG/ASIC block commands */
  124. BFI_MC_EDMA = 33, /*!< EDMA copy commands */
  125. BFI_MC_MAX = 34
  126. };
  127. #define BFI_IOC_MSGLEN_MAX 32 /* 32 bytes */
  128. #define BFI_FWBOOT_ENV_OS 0
  129. /*----------------------------------------------------------------------
  130. * IOC
  131. *----------------------------------------------------------------------
  132. */
  133. /* Different asic generations */
  134. enum bfi_asic_gen {
  135. BFI_ASIC_GEN_CB = 1,
  136. BFI_ASIC_GEN_CT = 2,
  137. BFI_ASIC_GEN_CT2 = 3,
  138. };
  139. enum bfi_asic_mode {
  140. BFI_ASIC_MODE_FC = 1, /* FC upto 8G speed */
  141. BFI_ASIC_MODE_FC16 = 2, /* FC upto 16G speed */
  142. BFI_ASIC_MODE_ETH = 3, /* Ethernet ports */
  143. BFI_ASIC_MODE_COMBO = 4, /* FC 16G and Ethernet 10G port */
  144. };
  145. enum bfi_ioc_h2i_msgs {
  146. BFI_IOC_H2I_ENABLE_REQ = 1,
  147. BFI_IOC_H2I_DISABLE_REQ = 2,
  148. BFI_IOC_H2I_GETATTR_REQ = 3,
  149. BFI_IOC_H2I_DBG_SYNC = 4,
  150. BFI_IOC_H2I_DBG_DUMP = 5,
  151. };
  152. enum bfi_ioc_i2h_msgs {
  153. BFI_IOC_I2H_ENABLE_REPLY = BFA_I2HM(1),
  154. BFI_IOC_I2H_DISABLE_REPLY = BFA_I2HM(2),
  155. BFI_IOC_I2H_GETATTR_REPLY = BFA_I2HM(3),
  156. BFI_IOC_I2H_HBEAT = BFA_I2HM(4),
  157. };
  158. /* BFI_IOC_H2I_GETATTR_REQ message */
  159. struct bfi_ioc_getattr_req {
  160. struct bfi_mhdr mh;
  161. union bfi_addr_u attr_addr;
  162. };
  163. struct bfi_ioc_attr {
  164. u64 mfg_pwwn; /*!< Mfg port wwn */
  165. u64 mfg_nwwn; /*!< Mfg node wwn */
  166. mac_t mfg_mac; /*!< Mfg mac */
  167. u8 port_mode; /* enum bfi_port_mode */
  168. u8 rsvd_a;
  169. u64 pwwn;
  170. u64 nwwn;
  171. mac_t mac; /*!< PBC or Mfg mac */
  172. u16 rsvd_b;
  173. mac_t fcoe_mac;
  174. u16 rsvd_c;
  175. char brcd_serialnum[STRSZ(BFA_MFG_SERIALNUM_SIZE)];
  176. u8 pcie_gen;
  177. u8 pcie_lanes_orig;
  178. u8 pcie_lanes;
  179. u8 rx_bbcredit; /*!< receive buffer credits */
  180. u32 adapter_prop; /*!< adapter properties */
  181. u16 maxfrsize; /*!< max receive frame size */
  182. char asic_rev;
  183. u8 rsvd_d;
  184. char fw_version[BFA_VERSION_LEN];
  185. char optrom_version[BFA_VERSION_LEN];
  186. struct bfa_mfg_vpd vpd;
  187. u32 card_type; /*!< card type */
  188. };
  189. /* BFI_IOC_I2H_GETATTR_REPLY message */
  190. struct bfi_ioc_getattr_reply {
  191. struct bfi_mhdr mh; /*!< Common msg header */
  192. u8 status; /*!< cfg reply status */
  193. u8 rsvd[3];
  194. };
  195. /* Firmware memory page offsets */
  196. #define BFI_IOC_SMEM_PG0_CB (0x40)
  197. #define BFI_IOC_SMEM_PG0_CT (0x180)
  198. /* Firmware statistic offset */
  199. #define BFI_IOC_FWSTATS_OFF (0x6B40)
  200. #define BFI_IOC_FWSTATS_SZ (4096)
  201. /* Firmware trace offset */
  202. #define BFI_IOC_TRC_OFF (0x4b00)
  203. #define BFI_IOC_TRC_ENTS 256
  204. #define BFI_IOC_TRC_ENT_SZ 16
  205. #define BFI_IOC_TRC_HDR_SZ 32
  206. #define BFI_IOC_FW_SIGNATURE (0xbfadbfad)
  207. #define BFI_IOC_MD5SUM_SZ 4
  208. struct bfi_ioc_image_hdr {
  209. u32 signature; /*!< constant signature */
  210. u8 asic_gen; /*!< asic generation */
  211. u8 asic_mode;
  212. u8 port0_mode; /*!< device mode for port 0 */
  213. u8 port1_mode; /*!< device mode for port 1 */
  214. u32 exec; /*!< exec vector */
  215. u32 bootenv; /*!< firmware boot env */
  216. u32 rsvd_b[4];
  217. u32 md5sum[BFI_IOC_MD5SUM_SZ];
  218. };
  219. #define BFI_FWBOOT_DEVMODE_OFF 4
  220. #define BFI_FWBOOT_TYPE_OFF 8
  221. #define BFI_FWBOOT_ENV_OFF 12
  222. #define BFI_FWBOOT_DEVMODE(__asic_gen, __asic_mode, __p0_mode, __p1_mode) \
  223. (((u32)(__asic_gen)) << 24 | \
  224. ((u32)(__asic_mode)) << 16 | \
  225. ((u32)(__p0_mode)) << 8 | \
  226. ((u32)(__p1_mode)))
  227. enum bfi_fwboot_type {
  228. BFI_FWBOOT_TYPE_NORMAL = 0,
  229. BFI_FWBOOT_TYPE_FLASH = 1,
  230. BFI_FWBOOT_TYPE_MEMTEST = 2,
  231. };
  232. enum bfi_port_mode {
  233. BFI_PORT_MODE_FC = 1,
  234. BFI_PORT_MODE_ETH = 2,
  235. };
  236. struct bfi_ioc_hbeat {
  237. struct bfi_mhdr mh; /*!< common msg header */
  238. u32 hb_count; /*!< current heart beat count */
  239. };
  240. /* IOC hardware/firmware state */
  241. enum bfi_ioc_state {
  242. BFI_IOC_UNINIT = 0, /*!< not initialized */
  243. BFI_IOC_INITING = 1, /*!< h/w is being initialized */
  244. BFI_IOC_HWINIT = 2, /*!< h/w is initialized */
  245. BFI_IOC_CFG = 3, /*!< IOC configuration in progress */
  246. BFI_IOC_OP = 4, /*!< IOC is operational */
  247. BFI_IOC_DISABLING = 5, /*!< IOC is being disabled */
  248. BFI_IOC_DISABLED = 6, /*!< IOC is disabled */
  249. BFI_IOC_CFG_DISABLED = 7, /*!< IOC is being disabled;transient */
  250. BFI_IOC_FAIL = 8, /*!< IOC heart-beat failure */
  251. BFI_IOC_MEMTEST = 9, /*!< IOC is doing memtest */
  252. };
  253. #define BFI_IOC_ENDIAN_SIG 0x12345678
  254. enum {
  255. BFI_ADAPTER_TYPE_FC = 0x01, /*!< FC adapters */
  256. BFI_ADAPTER_TYPE_MK = 0x0f0000, /*!< adapter type mask */
  257. BFI_ADAPTER_TYPE_SH = 16, /*!< adapter type shift */
  258. BFI_ADAPTER_NPORTS_MK = 0xff00, /*!< number of ports mask */
  259. BFI_ADAPTER_NPORTS_SH = 8, /*!< number of ports shift */
  260. BFI_ADAPTER_SPEED_MK = 0xff, /*!< adapter speed mask */
  261. BFI_ADAPTER_SPEED_SH = 0, /*!< adapter speed shift */
  262. BFI_ADAPTER_PROTO = 0x100000, /*!< prototype adapaters */
  263. BFI_ADAPTER_TTV = 0x200000, /*!< TTV debug capable */
  264. BFI_ADAPTER_UNSUPP = 0x400000, /*!< unknown adapter type */
  265. };
  266. #define BFI_ADAPTER_GETP(__prop, __adap_prop) \
  267. (((__adap_prop) & BFI_ADAPTER_ ## __prop ## _MK) >> \
  268. BFI_ADAPTER_ ## __prop ## _SH)
  269. #define BFI_ADAPTER_SETP(__prop, __val) \
  270. ((__val) << BFI_ADAPTER_ ## __prop ## _SH)
  271. #define BFI_ADAPTER_IS_PROTO(__adap_type) \
  272. ((__adap_type) & BFI_ADAPTER_PROTO)
  273. #define BFI_ADAPTER_IS_TTV(__adap_type) \
  274. ((__adap_type) & BFI_ADAPTER_TTV)
  275. #define BFI_ADAPTER_IS_UNSUPP(__adap_type) \
  276. ((__adap_type) & BFI_ADAPTER_UNSUPP)
  277. #define BFI_ADAPTER_IS_SPECIAL(__adap_type) \
  278. ((__adap_type) & (BFI_ADAPTER_TTV | BFI_ADAPTER_PROTO | \
  279. BFI_ADAPTER_UNSUPP))
  280. /* BFI_IOC_H2I_ENABLE_REQ & BFI_IOC_H2I_DISABLE_REQ messages */
  281. struct bfi_ioc_ctrl_req {
  282. struct bfi_mhdr mh;
  283. u16 clscode;
  284. u16 rsvd;
  285. u32 tv_sec;
  286. };
  287. /* BFI_IOC_I2H_ENABLE_REPLY & BFI_IOC_I2H_DISABLE_REPLY messages */
  288. struct bfi_ioc_ctrl_reply {
  289. struct bfi_mhdr mh; /*!< Common msg header */
  290. u8 status; /*!< enable/disable status */
  291. u8 port_mode; /*!< enum bfa_mode */
  292. u8 cap_bm; /*!< capability bit mask */
  293. u8 rsvd;
  294. };
  295. #define BFI_IOC_MSGSZ 8
  296. /* H2I Messages */
  297. union bfi_ioc_h2i_msg_u {
  298. struct bfi_mhdr mh;
  299. struct bfi_ioc_ctrl_req enable_req;
  300. struct bfi_ioc_ctrl_req disable_req;
  301. struct bfi_ioc_getattr_req getattr_req;
  302. u32 mboxmsg[BFI_IOC_MSGSZ];
  303. };
  304. /* I2H Messages */
  305. union bfi_ioc_i2h_msg_u {
  306. struct bfi_mhdr mh;
  307. struct bfi_ioc_ctrl_reply fw_event;
  308. u32 mboxmsg[BFI_IOC_MSGSZ];
  309. };
  310. /*----------------------------------------------------------------------
  311. * MSGQ
  312. *----------------------------------------------------------------------
  313. */
  314. enum bfi_msgq_h2i_msgs {
  315. BFI_MSGQ_H2I_INIT_REQ = 1,
  316. BFI_MSGQ_H2I_DOORBELL_PI = 2,
  317. BFI_MSGQ_H2I_DOORBELL_CI = 3,
  318. BFI_MSGQ_H2I_CMDQ_COPY_RSP = 4,
  319. };
  320. enum bfi_msgq_i2h_msgs {
  321. BFI_MSGQ_I2H_INIT_RSP = BFA_I2HM(BFI_MSGQ_H2I_INIT_REQ),
  322. BFI_MSGQ_I2H_DOORBELL_PI = BFA_I2HM(BFI_MSGQ_H2I_DOORBELL_PI),
  323. BFI_MSGQ_I2H_DOORBELL_CI = BFA_I2HM(BFI_MSGQ_H2I_DOORBELL_CI),
  324. BFI_MSGQ_I2H_CMDQ_COPY_REQ = BFA_I2HM(BFI_MSGQ_H2I_CMDQ_COPY_RSP),
  325. };
  326. /* Messages(commands/responsed/AENS will have the following header */
  327. struct bfi_msgq_mhdr {
  328. u8 msg_class;
  329. u8 msg_id;
  330. u16 msg_token;
  331. u16 num_entries;
  332. u8 enet_id;
  333. u8 rsvd[1];
  334. };
  335. #define bfi_msgq_mhdr_set(_mh, _mc, _mid, _tok, _enet_id) do { \
  336. (_mh).msg_class = (_mc); \
  337. (_mh).msg_id = (_mid); \
  338. (_mh).msg_token = (_tok); \
  339. (_mh).enet_id = (_enet_id); \
  340. } while (0)
  341. /*
  342. * Mailbox for messaging interface
  343. */
  344. #define BFI_MSGQ_CMD_ENTRY_SIZE (64) /* TBD */
  345. #define BFI_MSGQ_RSP_ENTRY_SIZE (64) /* TBD */
  346. #define bfi_msgq_num_cmd_entries(_size) \
  347. (((_size) + BFI_MSGQ_CMD_ENTRY_SIZE - 1) / BFI_MSGQ_CMD_ENTRY_SIZE)
  348. struct bfi_msgq {
  349. union bfi_addr_u addr;
  350. u16 q_depth; /* Total num of entries in the queue */
  351. u8 rsvd[2];
  352. };
  353. /* BFI_ENET_MSGQ_CFG_REQ TBD init or cfg? */
  354. struct bfi_msgq_cfg_req {
  355. struct bfi_mhdr mh;
  356. struct bfi_msgq cmdq;
  357. struct bfi_msgq rspq;
  358. };
  359. /* BFI_ENET_MSGQ_CFG_RSP */
  360. struct bfi_msgq_cfg_rsp {
  361. struct bfi_mhdr mh;
  362. u8 cmd_status;
  363. u8 rsvd[3];
  364. };
  365. /* BFI_MSGQ_H2I_DOORBELL */
  366. struct bfi_msgq_h2i_db {
  367. struct bfi_mhdr mh;
  368. union {
  369. u16 cmdq_pi;
  370. u16 rspq_ci;
  371. } idx;
  372. };
  373. /* BFI_MSGQ_I2H_DOORBELL */
  374. struct bfi_msgq_i2h_db {
  375. struct bfi_mhdr mh;
  376. union {
  377. u16 rspq_pi;
  378. u16 cmdq_ci;
  379. } idx;
  380. };
  381. #define BFI_CMD_COPY_SZ 28
  382. /* BFI_MSGQ_H2I_CMD_COPY_RSP */
  383. struct bfi_msgq_h2i_cmdq_copy_rsp {
  384. struct bfi_mhdr mh;
  385. u8 data[BFI_CMD_COPY_SZ];
  386. };
  387. /* BFI_MSGQ_I2H_CMD_COPY_REQ */
  388. struct bfi_msgq_i2h_cmdq_copy_req {
  389. struct bfi_mhdr mh;
  390. u16 offset;
  391. u16 len;
  392. };
  393. /*
  394. * FLASH module specific
  395. */
  396. enum bfi_flash_h2i_msgs {
  397. BFI_FLASH_H2I_QUERY_REQ = 1,
  398. BFI_FLASH_H2I_ERASE_REQ = 2,
  399. BFI_FLASH_H2I_WRITE_REQ = 3,
  400. BFI_FLASH_H2I_READ_REQ = 4,
  401. BFI_FLASH_H2I_BOOT_VER_REQ = 5,
  402. };
  403. enum bfi_flash_i2h_msgs {
  404. BFI_FLASH_I2H_QUERY_RSP = BFA_I2HM(1),
  405. BFI_FLASH_I2H_ERASE_RSP = BFA_I2HM(2),
  406. BFI_FLASH_I2H_WRITE_RSP = BFA_I2HM(3),
  407. BFI_FLASH_I2H_READ_RSP = BFA_I2HM(4),
  408. BFI_FLASH_I2H_BOOT_VER_RSP = BFA_I2HM(5),
  409. BFI_FLASH_I2H_EVENT = BFA_I2HM(127),
  410. };
  411. /*
  412. * Flash query request
  413. */
  414. struct bfi_flash_query_req {
  415. struct bfi_mhdr mh; /* Common msg header */
  416. struct bfi_alen alen;
  417. };
  418. /*
  419. * Flash write request
  420. */
  421. struct bfi_flash_write_req {
  422. struct bfi_mhdr mh; /* Common msg header */
  423. struct bfi_alen alen;
  424. u32 type; /* partition type */
  425. u8 instance; /* partition instance */
  426. u8 last;
  427. u8 rsv[2];
  428. u32 offset;
  429. u32 length;
  430. };
  431. /*
  432. * Flash read request
  433. */
  434. struct bfi_flash_read_req {
  435. struct bfi_mhdr mh; /* Common msg header */
  436. u32 type; /* partition type */
  437. u8 instance; /* partition instance */
  438. u8 rsv[3];
  439. u32 offset;
  440. u32 length;
  441. struct bfi_alen alen;
  442. };
  443. /*
  444. * Flash query response
  445. */
  446. struct bfi_flash_query_rsp {
  447. struct bfi_mhdr mh; /* Common msg header */
  448. u32 status;
  449. };
  450. /*
  451. * Flash read response
  452. */
  453. struct bfi_flash_read_rsp {
  454. struct bfi_mhdr mh; /* Common msg header */
  455. u32 type; /* partition type */
  456. u8 instance; /* partition instance */
  457. u8 rsv[3];
  458. u32 status;
  459. u32 length;
  460. };
  461. /*
  462. * Flash write response
  463. */
  464. struct bfi_flash_write_rsp {
  465. struct bfi_mhdr mh; /* Common msg header */
  466. u32 type; /* partition type */
  467. u8 instance; /* partition instance */
  468. u8 rsv[3];
  469. u32 status;
  470. u32 length;
  471. };
  472. #pragma pack()
  473. #endif /* __BFI_H__ */