summaryrefslogtreecommitdiff
path: root/cesar/hal
diff options
context:
space:
mode:
authorNicolas Schodet2010-12-01 11:44:39 +0100
committerNicolas Schodet2013-03-06 11:16:07 +0100
commitce4de522fbca1de6172bd402408ade74b9b7b9cd (patch)
tree67a1ffc0197db7da816bf5a627baf3a5ee79e070 /cesar/hal
parent1d936cdee83790d7a97a26c69ab5c2423af4239a (diff)
cesar/hal/phy: enable wiener phase correction, closes #2145
Cherry-pick reverted commit from master branch: e523a6daf7590c1e6b41ff0f76f0fc1d12056d13
Diffstat (limited to 'cesar/hal')
-rw-r--r--cesar/hal/phy/inc/regs.h6
-rw-r--r--cesar/hal/phy/spoc/src/spoc_regs.c4
2 files changed, 10 insertions, 0 deletions
diff --git a/cesar/hal/phy/inc/regs.h b/cesar/hal/phy/inc/regs.h
index 9ddce22d35..a87a5041c3 100644
--- a/cesar/hal/phy/inc/regs.h
+++ b/cesar/hal/phy/inc/regs.h
@@ -330,6 +330,12 @@ typedef u32 uint32_t;
#define PHY_DSPSS_SPOC_DEBUG_MODE__M_MATRIX_WITHOUT_PHASE 3, 3
#define PHY_DSPSS_SPOC_DEBUG_MODE__BYPASS 4, 4
+/* WIENER_PHASE_CORRECTION */
+#define PHY_DSPSS_WIENER_PHASE_CORRECTION__IND_MAX_IFFT_ON_CHEPRE 8, 0
+#define PHY_DSPSS_WIENER_PHASE_CORRECTION__SOFT_PHASE 17, 9
+#define PHY_DSPSS_WIENER_PHASE_CORRECTION__SOFT_PHASE_EN 18, 18
+#define PHY_DSPSS_WIENER_PHASE_CORRECTION__PHASE_CORRECTION_EN 19, 19
+
/* WIENER_CHANNEL_MAX_DETECTION_PARAM */
#define PHY_DSPSS_WIENER_CHANNEL_MAX_DETECTION_PARAM__FREQ_HOLE_WIDTH 7, 0
#define PHY_DSPSS_WIENER_CHANNEL_MAX_DETECTION_PARAM__SOFT_ADDR 16, 8
diff --git a/cesar/hal/phy/spoc/src/spoc_regs.c b/cesar/hal/phy/spoc/src/spoc_regs.c
index 8f12a4a1ee..6b79046823 100644
--- a/cesar/hal/phy/spoc/src/spoc_regs.c
+++ b/cesar/hal/phy/spoc/src/spoc_regs.c
@@ -155,5 +155,9 @@ phy_spoc_wiener_set (phy_t *ctx, const u32 *tonemask, uint carrier_nb)
dbg_assert (PHY_DSPSS_SPOC_SET_REQUEST
== PHY_DSPSS_SPOC_SET_REQUEST__NONE);
PHY_DSPSS_SPOC_SET_REQUEST = PHY_DSPSS_SPOC_SET_REQUEST__WIENER;
+ /* Enable wiener. */
+ PHY_DSPSS_WIENER_PHASE_CORRECTION =
+ BF_FILL (PHY_DSPSS_WIENER_PHASE_CORRECTION,
+ (PHASE_CORRECTION_EN, 1));
}