From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JxecD-00071u-Ki for qemu-devel@nongnu.org; Sun, 18 May 2008 04:51:37 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JxecC-00071b-AX for qemu-devel@nongnu.org; Sun, 18 May 2008 04:51:36 -0400 Received: from [199.232.76.173] (port=54114 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JxecB-00071V-7L for qemu-devel@nongnu.org; Sun, 18 May 2008 04:51:35 -0400 Received: from savannah.gnu.org ([199.232.41.3]:45148 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JxecB-0007pf-1r for qemu-devel@nongnu.org; Sun, 18 May 2008 04:51:35 -0400 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1Jxec5-0000gx-8Z for qemu-devel@nongnu.org; Sun, 18 May 2008 08:51:29 +0000 Received: from edgar_igl by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1Jxec5-0000gt-1f for qemu-devel@nongnu.org; Sun, 18 May 2008 08:51:29 +0000 MIME-Version: 1.0 Errors-To: edgar_igl Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: "Edgar E. Iglesias" Message-Id: Date: Sun, 18 May 2008 08:51:29 +0000 Subject: [Qemu-devel] [4488] ETRAX: Connect both ethernet controllers. Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Revision: 4488 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4488 Author: edgar_igl Date: 2008-05-18 08:51:28 +0000 (Sun, 18 May 2008) Log Message: ----------- ETRAX: Connect both ethernet controllers. Modified Paths: -------------- trunk/hw/etraxfs.c Modified: trunk/hw/etraxfs.c =================================================================== --- trunk/hw/etraxfs.c 2008-05-18 08:50:32 UTC (rev 4487) +++ trunk/hw/etraxfs.c 2008-05-18 08:51:28 UTC (rev 4488) @@ -60,7 +60,7 @@ { CPUState *env; qemu_irq *pic; - struct etraxfs_dma_client *eth0; + struct etraxfs_dma_client *eth[2] = {NULL, NULL}; int kernel_size; int i; ram_addr_t phys_ram; @@ -106,12 +106,18 @@ etraxfs_dmac_connect(etraxfs_dmac, i, pic + 7 + i, i & 1); } - /* It has 2, but let's start with one ethernet block. */ - eth0 = etraxfs_eth_init(&nd_table[0], env, pic + 25, 0xb0034000); + /* Add the two ethernet blocks. */ + eth[0] = etraxfs_eth_init(&nd_table[0], env, pic + 25, 0xb0034000); + if (&nd_table[1]) + eth[1] = etraxfs_eth_init(&nd_table[1], env, pic + 26, 0xb0036000); /* The DMA Connector block is missing, hardwire things for now. */ - etraxfs_dmac_connect_client(etraxfs_dmac, 0, eth0); - etraxfs_dmac_connect_client(etraxfs_dmac, 1, eth0 + 1); + etraxfs_dmac_connect_client(etraxfs_dmac, 0, eth[0]); + etraxfs_dmac_connect_client(etraxfs_dmac, 1, eth[0] + 1); + if (eth[1]) { + etraxfs_dmac_connect_client(etraxfs_dmac, 6, eth[1]); + etraxfs_dmac_connect_client(etraxfs_dmac, 7, eth[1] + 1); + } /* 2 timers. */ etraxfs_timer_init(env, pic + 0x1b, 0xb001e000);