[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC PATCH V1 04/14] xilinx_uartlite: Added fdt gen. platfo
From: |
Peter A. G. Crosthwaite |
Subject: |
[Qemu-devel] [RFC PATCH V1 04/14] xilinx_uartlite: Added fdt gen. platform support |
Date: |
Thu, 25 Aug 2011 16:41:10 +1000 |
Signed-off-by: Peter A. G. Crosthwaite <address@hidden>
---
hw/xilinx_uartlite.c | 24 ++++++++++++++++++++++++
1 files changed, 24 insertions(+), 0 deletions(-)
diff --git a/hw/xilinx_uartlite.c b/hw/xilinx_uartlite.c
index 467a26c..dc2debd 100644
--- a/hw/xilinx_uartlite.c
+++ b/hw/xilinx_uartlite.c
@@ -218,3 +218,27 @@ static void xilinx_uart_register(void)
}
device_init(xilinx_uart_register)
+
+#ifdef CONFIG_FDT
+
+#include "fdt_generic_util.h"
+
+static int xilinx_uartlite_fdt_init(char *node_path, FDTMachineInfo *fdti,
+ void *unused)
+{
+ target_phys_addr_t base;
+ qemu_irq irqline;
+ char irq_info[1024];
+
+ base = qemu_devtree_getprop(fdti->fdt, NULL, node_path, "reg", 0, 0);
+ irqline = fdt_get_irq_info(fdti, node_path, 0, NULL, irq_info);
+ printf("FDT: UARTLITE: baseaddr: 0x" TARGET_FMT_plx ", irq: %s\n", base,
+ irq_info);
+ sysbus_create_simple("xilinx,uartlite", base, irqline);
+ return 0;
+}
+
+fdt_register_compatibility(xilinx_uartlite_fdt_init,
+ "xlnx,xps-uartlite-1.00.a");
+
+#endif /* CONFIG_FDT */
--
1.7.3.2
- [Qemu-devel] [RFC PATCH V1 00/14] Dynamic machine model creation from device trees, Peter A. G. Crosthwaite, 2011/08/25
- [Qemu-devel] [RFC PATCH V1 01/14] qemu-coroutine: Add simple work queue support, Peter A. G. Crosthwaite, 2011/08/25
- [Qemu-devel] [RFC PATCH V1 02/14] device_tree: Extended interface for fdt_generic, Peter A. G. Crosthwaite, 2011/08/25
- [Qemu-devel] [RFC PATCH V1 03/14] fdt_generic: First revision, Peter A. G. Crosthwaite, 2011/08/25
- [Qemu-devel] [RFC PATCH V1 04/14] xilinx_uartlite: Added fdt gen. platform support,
Peter A. G. Crosthwaite <=
- [Qemu-devel] [RFC PATCH V1 05/14] pflash_cfi01: Added fdt generic platform support, Peter A. G. Crosthwaite, 2011/08/25
- [Qemu-devel] [RFC PATCH V1 06/14] qdev: Added fn for querying device property types, Peter A. G. Crosthwaite, 2011/08/25
- [Qemu-devel] [RFC PATCH V1 07/14] fdt_generic_qdev: first revision, Peter A. G. Crosthwaite, 2011/08/25
- [Qemu-devel] [RFC PATCH V1 13/14] microblaze: Add an MSR_PVR constant and use it., Peter A. G. Crosthwaite, 2011/08/25
- [Qemu-devel] [RFC PATCH V1 14/14] microblaze_generic_fdt: first revision, Peter A. G. Crosthwaite, 2011/08/25
- [Qemu-devel] [RFC PATCH V1 12/14] microblaze: Make the MSR PVR bit non writable, Peter A. G. Crosthwaite, 2011/08/25