aboutsummaryrefslogtreecommitdiff
path: root/product/n1sdp/module
diff options
context:
space:
mode:
authorManoj Kumar <manoj.kumar3@arm.com>2019-02-26 13:53:19 +0530
committerronald-cron-arm <39518861+ronald-cron-arm@users.noreply.github.com>2019-02-28 10:51:58 +0100
commit0243e6d5bd10bae2ff3e4323d4e30b7ad7d156bd (patch)
tree70d6c5d9181fb33aa336188c717966b8f3bd0a24 /product/n1sdp/module
parentd8db48e9d3a03cbb256bbf13c0d0a7abc249830a (diff)
n1sdp: fix n1sdp_sensor hang by moving alarm ID to config file
n1sdp_sensor module uses timer alarm API for periodically measuring the sensor values. So the module binds to timer module in the bind stage using FWK_ID_SUB_ELEMENT call. So when a library is built, the value calculated by the macro will be taken based on that build environment. However, in later stage if modules added/removed in firmware.mk, the position of the timer module will be changed and since a library module will not be built in normal build phase, it is unaware of the change in position and hence passes wrong element id to timer during bind. This makes the code to fail. As a workaround, this patch moves the id calculation to config file as a module configuration data so that the value is generated in every build. The library will read the data passed by the config file and not uses fixed value. Change-Id: Id7acf2e6899d7e0f0c106994fd0303d67a596071 Signed-off-by: Manoj Kumar <manoj.kumar3@arm.com>
Diffstat (limited to 'product/n1sdp/module')
-rw-r--r--product/n1sdp/module/n1sdp_sensor/include/mod_n1sdp_sensor.h18
-rw-r--r--product/n1sdp/module/n1sdp_sensor/lib/mod_n1sdp_sensor.abin6252 -> 5640 bytes
2 files changed, 18 insertions, 0 deletions
diff --git a/product/n1sdp/module/n1sdp_sensor/include/mod_n1sdp_sensor.h b/product/n1sdp/module/n1sdp_sensor/include/mod_n1sdp_sensor.h
index 0e8e030d..a0f0c963 100644
--- a/product/n1sdp/module/n1sdp_sensor/include/mod_n1sdp_sensor.h
+++ b/product/n1sdp/module/n1sdp_sensor/include/mod_n1sdp_sensor.h
@@ -9,6 +9,7 @@
#define MOD_N1SDP_SENSOR_H
#include <stdint.h>
+#include <fwk_id.h>
#include <mod_sensor.h>
/*!
@@ -87,6 +88,23 @@ struct mod_n1sdp_volt_sensor_config {
};
/*!
+ * \brief N1SDP sensor - Module configuration.
+ */
+struct mod_n1sdp_sensor_config {
+ /*! Identifier of timer alarm element */
+ fwk_id_t alarm_id;
+
+ /*! Identifier of timer alarm API */
+ fwk_id_t alarm_api;
+
+ /*! Temperature sensor count */
+ uint8_t t_sensor_count;
+
+ /*! Voltage sensor count */
+ uint8_t v_sensor_count;
+};
+
+/*!
* @}
*/
diff --git a/product/n1sdp/module/n1sdp_sensor/lib/mod_n1sdp_sensor.a b/product/n1sdp/module/n1sdp_sensor/lib/mod_n1sdp_sensor.a
index 83e99202..99acf67f 100644
--- a/product/n1sdp/module/n1sdp_sensor/lib/mod_n1sdp_sensor.a
+++ b/product/n1sdp/module/n1sdp_sensor/lib/mod_n1sdp_sensor.a
Binary files differ