/* * SuperH MSIOF SPI Master Interface * * Copyright (c) 2009 Magnus Damm * Copyright (C) 2014 Renesas Electronics Corporation * Copyright (C) 2014-2017 Glider bvba * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * */#include<linux/bitmap.h>#include<linux/clk.h>#include<linux/completion.h>#include<linux/delay.h>#include<linux/dma-mapping.h>#include<linux/dmaengine.h>#include<linux/err.h>#include<linux/gpio.h>#include<linux/gpio/consumer.h>#include<linux/interrupt.h>#include<linux/io.h>#include<linux/kernel.h>#include<linux/module.h>#include<linux/of.h>#include<linux/of_device.h>#include<linux/platform_device.h>#include<linux/pm_runtime.h>#include<linux/sh_dma.h>#include<linux/spi/sh_msiof.h>#include<linux/spi/spi.h>#include<asm/unaligned.h>structsh_msiof_chipdata{u16tx_fifo_size;u16rx_fifo_size;u16master_flags;u16min_div_pow;};structsh_msiof_spi_priv{structspi_master*master;void__iomem*mapbase;structclk*clk;structplatform_device*pdev;structsh_msiof_spi_info*info;structcompletiondone;structcompletiondone_txdma;unsignedinttx_fifo_size;unsignedintrx_fifo_size;unsignedintmin_div_pow;void*tx_dma_page;void*rx_dma_page;dma_addr_ttx_dma_addr;dma_addr_trx_dma_addr;unsignedshortunused_ss;boolnative_cs_inited