Skip to contentSkip to conversation

ENGR00141558-9 MTD : add gpmi support for MX50

PATCH New Huang Shijie 1 participant 1 message Apr 26, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 3/3 ENGR00141558-9 MTD : add gpmi support for MX50

add the gpmi support for mx50.

---
 drivers/mtd/nand/Kconfig                   |    2 +-
 drivers/mtd/nand/gpmi-nfc/Makefile         |    4 +-
 drivers/mtd/nand/gpmi-nfc/bch-regs-mx50.h  |  567 ++++++++++++++++++
 drivers/mtd/nand/gpmi-nfc/gpmi-nfc.c       |   10 +-
 drivers/mtd/nand/gpmi-nfc/gpmi-nfc.h       |    3 +
 drivers/mtd/nand/gpmi-nfc/gpmi-regs-mx50.h |  511 ++++++++++++++++
 drivers/mtd/nand/gpmi-nfc/hal-mx50.c       |  875 ++++++++++++++++++++++++++++
 7 files changed, 1969 insertions(+), 3 deletions(-)
 create mode 100644 drivers/mtd/nand/gpmi-nfc/bch-regs-mx50.h
 create mode 100644 drivers/mtd/nand/gpmi-nfc/gpmi-regs-mx50.h
 create mode 100644 drivers/mtd/nand/gpmi-nfc/hal-mx50.c
drivers/mtd/nand/Kconfig +1 -1
index 25a1493..30bafd7 100644
@@ -428,7 +428,7 @@ config MTD_NAND_NANDSIM
 
 config MTD_NAND_GPMI_NFC
         bool "GPMI NAND Flash Controller driver"
-        depends on MTD_NAND && (SOC_IMX23 || SOC_IMX28)
+        depends on MTD_NAND && (SOC_IMX23 || SOC_IMX28 || SOC_IMX50)
 	select MTD_PARTITIONS
 	select MTD_CMDLINE_PARTS
         help
drivers/mtd/nand/gpmi-nfc/Makefile +3 -1
index 918fb52..2b32cf6 100644
@@ -1,3 +1,5 @@
 obj-$(CONFIG_MTD_NAND_GPMI_NFC) += gpmi_nfc.o
 gpmi_nfc-objs += gpmi-nfc.o
-gpmi_nfc-objs += hal-mxs.o
+obj-$(CONFIG_SOC_IMX23) += hal-mxs.o
+obj-$(CONFIG_SOC_IMX28) += hal-mxs.o
+obj-$(CONFIG_SOC_IMX50) += hal-mx50.o
drivers/mtd/nand/gpmi-nfc/bch-regs-mx50.h new file +567 -0

567 lines not on this page · raw message

drivers/mtd/nand/gpmi-nfc/gpmi-nfc.c +9 -1
index a838e8c..95972af 100644
@@ -1141,9 +1141,14 @@ static int __devinit set_up_nfc_hal(struct gpmi_nfc_data *this)
 		.tRHOH_in_ns             = -1,
 	};
 
+#if defined(CONFIG_SOC_IMX23) || defined(CONFIG_SOC_IMX28)
 	if (GPMI_IS_MX23(this) || GPMI_IS_MX28(this))
 		nfc = &gpmi_nfc_hal_imx23_imx28;
-
+#endif
+#if defined(CONFIG_SOC_IMX50)
+	if (GPMI_IS_MX50(this))
+		nfc = &gpmi_nfc_hal_mx50;
+#endif
 	BUG_ON(nfc == NULL);
 	this->nfc = nfc;
 
@@ -2428,6 +2433,9 @@ static const struct platform_device_id gpmi_ids[] = {
 	}, {
 		.name = "imx28-gpmi-nfc",
 		.driver_data = IS_MX28,
+	}, {
+		.name = "imx50-gpmi-nfc",
+		.driver_data = IS_MX50,
 	}, {},
 };
 
drivers/mtd/nand/gpmi-nfc/gpmi-nfc.h +3 -0
index 50f7baf..dfa9cd1 100644
@@ -457,6 +457,7 @@ extern int start_dma_with_bch_irq(struct gpmi_nfc_data *this,
 					struct dma_async_tx_descriptor *desc);
 /* NFC HAL Structures */
 extern struct nfc_hal  gpmi_nfc_hal_imx23_imx28;
+extern struct nfc_hal  gpmi_nfc_hal_mx50;
 
 /* ONFI or TOGGLE nand */
 bool is_ddr_nand(struct gpmi_nfc_data *);
@@ -489,6 +490,8 @@ extern int gpmi_debug;
 /* Use the platform_id to distinguish different Archs. */
 #define IS_MX23			0x1
 #define IS_MX28			0x2
+#define IS_MX50			0x4
 #define GPMI_IS_MX23(x)		((x)->pdev->id_entry->driver_data == IS_MX23)
 #define GPMI_IS_MX28(x)		((x)->pdev->id_entry->driver_data == IS_MX28)
+#define GPMI_IS_MX50(x)		((x)->pdev->id_entry->driver_data == IS_MX50)
 #endif
drivers/mtd/nand/gpmi-nfc/gpmi-regs-mx50.h new file +511 -0

511 lines not on this page · raw message

drivers/mtd/nand/gpmi-nfc/hal-mx50.c new file +875 -0

875 lines not on this page · raw message

Signature · 4 lines
1.7.0.4


--------------050904080702080100030301--