ALCHEMY: SPI driver for Au1200
Subsystems (2)
PATCH 1/1 ALCHEMY: SPI driver for Au1200
A SPI driver for the Au1200 processor. Sending now so it can be queued for the post 2.6.15 rush.
---
arch/mips/au1000/common/clocks.c | 2 drivers/char/Kconfig | 4 drivers/char/Makefile | 1 drivers/char/au1xxx_psc_spi.c | 492 +++++++++++++++++++++++++++++ include/asm-mips/mach-au1x00/au1550_spi.h | 38 ++ 5 files changed, 536 insertions(+), 1 deletions(-)
arch/mips/au1000/common/clocks.c +1 -1
@@ -46,7 +46,7 @@ unsigned int get_au1x00_speed(void) {return au1x00_clock; } - +EXPORT_SYMBOL (get_au1x00_speed);/*
drivers/char/Kconfig +4 -0
@@ -351,6 +351,10 @@ config AU1XXX_CIM tristate "Au1200 Camera Interface Module (CIM)" depends on MIPS && SOC_AU1X00 && I2C_AU1550 +config AU1XXX_PSC_SPI + tristate ' Alchemy Au1550/Au1200 PSC SPI support' + depends on MIPS && SOC_AU1X00 && !I2C_AU1550 + config SIBYTE_SB1250_DUART bool "Support for BCM1xxx onchip DUART" depends on MIPS && SIBYTE_SB1xxx_SOC=y
drivers/char/Makefile +1 -0
@@ -83,6 +83,7 @@ obj-$(CONFIG_AU1000_GPIO) += au1000_gpio obj-$(CONFIG_AU1000_USB_TTY) += au1000_usbtty.o obj-$(CONFIG_AU1000_USB_RAW) += au1000_usbraw.o obj-$(CONFIG_AU1XXX_CIM) += au1xxx_cim.o +obj-$(CONFIG_AU1XXX_PSC_SPI) += au1xxx_psc_spi.o obj-$(CONFIG_PPDEV) += ppdev.o obj-$(CONFIG_NWBUTTON) += nwbutton.o obj-$(CONFIG_NWFLASH) += nwflash.o
drivers/char/au1xxx_psc_spi.c new file +492 -0
492 lines not on this page · raw message
include/asm-mips/mach-au1x00/au1550_spi.h new file +38 -0
@@ -0,0 +1,38 @@ +/* +* API to Alchemy Au1550 SPI device. +* +* Copyright 2004 Embedded Edge, LLC. +* [email protected] +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License as published by the +* Free Software Foundation; either version 2 of the License, or (at your +* option) any later version. +* +* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED +* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN +* NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF +* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +* 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. +*/ + +#ifndef __AU1550_SPI_H +#define __AU1550_SPI_H + +#include <linux/ioctl.h> + +#define AU1550SPI_IOC_MAGIC 'S' + +#define AU1550SPI_SET_BAUD _IOW(AU1550SPI_IOC_MAGIC, 0, int *) +#define AU1550SPI_WORD_LEN _IOW(AU1550SPI_IOC_MAGIC, 1, int) + +#endif /* __AU1000_SPI_H */
Quoted 2 lines · --- Jordan Crouse
A SPI driver for the Au1200 processor. Sending now so it can be queued for the post 2.6.15 rush.
Good. As there is long discussion going on which SPI framework to accept in mainline, I would suggest you to implement the same master controller and protocol driver using either David Brownell's framework (right now in 2.6.15-rc3-mm1) or Dmitry/Wool framework.
---Komal Shah
http://komalshah.blogspot.com/
__________________________________
Start your day with Yahoo! - Make it your home page!
http://www.yahoo.com/r/hs
Quoted 9 lines · Komal Shah
Quoted 2 lines · --- Jordan Crouse
A SPI driver for the Au1200 processor. Sending now so it can be queued for the post 2.6.15 rush.
Good. As there is long discussion going on which SPI framework to accept in mainline, I would suggest you to implement the same master controller and protocol driver using either David Brownell's framework (right now in 2.6.15-rc3-mm1) or Dmitry/Wool framework.
Since the issue is very much in doubt, I would prefer to wait until a winner has emerged before rewriting the driver again. If the argument resolves itself before 2.6.16, then all is good. But if its going to drag out another 6 months, then I would prefer to have this in the mips tree at least, so that its available to folks who need it.
Jordan
Signature · 4 lines
Jordan Crouse Senior Linux Engineer AMD - Personal Connectivity Solutions Group <www.amd.com/embeddedprocessors>