[U-Boot] [PATCH v2 1/3] nios2: map physical address to uncached virtual address

Thomas Chou thomas at wytron.com.tw
Fri Oct 2 02:16:26 CEST 2015


Hi Simon,

On 10/02/2015 06:49 AM, Simon Glass wrote:
>>> Add ioremap() to map physical address to uncached virtual
>>> address. We need this to convert the reg address from the
>>> device tree.
> Can we not rely on the 'ranges' property to sort this out?

The ranges translate address across buses/bridges. The address is still 
physical address. In the case of nios2, the virtual address map of mmu 
or nonmmu are different, though the physical address should be the same. 
So we really need sort of ioremap(). You may find a lots of call to 
ioremap() in linux drivers. It is quite standard. We also want to use 
the same dts/dtb for both u-boot and linux. I would suggest ioremap() is 
the way.

Thanks a lot for your review.

Best regards,
Thomas


More information about the U-Boot mailing list