All of lore.kernel.org
 help / color / mirror / Atom feed
From: maramaopercheseimorto@gmail.com (Alberto Panizzo)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/8] MXC: mach-mx31_3ds: Add support for on board NAND Flash.
Date: Tue, 23 Mar 2010 19:49:35 +0100	[thread overview]
Message-ID: <1269370175.3276.168.camel@realization> (raw)
In-Reply-To: <1269370017.3276.165.camel@realization>

Since the using of Bad Block Table is not constantly a good behave
I had made it configurable.

Signed-off-by: Alberto Panizzo <maramaopercheseimorto@gmail.com>
---
 arch/arm/mach-mx3/Kconfig         |    9 +++++++++
 arch/arm/mach-mx3/mach-mx31_3ds.c |   13 +++++++++++++
 2 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-mx3/Kconfig b/arch/arm/mach-mx3/Kconfig
index 3872af1..9a2911e 100644
--- a/arch/arm/mach-mx3/Kconfig
+++ b/arch/arm/mach-mx3/Kconfig
@@ -62,6 +62,15 @@ config MACH_MX31_3DS
 	  Include support for MX31PDK (3DS) platform. This includes specific
 	  configurations for the board and its peripherals.
 
+config MACH_MX31_3DS_MXC_NAND_USE_BBT
+	bool "Make the MXC NAND driver use the in flash Bad Block Table"
+	depends on MACH_MX31_3DS
+	depends on MTD_NAND_MXC
+	help
+	  Enable this if you want that the MXC NAND driver uses the in flash
+	  Bad Block Table to know what blocks are bad instead of scanning the
+	  entire flash looking for bad block markers.
+
 config MACH_MX31MOBOARD
 	bool "Support mx31moboard platforms (EPFL Mobots group)"
 	select ARCH_MX31
diff --git a/arch/arm/mach-mx3/mach-mx31_3ds.c b/arch/arm/mach-mx3/mach-mx31_3ds.c
index 4a94c3c..bf1f54a 100644
--- a/arch/arm/mach-mx3/mach-mx31_3ds.c
+++ b/arch/arm/mach-mx3/mach-mx31_3ds.c
@@ -34,6 +34,7 @@
 #include <mach/board-mx31_3ds.h>
 #include <mach/imx-uart.h>
 #include <mach/iomux-mx3.h>
+#include <mach/mxc_nand.h>
 #include "devices.h"
 
 /*!
@@ -53,6 +54,17 @@ static int mx31_3ds_pins[] = {
 	IOMUX_MODE(MX31_PIN_GPIO1_1, IOMUX_CONFIG_GPIO),
 };
 
+/*
+ * NAND Flash
+ */
+static struct mxc_nand_platform_data imx31_3ds_nand_flash_pdata = {
+	.width		= 1,
+	.hw_ecc		= 1,
+#ifdef MACH_MX31_3DS_MXC_NAND_USE_BBT
+	.flash_bbt	= 1,
+#endif
+};
+
 static struct imxuart_platform_data uart_pdata = {
 	.flags = IMXUART_HAVE_RTSCTS,
 };
@@ -236,6 +248,7 @@ static void __init mxc_board_init(void)
 				      "mx31_3ds");
 
 	mxc_register_device(&mxc_uart_device0, &uart_pdata);
+	mxc_register_device(&mxc_nand_device, &imx31_3ds_nand_flash_pdata);
 
 	if (!mx31_3ds_init_expio())
 		platform_device_register(&smsc911x_device);
-- 
1.6.3.3

  reply	other threads:[~2010-03-23 18:49 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-23 18:42 [PATCH 0/8] MXC: mach-mx31_3ds: Patch series that enable the support for Freescale i.MX31 3-Stack development board Alberto Panizzo
2010-03-23 18:45 ` Alberto Panizzo
2010-03-23 18:47   ` Alberto Panizzo
2010-03-23 18:46 ` [PATCH 1/8] MXC: mach-mx31_3ds: Update variable names over recent mach name modification Alberto Panizzo
2010-03-23 18:49   ` Alberto Panizzo [this message]
2010-03-23 18:50     ` [PATCH 3/8] MXC: mach-mx31_3ds: Add SPI1 device support Alberto Panizzo
2010-03-23 18:51       ` [PATCH 4/8] MXC: mach-mx31_3ds: add support for freescale mc13783 power management device Alberto Panizzo
2010-03-23 18:53         ` [PATCH 5/8] MXC: mach-mx31_3ds: Add support for SD card slot in the personality board Alberto Panizzo
2010-03-23 18:54           ` [PATCH 6/8] MXC: mach-mx31_3ds: Add support for framebuffer and lcd Alberto Panizzo
2010-03-23 18:57             ` [PATCH 7/8] MXC: mach-mx31_3ds: Add support for the keypad Alberto Panizzo
2010-03-23 18:58               ` [PATCH 8/8] MXC: mach-mx31_3ds: enable mc13783 touchscreen interface Alberto Panizzo
2010-05-14 12:32               ` [PATCH 7/8] MXC: mach-mx31_3ds: Add support for the keypad Magnus Lilja
2010-05-14 18:12                 ` Alberto Panizzo
2010-05-14 18:56                   ` Magnus Lilja
2010-05-17  9:43                 ` Sascha Hauer
2010-05-17 17:42                   ` Alberto Panizzo
2010-03-24 13:26           ` [PATCH 5/8] MXC: mach-mx31_3ds: Add support for SD card slot in the personality board Mark Brown
2010-03-25  7:27           ` Sascha Hauer

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=1269370175.3276.168.camel@realization \
    --to=maramaopercheseimorto@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.