vxp_ops.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603
  1. // SPDX-License-Identifier: GPL-2.0-or-later
  2. /*
  3. * Driver for Digigram VXpocket soundcards
  4. *
  5. * lowlevel routines for VXpocket soundcards
  6. *
  7. * Copyright (c) 2002 by Takashi Iwai <tiwai@suse.de>
  8. */
  9. #include <linux/delay.h>
  10. #include <linux/device.h>
  11. #include <linux/firmware.h>
  12. #include <linux/io.h>
  13. #include <sound/core.h>
  14. #include "vxpocket.h"
  15. static const int vxp_reg_offset[VX_REG_MAX] = {
  16. [VX_ICR] = 0x00, // ICR
  17. [VX_CVR] = 0x01, // CVR
  18. [VX_ISR] = 0x02, // ISR
  19. [VX_IVR] = 0x03, // IVR
  20. [VX_RXH] = 0x05, // RXH
  21. [VX_RXM] = 0x06, // RXM
  22. [VX_RXL] = 0x07, // RXL
  23. [VX_DMA] = 0x04, // DMA
  24. [VX_CDSP] = 0x08, // CDSP
  25. [VX_LOFREQ] = 0x09, // LFREQ
  26. [VX_HIFREQ] = 0x0a, // HFREQ
  27. [VX_DATA] = 0x0b, // DATA
  28. [VX_MICRO] = 0x0c, // MICRO
  29. [VX_DIALOG] = 0x0d, // DIALOG
  30. [VX_CSUER] = 0x0e, // CSUER
  31. [VX_RUER] = 0x0f, // RUER
  32. };
  33. static inline unsigned long vxp_reg_addr(struct vx_core *_chip, int reg)
  34. {
  35. struct snd_vxpocket *chip = to_vxpocket(_chip);
  36. return chip->port + vxp_reg_offset[reg];
  37. }
  38. /*
  39. * snd_vx_inb - read a byte from the register
  40. * @offset: register offset
  41. */
  42. static unsigned char vxp_inb(struct vx_core *chip, int offset)
  43. {
  44. return inb(vxp_reg_addr(chip, offset));
  45. }
  46. /*
  47. * snd_vx_outb - write a byte on the register
  48. * @offset: the register offset
  49. * @val: the value to write
  50. */
  51. static void vxp_outb(struct vx_core *chip, int offset, unsigned char val)
  52. {
  53. outb(val, vxp_reg_addr(chip, offset));
  54. }
  55. /*
  56. * redefine macros to call directly
  57. */
  58. #undef vx_inb
  59. #define vx_inb(chip,reg) vxp_inb((struct vx_core *)(chip), VX_##reg)
  60. #undef vx_outb
  61. #define vx_outb(chip,reg,val) vxp_outb((struct vx_core *)(chip), VX_##reg,val)
  62. /*
  63. * vx_check_magic - check the magic word on xilinx
  64. *
  65. * returns zero if a magic word is detected, or a negative error code.
  66. */
  67. static int vx_check_magic(struct vx_core *chip)
  68. {
  69. unsigned long end_time = jiffies + HZ / 5;
  70. int c;
  71. do {
  72. c = vx_inb(chip, CDSP);
  73. if (c == CDSP_MAGIC)
  74. return 0;
  75. msleep(10);
  76. } while (time_after_eq(end_time, jiffies));
  77. dev_err(chip->card->dev, "cannot find xilinx magic word (%x)\n", c);
  78. return -EIO;
  79. }
  80. /*
  81. * vx_reset_dsp - reset the DSP
  82. */
  83. #define XX_DSP_RESET_WAIT_TIME 2 /* ms */
  84. static void vxp_reset_dsp(struct vx_core *_chip)
  85. {
  86. struct snd_vxpocket *chip = to_vxpocket(_chip);
  87. /* set the reset dsp bit to 1 */
  88. vx_outb(chip, CDSP, chip->regCDSP | VXP_CDSP_DSP_RESET_MASK);
  89. vx_inb(chip, CDSP);
  90. mdelay(XX_DSP_RESET_WAIT_TIME);
  91. /* reset the bit */
  92. chip->regCDSP &= ~VXP_CDSP_DSP_RESET_MASK;
  93. vx_outb(chip, CDSP, chip->regCDSP);
  94. vx_inb(chip, CDSP);
  95. mdelay(XX_DSP_RESET_WAIT_TIME);
  96. }
  97. /*
  98. * reset codec bit
  99. */
  100. static void vxp_reset_codec(struct vx_core *_chip)
  101. {
  102. struct snd_vxpocket *chip = to_vxpocket(_chip);
  103. /* Set the reset CODEC bit to 1. */
  104. vx_outb(chip, CDSP, chip->regCDSP | VXP_CDSP_CODEC_RESET_MASK);
  105. vx_inb(chip, CDSP);
  106. msleep(10);
  107. /* Set the reset CODEC bit to 0. */
  108. chip->regCDSP &= ~VXP_CDSP_CODEC_RESET_MASK;
  109. vx_outb(chip, CDSP, chip->regCDSP);
  110. vx_inb(chip, CDSP);
  111. msleep(1);
  112. }
  113. /*
  114. * vx_load_xilinx_binary - load the xilinx binary image
  115. * the binary image is the binary array converted from the bitstream file.
  116. */
  117. static int vxp_load_xilinx_binary(struct vx_core *_chip, const struct firmware *fw)
  118. {
  119. struct snd_vxpocket *chip = to_vxpocket(_chip);
  120. unsigned int i;
  121. int c;
  122. int regCSUER, regRUER;
  123. const unsigned char *image;
  124. unsigned char data;
  125. /* Switch to programmation mode */
  126. chip->regDIALOG |= VXP_DLG_XILINX_REPROG_MASK;
  127. vx_outb(chip, DIALOG, chip->regDIALOG);
  128. /* Save register CSUER and RUER */
  129. regCSUER = vx_inb(chip, CSUER);
  130. regRUER = vx_inb(chip, RUER);
  131. /* reset HF0 and HF1 */
  132. vx_outb(chip, ICR, 0);
  133. /* Wait for answer HF2 equal to 1 */
  134. if (vx_check_isr(_chip, ISR_HF2, ISR_HF2, 20) < 0)
  135. goto _error;
  136. /* set HF1 for loading xilinx binary */
  137. vx_outb(chip, ICR, ICR_HF1);
  138. image = fw->data;
  139. for (i = 0; i < fw->size; i++, image++) {
  140. data = *image;
  141. if (vx_wait_isr_bit(_chip, ISR_TX_EMPTY) < 0)
  142. goto _error;
  143. vx_outb(chip, TXL, data);
  144. /* wait for reading */
  145. if (vx_wait_for_rx_full(_chip) < 0)
  146. goto _error;
  147. c = vx_inb(chip, RXL);
  148. if (c != (int)data)
  149. dev_err(_chip->card->dev,
  150. "vxpocket: load xilinx mismatch at %d: 0x%x != 0x%x\n",
  151. i, c, (int)data);
  152. }
  153. /* reset HF1 */
  154. vx_outb(chip, ICR, 0);
  155. /* wait for HF3 */
  156. if (vx_check_isr(_chip, ISR_HF3, ISR_HF3, 20) < 0)
  157. goto _error;
  158. /* read the number of bytes received */
  159. if (vx_wait_for_rx_full(_chip) < 0)
  160. goto _error;
  161. c = (int)vx_inb(chip, RXH) << 16;
  162. c |= (int)vx_inb(chip, RXM) << 8;
  163. c |= vx_inb(chip, RXL);
  164. dev_dbg(_chip->card->dev,
  165. "xilinx: dsp size received 0x%x, orig 0x%zx\n", c, fw->size);
  166. vx_outb(chip, ICR, ICR_HF0);
  167. /* TEMPO 250ms : wait until Xilinx is downloaded */
  168. msleep(300);
  169. /* test magical word */
  170. if (vx_check_magic(_chip) < 0)
  171. goto _error;
  172. /* Restore register 0x0E and 0x0F (thus replacing COR and FCSR) */
  173. vx_outb(chip, CSUER, regCSUER);
  174. vx_outb(chip, RUER, regRUER);
  175. /* Reset the Xilinx's signal enabling IO access */
  176. chip->regDIALOG |= VXP_DLG_XILINX_REPROG_MASK;
  177. vx_outb(chip, DIALOG, chip->regDIALOG);
  178. vx_inb(chip, DIALOG);
  179. msleep(10);
  180. chip->regDIALOG &= ~VXP_DLG_XILINX_REPROG_MASK;
  181. vx_outb(chip, DIALOG, chip->regDIALOG);
  182. vx_inb(chip, DIALOG);
  183. /* Reset of the Codec */
  184. vxp_reset_codec(_chip);
  185. vx_reset_dsp(_chip);
  186. return 0;
  187. _error:
  188. vx_outb(chip, CSUER, regCSUER);
  189. vx_outb(chip, RUER, regRUER);
  190. chip->regDIALOG &= ~VXP_DLG_XILINX_REPROG_MASK;
  191. vx_outb(chip, DIALOG, chip->regDIALOG);
  192. return -EIO;
  193. }
  194. /*
  195. * vxp_load_dsp - load_dsp callback
  196. */
  197. static int vxp_load_dsp(struct vx_core *vx, int index, const struct firmware *fw)
  198. {
  199. int err;
  200. switch (index) {
  201. case 0:
  202. /* xilinx boot */
  203. err = vx_check_magic(vx);
  204. if (err < 0)
  205. return err;
  206. err = snd_vx_load_boot_image(vx, fw);
  207. if (err < 0)
  208. return err;
  209. return 0;
  210. case 1:
  211. /* xilinx image */
  212. return vxp_load_xilinx_binary(vx, fw);
  213. case 2:
  214. /* DSP boot */
  215. return snd_vx_dsp_boot(vx, fw);
  216. case 3:
  217. /* DSP image */
  218. return snd_vx_dsp_load(vx, fw);
  219. default:
  220. snd_BUG();
  221. return -EINVAL;
  222. }
  223. }
  224. /*
  225. * vx_test_and_ack - test and acknowledge interrupt
  226. *
  227. * called from irq hander, too
  228. *
  229. * spinlock held!
  230. */
  231. static int vxp_test_and_ack(struct vx_core *_chip)
  232. {
  233. struct snd_vxpocket *chip = to_vxpocket(_chip);
  234. /* not booted yet? */
  235. if (! (_chip->chip_status & VX_STAT_XILINX_LOADED))
  236. return -ENXIO;
  237. if (! (vx_inb(chip, DIALOG) & VXP_DLG_MEMIRQ_MASK))
  238. return -EIO;
  239. /* ok, interrupts generated, now ack it */
  240. /* set ACQUIT bit up and down */
  241. vx_outb(chip, DIALOG, chip->regDIALOG | VXP_DLG_ACK_MEMIRQ_MASK);
  242. /* useless read just to spend some time and maintain
  243. * the ACQUIT signal up for a while ( a bus cycle )
  244. */
  245. vx_inb(chip, DIALOG);
  246. vx_outb(chip, DIALOG, chip->regDIALOG & ~VXP_DLG_ACK_MEMIRQ_MASK);
  247. return 0;
  248. }
  249. /*
  250. * vx_validate_irq - enable/disable IRQ
  251. */
  252. static void vxp_validate_irq(struct vx_core *_chip, int enable)
  253. {
  254. struct snd_vxpocket *chip = to_vxpocket(_chip);
  255. /* Set the interrupt enable bit to 1 in CDSP register */
  256. if (enable)
  257. chip->regCDSP |= VXP_CDSP_VALID_IRQ_MASK;
  258. else
  259. chip->regCDSP &= ~VXP_CDSP_VALID_IRQ_MASK;
  260. vx_outb(chip, CDSP, chip->regCDSP);
  261. }
  262. /*
  263. * vx_setup_pseudo_dma - set up the pseudo dma read/write mode.
  264. * @do_write: 0 = read, 1 = set up for DMA write
  265. */
  266. static void vx_setup_pseudo_dma(struct vx_core *_chip, int do_write)
  267. {
  268. struct snd_vxpocket *chip = to_vxpocket(_chip);
  269. /* Interrupt mode and HREQ pin enabled for host transmit / receive data transfers */
  270. vx_outb(chip, ICR, do_write ? ICR_TREQ : ICR_RREQ);
  271. /* Reset the pseudo-dma register */
  272. vx_inb(chip, ISR);
  273. vx_outb(chip, ISR, 0);
  274. /* Select DMA in read/write transfer mode and in 16-bit accesses */
  275. chip->regDIALOG |= VXP_DLG_DMA16_SEL_MASK;
  276. chip->regDIALOG |= do_write ? VXP_DLG_DMAWRITE_SEL_MASK : VXP_DLG_DMAREAD_SEL_MASK;
  277. vx_outb(chip, DIALOG, chip->regDIALOG);
  278. }
  279. /*
  280. * vx_release_pseudo_dma - disable the pseudo-DMA mode
  281. */
  282. static void vx_release_pseudo_dma(struct vx_core *_chip)
  283. {
  284. struct snd_vxpocket *chip = to_vxpocket(_chip);
  285. /* Disable DMA and 16-bit accesses */
  286. chip->regDIALOG &= ~(VXP_DLG_DMAWRITE_SEL_MASK|
  287. VXP_DLG_DMAREAD_SEL_MASK|
  288. VXP_DLG_DMA16_SEL_MASK);
  289. vx_outb(chip, DIALOG, chip->regDIALOG);
  290. /* HREQ pin disabled. */
  291. vx_outb(chip, ICR, 0);
  292. }
  293. /*
  294. * vx_pseudo_dma_write - write bulk data on pseudo-DMA mode
  295. * @count: data length to transfer in bytes
  296. *
  297. * data size must be aligned to 6 bytes to ensure the 24bit alignment on DSP.
  298. * NB: call with a certain lock!
  299. */
  300. static void vxp_dma_write(struct vx_core *chip, struct snd_pcm_runtime *runtime,
  301. struct vx_pipe *pipe, int count)
  302. {
  303. long port = vxp_reg_addr(chip, VX_DMA);
  304. int offset = pipe->hw_ptr;
  305. unsigned short *addr = (unsigned short *)(runtime->dma_area + offset);
  306. vx_setup_pseudo_dma(chip, 1);
  307. if (offset + count >= pipe->buffer_bytes) {
  308. int length = pipe->buffer_bytes - offset;
  309. count -= length;
  310. length >>= 1; /* in 16bit words */
  311. /* Transfer using pseudo-dma. */
  312. for (; length > 0; length--) {
  313. outw(*addr, port);
  314. addr++;
  315. }
  316. addr = (unsigned short *)runtime->dma_area;
  317. pipe->hw_ptr = 0;
  318. }
  319. pipe->hw_ptr += count;
  320. count >>= 1; /* in 16bit words */
  321. /* Transfer using pseudo-dma. */
  322. for (; count > 0; count--) {
  323. outw(*addr, port);
  324. addr++;
  325. }
  326. vx_release_pseudo_dma(chip);
  327. }
  328. /*
  329. * vx_pseudo_dma_read - read bulk data on pseudo DMA mode
  330. * @offset: buffer offset in bytes
  331. * @count: data length to transfer in bytes
  332. *
  333. * the read length must be aligned to 6 bytes, as well as write.
  334. * NB: call with a certain lock!
  335. */
  336. static void vxp_dma_read(struct vx_core *chip, struct snd_pcm_runtime *runtime,
  337. struct vx_pipe *pipe, int count)
  338. {
  339. struct snd_vxpocket *pchip = to_vxpocket(chip);
  340. long port = vxp_reg_addr(chip, VX_DMA);
  341. int offset = pipe->hw_ptr;
  342. unsigned short *addr = (unsigned short *)(runtime->dma_area + offset);
  343. if (snd_BUG_ON(count % 2))
  344. return;
  345. vx_setup_pseudo_dma(chip, 0);
  346. if (offset + count >= pipe->buffer_bytes) {
  347. int length = pipe->buffer_bytes - offset;
  348. count -= length;
  349. length >>= 1; /* in 16bit words */
  350. /* Transfer using pseudo-dma. */
  351. for (; length > 0; length--)
  352. *addr++ = inw(port);
  353. addr = (unsigned short *)runtime->dma_area;
  354. pipe->hw_ptr = 0;
  355. }
  356. pipe->hw_ptr += count;
  357. count >>= 1; /* in 16bit words */
  358. /* Transfer using pseudo-dma. */
  359. for (; count > 1; count--)
  360. *addr++ = inw(port);
  361. /* Disable DMA */
  362. pchip->regDIALOG &= ~VXP_DLG_DMAREAD_SEL_MASK;
  363. vx_outb(chip, DIALOG, pchip->regDIALOG);
  364. /* Read the last word (16 bits) */
  365. *addr = inw(port);
  366. /* Disable 16-bit accesses */
  367. pchip->regDIALOG &= ~VXP_DLG_DMA16_SEL_MASK;
  368. vx_outb(chip, DIALOG, pchip->regDIALOG);
  369. /* HREQ pin disabled. */
  370. vx_outb(chip, ICR, 0);
  371. }
  372. /*
  373. * write a codec data (24bit)
  374. */
  375. static void vxp_write_codec_reg(struct vx_core *chip, int codec, unsigned int data)
  376. {
  377. int i;
  378. /* Activate access to the corresponding codec register */
  379. if (! codec)
  380. vx_inb(chip, LOFREQ);
  381. else
  382. vx_inb(chip, CODEC2);
  383. /* We have to send 24 bits (3 x 8 bits). Start with most signif. Bit */
  384. for (i = 0; i < 24; i++, data <<= 1)
  385. vx_outb(chip, DATA, ((data & 0x800000) ? VX_DATA_CODEC_MASK : 0));
  386. /* Terminate access to codec registers */
  387. vx_inb(chip, HIFREQ);
  388. }
  389. /*
  390. * vx_set_mic_boost - set mic boost level (on vxp440 only)
  391. * @boost: 0 = 20dB, 1 = +38dB
  392. */
  393. void vx_set_mic_boost(struct vx_core *chip, int boost)
  394. {
  395. struct snd_vxpocket *pchip = to_vxpocket(chip);
  396. if (chip->chip_status & VX_STAT_IS_STALE)
  397. return;
  398. mutex_lock(&chip->lock);
  399. if (pchip->regCDSP & P24_CDSP_MICS_SEL_MASK) {
  400. if (boost) {
  401. /* boost: 38 dB */
  402. pchip->regCDSP &= ~P24_CDSP_MIC20_SEL_MASK;
  403. pchip->regCDSP |= P24_CDSP_MIC38_SEL_MASK;
  404. } else {
  405. /* minimum value: 20 dB */
  406. pchip->regCDSP |= P24_CDSP_MIC20_SEL_MASK;
  407. pchip->regCDSP &= ~P24_CDSP_MIC38_SEL_MASK;
  408. }
  409. vx_outb(chip, CDSP, pchip->regCDSP);
  410. }
  411. mutex_unlock(&chip->lock);
  412. }
  413. /*
  414. * remap the linear value (0-8) to the actual value (0-15)
  415. */
  416. static int vx_compute_mic_level(int level)
  417. {
  418. switch (level) {
  419. case 5: level = 6 ; break;
  420. case 6: level = 8 ; break;
  421. case 7: level = 11; break;
  422. case 8: level = 15; break;
  423. default: break ;
  424. }
  425. return level;
  426. }
  427. /*
  428. * vx_set_mic_level - set mic level (on vxpocket only)
  429. * @level: the mic level = 0 - 8 (max)
  430. */
  431. void vx_set_mic_level(struct vx_core *chip, int level)
  432. {
  433. struct snd_vxpocket *pchip = to_vxpocket(chip);
  434. if (chip->chip_status & VX_STAT_IS_STALE)
  435. return;
  436. mutex_lock(&chip->lock);
  437. if (pchip->regCDSP & VXP_CDSP_MIC_SEL_MASK) {
  438. level = vx_compute_mic_level(level);
  439. vx_outb(chip, MICRO, level);
  440. }
  441. mutex_unlock(&chip->lock);
  442. }
  443. /*
  444. * change the input audio source
  445. */
  446. static void vxp_change_audio_source(struct vx_core *_chip, int src)
  447. {
  448. struct snd_vxpocket *chip = to_vxpocket(_chip);
  449. switch (src) {
  450. case VX_AUDIO_SRC_DIGITAL:
  451. chip->regCDSP |= VXP_CDSP_DATAIN_SEL_MASK;
  452. vx_outb(chip, CDSP, chip->regCDSP);
  453. break;
  454. case VX_AUDIO_SRC_LINE:
  455. chip->regCDSP &= ~VXP_CDSP_DATAIN_SEL_MASK;
  456. if (_chip->type == VX_TYPE_VXP440)
  457. chip->regCDSP &= ~P24_CDSP_MICS_SEL_MASK;
  458. else
  459. chip->regCDSP &= ~VXP_CDSP_MIC_SEL_MASK;
  460. vx_outb(chip, CDSP, chip->regCDSP);
  461. break;
  462. case VX_AUDIO_SRC_MIC:
  463. chip->regCDSP &= ~VXP_CDSP_DATAIN_SEL_MASK;
  464. /* reset mic levels */
  465. if (_chip->type == VX_TYPE_VXP440) {
  466. chip->regCDSP &= ~P24_CDSP_MICS_SEL_MASK;
  467. if (chip->mic_level)
  468. chip->regCDSP |= P24_CDSP_MIC38_SEL_MASK;
  469. else
  470. chip->regCDSP |= P24_CDSP_MIC20_SEL_MASK;
  471. vx_outb(chip, CDSP, chip->regCDSP);
  472. } else {
  473. chip->regCDSP |= VXP_CDSP_MIC_SEL_MASK;
  474. vx_outb(chip, CDSP, chip->regCDSP);
  475. vx_outb(chip, MICRO, vx_compute_mic_level(chip->mic_level));
  476. }
  477. break;
  478. }
  479. }
  480. /*
  481. * change the clock source
  482. * source = INTERNAL_QUARTZ or UER_SYNC
  483. */
  484. static void vxp_set_clock_source(struct vx_core *_chip, int source)
  485. {
  486. struct snd_vxpocket *chip = to_vxpocket(_chip);
  487. if (source == INTERNAL_QUARTZ)
  488. chip->regCDSP &= ~VXP_CDSP_CLOCKIN_SEL_MASK;
  489. else
  490. chip->regCDSP |= VXP_CDSP_CLOCKIN_SEL_MASK;
  491. vx_outb(chip, CDSP, chip->regCDSP);
  492. }
  493. /*
  494. * reset the board
  495. */
  496. static void vxp_reset_board(struct vx_core *_chip, int cold_reset)
  497. {
  498. struct snd_vxpocket *chip = to_vxpocket(_chip);
  499. chip->regCDSP = 0;
  500. chip->regDIALOG = 0;
  501. }
  502. /*
  503. * callbacks
  504. */
  505. /* exported */
  506. const struct snd_vx_ops snd_vxpocket_ops = {
  507. .in8 = vxp_inb,
  508. .out8 = vxp_outb,
  509. .test_and_ack = vxp_test_and_ack,
  510. .validate_irq = vxp_validate_irq,
  511. .write_codec = vxp_write_codec_reg,
  512. .reset_codec = vxp_reset_codec,
  513. .change_audio_source = vxp_change_audio_source,
  514. .set_clock_source = vxp_set_clock_source,
  515. .load_dsp = vxp_load_dsp,
  516. .add_controls = vxp_add_mic_controls,
  517. .reset_dsp = vxp_reset_dsp,
  518. .reset_board = vxp_reset_board,
  519. .dma_write = vxp_dma_write,
  520. .dma_read = vxp_dma_read,
  521. };