
24 Mar
2015
24 Mar
'15
12:20 a.m.
On 20 March 2015 at 05:51, Thierry Reding thierry.reding@gmail.com wrote:
From: Thierry Reding treding@nvidia.com
The fdtdec_get_pci_addr() implementation uses fdt_addr_to_cpu() to read cells from an FDT blob. That is wrong because cells are always 32 bits wide, irrespective of the architecture's address bus width, which does not apply to fdt_addr_t.
Besides reading the wrong results, this can also cause aborts on 64-bit architectures that don't allow unaligned accesses to memory. Fix this by using fdt32_to_cpu() to read the cells instead.
Cc: Hanna Hawa hannah@marvell.com Cc: Simon Glass sjg@chromium.org Signed-off-by: Thierry Reding treding@nvidia.com
Acked-by: Simon Glass sjg@chromium.org