From: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [4488] ETRAX: Connect both ethernet controllers.
Date: Sun, 18 May 2008 08:51:29 +0000 [thread overview]
Message-ID: <E1Jxec5-0000gt-1f@cvs.savannah.gnu.org> (raw)
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);
reply other threads:[~2008-05-18 8:51 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E1Jxec5-0000gt-1f@cvs.savannah.gnu.org \
--to=edgar.iglesias@gmail.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).