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 void EnableInterrupt(int irq); 14 void DisableInterrupt(int irq); 15 void HandleInterrupt(); 16 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; 21 } 22 23 protected: 24 PXAInterruptController(fdt_module_info *fdt, fdt_device_node node); 25 26 area_id fRegArea; 27 uint32 *fRegBase; 28 }; 29 30 31 class PXATimer : public HardwareTimer { 32 public: 33 void SetTimeout(bigtime_t timeout); 34 void Clear(); 35 bigtime_t Time(); 36 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; 41 } 42 43 protected: 44 PXATimer(fdt_module_info *fdt, fdt_device_node node); 45 46 area_id fRegArea; 47 uint32 *fRegBase; 48 bigtime_t fSystemTime; 49 private: 50 static int32 _InterruptWrapper(void *data); 51 int32 HandleInterrupt(); 52 }; 53 54 55 #endif // ARCH_ARM_SOC_PXA_H 56