From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Thu, 13 Oct 2016 12:16:03 -0400 Subject: [U-Boot] [U-Boot,17/27] sandbox: Use asm-generic/io.h In-Reply-To: <20161001141931.32354-18-paul.burton@imgtec.com> References: <20161001141931.32354-18-paul.burton@imgtec.com> Message-ID: <20161013161603.GA17506@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Sat, Oct 01, 2016 at 03:19:20PM +0100, Paul Burton wrote: > Convert the sandbox architecture to make use of the new asm-generic/io.h > to provide address mapping functions. As sandbox actually performs > non-identity mapping between physical & virtual addresses we can't > simply make use of the generic mapping functions, but are able to > implement phys_to_virt() & make use of it from map_physmem(). [snip] > +phys_addr_t virt_to_phys(void *vaddr) > +{ > + return (phys_addr_t)(vaddr - gd->arch.ram_buf); ../arch/sandbox/cpu/cpu.c: In function ?virt_to_phys?: ../arch/sandbox/cpu/cpu.c:65:29: error: invalid operands to binary - (have ?void *? and ?uint8_t *?) return (phys_addr_t)(vaddr - gd->arch.ram_buf); [snip] > -/* > - * Given a physical address and a length, return a virtual address > - * that can be used to access the memory range with the caching > - * properties specified by "flags". > - */ > -#define MAP_NOCACHE (0) > -#define MAP_WRCOMBINE (0) > -#define MAP_WRBACK (0) > -#define MAP_WRTHROUGH (0) [snip] > @@ -71,6 +69,7 @@ static inline void _outsw(volatile u16 *port, const void *buf, int ns) > #define out16(addr, val) > #define in16(addr) 0 > > +#include ... but we use MAP_WRBACK in map/unmap_sysmem which are before we include this so they don't compile. Please fix and run test/py/test.py for sandbox when you're done to ensure it's still all happy, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: