Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bf931a01 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'next-spi' of git://git.secretlab.ca/git/linux-2.6

* 'next-spi' of git://git.secretlab.ca/git/linux-2.6:
  spi: spi_txx9.c: use resource_size()
  spi: spi_sh_sci.c: use resource_size()
  spi: spi_mpc8xxx.c: use resource_size()
  spi: spi_bfin5xx.c: use resource_size()
  spi: atmel_spi.c: use resource_size()
  spi: Add s3c64xx SPI Controller driver
  atmel_spi: fix dma addr calculation for len > BUFFER_SIZE
  spi_s3c24xx: add FIQ pseudo-DMA support
  spi: controller driver for Designware SPI core
  spidev: add proper section markers
  spidev: use DECLARE_BITMAP instead of declaring the array
parents 4e46aa08 d53342bf
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -18,6 +18,8 @@ struct s3c2410_spi_info {
	unsigned int		 num_cs;	/* total chipselects */
	unsigned int		 num_cs;	/* total chipselects */
	int			 bus_num;       /* bus number to use. */
	int			 bus_num;       /* bus number to use. */


	unsigned int		 use_fiq:1;	/* use fiq */

	void (*gpio_setup)(struct s3c2410_spi_info *spi, int enable);
	void (*gpio_setup)(struct s3c2410_spi_info *spi, int enable);
	void (*set_cs)(struct s3c2410_spi_info *spi, int cs, int pol);
	void (*set_cs)(struct s3c2410_spi_info *spi, int cs, int pol);
};
};
+28 −0
Original line number Original line Diff line number Diff line
@@ -216,6 +216,17 @@ config SPI_S3C24XX
	help
	help
	  SPI driver for Samsung S3C24XX series ARM SoCs
	  SPI driver for Samsung S3C24XX series ARM SoCs


config SPI_S3C24XX_FIQ
	bool "S3C24XX driver with FIQ pseudo-DMA"
	depends on SPI_S3C24XX
	select FIQ
	help
	  Enable FIQ support for the S3C24XX SPI driver to provide pseudo
	  DMA by using the fast-interrupt request framework, This allows
	  the driver to get DMA-like performance when there are either
	  no free DMA channels, or when doing transfers that required both
	  TX and RX data paths.

config SPI_S3C24XX_GPIO
config SPI_S3C24XX_GPIO
	tristate "Samsung S3C24XX series SPI by GPIO"
	tristate "Samsung S3C24XX series SPI by GPIO"
	depends on ARCH_S3C2410 && EXPERIMENTAL
	depends on ARCH_S3C2410 && EXPERIMENTAL
@@ -226,6 +237,13 @@ config SPI_S3C24XX_GPIO
	  the inbuilt hardware cannot provide the transfer mode, or
	  the inbuilt hardware cannot provide the transfer mode, or
	  where the board is using non hardware connected pins.
	  where the board is using non hardware connected pins.


config SPI_S3C64XX
	tristate "Samsung S3C64XX series type SPI"
	depends on ARCH_S3C64XX && EXPERIMENTAL
	select S3C64XX_DMA
	help
	  SPI driver for Samsung S3C64XX and newer SoCs.

config SPI_SH_MSIOF
config SPI_SH_MSIOF
	tristate "SuperH MSIOF SPI controller"
	tristate "SuperH MSIOF SPI controller"
	depends on SUPERH && HAVE_CLK
	depends on SUPERH && HAVE_CLK
@@ -289,6 +307,16 @@ config SPI_NUC900
# Add new SPI master controllers in alphabetical order above this line
# Add new SPI master controllers in alphabetical order above this line
#
#


config SPI_DESIGNWARE
	bool "DesignWare SPI controller core support"
	depends on SPI_MASTER
	help
	  general driver for SPI controller core from DesignWare

config SPI_DW_PCI
	tristate "PCI interface driver for DW SPI core"
	depends on SPI_DESIGNWARE && PCI

#
#
# There are lots of SPI device types, with sensors and memory
# There are lots of SPI device types, with sensors and memory
# being probably the most widely used ones.
# being probably the most widely used ones.
+9 −1
Original line number Original line Diff line number Diff line
@@ -16,6 +16,8 @@ obj-$(CONFIG_SPI_BFIN) += spi_bfin5xx.o
obj-$(CONFIG_SPI_BITBANG)		+= spi_bitbang.o
obj-$(CONFIG_SPI_BITBANG)		+= spi_bitbang.o
obj-$(CONFIG_SPI_AU1550)		+= au1550_spi.o
obj-$(CONFIG_SPI_AU1550)		+= au1550_spi.o
obj-$(CONFIG_SPI_BUTTERFLY)		+= spi_butterfly.o
obj-$(CONFIG_SPI_BUTTERFLY)		+= spi_butterfly.o
obj-$(CONFIG_SPI_DESIGNWARE)		+= dw_spi.o
obj-$(CONFIG_SPI_DW_PCI)		+= dw_spi_pci.o
obj-$(CONFIG_SPI_GPIO)			+= spi_gpio.o
obj-$(CONFIG_SPI_GPIO)			+= spi_gpio.o
obj-$(CONFIG_SPI_IMX)			+= spi_imx.o
obj-$(CONFIG_SPI_IMX)			+= spi_imx.o
obj-$(CONFIG_SPI_LM70_LLP)		+= spi_lm70llp.o
obj-$(CONFIG_SPI_LM70_LLP)		+= spi_lm70llp.o
@@ -30,7 +32,8 @@ obj-$(CONFIG_SPI_MPC52xx) += mpc52xx_spi.o
obj-$(CONFIG_SPI_MPC8xxx)		+= spi_mpc8xxx.o
obj-$(CONFIG_SPI_MPC8xxx)		+= spi_mpc8xxx.o
obj-$(CONFIG_SPI_PPC4xx)		+= spi_ppc4xx.o
obj-$(CONFIG_SPI_PPC4xx)		+= spi_ppc4xx.o
obj-$(CONFIG_SPI_S3C24XX_GPIO)		+= spi_s3c24xx_gpio.o
obj-$(CONFIG_SPI_S3C24XX_GPIO)		+= spi_s3c24xx_gpio.o
obj-$(CONFIG_SPI_S3C24XX)		+= spi_s3c24xx.o
obj-$(CONFIG_SPI_S3C24XX)		+= spi_s3c24xx_hw.o
obj-$(CONFIG_SPI_S3C64XX)		+= spi_s3c64xx.o
obj-$(CONFIG_SPI_TXX9)			+= spi_txx9.o
obj-$(CONFIG_SPI_TXX9)			+= spi_txx9.o
obj-$(CONFIG_SPI_XILINX)		+= xilinx_spi.o
obj-$(CONFIG_SPI_XILINX)		+= xilinx_spi.o
obj-$(CONFIG_SPI_XILINX_OF)		+= xilinx_spi_of.o
obj-$(CONFIG_SPI_XILINX_OF)		+= xilinx_spi_of.o
@@ -39,6 +42,11 @@ obj-$(CONFIG_SPI_SH_SCI) += spi_sh_sci.o
obj-$(CONFIG_SPI_SH_MSIOF)		+= spi_sh_msiof.o
obj-$(CONFIG_SPI_SH_MSIOF)		+= spi_sh_msiof.o
obj-$(CONFIG_SPI_STMP3XXX)		+= spi_stmp.o
obj-$(CONFIG_SPI_STMP3XXX)		+= spi_stmp.o
obj-$(CONFIG_SPI_NUC900)		+= spi_nuc900.o
obj-$(CONFIG_SPI_NUC900)		+= spi_nuc900.o

# special build for s3c24xx spi driver with fiq support
spi_s3c24xx_hw-y			:= spi_s3c24xx.o
spi_s3c24xx_hw-$(CONFIG_SPI_S3C24XX_FIQ) += spi_s3c24xx_fiq.o

# 	... add above this line ...
# 	... add above this line ...


# SPI protocol drivers (device/link on bus)
# SPI protocol drivers (device/link on bus)
+3 −3
Original line number Original line Diff line number Diff line
@@ -189,14 +189,14 @@ static void atmel_spi_next_xfer_data(struct spi_master *master,


	/* use scratch buffer only when rx or tx data is unspecified */
	/* use scratch buffer only when rx or tx data is unspecified */
	if (xfer->rx_buf)
	if (xfer->rx_buf)
		*rx_dma = xfer->rx_dma + xfer->len - len;
		*rx_dma = xfer->rx_dma + xfer->len - *plen;
	else {
	else {
		*rx_dma = as->buffer_dma;
		*rx_dma = as->buffer_dma;
		if (len > BUFFER_SIZE)
		if (len > BUFFER_SIZE)
			len = BUFFER_SIZE;
			len = BUFFER_SIZE;
	}
	}
	if (xfer->tx_buf)
	if (xfer->tx_buf)
		*tx_dma = xfer->tx_dma + xfer->len - len;
		*tx_dma = xfer->tx_dma + xfer->len - *plen;
	else {
	else {
		*tx_dma = as->buffer_dma;
		*tx_dma = as->buffer_dma;
		if (len > BUFFER_SIZE)
		if (len > BUFFER_SIZE)
@@ -788,7 +788,7 @@ static int __init atmel_spi_probe(struct platform_device *pdev)
	spin_lock_init(&as->lock);
	spin_lock_init(&as->lock);
	INIT_LIST_HEAD(&as->queue);
	INIT_LIST_HEAD(&as->queue);
	as->pdev = pdev;
	as->pdev = pdev;
	as->regs = ioremap(regs->start, (regs->end - regs->start) + 1);
	as->regs = ioremap(regs->start, resource_size(regs));
	if (!as->regs)
	if (!as->regs)
		goto out_free_buffer;
		goto out_free_buffer;
	as->irq = irq;
	as->irq = irq;

drivers/spi/dw_spi.c

0 → 100644
+944 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading