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/platform_pmu/CMakeLists.txt b/source/hal/source/components/platform_pmu/CMakeLists.txt
new file mode 100644
index 0000000..3ef407d
--- /dev/null
+++ b/source/hal/source/components/platform_pmu/CMakeLists.txt
@@ -0,0 +1,30 @@
+#----------------------------------------------------------------------------
+#  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.
+#----------------------------------------------------------------------------
+
+#####################################################################
+#  Interface library for platform performance monitoring unit       #
+#####################################################################
+cmake_minimum_required(VERSION 3.15.6)
+
+project(platform_pmu
+    DESCRIPTION     "Header/interface for platform PMU"
+    LANGUAGES       C)
+
+# Interface library:
+set(PLATFORM_PMU_TARGET platform_pmu)
+add_library(${PLATFORM_PMU_TARGET} INTERFACE)
+target_include_directories(${PLATFORM_PMU_TARGET} INTERFACE include)
diff --git a/source/hal/source/components/platform_pmu/include/platform_pmu.h b/source/hal/source/components/platform_pmu/include/platform_pmu.h
new file mode 100644
index 0000000..3724e57
--- /dev/null
+++ b/source/hal/source/components/platform_pmu/include/platform_pmu.h
@@ -0,0 +1,62 @@
+/*
+ * 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 PLATFORM_PMU_INTERFACE_H
+#define PLATFORM_PMU_INTERFACE_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <stdint.h>
+#include <stdbool.h>
+
+#define NUM_PMU_COUNTERS     (10)     /**< Maximum number of available counters. */
+
+/**
+ * @brief   Container for a single unit for a PMU counter.
+ */
+typedef struct _pmu_counter_unit {
+    uint64_t value;     /**< Value of the counter expressed as 64 bits unsigned integer. */
+    const char* name;   /**< Name for the counter. */
+    const char* unit;   /**< Unit that the counter value represents (like cycles, beats, or milliseconds). */
+} pmu_counter_unit;
+
+/**
+ * @brief   Container for a an array of counters
+ */
+typedef struct _pmu_counters {
+    pmu_counter_unit counters[NUM_PMU_COUNTERS]; /**< Counter array. */
+    uint32_t num_counters;                       /**< Number of valid counters. */
+    bool initialised;                            /**< Initialised or not. */
+} pmu_counters;
+
+/**
+ * @brief   Resets the counters.
+ */
+void platform_reset_counters(void);
+
+/**
+ * @brief   Gets the current counter values.
+ * @returns A populated instance of pmu_counters struct.
+ **/
+pmu_counters platform_get_counters(void);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* PLATFORM_PMU_INTERFACE_H */