Added a test for MUIA_Listview_SelectChange.
[AROS.git] / workbench / hidds / agp / i8xxbridgedeviceclass.c
blob136f5d2691af7bd24f016f212ab89a814d6c8456
1 /*
2 Copyright 2010, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include <hidd/agp.h>
7 #include <proto/oop.h>
8 #include <proto/exec.h>
9 #define DEBUG 0
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;
27 ULONG ctrlreg;
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));
35 /* PUBLIC METHODS */
36 OOP_Object * METHOD(i8XXBridgeDevice, Root, New)
38 o = (OOP_Object *)OOP_DoSuperMethod(cl, o, (OOP_Msg) msg);
40 return o;
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;
51 UWORD cfgreg;
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");
63 return FALSE;