From: Alexander Graf <agraf@suse.de>
To: qemu-devel@nongnu.org
Cc: blauwirbel@gmail.com, Alexander Graf <alex@csgraf.de>
Subject: [Qemu-devel] [PATCH 04/11] Activate uninorth AGP bridge
Date: Fri, 6 Mar 2009 16:35:58 +0100 [thread overview]
Message-ID: <1236353765-4484-5-git-send-email-agraf@suse.de> (raw)
In-Reply-To: <1236353765-4484-4-git-send-email-agraf@suse.de>
Linux tries to poke the AGP bridge port and is pretty sad when it can't,
so let's activate the old code again and throw out the bit modifications,
as we don't really do anything with the values anyways.
Signed-off-by: Alexander Graf <alex@csgraf.de>
---
hw/unin_pci.c | 27 ++++++++-------------------
1 files changed, 8 insertions(+), 19 deletions(-)
diff --git a/hw/unin_pci.c b/hw/unin_pci.c
index 949e63f..c734f1c 100644
--- a/hw/unin_pci.c
+++ b/hw/unin_pci.c
@@ -92,17 +92,12 @@ static CPUReadMemoryFunc *pci_unin_main_read[] = {
&pci_host_data_readl,
};
-#if 0
-
static void pci_unin_config_writel (void *opaque, target_phys_addr_t addr,
uint32_t val)
{
UNINState *s = opaque;
-#ifdef TARGET_WORDS_BIGENDIAN
- val = bswap32(val);
-#endif
- s->config_reg = 0x80000000 | (val & ~0x00000001);
+ s->config_reg = val;
}
static uint32_t pci_unin_config_readl (void *opaque,
@@ -111,12 +106,7 @@ static uint32_t pci_unin_config_readl (void *opaque,
UNINState *s = opaque;
uint32_t val;
- val = (s->config_reg | 0x00000001) & ~0x80000000;
-#ifdef TARGET_WORDS_BIGENDIAN
- val = bswap32(val);
-#endif
-
- return val;
+ return s->config_reg;
}
static CPUWriteMemoryFunc *pci_unin_config_write[] = {
@@ -131,6 +121,7 @@ static CPUReadMemoryFunc *pci_unin_config_read[] = {
&pci_unin_config_readl,
};
+#if 0
static CPUWriteMemoryFunc *pci_unin_write[] = {
&pci_host_pci_writeb,
&pci_host_pci_writew,
@@ -233,18 +224,17 @@ PCIBus *pci_pmac_init(qemu_irq *pic)
d->config[0x27] = 0x7F;
// d->config[0x34] = 0xdc // capabilities_pointer
#endif
-#if 0 // XXX: not needed for now
+
/* Uninorth AGP bus */
- s = &pci_bridge[1];
pci_mem_config = cpu_register_io_memory(0, pci_unin_config_read,
pci_unin_config_write, s);
- pci_mem_data = cpu_register_io_memory(0, pci_unin_read,
- pci_unin_write, s);
+ pci_mem_data = cpu_register_io_memory(0, pci_unin_main_read,
+ pci_unin_main_write, s);
cpu_register_physical_memory(0xf0800000, 0x1000, pci_mem_config);
cpu_register_physical_memory(0xf0c00000, 0x1000, pci_mem_data);
- d = pci_register_device("Uni-north AGP", sizeof(PCIDevice), 0, 11 << 3,
- NULL, NULL);
+ d = pci_register_device(s->bus, "Uni-north AGP", sizeof(PCIDevice),
+ 11 << 3, NULL, NULL);
pci_config_set_vendor_id(d->config, PCI_VENDOR_ID_APPLE);
pci_config_set_device_id(d->config, PCI_DEVICE_ID_APPLE_UNI_N_AGP);
d->config[0x08] = 0x00; // revision
@@ -253,7 +243,6 @@ PCIBus *pci_pmac_init(qemu_irq *pic)
d->config[0x0D] = 0x10; // latency_timer
d->config[0x0E] = 0x00; // header_type
// d->config[0x34] = 0x80; // capabilities_pointer
-#endif
#if 0 // XXX: not needed for now
/* Uninorth internal bus */
--
1.6.0.2
next prev parent reply other threads:[~2009-03-06 15:36 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-06 15:35 [Qemu-devel] [PATCH 00/11] PPC64 Linux bringup patches v3 Alexander Graf
2009-03-06 15:35 ` [Qemu-devel] [PATCH 01/11] PPC64: Implement slbmte Alexander Graf
2009-03-06 15:35 ` [Qemu-devel] [PATCH 02/11] PPC64: Implement large pages Alexander Graf
2009-03-06 15:35 ` [Qemu-devel] [PATCH 03/11] PPC64: Implment tlbiel Alexander Graf
2009-03-06 15:35 ` Alexander Graf [this message]
2009-03-06 15:35 ` [Qemu-devel] [PATCH 05/11] PPC64: Nop some SPRs on 970fx Alexander Graf
2009-03-06 15:36 ` [Qemu-devel] [PATCH 06/11] PPC64: Enable 64bit mode on interrupts Alexander Graf
2009-03-06 15:36 ` [Qemu-devel] [PATCH 07/11] PPC64: Implement mtfsf.L encoding Alexander Graf
2009-03-06 15:36 ` [Qemu-devel] [PATCH 08/11] PPC64: Fix RFI(d) Alexander Graf
2009-03-06 15:36 ` [Qemu-devel] [PATCH 09/11] PPC64: Fix NX bit Alexander Graf
2009-03-06 15:36 ` [Qemu-devel] [PATCH 10/11] PPC64: Keep SLB in-CPU Alexander Graf
2009-03-06 15:36 ` [Qemu-devel] [PATCH 11/11] PPC64: Disable BAT for 970 Alexander Graf
2009-03-06 19:55 ` [Qemu-devel] [PATCH 10/11] PPC64: Keep SLB in-CPU Hollis Blanchard
2009-03-06 19:31 ` [Qemu-devel] [PATCH 09/11] PPC64: Fix NX bit Hollis Blanchard
2009-03-06 19:41 ` Alexander Graf
2009-03-07 9:57 ` [Qemu-devel] Re: [PATCH 01/11] PPC64: Implement slbmte Blue Swirl
2009-03-07 12:10 ` Alexander Graf
2009-03-07 10:04 ` [Qemu-devel] Re: [PATCH 00/11] PPC64 Linux bringup patches v3 Blue Swirl
-- strict thread matches above, loose matches on Subject: below --
2009-03-07 19:08 [Qemu-devel] [PATCH 00/11] PPC64 Linux bringup patches v4 Alexander Graf
2009-03-07 19:08 ` [Qemu-devel] [PATCH 01/11] PPC64: Implement slbmte Alexander Graf
2009-03-07 19:08 ` [Qemu-devel] [PATCH 02/11] PPC64: Implement large pages Alexander Graf
2009-03-07 19:08 ` [Qemu-devel] [PATCH 03/11] PPC64: Implment tlbiel Alexander Graf
2009-03-07 19:08 ` [Qemu-devel] [PATCH 04/11] Activate uninorth AGP bridge Alexander Graf
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=1236353765-4484-5-git-send-email-agraf@suse.de \
--to=agraf@suse.de \
--cc=alex@csgraf.de \
--cc=blauwirbel@gmail.com \
--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).