trng: Move device memory retrieve to platform code
trng_adapter_init() was checking for device memory. However not every
trng implementation needs device memory. Instead we move the device
memory retrieval to the platform specific code.
Signed-off-by: Jelle Sels <jelle.sels@arm.com>
Change-Id: Ib4ebca98152900e471711a9106682cd43510057d
diff --git a/platform/interface/trng.h b/platform/interface/trng.h
index 9c24581..0f1daf5 100644
--- a/platform/interface/trng.h
+++ b/platform/interface/trng.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021, Arm Limited and Contributors. All rights reserved.
+ * Copyright (c) 2021-2022, Arm Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -51,12 +51,11 @@
* \brief Factory method to construct a platform specific trng driver
*
* \param driver Pointer to driver structure to initialize on construction.
- * \param device_region Pointer a device region object or NULL if none.
+ * \param instance Deployment specific trng instance.
*
* \return 0 if successful.
*/
-int platform_trng_create(struct platform_trng_driver *driver,
- const struct device_region *device_region);
+int platform_trng_create(struct platform_trng_driver *driver, int instance);
/**
* \brief Destroy a driver constructed using the factory method