2 Copyright © 2013, The AROS Development Team. All rights reserved
9 #include <aros/symbolsets.h>
11 #include <hidd/hidd.h>
13 #include <proto/exec.h>
14 #include <proto/oop.h>
16 #include "bus_class.h"
18 static CONST_STRPTR attrBaseIDs
[] =
27 #define AB_MANDATORY 2
29 static int pciata_init(struct ataBase
*base
)
31 base
->cs_UtilityBase
= OpenLibrary("utility.library", 36);
32 if (!base
->cs_UtilityBase
)
35 base
->cs_KernelBase
= OpenResource("kernel.resource");
36 if (!base
->cs_KernelBase
)
40 * We handle also legacy ISA devices, so we can work without PCI subsystem.
41 * Because of this, we do not obtain PCI bases here. We do it later, in device
44 if (OOP_ObtainAttrBasesArray(&base
->hiddAttrBase
, &attrBaseIDs
[AB_MANDATORY
]))
50 static int pciata_expunge(struct ataBase
*base
)
52 /* Release all attribute bases */
53 OOP_ReleaseAttrBasesArray(&base
->hiddAttrBase
, attrBaseIDs
);
55 if (base
->cs_UtilityBase
)
56 CloseLibrary(base
->cs_UtilityBase
);
61 ADD2INITLIB(pciata_init
, 0)
62 ADD2EXPUNGELIB(pciata_expunge
, 0)