btrfs: Attempt to fix GCC2 build.
[haiku.git] / src / system / kernel / arch / arm / soc_pxa.h
blob996a312da0aa3a744867ec7d41f21cf56a1f6e1b
1 #ifndef ARCH_ARM_SOC_PXA_H
2 #define ARCH_ARM_SOC_PXA_H
4 class PXAInterruptController;
6 #include "soc.h"
8 #include <new>
11 class PXAInterruptController : 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) PXAInterruptController(fdt, node);
19 // XXX implement InitCheck() functionality
20 return ic != NULL ? B_OK : B_NO_MEMORY;
23 protected:
24 PXAInterruptController(fdt_module_info *fdt, fdt_device_node node);
26 area_id fRegArea;
27 uint32 *fRegBase;
31 class PXATimer : public HardwareTimer {
32 public:
33 void SetTimeout(bigtime_t timeout);
34 void Clear();
35 bigtime_t Time();
37 static status_t Init(fdt_module_info *fdt, fdt_device_node node, void *cookie) {
38 PXATimer *timer = new(std::nothrow) PXATimer(fdt, node);
39 // XXX implement InitCheck() functionality
40 return timer != NULL ? B_OK : B_NO_MEMORY;
43 protected:
44 PXATimer(fdt_module_info *fdt, fdt_device_node node);
46 area_id fRegArea;
47 uint32 *fRegBase;
48 bigtime_t fSystemTime;
49 private:
50 static int32 _InterruptWrapper(void *data);
51 int32 HandleInterrupt();
55 #endif // ARCH_ARM_SOC_PXA_H