From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Roese Date: Tue, 11 Dec 2007 19:49:26 +0100 Subject: [U-Boot-Users] [PATCH 6/6] cfi_flash: Use map_physmem() and unmap_physmem() In-Reply-To: <20071211164356.2056bfbf@dhcp-252-066.norway.atmel.com> References: <1197386900-14570-1-git-send-email-hskinnemoen@atmel.com> <20071211164356.2056bfbf@dhcp-252-066.norway.atmel.com> Message-ID: <200712111949.27205.sr@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 =====================================================================