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/platform/simple/CMakeLists.txt b/source/hal/source/platform/simple/CMakeLists.txt
index e11d9a9..119f711 100644
--- a/source/hal/source/platform/simple/CMakeLists.txt
+++ b/source/hal/source/platform/simple/CMakeLists.txt
@@ -31,14 +31,19 @@
 endif()
 
 # Define target specific values here (before adding the components)
-set(UART0_BASE          "0x49303000"    CACHE STRING "UART base address")
-set(UART0_BAUDRATE      "115200"        CACHE STRING "UART baudrate")
-set(SYSTEM_CORE_CLOCK   "25000000"      CACHE STRING "System peripheral clock (Hz)")
-set(ETHOS_U_BASE_ADDR   "0x58102000"    CACHE STRING "Ethos-U NPU base address")
-set(ETHOS_U_IRQN        "56"            CACHE STRING "Ethos-U55 Interrupt")
+set(UART0_BASE           "0x49303000"   CACHE STRING "UART base address")
+set(UART0_BAUDRATE       "115200"       CACHE STRING "UART baudrate")
+set(SYSTEM_CORE_CLOCK    "25000000"     CACHE STRING "System peripheral clock (Hz)")
+set(ETHOS_U_BASE_ADDR    "0x58102000"   CACHE STRING "Ethos-U NPU base address")
+set(ETHOS_U_IRQN         "56"           CACHE STRING "Ethos-U55 Interrupt")
 set(ETHOS_U_SEC_ENABLED  "1"            CACHE STRING "Ethos-U NPU Security enable")
 set(ETHOS_U_PRIV_ENABLED "1"            CACHE STRING "Ethos-U NPU Privilege enable")
 
+if (ETHOS_U_NPU_TIMING_ADAPTER_ENABLED)
+    set(TA0_BASE         "0x58103000"   CACHE STRING "Ethos-U NPU timing adapter 0")
+    set(TA1_BASE         "0x58103200"   CACHE STRING "Ethos-U NPU timing adapter 1")
+endif()
+
 # 2. Create static library
 add_library(${PLATFORM_DRIVERS_TARGET} STATIC)
 
@@ -69,13 +74,22 @@
 ## Platform component: lcd
 add_subdirectory(${COMPONENTS_DIR}/lcd ${CMAKE_BINARY_DIR}/lcd)
 
+## Platform component: PMU
+add_subdirectory(${COMPONENTS_DIR}/platform_pmu ${CMAKE_BINARY_DIR}/platform_pmu)
+
 # Add dependencies:
 target_link_libraries(${PLATFORM_DRIVERS_TARGET}  PUBLIC
         cmsis_device
         log
+        platform_pmu
         lcd_stubs
         $<IF:$<BOOL:STDOUT_RETARGET>,stdout_retarget_pl011,stdout>)
 
+# Set the CPU profiling definition
+if (CPU_PROFILE_ENABLED)
+    target_compile_definitions(${PLATFORM_DRIVERS_TARGET} PUBLIC CPU_PROFILE_ENABLED)
+endif()
+
 # If Ethos-U is enabled, we need the driver library too
 if (ETHOS_U_NPU_ENABLED)