29 #include <linux/pci.h>
30 #include <linux/types.h>
43 #define pciu_read(offset) readl(pciu_base + (offset))
44 #define pciu_write(offset, value) writel((value), pciu_base + (offset))
71 static struct resource pci_mem_resource = {
72 .name =
"PCI Memory resources",
78 static struct resource pci_io_resource = {
79 .name =
"PCI I/O resources",
86 .master_memory1 = &pci_master_memory1,
87 .target_memory1 = &pci_target_memory1,
88 .master_io = &pci_master_io,
90 .wait_time_limit_from_irdy_to_trdy = 0,
91 .mailbox = &pci_mailbox,
92 .target_window1 = &pci_target_window1,
93 .master_latency_timer = 0x80,
101 .mem_resource = &pci_mem_resource,
102 .io_resource = &pci_io_resource,
107 vr41xx_pci_controller_unit_setup = *setup;
110 static int __init vr41xx_pciu_init(
void)
117 unsigned long vtclock, pci_clock_max;
120 setup = &vr41xx_pci_controller_unit_setup;
126 if (pciu_base ==
NULL) {
146 if (vtclock < pci_clock_max)
148 else if ((vtclock / 2) < pci_clock_max)
151 (vtclock / 3) < pci_clock_max)
153 else if ((vtclock / 4) < pci_clock_max)
293 vr41xx_pci_controller.mem_resource = setup->
mem_resource;
296 vr41xx_pci_controller.io_resource = setup->
io_resource;
305 struct resource *
res = vr41xx_pci_controller.io_resource;
312 vr41xx_pci_controller.io_map_base = (
unsigned long)io_map_base;