qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [6562] Fix UniNorth


From: Blue Swirl
Subject: [Qemu-devel] [6562] Fix UniNorth
Date: Sun, 08 Feb 2009 16:01:38 +0000

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 via email to

[Prev in Thread] Current Thread [Next in Thread]