[U-Boot-Users] [PATCH 0/4] cfi_flash cleanups, take 2

Haavard Skinnemoen hskinnemoen at atmel.com
Wed Dec 12 14:09:22 CET 2007

This is a rework of patch 4-6 in the first "cfi_flash cleanup" series
based on feedback from the u-boot mailing list.

  * Use __raw I/O accessors instead of volatile casts, except in the
    64-bit case (no arches currently have 64-bit I/O accessors.)
  * Add "size" and "flags" parameters to map_physmem() and use them.
  * Add "size" parameter to unmap_physmem() and use it.

I've added four possible flags that may be given to map_physmem() to
specify caching properties:

MAP_NOCACHE: Don't cache anything at all
MAP_WRCOMBINE: Buffering writes to the same cache line is allowed
MAP_WRTHROUGH: Write-through caching is allowed
MAP_WRBACK: Write-back caching is allowed

Platforms are allowed to substitute a flag with another higher up on
the list. For example, if write-through caching is requested, the
platform is allowed to turn off caching altogether, but it is not
allowed to use write-back caching.

The flags currently only have any meaning on avr32, but I hope other
architectures will do something useful with them as well eventually.

Haavard Skinnemoen (4):
      Implement __raw_{read,write}[bwl] on all architectures
      cfi_flash: Introduce read and write accessors
      Introduce map_physmem() and unmap_physmem()
      cfi_flash: Use map_physmem() and unmap_physmem()

 drivers/mtd/cfi_flash.c     |  354 +++++++++++++++++++++++++++----------------
 include/asm-arm/io.h        |   26 +++
 include/asm-avr32/io.h      |   32 ++++
 include/asm-blackfin/io.h   |   26 +++
 include/asm-i386/io.h       |   26 +++
 include/asm-m68k/io.h       |   41 +++++
 include/asm-microblaze/io.h |   26 +++
 include/asm-mips/io.h       |   26 +++
 include/asm-nios/io.h       |   34 ++++
 include/asm-nios2/io.h      |   34 ++++
 include/asm-ppc/io.h        |   58 +++++++-
 11 files changed, 554 insertions(+), 129 deletions(-)

More information about the U-Boot mailing list