Skip to contentSkip to conversation

qemu-ppce500: pass 'range_id' around in pci_map_region

PATCH In review Miao Yan 4 participants 4 messages Dec 21, 2015 – Jan 4, 2016

lore
Share & tools
lore

Miao Yan

author
#0 lore raw

PATCH 1/1 qemu-ppce500: pass 'range_id' around in pci_map_region

In pci_map_region(), pass 'range_id' to fdt_read_range(), otherwise the same address will be mapped again in other calls to pci_map_region()

---
 board/freescale/qemu-ppce500/qemu-ppce500.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
board/freescale/qemu-ppce500/qemu-ppce500.c +1 -1
index a0fca0d..6cb5692 100644
@@ -81,7 +81,7 @@ static int pci_map_region(void *fdt, int pci_node, int range_id,
 	ulong map_addr;
 	int r;
 
-	r = fdt_read_range(fdt, pci_node, 0, NULL, &addr, &size);
+	r = fdt_read_range(fdt, pci_node, range_id, NULL, &addr, &size);
 	if (r)
 		return r;
 
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/1 qemu-ppce500: pass 'range_id' around in pci_map_region

Quoted 9 lines · Miao Yan

In pci_map_region(), pass 'range_id' to fdt_read_range(), otherwise the same address will be mapped again in other calls to pci_map_region()

---
 board/freescale/qemu-ppce500/qemu-ppce500.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
#2 lore raw

PATCH 1/1 qemu-ppce500: pass 'range_id' around in pci_map_region

In reply to Miao Yan
Quoted 5 lines · Miao Yan

In pci_map_region(), pass 'range_id' to fdt_read_range(), otherwise the same address will be mapped again in other calls to pci_map_region()

Oops :).

Alex

Quoted 18 lines
---
 board/freescale/qemu-ppce500/qemu-ppce500.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
board/freescale/qemu-ppce500/qemu-ppce500.c +1 -1
index a0fca0d..6cb5692 100644
@@ -81,7 +81,7 @@ static int pci_map_region(void *fdt, int pci_node, int range_id,
 	ulong map_addr;
 	int r;
 
-	r = fdt_read_range(fdt, pci_node, 0, NULL, &addr, &size);
+	r = fdt_read_range(fdt, pci_node, range_id, NULL, &addr, &size);
 	if (r)
 		return r;
 
#3 lore raw
In reply to Miao Yan
Quoted 7 lines · Miao Yan

In pci_map_region(), pass 'range_id' to fdt_read_range(), otherwise the same address will be mapped again in other calls to pci_map_region()

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160104/c8ffe5ca/attachment.sig>