From: Robert Reif <reif@earthlink.net>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] sparc32: fix power address
Date: Sun, 30 Dec 2007 22:06:49 -0500 [thread overview]
Message-ID: <47785CC9.4000100@earthlink.net> (raw)
[-- 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,
reply other threads:[~2007-12-31 3:06 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=47785CC9.4000100@earthlink.net \
--to=reif@earthlink.net \
--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).