ENGR00141558-9 MTD : add gpmi support for MX50
Subsystems (2)
PATCH 3/3 ENGR00141558-9 MTD : add gpmi support for MX50
add the gpmi support for mx50.
Signed-off-by Huang Shijie <[email protected]>
--- 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
@@ -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
@@ -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
@@ -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
@@ -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--