From patchwork Wed Dec 7 09:47:01 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Evgeny Voevodin X-Patchwork-Id: 129936 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 6A3381007D2 for ; Wed, 7 Dec 2011 21:53:19 +1100 (EST) Received: from localhost ([::1]:53132 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RYE7K-0002nQ-5T for incoming@patchwork.ozlabs.org; Wed, 07 Dec 2011 04:48:46 -0500 Received: from eggs.gnu.org ([140.186.70.92]:56118) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RYE6l-0001IC-S7 for qemu-devel@nongnu.org; Wed, 07 Dec 2011 04:48:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RYE6b-000214-S0 for qemu-devel@nongnu.org; Wed, 07 Dec 2011 04:48:11 -0500 Received: from mailout4.w1.samsung.com ([210.118.77.14]:17609) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RYE6b-00020P-NE for qemu-devel@nongnu.org; Wed, 07 Dec 2011 04:48:01 -0500 MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: TEXT/PLAIN Received: from euspt1 ([210.118.77.14]) by mailout4.w1.samsung.com (Sun Java(tm) System Messaging Server 6.3-8.04 (built Jul 29 2009; 32bit)) with ESMTP id <0LVT0028RV80KL30@mailout4.w1.samsung.com> for qemu-devel@nongnu.org; Wed, 07 Dec 2011 09:48:00 +0000 (GMT) Received: from evvoevodinPC.rnd.samsung.ru ([106.109.8.48]) by spt1.w1.samsung.com (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTPA id <0LVT00GNZV7ATA@spt1.w1.samsung.com> for qemu-devel@nongnu.org; Wed, 07 Dec 2011 09:48:00 +0000 (GMT) Date: Wed, 07 Dec 2011 13:47:01 +0400 From: Evgeny Voevodin In-reply-to: <1323251225-1072-1-git-send-email-e.voevodin@samsung.com> To: qemu-devel@nongnu.org Message-id: <1323251225-1072-11-git-send-email-e.voevodin@samsung.com> X-Mailer: git-send-email 1.7.4.1 References: <1323251225-1072-1-git-send-email-e.voevodin@samsung.com> X-detected-operating-system: by eggs.gnu.org: Solaris 9.1 X-Received-From: 210.118.77.14 Cc: d.solodkiy@samsung.com, Evgeny Voevodin Subject: [Qemu-devel] [PATCH 10/14] hw/s5pc210.c: Add lan9118 support to SMDK board. 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: Evgeny Voevodin --- hw/s5pc210.c | 19 +++++++++++++++++++ 1 files changed, 19 insertions(+), 0 deletions(-) diff --git a/hw/s5pc210.c b/hw/s5pc210.c index 90858e9..8678b97 100644 --- a/hw/s5pc210.c +++ b/hw/s5pc210.c @@ -29,6 +29,8 @@ #include "sysemu.h" #include "sysbus.h" #include "arm-misc.h" +#include "net.h" +#include "devices.h" #include "exec-memory.h" #include "s5pc210.h" @@ -229,6 +231,8 @@ static void s5pc210_init(ram_addr_t ram_size, SysBusDevice *busdev; ram_addr_t mem_size; int n; + NICInfo *nd; + int done_nic = 0; switch (board_type) { case BOARD_S5PC210_NURI: @@ -446,6 +450,21 @@ static void s5pc210_init(ram_addr_t ram_size, s5pc210_uart_create(addr, fifo_size, channel, NULL, uart_irq); } + /*** LAN adapter ***/ + if (board_type == BOARD_S5PC210_SMDKC210) { + + for (n = 0; n < nb_nics; n++) { + nd = &nd_table[n]; + + if (!done_nic && (!nd->model || + strcmp(nd->model, "lan9118") == 0)) { + lan9118_init(nd, 0x05000000, + qemu_irq_invert(irq_table[s5pc210_get_irq(37, 1)])); + done_nic = 1; + } + } + } + /*** Load kernel ***/ s5pc210_binfo.ram_size = ram_size;