From patchwork Fri Jul 8 12:28:33 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?UTF-8?q?J=C3=BCrgen=20Lambrecht?= X-Patchwork-Id: 103832 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:4978:20e::2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id EC593B6EE8 for ; Fri, 8 Jul 2011 22:29:21 +1000 (EST) Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QfABF-0002Jy-P9; Fri, 08 Jul 2011 12:29:14 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QfABF-0004t3-9Z; Fri, 08 Jul 2011 12:29:13 +0000 Received: from mail-wy0-f177.google.com ([74.125.82.177]) by canuck.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QfABA-0004sk-MU for linux-arm-kernel@lists.infradead.org; Fri, 08 Jul 2011 12:29:09 +0000 Received: by wyf23 with SMTP id 23so1627124wyf.36 for ; Fri, 08 Jul 2011 05:29:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:mime-version :content-type:content-transfer-encoding; bh=OL/5XWOTWnUfzxwjjjYQF2g/qpcq+zX3FR9BvJkF0sA=; b=L0ZFlcU8YycuHm4m73vBsfghmOD0kUB6nbZ4eMgyblTY6xFMiwIDrQPPyG9nLp7uYi GvzoWXMr3Ot89UccoFhnbBE2R6KRo5Jk/taYAMSFZnklAnNAQzmh6X5LQ50EPJe11RT1 jhDq0fkL+AyxpxgP5GpwujPwjTVN7N3vC9vHI= Received: by 10.216.229.165 with SMTP id h37mr579330weq.69.1310128145126; Fri, 08 Jul 2011 05:29:05 -0700 (PDT) Received: from localhost.localdomain (ip2.televic.com [81.82.194.222]) by mx.google.com with ESMTPS id s47sm5329717weq.6.2011.07.08.05.29.02 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 08 Jul 2011 05:29:03 -0700 (PDT) From: "=?UTF-8?q?J=C3=BCrgen=20Lambrecht?=" To: linux-arm-kernel@lists.infradead.org Subject: [PATCH] mach-imx: imx27pdk (3ds): add nand flash support Date: Fri, 8 Jul 2011 14:28:33 +0200 Message-Id: <1310128113-32406-1-git-send-email-J.Lambrecht@televic.com> X-Mailer: git-send-email 1.7.1 MIME-Version: 1.0 X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110708_082908_962117_1B97B412 X-CRM114-Status: GOOD ( 16.30 ) X-Spam-Score: -0.8 (/) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-0.8 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [74.125.82.177 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (juergen.lambrecht[at]gmail.com) -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.0 T_TO_NO_BRKTS_FREEMAIL To: misformatted and free email service Cc: s.hauer@pengutronix.de, =?UTF-8?q?J=C3=BCrgen=20Lambrecht?= X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org List-Id: linux-imx-kernel.lists.patchwork.ozlabs.org Adds NAND flash support and enables the usage of the BBT. Tested with Barebox and a JFFS2 rootfs. Signed-off-by: Jürgen Lambrecht --- arch/arm/mach-imx/Kconfig | 5 +++-- arch/arm/mach-imx/mach-mx27_3ds.c | 12 ++++++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig index 0519dd7..0a3512b 100644 --- a/arch/arm/mach-imx/Kconfig +++ b/arch/arm/mach-imx/Kconfig @@ -274,7 +274,7 @@ config MACH_EUKREA_MBIMX27_BASEBOARD endchoice config MACH_MX27_3DS - bool "MX27PDK platform" + bool "MX27PDK (3DS) platform" select SOC_IMX27 select IMX_HAVE_PLATFORM_FSL_USB2_UDC select IMX_HAVE_PLATFORM_IMX2_WDT @@ -284,11 +284,12 @@ config MACH_MX27_3DS select IMX_HAVE_PLATFORM_IMX_UART select IMX_HAVE_PLATFORM_MXC_EHCI select IMX_HAVE_PLATFORM_MXC_MMC + select IMX_HAVE_PLATFORM_MXC_NAND select IMX_HAVE_PLATFORM_SPI_IMX select MXC_DEBUG_BOARD select MXC_ULPI if USB_ULPI help - Include support for MX27PDK platform. This includes specific + Include support for MX27PDK (3DS) platform. This includes specific configurations for the board and its peripherals. config MACH_IMX27_VISSTRIM_M10 diff --git a/arch/arm/mach-imx/mach-mx27_3ds.c b/arch/arm/mach-imx/mach-mx27_3ds.c index 526cbe1..d6780ac 100644 --- a/arch/arm/mach-imx/mach-mx27_3ds.c +++ b/arch/arm/mach-imx/mach-mx27_3ds.c @@ -40,6 +40,7 @@ #include #include #include +#include #include "devices-imx27.h" @@ -369,6 +370,16 @@ static struct spi_board_info mx27_3ds_spi_devs[] __initdata = { }, }; +/* + * NAND Flash + */ +static const struct mxc_nand_platform_data +mx27_3ds_nand_board_info __initconst = { + .width = 1, + .hw_ecc = 1, + .flash_bbt = 1, +}; + static const struct imxi2c_platform_data mx27_3ds_i2c0_data __initconst = { .bitrate = 100000, }; @@ -380,6 +391,7 @@ static void __init mx27pdk_init(void) mxc_gpio_setup_multiple_pins(mx27pdk_pins, ARRAY_SIZE(mx27pdk_pins), "mx27pdk"); mx27_3ds_sdhc1_enable_level_translator(); + imx27_add_mxc_nand(&mx27_3ds_nand_board_info); imx27_add_imx_uart0(&uart_pdata); imx27_add_fec(NULL); imx27_add_imx_keypad(&mx27_3ds_keymap_data);