Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
Simple VME FMC Carrier SVEC
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
14
Issues
14
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
Simple VME FMC Carrier SVEC
Commits
a36726d1
Commit
a36726d1
authored
Oct 17, 2019
by
Federico Vaga
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'release/v1.4.2'
parents
9837af6b
658e63ef
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
46 additions
and
26 deletions
+46
-26
CHANGELOG.rst
CHANGELOG.rst
+6
-0
svec-core-fpga.c
software/kernel/svec-core-fpga.c
+15
-11
svec-core.c
software/kernel/svec-core.c
+24
-15
svec.h
software/kernel/svec.h
+1
-0
No files found.
CHANGELOG.rst
View file @
a36726d1
...
...
@@ -2,6 +2,12 @@
Change Log
==========
[1.4.2] 2019-10-17
==================
Changed
-----
- [sw] show application metadata in debugfs
[1.4.1] 2019-10-15
==================
Fixed
...
...
software/kernel/svec-core-fpga.c
View file @
a36726d1
...
...
@@ -42,6 +42,16 @@ enum svec_fpga_meta_cap_mask {
SVEC_META_CAP_BLD
=
BIT
(
4
),
};
static
void
svec_fpga_metadata_get
(
struct
svec_meta_id
*
meta
,
void
__iomem
*
fpga
)
{
uint32_t
*
meta_tmp
=
(
uint32_t
*
)
meta
;
int
i
;
for
(
i
=
0
;
i
<
sizeof
(
*
meta
)
/
4
;
++
i
)
meta_tmp
[
i
]
=
ioread32be
(
fpga
+
(
i
*
4
));
}
static
const
struct
debugfs_reg32
svec_fpga_debugfs_reg32
[]
=
{
{
.
name
=
"Application offset"
,
...
...
@@ -649,6 +659,9 @@ static int svec_fpga_app_init(struct svec_fpga *svec_fpga)
return
0
;
}
svec_fpga_metadata_get
(
&
svec_fpga
->
meta_app
,
svec_fpga
->
fpga
+
app_offset
);
res
[
0
].
start
=
vme_resource_start
(
vdev
,
fn
)
+
app_offset
;
res
[
0
].
end
=
vme_resource_end
(
vdev
,
fn
);
...
...
@@ -697,16 +710,6 @@ static void svec_fpga_app_exit(struct svec_fpga *svec_fpga)
}
}
static
void
svec_fpga_metadata_get
(
struct
svec_meta_id
*
meta
,
void
__iomem
*
fpga
)
{
uint32_t
*
meta_tmp
=
(
uint32_t
*
)
meta
;
int
i
;
for
(
i
=
0
;
i
<
sizeof
(
*
meta
)
/
4
;
++
i
)
meta_tmp
[
i
]
=
ioread32be
(
fpga
+
SVEC_META_BASE
+
(
i
*
4
));
}
static
bool
svec_fpga_is_valid
(
struct
svec_dev
*
svec_dev
,
struct
svec_meta_id
*
meta
)
{
...
...
@@ -781,7 +784,8 @@ int svec_fpga_init(struct svec_dev *svec_dev, unsigned int function_nr)
goto
err_map
;
}
svec_fpga_metadata_get
(
&
svec_dev
->
meta
,
svec_fpga
->
fpga
);
svec_fpga_metadata_get
(
&
svec_dev
->
meta
,
svec_fpga
->
fpga
+
SVEC_META_BASE
);
if
(
!
svec_fpga_is_valid
(
svec_dev
,
&
svec_dev
->
meta
))
{
err
=
-
EINVAL
;
goto
err_valid
;
...
...
software/kernel/svec-core.c
View file @
a36726d1
...
...
@@ -108,31 +108,40 @@ static const struct file_operations svec_dbg_fw_ops = {
.
write
=
svec_dbg_fw_write
,
};
static
int
svec_dbg_meta
(
struct
seq_file
*
s
,
void
*
offset
)
static
void
seq_printf_meta
(
struct
seq_file
*
s
,
const
char
*
indent
,
struct
svec_meta_id
*
meta
)
{
struct
svec_dev
*
svec_dev
=
s
->
private
;
struct
svec_meta_id
*
meta
;
meta
=
&
svec_dev
->
meta
;
seq_printf
(
s
,
"'%s':
\n
"
,
dev_name
(
&
svec_dev
->
vdev
->
dev
));
seq_puts
(
s
,
"Metadata:
\n
"
);
seq_printf
(
s
,
" - Vendor: 0x%08x
\n
"
,
meta
->
vendor
);
seq_printf
(
s
,
" - Device: 0x%08x
\n
"
,
meta
->
device
);
seq_printf
(
s
,
" - Version: 0x%08x
\n
"
,
meta
->
version
);
seq_printf
(
s
,
" - BOM: 0x%08x
\n
"
,
meta
->
bom
);
seq_printf
(
s
,
" - SourceID: 0x%08x%08x%08x%08x
\n
"
,
seq_printf
(
s
,
"%sMetadata:
\n
"
,
indent
);
seq_printf
(
s
,
"%s - Vendor: 0x%08x
\n
"
,
indent
,
meta
->
vendor
);
seq_printf
(
s
,
"%s - Device: 0x%08x
\n
"
,
indent
,
meta
->
device
);
seq_printf
(
s
,
"%s - Version: 0x%08x
\n
"
,
indent
,
meta
->
version
);
seq_printf
(
s
,
"%s - BOM: 0x%08x
\n
"
,
indent
,
meta
->
bom
);
seq_printf
(
s
,
"%s - SourceID: 0x%08x%08x%08x%08x
\n
"
,
indent
,
meta
->
src
[
0
],
meta
->
src
[
1
],
meta
->
src
[
2
],
meta
->
src
[
3
]);
seq_printf
(
s
,
" - CapabilityMask: 0x%08x
\n
"
,
meta
->
cap
);
seq_printf
(
s
,
" - VendorUUID: 0x%08x%08x%08x%08x
\n
"
,
seq_printf
(
s
,
"%s - CapabilityMask: 0x%08x
\n
"
,
indent
,
meta
->
cap
);
seq_printf
(
s
,
"%s - VendorUUID: 0x%08x%08x%08x%08x
\n
"
,
indent
,
meta
->
uuid
[
0
],
meta
->
uuid
[
1
],
meta
->
uuid
[
2
],
meta
->
uuid
[
3
]);
}
static
int
svec_dbg_meta
(
struct
seq_file
*
s
,
void
*
offset
)
{
struct
svec_dev
*
svec_dev
=
s
->
private
;
seq_printf_meta
(
s
,
""
,
&
svec_dev
->
meta
);
if
(
!
svec_dev
->
svec_fpga
||
!
svec_dev
->
svec_fpga
->
app_pdev
)
goto
out
;
seq_puts
(
s
,
"Application:
\n
"
);
seq_printf_meta
(
s
,
" "
,
&
svec_dev
->
svec_fpga
->
meta_app
);
out:
return
0
;
}
...
...
software/kernel/svec.h
View file @
a36726d1
...
...
@@ -86,6 +86,7 @@ struct svec_meta_id {
struct
svec_fpga
{
struct
device
dev
;
struct
svec_meta_id
meta_app
;
unsigned
int
function_nr
;
void
__iomem
*
fpga
;
struct
platform_device
*
vic_pdev
;
...
...
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