37 #include <linux/kernel.h>
38 #include <linux/pci.h>
39 #include <linux/string.h>
42 #include <asm/fixmap.h>
63 #define OHCI_LOOP_COUNT 100
80 return (r & 0x00ff0000) >> 16;
98 static inline void __init init_ohci1394_soft_reset(
struct ohci *ohci)
112 #define OHCI1394_MAX_AT_REQ_RETRIES 0xf
113 #define OHCI1394_MAX_AT_RESP_RETRIES 0x2
114 #define OHCI1394_MAX_PHYS_RESP_RETRIES 0x8
117 static inline void __init init_ohci1394_initialize(
struct ohci *ohci)
124 bus_options |= 0x60000000;
125 bus_options &= ~0x00ff0000;
126 bus_options &= ~0x18000000;
169 num_ports = get_phy_reg(ohci, 2) & 0xf;
170 for (i = 0; i < num_ports; i++) {
173 set_phy_reg(ohci, 7, i);
174 status = get_phy_reg(ohci, 8);
177 set_phy_reg(ohci, 8, status & ~1);
190 static inline void __init init_ohci1394_wait_for_busresets(
struct ohci *ohci)
194 for (i = 0; i < 9; i++) {
208 static inline void __init init_ohci1394_enable_physical_dma(
struct ohci *ohci)
219 static inline void __init init_ohci1394_reset_and_init_dma(
struct ohci *ohci)
222 init_ohci1394_soft_reset(ohci);
233 init_ohci1394_initialize(ohci);
238 init_ohci1394_wait_for_busresets(ohci);
241 init_ohci1394_enable_physical_dma(ohci);
248 static inline void __init init_ohci1394_controller(
int num,
int slot,
int func)
250 unsigned long ohci_base;
254 " at %02x:%02x.%x\n", num, slot, func);
263 init_ohci1394_reset_and_init_dma(&ohci);
279 for (num = 0; num < 32; num++) {
280 for (slot = 0; slot < 32; slot++) {
281 for (func = 0; func < 8; func++) {
284 if (
class == 0xffffffff)
290 init_ohci1394_controller(num, slot, func);
295 printk(
KERN_INFO "init_ohci1394_dma: finished initializing OHCI DMA\n");
301 static int __init setup_ohci1394_dma(
char *
opt)
303 if (!
strcmp(opt,
"early"))