Activate uninorth AGP bridge
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> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6750 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
bf14b1cef1
commit
783a20dcb5
|
@ -92,31 +92,20 @@ static CPUReadMemoryFunc *pci_unin_main_read[] = {
|
||||||
&pci_host_data_readl,
|
&pci_host_data_readl,
|
||||||
};
|
};
|
||||||
|
|
||||||
#if 0
|
|
||||||
|
|
||||||
static void pci_unin_config_writel (void *opaque, target_phys_addr_t addr,
|
static void pci_unin_config_writel (void *opaque, target_phys_addr_t addr,
|
||||||
uint32_t val)
|
uint32_t val)
|
||||||
{
|
{
|
||||||
UNINState *s = opaque;
|
UNINState *s = opaque;
|
||||||
|
|
||||||
#ifdef TARGET_WORDS_BIGENDIAN
|
s->config_reg = val;
|
||||||
val = bswap32(val);
|
|
||||||
#endif
|
|
||||||
s->config_reg = 0x80000000 | (val & ~0x00000001);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static uint32_t pci_unin_config_readl (void *opaque,
|
static uint32_t pci_unin_config_readl (void *opaque,
|
||||||
target_phys_addr_t addr)
|
target_phys_addr_t addr)
|
||||||
{
|
{
|
||||||
UNINState *s = opaque;
|
UNINState *s = opaque;
|
||||||
uint32_t val;
|
|
||||||
|
|
||||||
val = (s->config_reg | 0x00000001) & ~0x80000000;
|
return s->config_reg;
|
||||||
#ifdef TARGET_WORDS_BIGENDIAN
|
|
||||||
val = bswap32(val);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return val;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static CPUWriteMemoryFunc *pci_unin_config_write[] = {
|
static CPUWriteMemoryFunc *pci_unin_config_write[] = {
|
||||||
|
@ -131,6 +120,7 @@ static CPUReadMemoryFunc *pci_unin_config_read[] = {
|
||||||
&pci_unin_config_readl,
|
&pci_unin_config_readl,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#if 0
|
||||||
static CPUWriteMemoryFunc *pci_unin_write[] = {
|
static CPUWriteMemoryFunc *pci_unin_write[] = {
|
||||||
&pci_host_pci_writeb,
|
&pci_host_pci_writeb,
|
||||||
&pci_host_pci_writew,
|
&pci_host_pci_writew,
|
||||||
|
@ -233,18 +223,17 @@ PCIBus *pci_pmac_init(qemu_irq *pic)
|
||||||
d->config[0x27] = 0x7F;
|
d->config[0x27] = 0x7F;
|
||||||
// d->config[0x34] = 0xdc // capabilities_pointer
|
// d->config[0x34] = 0xdc // capabilities_pointer
|
||||||
#endif
|
#endif
|
||||||
#if 0 // XXX: not needed for now
|
|
||||||
/* Uninorth AGP bus */
|
/* Uninorth AGP bus */
|
||||||
s = &pci_bridge[1];
|
|
||||||
pci_mem_config = cpu_register_io_memory(0, pci_unin_config_read,
|
pci_mem_config = cpu_register_io_memory(0, pci_unin_config_read,
|
||||||
pci_unin_config_write, s);
|
pci_unin_config_write, s);
|
||||||
pci_mem_data = cpu_register_io_memory(0, pci_unin_read,
|
pci_mem_data = cpu_register_io_memory(0, pci_unin_main_read,
|
||||||
pci_unin_write, s);
|
pci_unin_main_write, s);
|
||||||
cpu_register_physical_memory(0xf0800000, 0x1000, pci_mem_config);
|
cpu_register_physical_memory(0xf0800000, 0x1000, pci_mem_config);
|
||||||
cpu_register_physical_memory(0xf0c00000, 0x1000, pci_mem_data);
|
cpu_register_physical_memory(0xf0c00000, 0x1000, pci_mem_data);
|
||||||
|
|
||||||
d = pci_register_device("Uni-north AGP", sizeof(PCIDevice), 0, 11 << 3,
|
d = pci_register_device(s->bus, "Uni-north AGP", sizeof(PCIDevice),
|
||||||
NULL, NULL);
|
11 << 3, NULL, NULL);
|
||||||
pci_config_set_vendor_id(d->config, PCI_VENDOR_ID_APPLE);
|
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);
|
pci_config_set_device_id(d->config, PCI_DEVICE_ID_APPLE_UNI_N_AGP);
|
||||||
d->config[0x08] = 0x00; // revision
|
d->config[0x08] = 0x00; // revision
|
||||||
|
@ -253,7 +242,6 @@ PCIBus *pci_pmac_init(qemu_irq *pic)
|
||||||
d->config[0x0D] = 0x10; // latency_timer
|
d->config[0x0D] = 0x10; // latency_timer
|
||||||
d->config[0x0E] = 0x00; // header_type
|
d->config[0x0E] = 0x00; // header_type
|
||||||
// d->config[0x34] = 0x80; // capabilities_pointer
|
// d->config[0x34] = 0x80; // capabilities_pointer
|
||||||
#endif
|
|
||||||
|
|
||||||
#if 0 // XXX: not needed for now
|
#if 0 // XXX: not needed for now
|
||||||
/* Uninorth internal bus */
|
/* Uninorth internal bus */
|
||||||
|
|
Loading…
Reference in a new issue