All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] MTD: NAND: pxa3xx_nand: allow building as module
@ 2009-01-19 11:27 Mike Rapoport
  2009-01-19 11:40 ` Ben Dooks
  0 siblings, 1 reply; 13+ messages in thread
From: Mike Rapoport @ 2009-01-19 11:27 UTC (permalink / raw)
  To: eric.miao; +Cc: linux-mtd, linux-arm-kernel, Mike Rapoport


Signed-off-by: Mike Rapoport <mike@compulab.co.il>
---
 drivers/mtd/nand/Kconfig       |    2 +-
 drivers/mtd/nand/pxa3xx_nand.c |   10 ++++++++++
 2 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig
index 8b12e6e..d3966d0 100644
--- a/drivers/mtd/nand/Kconfig
+++ b/drivers/mtd/nand/Kconfig
@@ -334,7 +334,7 @@ config MTD_NAND_ATMEL_ECC_NONE
 endchoice
 
 config MTD_NAND_PXA3xx
-	bool "Support for NAND flash devices on PXA3xx"
+	tristate "Support for NAND flash devices on PXA3xx"
 	depends on MTD_NAND && PXA3xx
 	help
 	  This enables the driver for the NAND flash device found on
diff --git a/drivers/mtd/nand/pxa3xx_nand.c b/drivers/mtd/nand/pxa3xx_nand.c
index cc55cbc..628ba08 100644
--- a/drivers/mtd/nand/pxa3xx_nand.c
+++ b/drivers/mtd/nand/pxa3xx_nand.c
@@ -123,6 +123,7 @@ struct pxa3xx_nand_info {
 
 	struct clk		*clk;
 	void __iomem		*mmio_base;
+	struct resource		*res;
 
 	unsigned int 		buf_start;
 	unsigned int		buf_count;
@@ -1079,6 +1080,7 @@ static int pxa3xx_nand_probe(struct platform_device *pdev)
 
 	this = &info->nand_chip;
 	mtd->priv = info;
+	mtd->owner = THIS_MODULE;
 
 	info->clk = clk_get(&pdev->dev, NULL);
 	if (IS_ERR(info->clk)) {
@@ -1125,6 +1127,7 @@ static int pxa3xx_nand_probe(struct platform_device *pdev)
 		goto fail_put_clk;
 	}
 
+	info->res = r;
 	info->mmio_base = ioremap(r->start, r->end - r->start + 1);
 	if (info->mmio_base == NULL) {
 		dev_err(&pdev->dev, "ioremap() failed\n");
@@ -1199,6 +1202,13 @@ static int pxa3xx_nand_remove(struct platform_device *pdev)
 				info->data_buff, info->data_buff_phys);
 	} else
 		kfree(info->data_buff);
+
+	iounmap(info->mmio_base);
+	release_mem_region(info->res->start, info->res->end - info->res->start + 1);
+
+	clk_disable(info->clk);
+	clk_put(info->clk);
+
 	kfree(mtd);
 	return 0;
 }
-- 
1.5.6.4

^ permalink raw reply related	[flat|nested] 13+ messages in thread
* pxa3xx_nand improvements
@ 2009-02-17 11:54 Mike Rapoport
  2009-02-17 11:54 ` [PATCH] MTD: NAND: pxa3xx_nand: allow building as module Mike Rapoport
  0 siblings, 1 reply; 13+ messages in thread
From: Mike Rapoport @ 2009-02-17 11:54 UTC (permalink / raw)
  To: dwmw2; +Cc: eric.miao, linux-mtd

David,
Can you please merge the pxa3xx_nand patches?

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2009-02-17 11:55 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-19 11:27 [PATCH] MTD: NAND: pxa3xx_nand: allow building as module Mike Rapoport
2009-01-19 11:40 ` Ben Dooks
2009-01-20  3:16   ` Eric Miao
2009-01-20  7:21     ` Mike Rapoport
2009-01-20  7:33     ` Mike Rapoport
2009-01-20  7:33       ` [PATCH] MTD: NAND: pxa3xx_nand: use resource_size instead of 'r->end - r->start + 1' Mike Rapoport
2009-01-20  7:33         ` [PATCH] MTD: NAND: pxa3xx_nand: allow building as module Mike Rapoport
2009-01-20  7:33           ` [PATCH] MTD: NAND: pxa3xx_nand: add ability to keep controller settings defined by OBM/bootloader Mike Rapoport
2009-01-22  7:06             ` Mike Rapoport
2009-01-22  8:03               ` Eric Miao
2009-01-20  9:01           ` [PATCH] MTD: NAND: pxa3xx_nand: allow building as module Eric Miao
2009-01-20  9:01         ` [PATCH] MTD: NAND: pxa3xx_nand: use resource_size instead of 'r->end - r->start + 1' Eric Miao
  -- strict thread matches above, loose matches on Subject: below --
2009-02-17 11:54 pxa3xx_nand improvements Mike Rapoport
2009-02-17 11:54 ` [PATCH] MTD: NAND: pxa3xx_nand: allow building as module Mike Rapoport

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.