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 <asm-generic/io.h> ... 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
signature.asc
Description: Digital signature
_______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot