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/source/components/npu/include/ethosu_profiler.h b/source/hal/source/components/npu/include/ethosu_profiler.h
new file mode 100644
index 0000000..ca95b19
--- /dev/null
+++ b/source/hal/source/components/npu/include/ethosu_profiler.h
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2022 Arm Limited. All rights reserved.
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef ETHOS_U_PROFILER_H
+#define ETHOS_U_PROFILER_H
+
+#include "pmu_ethosu.h"
+
+#define ETHOSU_DERIVED_NCOUNTERS     1      /**< Number of counters derived from event counters */
+#define ETHOSU_PROFILER_NUM_COUNTERS ( \
+            ETHOSU_DERIVED_NCOUNTERS + \
+            ETHOSU_PMU_NCOUNTERS +     \
+            1 /* total CCNT */)
+
+typedef struct npu_event_counter_ {
+    enum ethosu_pmu_event_type event_type;
+    uint32_t event_mask;
+    uint32_t counter_value;
+    char* unit;
+    char* name;
+} npu_evt_counter;
+
+typedef struct npu_derived_counter_ {
+    uint32_t counter_value;
+    char* unit;
+    char* name;
+} npu_derived_counter;
+
+typedef struct ethosu_pmu_counters_ {
+    uint64_t                npu_total_ccnt;     /**< Total NPU cycles */
+    npu_evt_counter         npu_evt_counters[ETHOSU_PMU_NCOUNTERS];
+    npu_derived_counter     npu_derived_counters[ETHOSU_DERIVED_NCOUNTERS];
+    uint32_t                num_total_counters; /**< Total number of counters */
+} ethosu_pmu_counters;
+
+/**
+ * @brief  Initialise the Arm Ethos-U NPU performance monitoring unit.
+ */
+void ethosu_pmu_init(void);
+
+/**
+ * @brief  Resets the Arm Ethos-U NPU PMU counters.
+ */
+void ethosu_pmu_reset_counters(void);
+
+/**
+ * @brief Get the Arm Ethos-U NPU PMU counters
+ * @return ethosu_pmu_counters
+ */
+ethosu_pmu_counters ethosu_get_pmu_counters(void);
+
+#endif /* ETHOS_U_PROFILER_H */