Lines Matching +full:transfer +full:- +full:function
1 // SPDX-License-Identifier: GPL-2.0-or-later
16 #include <linux/dma-mapping.h>
22 #include <linux/platform_data/spi-davinci.h>
136 if (dspi->rx) { in davinci_spi_rx_buf_u8()
137 u8 *rx = dspi->rx; in davinci_spi_rx_buf_u8()
139 dspi->rx = rx; in davinci_spi_rx_buf_u8()
145 if (dspi->rx) { in davinci_spi_rx_buf_u16()
146 u16 *rx = dspi->rx; in davinci_spi_rx_buf_u16()
148 dspi->rx = rx; in davinci_spi_rx_buf_u16()
156 if (dspi->tx) { in davinci_spi_tx_buf_u8()
157 const u8 *tx = dspi->tx; in davinci_spi_tx_buf_u8()
160 dspi->tx = tx; in davinci_spi_tx_buf_u8()
169 if (dspi->tx) { in davinci_spi_tx_buf_u16()
170 const u16 *tx = dspi->tx; in davinci_spi_tx_buf_u16()
173 dspi->tx = tx; in davinci_spi_tx_buf_u16()
200 struct davinci_spi_config *spicfg = spi->controller_data; in davinci_spi_chipselect()
204 dspi = spi_controller_get_devdata(spi->controller); in davinci_spi_chipselect()
207 if (spicfg && spicfg->wdelay) in davinci_spi_chipselect()
221 if (!(spi->mode & SPI_CS_WORD)) in davinci_spi_chipselect()
227 iowrite16(spidat1, dspi->base + SPIDAT1 + 2); in davinci_spi_chipselect()
231 * davinci_spi_get_prescale - Calculates the correct prescale value
235 * This function calculates the prescale value that generates a clock rate
247 ret = DIV_ROUND_UP(clk_get_rate(dspi->clk), max_speed_hz) - 1; in davinci_spi_get_prescale()
249 if (ret < dspi->prescaler_limit || ret > 255) in davinci_spi_get_prescale()
250 return -EINVAL; in davinci_spi_get_prescale()
256 * davinci_spi_setup_transfer - This functions will determine transfer method
257 * @spi: spi device on which data transfer to be done
258 * @t: spi transfer in which transfer info is filled
260 * This function determines data transfer method (8/16/32 bit transfer).
274 dspi = spi_controller_get_devdata(spi->controller); in davinci_spi_setup_transfer()
275 spicfg = spi->controller_data; in davinci_spi_setup_transfer()
280 bits_per_word = t->bits_per_word; in davinci_spi_setup_transfer()
281 hz = t->speed_hz; in davinci_spi_setup_transfer()
286 bits_per_word = spi->bits_per_word; in davinci_spi_setup_transfer()
289 * Assign function pointer to appropriate transfer method in davinci_spi_setup_transfer()
290 * 8bit, 16bit or 32bit transfer in davinci_spi_setup_transfer()
293 dspi->get_rx = davinci_spi_rx_buf_u8; in davinci_spi_setup_transfer()
294 dspi->get_tx = davinci_spi_tx_buf_u8; in davinci_spi_setup_transfer()
295 dspi->bytes_per_word[spi_get_chipselect(spi, 0)] = 1; in davinci_spi_setup_transfer()
297 dspi->get_rx = davinci_spi_rx_buf_u16; in davinci_spi_setup_transfer()
298 dspi->get_tx = davinci_spi_tx_buf_u16; in davinci_spi_setup_transfer()
299 dspi->bytes_per_word[spi_get_chipselect(spi, 0)] = 2; in davinci_spi_setup_transfer()
303 hz = spi->max_speed_hz; in davinci_spi_setup_transfer()
313 if (spi->mode & SPI_LSB_FIRST) in davinci_spi_setup_transfer()
316 if (spi->mode & SPI_CPOL) in davinci_spi_setup_transfer()
319 if (!(spi->mode & SPI_CPHA)) in davinci_spi_setup_transfer()
326 if (spicfg->wdelay) in davinci_spi_setup_transfer()
327 spifmt |= ((spicfg->wdelay << SPIFMT_WDELAY_SHIFT) in davinci_spi_setup_transfer()
332 * - Standard SPI mode uses 4 pins, with chipselect in davinci_spi_setup_transfer()
333 * - 3 pin SPI is a 4 pin variant without CS (SPI_NO_CS) in davinci_spi_setup_transfer()
339 * - 5 pin SPI variant is standard SPI plus SPI_READY in davinci_spi_setup_transfer()
340 * - 4 pin with enable is (SPI_READY | SPI_NO_CS) in davinci_spi_setup_transfer()
343 if (dspi->version == SPI_VERSION_2) { in davinci_spi_setup_transfer()
347 if (spicfg->odd_parity) in davinci_spi_setup_transfer()
350 if (spicfg->parity_enable) in davinci_spi_setup_transfer()
353 if (spicfg->timer_disable) { in davinci_spi_setup_transfer()
356 delay |= (spicfg->c2tdelay << SPIDELAY_C2TDELAY_SHIFT) in davinci_spi_setup_transfer()
358 delay |= (spicfg->t2cdelay << SPIDELAY_T2CDELAY_SHIFT) in davinci_spi_setup_transfer()
362 if (spi->mode & SPI_READY) { in davinci_spi_setup_transfer()
364 delay |= (spicfg->t2edelay << SPIDELAY_T2EDELAY_SHIFT) in davinci_spi_setup_transfer()
366 delay |= (spicfg->c2edelay << SPIDELAY_C2EDELAY_SHIFT) in davinci_spi_setup_transfer()
370 iowrite32(delay, dspi->base + SPIDELAY); in davinci_spi_setup_transfer()
373 iowrite32(spifmt, dspi->base + SPIFMT0); in davinci_spi_setup_transfer()
380 struct davinci_spi_config *spicfg = spi->controller_data; in davinci_spi_of_setup()
381 struct device_node *np = spi->dev.of_node; in davinci_spi_of_setup()
382 struct davinci_spi *dspi = spi_controller_get_devdata(spi->controller); in davinci_spi_of_setup()
388 return -ENOMEM; in davinci_spi_of_setup()
391 if (!of_property_read_u32(np, "ti,spi-wdelay", &prop)) in davinci_spi_of_setup()
392 spicfg->wdelay = (u8)prop; in davinci_spi_of_setup()
393 spi->controller_data = spicfg; in davinci_spi_of_setup()
395 if (dspi->dma_rx && dspi->dma_tx) in davinci_spi_of_setup()
396 spicfg->io_type = SPI_IO_TYPE_DMA; in davinci_spi_of_setup()
403 * davinci_spi_setup - This functions will set default transfer method
404 * @spi: spi device on which data transfer to be done
406 * This functions sets the default transfer method.
411 struct device_node *np = spi->dev.of_node; in davinci_spi_setup()
414 dspi = spi_controller_get_devdata(spi->controller); in davinci_spi_setup()
416 if (!(spi->mode & SPI_NO_CS)) { in davinci_spi_setup()
421 set_io_bits(dspi->base + SPIPC0, 1 << spi_get_chipselect(spi, 0)); in davinci_spi_setup()
424 if (spi->mode & SPI_READY) in davinci_spi_setup()
425 set_io_bits(dspi->base + SPIPC0, SPIPC0_SPIENA_MASK); in davinci_spi_setup()
427 if (spi->mode & SPI_LOOP) in davinci_spi_setup()
428 set_io_bits(dspi->base + SPIGCR1, SPIGCR1_LOOPBACK_MASK); in davinci_spi_setup()
430 clear_io_bits(dspi->base + SPIGCR1, SPIGCR1_LOOPBACK_MASK); in davinci_spi_setup()
437 struct davinci_spi_config *spicfg = spi->controller_data; in davinci_spi_cleanup()
439 spi->controller_data = NULL; in davinci_spi_cleanup()
440 if (spi->dev.of_node) in davinci_spi_cleanup()
448 struct davinci_spi_config *spicfg = spi->controller_data; in davinci_spi_can_dma()
452 can_dma = (spicfg->io_type == SPI_IO_TYPE_DMA) && in davinci_spi_can_dma()
453 (xfer->len >= DMA_MIN_BYTES) && in davinci_spi_can_dma()
454 !is_vmalloc_addr(xfer->rx_buf) && in davinci_spi_can_dma()
455 !is_vmalloc_addr(xfer->tx_buf); in davinci_spi_can_dma()
462 struct device *sdev = dspi->bitbang.ctlr->dev.parent; in davinci_spi_check_error()
465 dev_err(sdev, "SPI Time-out Error\n"); in davinci_spi_check_error()
466 return -ETIMEDOUT; in davinci_spi_check_error()
470 return -EIO; in davinci_spi_check_error()
474 return -EIO; in davinci_spi_check_error()
477 if (dspi->version == SPI_VERSION_2) { in davinci_spi_check_error()
480 return -EIO; in davinci_spi_check_error()
484 return -EIO; in davinci_spi_check_error()
488 return -EIO; in davinci_spi_check_error()
492 return -EBUSY; in davinci_spi_check_error()
500 * davinci_spi_process_events - check for and handle any SPI controller events
503 * This function will check the SPIFLG register and handle any events that are
510 buf = ioread32(dspi->base + SPIBUF); in davinci_spi_process_events()
512 if (dspi->rcount > 0 && !(buf & SPIBUF_RXEMPTY_MASK)) { in davinci_spi_process_events()
513 dspi->get_rx(buf & 0xFFFF, dspi); in davinci_spi_process_events()
514 dspi->rcount--; in davinci_spi_process_events()
517 status = ioread32(dspi->base + SPIFLG); in davinci_spi_process_events()
524 if (dspi->wcount > 0 && !(buf & SPIBUF_TXFULL_MASK)) { in davinci_spi_process_events()
525 spidat1 = ioread32(dspi->base + SPIDAT1); in davinci_spi_process_events()
526 dspi->wcount--; in davinci_spi_process_events()
528 spidat1 |= 0xFFFF & dspi->get_tx(dspi); in davinci_spi_process_events()
529 iowrite32(spidat1, dspi->base + SPIDAT1); in davinci_spi_process_events()
540 dspi->rcount = 0; in davinci_spi_dma_rx_callback()
542 if (!dspi->wcount && !dspi->rcount) in davinci_spi_dma_rx_callback()
543 complete(&dspi->done); in davinci_spi_dma_rx_callback()
550 dspi->wcount = 0; in davinci_spi_dma_tx_callback()
552 if (!dspi->wcount && !dspi->rcount) in davinci_spi_dma_tx_callback()
553 complete(&dspi->done); in davinci_spi_dma_tx_callback()
557 * davinci_spi_bufs - functions which will handle transfer data
558 * @spi: spi device on which data transfer to be done
559 * @t: spi transfer in which transfer info is filled
561 * This function will put data to be transferred into data register
568 int data_type, ret = -ENOMEM; in davinci_spi_bufs()
575 dspi = spi_controller_get_devdata(spi->controller); in davinci_spi_bufs()
576 pdata = &dspi->pdata; in davinci_spi_bufs()
577 spicfg = (struct davinci_spi_config *)spi->controller_data; in davinci_spi_bufs()
582 data_type = dspi->bytes_per_word[spi_get_chipselect(spi, 0)]; in davinci_spi_bufs()
584 dspi->tx = t->tx_buf; in davinci_spi_bufs()
585 dspi->rx = t->rx_buf; in davinci_spi_bufs()
586 dspi->wcount = t->len / data_type; in davinci_spi_bufs()
587 dspi->rcount = dspi->wcount; in davinci_spi_bufs()
589 spidat1 = ioread32(dspi->base + SPIDAT1); in davinci_spi_bufs()
591 clear_io_bits(dspi->base + SPIGCR1, SPIGCR1_POWERDOWN_MASK); in davinci_spi_bufs()
592 set_io_bits(dspi->base + SPIGCR1, SPIGCR1_SPIENA_MASK); in davinci_spi_bufs()
594 reinit_completion(&dspi->done); in davinci_spi_bufs()
596 if (!davinci_spi_can_dma(spi->controller, spi, t)) { in davinci_spi_bufs()
597 if (spicfg->io_type != SPI_IO_TYPE_POLL) in davinci_spi_bufs()
598 set_io_bits(dspi->base + SPIINT, SPIINT_MASKINT); in davinci_spi_bufs()
599 /* start the transfer */ in davinci_spi_bufs()
600 dspi->wcount--; in davinci_spi_bufs()
601 tx_data = dspi->get_tx(dspi); in davinci_spi_bufs()
604 iowrite32(spidat1, dspi->base + SPIDAT1); in davinci_spi_bufs()
608 .src_addr = (unsigned long)dspi->pbase + SPIBUF, in davinci_spi_bufs()
614 .dst_addr = (unsigned long)dspi->pbase + SPIDAT1, in davinci_spi_bufs()
621 dmaengine_slave_config(dspi->dma_rx, &dma_rx_conf); in davinci_spi_bufs()
622 dmaengine_slave_config(dspi->dma_tx, &dma_tx_conf); in davinci_spi_bufs()
624 rxdesc = dmaengine_prep_slave_sg(dspi->dma_rx, in davinci_spi_bufs()
625 t->rx_sg.sgl, t->rx_sg.nents, DMA_DEV_TO_MEM, in davinci_spi_bufs()
630 if (!t->tx_buf) { in davinci_spi_bufs()
631 /* To avoid errors when doing rx-only transfers with in davinci_spi_bufs()
636 t->tx_sg.sgl = t->rx_sg.sgl; in davinci_spi_bufs()
637 t->tx_sg.nents = t->rx_sg.nents; in davinci_spi_bufs()
640 txdesc = dmaengine_prep_slave_sg(dspi->dma_tx, in davinci_spi_bufs()
641 t->tx_sg.sgl, t->tx_sg.nents, DMA_MEM_TO_DEV, in davinci_spi_bufs()
646 rxdesc->callback = davinci_spi_dma_rx_callback; in davinci_spi_bufs()
647 rxdesc->callback_param = (void *)dspi; in davinci_spi_bufs()
648 txdesc->callback = davinci_spi_dma_tx_callback; in davinci_spi_bufs()
649 txdesc->callback_param = (void *)dspi; in davinci_spi_bufs()
651 if (pdata->cshold_bug) in davinci_spi_bufs()
652 iowrite16(spidat1 >> 16, dspi->base + SPIDAT1 + 2); in davinci_spi_bufs()
657 dma_async_issue_pending(dspi->dma_rx); in davinci_spi_bufs()
658 dma_async_issue_pending(dspi->dma_tx); in davinci_spi_bufs()
660 set_io_bits(dspi->base + SPIINT, SPIINT_DMA_REQ_EN); in davinci_spi_bufs()
663 /* Wait for the transfer to complete */ in davinci_spi_bufs()
664 if (spicfg->io_type != SPI_IO_TYPE_POLL) { in davinci_spi_bufs()
665 timeout = DIV_ROUND_UP(t->speed_hz, MSEC_PER_SEC); in davinci_spi_bufs()
666 timeout = DIV_ROUND_UP(t->len * 8, timeout); in davinci_spi_bufs()
670 if (wait_for_completion_timeout(&dspi->done, timeout) == 0) in davinci_spi_bufs()
673 while (dspi->rcount > 0 || dspi->wcount > 0) { in davinci_spi_bufs()
681 clear_io_bits(dspi->base + SPIINT, SPIINT_MASKALL); in davinci_spi_bufs()
682 if (davinci_spi_can_dma(spi->controller, spi, t)) in davinci_spi_bufs()
683 clear_io_bits(dspi->base + SPIINT, SPIINT_DMA_REQ_EN); in davinci_spi_bufs()
685 clear_io_bits(dspi->base + SPIGCR1, SPIGCR1_SPIENA_MASK); in davinci_spi_bufs()
686 set_io_bits(dspi->base + SPIGCR1, SPIGCR1_POWERDOWN_MASK); in davinci_spi_bufs()
695 dev_name(&spi->dev)); in davinci_spi_bufs()
699 if (dspi->rcount != 0 || dspi->wcount != 0) { in davinci_spi_bufs()
700 dev_err(&spi->dev, "SPI data transfer error\n"); in davinci_spi_bufs()
701 return -EIO; in davinci_spi_bufs()
704 return t->len; in davinci_spi_bufs()
711 * dummy_thread_fn - dummy thread function
724 * davinci_spi_irq - Interrupt handler for SPI Master Controller
730 * transfer length and if it is not zero then dispatch transfer command again.
731 * If transfer length is zero then it will indicate the COMPLETION so that
732 * davinci_spi_bufs function can go ahead.
741 clear_io_bits(dspi->base + SPIINT, SPIINT_MASKINT); in davinci_spi_irq()
743 if ((!dspi->rcount && !dspi->wcount) || status) in davinci_spi_irq()
744 complete(&dspi->done); in davinci_spi_irq()
751 struct device *sdev = dspi->bitbang.ctlr->dev.parent; in davinci_spi_request_dma()
753 dspi->dma_rx = dma_request_chan(sdev, "rx"); in davinci_spi_request_dma()
754 if (IS_ERR(dspi->dma_rx)) in davinci_spi_request_dma()
755 return PTR_ERR(dspi->dma_rx); in davinci_spi_request_dma()
757 dspi->dma_tx = dma_request_chan(sdev, "tx"); in davinci_spi_request_dma()
758 if (IS_ERR(dspi->dma_tx)) { in davinci_spi_request_dma()
759 dma_release_channel(dspi->dma_rx); in davinci_spi_request_dma()
760 return PTR_ERR(dspi->dma_tx); in davinci_spi_request_dma()
791 .compatible = "ti,dm6441-spi",
795 .compatible = "ti,da830-spi",
799 .compatible = "ti,keystone-spi",
807 * spi_davinci_get_pdata - Get platform data from DTS binding
818 struct device_node *node = pdev->dev.of_node; in spi_davinci_get_pdata()
823 pdata = &dspi->pdata; in spi_davinci_get_pdata()
825 spi_data = device_get_match_data(&pdev->dev); in spi_davinci_get_pdata()
827 pdata->version = spi_data->version; in spi_davinci_get_pdata()
828 pdata->prescaler_limit = spi_data->prescaler_limit; in spi_davinci_get_pdata()
832 * set to -ENOENT. num-cs includes internal as well as gpios. in spi_davinci_get_pdata()
837 of_property_read_u32(node, "num-cs", &num_cs); in spi_davinci_get_pdata()
838 pdata->num_chipselect = num_cs; in spi_davinci_get_pdata()
839 of_property_read_u32(node, "ti,davinci-spi-intr-line", &intr_line); in spi_davinci_get_pdata()
840 pdata->intr_line = intr_line; in spi_davinci_get_pdata()
847 return -ENODEV; in spi_davinci_get_pdata()
852 * davinci_spi_probe - probe function for SPI Master Controller
855 * According to Linux Device Model this function will be invoked by Linux
857 * This function will map the SPI controller's memory, register IRQ,
860 * can register transfer method to work queue.
871 host = spi_alloc_host(&pdev->dev, sizeof(struct davinci_spi)); in davinci_spi_probe()
873 ret = -ENOMEM; in davinci_spi_probe()
881 if (dev_get_platdata(&pdev->dev)) { in davinci_spi_probe()
882 pdata = dev_get_platdata(&pdev->dev); in davinci_spi_probe()
883 dspi->pdata = *pdata; in davinci_spi_probe()
892 pdata = &dspi->pdata; in davinci_spi_probe()
894 dspi->bytes_per_word = devm_kcalloc(&pdev->dev, in davinci_spi_probe()
895 pdata->num_chipselect, in davinci_spi_probe()
896 sizeof(*dspi->bytes_per_word), in davinci_spi_probe()
898 if (dspi->bytes_per_word == NULL) { in davinci_spi_probe()
899 ret = -ENOMEM; in davinci_spi_probe()
903 dspi->base = devm_platform_get_and_ioremap_resource(pdev, 0, &r); in davinci_spi_probe()
904 if (IS_ERR(dspi->base)) { in davinci_spi_probe()
905 ret = PTR_ERR(dspi->base); in davinci_spi_probe()
908 dspi->pbase = r->start; in davinci_spi_probe()
910 init_completion(&dspi->done); in davinci_spi_probe()
915 dspi->irq = ret; in davinci_spi_probe()
917 ret = devm_request_threaded_irq(&pdev->dev, dspi->irq, davinci_spi_irq, in davinci_spi_probe()
918 dummy_thread_fn, 0, dev_name(&pdev->dev), dspi); in davinci_spi_probe()
922 dspi->bitbang.ctlr = host; in davinci_spi_probe()
924 dspi->clk = devm_clk_get_enabled(&pdev->dev, NULL); in davinci_spi_probe()
925 if (IS_ERR(dspi->clk)) { in davinci_spi_probe()
926 ret = -ENODEV; in davinci_spi_probe()
930 host->use_gpio_descriptors = true; in davinci_spi_probe()
931 host->dev.of_node = pdev->dev.of_node; in davinci_spi_probe()
932 host->bus_num = pdev->id; in davinci_spi_probe()
933 host->num_chipselect = pdata->num_chipselect; in davinci_spi_probe()
934 host->bits_per_word_mask = SPI_BPW_RANGE_MASK(2, 16); in davinci_spi_probe()
935 host->flags = SPI_CONTROLLER_MUST_RX | SPI_CONTROLLER_GPIO_SS; in davinci_spi_probe()
936 host->setup = davinci_spi_setup; in davinci_spi_probe()
937 host->cleanup = davinci_spi_cleanup; in davinci_spi_probe()
938 host->can_dma = davinci_spi_can_dma; in davinci_spi_probe()
940 dspi->bitbang.chipselect = davinci_spi_chipselect; in davinci_spi_probe()
941 dspi->bitbang.setup_transfer = davinci_spi_setup_transfer; in davinci_spi_probe()
942 dspi->prescaler_limit = pdata->prescaler_limit; in davinci_spi_probe()
943 dspi->version = pdata->version; in davinci_spi_probe()
945 dspi->bitbang.flags = SPI_NO_CS | SPI_LSB_FIRST | SPI_LOOP | SPI_CS_WORD; in davinci_spi_probe()
946 if (dspi->version == SPI_VERSION_2) in davinci_spi_probe()
947 dspi->bitbang.flags |= SPI_READY; in davinci_spi_probe()
949 dspi->bitbang.txrx_bufs = davinci_spi_bufs; in davinci_spi_probe()
952 if (ret == -EPROBE_DEFER) { in davinci_spi_probe()
955 dev_info(&pdev->dev, "DMA is not supported (%d)\n", ret); in davinci_spi_probe()
956 dspi->dma_rx = NULL; in davinci_spi_probe()
957 dspi->dma_tx = NULL; in davinci_spi_probe()
960 dspi->get_rx = davinci_spi_rx_buf_u8; in davinci_spi_probe()
961 dspi->get_tx = davinci_spi_tx_buf_u8; in davinci_spi_probe()
964 iowrite32(0, dspi->base + SPIGCR0); in davinci_spi_probe()
966 iowrite32(1, dspi->base + SPIGCR0); in davinci_spi_probe()
970 iowrite32(spipc0, dspi->base + SPIPC0); in davinci_spi_probe()
972 if (pdata->intr_line) in davinci_spi_probe()
973 iowrite32(SPI_INTLVL_1, dspi->base + SPILVL); in davinci_spi_probe()
975 iowrite32(SPI_INTLVL_0, dspi->base + SPILVL); in davinci_spi_probe()
977 iowrite32(CS_DEFAULT, dspi->base + SPIDEF); in davinci_spi_probe()
980 set_io_bits(dspi->base + SPIGCR1, SPIGCR1_CLKMOD_MASK); in davinci_spi_probe()
981 set_io_bits(dspi->base + SPIGCR1, SPIGCR1_MASTER_MASK); in davinci_spi_probe()
982 set_io_bits(dspi->base + SPIGCR1, SPIGCR1_POWERDOWN_MASK); in davinci_spi_probe()
984 ret = spi_bitbang_start(&dspi->bitbang); in davinci_spi_probe()
988 dev_info(&pdev->dev, "Controller at 0x%p\n", dspi->base); in davinci_spi_probe()
993 /* This bit needs to be cleared to disable dpsi->clk */ in davinci_spi_probe()
994 clear_io_bits(dspi->base + SPIGCR1, SPIGCR1_POWERDOWN_MASK); in davinci_spi_probe()
996 if (dspi->dma_rx) { in davinci_spi_probe()
997 dma_release_channel(dspi->dma_rx); in davinci_spi_probe()
998 dma_release_channel(dspi->dma_tx); in davinci_spi_probe()
1007 * davinci_spi_remove - remove function for SPI Master Controller
1010 * This function will do the reverse action of davinci_spi_probe function
1023 spi_bitbang_stop(&dspi->bitbang); in davinci_spi_remove()
1025 /* This bit needs to be cleared to disable dpsi->clk */ in davinci_spi_remove()
1026 clear_io_bits(dspi->base + SPIGCR1, SPIGCR1_POWERDOWN_MASK); in davinci_spi_remove()
1028 if (dspi->dma_rx) { in davinci_spi_remove()
1029 dma_release_channel(dspi->dma_rx); in davinci_spi_remove()
1030 dma_release_channel(dspi->dma_tx); in davinci_spi_remove()