Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
FMC ADC 100M 14b 4cha - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
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 - Software
Commits
e40393eb
Commit
e40393eb
authored
Sep 10, 2019
by
Federico Vaga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sw:drv: memops are per-instance
Signed-off-by:
Federico Vaga
<
federico.vaga@cern.ch
>
parent
f12ffd1e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
13 deletions
+7
-13
fa-core.c
kernel/fa-core.c
+4
-9
fmc-adc-100m14b4cha.h
kernel/fmc-adc-100m14b4cha.h
+3
-4
No files found.
kernel/fa-core.c
View file @
e40393eb
...
...
@@ -22,11 +22,6 @@ module_param_named(enable_test_data_adc, fa_enable_test_data_adc, int, 0444);
#define FA_EEPROM_TYPE "at24c64"
struct
fa_memory_ops
memops
=
{
.
read
=
NULL
,
.
write
=
NULL
,
};
static
const
int
zfad_hw_range
[]
=
{
[
FA100M14B4C_RANGE_10V_CAL
]
=
0x44
,
...
...
@@ -561,13 +556,13 @@ int fa_probe(struct platform_device *pdev)
/* Assign IO operation */
switch
(
pdev
->
id_entry
->
driver_data
)
{
case
ADC_VER_SPEC
:
memops
.
read
=
ioread32
;
memops
.
write
=
iowrite32
;
fa
->
memops
.
read
=
ioread32
;
fa
->
memops
.
write
=
iowrite32
;
fa
->
sg_alloc_table_from_pages
=
__sg_alloc_table_from_pages
;
break
;
case
ADC_VER_SVEC
:
memops
.
read
=
ioread32be
;
memops
.
write
=
iowrite32be
;
fa
->
memops
.
read
=
ioread32be
;
fa
->
memops
.
write
=
iowrite32be
;
fa
->
sg_alloc_table_from_pages
=
sg_alloc_table_from_pages_no_squash
;
break
;
default:
...
...
kernel/fmc-adc-100m14b4cha.h
View file @
e40393eb
...
...
@@ -195,8 +195,6 @@ struct fa_memory_ops {
void
(
*
write
)(
u32
value
,
void
*
addr
);
};
extern
struct
fa_memory_ops
memops
;
/*
* ZFA_CHx_MULT : the trick which requires channel regs id grouped and ordered
* address offset between two registers of the same type on consecutive channel
...
...
@@ -402,6 +400,7 @@ struct fa_dev {
struct
zio_device
*
hwzdev
;
struct
fmc_slot
*
slot
;
struct
fa_memory_ops
memops
;
/* carrier common base offset addresses obtained from SDB */
void
*
fa_adc_csr_base
;
...
...
@@ -522,12 +521,12 @@ static inline struct fa_dev *get_zfadc(struct device *dev)
static
inline
u32
fa_ioread
(
struct
fa_dev
*
fa
,
void
*
addr
)
{
return
memops
.
read
(
addr
);
return
fa
->
memops
.
read
(
addr
);
}
static
inline
void
fa_iowrite
(
struct
fa_dev
*
fa
,
u32
value
,
void
*
addr
)
{
memops
.
write
(
value
,
addr
);
fa
->
memops
.
write
(
value
,
addr
);
}
static
inline
uint32_t
fa_readl
(
struct
fa_dev
*
fa
,
...
...
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