mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-12-01 00:49:43 +00:00
- dm: core: Correct low cell in ofnode_read_pci_addr() - dm: core: Correct bad cast in ofnode_get_addr_size_index()
This commit is contained in:
commit
2baa731d00
2 changed files with 7 additions and 4 deletions
|
@ -261,12 +261,15 @@ fdt_addr_t ofnode_get_addr_size_index(ofnode node, int index, fdt_size_t *size)
|
|||
|
||||
if (ofnode_is_np(node)) {
|
||||
const __be32 *prop_val;
|
||||
u64 size64;
|
||||
uint flags;
|
||||
|
||||
prop_val = of_get_address(ofnode_to_np(node), index,
|
||||
(u64 *)size, &flags);
|
||||
prop_val = of_get_address(ofnode_to_np(node), index, &size64,
|
||||
&flags);
|
||||
if (!prop_val)
|
||||
return FDT_ADDR_T_NONE;
|
||||
if (size)
|
||||
*size = size64;
|
||||
|
||||
ns = of_n_size_cells(ofnode_to_np(node));
|
||||
|
||||
|
@ -617,7 +620,7 @@ int ofnode_read_pci_addr(ofnode node, enum fdt_pci_space type,
|
|||
if ((fdt32_to_cpu(*cell) & type) == type) {
|
||||
addr->phys_hi = fdt32_to_cpu(cell[0]);
|
||||
addr->phys_mid = fdt32_to_cpu(cell[1]);
|
||||
addr->phys_lo = fdt32_to_cpu(cell[1]);
|
||||
addr->phys_lo = fdt32_to_cpu(cell[2]);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -217,7 +217,7 @@ int fdtdec_get_pci_addr(const void *blob, int node, enum fdt_pci_space type,
|
|||
if ((fdt32_to_cpu(*cell) & type) == type) {
|
||||
addr->phys_hi = fdt32_to_cpu(cell[0]);
|
||||
addr->phys_mid = fdt32_to_cpu(cell[1]);
|
||||
addr->phys_lo = fdt32_to_cpu(cell[1]);
|
||||
addr->phys_lo = fdt32_to_cpu(cell[2]);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue