revert between 56095 -> 55830 in arch
[AROS.git] / workbench / tools / SysExplorer / Modules / AHCI / ahci_init.c
blob50f0e7d1ed9de33bd2c49ee5bab288cc30bf350d
1 /*
2 Copyright (C) 2018-2019, The AROS Development Team.
3 $Id$
4 */
6 #include <aros/debug.h>
8 #include <proto/sysexp.h>
9 #include <proto/oop.h>
11 #include <aros/libcall.h>
12 #include <aros/asmcall.h>
13 #include <aros/symbolsets.h>
15 #include "ahci_intern.h"
17 extern void AHCIStartup(struct SysexpBase *);
18 extern void AHCIShutdown(struct SysexpBase *);
20 #if (1) // TODO : Move into libbase
21 OOP_AttrBase HiddStorageUnitAB;
22 OOP_AttrBase HiddAHCIUnitAB;
24 OOP_MethodID HiddStorageControllerBase;
25 #endif
27 const struct OOP_ABDescr ahci_abd[] =
29 {IID_Hidd_StorageUnit , &HiddStorageUnitAB },
30 {IID_Hidd_AHCIUnit, &HiddAHCIUnitAB},
31 {NULL , NULL }
34 static int ahcienum_init(struct SysexpAHCIBase *AhciBase)
36 D(bug("[ahci.sysexp] %s()\n", __func__));
38 OOP_ObtainAttrBases(ahci_abd);
40 HiddStorageControllerBase = OOP_GetMethodID(IID_Hidd_StorageController, 0);
42 return 2;
45 ADD2INITLIB(ahcienum_init, 10);
47 AROS_LH1(void, ModuleInit,
48 AROS_LHA(void *, SysexpBase, A0),
49 struct SysexpAHCIBase *, AhciBase, 5, Ahci
52 AROS_LIBFUNC_INIT
54 D(bug("[ahci.sysexp] %s(%p)\n", __func__, SysexpBase));
56 AhciBase->seab_SysexpBase = SysexpBase;
57 AhciBase->seab_Module.sem_Node.ln_Name = "AHCI.Module";
58 AhciBase->seab_Module.sem_Node.ln_Pri = 90;
59 AhciBase->seab_Module.sem_Startup = AHCIStartup;
60 AhciBase->seab_Module.sem_Shutdown = AHCIShutdown;
61 RegisterModule(&AhciBase->seab_Module, AhciBase);
63 return;
65 AROS_LIBFUNC_EXIT