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
b7e1bd6b
Commit
b7e1bd6b
authored
Apr 28, 2014
by
Federico Vaga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel: allow to choose SPEV or SVEC support
Signed-off-by:
Federico Vaga
<
federico.vaga@cern.ch
>
parent
1a542d73
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
19 deletions
+34
-19
Makefile
kernel/Makefile
+19
-15
fa-core.c
kernel/fa-core.c
+15
-4
No files found.
kernel/Makefile
View file @
b7e1bd6b
...
...
@@ -4,6 +4,7 @@ ZIO ?= $(M)/../zio
FMC_BUS
?=
$(M)
/../fmc-bus
SPEC_SW
?=
$(M)
/../spec-sw
SVEC_SW
?=
$(M)
/../svec-sw
CONFIG_FMC_ADC_SVEC
?=
CONFIG_VME
KBUILD_EXTRA_SYMBOLS
:=
\
$(ZIO)
/Module.symvers
\
...
...
@@ -19,25 +20,28 @@ ccflags-y = -DGIT_VERSION=\"$(GIT_VERSION)\" \
-I
$M
ccflags-$(CONFIG_FMC_ADC_DEBUG)
+=
-DDEBUG
ccflags-$(CONFIG_FMC_ADC_SVEC)
+=
-DCONFIG_FMC_ADC_SVEC
subdirs-ccflags-y
=
$
(
ccflags-y
)
obj-m
:=
fmc-adc-100m14b.o
fmc-adc-100m14b-objs
=
fa-core.o
fmc-adc-100m14b-objs
+=
fa-spec-core.o
fmc-adc-100m14b-objs
+=
fa-svec-core.o
fmc-adc-100m14b-objs
+=
fa-zio-drv.o
fmc-adc-100m14b-objs
+=
fa-calibration.o
fmc-adc-100m14b-objs
+=
fa-regtable.o
fmc-adc-100m14b-objs
+=
fa-spec-regtable.o
fmc-adc-100m14b-objs
+=
fa-svec-regtable.o
fmc-adc-100m14b-objs
+=
fa-zio-trg.o
fmc-adc-100m14b-objs
+=
fa-spec-dma.o
fmc-adc-100m14b-objs
+=
fa-svec-dma.o
fmc-adc-100m14b-objs
+=
fa-irq.o fa-spec-irq.o
fmc-adc-100m14b-objs
+=
onewire.o
fmc-adc-100m14b-objs
+=
spi.o
fmc-adc-100m14b-objs
+=
fmc-util.o
fmc-adc-100m14b-y
=
fa-core.o
fmc-adc-100m14b-y
+=
fa-zio-drv.o
fmc-adc-100m14b-y
+=
fa-calibration.o
fmc-adc-100m14b-y
+=
fa-regtable.o
fmc-adc-100m14b-y
+=
fa-zio-trg.o
fmc-adc-100m14b-y
+=
fa-irq.o
fmc-adc-100m14b-y
+=
onewire.o
fmc-adc-100m14b-y
+=
spi.o
fmc-adc-100m14b-y
+=
fmc-util.o
fmc-adc-100m14b-y
+=
fa-spec-core.o
fmc-adc-100m14b-y
+=
fa-spec-regtable.o
fmc-adc-100m14b-y
+=
fa-spec-dma.o
fmc-adc-100m14b-y
+=
fa-spec-irq.o
fmc-adc-100m14b-$(CONFIG_FMC_ADC_SVEC)
+=
fa-svec-core.o
fmc-adc-100m14b-$(CONFIG_FMC_ADC_SVEC)
+=
fa-svec-regtable.o
fmc-adc-100m14b-$(CONFIG_FMC_ADC_SVEC)
+=
fa-svec-dma.o
all modules
:
$(MAKE)
-C
$(LINUX)
M
=
$(
shell
/bin/pwd
)
modules
...
...
kernel/fa-core.c
View file @
b7e1bd6b
...
...
@@ -411,12 +411,23 @@ int fa_probe(struct fmc_device *fmc)
fa
->
fmc
=
fmc
;
/* apply carrier-specific hacks and workarounds */
if
(
!
strcmp
(
fmc
->
carrier_name
,
"SPEC"
))
fa
->
carrier_op
=
NULL
;
if
(
!
strcmp
(
fmc
->
carrier_name
,
"SPEC"
))
{
fa
->
carrier_op
=
&
fa_spec_op
;
else
if
(
!
strcmp
(
fmc
->
carrier_name
,
"SVEC"
))
}
else
if
(
!
strcmp
(
fmc
->
carrier_name
,
"SVEC"
))
{
#ifdef CONFIG_FMC_ADC_SVEC
fa
->
carrier_op
=
&
fa_svec_op
;
else
{
dev_err
(
fmc
->
hwdev
,
"unsupported carrier
\n
"
);
#endif
}
/*
* Check if carrier operations exists. Otherwise it means that the
* driver was compiled without enable any carrier, so it cannot work
*/
if
(
!
fa
->
carrier_op
)
{
dev_err
(
fmc
->
hwdev
,
"This binary doesn't support the '%s' carrier
\n
"
,
fmc
->
carrier_name
);
return
-
ENODEV
;
}
...
...
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