* [Qemu-devel] [PATCH] sparc32: fix power address
@ 2007-12-31 3:06 Robert Reif
0 siblings, 0 replies; only message in thread
From: Robert Reif @ 2007-12-31 3:06 UTC (permalink / raw)
To: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 113 bytes --]
Fix obio/power address for ss10 and ss20.
ss600mp doesn't have obio/power so fix slavio_misc to work without it.
[-- Attachment #2: power.diff.txt --]
[-- Type: text/plain, Size: 2987 bytes --]
Index: hw/slavio_misc.c
===================================================================
RCS file: /sources/qemu/qemu/hw/slavio_misc.c,v
retrieving revision 1.16
diff -p -u -r1.16 slavio_misc.c
--- hw/slavio_misc.c 1 Dec 2007 15:02:20 -0000 1.16
+++ hw/slavio_misc.c 31 Dec 2007 02:55:57 -0000
@@ -146,7 +146,7 @@ static void slavio_misc_mem_writeb(void
s->mctrl = val & 0xff;
break;
default:
- if (addr == s->power_base) {
+ if (s->power_base != -1 && addr == s->power_base) {
MISC_DPRINTF("Write power management %2.2x\n", val & 0xff);
cpu_interrupt(cpu_single_env, CPU_INTERRUPT_HALT);
}
@@ -181,7 +181,7 @@ static uint32_t slavio_misc_mem_readb(vo
MISC_DPRINTF("Read modem control %2.2x\n", ret);
break;
default:
- if (addr == s->power_base) {
+ if (s->power_base != -1 && addr == s->power_base) {
MISC_DPRINTF("Read power management %2.2x\n", ret);
}
break;
@@ -366,7 +366,9 @@ void *slavio_misc_init(target_phys_addr_
cpu_register_physical_memory(base + MISC_MDM, MISC_SIZE,
slavio_misc_io_memory);
// Power management
- cpu_register_physical_memory(power_base, MISC_SIZE, slavio_misc_io_memory);
+ if (power_base != -1)
+ cpu_register_physical_memory(power_base, MISC_SIZE,
+ slavio_misc_io_memory);
s->power_base = power_base;
/* 16 bit registers */
Index: hw/sun4m.c
===================================================================
RCS file: /sources/qemu/qemu/hw/sun4m.c,v
retrieving revision 1.77
diff -p -u -r1.77 sun4m.c
--- hw/sun4m.c 29 Dec 2007 20:09:57 -0000 1.77
+++ hw/sun4m.c 31 Dec 2007 02:55:58 -0000
@@ -724,7 +724,7 @@ static const struct hwdef hwdefs[] = {
.dma_base = 0xef0400000ULL,
.esp_base = 0xef0800000ULL,
.le_base = 0xef0c00000ULL,
- .power_base = 0xefa000000ULL,
+ .power_base = 0xff1a01000ULL,
.ecc_base = 0xf00000000ULL,
.ecc_version = 0x10000000, // version 0, implementation 1
.sun4c_intctl_base = -1,
@@ -765,7 +765,7 @@ static const struct hwdef hwdefs[] = {
.dma_base = 0xef0081000ULL,
.esp_base = 0xef0080000ULL,
.le_base = 0xef0060000ULL,
- .power_base = 0xefa000000ULL,
+ .power_base = -1,
.ecc_base = 0xf00000000ULL,
.ecc_version = 0x00000000, // version 0, implementation 0
.sun4c_intctl_base = -1,
@@ -806,7 +806,7 @@ static const struct hwdef hwdefs[] = {
.dma_base = 0xef0400000ULL,
.esp_base = 0xef0800000ULL,
.le_base = 0xef0c00000ULL,
- .power_base = 0xefa000000ULL,
+ .power_base = 0xff1a01000ULL,
.ecc_base = 0xf00000000ULL,
.ecc_version = 0x20000000, // version 0, implementation 2
.sun4c_intctl_base = -1,
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-12-31 3:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-31 3:06 [Qemu-devel] [PATCH] sparc32: fix power address Robert Reif
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).