From patchwork Mon Aug 22 09:39:33 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Jackson X-Patchwork-Id: 110885 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id AF42CB6F00 for ; Mon, 22 Aug 2011 19:57:34 +1000 (EST) Received: from localhost ([::1]:57441 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QvQzX-00063D-DH for incoming@patchwork.ozlabs.org; Mon, 22 Aug 2011 05:40:23 -0400 Received: from eggs.gnu.org ([140.186.70.92]:49783) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QvQyx-00053S-50 for qemu-devel@nongnu.org; Mon, 22 Aug 2011 05:39:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QvQyv-0007C1-TP for qemu-devel@nongnu.org; Mon, 22 Aug 2011 05:39:47 -0400 Received: from mail-qy0-f173.google.com ([209.85.216.173]:56680) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QvQyu-0007BC-7v for qemu-devel@nongnu.org; Mon, 22 Aug 2011 05:39:45 -0400 Received: by qyk31 with SMTP id 31so1406716qyk.4 for ; Mon, 22 Aug 2011 02:39:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=nBtOusuAEe5oePbhAlgnjh4y6LhVx5KJ9E7oJ/Zfy4c=; b=Sl+KM6amBjY3g5lsHpNFW48WLTxgzT/DgeSN3MNIwdQkhjugaYWXuATkAokvqiA0aB 9fVQ+MXtj8LazXB4ssusX2YnEEkKIE3hBB8FgDmKHbYyxUuLJF+8E+PI6Si1+2nVXbNm zzxa6pDgrEopv38lTXvq5/2jpnNtN8BaNddM4= MIME-Version: 1.0 Received: by 10.229.127.1 with SMTP id e1mr1158620qcs.257.1314005973867; Mon, 22 Aug 2011 02:39:33 -0700 (PDT) Received: by 10.229.213.206 with HTTP; Mon, 22 Aug 2011 02:39:33 -0700 (PDT) Date: Mon, 22 Aug 2011 05:39:33 -0400 Message-ID: From: Patrick Jackson To: qemu-devel@nongnu.org X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.216.173 Subject: [Qemu-devel] [PATCH 11/11] Goldfish: Added device setup for NICs. 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 Signed-off-by: Patrick Jackson --- hw/android_arm.c | 19 +++++++++++++++++++ 1 files changed, 19 insertions(+), 0 deletions(-) goldfish_memlog_create(gbus, 0xff006000); goldfish_battery_create(gbus); diff --git a/hw/android_arm.c b/hw/android_arm.c index 5d8372d..f85db5c 100644 --- a/hw/android_arm.c +++ b/hw/android_arm.c @@ -74,6 +74,25 @@ static void android_arm_init_(ram_addr_t ram_size, } } + for(i = 0; i < MAX_NICS; i++) { + if (nd_table[i].vlan) { + if (nd_table[i].model == NULL + || strcmp(nd_table[i].model, "smc91c111") == 0) { + GoldfishDevice *smc_device; + smc_device = qemu_mallocz(sizeof(*smc_device)); + smc_device->name = (char *)"smc91x"; + smc_device->id = i; + smc_device->size = 0x1000; + smc_device->irq_count = 1; + goldfish_add_device_no_io(smc_device); + smc91c111_init(&nd_table[i], smc_device->base, qdev_get_gpio_in(gf_int, smc_device->irq)); + } else { + fprintf(stderr, "qemu: Unsupported NIC: %s\n", nd_table[0].model); + exit (1); + } + } + } + goldfish_fb_create(gbus, 0);