Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
FMC TDC 1ns 5cha - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
FMC TDC 1ns 5cha - Software
Commits
e21d811e
Commit
e21d811e
authored
Sep 27, 2018
by
Juan David González Cobas
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'traces' into tom-irq-race-fix-sep27
parents
46da0f54
2534f543
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
2 deletions
+21
-2
ft-irq.c
kernel/ft-irq.c
+21
-2
No files found.
kernel/ft-irq.c
View file @
e21d811e
...
...
@@ -131,6 +131,9 @@ static inline uint32_t ft_chan_to_irq_mask(struct fmctdc_dev *ft, uint32_t chan_
static
void
ft_eic_irq_disable
(
struct
fmctdc_dev
*
ft
,
uint32_t
mask
)
{
ft_iowrite
(
ft
,
mask
,
ft
->
ft_irq_base
+
TDC_EIC_REG_EIC_IDR
);
printk
(
KERN_INFO
"race69[disable_Save] %s:%d: ft = %p TDC_EIC_REG_EIC_IDR, mask = %x
\n
"
,
__FILE__
,
__LINE__
,
ft
,
mask
);
}
/**
...
...
@@ -141,6 +144,9 @@ static void ft_eic_irq_disable(struct fmctdc_dev *ft, uint32_t mask)
static
void
ft_eic_irq_enable
(
struct
fmctdc_dev
*
ft
,
uint32_t
mask
)
{
ft_iowrite
(
ft
,
mask
,
ft
->
ft_irq_base
+
TDC_EIC_REG_EIC_IER
);
printk
(
KERN_INFO
"race69[enable_restore] %s:%d: ft = %p TDC_EIC_REG_EIC_IER, mask = %x
\n
"
,
__FILE__
,
__LINE__
,
ft
,
mask
);
}
...
...
@@ -298,8 +304,6 @@ static void ft_dma_work(struct work_struct *work)
ft_eic_irq_enable
(
ft
,
TDC_EIC_EIC_IMR_TDC_DMA_MASK
);
return
;
}
irq_stat
=
ft_ioread
(
ft
,
ft
->
ft_irq_base
+
TDC_EIC_REG_EIC_ISR
);
irq_stat
&=
TDC_EIC_EIC_IMR_TDC_DMA_MASK
;
irq_stat
>>=
TDC_EIC_EIC_IMR_TDC_DMA_SHIFT
;
...
...
@@ -703,6 +707,9 @@ int ft_irq_init(struct fmctdc_dev *ft)
/* disable & kick off the interrupts (fixme: possible issue with the HDL) */
ft_iowrite
(
ft
,
~
0
,
ft
->
ft_irq_base
+
TDC_EIC_REG_EIC_IDR
);
printk
(
KERN_INFO
"race69 %s:%d: ft = %p TDC_EIC_REG_EIC_IDR, ft->irq_imr = %x
\n
"
,
__FILE__
,
__LINE__
,
ft
,
0
);
fmc_irq_ack
(
ft
->
fmc
);
/*
* We enable interrupts on all channel. but if we do not enable
...
...
@@ -714,11 +721,17 @@ int ft_irq_init(struct fmctdc_dev *ft)
ft_iowrite
(
ft
,
DMA_EIC_EIC_IER_DMA_DONE
|
DMA_EIC_EIC_IER_DMA_ERROR
,
ft
->
ft_dma_eic_base
+
DMA_EIC_REG_EIC_IER
);
printk
(
KERN_INFO
"race69 %s:%d: ft = %p DMA_EIC_REG_EIC_IER, DMA_EIC_EIC_IER_DMA_DONE|DMA_EIC_EIC_IER_DMA_ERROR = %x
\n
"
,
__FILE__
,
__LINE__
,
ft
,
DMA_EIC_EIC_IER_DMA_DONE
|
DMA_EIC_EIC_IER_DMA_ERROR
);
}
ft_iowrite
(
ft
,
ft_chan_to_irq_mask
(
ft
,
0x1F
),
ft
->
ft_irq_base
+
TDC_EIC_REG_EIC_IER
);
printk
(
KERN_INFO
"race69 %s:%d: ft = %p TDC_EIC_REG_EIC_IER, ft_chan_to_irq_mask(ft, 0x1F) = %x
\n
"
,
__FILE__
,
__LINE__
,
ft
,
ft_chan_to_irq_mask
(
ft
,
0x1F
));
return
0
;
}
...
...
@@ -726,7 +739,13 @@ int ft_irq_init(struct fmctdc_dev *ft)
void
ft_irq_exit
(
struct
fmctdc_dev
*
ft
)
{
ft_iowrite
(
ft
,
~
0
,
ft
->
ft_irq_base
+
TDC_EIC_REG_EIC_IDR
);
printk
(
KERN_INFO
"race69 %s:%d: ft = %p TDC_EIC_REG_EIC_IDR, ft->irq_imr = %x
\n
"
,
__FILE__
,
__LINE__
,
ft
,
0
);
if
(
ft
->
mode
==
FT_ACQ_TYPE_DMA
)
{
printk
(
KERN_INFO
"race69 %s:%d: ft = %p DMA_EIC_REG_EIC_IER, DMA_EIC_EIC_IDR_DMA_DONE | DMA_EIC_EIC_IDR_DMA_ERROR = %x
\n
"
,
__FILE__
,
__LINE__
,
ft
,
DMA_EIC_EIC_IDR_DMA_DONE
|
DMA_EIC_EIC_IDR_DMA_ERROR
);
ft_iowrite
(
ft
,
DMA_EIC_EIC_IDR_DMA_DONE
|
DMA_EIC_EIC_IDR_DMA_ERROR
,
ft
->
ft_dma_eic_base
+
DMA_EIC_REG_EIC_IER
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment