[U-Boot-Users] [PATCH 6/6] cfi_flash: Use map_physmem() and unmap_physmem()

Stefan Roese
2007-12-11T18:49:26Z

On Tuesday 11 December 2007, Haavard Skinnemoen wrote:
> > > Use map_physmem() and unmap_physmem() to convert from physical to
> > > virtual addresses. This gives the arch a chance to provide an uncached
> > > mapping for flash accesses.
> >
> > Just to clarify, would we have two mappings? one cacheable for normal
> > read operations and one non-cacheable for control access?
>
> Yeah, that would probably make sense. Should we have different
> functions for them or add a "flags" parameter (which could also be used
> to turn on more "advanced" options like write-combining)?

When starting something like map_physmem(), we should consider the following
things:

- Some platforms have >32bit physical address space, like PPC440 with 36bits.
So the type of phys_addr should not be fixed to u32. We need a new typedef
here. And/or perhaps something like the resource stuff from Linux.
- We should add a size parameter
- And a "flags" parameter as mentioned above would make sense too, for stuff
like caching etc.

And comments?

Best regards,
Stefan

=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================