summaryrefslogtreecommitdiffstats
path: root/hw/unin_pci.c
diff options
context:
space:
mode:
authorblueswir12009-02-08 17:01:38 +0100
committerblueswir12009-02-08 17:01:38 +0100
commite972b3ad26c85adb2e72e5608146909f0cfbc29a (patch)
tree1d93c5c1998bbacfe4ac335fe94fabc17f38aa1e /hw/unin_pci.c
parentUse Mac NVRAM (diff)
downloadqemu-e972b3ad26c85adb2e72e5608146909f0cfbc29a.tar.gz
qemu-e972b3ad26c85adb2e72e5608146909f0cfbc29a.tar.xz
qemu-e972b3ad26c85adb2e72e5608146909f0cfbc29a.zip
Fix UniNorth
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6562 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/unin_pci.c')
-rw-r--r--hw/unin_pci.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/hw/unin_pci.c b/hw/unin_pci.c
index 69aecb5f89..949e63f44d 100644
--- a/hw/unin_pci.c
+++ b/hw/unin_pci.c
@@ -44,22 +44,13 @@ static void pci_unin_main_config_writel (void *opaque, target_phys_addr_t addr,
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 @@ static uint32_t pci_unin_main_config_readl (void *opaque,
{
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