[PATCH] osmo-bts[master]: l1_if: Add inline functions to check dsp/fgpa version at run...

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Mon May 29 19:59:05 UTC 2017


Review at  https://gerrit.osmocom.org/2792

l1_if: Add inline functions to check dsp/fgpa version at runtime

Change-Id: Iddae9c8de33aca6663dca77908fa4852ad704ce9
---
M src/osmo-bts-sysmo/l1_if.h
1 file changed, 15 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/92/2792/1

diff --git a/src/osmo-bts-sysmo/l1_if.h b/src/osmo-bts-sysmo/l1_if.h
index 0dc919b..961e585 100644
--- a/src/osmo-bts-sysmo/l1_if.h
+++ b/src/osmo-bts-sysmo/l1_if.h
@@ -83,6 +83,21 @@
 	void *priv;
 };
 
+
+#define L1_VER_SHIFT(x,y,z) ((x << 16) | (y << 8) | (z))
+
+static inline uint32_t l1if_dsp_ver(struct femtol1_hdl *fl1h)
+{
+	const uint8_t *v = fl1h->hw_info.dsp_version;
+	return L1_VER_SHIFT(v[0], v[1], v[2]);
+}
+
+static inline uint32_t l1if_fpga_ver(struct femtol1_hdl *fl1h)
+{
+	const uint8_t *v = fl1h->hw_info.fpga_version;
+	return L1_VER_SHIFT(v[0], v[1], v[2]);
+}
+
 #define msgb_l1prim(msg)	((GsmL1_Prim_t *)(msg)->l1h)
 #define msgb_sysprim(msg)	((SuperFemto_Prim_t *)(msg)->l1h)
 

-- 
To view, visit https://gerrit.osmocom.org/2792
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iddae9c8de33aca6663dca77908fa4852ad704ce9
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>



More information about the gerrit-log mailing list