2 Copyright 2010, The AROS Development Team. All rights reserved.
8 #include <proto/exec.h>
10 #include <aros/debug.h>
12 #include "agp_private.h"
14 #undef HiddAGPBridgeDeviceAttrBase
15 #define HiddAGPBridgeDeviceAttrBase (SD(cl)->hiddAGPBridgeDeviceAB)
17 #define AGP_INTEL_NBXCFG 0x50
18 #define AGP_INTEL_CTRL 0xb0
20 /* NON-PUBLIC METHODS */
21 VOID
METHOD(i8XXBridgeDevice
, Hidd_AGPBridgeDevice
, FlushGattTable
)
23 struct HIDDGenericBridgeDeviceData
* gbddata
=
24 OOP_INST_DATA(SD(cl
)->genericBridgeDeviceClass
, o
);
26 OOP_Object
* bridgedev
= gbddata
->bridge
->PciDevice
;
29 ctrlreg
= readconfiglong(bridgedev
, AGP_INTEL_CTRL
);
30 writeconfiglong(bridgedev
, AGP_INTEL_CTRL
, ctrlreg
& ~(1 << 7));
31 ctrlreg
= readconfiglong(bridgedev
, AGP_INTEL_CTRL
);
32 writeconfiglong(bridgedev
, AGP_INTEL_CTRL
, ctrlreg
| (1 << 7));
36 OOP_Object
* METHOD(i8XXBridgeDevice
, Root
, New
)
38 o
= (OOP_Object
*)OOP_DoSuperMethod(cl
, o
, (OOP_Msg
) msg
);
43 VOID
i8XXBridgeDevice__Root__Dispose(OOP_Class
* cl
, OOP_Object
* o
, OOP_Msg msg
)
45 struct HIDDGenericBridgeDeviceData
* gbddata
=
46 OOP_INST_DATA(SD(cl
)->genericBridgeDeviceClass
, o
);
48 if (gbddata
->state
!= STATE_UNKNOWN
)
50 OOP_Object
* bridgedev
= gbddata
->bridge
->PciDevice
;
53 cfgreg
= readconfigword(bridgedev
, AGP_INTEL_NBXCFG
);
54 writeconfigword(bridgedev
, AGP_INTEL_NBXCFG
, cfgreg
& ~(1 << 9));
57 OOP_DoSuperMethod(cl
, o
, (OOP_Msg
)msg
);
60 BOOL
METHOD(i8XXBridgeDevice
, Hidd_AGPBridgeDevice
, Initialize
)
62 bug("[i8XXBridgeDevice] abstract Initialize called\n");