btrfs: Attempt to fix GCC2 build.
[haiku.git] / src / system / kernel / arch / arm / soc_omap3.h
blob369c0e4d80e3a9abf23ceff7581cdb16ea6ecf17
1 #ifndef ARCH_ARM_SOC_OMAP3_H
2 #define ARCH_ARM_SOC_OMAP3_H
4 class OMAP3InterruptController;
6 #include "soc.h"
8 #include <new>
11 class OMAP3InterruptController : public InterruptController {
12 public:
13 void EnableInterrupt(int irq);
14 void DisableInterrupt(int irq);
15 void HandleInterrupt();
17 static status_t Init(fdt_module_info *fdt, fdt_device_node node, void *cookie) {
18 InterruptController *ic = new(std::nothrow) OMAP3InterruptController(fdt, node);
19 // XXX implement InitCheck() functionality
20 return ic != NULL ? B_OK : B_NO_MEMORY;
22 protected:
23 OMAP3InterruptController(fdt_module_info *fdt, fdt_device_node node);
25 void SoftReset();
27 area_id fRegArea;
28 uint32 *fRegBase;
29 uint32 fNumPending;
32 class OMAP3Timer : public HardwareTimer {
33 public:
34 void SetTimeout(bigtime_t timeout);
35 bigtime_t Time();
36 void Clear();
38 static status_t Init(fdt_module_info *fdt, fdt_device_node node, void *cookie) {
39 if (sInstance == NULL) {
40 OMAP3Timer *timer = new(std::nothrow) OMAP3Timer(fdt, node);
41 // XXX implement InitCheck() functionality
42 return timer != NULL ? B_OK : B_NO_MEMORY;
43 } else {
44 // XXX We have multiple timers; just create the first one
45 // and ignore the rest
46 return B_OK;
50 private:
51 OMAP3Timer(fdt_module_info *fdtModule, fdt_device_node node);
53 static int32 _InterruptWrapper(void *data);
54 int32 HandleInterrupt();
56 bigtime_t fSystemTime;
57 area_id fRegArea;
58 uint32 *fRegBase;
59 int fInterrupt;
62 #endif /* ARCH_ARM_SOC_OMAP3_H */