summaryrefslogtreecommitdiff
path: root/drivers/tdm
diff options
context:
space:
mode:
authorSandeep Singh <Sandeep@freescale.com>2013-12-02 12:28:00 (GMT)
committerJose Rivera <German.Rivera@freescale.com>2014-01-20 15:49:42 (GMT)
commit17be34db5454c527c11b62f75df7dabd550ab9cb (patch)
treee05c9ebdb26dde1779c731bd108f6e2badec4c1e /drivers/tdm
parentd191e51acb0c1876dfb98936cdaec34627b6f5e2 (diff)
downloadlinux-fsl-qoriq-17be34db5454c527c11b62f75df7dabd550ab9cb.tar.xz
tdm: Added module param to enable loopback mode
module param "loopback" if set will configure tdm device to initialize in loopback mode. Signed-off-by: Sandeep Singh <Sandeep@freescale.com> Change-Id: I74b19ea2dd07a15672d71a6da0273d9aba69ddd3 Reviewed-on: http://git.am.freescale.net:8181/7000 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Poonam Aggrwal <poonam.aggrwal@freescale.com> Reviewed-by: Jose Rivera <German.Rivera@freescale.com>
Diffstat (limited to 'drivers/tdm')
-rw-r--r--drivers/tdm/device/tdm_fsl.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/tdm/device/tdm_fsl.c b/drivers/tdm/device/tdm_fsl.c
index 69b535b..8140a06 100644
--- a/drivers/tdm/device/tdm_fsl.c
+++ b/drivers/tdm/device/tdm_fsl.c
@@ -50,6 +50,11 @@
#define DRV_DESC "Freescale TDM Driver Adapter"
#define DRV_NAME "fsl_tdm"
+int loopback;
+module_param(loopback, int, 0);
+MODULE_PARM_DESC(loopback, "Enable TDM in loopback mode."
+ " Enable=1, Disable=0(default)");
+
static int tdmen = 1;
module_param(tdmen, int, S_IRUSR);
@@ -419,6 +424,8 @@ static int tdm_fsl_reg_init(struct tdm_priv *priv)
tx_tcd_init(priv);
rx_tcd_init(priv);
+ adap->adapt_cfg.loopback = loopback;
+
/* TDM RD->TD loopback, Share T/R Fsync,Clock */
if (adap->adapt_cfg.loopback)
out_be32(&priv->tdm_regs->gir, GIR_LPBK | GIR_RTS);