diff options
author | aurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-03-28 22:29:33 +0000 |
---|---|---|
committer | aurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-03-28 22:29:33 +0000 |
commit | 9b5953952aa41a54e26cba8888c7830f4bd90d53 (patch) | |
tree | 66d5f60cec41baec641c2fb6fd8fd50e9d664efe /hw/mipsnet.c | |
parent | 15a5115690558ad65de02d9b9bb4ec89bc4cf8ac (diff) | |
download | qemu-9b5953952aa41a54e26cba8888c7830f4bd90d53.zip |
Fix mipsnet device ID, noticed by Vijay Kumar.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4119 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/mipsnet.c')
-rw-r--r-- | hw/mipsnet.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/hw/mipsnet.c b/hw/mipsnet.c index 5a74ad962a..af560f80f2 100644 --- a/hw/mipsnet.c +++ b/hw/mipsnet.c @@ -11,7 +11,6 @@ /* MIPSnet register offsets */ #define MIPSNET_DEV_ID 0x00 -# define MIPSNET_DEV_ID_STRING "MIPSNET0" #define MIPSNET_BUSY 0x08 #define MIPSNET_RX_DATA_COUNT 0x0c #define MIPSNET_TX_DATA_COUNT 0x10 @@ -105,15 +104,14 @@ static uint32_t mipsnet_ioport_read(void *opaque, uint32_t addr) { MIPSnetState *s = opaque; int ret = 0; - const char *devid = MIPSNET_DEV_ID_STRING; addr &= 0x3f; switch (addr) { case MIPSNET_DEV_ID: - ret = *((uint32_t *)&devid); + ret = be32_to_cpu(0x4d495053); /* MIPS */ break; case MIPSNET_DEV_ID + 4: - ret = *((uint32_t *)(&devid + 4)); + ret = be32_to_cpu(0x4e455430); /* NET0 */ break; case MIPSNET_BUSY: ret = s->busy; |