platform/target: ferrum: Add API to detect board info
Add API to detect board info from SMEM in LK.
Change-Id: Id6f498e757a4d8610835f0d69d40de735bf33ea4
diff --git a/target/ferrum/init.c b/target/ferrum/init.c
index 5e87b2e..604e0ba 100644
--- a/target/ferrum/init.c
+++ b/target/ferrum/init.c
@@ -170,3 +170,36 @@
{
}
+/* Detect the target type */
+void target_detect(struct board_data *board)
+{
+ /*
+ * already fill the board->target on board.c
+ */
+}
+
+void target_baseband_detect(struct board_data *board)
+{
+ uint32_t platform;
+
+ platform = board->platform;
+ switch(platform)
+ {
+ case MSM8909:
+ case MSM8209:
+ case MSM8208:
+ board->baseband = BASEBAND_MSM;
+ break;
+
+ case MDM9209:
+ case MDM9309:
+ case MDM9609:
+ board->baseband = BASEBAND_MDM;
+ break;
+
+ default:
+ dprintf(CRITICAL, "Platform type: %u is not supported\n", platform);
+ ASSERT(0);
+ };
+}
+