MLECO-3096: Removing "timer" from HAL profile.

Attempting to have timer functionality contained within
the platform drivers "package" as it should (in line with
the refactoring work done so far under HAL). This will
ensure that we don't need two timer implementations under
HAL "profiles" and therefore, this whole directory can be
removed.

This change also addressed issue with the applicatio level
Profiler code knowing about how the PMU has been set up by
the platform code. This link has been removed completely.
This will make it much easier to add/amend the Ethos-U PMU
event counters types and give each platform the capability
of populating their relvant counters. The application level
Profiler doesn't know which metrics it is displaying but
just calculates and maintains statistics for whatever PMU
counters it receives from the HAL level.

A fix for timing adapter issue introduced in the last CR
is also included.

Change-Id: Ia46e03a06e7b8e42b9ed2ba8f2af2dcd2229c110
Signed-off-by: Kshitij Sisodia <kshitij.sisodia@arm.com>
diff --git a/source/hal/include/timer.h b/source/hal/include/timer.h
index 4429388..9910fcf 100644
--- a/source/hal/include/timer.h
+++ b/source/hal/include/timer.h
@@ -17,54 +17,20 @@
 #ifndef HAL_TIMER_H
 #define HAL_TIMER_H
 
-#include "platform_timer.h"
-
-/** Struct for describing the capabilities available for
- * the timer provided by HAL */
-typedef struct _platform_timer_capability {
-    uint32_t npu_cycles:    1;
-    uint32_t cpu_cycles:    1;
-    uint32_t duration_ms:   1;
-    uint32_t duration_us:   1;
-} timer_capability;
+#include "platform_drivers.h"  /* Platform package API */
+#include "user_input.h"        /* PMU structs and API */
 
 /* Structure to hold a platform specific timer implementation */
 typedef struct _platform_timer {
-    int inited;                 /**< initialised or not */
-    timer_capability cap;       /**< capability of this timer */
-
-    /* reset the timer */
-    void (* reset)(void);
-
-    /* Gets the current time counter. */
-    time_counter (* get_time_counter)(void);
-
-    /* Gets the duration in milliseconds. */
-    time_t (* get_duration_ms)(time_counter *start, time_counter *end);
-
-    /* Gets duration in microseconds. */
-    time_t (* get_duration_us)(time_counter *start, time_counter *end);
-
-    /* Gets difference in CPU cycle counts. */
-    uint64_t (* get_cpu_cycle_diff)(time_counter *start, time_counter *end);
-
-    /* Gets the difference in terms of cycle counts for collected pmu counters. */
-    int (* get_npu_cycles_diff)(time_counter *start, time_counter *end,
-                                uint64_t* pmu_counters_values, size_t size);
-
-    /* Wraps get_time_counter function with additional profiling
-     * initialisation, if required. */
-    time_counter (* start_profiling)(void);
-
-    /* Wraps get_time_counter function along with additional instructions when
-     * profiling ends, if required. */
-    time_counter (* stop_profiling)(void);
+    int inited;                           /**< Initialised or not. */
+    void (* reset)(void);                 /**< Reset the timer. */
+    pmu_counters (* get_counters)(void);  /**< Gets the current time counter. */
 
 } platform_timer;
 
 /**
  * @brief   Initialise the timer available for the platform.
  **/
-void init_timer(platform_timer *timer);
+void init_timer(platform_timer* timer);
 
 #endif /* HAL_TIMER_H */