diff options
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/devices/block2mtd.c | 1 | ||||
-rw-r--r-- | drivers/mtd/nand/Kconfig | 1 | ||||
-rw-r--r-- | drivers/mtd/nand/alauda.c | 13 | ||||
-rw-r--r-- | drivers/mtd/nand/atmel_nand.c | 8 | ||||
-rw-r--r-- | drivers/mtd/nand/gpmi-nand/gpmi-lib.c | 12 |
5 files changed, 11 insertions, 24 deletions
diff --git a/drivers/mtd/devices/block2mtd.c b/drivers/mtd/devices/block2mtd.c index c16f6b4e8938..e7e46d1e7463 100644 --- a/drivers/mtd/devices/block2mtd.c +++ b/drivers/mtd/devices/block2mtd.c | |||
@@ -14,7 +14,6 @@ | |||
14 | #include <linux/list.h> | 14 | #include <linux/list.h> |
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | #include <linux/mtd/mtd.h> | 16 | #include <linux/mtd/mtd.h> |
17 | #include <linux/buffer_head.h> | ||
18 | #include <linux/mutex.h> | 17 | #include <linux/mutex.h> |
19 | #include <linux/mount.h> | 18 | #include <linux/mount.h> |
20 | #include <linux/slab.h> | 19 | #include <linux/slab.h> |
diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig index 07c47749ffa6..31b034b7eba3 100644 --- a/drivers/mtd/nand/Kconfig +++ b/drivers/mtd/nand/Kconfig | |||
@@ -420,7 +420,6 @@ config MTD_NAND_NANDSIM | |||
420 | config MTD_NAND_GPMI_NAND | 420 | config MTD_NAND_GPMI_NAND |
421 | bool "GPMI NAND Flash Controller driver" | 421 | bool "GPMI NAND Flash Controller driver" |
422 | depends on MTD_NAND && (SOC_IMX23 || SOC_IMX28) | 422 | depends on MTD_NAND && (SOC_IMX23 || SOC_IMX28) |
423 | select MTD_PARTITIONS | ||
424 | select MTD_CMDLINE_PARTS | 423 | select MTD_CMDLINE_PARTS |
425 | help | 424 | help |
426 | Enables NAND Flash support for IMX23 or IMX28. | 425 | Enables NAND Flash support for IMX23 or IMX28. |
diff --git a/drivers/mtd/nand/alauda.c b/drivers/mtd/nand/alauda.c index eb40ea829ab2..6a5ff64a139e 100644 --- a/drivers/mtd/nand/alauda.c +++ b/drivers/mtd/nand/alauda.c | |||
@@ -717,17 +717,6 @@ static struct usb_driver alauda_driver = { | |||
717 | .id_table = alauda_table, | 717 | .id_table = alauda_table, |
718 | }; | 718 | }; |
719 | 719 | ||
720 | static int __init alauda_init(void) | 720 | module_usb_driver(alauda_driver); |
721 | { | ||
722 | return usb_register(&alauda_driver); | ||
723 | } | ||
724 | |||
725 | static void __exit alauda_exit(void) | ||
726 | { | ||
727 | usb_deregister(&alauda_driver); | ||
728 | } | ||
729 | |||
730 | module_init(alauda_init); | ||
731 | module_exit(alauda_exit); | ||
732 | 721 | ||
733 | MODULE_LICENSE("GPL"); | 722 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/mtd/nand/atmel_nand.c b/drivers/mtd/nand/atmel_nand.c index 23e5d77c39fc..4dd056e2e16a 100644 --- a/drivers/mtd/nand/atmel_nand.c +++ b/drivers/mtd/nand/atmel_nand.c | |||
@@ -113,7 +113,7 @@ static int cpu_has_dma(void) | |||
113 | */ | 113 | */ |
114 | static void atmel_nand_enable(struct atmel_nand_host *host) | 114 | static void atmel_nand_enable(struct atmel_nand_host *host) |
115 | { | 115 | { |
116 | if (host->board->enable_pin) | 116 | if (gpio_is_valid(host->board->enable_pin)) |
117 | gpio_set_value(host->board->enable_pin, 0); | 117 | gpio_set_value(host->board->enable_pin, 0); |
118 | } | 118 | } |
119 | 119 | ||
@@ -122,7 +122,7 @@ static void atmel_nand_enable(struct atmel_nand_host *host) | |||
122 | */ | 122 | */ |
123 | static void atmel_nand_disable(struct atmel_nand_host *host) | 123 | static void atmel_nand_disable(struct atmel_nand_host *host) |
124 | { | 124 | { |
125 | if (host->board->enable_pin) | 125 | if (gpio_is_valid(host->board->enable_pin)) |
126 | gpio_set_value(host->board->enable_pin, 1); | 126 | gpio_set_value(host->board->enable_pin, 1); |
127 | } | 127 | } |
128 | 128 | ||
@@ -492,7 +492,7 @@ static int __init atmel_nand_probe(struct platform_device *pdev) | |||
492 | nand_chip->IO_ADDR_W = host->io_base; | 492 | nand_chip->IO_ADDR_W = host->io_base; |
493 | nand_chip->cmd_ctrl = atmel_nand_cmd_ctrl; | 493 | nand_chip->cmd_ctrl = atmel_nand_cmd_ctrl; |
494 | 494 | ||
495 | if (host->board->rdy_pin) | 495 | if (gpio_is_valid(host->board->rdy_pin)) |
496 | nand_chip->dev_ready = atmel_nand_device_ready; | 496 | nand_chip->dev_ready = atmel_nand_device_ready; |
497 | 497 | ||
498 | regs = platform_get_resource(pdev, IORESOURCE_MEM, 1); | 498 | regs = platform_get_resource(pdev, IORESOURCE_MEM, 1); |
@@ -530,7 +530,7 @@ static int __init atmel_nand_probe(struct platform_device *pdev) | |||
530 | platform_set_drvdata(pdev, host); | 530 | platform_set_drvdata(pdev, host); |
531 | atmel_nand_enable(host); | 531 | atmel_nand_enable(host); |
532 | 532 | ||
533 | if (host->board->det_pin) { | 533 | if (gpio_is_valid(host->board->det_pin)) { |
534 | if (gpio_get_value(host->board->det_pin)) { | 534 | if (gpio_get_value(host->board->det_pin)) { |
535 | printk(KERN_INFO "No SmartMedia card inserted.\n"); | 535 | printk(KERN_INFO "No SmartMedia card inserted.\n"); |
536 | res = -ENXIO; | 536 | res = -ENXIO; |
diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-lib.c b/drivers/mtd/nand/gpmi-nand/gpmi-lib.c index de4db7604a3f..2a56fc6f399a 100644 --- a/drivers/mtd/nand/gpmi-nand/gpmi-lib.c +++ b/drivers/mtd/nand/gpmi-nand/gpmi-lib.c | |||
@@ -126,7 +126,7 @@ int gpmi_init(struct gpmi_nand_data *this) | |||
126 | struct resources *r = &this->resources; | 126 | struct resources *r = &this->resources; |
127 | int ret; | 127 | int ret; |
128 | 128 | ||
129 | ret = clk_enable(r->clock); | 129 | ret = clk_prepare_enable(r->clock); |
130 | if (ret) | 130 | if (ret) |
131 | goto err_out; | 131 | goto err_out; |
132 | ret = gpmi_reset_block(r->gpmi_regs, false); | 132 | ret = gpmi_reset_block(r->gpmi_regs, false); |
@@ -146,7 +146,7 @@ int gpmi_init(struct gpmi_nand_data *this) | |||
146 | /* Select BCH ECC. */ | 146 | /* Select BCH ECC. */ |
147 | writel(BM_GPMI_CTRL1_BCH_MODE, r->gpmi_regs + HW_GPMI_CTRL1_SET); | 147 | writel(BM_GPMI_CTRL1_BCH_MODE, r->gpmi_regs + HW_GPMI_CTRL1_SET); |
148 | 148 | ||
149 | clk_disable(r->clock); | 149 | clk_disable_unprepare(r->clock); |
150 | return 0; | 150 | return 0; |
151 | err_out: | 151 | err_out: |
152 | return ret; | 152 | return ret; |
@@ -202,7 +202,7 @@ int bch_set_geometry(struct gpmi_nand_data *this) | |||
202 | ecc_strength = bch_geo->ecc_strength >> 1; | 202 | ecc_strength = bch_geo->ecc_strength >> 1; |
203 | page_size = bch_geo->page_size; | 203 | page_size = bch_geo->page_size; |
204 | 204 | ||
205 | ret = clk_enable(r->clock); | 205 | ret = clk_prepare_enable(r->clock); |
206 | if (ret) | 206 | if (ret) |
207 | goto err_out; | 207 | goto err_out; |
208 | 208 | ||
@@ -229,7 +229,7 @@ int bch_set_geometry(struct gpmi_nand_data *this) | |||
229 | writel(BM_BCH_CTRL_COMPLETE_IRQ_EN, | 229 | writel(BM_BCH_CTRL_COMPLETE_IRQ_EN, |
230 | r->bch_regs + HW_BCH_CTRL_SET); | 230 | r->bch_regs + HW_BCH_CTRL_SET); |
231 | 231 | ||
232 | clk_disable(r->clock); | 232 | clk_disable_unprepare(r->clock); |
233 | return 0; | 233 | return 0; |
234 | err_out: | 234 | err_out: |
235 | return ret; | 235 | return ret; |
@@ -704,7 +704,7 @@ void gpmi_begin(struct gpmi_nand_data *this) | |||
704 | int ret; | 704 | int ret; |
705 | 705 | ||
706 | /* Enable the clock. */ | 706 | /* Enable the clock. */ |
707 | ret = clk_enable(r->clock); | 707 | ret = clk_prepare_enable(r->clock); |
708 | if (ret) { | 708 | if (ret) { |
709 | pr_err("We failed in enable the clk\n"); | 709 | pr_err("We failed in enable the clk\n"); |
710 | goto err_out; | 710 | goto err_out; |
@@ -773,7 +773,7 @@ err_out: | |||
773 | void gpmi_end(struct gpmi_nand_data *this) | 773 | void gpmi_end(struct gpmi_nand_data *this) |
774 | { | 774 | { |
775 | struct resources *r = &this->resources; | 775 | struct resources *r = &this->resources; |
776 | clk_disable(r->clock); | 776 | clk_disable_unprepare(r->clock); |
777 | } | 777 | } |
778 | 778 | ||
779 | /* Clears a BCH interrupt. */ | 779 | /* Clears a BCH interrupt. */ |