public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH 1/2] Blackfin NFC Driver: remove pointless return value in bf5xx_nand_dma_rw
@ 2009-05-26 10:24 Mike Frysinger
  2009-05-26 10:24 ` [PATCH 2/2] Blackfin NFC Driver: fix hang when using NAND on BF527-EZKITs Mike Frysinger
  2009-05-27 14:46 ` [PATCH 1/2] Blackfin NFC Driver: remove pointless return value in bf5xx_nand_dma_rw Artem Bityutskiy
  0 siblings, 2 replies; 5+ messages in thread
From: Mike Frysinger @ 2009-05-26 10:24 UTC (permalink / raw)
  To: linux-mtd; +Cc: uclinux-dist-devel, Bryan Wu

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
---
 drivers/mtd/nand/bf5xx_nand.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/drivers/mtd/nand/bf5xx_nand.c b/drivers/mtd/nand/bf5xx_nand.c
index 4c2a67c..2ab42d2 100644
--- a/drivers/mtd/nand/bf5xx_nand.c
+++ b/drivers/mtd/nand/bf5xx_nand.c
@@ -458,7 +458,7 @@ static irqreturn_t bf5xx_nand_dma_irq(int irq, void *dev_id)
 	return IRQ_HANDLED;
 }
 
-static int bf5xx_nand_dma_rw(struct mtd_info *mtd,
+static void bf5xx_nand_dma_rw(struct mtd_info *mtd,
 				uint8_t *buf, int is_read)
 {
 	struct bf5xx_nand_info *info = mtd_to_nand_info(mtd);
@@ -512,8 +512,6 @@ static int bf5xx_nand_dma_rw(struct mtd_info *mtd,
 	else
 		bfin_write_NFC_PGCTL(0x2);
 	wait_for_completion(&info->dma_completion);
-
-	return 0;
 }
 
 static void bf5xx_nand_dma_read_buf(struct mtd_info *mtd,
-- 
1.6.3.1

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

* [PATCH 2/2] Blackfin NFC Driver: fix hang when using NAND on BF527-EZKITs
  2009-05-26 10:24 [PATCH 1/2] Blackfin NFC Driver: remove pointless return value in bf5xx_nand_dma_rw Mike Frysinger
@ 2009-05-26 10:24 ` Mike Frysinger
  2009-05-27 14:46 ` [PATCH 1/2] Blackfin NFC Driver: remove pointless return value in bf5xx_nand_dma_rw Artem Bityutskiy
  1 sibling, 0 replies; 5+ messages in thread
From: Mike Frysinger @ 2009-05-26 10:24 UTC (permalink / raw)
  To: linux-mtd; +Cc: uclinux-dist-devel, Cliff Cai, Bryan Wu

From: Cliff Cai <cliff.cai@analog.com>

The DMAs have different bit sizes on BF52x and BF54x.  From the PHRM:

"The 16-bit DMA Access Bus (DAB) connects the DMA controller to the
on-chip peripherals, PPI, SPI, Ethernet MAC, the SPORTs, NFC,
HOSTDP and the UARTs."

32-bit DMA won't work for BF52x.

Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
---
 drivers/mtd/nand/bf5xx_nand.c |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/drivers/mtd/nand/bf5xx_nand.c b/drivers/mtd/nand/bf5xx_nand.c
index 2ab42d2..8506e7e 100644
--- a/drivers/mtd/nand/bf5xx_nand.c
+++ b/drivers/mtd/nand/bf5xx_nand.c
@@ -496,11 +496,20 @@ static void bf5xx_nand_dma_rw(struct mtd_info *mtd,
 	/* setup DMA register with Blackfin DMA API */
 	set_dma_config(CH_NFC, 0x0);
 	set_dma_start_addr(CH_NFC, (unsigned long) buf);
+
+/* The DMAs have different size on BF52x and BF54x */
+#ifdef CONFIG_BF52x
+	set_dma_x_count(CH_NFC, (page_size >> 1));
+	set_dma_x_modify(CH_NFC, 2);
+	val = DI_EN | WDSIZE_16;
+#endif
+
+#ifdef CONFIG_BF54x
 	set_dma_x_count(CH_NFC, (page_size >> 2));
 	set_dma_x_modify(CH_NFC, 4);
-
-	/* setup write or read operation */
 	val = DI_EN | WDSIZE_32;
+#endif
+	/* setup write or read operation */
 	if (is_read)
 		val |= WNR;
 	set_dma_config(CH_NFC, val);
-- 
1.6.3.1

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

* Re: [PATCH 1/2] Blackfin NFC Driver: remove pointless return value in bf5xx_nand_dma_rw
  2009-05-26 10:24 [PATCH 1/2] Blackfin NFC Driver: remove pointless return value in bf5xx_nand_dma_rw Mike Frysinger
  2009-05-26 10:24 ` [PATCH 2/2] Blackfin NFC Driver: fix hang when using NAND on BF527-EZKITs Mike Frysinger
@ 2009-05-27 14:46 ` Artem Bityutskiy
  2009-06-02  3:57   ` Mike Frysinger
  1 sibling, 1 reply; 5+ messages in thread
From: Artem Bityutskiy @ 2009-05-27 14:46 UTC (permalink / raw)
  To: Mike Frysinger; +Cc: uclinux-dist-devel, Bryan Wu, linux-mtd

On Tue, 2009-05-26 at 06:24 -0400, Mike Frysinger wrote:
> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
> Signed-off-by: Bryan Wu <cooloney@kernel.org>
> ---
>  drivers/mtd/nand/bf5xx_nand.c |    4 +---
>  1 files changed, 1 insertions(+), 3 deletions(-)

I've taken these 2 patches to my l2-mtd-2.6.git.

-- 
Best regards,
Artem Bityutskiy (Битюцкий Артём)

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

* Re: [PATCH 1/2] Blackfin NFC Driver: remove pointless return value in bf5xx_nand_dma_rw
  2009-05-27 14:46 ` [PATCH 1/2] Blackfin NFC Driver: remove pointless return value in bf5xx_nand_dma_rw Artem Bityutskiy
@ 2009-06-02  3:57   ` Mike Frysinger
  2009-06-02 13:19     ` Artem Bityutskiy
  0 siblings, 1 reply; 5+ messages in thread
From: Mike Frysinger @ 2009-06-02  3:57 UTC (permalink / raw)
  To: dedekind; +Cc: uclinux-dist-devel, Bryan Wu, Mike Frysinger, linux-mtd

On Wed, May 27, 2009 at 10:46, Artem Bityutskiy wrote:
> On Tue, 2009-05-26 at 06:24 -0400, Mike Frysinger wrote:
>> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
>> Signed-off-by: Bryan Wu <cooloney@kernel.org>
>> ---
>>  drivers/mtd/nand/bf5xx_nand.c |    4 +---
>>  1 files changed, 1 insertions(+), 3 deletions(-)
>
> I've taken these 2 patches to my l2-mtd-2.6.git.

looks like a typo was made when you rewrote the subject line ?
http://git.infradead.org/users/dedekind/l2-mtd-2.6.git?a=commit;h=f6f3799ed7d93bbfef8fc96013a22121580ee233
"NFCr" rather than "NFC" ...
-mike

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

* Re: [PATCH 1/2] Blackfin NFC Driver: remove pointless return value in  bf5xx_nand_dma_rw
  2009-06-02  3:57   ` Mike Frysinger
@ 2009-06-02 13:19     ` Artem Bityutskiy
  0 siblings, 0 replies; 5+ messages in thread
From: Artem Bityutskiy @ 2009-06-02 13:19 UTC (permalink / raw)
  To: Mike Frysinger; +Cc: uclinux-dist-devel, Bryan Wu, Mike Frysinger, linux-mtd

On Mon, 2009-06-01 at 23:57 -0400, Mike Frysinger wrote:
> On Wed, May 27, 2009 at 10:46, Artem Bityutskiy wrote:
> > On Tue, 2009-05-26 at 06:24 -0400, Mike Frysinger wrote:
> >> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
> >> Signed-off-by: Bryan Wu <cooloney@kernel.org>
> >> ---
> >>  drivers/mtd/nand/bf5xx_nand.c |    4 +---
> >>  1 files changed, 1 insertions(+), 3 deletions(-)
> >
> > I've taken these 2 patches to my l2-mtd-2.6.git.
> 
> looks like a typo was made when you rewrote the subject line ?
> http://git.infradead.org/users/dedekind/l2-mtd-2.6.git?a=commit;h=f6f3799ed7d93bbfef8fc96013a22121580ee233
> "NFCr" rather than "NFC" ...

Let me re-phrase it as "when you amended the subject line for
unification purposes". I'll fix that. This tree is anyway
throw-away. I'm just being an intelligent patchwork for dwmw2
in this case. :-)

-- 
Best regards,
Artem Bityutskiy (Битюцкий Артём)

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

end of thread, other threads:[~2009-06-02 13:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-26 10:24 [PATCH 1/2] Blackfin NFC Driver: remove pointless return value in bf5xx_nand_dma_rw Mike Frysinger
2009-05-26 10:24 ` [PATCH 2/2] Blackfin NFC Driver: fix hang when using NAND on BF527-EZKITs Mike Frysinger
2009-05-27 14:46 ` [PATCH 1/2] Blackfin NFC Driver: remove pointless return value in bf5xx_nand_dma_rw Artem Bityutskiy
2009-06-02  3:57   ` Mike Frysinger
2009-06-02 13:19     ` Artem Bityutskiy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox