summaryrefslogtreecommitdiff
path: root/arch/arm/mach-mx5/mx50_rdp.c
diff options
context:
space:
mode:
authorRobby Cai <R63905@freescale.com>2010-09-28 17:51:24 +0800
committerRobby Cai <R63905@freescale.com>2010-10-11 13:55:46 +0800
commitba7dd7d2fa03b35ebe703756816b45f621192fbc (patch)
tree8df4551f5f86bcde7add334643c18c24c7a843ae /arch/arm/mach-mx5/mx50_rdp.c
parentdd1751eeca794850a772ade91bf529735b4f4056 (diff)
ENGR00132184-1 MX50: Port GPMI NAND driver to 2.6.35
Add MSL part for GPMI Nand driver for Reference Design Board Move __setup() to driver to remove the conflict between ARM2 and RD board Signed-off-by: Robby Cai <R63905@freescale.com>
Diffstat (limited to 'arch/arm/mach-mx5/mx50_rdp.c')
-rw-r--r--arch/arm/mach-mx5/mx50_rdp.c53
1 files changed, 53 insertions, 0 deletions
diff --git a/arch/arm/mach-mx5/mx50_rdp.c b/arch/arm/mach-mx5/mx50_rdp.c
index 8a3ae401f5ad..5d8b1d1802c2 100644
--- a/arch/arm/mach-mx5/mx50_rdp.c
+++ b/arch/arm/mach-mx5/mx50_rdp.c
@@ -44,6 +44,7 @@
#include <linux/videodev2.h>
#include <linux/mxcfb.h>
#include <linux/fec.h>
+#include <linux/gpmi-nfc.h>
#include <asm/irq.h>
#include <asm/setup.h>
#include <asm/mach-types.h>
@@ -272,6 +273,28 @@ static struct pad_desc mx50_rdp[] = {
};
+static struct pad_desc mx50_gpmi_nand[] = {
+ MX50_PIN_EIM_DA8__NANDF_CLE,
+ MX50_PIN_EIM_DA9__NANDF_ALE,
+ MX50_PIN_EIM_DA10__NANDF_CE0,
+ MX50_PIN_EIM_DA11__NANDF_CE1,
+ MX50_PIN_EIM_DA12__NANDF_CE2,
+ MX50_PIN_EIM_DA13__NANDF_CE3,
+ MX50_PIN_EIM_DA14__NANDF_READY,
+ MX50_PIN_EIM_DA15__NANDF_DQS,
+ MX50_PIN_SD3_D4__NANDF_D0,
+ MX50_PIN_SD3_D5__NANDF_D1,
+ MX50_PIN_SD3_D6__NANDF_D2,
+ MX50_PIN_SD3_D7__NANDF_D3,
+ MX50_PIN_SD3_D0__NANDF_D4,
+ MX50_PIN_SD3_D1__NANDF_D5,
+ MX50_PIN_SD3_D2__NANDF_D6,
+ MX50_PIN_SD3_D3__NANDF_D7,
+ MX50_PIN_SD3_CLK__NANDF_RDN,
+ MX50_PIN_SD3_CMD__NANDF_WRN,
+ MX50_PIN_SD3_WP__NANDF_RESETN,
+};
+
static struct mxc_dvfs_platform_data dvfs_core_data = {
.reg_id = "SW1",
.clk1_id = "cpu_clk",
@@ -959,6 +982,35 @@ static int __init w1_setup(char *__unused)
__setup("w1", w1_setup);
+static int gpmi_nfc_platform_init(unsigned int max_chip_count)
+{
+ mxc_iomux_v3_setup_multiple_pads(mx50_gpmi_nand,
+ ARRAY_SIZE(mx50_gpmi_nand));
+
+ return 0;
+}
+
+static void gpmi_nfc_platform_exit(unsigned int max_chip_count)
+{
+}
+
+static const char *gpmi_nfc_partition_source_types[] = { "cmdlinepart", 0 };
+
+static struct gpmi_nfc_platform_data gpmi_nfc_platform_data = {
+ .nfc_version = 2,
+ .boot_rom_version = 1,
+ .clock_name = "gpmi-nfc",
+ .platform_init = gpmi_nfc_platform_init,
+ .platform_exit = gpmi_nfc_platform_exit,
+ .min_prop_delay_in_ns = 5,
+ .max_prop_delay_in_ns = 9,
+ .max_chip_count = 2,
+ .boot_area_size_in_bytes = 20 * SZ_1M,
+ .partition_source_types = gpmi_nfc_partition_source_types,
+ .partitions = 0,
+ .partition_count = 0,
+};
+
/*!
* Board specific fixup function. It is called by \b setup_arch() in
* setup.c file very early on during kernel starts. It allows the user to
@@ -1100,6 +1152,7 @@ static void __init mxc_board_init(void)
*/
mx5_set_otghost_vbus_func(mx50_arm2_usb_set_vbus);
mxc_register_device(&mxc_sgtl5000_device, &sgtl5000_data);
+ mxc_register_device(&gpmi_nfc_device, &gpmi_nfc_platform_data);
mx5_usb_dr_init();
mx5_usbh1_init();
}