From ce58a63fb661df42e6bf283891589b11a1f411f2 Mon Sep 17 00:00:00 2001 From: Stefan Kalkowski Date: Thu, 14 Mar 2013 10:50:09 +0100 Subject: [PATCH] Remove 'epit' from generic i.MX platform spec Remove the 'epit' variable from the generic imx31 and imx53 specification, and only add it to base-hw specific i.MX specs. Thereby the EPIT timer library gets build for base-hw only. Moreover, fix some const-ness issues in the platform_timer implementation for the EPIT timer. Fixes #688. --- base-hw/mk/spec-hw_imx31.mk | 2 +- base-hw/mk/spec-hw_imx53.mk | 2 +- base/mk/spec-platform_imx31.mk | 2 +- base/mk/spec-platform_imx53.mk | 2 +- os/src/drivers/timer/hw/epit/platform_timer_base.h | 7 +++---- 5 files changed, 7 insertions(+), 8 deletions(-) diff --git a/base-hw/mk/spec-hw_imx31.mk b/base-hw/mk/spec-hw_imx31.mk index c1d174b443..e1e7d86b1a 100644 --- a/base-hw/mk/spec-hw_imx31.mk +++ b/base-hw/mk/spec-hw_imx31.mk @@ -5,7 +5,7 @@ # # denote wich specs are also fullfilled by this spec -SPECS += hw platform_imx31 +SPECS += hw platform_imx31 epit # set address where to link the text segment at LD_TEXT_ADDR ?= 0x82000000 diff --git a/base-hw/mk/spec-hw_imx53.mk b/base-hw/mk/spec-hw_imx53.mk index 67440191c1..aafba54102 100644 --- a/base-hw/mk/spec-hw_imx53.mk +++ b/base-hw/mk/spec-hw_imx53.mk @@ -5,7 +5,7 @@ # # denote wich specs are also fullfilled by this spec -SPECS += hw platform_imx53 +SPECS += hw platform_imx53 epit # set address where to link the text segment at LD_TEXT_ADDR ?= 0x70001000 diff --git a/base/mk/spec-platform_imx31.mk b/base/mk/spec-platform_imx31.mk index 0b12718b28..f1e07f32a1 100644 --- a/base/mk/spec-platform_imx31.mk +++ b/base/mk/spec-platform_imx31.mk @@ -5,7 +5,7 @@ # # denote wich specs are also fullfilled by this spec -SPECS += arm_v6 epit +SPECS += arm_v6 # add repository relative include paths REP_INC_DIR += include/platform/imx31 diff --git a/base/mk/spec-platform_imx53.mk b/base/mk/spec-platform_imx53.mk index 8da9e9fe87..771dd93c6e 100644 --- a/base/mk/spec-platform_imx53.mk +++ b/base/mk/spec-platform_imx53.mk @@ -5,7 +5,7 @@ # # denote wich specs are also fullfilled by this spec -SPECS += cortex_a8 imx53 imx epit +SPECS += cortex_a8 imx53 imx # add repository relative include paths REP_INC_DIR += include/platform/imx53 diff --git a/os/src/drivers/timer/hw/epit/platform_timer_base.h b/os/src/drivers/timer/hw/epit/platform_timer_base.h index 38160de64f..e7435faf10 100644 --- a/os/src/drivers/timer/hw/epit/platform_timer_base.h +++ b/os/src/drivers/timer/hw/epit/platform_timer_base.h @@ -59,13 +59,12 @@ namespace Genode /** * Maximum timeout value */ - unsigned long max_value() { - return read(); } + unsigned long max_value() const { return read(); } /** * 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(); return (unsigned long)us; @@ -83,7 +82,7 @@ namespace Genode /** * Sample the timer counter and according wrapped status */ - unsigned long value(bool & wrapped) + unsigned long value(bool & wrapped) const { unsigned long v = read(); wrapped = (bool)read();