mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-25 05:04:09 +08:00
Merge remote-tracking branches 'spi/topic/falcon', 'spi/topic/fsf', 'spi/topic/fsl', 'spi/topic/fsl-dspi' and 'spi/topic/gpio' into spi-next
This commit is contained in:
commit
d6cd09bea9
@ -289,7 +289,7 @@ config SPI_FSL_CPM
|
||||
depends on FSL_SOC
|
||||
|
||||
config SPI_FSL_SPI
|
||||
bool "Freescale SPI controller and Aeroflex Gaisler GRLIB SPI controller"
|
||||
tristate "Freescale SPI controller and Aeroflex Gaisler GRLIB SPI controller"
|
||||
depends on OF
|
||||
select SPI_FSL_LIB
|
||||
select SPI_FSL_CPM if FSL_SOC
|
||||
@ -302,7 +302,6 @@ config SPI_FSL_SPI
|
||||
|
||||
config SPI_FSL_DSPI
|
||||
tristate "Freescale DSPI controller"
|
||||
select SPI_BITBANG
|
||||
select REGMAP_MMIO
|
||||
depends on SOC_VF610 || COMPILE_TEST
|
||||
help
|
||||
@ -310,7 +309,7 @@ config SPI_FSL_DSPI
|
||||
mode. VF610 platform uses the controller.
|
||||
|
||||
config SPI_FSL_ESPI
|
||||
bool "Freescale eSPI controller"
|
||||
tristate "Freescale eSPI controller"
|
||||
depends on FSL_SOC
|
||||
select SPI_FSL_LIB
|
||||
help
|
||||
|
@ -15,10 +15,6 @@
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include <linux/init.h>
|
||||
|
@ -17,10 +17,6 @@
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <linux/clk.h>
|
||||
|
@ -13,10 +13,6 @@
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
*/
|
||||
|
||||
#include <linux/kernel.h>
|
||||
|
@ -10,10 +10,6 @@
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include <linux/spinlock.h>
|
||||
|
@ -12,10 +12,6 @@
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/init.h>
|
||||
|
@ -12,11 +12,6 @@
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
#include <linux/kernel.h>
|
||||
|
@ -11,10 +11,6 @@
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include <linux/interrupt.h>
|
||||
|
@ -353,16 +353,6 @@ static int falcon_sflash_setup(struct spi_device *spi)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int falcon_sflash_prepare_xfer(struct spi_master *master)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int falcon_sflash_unprepare_xfer(struct spi_master *master)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int falcon_sflash_xfer_one(struct spi_master *master,
|
||||
struct spi_message *m)
|
||||
{
|
||||
@ -420,9 +410,7 @@ static int falcon_sflash_probe(struct platform_device *pdev)
|
||||
master->mode_bits = SPI_MODE_3;
|
||||
master->flags = SPI_MASTER_HALF_DUPLEX;
|
||||
master->setup = falcon_sflash_setup;
|
||||
master->prepare_transfer_hardware = falcon_sflash_prepare_xfer;
|
||||
master->transfer_one_message = falcon_sflash_xfer_one;
|
||||
master->unprepare_transfer_hardware = falcon_sflash_unprepare_xfer;
|
||||
master->dev.of_node = pdev->dev.of_node;
|
||||
|
||||
ret = devm_spi_register_master(&pdev->dev, master);
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <linux/fsl_devices.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/of_address.h>
|
||||
#include <linux/spi/spi.h>
|
||||
#include <linux/types.h>
|
||||
@ -68,6 +69,7 @@ void fsl_spi_cpm_reinit_txrx(struct mpc8xxx_spi *mspi)
|
||||
}
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(fsl_spi_cpm_reinit_txrx);
|
||||
|
||||
static void fsl_spi_cpm_bufs_start(struct mpc8xxx_spi *mspi)
|
||||
{
|
||||
@ -162,6 +164,7 @@ err_rx_dma:
|
||||
dma_unmap_single(dev, mspi->tx_dma, t->len, DMA_TO_DEVICE);
|
||||
return -ENOMEM;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(fsl_spi_cpm_bufs);
|
||||
|
||||
void fsl_spi_cpm_bufs_complete(struct mpc8xxx_spi *mspi)
|
||||
{
|
||||
@ -174,6 +177,7 @@ void fsl_spi_cpm_bufs_complete(struct mpc8xxx_spi *mspi)
|
||||
dma_unmap_single(dev, mspi->rx_dma, t->len, DMA_FROM_DEVICE);
|
||||
mspi->xfer_in_progress = NULL;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(fsl_spi_cpm_bufs_complete);
|
||||
|
||||
void fsl_spi_cpm_irq(struct mpc8xxx_spi *mspi, u32 events)
|
||||
{
|
||||
@ -198,6 +202,7 @@ void fsl_spi_cpm_irq(struct mpc8xxx_spi *mspi, u32 events)
|
||||
else
|
||||
complete(&mspi->done);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(fsl_spi_cpm_irq);
|
||||
|
||||
static void *fsl_spi_alloc_dummy_rx(void)
|
||||
{
|
||||
@ -375,6 +380,7 @@ err_pram:
|
||||
fsl_spi_free_dummy_rx();
|
||||
return -ENOMEM;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(fsl_spi_cpm_init);
|
||||
|
||||
void fsl_spi_cpm_free(struct mpc8xxx_spi *mspi)
|
||||
{
|
||||
@ -389,3 +395,6 @@ void fsl_spi_cpm_free(struct mpc8xxx_spi *mspi)
|
||||
cpm_muram_free(cpm_muram_offset(mspi->pram));
|
||||
fsl_spi_free_dummy_rx();
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(fsl_spi_cpm_free);
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
|
@ -106,7 +106,7 @@ struct chip_data {
|
||||
};
|
||||
|
||||
struct fsl_dspi {
|
||||
struct spi_bitbang bitbang;
|
||||
struct spi_master *master;
|
||||
struct platform_device *pdev;
|
||||
|
||||
struct regmap *regmap;
|
||||
@ -114,6 +114,7 @@ struct fsl_dspi {
|
||||
struct clk *clk;
|
||||
|
||||
struct spi_transfer *cur_transfer;
|
||||
struct spi_message *cur_msg;
|
||||
struct chip_data *cur_chip;
|
||||
size_t len;
|
||||
void *tx;
|
||||
@ -123,6 +124,7 @@ struct fsl_dspi {
|
||||
char dataflags;
|
||||
u8 cs;
|
||||
u16 void_write_data;
|
||||
u32 cs_change;
|
||||
|
||||
wait_queue_head_t waitq;
|
||||
u32 waitflags;
|
||||
@ -225,6 +227,8 @@ static int dspi_transfer_write(struct fsl_dspi *dspi)
|
||||
if (dspi->len == 0 || tx_count == DSPI_FIFO_SIZE - 1) {
|
||||
/* last transfer in the transfer */
|
||||
dspi_pushr |= SPI_PUSHR_EOQ;
|
||||
if ((dspi->cs_change) && (!dspi->len))
|
||||
dspi_pushr &= ~SPI_PUSHR_CONT;
|
||||
} else if (tx_word && (dspi->len == 1))
|
||||
dspi_pushr |= SPI_PUSHR_EOQ;
|
||||
|
||||
@ -246,6 +250,7 @@ static int dspi_transfer_read(struct fsl_dspi *dspi)
|
||||
int rx_count = 0;
|
||||
int rx_word = is_double_byte_mode(dspi);
|
||||
u16 d;
|
||||
|
||||
while ((dspi->rx < dspi->rx_end)
|
||||
&& (rx_count < DSPI_FIFO_SIZE)) {
|
||||
if (rx_word) {
|
||||
@ -276,69 +281,79 @@ static int dspi_transfer_read(struct fsl_dspi *dspi)
|
||||
return rx_count;
|
||||
}
|
||||
|
||||
static int dspi_txrx_transfer(struct spi_device *spi, struct spi_transfer *t)
|
||||
static int dspi_transfer_one_message(struct spi_master *master,
|
||||
struct spi_message *message)
|
||||
{
|
||||
struct fsl_dspi *dspi = spi_master_get_devdata(spi->master);
|
||||
dspi->cur_transfer = t;
|
||||
dspi->cur_chip = spi_get_ctldata(spi);
|
||||
dspi->cs = spi->chip_select;
|
||||
dspi->void_write_data = dspi->cur_chip->void_write_data;
|
||||
struct fsl_dspi *dspi = spi_master_get_devdata(master);
|
||||
struct spi_device *spi = message->spi;
|
||||
struct spi_transfer *transfer;
|
||||
int status = 0;
|
||||
message->actual_length = 0;
|
||||
|
||||
dspi->dataflags = 0;
|
||||
dspi->tx = (void *)t->tx_buf;
|
||||
dspi->tx_end = dspi->tx + t->len;
|
||||
dspi->rx = t->rx_buf;
|
||||
dspi->rx_end = dspi->rx + t->len;
|
||||
dspi->len = t->len;
|
||||
list_for_each_entry(transfer, &message->transfers, transfer_list) {
|
||||
dspi->cur_transfer = transfer;
|
||||
dspi->cur_msg = message;
|
||||
dspi->cur_chip = spi_get_ctldata(spi);
|
||||
dspi->cs = spi->chip_select;
|
||||
if (dspi->cur_transfer->transfer_list.next
|
||||
== &dspi->cur_msg->transfers)
|
||||
transfer->cs_change = 1;
|
||||
dspi->cs_change = transfer->cs_change;
|
||||
dspi->void_write_data = dspi->cur_chip->void_write_data;
|
||||
|
||||
if (!dspi->rx)
|
||||
dspi->dataflags |= TRAN_STATE_RX_VOID;
|
||||
dspi->dataflags = 0;
|
||||
dspi->tx = (void *)transfer->tx_buf;
|
||||
dspi->tx_end = dspi->tx + transfer->len;
|
||||
dspi->rx = transfer->rx_buf;
|
||||
dspi->rx_end = dspi->rx + transfer->len;
|
||||
dspi->len = transfer->len;
|
||||
|
||||
if (!dspi->tx)
|
||||
dspi->dataflags |= TRAN_STATE_TX_VOID;
|
||||
if (!dspi->rx)
|
||||
dspi->dataflags |= TRAN_STATE_RX_VOID;
|
||||
|
||||
regmap_write(dspi->regmap, SPI_MCR, dspi->cur_chip->mcr_val);
|
||||
regmap_write(dspi->regmap, SPI_CTAR(dspi->cs), dspi->cur_chip->ctar_val);
|
||||
regmap_write(dspi->regmap, SPI_RSER, SPI_RSER_EOQFE);
|
||||
if (!dspi->tx)
|
||||
dspi->dataflags |= TRAN_STATE_TX_VOID;
|
||||
|
||||
if (t->speed_hz)
|
||||
regmap_write(dspi->regmap, SPI_MCR, dspi->cur_chip->mcr_val);
|
||||
regmap_update_bits(dspi->regmap, SPI_MCR,
|
||||
SPI_MCR_CLR_TXF | SPI_MCR_CLR_RXF,
|
||||
SPI_MCR_CLR_TXF | SPI_MCR_CLR_RXF);
|
||||
regmap_write(dspi->regmap, SPI_CTAR(dspi->cs),
|
||||
dspi->cur_chip->ctar_val);
|
||||
if (transfer->speed_hz)
|
||||
regmap_write(dspi->regmap, SPI_CTAR(dspi->cs),
|
||||
dspi->cur_chip->ctar_val);
|
||||
|
||||
dspi_transfer_write(dspi);
|
||||
regmap_write(dspi->regmap, SPI_RSER, SPI_RSER_EOQFE);
|
||||
message->actual_length += dspi_transfer_write(dspi);
|
||||
|
||||
if (wait_event_interruptible(dspi->waitq, dspi->waitflags))
|
||||
dev_err(&dspi->pdev->dev, "wait transfer complete fail!\n");
|
||||
dspi->waitflags = 0;
|
||||
if (wait_event_interruptible(dspi->waitq, dspi->waitflags))
|
||||
dev_err(&dspi->pdev->dev, "wait transfer complete fail!\n");
|
||||
dspi->waitflags = 0;
|
||||
|
||||
return t->len - dspi->len;
|
||||
}
|
||||
|
||||
static void dspi_chipselect(struct spi_device *spi, int value)
|
||||
{
|
||||
struct fsl_dspi *dspi = spi_master_get_devdata(spi->master);
|
||||
unsigned int pushr;
|
||||
|
||||
regmap_read(dspi->regmap, SPI_PUSHR, &pushr);
|
||||
|
||||
switch (value) {
|
||||
case BITBANG_CS_ACTIVE:
|
||||
pushr |= SPI_PUSHR_CONT;
|
||||
break;
|
||||
case BITBANG_CS_INACTIVE:
|
||||
pushr &= ~SPI_PUSHR_CONT;
|
||||
break;
|
||||
if (transfer->delay_usecs)
|
||||
udelay(transfer->delay_usecs);
|
||||
}
|
||||
|
||||
regmap_write(dspi->regmap, SPI_PUSHR, pushr);
|
||||
message->status = status;
|
||||
spi_finalize_current_message(master);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
static int dspi_setup_transfer(struct spi_device *spi, struct spi_transfer *t)
|
||||
static int dspi_setup(struct spi_device *spi)
|
||||
{
|
||||
struct chip_data *chip;
|
||||
struct fsl_dspi *dspi = spi_master_get_devdata(spi->master);
|
||||
unsigned char br = 0, pbr = 0, fmsz = 0;
|
||||
|
||||
if ((spi->bits_per_word >= 4) && (spi->bits_per_word <= 16)) {
|
||||
fmsz = spi->bits_per_word - 1;
|
||||
} else {
|
||||
pr_err("Invalid wordsize\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
/* Only alloc on first setup */
|
||||
chip = spi_get_ctldata(spi);
|
||||
if (chip == NULL) {
|
||||
@ -349,12 +364,6 @@ static int dspi_setup_transfer(struct spi_device *spi, struct spi_transfer *t)
|
||||
|
||||
chip->mcr_val = SPI_MCR_MASTER | SPI_MCR_PCSIS |
|
||||
SPI_MCR_CLR_TXF | SPI_MCR_CLR_RXF;
|
||||
if ((spi->bits_per_word >= 4) && (spi->bits_per_word <= 16)) {
|
||||
fmsz = spi->bits_per_word - 1;
|
||||
} else {
|
||||
pr_err("Invalid wordsize\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
chip->void_write_data = 0;
|
||||
|
||||
@ -373,14 +382,6 @@ static int dspi_setup_transfer(struct spi_device *spi, struct spi_transfer *t)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int dspi_setup(struct spi_device *spi)
|
||||
{
|
||||
if (!spi->max_speed_hz)
|
||||
return -EINVAL;
|
||||
|
||||
return dspi_setup_transfer(spi, NULL);
|
||||
}
|
||||
|
||||
static void dspi_cleanup(struct spi_device *spi)
|
||||
{
|
||||
struct chip_data *chip = spi_get_ctldata((struct spi_device *)spi);
|
||||
@ -395,22 +396,20 @@ static irqreturn_t dspi_interrupt(int irq, void *dev_id)
|
||||
{
|
||||
struct fsl_dspi *dspi = (struct fsl_dspi *)dev_id;
|
||||
|
||||
regmap_write(dspi->regmap, SPI_SR, SPI_SR_EOQF);
|
||||
struct spi_message *msg = dspi->cur_msg;
|
||||
|
||||
regmap_write(dspi->regmap, SPI_SR, SPI_SR_EOQF);
|
||||
dspi_transfer_read(dspi);
|
||||
|
||||
if (!dspi->len) {
|
||||
if (dspi->dataflags & TRAN_STATE_WORD_ODD_NUM)
|
||||
regmap_update_bits(dspi->regmap, SPI_CTAR(dspi->cs),
|
||||
SPI_FRAME_BITS_MASK, SPI_FRAME_BITS(16));
|
||||
SPI_FRAME_BITS_MASK, SPI_FRAME_BITS(16));
|
||||
|
||||
dspi->waitflags = 1;
|
||||
wake_up_interruptible(&dspi->waitq);
|
||||
} else {
|
||||
dspi_transfer_write(dspi);
|
||||
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
} else
|
||||
msg->actual_length += dspi_transfer_write(dspi);
|
||||
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
@ -469,12 +468,12 @@ static int dspi_probe(struct platform_device *pdev)
|
||||
|
||||
dspi = spi_master_get_devdata(master);
|
||||
dspi->pdev = pdev;
|
||||
dspi->bitbang.master = master;
|
||||
dspi->bitbang.chipselect = dspi_chipselect;
|
||||
dspi->bitbang.setup_transfer = dspi_setup_transfer;
|
||||
dspi->bitbang.txrx_bufs = dspi_txrx_transfer;
|
||||
dspi->bitbang.master->setup = dspi_setup;
|
||||
dspi->bitbang.master->dev.of_node = pdev->dev.of_node;
|
||||
dspi->master = master;
|
||||
|
||||
master->transfer = NULL;
|
||||
master->setup = dspi_setup;
|
||||
master->transfer_one_message = dspi_transfer_one_message;
|
||||
master->dev.of_node = pdev->dev.of_node;
|
||||
|
||||
master->cleanup = dspi_cleanup;
|
||||
master->mode_bits = SPI_CPOL | SPI_CPHA;
|
||||
@ -535,7 +534,7 @@ static int dspi_probe(struct platform_device *pdev)
|
||||
init_waitqueue_head(&dspi->waitq);
|
||||
platform_set_drvdata(pdev, master);
|
||||
|
||||
ret = spi_bitbang_start(&dspi->bitbang);
|
||||
ret = spi_register_master(master);
|
||||
if (ret != 0) {
|
||||
dev_err(&pdev->dev, "Problem registering DSPI master\n");
|
||||
goto out_clk_put;
|
||||
@ -557,9 +556,9 @@ static int dspi_remove(struct platform_device *pdev)
|
||||
struct fsl_dspi *dspi = spi_master_get_devdata(master);
|
||||
|
||||
/* Disconnect from the SPI framework */
|
||||
spi_bitbang_stop(&dspi->bitbang);
|
||||
clk_disable_unprepare(dspi->clk);
|
||||
spi_master_put(dspi->bitbang.master);
|
||||
spi_unregister_master(dspi->master);
|
||||
spi_master_put(dspi->master);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -21,6 +21,7 @@
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/mm.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/of_platform.h>
|
||||
#include <linux/spi/spi.h>
|
||||
#ifdef CONFIG_FSL_SOC
|
||||
@ -35,7 +36,8 @@ void mpc8xxx_spi_rx_buf_##type(u32 data, struct mpc8xxx_spi *mpc8xxx_spi) \
|
||||
type *rx = mpc8xxx_spi->rx; \
|
||||
*rx++ = (type)(data >> mpc8xxx_spi->rx_shift); \
|
||||
mpc8xxx_spi->rx = rx; \
|
||||
}
|
||||
} \
|
||||
EXPORT_SYMBOL_GPL(mpc8xxx_spi_rx_buf_##type);
|
||||
|
||||
#define MPC8XXX_SPI_TX_BUF(type) \
|
||||
u32 mpc8xxx_spi_tx_buf_##type(struct mpc8xxx_spi *mpc8xxx_spi) \
|
||||
@ -47,7 +49,8 @@ u32 mpc8xxx_spi_tx_buf_##type(struct mpc8xxx_spi *mpc8xxx_spi) \
|
||||
data = *tx++ << mpc8xxx_spi->tx_shift; \
|
||||
mpc8xxx_spi->tx = tx; \
|
||||
return data; \
|
||||
}
|
||||
} \
|
||||
EXPORT_SYMBOL_GPL(mpc8xxx_spi_tx_buf_##type);
|
||||
|
||||
MPC8XXX_SPI_RX_BUF(u8)
|
||||
MPC8XXX_SPI_RX_BUF(u16)
|
||||
@ -60,6 +63,7 @@ struct mpc8xxx_spi_probe_info *to_of_pinfo(struct fsl_spi_platform_data *pdata)
|
||||
{
|
||||
return container_of(pdata, struct mpc8xxx_spi_probe_info, pdata);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(to_of_pinfo);
|
||||
|
||||
const char *mpc8xxx_spi_strmode(unsigned int flags)
|
||||
{
|
||||
@ -75,6 +79,7 @@ const char *mpc8xxx_spi_strmode(unsigned int flags)
|
||||
}
|
||||
return "CPU";
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mpc8xxx_spi_strmode);
|
||||
|
||||
void mpc8xxx_spi_probe(struct device *dev, struct resource *mem,
|
||||
unsigned int irq)
|
||||
@ -102,13 +107,12 @@ void mpc8xxx_spi_probe(struct device *dev, struct resource *mem,
|
||||
mpc8xxx_spi->rx_shift = 0;
|
||||
mpc8xxx_spi->tx_shift = 0;
|
||||
|
||||
init_completion(&mpc8xxx_spi->done);
|
||||
|
||||
master->bus_num = pdata->bus_num;
|
||||
master->num_chipselect = pdata->max_chipselect;
|
||||
|
||||
init_completion(&mpc8xxx_spi->done);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mpc8xxx_spi_probe);
|
||||
|
||||
int mpc8xxx_spi_remove(struct device *dev)
|
||||
{
|
||||
@ -127,6 +131,7 @@ int mpc8xxx_spi_remove(struct device *dev)
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mpc8xxx_spi_remove);
|
||||
|
||||
int of_mpc8xxx_spi_probe(struct platform_device *ofdev)
|
||||
{
|
||||
@ -173,3 +178,6 @@ int of_mpc8xxx_spi_probe(struct platform_device *ofdev)
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(of_mpc8xxx_spi_probe);
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
|
@ -28,7 +28,7 @@ struct mpc8xxx_spi {
|
||||
/* rx & tx bufs from the spi_transfer */
|
||||
const void *tx;
|
||||
void *rx;
|
||||
#ifdef CONFIG_SPI_FSL_ESPI
|
||||
#if IS_ENABLED(CONFIG_SPI_FSL_ESPI)
|
||||
int len;
|
||||
#endif
|
||||
|
||||
@ -68,7 +68,7 @@ struct mpc8xxx_spi {
|
||||
|
||||
unsigned int flags;
|
||||
|
||||
#ifdef CONFIG_SPI_FSL_SPI
|
||||
#if IS_ENABLED(CONFIG_SPI_FSL_SPI)
|
||||
int type;
|
||||
int native_chipselects;
|
||||
u8 max_bits_per_word;
|
||||
|
@ -12,10 +12,6 @@
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/module.h>
|
||||
@ -92,7 +88,7 @@ struct spi_gpio {
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
static inline struct spi_gpio * __pure
|
||||
static inline struct spi_gpio *__pure
|
||||
spi_to_spi_gpio(const struct spi_device *spi)
|
||||
{
|
||||
const struct spi_bitbang *bang;
|
||||
@ -103,7 +99,7 @@ spi_to_spi_gpio(const struct spi_device *spi)
|
||||
return spi_gpio;
|
||||
}
|
||||
|
||||
static inline struct spi_gpio_platform_data * __pure
|
||||
static inline struct spi_gpio_platform_data *__pure
|
||||
spi_to_pdata(const struct spi_device *spi)
|
||||
{
|
||||
return &spi_to_spi_gpio(spi)->pdata;
|
||||
|
@ -12,10 +12,6 @@
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#include <linux/init.h>
|
||||
|
@ -16,11 +16,6 @@
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/init.h>
|
||||
|
@ -28,10 +28,6 @@
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/init.h>
|
||||
|
@ -14,11 +14,6 @@
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
|
||||
#include <linux/kernel.h>
|
||||
|
@ -12,10 +12,6 @@
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#include <linux/delay.h>
|
||||
|
@ -11,10 +11,6 @@
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#include <linux/init.h>
|
||||
|
@ -15,11 +15,6 @@
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
#include <linux/module.h>
|
||||
|
@ -11,10 +11,6 @@
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#include <linux/init.h>
|
||||
|
@ -12,10 +12,6 @@
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include <linux/kernel.h>
|
||||
|
@ -16,11 +16,6 @@
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
#include <linux/clk.h>
|
||||
|
@ -14,11 +14,6 @@
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
#include <linux/module.h>
|
||||
|
@ -11,10 +11,6 @@
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <linux/delay.h>
|
||||
|
@ -13,10 +13,6 @@
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#include <linux/kernel.h>
|
||||
|
@ -14,10 +14,6 @@
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#include <linux/init.h>
|
||||
|
@ -12,10 +12,6 @@
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Written by:
|
||||
* Dmitry Eremin-Solenikov <dmitry.baryshkov@siemens.com>
|
||||
*/
|
||||
|
@ -12,10 +12,6 @@
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef _INCLUDE_LINUX_SPI_L4F00242T03_H_
|
||||
|
@ -11,10 +11,6 @@
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef _INCLUDE_LINUX_SPI_LMS283GF05_H_
|
||||
|
@ -15,10 +15,6 @@
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
#ifndef __LINUX_SPI_MXS_SPI_H__
|
||||
|
@ -10,10 +10,6 @@
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
#ifndef __linux_pxa2xx_spi_h
|
||||
#define __linux_pxa2xx_spi_h
|
||||
|
@ -11,11 +11,6 @@
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __LINUX_SPI_RENESAS_SPI_H__
|
||||
|
@ -9,10 +9,6 @@
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
#ifndef SH_HSPI_H
|
||||
#define SH_HSPI_H
|
||||
|
@ -10,10 +10,6 @@
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#ifndef __LINUX_SPI_H
|
||||
|
@ -12,10 +12,6 @@
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
struct tle62x0_pdata {
|
||||
|
@ -12,11 +12,6 @@
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _LINUX_SPI_TSC2005_H
|
||||
|
Loading…
Reference in New Issue
Block a user