1 #ifndef ARCH_ARM_SOC_OMAP3_H 2 #define ARCH_ARM_SOC_OMAP3_H 3 4 class OMAP3InterruptController; 5 6 #include "soc.h" 7 8 #include <new> 9 10 11 class OMAP3InterruptController : public InterruptController { 12 public: 13 OMAP3InterruptController(uint32_t reg_base); 14 void EnableInterrupt(int irq); 15 void DisableInterrupt(int irq); 16 void HandleInterrupt(); 17 18 protected: 19 void SoftReset(); 20 21 area_id fRegArea; 22 uint32 *fRegBase; 23 uint32 fNumPending; 24 }; 25 26 class OMAP3Timer : public HardwareTimer { 27 public: 28 void SetTimeout(bigtime_t timeout); 29 bigtime_t Time(); 30 void Clear(); 31 32 #if 0 33 static status_t Init(fdt_module_info *fdt, fdt_device_node node, void *cookie) { 34 if (sInstance == NULL) { 35 OMAP3Timer *timer = new(std::nothrow) OMAP3Timer(fdt, node); 36 // XXX implement InitCheck() functionality 37 return timer != NULL ? B_OK : B_NO_MEMORY; 38 } else { 39 // XXX We have multiple timers; just create the first one 40 // and ignore the rest 41 return B_OK; 42 } 43 } 44 #endif 45 46 private: 47 //OMAP3Timer(fdt_module_info *fdtModule, fdt_device_node node); 48 49 static int32 _InterruptWrapper(void *data); 50 int32 HandleInterrupt(); 51 52 bigtime_t fSystemTime; 53 area_id fRegArea; 54 uint32 *fRegBase; 55 int fInterrupt; 56 }; 57 58 #endif /* ARCH_ARM_SOC_OMAP3_H */ 59