qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: BALATON Zoltan <balaton@eik.bme.hu>
Cc: qemu-devel@nongnu.org, qemu-ppc@nongnu.org,
	Greg Kurz <groug@kaod.org>, Guenter Roeck <linux@roeck-us.net>,
	David Gibson <david@gibson.dropbear.id.au>
Subject: [PATCH] hw: ppc: sam460ex: Disable Ethernet devicetree nodes
Date: Sun, 15 Aug 2021 19:59:15 -0700	[thread overview]
Message-ID: <20210816025915.213093-1-linux@roeck-us.net> (raw)

IBM EMAC Ethernet controllers are not emulated by qemu. If they are
enabled in devicetree files, they are instantiated in Linux but
obviously won't work. Disable associated devicetree nodes to prevent
unpredictable behavior.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
 hw/ppc/sam460ex.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/hw/ppc/sam460ex.c b/hw/ppc/sam460ex.c
index 0737234d66..feb356e625 100644
--- a/hw/ppc/sam460ex.c
+++ b/hw/ppc/sam460ex.c
@@ -194,6 +194,14 @@ static int sam460ex_load_device_tree(hwaddr addr,
         _FDT(fdt_nop_node(fdt, offset));
     }
 
+    /* Ethernet interfaces are not emulated */
+    offset = fdt_node_offset_by_compatible(fdt, -1, "ibm,emac-460ex");
+    while (offset >= 0) {
+        _FDT(fdt_setprop_string(fdt, offset, "status", "disabled"));
+        offset = fdt_node_offset_by_compatible(fdt, offset, "ibm,emac-460ex");
+    }
+
+
     /* set serial port clocks */
     offset = fdt_node_offset_by_compatible(fdt, -1, "ns16550");
     while (offset >= 0) {
-- 
2.25.1



             reply	other threads:[~2021-08-16  3:00 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-16  2:59 Guenter Roeck [this message]
2021-08-16  5:41 ` [PATCH] hw: ppc: sam460ex: Disable Ethernet devicetree nodes David Gibson
2021-08-16 10:11   ` Philippe Mathieu-Daudé
2021-08-16 15:13     ` Guenter Roeck
2021-08-16 10:21   ` BALATON Zoltan
2021-08-17  3:06     ` David Gibson
2021-08-17  9:24       ` BALATON Zoltan
2021-08-17  9:42         ` Peter Maydell
2021-08-16 10:26   ` Peter Maydell
2021-08-16 10:58     ` Philippe Mathieu-Daudé
2021-08-16 11:58       ` BALATON Zoltan
2021-08-17  3:09         ` David Gibson
2021-08-16 13:59     ` Guenter Roeck
2021-08-16 14:03       ` Peter Maydell
2021-08-16 14:11         ` Guenter Roeck
2021-08-16 14:19           ` Peter Maydell
2021-08-16 14:57             ` Guenter Roeck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210816025915.213093-1-linux@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=balaton@eik.bme.hu \
    --cc=david@gibson.dropbear.id.au \
    --cc=groug@kaod.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).