Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
FMC TDC 1ns 5cha - Software
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 TDC 1ns 5cha - Software
Commits
bd1e41c4
Commit
bd1e41c4
authored
Aug 27, 2012
by
Miguel Gómez Sexto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tdc: Added device attributes time threshold and timestamps threshold
Signed-off-by:
Miguel Gómez
<
magomez@igalia.com
>
parent
97475890
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
1 deletion
+19
-1
tdc-zio.c
tdc-zio.c
+9
-1
tdc.h
tdc.h
+10
-0
No files found.
tdc-zio.c
View file @
bd1e41c4
...
...
@@ -22,12 +22,19 @@
#include "tdc.h"
#include "hw/tdc_regs.h"
#define _RW_ (S_IRUGO | S_IWUGO)
/* I want 80-col lines so this lazy thing */
/* The sample size. Mandatory, device-wide */
DEFINE_ZATTR_STD
(
ZDEV
,
tdc_zattr_dev_std
)
=
{
ZATTR_REG
(
zdev
,
ZATTR_NBITS
,
S_IRUGO
,
0
,
32
),
/* FIXME: 32 bits. Really? */
};
static
struct
zio_attribute
tdc_zattr_dev
[]
=
{
ZATTR_EXT_REG
(
"version"
,
S_IRUGO
,
TDC_ATTR_DEV_VERSION
,
TDC_VERSION
),
ZATTR_EXT_REG
(
"tstamps-thresh"
,
_RW_
,
TDC_ATTR_DEV_TSTAMPS_THRESH
,
100
),
ZATTR_EXT_REG
(
"time-thresh"
,
_RW_
,
TDC_ATTR_DEV_TIME_THRESH
,
100
),
};
static
struct
zio_cset
tdc_cset
[]
=
{
{
SET_OBJECT_NAME
(
"tdc-test"
),
/* TODO: change name and complete */
...
...
@@ -55,7 +62,8 @@ static struct zio_device tdc_tmpl = {
.
n_cset
=
ARRAY_SIZE
(
tdc_cset
),
.
zattr_set
=
{
.
std_zattr
=
tdc_zattr_dev_std
,
.
ext_zattr
=
NULL
,
/* TODO: */
.
ext_zattr
=
tdc_zattr_dev
,
.
n_ext_attr
=
ARRAY_SIZE
(
tdc_zattr_dev
),
},
};
...
...
tdc.h
View file @
bd1e41c4
#ifndef __FMC_TDC_H__
#define __FMC_TDC_H__
#define TDC_VERSION 1
struct
spec_tdc
{
struct
spec_dev
*
spec
;
struct
zio_device
*
zdev
,
*
hwzdev
;
...
...
@@ -9,6 +11,14 @@ struct spec_tdc {
unsigned
char
__iomem
*
gn412x_regs
;
};
/* Device-wide ZIO attributes */
enum
tdc_zattr_dev_idx
{
TDC_ATTR_DEV_VERSION
=
0
,
TDC_ATTR_DEV_TSTAMPS_THRESH
,
TDC_ATTR_DEV_TIME_THRESH
,
TDC_ATTR_DEV__LAST
,
};
extern
int
tdc_zio_register_device
(
struct
spec_tdc
*
tdc
);
extern
void
tdc_zio_remove
(
struct
spec_tdc
*
tdc
);
extern
int
tdc_zio_init
(
void
);
...
...
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