From d04525ed0323709711277563a2c76e446a017423 Mon Sep 17 00:00:00 2001 From: Shawn Guo Date: Wed, 11 Apr 2012 13:29:31 +0800 Subject: dma: mxs-dma: enable channel in device_issue_pending call Enable channel in device_issue_pending call, so that the order between cookie assignment and channel enabling can be ensured naturally. It fixes the mxs gpmi-nand breakage which is caused by the incorrect order of cookie assigning and channel enabling. Suggested-by: Russell King Signed-off-by: Shawn Guo Tested-by: Huang Shijie Tested-by Signed-off-by: Vinod Koul --- drivers/mtd/nand/gpmi-nand/gpmi-nand.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/mtd') diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c index 75b1dde16358..9ec51cec2e14 100644 --- a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c +++ b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c @@ -266,6 +266,7 @@ int start_dma_without_bch_irq(struct gpmi_nand_data *this, desc->callback = dma_irq_callback; desc->callback_param = this; dmaengine_submit(desc); + dma_async_issue_pending(get_dma_chan(this)); /* Wait for the interrupt from the DMA block. */ err = wait_for_completion_timeout(dma_c, msecs_to_jiffies(1000)); -- cgit 1.4.1 From 39febc018bd26edb9f9f73c0f5ee661de37c7869 Mon Sep 17 00:00:00 2001 From: Shawn Guo Date: Sun, 6 May 2012 22:57:41 +0800 Subject: mtd: nand: gpmi: adopt pinctrl support Cc: linux-mtd@lists.infradead.org Cc: Artem Bityutskiy Signed-off-by: Shawn Guo --- drivers/mtd/nand/gpmi-nand/gpmi-nand.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'drivers/mtd') diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c index 9ec51cec2e14..8478fd9701a3 100644 --- a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c +++ b/drivers/mtd/nand/gpmi-nand/gpmi-nand.c @@ -24,6 +24,7 @@ #include #include #include +#include #include "gpmi-nand.h" /* add our owner bbt descriptor */ @@ -476,6 +477,7 @@ acquire_err: static int __devinit acquire_resources(struct gpmi_nand_data *this) { struct resources *res = &this->resources; + struct pinctrl *pinctrl; int ret; ret = acquire_register_block(this, GPMI_NAND_GPMI_REGS_ADDR_RES_NAME); @@ -494,6 +496,12 @@ static int __devinit acquire_resources(struct gpmi_nand_data *this) if (ret) goto exit_dma_channels; + pinctrl = devm_pinctrl_get_select_default(&pdev->dev); + if (IS_ERR(pinctrl)) { + ret = PTR_ERR(pinctrl); + goto exit_pin; + } + res->clock = clk_get(&this->pdev->dev, NULL); if (IS_ERR(res->clock)) { pr_err("can not get the clock\n"); @@ -503,6 +511,7 @@ static int __devinit acquire_resources(struct gpmi_nand_data *this) return 0; exit_clock: +exit_pin: release_dma_channels(this); exit_dma_channels: release_bch_irq(this); -- cgit 1.4.1