Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
FMC DEL 1ns 4cha
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
2
Issues
2
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 DEL 1ns 4cha
Commits
8bef31c9
Commit
8bef31c9
authored
Sep 25, 2020
by
Federico Vaga
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'release/v3.0.2' into master
parents
ad3211df
a6c733f9
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
79 additions
and
21 deletions
+79
-21
CHANGELOG.rst
CHANGELOG.rst
+11
-0
.gitignore
software/.gitignore
+1
-0
Makefile
software/Makefile
+3
-0
conf.py
software/doc/software/conf.py
+7
-1
fmc-fine-delay-svec-core.c
software/kernel/fmc-fine-delay-svec-core.c
+55
-19
Makefile
software/tools/Makefile
+2
-1
No files found.
CHANGELOG.rst
View file @
8bef31c9
...
...
@@ -6,6 +6,17 @@
Changelog
=========
3.0.2 - 2020-09-25
==================
Added
-----
- bld: cppcheck target for software
Fixed
-----
- sw: SVEC, load device driver instance only if the mezzanine is present.
3.0.1 - 2020-06-04
==================
...
...
software/.gitignore
View file @
8bef31c9
...
...
@@ -11,3 +11,4 @@ Makefile.specific
GTAGS
GPATH
GRTAGS
compile_commands.json
software/Makefile
View file @
8bef31c9
...
...
@@ -28,3 +28,6 @@ modules_install: TARGET = modules_install
$(DIRS)
:
$(MAKE)
-C
$@
$(TARGET)
cppcheck
:
for
d
in
$(DIRS)
;
do
$(MAKE)
-C
$$
d cppcheck
||
exit
1
;
done
software/doc/software/conf.py
View file @
8bef31c9
...
...
@@ -19,7 +19,7 @@
project
=
'Fmc Fine-Delay Software'
copyright
=
'2020, Alessandro Rubini'
author
=
'Alessandro Rubini <rubini@gnudd.com>, Tomasz Wlostowski <Tomasz.Wlostowski@cern.ch>'
author
=
'Alessandro Rubini <rubini@gnudd.com>, Tomasz Wlostowski <Tomasz.Wlostowski@cern.ch>
, Federico Vaga <federico.vaga@cern.ch>
'
# -- General configuration ---------------------------------------------------
...
...
@@ -60,3 +60,9 @@ breathe_projects = {
}
breathe_default_project
=
"fine-delay"
latex_documents
=
[
(
master_doc
,
'fmc-fine-delay.tex'
,
project
,
author
.
replace
(
', '
,
'
\\
and '
)
.
replace
(
' and '
,
'
\\
and and '
),
'manual'
),
]
software/kernel/fmc-fine-delay-svec-core.c
View file @
8bef31c9
...
...
@@ -7,6 +7,7 @@
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/mfd/core.h>
#include <linux/fmc.h>
enum
fd_svec_dev_offsets
{
FD_SVEC_FDT1_MEM_START
=
0x0000E000
,
...
...
@@ -21,7 +22,7 @@ enum svec_fpga_mfd_devs_enum {
FD_SVEC_MFD_FDT2
,
};
static
struct
resource
fd_svec_fdt
1_res
[]
=
{
static
struct
resource
fd_svec_fdt
_res1
[]
=
{
{
.
name
=
"fmc-fdelay-tdc-mem.1"
,
.
flags
=
IORESOURCE_MEM
,
...
...
@@ -34,7 +35,7 @@ static struct resource fd_svec_fdt1_res[] = {
.
end
=
0
,
},
};
static
struct
resource
fd_svec_fdt
2_res
[]
=
{
static
struct
resource
fd_svec_fdt
_res2
[]
=
{
{
.
name
=
"fmc-fdelay-tdc-mem.2"
,
.
flags
=
IORESOURCE_MEM
,
...
...
@@ -48,28 +49,39 @@ static struct resource fd_svec_fdt2_res[] = {
},
};
static
const
struct
mfd_cell
fd_svec_mfd_devs
[]
=
{
[
FD_SVEC_MFD_FDT1
]
=
{
.
name
=
"fmc-fdelay-tdc"
,
.
platform_data
=
NULL
,
.
pdata_size
=
0
,
.
num_resources
=
ARRAY_SIZE
(
fd_svec_fdt1_res
),
.
resources
=
fd_svec_fdt1_res
,
},
[
FD_SVEC_MFD_FDT2
]
=
{
.
name
=
"fmc-fdelay-tdc"
,
.
platform_data
=
NULL
,
.
pdata_size
=
0
,
.
num_resources
=
ARRAY_SIZE
(
fd_svec_fdt2_res
),
.
resources
=
fd_svec_fdt2_res
,
},
#define MFD_DEL(_n) \
{ \
.name = "fmc-fdelay-tdc", \
.platform_data = NULL, \
.pdata_size = 0, \
.num_resources = ARRAY_SIZE(fd_svec_fdt_res##_n), \
.resources = fd_svec_fdt_res##_n, \
}
static
const
struct
mfd_cell
fd_svec_mfd_devs1
[]
=
{
MFD_DEL
(
1
),
};
static
const
struct
mfd_cell
fd_svec_mfd_devs2
[]
=
{
MFD_DEL
(
2
),
};
static
const
struct
mfd_cell
fd_svec_mfd_devs3
[]
=
{
MFD_DEL
(
1
),
MFD_DEL
(
2
),
};
static
const
struct
mfd_cell
*
fd_svec_mfd_devs
[]
=
{
fd_svec_mfd_devs1
,
fd_svec_mfd_devs2
,
fd_svec_mfd_devs3
,
};
static
int
fd_svec_probe
(
struct
platform_device
*
pdev
)
{
struct
resource
*
rmem
;
int
idev
=
0
;
int
ndev
;
int
irq
;
int
i
;
rmem
=
platform_get_resource
(
pdev
,
IORESOURCE_MEM
,
0
);
if
(
!
rmem
)
{
...
...
@@ -83,15 +95,39 @@ static int fd_svec_probe(struct platform_device *pdev)
return
-
EINVAL
;
}
for
(
i
=
1
;
i
<=
2
;
++
i
)
{
struct
fmc_slot
*
slot
=
fmc_slot_get
(
pdev
->
dev
.
parent
,
i
);
int
present
;
if
(
IS_ERR
(
slot
))
{
dev_err
(
&
pdev
->
dev
,
"Can't find FMC slot %d err: %ld
\n
"
,
i
,
PTR_ERR
(
slot
));
return
PTR_ERR
(
slot
);
}
present
=
fmc_slot_present
(
slot
);
fmc_slot_put
(
slot
);
dev_dbg
(
&
pdev
->
dev
,
"FMC slot: %d, present: %d
\n
"
,
i
,
present
);
if
(
present
)
idev
|=
BIT
(
i
-
1
);
}
if
(
idev
==
0
)
return
-
ENODEV
;
idev
--
;
/*
* We know that this design uses the HTVIC IRQ controller.
* This IRQ controller has a linear mapping, so it is enough
* to give the first one as input
*/
ndev
=
1
+
!!
(
idev
&
0x2
);
dev_dbg
(
&
pdev
->
dev
,
"Found %d, point to mfd_cell %d
\n
"
,
ndev
,
idev
);
return
mfd_add_devices
(
&
pdev
->
dev
,
PLATFORM_DEVID_AUTO
,
fd_svec_mfd_devs
,
ARRAY_SIZE
(
fd_svec_mfd_devs
),
fd_svec_mfd_devs
[
idev
],
ndev
,
rmem
,
irq
,
NULL
);
}
...
...
software/tools/Makefile
View file @
8bef31c9
...
...
@@ -6,7 +6,8 @@
-include
Makefile.specific
# include parent_common.mk for buildsystem's defines
REPO_PARENT
=
../..
IGNORE_CPU_SUFFIX
:=
y
REPO_PARENT
?=
-include
$(REPO_PARENT)/parent_common.mk
DESTDIR
?=
/usr/local
...
...
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