timer & hw & omap4: compile bug in Platform_timer

fix #652
This commit is contained in:
Martin Stein 2013-02-18 15:08:23 +01:00 committed by Norman Feske
parent 3047e32dfd
commit 2a9a653b2b

View File

@ -143,7 +143,7 @@ namespace Genode
/** /**
* Get remaining counting amount * Get remaining counting amount
*/ */
unsigned long _value() { return max_value() - read<Tcrr>(); } unsigned long _value() const { return max_value() - read<Tcrr>(); }
/** /**
* Apply counting amount * Apply counting amount
@ -208,12 +208,12 @@ namespace Genode
/** /**
* Maximum timeout value * Maximum timeout value
*/ */
unsigned long max_value() { return Tcrr::max_value(); } unsigned long max_value() const { return Tcrr::max_value(); }
/** /**
* Translate timer tics to microseconds * Translate timer tics to microseconds
*/ */
unsigned long tics_to_us(unsigned long const tics) unsigned long tics_to_us(unsigned long const tics) const
{ {
float const us = tics * us_per_tic(); float const us = tics * us_per_tic();
return (unsigned long)us; return (unsigned long)us;
@ -231,7 +231,7 @@ namespace Genode
/** /**
* Sample the timer counter and according wrapped status * Sample the timer counter and according wrapped status
*/ */
unsigned long value(bool & wrapped) unsigned long value(bool & wrapped) const
{ {
Tcrr::access_t const v = _value(); Tcrr::access_t const v = _value();
wrapped = (bool)read<Irqstatus::Ovf_it_flag>(); wrapped = (bool)read<Irqstatus::Ovf_it_flag>();