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
c33b9ad3
Commit
c33b9ad3
authored
Aug 15, 2018
by
Federico Vaga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drv: put basic gennum DMA ops in header
Signed-off-by:
Federico Vaga
<
federico.vaga@cern.ch
>
parent
1d9a21b3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
18 deletions
+27
-18
fmc-tdc.h
kernel/fmc-tdc.h
+27
-1
ft-core.c
kernel/ft-core.c
+0
-17
No files found.
kernel/fmc-tdc.h
View file @
c33b9ad3
...
...
@@ -283,7 +283,6 @@ signed long fmc_sdb_find_nth_device (struct sdb_array *tree, uint64_t vid,
uint32_t
*
size
);
void
gn4124_dma_read
(
struct
fmctdc_dev
*
ft
,
uint32_t
src
,
void
*
dst
,
int
len
);
void
gn4124_dma_wait_done
(
struct
fmctdc_dev
*
ft
);
/**
...
...
@@ -314,6 +313,33 @@ static inline void ft_disable(struct fmctdc_dev *ft, unsigned int chan)
ft_writel
(
ft
,
ien
,
TDC_REG_INPUT_ENABLE
);
}
/**
* It starts the DMA transfer
* @ft FmcTdc device instance
*/
static
inline
void
gn4124_dma_abort
(
struct
fmctdc_dev
*
ft
)
{
dma_writel
(
ft
,
GENNUM_DMA_CTL_ABORT
,
GENNUM_DMA_CTL
);
}
/**
* It starts the DMA transfer
* @ft FmcTdc device instance
*/
static
inline
void
gn4124_dma_start
(
struct
fmctdc_dev
*
ft
)
{
dma_writel
(
ft
,
GENNUM_DMA_CTL_START
,
GENNUM_DMA_CTL
);
}
/**
* It does an active wait until the DMA transfer is over
* @ft FmcTdc device instance
*/
static
inline
void
gn4124_dma_wait_done
(
struct
fmctdc_dev
*
ft
)
{
while
(
!
(
dma_readl
(
ft
,
GENNUM_DMA_STA
)
&
GENNUM_DMA_STA_DONE
))
;
}
#endif // __KERNEL__
...
...
kernel/ft-core.c
View file @
c33b9ad3
...
...
@@ -252,15 +252,6 @@ static struct ft_modlist init_subsystems[] = {
{
"zio"
,
ft_zio_init
,
ft_zio_exit
}
};
/**
* It does an active wait until the DMA transfer is over
* @ft FmcTdc device instance
*/
void
gn4124_dma_wait_done
(
struct
fmctdc_dev
*
ft
)
{
while
(
!
(
dma_readl
(
ft
,
GENNUM_DMA_STA
)
&
GENNUM_DMA_STA_DONE
))
;
}
/**
* It maps a host buffer and configure the DMA engine
...
...
@@ -285,14 +276,6 @@ dma_addr_t gn4124_dma_map(struct fmctdc_dev *ft, uint32_t devmem, void *hostmem,
return
dma_handle
;
}
/**
* It starts the DMA transfer
* @ft FmcTdc device instance
*/
void
gn4124_dma_start
(
struct
fmctdc_dev
*
ft
)
{
dma_writel
(
ft
,
GENNUM_DMA_CTL_START
,
GENNUM_DMA_CTL
);
}
/**
* It unmap a given DMA buffer
...
...
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