xref: /haiku/src/system/kernel/arch/arm/soc_pxa.h (revision 4c8e85b316c35a9161f5a1c50ad70bc91c83a76f)
1 #ifndef ARCH_ARM_SOC_PXA_H
2 #define ARCH_ARM_SOC_PXA_H
3 
4 class PXAInterruptController;
5 
6 #include "soc.h"
7 
8 #include <new>
9 
10 
11 class PXAInterruptController : public InterruptController {
12 public:
13 	PXAInterruptController(uint32_t reg_base);
14 	void EnableInterrupt(int irq);
15 	void DisableInterrupt(int irq);
16 	void HandleInterrupt();
17 
18 protected:
19 	area_id fRegArea;
20 	uint32 *fRegBase;
21 };
22 
23 
24 class PXATimer : public HardwareTimer {
25 public:
26 	void SetTimeout(bigtime_t timeout);
27 	void Clear();
28 	bigtime_t Time();
29 
30 #if 0
31 	static status_t Init(fdt_module_info *fdt, fdt_device_node node, void *cookie) {
32 		PXATimer *timer = new(std::nothrow) PXATimer(fdt, node);
33 		// XXX implement InitCheck() functionality
34 		return timer != NULL ? B_OK : B_NO_MEMORY;
35 	}
36 #endif
37 
38 protected:
39 	//PXATimer(fdt_module_info *fdt, fdt_device_node node);
40 
41 	area_id fRegArea;
42 	uint32 *fRegBase;
43 	bigtime_t fSystemTime;
44 private:
45 	static int32 _InterruptWrapper(void *data);
46 	int32 HandleInterrupt();
47 };
48 
49 
50 #endif // ARCH_ARM_SOC_PXA_H
51