mic_x100.c 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582
  1. /*
  2. * Intel MIC Platform Software Stack (MPSS)
  3. *
  4. * Copyright(c) 2013 Intel Corporation.
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License, version 2, as
  8. * published by the Free Software Foundation.
  9. *
  10. * This program is distributed in the hope that it will be useful, but
  11. * WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  13. * General Public License for more details.
  14. *
  15. * The full GNU General Public License is included in this distribution in
  16. * the file called "COPYING".
  17. *
  18. * Intel MIC Host driver.
  19. *
  20. */
  21. #include <linux/fs.h>
  22. #include <linux/pci.h>
  23. #include <linux/sched.h>
  24. #include <linux/firmware.h>
  25. #include <linux/delay.h>
  26. #include "../common/mic_dev.h"
  27. #include "mic_device.h"
  28. #include "mic_x100.h"
  29. #include "mic_smpt.h"
  30. /**
  31. * mic_x100_write_spad - write to the scratchpad register
  32. * @mdev: pointer to mic_device instance
  33. * @idx: index to the scratchpad register, 0 based
  34. * @val: the data value to put into the register
  35. *
  36. * This function allows writing of a 32bit value to the indexed scratchpad
  37. * register.
  38. *
  39. * RETURNS: none.
  40. */
  41. static void
  42. mic_x100_write_spad(struct mic_device *mdev, unsigned int idx, u32 val)
  43. {
  44. dev_dbg(mdev->sdev->parent, "Writing 0x%x to scratch pad index %d\n",
  45. val, idx);
  46. mic_mmio_write(&mdev->mmio, val,
  47. MIC_X100_SBOX_BASE_ADDRESS +
  48. MIC_X100_SBOX_SPAD0 + idx * 4);
  49. }
  50. /**
  51. * mic_x100_read_spad - read from the scratchpad register
  52. * @mdev: pointer to mic_device instance
  53. * @idx: index to scratchpad register, 0 based
  54. *
  55. * This function allows reading of the 32bit scratchpad register.
  56. *
  57. * RETURNS: An appropriate -ERRNO error value on error, or zero for success.
  58. */
  59. static u32
  60. mic_x100_read_spad(struct mic_device *mdev, unsigned int idx)
  61. {
  62. u32 val = mic_mmio_read(&mdev->mmio,
  63. MIC_X100_SBOX_BASE_ADDRESS +
  64. MIC_X100_SBOX_SPAD0 + idx * 4);
  65. dev_dbg(mdev->sdev->parent,
  66. "Reading 0x%x from scratch pad index %d\n", val, idx);
  67. return val;
  68. }
  69. /**
  70. * mic_x100_enable_interrupts - Enable interrupts.
  71. * @mdev: pointer to mic_device instance
  72. */
  73. static void mic_x100_enable_interrupts(struct mic_device *mdev)
  74. {
  75. u32 reg;
  76. struct mic_mw *mw = &mdev->mmio;
  77. u32 sice0 = MIC_X100_SBOX_BASE_ADDRESS + MIC_X100_SBOX_SICE0;
  78. u32 siac0 = MIC_X100_SBOX_BASE_ADDRESS + MIC_X100_SBOX_SIAC0;
  79. reg = mic_mmio_read(mw, sice0);
  80. reg |= MIC_X100_SBOX_DBR_BITS(0xf) | MIC_X100_SBOX_DMA_BITS(0xff);
  81. mic_mmio_write(mw, reg, sice0);
  82. /*
  83. * Enable auto-clear when enabling interrupts. Applicable only for
  84. * MSI-x. Legacy and MSI mode cannot have auto-clear enabled.
  85. */
  86. if (mdev->irq_info.num_vectors > 1) {
  87. reg = mic_mmio_read(mw, siac0);
  88. reg |= MIC_X100_SBOX_DBR_BITS(0xf) |
  89. MIC_X100_SBOX_DMA_BITS(0xff);
  90. mic_mmio_write(mw, reg, siac0);
  91. }
  92. }
  93. /**
  94. * mic_x100_disable_interrupts - Disable interrupts.
  95. * @mdev: pointer to mic_device instance
  96. */
  97. static void mic_x100_disable_interrupts(struct mic_device *mdev)
  98. {
  99. u32 reg;
  100. struct mic_mw *mw = &mdev->mmio;
  101. u32 sice0 = MIC_X100_SBOX_BASE_ADDRESS + MIC_X100_SBOX_SICE0;
  102. u32 siac0 = MIC_X100_SBOX_BASE_ADDRESS + MIC_X100_SBOX_SIAC0;
  103. u32 sicc0 = MIC_X100_SBOX_BASE_ADDRESS + MIC_X100_SBOX_SICC0;
  104. reg = mic_mmio_read(mw, sice0);
  105. mic_mmio_write(mw, reg, sicc0);
  106. if (mdev->irq_info.num_vectors > 1) {
  107. reg = mic_mmio_read(mw, siac0);
  108. reg &= ~(MIC_X100_SBOX_DBR_BITS(0xf) |
  109. MIC_X100_SBOX_DMA_BITS(0xff));
  110. mic_mmio_write(mw, reg, siac0);
  111. }
  112. }
  113. /**
  114. * mic_x100_send_sbox_intr - Send an MIC_X100_SBOX interrupt to MIC.
  115. * @mdev: pointer to mic_device instance
  116. */
  117. static void mic_x100_send_sbox_intr(struct mic_device *mdev,
  118. int doorbell)
  119. {
  120. struct mic_mw *mw = &mdev->mmio;
  121. u64 apic_icr_offset = MIC_X100_SBOX_APICICR0 + doorbell * 8;
  122. u32 apicicr_low = mic_mmio_read(mw, MIC_X100_SBOX_BASE_ADDRESS +
  123. apic_icr_offset);
  124. /* for MIC we need to make sure we "hit" the send_icr bit (13) */
  125. apicicr_low = (apicicr_low | (1 << 13));
  126. /* Ensure that the interrupt is ordered w.r.t. previous stores. */
  127. wmb();
  128. mic_mmio_write(mw, apicicr_low,
  129. MIC_X100_SBOX_BASE_ADDRESS + apic_icr_offset);
  130. }
  131. /**
  132. * mic_x100_send_rdmasr_intr - Send an RDMASR interrupt to MIC.
  133. * @mdev: pointer to mic_device instance
  134. */
  135. static void mic_x100_send_rdmasr_intr(struct mic_device *mdev,
  136. int doorbell)
  137. {
  138. int rdmasr_offset = MIC_X100_SBOX_RDMASR0 + (doorbell << 2);
  139. /* Ensure that the interrupt is ordered w.r.t. previous stores. */
  140. wmb();
  141. mic_mmio_write(&mdev->mmio, 0,
  142. MIC_X100_SBOX_BASE_ADDRESS + rdmasr_offset);
  143. }
  144. /**
  145. * __mic_x100_send_intr - Send interrupt to MIC.
  146. * @mdev: pointer to mic_device instance
  147. * @doorbell: doorbell number.
  148. */
  149. static void mic_x100_send_intr(struct mic_device *mdev, int doorbell)
  150. {
  151. int rdmasr_db;
  152. if (doorbell < MIC_X100_NUM_SBOX_IRQ) {
  153. mic_x100_send_sbox_intr(mdev, doorbell);
  154. } else {
  155. rdmasr_db = doorbell - MIC_X100_NUM_SBOX_IRQ +
  156. MIC_X100_RDMASR_IRQ_BASE;
  157. mic_x100_send_rdmasr_intr(mdev, rdmasr_db);
  158. }
  159. }
  160. /**
  161. * mic_x100_ack_interrupt - Read the interrupt sources register and
  162. * clear it. This function will be called in the MSI/INTx case.
  163. * @mdev: Pointer to mic_device instance.
  164. *
  165. * Returns: bitmask of interrupt sources triggered.
  166. */
  167. static u32 mic_x100_ack_interrupt(struct mic_device *mdev)
  168. {
  169. u32 sicr0 = MIC_X100_SBOX_BASE_ADDRESS + MIC_X100_SBOX_SICR0;
  170. u32 reg = mic_mmio_read(&mdev->mmio, sicr0);
  171. mic_mmio_write(&mdev->mmio, reg, sicr0);
  172. return reg;
  173. }
  174. /**
  175. * mic_x100_intr_workarounds - These hardware specific workarounds are
  176. * to be invoked everytime an interrupt is handled.
  177. * @mdev: Pointer to mic_device instance.
  178. *
  179. * Returns: none
  180. */
  181. static void mic_x100_intr_workarounds(struct mic_device *mdev)
  182. {
  183. struct mic_mw *mw = &mdev->mmio;
  184. /* Clear pending bit array. */
  185. if (MIC_A0_STEP == mdev->stepping)
  186. mic_mmio_write(mw, 1, MIC_X100_SBOX_BASE_ADDRESS +
  187. MIC_X100_SBOX_MSIXPBACR);
  188. if (mdev->stepping >= MIC_B0_STEP)
  189. mdev->intr_ops->enable_interrupts(mdev);
  190. }
  191. /**
  192. * mic_x100_hw_intr_init - Initialize h/w specific interrupt
  193. * information.
  194. * @mdev: pointer to mic_device instance
  195. */
  196. static void mic_x100_hw_intr_init(struct mic_device *mdev)
  197. {
  198. mdev->intr_info = (struct mic_intr_info *)mic_x100_intr_init;
  199. }
  200. /**
  201. * mic_x100_read_msi_to_src_map - read from the MSI mapping registers
  202. * @mdev: pointer to mic_device instance
  203. * @idx: index to the mapping register, 0 based
  204. *
  205. * This function allows reading of the 32bit MSI mapping register.
  206. *
  207. * RETURNS: The value in the register.
  208. */
  209. static u32
  210. mic_x100_read_msi_to_src_map(struct mic_device *mdev, int idx)
  211. {
  212. return mic_mmio_read(&mdev->mmio,
  213. MIC_X100_SBOX_BASE_ADDRESS +
  214. MIC_X100_SBOX_MXAR0 + idx * 4);
  215. }
  216. /**
  217. * mic_x100_program_msi_to_src_map - program the MSI mapping registers
  218. * @mdev: pointer to mic_device instance
  219. * @idx: index to the mapping register, 0 based
  220. * @offset: The bit offset in the register that needs to be updated.
  221. * @set: boolean specifying if the bit in the specified offset needs
  222. * to be set or cleared.
  223. *
  224. * RETURNS: None.
  225. */
  226. static void
  227. mic_x100_program_msi_to_src_map(struct mic_device *mdev,
  228. int idx, int offset, bool set)
  229. {
  230. unsigned long reg;
  231. struct mic_mw *mw = &mdev->mmio;
  232. u32 mxar = MIC_X100_SBOX_BASE_ADDRESS +
  233. MIC_X100_SBOX_MXAR0 + idx * 4;
  234. reg = mic_mmio_read(mw, mxar);
  235. if (set)
  236. __set_bit(offset, &reg);
  237. else
  238. __clear_bit(offset, &reg);
  239. mic_mmio_write(mw, reg, mxar);
  240. }
  241. /*
  242. * mic_x100_reset_fw_ready - Reset Firmware ready status field.
  243. * @mdev: pointer to mic_device instance
  244. */
  245. static void mic_x100_reset_fw_ready(struct mic_device *mdev)
  246. {
  247. mdev->ops->write_spad(mdev, MIC_X100_DOWNLOAD_INFO, 0);
  248. }
  249. /*
  250. * mic_x100_is_fw_ready - Check if firmware is ready.
  251. * @mdev: pointer to mic_device instance
  252. */
  253. static bool mic_x100_is_fw_ready(struct mic_device *mdev)
  254. {
  255. u32 scratch2 = mdev->ops->read_spad(mdev, MIC_X100_DOWNLOAD_INFO);
  256. return MIC_X100_SPAD2_DOWNLOAD_STATUS(scratch2) ? true : false;
  257. }
  258. /**
  259. * mic_x100_get_apic_id - Get bootstrap APIC ID.
  260. * @mdev: pointer to mic_device instance
  261. */
  262. static u32 mic_x100_get_apic_id(struct mic_device *mdev)
  263. {
  264. u32 scratch2 = 0;
  265. scratch2 = mdev->ops->read_spad(mdev, MIC_X100_DOWNLOAD_INFO);
  266. return MIC_X100_SPAD2_APIC_ID(scratch2);
  267. }
  268. /**
  269. * mic_x100_send_firmware_intr - Send an interrupt to the firmware on MIC.
  270. * @mdev: pointer to mic_device instance
  271. */
  272. static void mic_x100_send_firmware_intr(struct mic_device *mdev)
  273. {
  274. u32 apicicr_low;
  275. u64 apic_icr_offset = MIC_X100_SBOX_APICICR7;
  276. int vector = MIC_X100_BSP_INTERRUPT_VECTOR;
  277. struct mic_mw *mw = &mdev->mmio;
  278. /*
  279. * For MIC we need to make sure we "hit"
  280. * the send_icr bit (13).
  281. */
  282. apicicr_low = (vector | (1 << 13));
  283. mic_mmio_write(mw, mic_x100_get_apic_id(mdev),
  284. MIC_X100_SBOX_BASE_ADDRESS + apic_icr_offset + 4);
  285. /* Ensure that the interrupt is ordered w.r.t. previous stores. */
  286. wmb();
  287. mic_mmio_write(mw, apicicr_low,
  288. MIC_X100_SBOX_BASE_ADDRESS + apic_icr_offset);
  289. }
  290. /**
  291. * mic_x100_hw_reset - Reset the MIC device.
  292. * @mdev: pointer to mic_device instance
  293. */
  294. static void mic_x100_hw_reset(struct mic_device *mdev)
  295. {
  296. u32 reset_reg;
  297. u32 rgcr = MIC_X100_SBOX_BASE_ADDRESS + MIC_X100_SBOX_RGCR;
  298. struct mic_mw *mw = &mdev->mmio;
  299. /* Ensure that the reset is ordered w.r.t. previous loads and stores */
  300. mb();
  301. /* Trigger reset */
  302. reset_reg = mic_mmio_read(mw, rgcr);
  303. reset_reg |= 0x1;
  304. mic_mmio_write(mw, reset_reg, rgcr);
  305. /*
  306. * It seems we really want to delay at least 1 second
  307. * after touching reset to prevent a lot of problems.
  308. */
  309. msleep(1000);
  310. }
  311. /**
  312. * mic_x100_load_command_line - Load command line to MIC.
  313. * @mdev: pointer to mic_device instance
  314. * @fw: the firmware image
  315. *
  316. * RETURNS: An appropriate -ERRNO error value on error, or zero for success.
  317. */
  318. static int
  319. mic_x100_load_command_line(struct mic_device *mdev, const struct firmware *fw)
  320. {
  321. u32 len = 0;
  322. u32 boot_mem;
  323. char *buf;
  324. void __iomem *cmd_line_va = mdev->aper.va + mdev->bootaddr + fw->size;
  325. #define CMDLINE_SIZE 2048
  326. boot_mem = mdev->aper.len >> 20;
  327. buf = kzalloc(CMDLINE_SIZE, GFP_KERNEL);
  328. if (!buf) {
  329. dev_err(mdev->sdev->parent,
  330. "%s %d allocation failed\n", __func__, __LINE__);
  331. return -ENOMEM;
  332. }
  333. len += snprintf(buf, CMDLINE_SIZE - len,
  334. " mem=%dM", boot_mem);
  335. if (mdev->cmdline)
  336. snprintf(buf + len, CMDLINE_SIZE - len, " %s", mdev->cmdline);
  337. memcpy_toio(cmd_line_va, buf, strlen(buf) + 1);
  338. kfree(buf);
  339. return 0;
  340. }
  341. /**
  342. * mic_x100_load_ramdisk - Load ramdisk to MIC.
  343. * @mdev: pointer to mic_device instance
  344. *
  345. * RETURNS: An appropriate -ERRNO error value on error, or zero for success.
  346. */
  347. static int
  348. mic_x100_load_ramdisk(struct mic_device *mdev)
  349. {
  350. const struct firmware *fw;
  351. int rc;
  352. struct boot_params __iomem *bp = mdev->aper.va + mdev->bootaddr;
  353. rc = request_firmware(&fw,
  354. mdev->ramdisk, mdev->sdev->parent);
  355. if (rc < 0) {
  356. dev_err(mdev->sdev->parent,
  357. "ramdisk request_firmware failed: %d %s\n",
  358. rc, mdev->ramdisk);
  359. goto error;
  360. }
  361. /*
  362. * Typically the bootaddr for card OS is 64M
  363. * so copy over the ramdisk @ 128M.
  364. */
  365. memcpy_toio(mdev->aper.va + (mdev->bootaddr << 1), fw->data, fw->size);
  366. iowrite32(mdev->bootaddr << 1, &bp->hdr.ramdisk_image);
  367. iowrite32(fw->size, &bp->hdr.ramdisk_size);
  368. release_firmware(fw);
  369. error:
  370. return rc;
  371. }
  372. /**
  373. * mic_x100_get_boot_addr - Get MIC boot address.
  374. * @mdev: pointer to mic_device instance
  375. *
  376. * This function is called during firmware load to determine
  377. * the address at which the OS should be downloaded in card
  378. * memory i.e. GDDR.
  379. * RETURNS: An appropriate -ERRNO error value on error, or zero for success.
  380. */
  381. static int
  382. mic_x100_get_boot_addr(struct mic_device *mdev)
  383. {
  384. u32 scratch2, boot_addr;
  385. int rc = 0;
  386. scratch2 = mdev->ops->read_spad(mdev, MIC_X100_DOWNLOAD_INFO);
  387. boot_addr = MIC_X100_SPAD2_DOWNLOAD_ADDR(scratch2);
  388. dev_dbg(mdev->sdev->parent, "%s %d boot_addr 0x%x\n",
  389. __func__, __LINE__, boot_addr);
  390. if (boot_addr > (1 << 31)) {
  391. dev_err(mdev->sdev->parent,
  392. "incorrect bootaddr 0x%x\n",
  393. boot_addr);
  394. rc = -EINVAL;
  395. goto error;
  396. }
  397. mdev->bootaddr = boot_addr;
  398. error:
  399. return rc;
  400. }
  401. /**
  402. * mic_x100_load_firmware - Load firmware to MIC.
  403. * @mdev: pointer to mic_device instance
  404. * @buf: buffer containing boot string including firmware/ramdisk path.
  405. *
  406. * RETURNS: An appropriate -ERRNO error value on error, or zero for success.
  407. */
  408. static int
  409. mic_x100_load_firmware(struct mic_device *mdev, const char *buf)
  410. {
  411. int rc;
  412. const struct firmware *fw;
  413. rc = mic_x100_get_boot_addr(mdev);
  414. if (rc)
  415. goto error;
  416. /* load OS */
  417. rc = request_firmware(&fw, mdev->firmware, mdev->sdev->parent);
  418. if (rc < 0) {
  419. dev_err(mdev->sdev->parent,
  420. "ramdisk request_firmware failed: %d %s\n",
  421. rc, mdev->firmware);
  422. goto error;
  423. }
  424. if (mdev->bootaddr > mdev->aper.len - fw->size) {
  425. rc = -EINVAL;
  426. dev_err(mdev->sdev->parent, "%s %d rc %d bootaddr 0x%x\n",
  427. __func__, __LINE__, rc, mdev->bootaddr);
  428. release_firmware(fw);
  429. goto error;
  430. }
  431. memcpy_toio(mdev->aper.va + mdev->bootaddr, fw->data, fw->size);
  432. mdev->ops->write_spad(mdev, MIC_X100_FW_SIZE, fw->size);
  433. if (!strcmp(mdev->bootmode, "elf"))
  434. goto done;
  435. /* load command line */
  436. rc = mic_x100_load_command_line(mdev, fw);
  437. if (rc) {
  438. dev_err(mdev->sdev->parent, "%s %d rc %d\n",
  439. __func__, __LINE__, rc);
  440. goto error;
  441. }
  442. release_firmware(fw);
  443. /* load ramdisk */
  444. if (mdev->ramdisk)
  445. rc = mic_x100_load_ramdisk(mdev);
  446. error:
  447. dev_dbg(mdev->sdev->parent, "%s %d rc %d\n", __func__, __LINE__, rc);
  448. done:
  449. return rc;
  450. }
  451. /**
  452. * mic_x100_get_postcode - Get postcode status from firmware.
  453. * @mdev: pointer to mic_device instance
  454. *
  455. * RETURNS: postcode.
  456. */
  457. static u32 mic_x100_get_postcode(struct mic_device *mdev)
  458. {
  459. return mic_mmio_read(&mdev->mmio, MIC_X100_POSTCODE);
  460. }
  461. /**
  462. * mic_x100_smpt_set - Update an SMPT entry with a DMA address.
  463. * @mdev: pointer to mic_device instance
  464. *
  465. * RETURNS: none.
  466. */
  467. static void
  468. mic_x100_smpt_set(struct mic_device *mdev, dma_addr_t dma_addr, u8 index)
  469. {
  470. #define SNOOP_ON (0 << 0)
  471. #define SNOOP_OFF (1 << 0)
  472. /*
  473. * Sbox Smpt Reg Bits:
  474. * Bits 31:2 Host address
  475. * Bits 1 RSVD
  476. * Bits 0 No snoop
  477. */
  478. #define BUILD_SMPT(NO_SNOOP, HOST_ADDR) \
  479. (u32)(((HOST_ADDR) << 2) | ((NO_SNOOP) & 0x01))
  480. uint32_t smpt_reg_val = BUILD_SMPT(SNOOP_ON,
  481. dma_addr >> mdev->smpt->info.page_shift);
  482. mic_mmio_write(&mdev->mmio, smpt_reg_val,
  483. MIC_X100_SBOX_BASE_ADDRESS +
  484. MIC_X100_SBOX_SMPT00 + (4 * index));
  485. }
  486. /**
  487. * mic_x100_smpt_hw_init - Initialize SMPT X100 specific fields.
  488. * @mdev: pointer to mic_device instance
  489. *
  490. * RETURNS: none.
  491. */
  492. static void mic_x100_smpt_hw_init(struct mic_device *mdev)
  493. {
  494. struct mic_smpt_hw_info *info = &mdev->smpt->info;
  495. info->num_reg = 32;
  496. info->page_shift = 34;
  497. info->page_size = (1ULL << info->page_shift);
  498. info->base = 0x8000000000ULL;
  499. }
  500. struct mic_smpt_ops mic_x100_smpt_ops = {
  501. .init = mic_x100_smpt_hw_init,
  502. .set = mic_x100_smpt_set,
  503. };
  504. static bool mic_x100_dma_filter(struct dma_chan *chan, void *param)
  505. {
  506. if (chan->device->dev->parent == (struct device *)param)
  507. return true;
  508. return false;
  509. }
  510. struct mic_hw_ops mic_x100_ops = {
  511. .aper_bar = MIC_X100_APER_BAR,
  512. .mmio_bar = MIC_X100_MMIO_BAR,
  513. .read_spad = mic_x100_read_spad,
  514. .write_spad = mic_x100_write_spad,
  515. .send_intr = mic_x100_send_intr,
  516. .ack_interrupt = mic_x100_ack_interrupt,
  517. .intr_workarounds = mic_x100_intr_workarounds,
  518. .reset = mic_x100_hw_reset,
  519. .reset_fw_ready = mic_x100_reset_fw_ready,
  520. .is_fw_ready = mic_x100_is_fw_ready,
  521. .send_firmware_intr = mic_x100_send_firmware_intr,
  522. .load_mic_fw = mic_x100_load_firmware,
  523. .get_postcode = mic_x100_get_postcode,
  524. .dma_filter = mic_x100_dma_filter,
  525. };
  526. struct mic_hw_intr_ops mic_x100_intr_ops = {
  527. .intr_init = mic_x100_hw_intr_init,
  528. .enable_interrupts = mic_x100_enable_interrupts,
  529. .disable_interrupts = mic_x100_disable_interrupts,
  530. .program_msi_to_src_map = mic_x100_program_msi_to_src_map,
  531. .read_msi_to_src_map = mic_x100_read_msi_to_src_map,
  532. };