* [PATCH 0/3] Blackfin NFC Driver updates
@ 2009-01-07 16:41 Bryan Wu
2009-01-07 16:41 ` [PATCH 1/3] Blackfin NFC Driver: do not clobber DMAC1_PERIMUX Bryan Wu
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Bryan Wu @ 2009-01-07 16:41 UTC (permalink / raw)
To: linux-mtd, linux-kernel
Hi folks,
Here are 3 bug fixing patches for Blackfin NFC driver.
Thanks
-Bryan
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/3] Blackfin NFC Driver: do not clobber DMAC1_PERIMUX
2009-01-07 16:41 [PATCH 0/3] Blackfin NFC Driver updates Bryan Wu
@ 2009-01-07 16:41 ` Bryan Wu
2009-01-07 16:41 ` [PATCH 2/3] Blackfin NFC Driver: mark bf5xx_nand_add_partition() as __devinit Bryan Wu
2009-01-07 16:41 ` [PATCH 3/3] Blackfin NFC Driver: drop pointless casts with set_dma_callback() Bryan Wu
2 siblings, 0 replies; 4+ messages in thread
From: Bryan Wu @ 2009-01-07 16:41 UTC (permalink / raw)
To: linux-mtd, linux-kernel; +Cc: Bryan Wu, Mike Frysinger
From: Mike Frysinger <vapier.adi@gmail.com>
only set DMAC1_PERIMUX once we have requested and been granted the dma
channel to prevent breaking other peripherals in the error case
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
---
drivers/mtd/nand/bf5xx_nand.c | 14 ++++++--------
1 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/drivers/mtd/nand/bf5xx_nand.c b/drivers/mtd/nand/bf5xx_nand.c
index 9af2a2c..5c6056e 100644
--- a/drivers/mtd/nand/bf5xx_nand.c
+++ b/drivers/mtd/nand/bf5xx_nand.c
@@ -552,7 +552,6 @@ static void bf5xx_nand_dma_write_buf(struct mtd_info *mtd,
static int bf5xx_nand_dma_init(struct bf5xx_nand_info *info)
{
int ret;
- unsigned short val;
/* Do not use dma */
if (!hardware_ecc)
@@ -560,13 +559,6 @@ static int bf5xx_nand_dma_init(struct bf5xx_nand_info *info)
init_completion(&info->dma_completion);
-#ifdef CONFIG_BF54x
- /* Setup DMAC1 channel mux for NFC which shared with SDH */
- val = bfin_read_DMAC1_PERIMUX();
- val &= 0xFFFE;
- bfin_write_DMAC1_PERIMUX(val);
- SSYNC();
-#endif
/* Request NFC DMA channel */
ret = request_dma(CH_NFC, "BF5XX NFC driver");
if (ret < 0) {
@@ -574,6 +566,12 @@ static int bf5xx_nand_dma_init(struct bf5xx_nand_info *info)
return ret;
}
+#ifdef CONFIG_BF54x
+ /* Setup DMAC1 channel mux for NFC which shared with SDH */
+ bfin_write_DMAC1_PERIMUX(bfin_read_DMAC1_PERIMUX() & ~1);
+ SSYNC();
+#endif
+
set_dma_callback(CH_NFC, (void *) bf5xx_nand_dma_irq, (void *) info);
/* Turn off the DMA channel first */
--
1.5.6
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/3] Blackfin NFC Driver: mark bf5xx_nand_add_partition() as __devinit
2009-01-07 16:41 [PATCH 0/3] Blackfin NFC Driver updates Bryan Wu
2009-01-07 16:41 ` [PATCH 1/3] Blackfin NFC Driver: do not clobber DMAC1_PERIMUX Bryan Wu
@ 2009-01-07 16:41 ` Bryan Wu
2009-01-07 16:41 ` [PATCH 3/3] Blackfin NFC Driver: drop pointless casts with set_dma_callback() Bryan Wu
2 siblings, 0 replies; 4+ messages in thread
From: Bryan Wu @ 2009-01-07 16:41 UTC (permalink / raw)
To: linux-mtd, linux-kernel; +Cc: Bryan Wu, Mike Frysinger
From: Mike Frysinger <vapier.adi@gmail.com>
the bf5xx_nand_add_partition() func is only called by __devinit
functions, so put it into the __devinit section as well
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
---
drivers/mtd/nand/bf5xx_nand.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/mtd/nand/bf5xx_nand.c b/drivers/mtd/nand/bf5xx_nand.c
index 5c6056e..520314d 100644
--- a/drivers/mtd/nand/bf5xx_nand.c
+++ b/drivers/mtd/nand/bf5xx_nand.c
@@ -630,7 +630,7 @@ static int bf5xx_nand_hw_init(struct bf5xx_nand_info *info)
/*
* Device management interface
*/
-static int bf5xx_nand_add_partition(struct bf5xx_nand_info *info)
+static int __devinit bf5xx_nand_add_partition(struct bf5xx_nand_info *info)
{
struct mtd_info *mtd = &info->mtd;
--
1.5.6
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 3/3] Blackfin NFC Driver: drop pointless casts with set_dma_callback()
2009-01-07 16:41 [PATCH 0/3] Blackfin NFC Driver updates Bryan Wu
2009-01-07 16:41 ` [PATCH 1/3] Blackfin NFC Driver: do not clobber DMAC1_PERIMUX Bryan Wu
2009-01-07 16:41 ` [PATCH 2/3] Blackfin NFC Driver: mark bf5xx_nand_add_partition() as __devinit Bryan Wu
@ 2009-01-07 16:41 ` Bryan Wu
2 siblings, 0 replies; 4+ messages in thread
From: Bryan Wu @ 2009-01-07 16:41 UTC (permalink / raw)
To: linux-mtd, linux-kernel; +Cc: Bryan Wu, Mike Frysinger
From: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
---
drivers/mtd/nand/bf5xx_nand.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/mtd/nand/bf5xx_nand.c b/drivers/mtd/nand/bf5xx_nand.c
index 520314d..4c2a67c 100644
--- a/drivers/mtd/nand/bf5xx_nand.c
+++ b/drivers/mtd/nand/bf5xx_nand.c
@@ -572,7 +572,7 @@ static int bf5xx_nand_dma_init(struct bf5xx_nand_info *info)
SSYNC();
#endif
- set_dma_callback(CH_NFC, (void *) bf5xx_nand_dma_irq, (void *) info);
+ set_dma_callback(CH_NFC, bf5xx_nand_dma_irq, info);
/* Turn off the DMA channel first */
disable_dma(CH_NFC);
--
1.5.6
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-01-07 16:41 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-07 16:41 [PATCH 0/3] Blackfin NFC Driver updates Bryan Wu
2009-01-07 16:41 ` [PATCH 1/3] Blackfin NFC Driver: do not clobber DMAC1_PERIMUX Bryan Wu
2009-01-07 16:41 ` [PATCH 2/3] Blackfin NFC Driver: mark bf5xx_nand_add_partition() as __devinit Bryan Wu
2009-01-07 16:41 ` [PATCH 3/3] Blackfin NFC Driver: drop pointless casts with set_dma_callback() Bryan Wu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox