From patchwork Mon Sep 17 10:00:42 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Evgeny Voevodin X-Patchwork-Id: 184369 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 30B7C2C0094 for ; Mon, 17 Sep 2012 20:32:55 +1000 (EST) Received: from localhost ([::1]:36256 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TDY9R-000890-Tm for incoming@patchwork.ozlabs.org; Mon, 17 Sep 2012 06:02:01 -0400 Received: from eggs.gnu.org ([208.118.235.92]:53239) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TDY8Y-0006O7-AK for qemu-devel@nongnu.org; Mon, 17 Sep 2012 06:01:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TDY8Q-00053c-T5 for qemu-devel@nongnu.org; Mon, 17 Sep 2012 06:01:06 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:29728) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TDY8Q-00053M-O7 for qemu-devel@nongnu.org; Mon, 17 Sep 2012 06:00:58 -0400 Received: from eusync3.samsung.com (mailout2.w1.samsung.com [210.118.77.12]) by mailout2.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MAH00LD8NU8PA90@mailout2.w1.samsung.com> for qemu-devel@nongnu.org; Mon, 17 Sep 2012 11:01:20 +0100 (BST) Received: from evvoevodinPC.rnd.samsung.ru ([106.109.8.14]) by eusync3.samsung.com (Oracle Communications Messaging Server 7u4-23.01(7.0.4.23.0) 64bit (built Aug 10 2011)) with ESMTPA id <0MAH00DV7NT8FQ90@eusync3.samsung.com> for qemu-devel@nongnu.org; Mon, 17 Sep 2012 11:00:57 +0100 (BST) From: Evgeny Voevodin To: qemu-devel@nongnu.org Date: Mon, 17 Sep 2012 14:00:42 +0400 Message-id: <1347876042-22609-13-git-send-email-e.voevodin@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1347876042-22609-1-git-send-email-e.voevodin@samsung.com> References: <1347876042-22609-1-git-send-email-e.voevodin@samsung.com> X-TM-AS-MML: No X-detected-operating-system: by eggs.gnu.org: Solaris 10 (1203?) X-Received-From: 210.118.77.12 Cc: peter.maydell@linaro.org, kyungmin.park@samsung.com, aliguori@us.ibm.com, Evgeny Voevodin Subject: [Qemu-devel] [RFC v2 12/12] hw/exynos4210.c: Create two virtio-mmio transport instances. X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org NB: This is for test purposes only. Signed-off-by: Evgeny Voevodin --- hw/exynos4210.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/hw/exynos4210.c b/hw/exynos4210.c index 00d4db8..70fcdd6 100644 --- a/hw/exynos4210.c +++ b/hw/exynos4210.c @@ -26,6 +26,7 @@ #include "sysbus.h" #include "arm-misc.h" #include "loader.h" +#include "virtio-transport.h" #include "exynos4210.h" #define EXYNOS4210_CHIPID_ADDR 0x10000000 @@ -72,6 +73,10 @@ /* Display controllers (FIMD) */ #define EXYNOS4210_FIMD0_BASE_ADDR 0x11C00000 +/* VirtIO MMIO */ +#define EXYNOS4210_VIRTIO_MMIO0_BASE_ADDR 0x10AD0000 +#define EXYNOS4210_VIRTIO_MMIO1_BASE_ADDR 0x10AC0000 + static uint8_t chipid_and_omr[] = { 0x11, 0x02, 0x21, 0x43, 0x09, 0x00, 0x00, 0x00 }; @@ -334,5 +339,13 @@ Exynos4210State *exynos4210_init(MemoryRegion *system_mem, s->irq_table[exynos4210_get_irq(11, 2)], NULL); + sysbus_create_simple(VIRTIO_MMIO, + EXYNOS4210_VIRTIO_MMIO0_BASE_ADDR, + s->irq_table[exynos4210_get_irq(37, 3)]); + + sysbus_create_simple(VIRTIO_MMIO, + EXYNOS4210_VIRTIO_MMIO1_BASE_ADDR, + s->irq_table[exynos4210_get_irq(37, 2)]); + return s; }