From patchwork Wed Feb 3 10:21:45 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemanth V X-Patchwork-Id: 76678 Received: from lists.sourceforge.net (lists.sourceforge.net [216.34.181.88]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o13ALtoC017642 for ; Wed, 3 Feb 2010 10:22:35 GMT Received: from localhost ([127.0.0.1] helo=sfs-ml-3.v29.ch3.sourceforge.com) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1NccMs-0001xv-Hc; Wed, 03 Feb 2010 10:21:54 +0000 Received: from sfi-mx-3.v28.ch3.sourceforge.com ([172.29.28.123] helo=mx.sourceforge.net) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1NccMr-0001xk-HP for spi-devel-general@lists.sourceforge.net; Wed, 03 Feb 2010 10:21:53 +0000 Received-SPF: pass (sfi-mx-3.v28.ch3.sourceforge.com: domain of ti.com designates 198.47.26.153 as permitted sender) client-ip=198.47.26.153; envelope-from=hemanthv@ti.com; helo=devils.ext.ti.com; Received: from devils.ext.ti.com ([198.47.26.153]) by sfi-mx-3.v28.ch3.sourceforge.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.69) id 1NccMq-0001qH-UI for spi-devel-general@lists.sourceforge.net; Wed, 03 Feb 2010 10:21:53 +0000 Received: from dlep33.itg.ti.com ([157.170.170.112]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id o13ALkXo027508 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 3 Feb 2010 04:21:46 -0600 Received: from dbdmail.itg.ti.com (localhost [127.0.0.1]) by dlep33.itg.ti.com (8.13.7/8.13.7) with ESMTP id o13ALhVk012160; Wed, 3 Feb 2010 04:21:44 -0600 (CST) Received: from 10.24.255.17 (SquirrelMail authenticated user x0099946); by dbdmail.itg.ti.com with HTTP; Wed, 3 Feb 2010 15:51:45 +0530 (IST) Message-ID: <9629.10.24.255.17.1265192505.squirrel@dbdmail.itg.ti.com> Date: Wed, 3 Feb 2010 15:51:45 +0530 (IST) From: "Hemanth V" To: spi-devel-general@lists.sourceforge.net User-Agent: SquirrelMail/1.4.3a X-Mailer: SquirrelMail/1.4.3a MIME-Version: 1.0 X-Priority: 3 (Normal) Importance: Normal References: In-Reply-To: X-Spam-Score: -1.5 (-) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for sender-domain -0.0 SPF_PASS SPF: sender matches SPF record X-Headers-End: 1NccMq-0001qH-UI Cc: dbrownell@users.sourceforge.net, linux-omap@vger.kernel.org Subject: [spi-devel-general] PATCH[V2 1/3]: Update Platform files for SPI X-BeenThere: spi-devel-general@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: Linux SPI core/device drivers discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: spi-devel-general-bounces@lists.sourceforge.net X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Wed, 03 Feb 2010 10:22:35 +0000 (UTC) diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index 733d3dc..79b5396 100644 --- a/arch/arm/mach-omap2/devices.c +++ b/arch/arm/mach-omap2/devices.c @@ -282,6 +282,7 @@ static inline void omap_init_sti(void) {} static struct omap2_mcspi_platform_config omap2_mcspi1_config = { .num_cs = 4, + .force_cs_mode = 1, }; static struct resource omap2_mcspi1_resources[] = { @@ -304,6 +305,10 @@ static struct platform_device omap2_mcspi1 = { static struct omap2_mcspi_platform_config omap2_mcspi2_config = { .num_cs = 2, + .mode = OMAP2_MCSPI_MASTER, + .dma_mode = 0, + .force_cs_mode = 0, + .fifo_depth = 0, }; static struct resource omap2_mcspi2_resources[] = { diff --git a/arch/arm/plat-omap/include/plat/mcspi.h b/arch/arm/plat-omap/include/plat/mcspi.h index 1254e49..ffda0a1 100644 --- a/arch/arm/plat-omap/include/plat/mcspi.h +++ b/arch/arm/plat-omap/include/plat/mcspi.h @@ -1,8 +1,35 @@ #ifndef _OMAP2_MCSPI_H #define _OMAP2_MCSPI_H +#define OMAP2_MCSPI_MASTER 0 +#define OMAP2_MCSPI_SLAVE 1 + +/** + * struct omap2_mcspi_platform_config - McSPI controller configuration + * @num_cs: Number of chip selects or channels supported + * @mode: SPI is master or slave + * @dma_mode: Use only DMA for data transfers + * @force_cs_mode: Use force chip select mode or auto chip select mode + * @fifo_depth: FIFO depth in bytes, max value 64 + * + * @dma_mode when set to 1 uses only dma for data transfers + * else the default behaviour is to use PIO mode for transfer + * size of 8 bytes or less. This mode is useful when mcspi + * is configured as slave + * + * @force_cs_mode when set to 1 allows continuous transfer of multiple + * spi words without toggling the chip select line. + * + * @fifo_depth when set to non zero values enables FIFO. fifo_depth + * should be set as a multiple of buffer size used for read/write. + */ + struct omap2_mcspi_platform_config { - unsigned short num_cs; + u8 num_cs; + u8 mode; + u8 dma_mode; + u8 force_cs_mode; + unsigned short fifo_depth; }; struct omap2_mcspi_device_config { -- 1.5.6.3