Commit a2adf871 authored by Federico Vaga's avatar Federico Vaga

drv: get FMC slot number

Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
parent 7899352e
...@@ -723,7 +723,7 @@ int ft_probe(struct platform_device *pdev) ...@@ -723,7 +723,7 @@ int ft_probe(struct platform_device *pdev)
goto err_mode_selection; goto err_mode_selection;
} }
slot_nr = ft_readl(ft, FT_REG_FMC_SLOT_ID) + 1; slot_nr = stat & TDC_STAT_FMC_SLOT ? 2 : 1;
ft->slot = fmc_slot_get(pdev->dev.parent->parent, slot_nr); ft->slot = fmc_slot_get(pdev->dev.parent->parent, slot_nr);
if (IS_ERR(ft->slot)) { if (IS_ERR(ft->slot)) {
dev_err(&ft->pdev->dev, dev_err(&ft->pdev->dev,
......
...@@ -44,6 +44,7 @@ ...@@ -44,6 +44,7 @@
/* TDC_REG_STAT bits */ /* TDC_REG_STAT bits */
#define TDC_STAT_DMA BIT(0) #define TDC_STAT_DMA BIT(0)
#define TDC_STAT_FIFO BIT(1) #define TDC_STAT_FIFO BIT(1)
#define TDC_STAT_FMC_SLOT BIT(2)
#define TDC_FIFO_OFFSET 0x100 #define TDC_FIFO_OFFSET 0x100
......
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