diff options
author | Huang Shijie <b32955@freescale.com> | 2011-05-10 16:04:43 +0800 |
---|---|---|
committer | Jason Liu <r64343@freescale.com> | 2012-07-20 13:13:43 +0800 |
commit | 7932c0a60aa043d44468de40e77a2f02a8247d91 (patch) | |
tree | b8e69cbf2838c0a3f6a4e7f1030cf24d84136f2c /drivers/mtd | |
parent | 9ed769f5e29559e181161081a0513c99c0a35dce (diff) |
ENGR00143186 GPMI : add the kernel command parameter to disable/enable gpmi
add the kernel command parameter to control whether we should enable
the GPMI NAND driver.
Signed-off-by: Huang Shijie <b32955@freescale.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/nand/gpmi-nfc/gpmi-nfc.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/mtd/nand/gpmi-nfc/gpmi-nfc.c b/drivers/mtd/nand/gpmi-nfc/gpmi-nfc.c index 95972af2ceff..e4edf5dfdc26 100644 --- a/drivers/mtd/nand/gpmi-nfc/gpmi-nfc.c +++ b/drivers/mtd/nand/gpmi-nfc/gpmi-nfc.c @@ -35,6 +35,9 @@ int gpmi_debug; module_param(gpmi_debug, int, 0644); MODULE_PARM_DESC(gpmi_debug, "print out the debug infomation."); +/* enable the gpmi-nfc */ +static bool enable_gpmi_nand; + static ssize_t show_ignorebad(struct device *dev, struct device_attribute *attr, char *buf) { @@ -1229,8 +1232,6 @@ static void read_page_swap_end(struct gpmi_nfc_data *this, void *alt_virt, dma_addr_t alt_phys, unsigned alt_size, void *used_virt, dma_addr_t used_phys) { - struct device *dev = this->dev; - if (!this->mil.direct_dma_map_ok) memcpy(destination, alt_virt, length); } @@ -2453,6 +2454,9 @@ static int __init gpmi_nfc_init(void) { int err; + if (!enable_gpmi_nand) + return 0; + err = platform_driver_register(&gpmi_nfc_driver); if (err == 0) printk(KERN_INFO "GPMI NFC driver registered. (IMX)\n"); @@ -2473,6 +2477,13 @@ static int __init gpmi_debug_setup(char *__unused) } __setup("gpmi_debug_init", gpmi_debug_setup); +static int __init gpmi_nand_setup(char *__unused) +{ + enable_gpmi_nand = true; + return 1; +} +__setup("gpmi-nfc", gpmi_nand_setup); + module_init(gpmi_nfc_init); module_exit(gpmi_nfc_exit); |