timer: add dummy implementation for RISC-V

This commit is contained in:
Sebastian Sumpf 2016-02-16 16:39:45 +01:00 committed by Christian Helmuth
parent e367c99864
commit a66df55f4e
2 changed files with 35 additions and 0 deletions

View File

@ -0,0 +1,3 @@
INC_DIR += $(REP_DIR)/src/drivers/timer/spec/hw $(REP_DIR)/src/drivers/timer/spec/hw/spec/riscv
include $(REP_DIR)/lib/mk/timer.inc

View File

@ -0,0 +1,32 @@
/*
* \brief Dummy platform timer
* \author Sebastian Sumpf
* \date 2016-02-10
*/
/*
* Copyright (C) 2016 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU General Public License version 2.
*/
#ifndef _HW__RISCV__PLATFORM_TIMER_BASE_H_
#define _HW__RISCV__PLATFORM_TIMER_BASE_H_
class Platform_timer_base
{
public:
enum { IRQ };
unsigned long tics_to_us(unsigned long const tics) const { return 0; }
unsigned long us_to_tics(unsigned long const us) const { return 0; }
unsigned long max_value() const { return 0; }
unsigned long value(bool & wrapped) const { return 0; }
void run_and_wrap(unsigned long value) { }
};
#endif /* _HW__RISCV__PLATFORM_TIMER_BASE_H_ */