Skip to contentSkip to conversation

spi: Add PPC4xx SPI driver

PATCH Superseded Stefan Roese 4 participants 5 messages Oct 25, 2008 2 messages not in the archive SPI

v2 of 6 Superseded Latest is v6 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 spi: Add PPC4xx SPI driver

This adds a SPI driver for the SPI controller found in the IBM/AMCC 4xx PowerPC's.

---
Changes in v2:
- Now the gpios property is correctly decoded and the resulting gpio numbers are used as the devices chip selects.

So we can describe the SPI node like this:

	SPI0: spi@ef600900 {
		#address-cells = <1>;
		#size-cells = <0>;
		...

		/* two GPIOs, representing two chip selects: 0 and 1 */
		gpios = <&GPIO0 5 0 &GPIO1 16 0>;

		mmc-slot@0 {
			reg = <0>;
			...
		};

		touchscreen@1 {
			reg = <1>;
			...
		};
	}

Special thanks to Wolfgang Ocker and Anton Vorontsov for their input.

 drivers/spi/Kconfig      |    7 +
 drivers/spi/Makefile     |    1 +
 drivers/spi/spi_ppc4xx.c |  583 ++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 591 insertions(+), 0 deletions(-)
 create mode 100644 drivers/spi/spi_ppc4xx.c
drivers/spi/Kconfig +7 -0
index b9d0efb..69d5fee 100644
@@ -155,6 +155,13 @@ config SPI_ORION
 	help
 	  This enables using the SPI master controller on the Orion chips.
 
+config SPI_PPC4xx
+	tristate "PPC4xx SPI Controller"
+	depends on 4xx && SPI_MASTER
+	select SPI_BITBANG
+	help
+	  This selects a driver for the PPC4xx SPI Controller.
+
 config SPI_PXA2XX
 	tristate "PXA2xx SSP SPI master"
 	depends on ARCH_PXA && EXPERIMENTAL
drivers/spi/Makefile +1 -0
index ccf18de..a2e5816 100644
@@ -24,6 +24,7 @@ obj-$(CONFIG_SPI_OMAP24XX)		+= omap2_mcspi.o
 obj-$(CONFIG_SPI_ORION)			+= orion_spi.o
 obj-$(CONFIG_SPI_MPC52xx_PSC)		+= mpc52xx_psc_spi.o
 obj-$(CONFIG_SPI_MPC83xx)		+= spi_mpc83xx.o
+obj-$(CONFIG_SPI_PPC4xx)		+= spi_ppc4xx.o
 obj-$(CONFIG_SPI_S3C24XX_GPIO)		+= spi_s3c24xx_gpio.o
 obj-$(CONFIG_SPI_S3C24XX)		+= spi_s3c24xx.o
 obj-$(CONFIG_SPI_TXX9)			+= spi_txx9.o
drivers/spi/spi_ppc4xx.c new file +583 -0

583 lines not on this page · raw message

Signature · 8 lines
1.6.0.3


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/

A message that is not in the archive (sent off-list or not yet received): 20081025113944.GA11828-jnIq6iUNB1CO8iYQgJmm/[email protected]

#4 lore raw
Quoted 5 lines · Josh Boyer
Quoted 4 lines · Wolfgang Ocker
Quoted 3 lines · Stefan Roese

This adds a SPI driver for the SPI controller found in the IBM/AMCC 4xx PowerPC's.

Quoted 7 lines
Quoted 3 lines
Quoted 1 line

Unless you actually wrote code or it's going through a git tree of yours or you sent the patch out for someone, I think you mean Acked-by.

I contributed code.

Wolfgang

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/

A message that is not in the archive (sent off-list or not yet received): [email protected]

#6 lore raw
Quoted 5 lines · Wolfgang Ocker
Quoted 5 lines
Quoted 5 lines
Quoted 4 lines

This adds a SPI driver for the SPI controller found in the IBM/AMCC 4xx PowerPC's.

Quoted 7 lines
Quoted 5 lines
Quoted 1 line

Unless you actually wrote code or it's going through a git tree of yours or you sent the patch out for someone, I think you mean Acked-by.

I contributed code.

Yes. I probably should have communicated better with Wolfgang and added his SOB line before sending it to the list.

Best regards,
Stefan

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/