From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=36758 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PqCbb-0006PX-Ce for qemu-devel@nongnu.org; Thu, 17 Feb 2011 17:45:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PqCbZ-0000Wa-Iv for qemu-devel@nongnu.org; Thu, 17 Feb 2011 17:45:47 -0500 Received: from mail.serverraum.org ([78.47.150.89]:39462) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PqCbZ-0000Vo-7z for qemu-devel@nongnu.org; Thu, 17 Feb 2011 17:45:45 -0500 From: Michael Walle Date: Thu, 17 Feb 2011 23:45:09 +0100 Message-Id: <1297982718-21865-9-git-send-email-michael@walle.cc> In-Reply-To: <1297982718-21865-1-git-send-email-michael@walle.cc> References: <1297982718-21865-1-git-send-email-michael@walle.cc> Subject: [Qemu-devel] [PATCH 08/17] lm32: pic and juart helper functions List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Blue Swirl , "Edgar E. Iglesias" , Michael Walle , Alexander Graf , Richard Henderson This patch adds init functions for the PIC and JTAG UART commonly used in the board initialization. Signed-off-by: Michael Walle --- hw/lm32.h | 25 +++++++++++++++++++++++++ 1 files changed, 25 insertions(+), 0 deletions(-) create mode 100644 hw/lm32.h diff --git a/hw/lm32.h b/hw/lm32.h new file mode 100644 index 0000000..0a67632 --- /dev/null +++ b/hw/lm32.h @@ -0,0 +1,25 @@ + +#include "qemu-common.h" + +static inline DeviceState *lm32_pic_init(qemu_irq cpu_irq) +{ + DeviceState *dev; + SysBusDevice *d; + + dev = qdev_create(NULL, "lm32-pic"); + qdev_init_nofail(dev); + d = sysbus_from_qdev(dev); + sysbus_connect_irq(d, 0, cpu_irq); + + return dev; +} + +static inline DeviceState *lm32_juart_init(void) +{ + DeviceState *dev; + + dev = qdev_create(NULL, "lm32-juart"); + qdev_init_nofail(dev); + + return dev; +} -- 1.7.2.3