Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
FMC ADC 100M 14b 4cha
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 ADC 100M 14b 4cha
Commits
2851d975
Commit
2851d975
authored
Nov 24, 2020
by
Federico Vaga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sw:drv: hide how we retrieve the vme_device
Signed-off-by:
Federico Vaga
<
federico.vaga@cern.ch
>
parent
3f09211e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
fa-dma.c
software/kernel/fa-dma.c
+8
-4
No files found.
software/kernel/fa-dma.c
View file @
2851d975
...
...
@@ -217,13 +217,18 @@ static unsigned int zfad_block_n_pages(struct zio_block *block)
#define ADC_VME_DDR_ADDR 0x00
#define ADC_VME_DDR_DATA 0x04
#define SVEC_FUNC_NR 1
/* HARD coded in SVEC */
static
inline
struct
vme_dev
*
fa_to_vme_dev
(
struct
fa_dev
*
fa
)
{
return
to_vme_dev
(
fa
->
pdev
->
dev
.
parent
->
parent
->
parent
->
parent
);
}
static
unsigned
long
fa_ddr_data_vme_addr
(
struct
fa_dev
*
fa
)
{
struct
fmc_adc_platform_data
*
data
=
fa
->
pdev
->
dev
.
platform_data
;
struct
vme_dev
*
vdev
;
struct
vme_dev
*
vdev
=
fa_to_vme_dev
(
fa
)
;
unsigned
long
addr
;
vdev
=
to_vme_dev
(
fa
->
pdev
->
dev
.
parent
->
parent
->
parent
->
parent
);
if
(
WARN
(
vdev
->
map
[
SVEC_FUNC_NR
].
kernel_va
==
NULL
,
"Invalid VME function
\n
"
))
return
~
0
;
/* invalid address, we will see VME errors */
...
...
@@ -238,10 +243,9 @@ static unsigned long fa_ddr_data_vme_addr(struct fa_dev *fa)
static
void
*
fa_ddr_addr_reg_off
(
struct
fa_dev
*
fa
)
{
struct
fmc_adc_platform_data
*
data
=
fa
->
pdev
->
dev
.
platform_data
;
struct
vme_dev
*
vdev
;
struct
vme_dev
*
vdev
=
fa_to_vme_dev
(
fa
)
;
void
*
addr
;
vdev
=
to_vme_dev
(
fa
->
pdev
->
dev
.
parent
->
parent
->
parent
->
parent
);
if
(
WARN
(
vdev
->
map
[
SVEC_FUNC_NR
].
kernel_va
==
NULL
,
"Invalid VME function
\n
"
))
return
NULL
;
/* invalid address, we will see VME errors */
...
...
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