[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 14/20] hw/ppc: e500: Add missing <ranges> in the eTSEC node
From: |
David Gibson |
Subject: |
[PULL 14/20] hw/ppc: e500: Add missing <ranges> in the eTSEC node |
Date: |
Wed, 10 Mar 2021 15:09:56 +1100 |
From: Bin Meng <bin.meng@windriver.com>
The eTSEC node should provide an empty <ranges> property in the
eTSEC node, otherwise of_translate_address() in the Linux kernel
fails to get the eTSEC register base, reporting:
OF: ** translation for device /platform@f00000000/ethernet@0/queue-group **
OF: bus is default (na=1, ns=1) on /platform@f00000000/ethernet@0
OF: translating address: 00000000
OF: parent bus is default (na=1, ns=1) on /platform@f00000000
OF: no ranges; cannot translate
Per devicetree spec v0.3 [1] chapter 2.3.8:
If the property is not present in a bus node, it is assumed that
no mapping exists between children of the node and the parent
address space.
This is why of_translate_address() aborts the address translation.
Apparently U-Boot devicetree parser seems to be tolerant with
missing <ranges> as this was not noticed when testing with U-Boot.
The empty <ranges> property is present in all kernel shipped dtsi
files for eTSEC, Let's add it to conform with the spec.
[1]
https://github.com/devicetree-org/devicetree-specification/releases/download/v0.3/devicetree-specification-v0.3.pdf
Fixes: fdfb7f2cdb2d ("e500: Add support for eTSEC in device tree")
Signed-off-by: Bin Meng <bin.meng@windriver.com>
Message-Id: <1614158919-9473-1-git-send-email-bmeng.cn@gmail.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
---
hw/ppc/e500.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c
index 01517a6c6c..1d94485ac8 100644
--- a/hw/ppc/e500.c
+++ b/hw/ppc/e500.c
@@ -231,6 +231,7 @@ static int create_devtree_etsec(SysBusDevice *sbdev,
PlatformDevtreeData *data)
assert(irq2 >= 0);
qemu_fdt_add_subnode(fdt, node);
+ qemu_fdt_setprop(fdt, node, "ranges", NULL, 0);
qemu_fdt_setprop_string(fdt, node, "device_type", "network");
qemu_fdt_setprop_string(fdt, node, "compatible", "fsl,etsec2");
qemu_fdt_setprop_string(fdt, node, "model", "eTSEC");
--
2.29.2
- [PULL 00/20] ppc-for-6.0 queue 20210310, David Gibson, 2021/03/09
- [PULL 03/20] hw/display/sm501: Inline template header into C file, David Gibson, 2021/03/09
- [PULL 09/20] target/ppc: Fix bcdsub. emulation when result overflows, David Gibson, 2021/03/09
- [PULL 02/20] hw/display/sm501: Expand out macros in template header, David Gibson, 2021/03/09
- [PULL 10/20] spapr_drc.c: introduce unplug_timeout_timer, David Gibson, 2021/03/09
- [PULL 04/20] spapr_drc.c: do not call spapr_drc_detach() in drc_isolate_logical(), David Gibson, 2021/03/09
- [PULL 06/20] spapr_drc.c: use spapr_drc_release() in isolate_physical/set_unusable, David Gibson, 2021/03/09
- [PULL 07/20] spapr: rename spapr_drc_detach() to spapr_drc_unplug_request(), David Gibson, 2021/03/09
- [PULL 11/20] spapr_drc.c: add hotunplug timeout for CPUs, David Gibson, 2021/03/09
- [PULL 12/20] spapr_drc.c: use DRC reconfiguration to cleanup DIMM unplug state, David Gibson, 2021/03/09
- [PULL 14/20] hw/ppc: e500: Add missing <ranges> in the eTSEC node,
David Gibson <=
- [PULL 17/20] qemu_timer.c: add timer_deadline_ms() helper, David Gibson, 2021/03/09
- [PULL 13/20] hw/net: fsl_etsec: Fix build error when HEX_DUMP is on, David Gibson, 2021/03/09
- [PULL 15/20] spapr.c: add 'unplug already in progress' message for PHB unplug, David Gibson, 2021/03/09
- [PULL 05/20] pseries: Update SLOF firmware image, David Gibson, 2021/03/09
- [PULL 01/20] hw/display/sm501: Remove dead code for non-32-bit RGB surfaces, David Gibson, 2021/03/09
- [PULL 08/20] docs/system: Extend PPC section, David Gibson, 2021/03/09
- [PULL 19/20] spapr.c: remove duplicated assert in spapr_memory_unplug_request(), David Gibson, 2021/03/09
- [PULL 16/20] spapr_pci.c: add 'unplug already in progress' message for PCI unplug, David Gibson, 2021/03/09
- [PULL 20/20] spapr.c: send QAPI event when memory hotunplug fails, David Gibson, 2021/03/09
- [PULL 18/20] target/ppc: fix icount support on Book-e vms accessing SPRs, David Gibson, 2021/03/09