Skip to contentSkip to conversation

mtd maps - Blackfin Async Flash Maps (try #4): Handle the case where flash memory and ethernet mac/phy are mapped onto the same async bank

PATCH In review Bryan Wu 2 participants 2 messages May 19, 2008 Memory technology devices (MTD)

lore
Share & tools
lore

Bryan Wu

author
#0 lore raw

PATCH 1/1 mtd maps - Blackfin Async Flash Maps (try #4): Handle the case where flash memory and ethernet mac/phy are mapped onto the same async bank

From: Mike Frysinger <[email protected]>

[try #4]
- drop superfluous casts
- drop SSYNC() when reading from the flash and rewrite bfin_copy_from() to be like bfin_copy_to() so that we dont have to handle all the aligned/unaligned cases

[try #3] rename bf5xx-flash to bfin-async-flash
- move all kconfig board settings into board resources
- fixup casting style according to lkml feedback
- rewrite driver so that it can handle arbitrary of instances according to the declared platform resources

[try #2]
Remove useless SSYNC() as Will said

[try #1]
The BF533-STAMP does this for example.
All board-specific configuration goes in your board resources file.

---
 drivers/mtd/maps/Kconfig            |   11 ++
 drivers/mtd/maps/Makefile           |    1 +
 drivers/mtd/maps/bfin-async-flash.c |  219 +++++++++++++++++++++++++++++++++++
 3 files changed, 231 insertions(+), 0 deletions(-)
 create mode 100644 drivers/mtd/maps/bfin-async-flash.c
drivers/mtd/maps/Kconfig +11 -0
index 17bc87a..d4878eb 100644
@@ -517,6 +517,17 @@ config MTD_PCMCIA_ANONYMOUS
 
 	  If unsure, say N.
 
+config MTD_BFIN_ASYNC
+	tristate "Blackfin BF533-STAMP Flash Chip Support"
+	depends on BFIN533_STAMP && MTD_CFI
+	select MTD_PARTITIONS
+	default y
+	help
+	  Map driver which allows for simultaneous utilization of
+	  ethernet and CFI parallel flash.
+
+	  If compiled as a module, it will be called bfin-async-flash.
+
 config MTD_UCLINUX
 	tristate "Generic uClinux RAM/ROM filesystem support"
 	depends on MTD_PARTITIONS && !MMU
drivers/mtd/maps/Makefile +1 -0
index 957fb5f..4ed1672 100644
@@ -67,3 +67,4 @@ obj-$(CONFIG_MTD_PLATRAM)	+= plat-ram.o
 obj-$(CONFIG_MTD_OMAP_NOR)	+= omap_nor.o
 obj-$(CONFIG_MTD_MTX1)		+= mtx-1_flash.o
 obj-$(CONFIG_MTD_INTEL_VR_NOR)	+= intel_vr_nor.o
+obj-$(CONFIG_MTD_BFIN_ASYNC)	+= bfin-async-flash.o
drivers/mtd/maps/bfin-async-flash.c new file +219 -0

219 lines not on this page · raw message

Signature · 1 line
1.5.5
Acked-by on v1 1/1
#1 lore raw
Quoted 16 lines · Bryan Wu

[try #4]
- drop superfluous casts
- drop SSYNC() when reading from the flash and rewrite bfin_copy_from() to be like bfin_copy_to() so that we dont have to handle all the aligned/unaligned cases

[try #3] rename bf5xx-flash to bfin-async-flash
- move all kconfig board settings into board resources
- fixup casting style according to lkml feedback
- rewrite driver so that it can handle arbitrary of instances according to the declared platform resources

[try #2]
Remove useless SSYNC() as Will said

Quoted 7 lines

[try #1]
The BF533-STAMP does this for example.
All board-specific configuration goes in your board resources file.

Looks good to me. If dwmw2 doesn't mind adding another mapping driver, this can go in. Not that I had any idea how physmap could sanely cover this driver too.

Jörn

Signature · 2 lines
Ninety percent of everything is crap.
-- Sturgeon's Law