2 Copyright (C) 2013-2016, The AROS Development Team. All rights reserved.
6 #include <aros/debug.h>
9 #include <hidd/keyboard.h>
11 #include <utility/tagitem.h>
15 OOP_Object
*ATA__Root__New(OOP_Class
*cl
, OOP_Object
*o
, struct pRoot_New
*msg
)
17 struct ataBase
*ATABase
= cl
->UserData
;
21 struct TagItem new_tags
[] =
23 {aHW_ClassName
, (IPTR
)"IDE Controller"},
26 struct pRoot_New new_msg
=
32 ATABase
->ataObj
= (OOP_Object
*)OOP_DoSuperMethod(cl
, o
, &new_msg
.mID
);
34 return ATABase
->ataObj
;
37 VOID
ATA__Root__Dispose(OOP_Class
*cl
, OOP_Object
*o
, OOP_Msg msg
)
39 /* We are singletone. Cannot dispose. */
42 BOOL
ATA__HW__RemoveDriver(OOP_Class
*cl
, OOP_Object
*o
, struct pHW_RemoveDriver
*Msg
)
45 * Currently we don't support unloading bus drivers.
46 * This is a very-very big TODO.
51 BOOL
ATA__HW__SetUpDriver(OOP_Class
*cl
, OOP_Object
*o
, struct pHW_SetUpDriver
*Msg
)
53 struct ataBase
*ATABase
= cl
->UserData
;
56 * Instantiate interfaces. PIO is mandatory, DMA is not.
57 * We don't keep interface pointers here because our bus class
59 * We do this in SetUpDriver because the object must be fully
60 * created in order for this stuff to work.
62 if (!HIDD_ATABus_GetPIOInterface(Msg
->driverObject
))
65 if (!ATABase
->ata_NoDMA
)
66 HIDD_ATABus_GetDMAInterface(Msg
->driverObject
);
68 /* Add the bus to the device and start service */
69 return Hidd_ATABus_Start(Msg
->driverObject
, ATABase
);