From patchwork Thu Sep 2 07:52:04 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Wang X-Patchwork-Id: 148571 Received: from lists.sourceforge.net (lists.sourceforge.net [216.34.181.88]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o827nBOn002808 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 2 Sep 2010 07:50:13 GMT Received: from localhost ([127.0.0.1] helo=sfs-ml-4.v29.ch3.sourceforge.com) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1Or4Xn-0007bP-R6; Thu, 02 Sep 2010 07:49:11 +0000 Received: from sog-mx-4.v43.ch3.sourceforge.com ([172.29.43.194] helo=mx.sourceforge.net) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1Or4Xm-0007bH-Id for spi-devel-general@lists.sourceforge.net; Thu, 02 Sep 2010 07:49:10 +0000 Received-SPF: neutral (sog-mx-4.v43.ch3.sourceforge.com: 147.11.1.11 is neither permitted nor denied by domain of gmail.com) client-ip=147.11.1.11; envelope-from=jason77.wang@gmail.com; helo=mail.windriver.com; Received: from mail.windriver.com ([147.11.1.11]) by sog-mx-4.v43.ch3.sourceforge.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.69) id 1Or4Xk-0003Ud-BL for spi-devel-general@lists.sourceforge.net; Thu, 02 Sep 2010 07:49:10 +0000 Received: from ALA-MAIL03.corp.ad.wrs.com (ala-mail03 [147.11.57.144]) by mail.windriver.com (8.14.3/8.14.3) with ESMTP id o827mxpU027791; Thu, 2 Sep 2010 00:48:59 -0700 (PDT) Received: from localhost.localdomain ([128.224.163.220]) by ALA-MAIL03.corp.ad.wrs.com with Microsoft SMTPSVC(6.0.3790.1830); Thu, 2 Sep 2010 00:48:58 -0700 From: Jason Wang To: s.hauer@pengutronix.de, u.kleine-koenig@pengutronix.de, amit.kucheria@canonical.com, grant.likely@secretlab.ca Subject: [PATCH 6/6] mx51_3ds: add SPI NOR flash in the board init stage Date: Thu, 2 Sep 2010 15:52:04 +0800 Message-Id: <1283413924-14210-7-git-send-email-jason77.wang@gmail.com> X-Mailer: git-send-email 1.5.6.5 In-Reply-To: <1283413924-14210-6-git-send-email-jason77.wang@gmail.com> References: <1283413924-14210-1-git-send-email-jason77.wang@gmail.com> <1283413924-14210-2-git-send-email-jason77.wang@gmail.com> <1283413924-14210-3-git-send-email-jason77.wang@gmail.com> <1283413924-14210-4-git-send-email-jason77.wang@gmail.com> <1283413924-14210-5-git-send-email-jason77.wang@gmail.com> <1283413924-14210-6-git-send-email-jason77.wang@gmail.com> X-OriginalArrivalTime: 02 Sep 2010 07:48:58.0640 (UTC) FILETIME=[4D28B900:01CB4A73] X-Spam-Score: 1.9 (+) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. 0.0 FREEMAIL_FROM Sender email is freemail (jason77.wang[at]gmail.com) 0.0 DKIM_ADSP_CUSTOM_MED No valid author signature, adsp_override is CUSTOM_MED 0.7 SPF_NEUTRAL SPF: sender does not match SPF record (neutral) 1.2 NML_ADSP_CUSTOM_MED ADSP custom_med hit, and not from a mailing list 0.0 T_TO_NO_BRKTS_FREEMAIL T_TO_NO_BRKTS_FREEMAIL 0.0 AWL AWL: From: address is in the auto white-list X-Headers-End: 1Or4Xk-0003Ud-BL Cc: spi-devel-general@lists.sourceforge.net, linux-arm-kernel@lists.infradead.org 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: , MIME-Version: 1.0 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 (demeter1.kernel.org [140.211.167.41]); Thu, 02 Sep 2010 07:50:13 +0000 (UTC) diff --git a/arch/arm/mach-mx5/board-mx51_3ds.c b/arch/arm/mach-mx5/board-mx51_3ds.c index 0cf4e14..8f1631d 100644 --- a/arch/arm/mach-mx5/board-mx51_3ds.c +++ b/arch/arm/mach-mx5/board-mx51_3ds.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include @@ -145,6 +146,16 @@ static struct spi_imx_master mx51_3ds_spi2_pdata = { .num_chipselect = ARRAY_SIZE(mx51_3ds_spi2_cs), }; +static struct spi_board_info mx51_3ds_spi_nor_device[] = { + { + .modalias = "m25p80", + .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */ + .bus_num = 1, + .chip_select = 1, + .mode = SPI_MODE_0, + .platform_data = NULL,}, +}; + /* * Board specific initialization. */ @@ -155,6 +166,8 @@ static void __init mxc_board_init(void) mxc_init_imx_uart(); imx51_add_spi_imx1(&mx51_3ds_spi2_pdata); + spi_register_board_info(mx51_3ds_spi_nor_device, + ARRAY_SIZE(mx51_3ds_spi_nor_device)); if (mxc_expio_init(MX51_CS5_BASE_ADDR, EXPIO_PARENT_INT)) printk(KERN_WARNING "Init of the debugboard failed, all "