qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Blue Swirl <blauwirbel@gmail.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [6562] Fix UniNorth
Date: Sun, 08 Feb 2009 16:01:38 +0000	[thread overview]
Message-ID: <E1LWC6E-0001vL-Ty@cvs.savannah.gnu.org> (raw)

Revision: 6562
          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6562
Author:   blueswir1
Date:     2009-02-08 16:01:38 +0000 (Sun, 08 Feb 2009)

Log Message:
-----------
Fix UniNorth

Modified Paths:
--------------
    trunk/hw/unin_pci.c

Modified: trunk/hw/unin_pci.c
===================================================================
--- trunk/hw/unin_pci.c	2009-02-08 16:01:01 UTC (rev 6561)
+++ trunk/hw/unin_pci.c	2009-02-08 16:01:38 UTC (rev 6562)
@@ -44,22 +44,13 @@
                                          uint32_t val)
 {
     UNINState *s = opaque;
-    int i;
 
     UNIN_DPRINTF("config_writel addr " TARGET_FMT_plx " val %x\n", addr, val);
 #ifdef TARGET_WORDS_BIGENDIAN
     val = bswap32(val);
 #endif
 
-    for (i = 11; i < 32; i++) {
-        if ((val & (1 << i)) != 0)
-            break;
-    }
-#if 0
-    s->config_reg = 0x80000000 | (1 << 16) | (val & 0x7FC) | (i << 11);
-#else
-    s->config_reg = 0x80000000 | (0 << 16) | (val & 0x7FC) | (i << 11);
-#endif
+    s->config_reg = val;
 }
 
 static uint32_t pci_unin_main_config_readl (void *opaque,
@@ -67,10 +58,8 @@
 {
     UNINState *s = opaque;
     uint32_t val;
-    int devfn;
 
-    devfn = (s->config_reg >> 8) & 0xFF;
-    val = (1 << (devfn >> 3)) | ((devfn & 0x07) << 8) | (s->config_reg & 0xFC);
+    val = s->config_reg;
 #ifdef TARGET_WORDS_BIGENDIAN
     val = bswap32(val);
 #endif

                 reply	other threads:[~2009-02-08 16:01 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=E1LWC6E-0001vL-Ty@cvs.savannah.gnu.org \
    --to=blauwirbel@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).