Hi,
 Iam trying to emulate USB for realview board in QEMU.
trying to access it thru the PCI bus.for realview board Idont see PCI
support in QEMU although it is there for versatile boad.so I googled and
found realview PCIX support.I applied the patch. but then in
arch/arm/mach-realview/pcix.c inside function
"realview_pb_pcix_unit_init(void)"

u32 data = readl(PCIX_UNIT_BASE + PCI_UNITCNT);
the data value it is printing is zero.

#define PCIX_UNIT_BASE                  0xF8000000 which seems to be virtual
adress

realview spec PCI memory map:

AXI2PCI                                   0x90040000
PCI IO window                          0x90050000
PCI Memory Window                 0xA0000000-0XBFFFFFFF

and in qemu realview.c

 if (is_pb) {
        dev = sysbus_create_varargs("realview_pci",
0x90040000,/*0x60000000*/
                                    pic[48], pic[49], pic[50], pic[51],
NULL);
        pci_bus = (PCIBus *)qdev_get_child_bus(dev, "pci");
        if (usb_enabled) {
            fprintf(stderr, "USB ENABLED\n");
            usb_ohci_init_pci(pci_bus, -1);
        }
but it seems the virtual adress are not proper for above physical address as
Iam getting error


Error: PCI-X unit not in PCI-X mode.

pci_bus 0000:00: scanning bus

pci_bus 0000:00: fixups for bus

the macro for vrtual address Iam using is

#define IO_ADDRESS(x)           (((x) & 0x03ffffff) + 0xfb000000)
//#define IO_ADDRESS(x)         ((void __iomem *)(unsigned
long)IO_ADDRESS(x))
#else
#define IO_ADDRESS(x)           (x)
#endif
#define __io_address(n)         __io(IO_ADDRESS(n))
#endif



Plz help me in that whats going wrong..its bit urgen plz reply as soon as
possible

--thanx in advance

ak

Reply via email to