Commit ba2ccc42 authored by Federico Vaga's avatar Federico Vaga

kernel: fix reset procedure

Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
parent 96dd7d9f
......@@ -26,15 +26,17 @@ static int ft_svec_reset(struct fmctdc_dev *ft)
dev_dbg(&ft->fmc->dev, "Un-resetting FMCs...\n");
/* Reset */
fmc_writel(ft->fmc, ~(1 << ft->fmc->slot_id),
/* Reset - reset bits are shifted by 1 */
fmc_writel(ft->fmc, ~(1 << (ft->fmc->slot_id + 1)),
TDC_SVEC_CARRIER_BASE + TDC_REG_CARRIER_RST);
udelay(1000);
udelay(5000);
val = fmc_readl(ft->fmc, TDC_SVEC_CARRIER_BASE + TDC_REG_CARRIER_RST);
val |= (1 << (ft->fmc->slot_id + 1));
/* Un-Reset */
fmc_writel(ft->fmc, val | (1 << ft->fmc->slot_id),
TDC_SVEC_CARRIER_BASE + TDC_REG_CARRIER_RST);
fmc_writel(ft->fmc, val, TDC_SVEC_CARRIER_BASE + TDC_REG_CARRIER_RST);
return 0;
}
......
......@@ -97,7 +97,7 @@
#define TDC_DMA_STAT_DONE 0x1
#define TDC_DMA_STAT_ERROR 0x3
#define TDC_SVEC_CARRIER_BASE 0x20000
#define TDC_SVEC_CARRIER_BASE 0x1000
/* TDC core submodule offsets (wrs to the TDC control registers block) */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment