linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jan Andersson <jan-FkzTOoA/JUlBDgjK7y7TUQ@public.gmane.org>
To: grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org
Cc: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: [PATCH V2] spi: add support for aeroflex gaisler spimctrl
Date: Sat, 30 Apr 2011 15:11:52 +0200	[thread overview]
Message-ID: <1304169112-11224-1-git-send-email-jan@gaisler.com> (raw)
In-Reply-To: <1304023295-5829-1-git-send-email-jan-FkzTOoA/JUlBDgjK7y7TUQ@public.gmane.org>

This patch adds support for Aeroflex Gaisler SPI memory controller (SPIMCTRL).
SPIMCTRL memory maps a SPI flash device into AMBA address space. The core
also has a register interface where any command can be sent to the device.

The controller is typically found on LEON/GRLIB SoCs.

Tested on GR-LEON4-ITX development board.

Patch is against spi/next.

Signed-off-by: Jan Andersson <jan-FkzTOoA/JUlBDgjK7y7TUQ@public.gmane.org>
---

Changes in V2:
* Use IRQF_SHARED and check in interrupt handler if DONE flag is set,
  otherwise return IRQ_NONE
* Rename driver to match name of other LEON/GRLIB drivers
* Fixes after comments from Grant Likely:
** Fix inconsistent whitespace in Kconfig entry
** Use of_node_get() when assigning hw->bitbang.master->dev.of_node
** Use platform_get_resource() instead of hardcoding the offset into the
   resource table
---
 drivers/spi/Kconfig  |    8 ++++++++
 drivers/spi/Makefile |    1 +
 2 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig
index fc14b8d..be53561 100644
--- a/drivers/spi/Kconfig
+++ b/drivers/spi/Kconfig
@@ -53,6 +53,14 @@ if SPI_MASTER
 
 comment "SPI Master Controller Drivers"
 
+config SPI_GRLIB_SPIMCTRL
+	tristate "Aeroflex Gaisler SPI memory controller"
+	depends on SPARC_LEON
+	select SPI_BITBANG
+	help
+	  This is the driver for Aeroflex Gaisler's SPI memory controller
+	  (SPIMCTRL) found on some LEON/GRLIB SoCs.
+
 config SPI_ALTERA
 	tristate "Altera SPI Controller"
 	select SPI_BITBANG
diff --git a/drivers/spi/Makefile b/drivers/spi/Makefile
index fd2fc5f..a528000 100644
--- a/drivers/spi/Makefile
+++ b/drivers/spi/Makefile
@@ -9,6 +9,7 @@ ccflags-$(CONFIG_SPI_DEBUG) := -DDEBUG
 obj-$(CONFIG_SPI_MASTER)		+= spi.o
 
 # SPI master controller drivers (bus)
+obj-$(CONFIG_SPI_GRLIB_SPIMCTRL)	+= grlib_spimctrl.o
 obj-$(CONFIG_SPI_ALTERA)		+= spi_altera.o
 obj-$(CONFIG_SPI_ATMEL)			+= atmel_spi.o
 obj-$(CONFIG_SPI_ATH79)			+= ath79_spi.o
-- 
1.7.0.4


------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd

  parent reply	other threads:[~2011-04-30 13:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-28 20:41 [PATCH] spi: add support for aeroflex gaisler spimctrl Jan Andersson
     [not found] ` <1304023295-5829-1-git-send-email-jan-FkzTOoA/JUlBDgjK7y7TUQ@public.gmane.org>
2011-04-29 21:45   ` Grant Likely
2011-04-30 13:09   ` Jan Andersson
     [not found]     ` <4DBC09FB.5070406-FkzTOoA/JUnLoDKTGw+V6w@public.gmane.org>
2011-05-04 14:46       ` Jan Andersson
     [not found]         ` <4DC166B0.4090001-FkzTOoA/JUnLoDKTGw+V6w@public.gmane.org>
2011-05-04 14:46           ` Grant Likely
2011-04-30 13:11   ` Jan Andersson [this message]
     [not found]     ` <1304169112-11224-1-git-send-email-jan-FkzTOoA/JUlBDgjK7y7TUQ@public.gmane.org>
2011-04-30 13:38       ` [PATCH V3] " Jan Andersson
     [not found]         ` <1304170705-11319-1-git-send-email-jan-FkzTOoA/JUlBDgjK7y7TUQ@public.gmane.org>
2011-05-20  7:26           ` Jan Andersson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1304169112-11224-1-git-send-email-jan@gaisler.com \
    --to=jan-fkztooa/julbdgjk7y7tuq@public.gmane.org \
    --cc=grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org \
    --cc=spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).