Skip to content

Commit

Permalink
Merge branch 'spi/next' of git://git.secretlab.ca/git/linux-2.6
Browse files Browse the repository at this point in the history
* 'spi/next' of git://git.secretlab.ca/git/linux-2.6: (34 commits)
  spi/imx: add device tree probe support
  spi/imx: copy gpio number passed by platform data into driver private data
  spi/imx: use soc name in spi device type naming scheme
  spi/imx: merge type SPI_IMX_VER_0_7 into SPI_IMX_VER_0_4
  spi/imx: do not use spi_imx2_3 to name SPI_IMX_VER_2_3 function and macro
  spi/imx: use mx21 to name SPI_IMX_VER_0_0 function and macro
  spi/imx: do not make copy of spi_imx_devtype_data
  spi/dw: Add spi number into spi irq desc
  spi/tegra: Use engineering names in DT compatible property
  spi/fsl_spi: fix CPM spi driver
  mach-s3c2410: remove unused spi-gpio.h file
  spi: remove obsolete spi-s3c24xx-gpio driver
  mach-gta2: remove unused spi-gpio.h include
  mach-qt2410: convert to spi_gpio
  mach-jive: convert to spi_gpio
  spi/pxa2xx: Remove unavailable ssp_type from documentation
  spi/bfin_spi: uninline fat queue funcs
  spi/bfin_spi: constify pin array
  spi/bfin_spi: use structs for accessing hardware regs
  spi/topcliff-pch: Support new device ML7223 IOH
  ...

Fix up trivial conflict in arch/arm/mach-ep93xx/Makefile
  • Loading branch information
Linus Torvalds committed Jul 22, 2011
2 parents c7c8518 + 22a85e4 commit 7235dd7
Show file tree
Hide file tree
Showing 80 changed files with 3,494 additions and 1,997 deletions.
22 changes: 22 additions & 0 deletions Documentation/devicetree/bindings/spi/fsl-imx-cspi.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
* Freescale (Enhanced) Configurable Serial Peripheral Interface
(CSPI/eCSPI) for i.MX

Required properties:
- compatible : Should be "fsl,<soc>-cspi" or "fsl,<soc>-ecspi"
- reg : Offset and length of the register set for the device
- interrupts : Should contain CSPI/eCSPI interrupt
- fsl,spi-num-chipselects : Contains the number of the chipselect
- cs-gpios : Specifies the gpio pins to be used for chipselects.

Example:

ecspi@70010000 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "fsl,imx51-ecspi";
reg = <0x70010000 0x4000>;
interrupts = <36>;
fsl,spi-num-chipselects = <2>;
cs-gpios = <&gpio3 24 0>, /* GPIO4_24 */
<&gpio3 25 0>; /* GPIO4_25 */
};
5 changes: 5 additions & 0 deletions Documentation/devicetree/bindings/spi/spi_nvidia.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
NVIDIA Tegra 2 SPI device

Required properties:
- compatible : should be "nvidia,tegra20-spi".
- gpios : should specify GPIOs used for chipselect.
10 changes: 10 additions & 0 deletions Documentation/spi/ep93xx_spi
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,16 @@ static void __init ts72xx_init_machine(void)
ARRAY_SIZE(ts72xx_spi_devices));
}

The driver can use DMA for the transfers also. In this case ts72xx_spi_info
becomes:

static struct ep93xx_spi_info ts72xx_spi_info = {
.num_chipselect = ARRAY_SIZE(ts72xx_spi_devices),
.use_dma = true;
};

Note that CONFIG_EP93XX_DMA should be enabled as well.

Thanks to
=========
Martin Guy, H. Hartley Sweeten and others who helped me during development of
Expand Down
5 changes: 0 additions & 5 deletions Documentation/spi/pxa2xx
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,11 @@ Typically a SPI master is defined in the arch/.../mach-*/board-*.c as a
found in include/linux/spi/pxa2xx_spi.h:

struct pxa2xx_spi_master {
enum pxa_ssp_type ssp_type;
u32 clock_enable;
u16 num_chipselect;
u8 enable_dma;
};

The "pxa2xx_spi_master.ssp_type" field must have a value between 1 and 3 and
informs the driver which features a particular SSP supports.

The "pxa2xx_spi_master.clock_enable" field is used to enable/disable the
corresponding SSP peripheral block in the "Clock Enable Register (CKEN"). See
the "PXA2xx Developer Manual" section "Clocks and Power Management".
Expand Down Expand Up @@ -61,7 +57,6 @@ static struct resource pxa_spi_nssp_resources[] = {
};

static struct pxa2xx_spi_master pxa_nssp_master_info = {
.ssp_type = PXA25x_NSSP, /* Type of SSP */
.clock_enable = CKEN_NSSP, /* NSSP Peripheral clock */
.num_chipselect = 1, /* Matches the number of chips attached to NSSP */
.enable_dma = 1, /* Enables NSSP DMA */
Expand Down
4 changes: 3 additions & 1 deletion arch/arm/mach-ep93xx/Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
#
# Makefile for the linux kernel.
#
obj-y := core.o clock.o dma-m2p.o
obj-y := core.o clock.o
obj-m :=
obj-n :=
obj- :=

obj-$(CONFIG_EP93XX_DMA) += dma.o

obj-$(CONFIG_MACH_ADSSPHERE) += adssphere.o
obj-$(CONFIG_MACH_EDB93XX) += edb93xx.o
obj-$(CONFIG_MACH_GESBC9312) += gesbc9312.o
Expand Down
6 changes: 5 additions & 1 deletion arch/arm/mach-ep93xx/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -506,11 +506,15 @@ static struct resource ep93xx_spi_resources[] = {
},
};

static u64 ep93xx_spi_dma_mask = DMA_BIT_MASK(32);

static struct platform_device ep93xx_spi_device = {
.name = "ep93xx-spi",
.id = 0,
.dev = {
.platform_data = &ep93xx_spi_master_data,
.platform_data = &ep93xx_spi_master_data,
.coherent_dma_mask = DMA_BIT_MASK(32),
.dma_mask = &ep93xx_spi_dma_mask,
},
.num_resources = ARRAY_SIZE(ep93xx_spi_resources),
.resource = ep93xx_spi_resources,
Expand Down
Loading

0 comments on commit 7235dd7

Please sign in to comment.