1 #define MAX_DEVICEBUSES 2
4 * A single PCI device is shared between two buses.
5 * The driver is designed as unloadable, so our bus objects can be
6 * destroyed. We need to release the device only when both objects
7 * are disposed, so we maintain this structure with reference
9 * It raises a question if our PCI subsystem needs to support this.
10 * However, we'll wait until more use cases pop up.
14 OOP_Object
*ref_Device
;
20 struct Node atapb_Node
;
21 OOP_Object
*atapb_Parent
;
22 struct PCIDeviceRef
*atapb_Device
;
32 /* These values are used also for ln_Type */
33 #define ATABUSNODEPRI_PROBED 50
34 #define ATABUSNODEPRI_PROBEDLEGACY 100
35 #define ATABUSNODEPRI_LEGACY 0
39 struct ata_ProbedBus
*bus
;
40 OOP_Object
*pciDriver
;
42 void (*ata_HandleIRQ
)(UBYTE
, APTR
);
51 struct MinList probedbuses
;
58 OOP_Object
*storageRoot
;
60 #if defined(__OOP_NOATTRBASES__)
61 OOP_AttrBase PCIDeviceAttrBase
;
62 OOP_AttrBase PCIDriverAttrBase
;
63 OOP_AttrBase hiddAttrBase
;
64 OOP_AttrBase busAttrBase
;
65 OOP_AttrBase ATABusAttrBase
;
66 OOP_AttrBase hwAttrBase
;
68 #if defined(__OOP_NOMETHODBASES__)
69 OOP_MethodID PCIMethodBase
;
70 OOP_MethodID PCIDeviceMethodBase
;
71 OOP_MethodID PCIDriverMethodBase
;
72 OOP_MethodID HWMethodBase
;
73 OOP_MethodID HiddSCMethodBase
;
77 struct Library
*cs_OOPBase
;
78 struct Library
*cs_UtilityBase
;
81 #if defined(__OOP_NOATTRBASES__)
82 /* Attribute Bases ... */
83 #undef HiddPCIDeviceAttrBase
84 #undef HiddPCIDriverAttrBase
89 #define HiddPCIDeviceAttrBase (base->PCIDeviceAttrBase)
90 #define HiddPCIDriverAttrBase (base->PCIDriverAttrBase)
91 #define HiddAttrBase (base->hiddAttrBase)
92 #define HiddBusAB (base->busAttrBase)
93 #define HiddATABusAB (base->ATABusAttrBase)
94 #define HWAttrBase (base->hwAttrBase)
97 #if defined(__OOP_NOMETHODBASES__)
98 /* Method Bases ... */
100 #undef HiddPCIDeviceBase
101 #undef HiddPCIDriverBase
103 #undef HiddStorageControllerBase
104 #define HiddPCIBase (base->PCIMethodBase)
105 #define HiddPCIDeviceBase (base->PCIDeviceMethodBase)
106 #define HiddPCIDriverBase (base->PCIDriverMethodBase)
107 #define HWBase (base->HWMethodBase)
108 #define HiddStorageControllerBase (base->HiddSCMethodBase)
112 #define KernelBase (base->cs_KernelBase)
113 #define OOPBase (base->cs_OOPBase)
114 #define UtilityBase (base->cs_UtilityBase)
116 void DeviceFree(struct PCIDeviceRef
*ref
, struct atapciBase
*base
);
117 void DeviceUnref(struct PCIDeviceRef
*ref
, struct atapciBase
*base
);