Lines Matching refs:p
194 static u32 sh_msiof_read(struct sh_msiof_spi_priv *p, int reg_offs) in sh_msiof_read() argument
199 return ioread16(p->mapbase + reg_offs); in sh_msiof_read()
201 return ioread32(p->mapbase + reg_offs); in sh_msiof_read()
205 static void sh_msiof_write(struct sh_msiof_spi_priv *p, int reg_offs, in sh_msiof_write() argument
211 iowrite16(value, p->mapbase + reg_offs); in sh_msiof_write()
214 iowrite32(value, p->mapbase + reg_offs); in sh_msiof_write()
219 static int sh_msiof_modify_ctr_wait(struct sh_msiof_spi_priv *p, in sh_msiof_modify_ctr_wait() argument
225 data = sh_msiof_read(p, SICTR); in sh_msiof_modify_ctr_wait()
228 sh_msiof_write(p, SICTR, data); in sh_msiof_modify_ctr_wait()
230 return readl_poll_timeout_atomic(p->mapbase + SICTR, data, in sh_msiof_modify_ctr_wait()
236 struct sh_msiof_spi_priv *p = data; in sh_msiof_spi_irq() local
239 sh_msiof_write(p, SIIER, 0); in sh_msiof_spi_irq()
240 complete(&p->done); in sh_msiof_spi_irq()
245 static void sh_msiof_spi_reset_regs(struct sh_msiof_spi_priv *p) in sh_msiof_spi_reset_regs() argument
250 data = sh_msiof_read(p, SICTR); in sh_msiof_spi_reset_regs()
252 sh_msiof_write(p, SICTR, data); in sh_msiof_spi_reset_regs()
254 readl_poll_timeout_atomic(p->mapbase + SICTR, data, !(data & mask), 1, in sh_msiof_spi_reset_regs()
263 static void sh_msiof_spi_set_clk_regs(struct sh_msiof_spi_priv *p, in sh_msiof_spi_set_clk_regs() argument
266 unsigned long parent_rate = clk_get_rate(p->clk); in sh_msiof_spi_set_clk_regs()
267 unsigned int div_pow = p->min_div_pow; in sh_msiof_spi_set_clk_regs()
293 dev_err(&p->pdev->dev, in sh_msiof_spi_set_clk_regs()
302 sh_msiof_write(p, SITSCR, scr); in sh_msiof_spi_set_clk_regs()
303 if (!(p->ctlr->flags & SPI_CONTROLLER_MUST_TX)) in sh_msiof_spi_set_clk_regs()
304 sh_msiof_write(p, SIRSCR, scr); in sh_msiof_spi_set_clk_regs()
324 static u32 sh_msiof_spi_get_dtdl_and_syncdl(struct sh_msiof_spi_priv *p) in sh_msiof_spi_get_dtdl_and_syncdl() argument
328 if (!p->info) in sh_msiof_spi_get_dtdl_and_syncdl()
332 if (p->info->dtdl > 200 || p->info->syncdl > 300) { in sh_msiof_spi_get_dtdl_and_syncdl()
333 dev_warn(&p->pdev->dev, "DTDL or SYNCDL is too large\n"); in sh_msiof_spi_get_dtdl_and_syncdl()
338 if ((p->info->dtdl + p->info->syncdl) % 100) { in sh_msiof_spi_get_dtdl_and_syncdl()
339 dev_warn(&p->pdev->dev, "the sum of DTDL/SYNCDL is not good\n"); in sh_msiof_spi_get_dtdl_and_syncdl()
343 val = sh_msiof_get_delay_bit(p->info->dtdl) << SIMDR1_DTDL_SHIFT; in sh_msiof_spi_get_dtdl_and_syncdl()
344 val |= sh_msiof_get_delay_bit(p->info->syncdl) << SIMDR1_SYNCDL_SHIFT; in sh_msiof_spi_get_dtdl_and_syncdl()
349 static void sh_msiof_spi_set_pin_regs(struct sh_msiof_spi_priv *p, u32 ss, in sh_msiof_spi_set_pin_regs() argument
366 tmp |= sh_msiof_spi_get_dtdl_and_syncdl(p); in sh_msiof_spi_set_pin_regs()
367 if (spi_controller_is_target(p->ctlr)) { in sh_msiof_spi_set_pin_regs()
368 sh_msiof_write(p, SITMDR1, tmp | SITMDR1_PCON); in sh_msiof_spi_set_pin_regs()
370 sh_msiof_write(p, SITMDR1, in sh_msiof_spi_set_pin_regs()
374 if (p->ctlr->flags & SPI_CONTROLLER_MUST_TX) { in sh_msiof_spi_set_pin_regs()
378 sh_msiof_write(p, SIRMDR1, tmp); in sh_msiof_spi_set_pin_regs()
389 sh_msiof_write(p, SICTR, tmp); in sh_msiof_spi_set_pin_regs()
392 static void sh_msiof_spi_set_mode_regs(struct sh_msiof_spi_priv *p, in sh_msiof_spi_set_mode_regs() argument
398 if (tx_buf || (p->ctlr->flags & SPI_CONTROLLER_MUST_TX)) in sh_msiof_spi_set_mode_regs()
399 sh_msiof_write(p, SITMDR2, dr2); in sh_msiof_spi_set_mode_regs()
401 sh_msiof_write(p, SITMDR2, dr2 | SIMDR2_GRPMASK1); in sh_msiof_spi_set_mode_regs()
404 sh_msiof_write(p, SIRMDR2, dr2); in sh_msiof_spi_set_mode_regs()
407 static void sh_msiof_reset_str(struct sh_msiof_spi_priv *p) in sh_msiof_reset_str() argument
409 sh_msiof_write(p, SISTR, in sh_msiof_reset_str()
410 sh_msiof_read(p, SISTR) & ~(SISTR_TDREQ | SISTR_RDREQ)); in sh_msiof_reset_str()
413 static void sh_msiof_spi_write_fifo_8(struct sh_msiof_spi_priv *p, in sh_msiof_spi_write_fifo_8() argument
420 sh_msiof_write(p, SITFDR, buf_8[k] << fs); in sh_msiof_spi_write_fifo_8()
423 static void sh_msiof_spi_write_fifo_16(struct sh_msiof_spi_priv *p, in sh_msiof_spi_write_fifo_16() argument
430 sh_msiof_write(p, SITFDR, buf_16[k] << fs); in sh_msiof_spi_write_fifo_16()
433 static void sh_msiof_spi_write_fifo_16u(struct sh_msiof_spi_priv *p, in sh_msiof_spi_write_fifo_16u() argument
440 sh_msiof_write(p, SITFDR, get_unaligned(&buf_16[k]) << fs); in sh_msiof_spi_write_fifo_16u()
443 static void sh_msiof_spi_write_fifo_32(struct sh_msiof_spi_priv *p, in sh_msiof_spi_write_fifo_32() argument
450 sh_msiof_write(p, SITFDR, buf_32[k] << fs); in sh_msiof_spi_write_fifo_32()
453 static void sh_msiof_spi_write_fifo_32u(struct sh_msiof_spi_priv *p, in sh_msiof_spi_write_fifo_32u() argument
460 sh_msiof_write(p, SITFDR, get_unaligned(&buf_32[k]) << fs); in sh_msiof_spi_write_fifo_32u()
463 static void sh_msiof_spi_write_fifo_s32(struct sh_msiof_spi_priv *p, in sh_msiof_spi_write_fifo_s32() argument
470 sh_msiof_write(p, SITFDR, swab32(buf_32[k] << fs)); in sh_msiof_spi_write_fifo_s32()
473 static void sh_msiof_spi_write_fifo_s32u(struct sh_msiof_spi_priv *p, in sh_msiof_spi_write_fifo_s32u() argument
480 sh_msiof_write(p, SITFDR, swab32(get_unaligned(&buf_32[k]) << fs)); in sh_msiof_spi_write_fifo_s32u()
483 static void sh_msiof_spi_read_fifo_8(struct sh_msiof_spi_priv *p, in sh_msiof_spi_read_fifo_8() argument
490 buf_8[k] = sh_msiof_read(p, SIRFDR) >> fs; in sh_msiof_spi_read_fifo_8()
493 static void sh_msiof_spi_read_fifo_16(struct sh_msiof_spi_priv *p, in sh_msiof_spi_read_fifo_16() argument
500 buf_16[k] = sh_msiof_read(p, SIRFDR) >> fs; in sh_msiof_spi_read_fifo_16()
503 static void sh_msiof_spi_read_fifo_16u(struct sh_msiof_spi_priv *p, in sh_msiof_spi_read_fifo_16u() argument
510 put_unaligned(sh_msiof_read(p, SIRFDR) >> fs, &buf_16[k]); in sh_msiof_spi_read_fifo_16u()
513 static void sh_msiof_spi_read_fifo_32(struct sh_msiof_spi_priv *p, in sh_msiof_spi_read_fifo_32() argument
520 buf_32[k] = sh_msiof_read(p, SIRFDR) >> fs; in sh_msiof_spi_read_fifo_32()
523 static void sh_msiof_spi_read_fifo_32u(struct sh_msiof_spi_priv *p, in sh_msiof_spi_read_fifo_32u() argument
530 put_unaligned(sh_msiof_read(p, SIRFDR) >> fs, &buf_32[k]); in sh_msiof_spi_read_fifo_32u()
533 static void sh_msiof_spi_read_fifo_s32(struct sh_msiof_spi_priv *p, in sh_msiof_spi_read_fifo_s32() argument
540 buf_32[k] = swab32(sh_msiof_read(p, SIRFDR) >> fs); in sh_msiof_spi_read_fifo_s32()
543 static void sh_msiof_spi_read_fifo_s32u(struct sh_msiof_spi_priv *p, in sh_msiof_spi_read_fifo_s32u() argument
550 put_unaligned(swab32(sh_msiof_read(p, SIRFDR) >> fs), &buf_32[k]); in sh_msiof_spi_read_fifo_s32u()
555 struct sh_msiof_spi_priv *p = in sh_msiof_spi_setup() local
559 if (spi_get_csgpiod(spi, 0) || spi_controller_is_target(p->ctlr)) in sh_msiof_spi_setup()
562 if (p->native_cs_inited && in sh_msiof_spi_setup()
563 (p->native_cs_high == !!(spi->mode & SPI_CS_HIGH))) in sh_msiof_spi_setup()
573 pm_runtime_get_sync(&p->pdev->dev); in sh_msiof_spi_setup()
574 tmp = sh_msiof_read(p, SITMDR1) & ~clr; in sh_msiof_spi_setup()
575 sh_msiof_write(p, SITMDR1, tmp | set | SIMDR1_TRMD | SITMDR1_PCON); in sh_msiof_spi_setup()
576 tmp = sh_msiof_read(p, SIRMDR1) & ~clr; in sh_msiof_spi_setup()
577 sh_msiof_write(p, SIRMDR1, tmp | set); in sh_msiof_spi_setup()
578 pm_runtime_put(&p->pdev->dev); in sh_msiof_spi_setup()
579 p->native_cs_high = spi->mode & SPI_CS_HIGH; in sh_msiof_spi_setup()
580 p->native_cs_inited = true; in sh_msiof_spi_setup()
587 struct sh_msiof_spi_priv *p = spi_controller_get_devdata(ctlr); in sh_msiof_prepare_message() local
594 cs_high = p->native_cs_high; in sh_msiof_prepare_message()
599 sh_msiof_spi_set_pin_regs(p, ss, !!(spi->mode & SPI_CPOL), in sh_msiof_prepare_message()
606 static int sh_msiof_spi_start(struct sh_msiof_spi_priv *p, void *rx_buf) in sh_msiof_spi_start() argument
608 bool target = spi_controller_is_target(p->ctlr); in sh_msiof_spi_start()
613 ret = sh_msiof_modify_ctr_wait(p, 0, SICTR_TSCKE); in sh_msiof_spi_start()
615 ret = sh_msiof_modify_ctr_wait(p, 0, SICTR_RXE); in sh_msiof_spi_start()
617 ret = sh_msiof_modify_ctr_wait(p, 0, SICTR_TXE); in sh_msiof_spi_start()
621 ret = sh_msiof_modify_ctr_wait(p, 0, SICTR_TFSE); in sh_msiof_spi_start()
626 static int sh_msiof_spi_stop(struct sh_msiof_spi_priv *p, void *rx_buf) in sh_msiof_spi_stop() argument
628 bool target = spi_controller_is_target(p->ctlr); in sh_msiof_spi_stop()
633 ret = sh_msiof_modify_ctr_wait(p, SICTR_TFSE, 0); in sh_msiof_spi_stop()
635 ret = sh_msiof_modify_ctr_wait(p, SICTR_TXE, 0); in sh_msiof_spi_stop()
637 ret = sh_msiof_modify_ctr_wait(p, SICTR_RXE, 0); in sh_msiof_spi_stop()
639 ret = sh_msiof_modify_ctr_wait(p, SICTR_TSCKE, 0); in sh_msiof_spi_stop()
646 struct sh_msiof_spi_priv *p = spi_controller_get_devdata(ctlr); in sh_msiof_target_abort() local
648 p->target_aborted = true; in sh_msiof_target_abort()
649 complete(&p->done); in sh_msiof_target_abort()
650 complete(&p->done_txdma); in sh_msiof_target_abort()
654 static int sh_msiof_wait_for_completion(struct sh_msiof_spi_priv *p, in sh_msiof_wait_for_completion() argument
657 if (spi_controller_is_target(p->ctlr)) { in sh_msiof_wait_for_completion()
659 p->target_aborted) { in sh_msiof_wait_for_completion()
660 dev_dbg(&p->pdev->dev, "interrupted\n"); in sh_msiof_wait_for_completion()
665 dev_err(&p->pdev->dev, "timeout\n"); in sh_msiof_wait_for_completion()
673 static int sh_msiof_spi_txrx_once(struct sh_msiof_spi_priv *p, in sh_msiof_spi_txrx_once() argument
686 words = min_t(int, words, p->tx_fifo_size); in sh_msiof_spi_txrx_once()
688 words = min_t(int, words, p->rx_fifo_size); in sh_msiof_spi_txrx_once()
694 sh_msiof_write(p, SIFCTR, 0); in sh_msiof_spi_txrx_once()
697 sh_msiof_spi_set_mode_regs(p, tx_buf, rx_buf, bits, words); in sh_msiof_spi_txrx_once()
698 sh_msiof_write(p, SIIER, SIIER_TEOFE | SIIER_REOFE); in sh_msiof_spi_txrx_once()
702 tx_fifo(p, tx_buf, words, fifo_shift); in sh_msiof_spi_txrx_once()
704 reinit_completion(&p->done); in sh_msiof_spi_txrx_once()
705 p->target_aborted = false; in sh_msiof_spi_txrx_once()
707 ret = sh_msiof_spi_start(p, rx_buf); in sh_msiof_spi_txrx_once()
709 dev_err(&p->pdev->dev, "failed to start hardware\n"); in sh_msiof_spi_txrx_once()
714 ret = sh_msiof_wait_for_completion(p, &p->done); in sh_msiof_spi_txrx_once()
720 rx_fifo(p, rx_buf, words, fifo_shift); in sh_msiof_spi_txrx_once()
723 sh_msiof_reset_str(p); in sh_msiof_spi_txrx_once()
725 ret = sh_msiof_spi_stop(p, rx_buf); in sh_msiof_spi_txrx_once()
727 dev_err(&p->pdev->dev, "failed to shut down hardware\n"); in sh_msiof_spi_txrx_once()
734 sh_msiof_reset_str(p); in sh_msiof_spi_txrx_once()
735 sh_msiof_spi_stop(p, rx_buf); in sh_msiof_spi_txrx_once()
737 sh_msiof_write(p, SIIER, 0); in sh_msiof_spi_txrx_once()
746 static int sh_msiof_dma_once(struct sh_msiof_spi_priv *p, const void *tx, in sh_msiof_dma_once() argument
757 desc_rx = dmaengine_prep_slave_single(p->ctlr->dma_rx, in sh_msiof_dma_once()
758 p->rx_dma_addr, len, DMA_DEV_TO_MEM, in sh_msiof_dma_once()
764 desc_rx->callback_param = &p->done; in sh_msiof_dma_once()
772 dma_sync_single_for_device(p->ctlr->dma_tx->device->dev, in sh_msiof_dma_once()
773 p->tx_dma_addr, len, DMA_TO_DEVICE); in sh_msiof_dma_once()
774 desc_tx = dmaengine_prep_slave_single(p->ctlr->dma_tx, in sh_msiof_dma_once()
775 p->tx_dma_addr, len, DMA_MEM_TO_DEV, in sh_msiof_dma_once()
783 desc_tx->callback_param = &p->done_txdma; in sh_msiof_dma_once()
792 sh_msiof_write(p, SIFCTR, SIFCTR_TFWM_1 | SIFCTR_RFWM_1); in sh_msiof_dma_once()
795 sh_msiof_spi_set_mode_regs(p, tx, rx, 32, len / 4); in sh_msiof_dma_once()
797 sh_msiof_write(p, SIIER, ier_bits); in sh_msiof_dma_once()
799 reinit_completion(&p->done); in sh_msiof_dma_once()
801 reinit_completion(&p->done_txdma); in sh_msiof_dma_once()
802 p->target_aborted = false; in sh_msiof_dma_once()
806 dma_async_issue_pending(p->ctlr->dma_rx); in sh_msiof_dma_once()
808 dma_async_issue_pending(p->ctlr->dma_tx); in sh_msiof_dma_once()
810 ret = sh_msiof_spi_start(p, rx); in sh_msiof_dma_once()
812 dev_err(&p->pdev->dev, "failed to start hardware\n"); in sh_msiof_dma_once()
818 ret = sh_msiof_wait_for_completion(p, &p->done_txdma); in sh_msiof_dma_once()
825 ret = sh_msiof_wait_for_completion(p, &p->done); in sh_msiof_dma_once()
829 sh_msiof_write(p, SIIER, 0); in sh_msiof_dma_once()
832 sh_msiof_write(p, SIIER, SIIER_TEOFE); in sh_msiof_dma_once()
833 ret = sh_msiof_wait_for_completion(p, &p->done); in sh_msiof_dma_once()
839 sh_msiof_reset_str(p); in sh_msiof_dma_once()
841 ret = sh_msiof_spi_stop(p, rx); in sh_msiof_dma_once()
843 dev_err(&p->pdev->dev, "failed to shut down hardware\n"); in sh_msiof_dma_once()
848 dma_sync_single_for_cpu(p->ctlr->dma_rx->device->dev, in sh_msiof_dma_once()
849 p->rx_dma_addr, len, DMA_FROM_DEVICE); in sh_msiof_dma_once()
854 sh_msiof_reset_str(p); in sh_msiof_dma_once()
855 sh_msiof_spi_stop(p, rx); in sh_msiof_dma_once()
858 dmaengine_terminate_sync(p->ctlr->dma_tx); in sh_msiof_dma_once()
861 dmaengine_terminate_sync(p->ctlr->dma_rx); in sh_msiof_dma_once()
862 sh_msiof_write(p, SIIER, 0); in sh_msiof_dma_once()
913 struct sh_msiof_spi_priv *p = spi_controller_get_devdata(ctlr); in sh_msiof_transfer_one() local
928 sh_msiof_spi_reset_regs(p); in sh_msiof_transfer_one()
931 if (!spi_controller_is_target(p->ctlr)) in sh_msiof_transfer_one()
932 sh_msiof_spi_set_clk_regs(p, t); in sh_msiof_transfer_one()
942 l = min(round_down(len, 4), p->tx_fifo_size * 4); in sh_msiof_transfer_one()
944 l = min(round_down(len, 4), p->rx_fifo_size * 4); in sh_msiof_transfer_one()
955 copy32(p->tx_dma_page, tx_buf, l / 4); in sh_msiof_transfer_one()
957 ret = sh_msiof_dma_once(p, tx_buf, rx_buf, l); in sh_msiof_transfer_one()
959 dev_warn_once(&p->pdev->dev, in sh_msiof_transfer_one()
967 copy32(rx_buf, p->rx_dma_page, l / 4); in sh_msiof_transfer_one()
1029 n = sh_msiof_spi_txrx_once(p, tx_fifo, rx_fifo, tx_buf, rx_buf, in sh_msiof_transfer_one()
1181 static int sh_msiof_request_dma(struct sh_msiof_spi_priv *p) in sh_msiof_request_dma() argument
1183 struct platform_device *pdev = p->pdev; in sh_msiof_request_dma()
1185 const struct sh_msiof_spi_info *info = p->info; in sh_msiof_request_dma()
1208 ctlr = p->ctlr; in sh_msiof_request_dma()
1219 p->tx_dma_page = (void *)__get_free_page(GFP_KERNEL | GFP_DMA); in sh_msiof_request_dma()
1220 if (!p->tx_dma_page) in sh_msiof_request_dma()
1223 p->rx_dma_page = (void *)__get_free_page(GFP_KERNEL | GFP_DMA); in sh_msiof_request_dma()
1224 if (!p->rx_dma_page) in sh_msiof_request_dma()
1228 p->tx_dma_addr = dma_map_single(tx_dev, p->tx_dma_page, PAGE_SIZE, in sh_msiof_request_dma()
1230 if (dma_mapping_error(tx_dev, p->tx_dma_addr)) in sh_msiof_request_dma()
1234 p->rx_dma_addr = dma_map_single(rx_dev, p->rx_dma_page, PAGE_SIZE, in sh_msiof_request_dma()
1236 if (dma_mapping_error(rx_dev, p->rx_dma_addr)) in sh_msiof_request_dma()
1243 dma_unmap_single(tx_dev, p->tx_dma_addr, PAGE_SIZE, DMA_TO_DEVICE); in sh_msiof_request_dma()
1245 free_page((unsigned long)p->rx_dma_page); in sh_msiof_request_dma()
1247 free_page((unsigned long)p->tx_dma_page); in sh_msiof_request_dma()
1256 static void sh_msiof_release_dma(struct sh_msiof_spi_priv *p) in sh_msiof_release_dma() argument
1258 struct spi_controller *ctlr = p->ctlr; in sh_msiof_release_dma()
1263 dma_unmap_single(ctlr->dma_rx->device->dev, p->rx_dma_addr, PAGE_SIZE, in sh_msiof_release_dma()
1265 dma_unmap_single(ctlr->dma_tx->device->dev, p->tx_dma_addr, PAGE_SIZE, in sh_msiof_release_dma()
1267 free_page((unsigned long)p->rx_dma_page); in sh_msiof_release_dma()
1268 free_page((unsigned long)p->tx_dma_page); in sh_msiof_release_dma()
1278 struct sh_msiof_spi_priv *p; in sh_msiof_spi_probe() local
1308 p = spi_controller_get_devdata(ctlr); in sh_msiof_spi_probe()
1310 platform_set_drvdata(pdev, p); in sh_msiof_spi_probe()
1311 p->ctlr = ctlr; in sh_msiof_spi_probe()
1312 p->info = info; in sh_msiof_spi_probe()
1313 p->min_div_pow = chipdata->min_div_pow; in sh_msiof_spi_probe()
1315 init_completion(&p->done); in sh_msiof_spi_probe()
1316 init_completion(&p->done_txdma); in sh_msiof_spi_probe()
1318 p->clk = devm_clk_get(&pdev->dev, NULL); in sh_msiof_spi_probe()
1319 if (IS_ERR(p->clk)) { in sh_msiof_spi_probe()
1321 ret = PTR_ERR(p->clk); in sh_msiof_spi_probe()
1331 p->mapbase = devm_platform_ioremap_resource(pdev, 0); in sh_msiof_spi_probe()
1332 if (IS_ERR(p->mapbase)) { in sh_msiof_spi_probe()
1333 ret = PTR_ERR(p->mapbase); in sh_msiof_spi_probe()
1338 dev_name(&pdev->dev), p); in sh_msiof_spi_probe()
1344 p->pdev = pdev; in sh_msiof_spi_probe()
1348 p->tx_fifo_size = chipdata->tx_fifo_size; in sh_msiof_spi_probe()
1349 p->rx_fifo_size = chipdata->rx_fifo_size; in sh_msiof_spi_probe()
1350 if (p->info->tx_fifo_override) in sh_msiof_spi_probe()
1351 p->tx_fifo_size = p->info->tx_fifo_override; in sh_msiof_spi_probe()
1352 if (p->info->rx_fifo_override) in sh_msiof_spi_probe()
1353 p->rx_fifo_size = p->info->rx_fifo_override; in sh_msiof_spi_probe()
1358 clksrc = clk_get_rate(p->clk); in sh_msiof_spi_probe()
1360 ctlr->max_speed_hz = DIV_ROUND_UP(clksrc, 1 << p->min_div_pow); in sh_msiof_spi_probe()
1363 ctlr->num_chipselect = p->info->num_chipselect; in sh_msiof_spi_probe()
1374 ret = sh_msiof_request_dma(p); in sh_msiof_spi_probe()
1387 sh_msiof_release_dma(p); in sh_msiof_spi_probe()
1396 struct sh_msiof_spi_priv *p = platform_get_drvdata(pdev); in sh_msiof_spi_remove() local
1398 sh_msiof_release_dma(p); in sh_msiof_spi_remove()
1411 struct sh_msiof_spi_priv *p = dev_get_drvdata(dev); in sh_msiof_spi_suspend() local
1413 return spi_controller_suspend(p->ctlr); in sh_msiof_spi_suspend()
1418 struct sh_msiof_spi_priv *p = dev_get_drvdata(dev); in sh_msiof_spi_resume() local
1420 return spi_controller_resume(p->ctlr); in sh_msiof_spi_resume()