[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 3/5] PPC: e500: Only create dt entries for existing
From: |
Alexander Graf |
Subject: |
[Qemu-devel] [PATCH 3/5] PPC: e500: Only create dt entries for existing serial ports |
Date: |
Wed, 4 Jun 2014 14:28:54 +0200 |
When the user specifies -nodefaults he can tell us that he doesn't want any
serial ports spawned by default. While we do honor that wish, we still create
device tree entries for those non-existent devices.
Make device tree generation depend on whether the device is actually available.
Signed-off-by: Alexander Graf <address@hidden>
---
hw/ppc/e500.c | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c
index a973c18..33d54b3 100644
--- a/hw/ppc/e500.c
+++ b/hw/ppc/e500.c
@@ -316,10 +316,15 @@ static int ppce500_load_device_tree(MachineState *machine,
* device it finds in the dt as serial output device. And we generate
* devices in reverse order to the dt.
*/
- dt_serial_create(fdt, MPC8544_SERIAL1_REGS_OFFSET,
- soc, mpic, "serial1", 1, false);
- dt_serial_create(fdt, MPC8544_SERIAL0_REGS_OFFSET,
- soc, mpic, "serial0", 0, true);
+ if (serial_hds[1]) {
+ dt_serial_create(fdt, MPC8544_SERIAL1_REGS_OFFSET,
+ soc, mpic, 42, "serial1", 1, false);
+ }
+
+ if (serial_hds[0]) {
+ dt_serial_create(fdt, MPC8544_SERIAL0_REGS_OFFSET,
+ soc, mpic, 42, "serial0", 0, true);
+ }
snprintf(gutil, sizeof(gutil), "%s/address@hidden", soc,
MPC8544_UTIL_OFFSET);
--
1.8.1.4
- Re: [Qemu-devel] [PATCH 4/5] PPC: e500: Support platform devices, (continued)
- [Qemu-devel] [PATCH 5/5] PPC: e500: Add support for platform serial devices, Alexander Graf, 2014/06/04
- [Qemu-devel] [PATCH 1/5] Platform: Add platform device class, Alexander Graf, 2014/06/04
- [Qemu-devel] [PATCH 2/5] Platform: Add serial device, Alexander Graf, 2014/06/04
- [Qemu-devel] [PATCH 3/5] PPC: e500: Only create dt entries for existing serial ports,
Alexander Graf <=
- Re: [Qemu-devel] [PATCH 0/5] Platform device support, Paolo Bonzini, 2014/06/19
- Re: [Qemu-devel] [PATCH 0/5] Platform device support, Peter Crosthwaite, 2014/06/20
- Re: [Qemu-devel] [PATCH 0/5] Platform device support, Paolo Bonzini, 2014/06/20
- Re: [Qemu-devel] [PATCH 0/5] Platform device support, Alexander Graf, 2014/06/26
- Re: [Qemu-devel] [PATCH 0/5] Platform device support, Andreas Färber, 2014/06/27
- Re: [Qemu-devel] [PATCH 0/5] Platform device support, Peter Crosthwaite, 2014/06/27
- Re: [Qemu-devel] [PATCH 0/5] Platform device support, Andreas Färber, 2014/06/27
- Re: [Qemu-devel] [PATCH 0/5] Platform device support, Alexander Graf, 2014/06/27
- Re: [Qemu-devel] [PATCH 0/5] Platform device support, Paolo Bonzini, 2014/06/27