Skip to content

Commit

Permalink
MXC: mach-mx31_3ds: Add support for on board NAND Flash.
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
  • Loading branch information
Alberto Panizzo authored and Sascha Hauer committed Mar 25, 2010
1 parent 11a332a commit a1b67b9
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
9 changes: 9 additions & 0 deletions arch/arm/mach-mx3/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 13 additions & 0 deletions arch/arm/mach-mx3/mach-mx31_3ds.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"

/*!
Expand All @@ -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,
};
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit a1b67b9

Please sign in to comment.