Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
FMC DEL 1ns 4cha - 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 DEL 1ns 4cha - Software
Commits
2dc0026b
Commit
2dc0026b
authored
Jun 22, 2012
by
Alessandro Rubini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
general: fixed diagnostics, less verbose
parent
0a6b3b6f
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
15 additions
and
26 deletions
+15
-26
Makefile
Makefile
+1
-1
fd-core.c
fd-core.c
+0
-3
fd-spec.c
fd-spec.c
+0
-1
fd-zio.c
fd-zio.c
+8
-11
gpio.c
gpio.c
+1
-2
onewire.c
onewire.c
+5
-4
pll.c
pll.c
+0
-4
No files found.
Makefile
View file @
2dc0026b
...
...
@@ -7,7 +7,7 @@ KBUILD_EXTRA_SYMBOLS := $(ZIO)/Module.symvers $(SPEC_SW)/kernel/Module.symvers
ccflags-y
=
-I
$(ZIO)
/include
-I
$(SPEC_SW)
/kernel
-I
$M
ccflags-y
+=
-DDEBUG
# temporary
#ccflags-y += -DDEBUG
subdirs-ccflags-y
=
$
(
ccflags-y
)
...
...
fd-core.c
View file @
2dc0026b
...
...
@@ -135,7 +135,6 @@ int fd_probe(struct spec_dev *dev)
struct
spec_fd
*
fd
;
int
i
,
ret
;
pr_debug
(
"%s
\n
"
,
__func__
);
fd
=
kzalloc
(
sizeof
(
*
fd
),
GFP_KERNEL
);
if
(
!
fd
)
{
pr_err
(
"%s: can't allocate device
\n
"
,
__func__
);
...
...
@@ -212,7 +211,6 @@ void fd_remove(struct spec_dev *dev)
if
(
!
test_bit
(
FD_FLAG_INITED
,
&
fd
->
flags
))
return
;
/* No init, no exit */
pr_debug
(
"%s
\n
"
,
__func__
);
while
(
--
i
>=
0
)
{
m
=
mods
+
i
;
if
(
m
->
exit
)
...
...
@@ -224,7 +222,6 @@ static int fd_init(void)
{
int
ret
;
pr_debug
(
"%s
\n
"
,
__func__
);
ret
=
fd_zio_register
();
if
(
ret
<
0
)
return
ret
;
...
...
fd-spec.c
View file @
2dc0026b
...
...
@@ -24,7 +24,6 @@
static
int
fd_is_valid
(
int
bus
,
int
devfn
)
{
/* FIXME: restrict to some of the spec devices with moduleparam */
pr_debug
(
"%s: %x %x
\n
"
,
__func__
,
bus
,
devfn
);
return
1
;
}
...
...
fd-zio.c
View file @
2dc0026b
...
...
@@ -524,7 +524,7 @@ out:
if
(
test_and_clear_bit
(
FD_FLAG_DO_OUTPUT
+
i
,
&
fd
->
flags
))
{
struct
zio_cset
*
cset
=
fd
->
zdev
->
cset
+
i
;
cset
->
ti
->
t_op
->
data_done
(
cset
);
pr
intk
(
"called data_done
\n
"
);
pr
_debug
(
"called data_done
\n
"
);
}
mod_timer
(
&
fd
->
fifo_timer
,
jiffies
+
fd_timer_period_jiffies
);
...
...
@@ -607,16 +607,13 @@ static int fd_zio_output(struct zio_cset *cset)
fd
=
cset
->
zdev
->
private_data
;
ctrl
=
zio_get_ctrl
(
cset
->
chan
->
active_block
);
for
(
i
=
0
;
i
<
4
;
i
++
)
printk
(
"triggered %i: %x (%i)
\n
"
,
i
,
fd_ch_readl
(
fd
,
i
,
FD_REG_DCR
),
fd_ch_readl
(
fd
,
i
,
FD_REG_DCR
)
&
FD_DCR_PG_TRIG
?
1
:
0
);
pr_info
(
"%s: attrs: "
,
__func__
);
for
(
i
=
FD_ATTR_DEV__LAST
;
i
<
FD_ATTR_OUT__LAST
;
i
++
)
printk
(
"%08x%c"
,
ctrl
->
attr_channel
.
ext_val
[
i
],
i
==
FD_ATTR_OUT__LAST
-
1
?
'\n'
:
' '
);
if
(
fd
->
verbose
>
1
)
{
for
(
i
=
0
;
i
<
4
;
i
++
)
pr_info
(
"%s: attrs: "
,
__func__
);
for
(
i
=
FD_ATTR_DEV__LAST
;
i
<
FD_ATTR_OUT__LAST
;
i
++
)
printk
(
"%08x%c"
,
ctrl
->
attr_channel
.
ext_val
[
i
],
i
==
FD_ATTR_OUT__LAST
-
1
?
'\n'
:
' '
);
}
__fd_zio_output
(
fd
,
cset
->
index
,
ctrl
->
attr_channel
.
ext_val
);
/*
* There's a buglet in this version of zio: we can't
...
...
gpio.c
View file @
2dc0026b
...
...
@@ -53,7 +53,7 @@ static int gpio_writel_with_retry(struct spec_fd *fd, int val, int reg)
if
(
rv
>=
0
&&
(
rv
==
val
))
{
if
(
SPI_RETRIES
-
1
-
retries
>
0
)
pr
intk
(
"%s: succeded after %d retries
\n
"
,
pr
_info
(
"%s: succeded after %d retries
\n
"
,
__func__
,
SPI_RETRIES
-
1
-
retries
);
return
0
;
}
...
...
@@ -96,7 +96,6 @@ int fd_gpio_init(struct spec_fd *fd)
fd
->
mcp_iodir
=
0xffff
;
fd
->
mcp_olat
=
0
;
pr_debug
(
"%s
\n
"
,
__func__
);
if
(
gpio_writel
(
fd
,
0x00
,
FD_MCP_IOCON
)
<
0
)
goto
out
;
...
...
onewire.c
View file @
2dc0026b
...
...
@@ -233,10 +233,11 @@ int fd_onewire_init(struct spec_fd *fd)
if
(
ds18x_read_serial
(
fd
)
<
0
)
return
-
EIO
;
pr_info
(
"%s: Found DS18xx sensor: "
,
__func__
);
for
(
i
=
0
;
i
<
8
;
i
++
)
printk
(
"%02x%c"
,
fd
->
ds18_id
[
i
],
i
==
7
?
'\n'
:
':'
);
if
(
fd
->
verbose
)
{
pr_info
(
"%s: Found DS18xx sensor: "
,
__func__
);
for
(
i
=
0
;
i
<
8
;
i
++
)
printk
(
"%02x%c"
,
fd
->
ds18_id
[
i
],
i
==
7
?
'\n'
:
':'
);
}
/* read the temperature once, to ensure it works, and print it */
fd_read_temp
(
fd
,
2
);
...
...
pll.c
View file @
2dc0026b
...
...
@@ -40,7 +40,6 @@ int fd_pll_init(struct spec_fd *fd)
unsigned
long
j
;
const
struct
ad9516_reg
*
r
;
pr_debug
(
"%s
\n
"
,
__func__
);
if
(
pll_writel
(
fd
,
0x99
,
0x000
)
<
0
)
goto
out
;
if
(
pll_writel
(
fd
,
0x01
,
0x232
)
<
0
)
...
...
@@ -93,11 +92,8 @@ int fd_pll_init(struct spec_fd *fd)
if
(
pll_writel
(
fd
,
0x01
,
0x232
)
<
0
)
goto
out
;
pr_debug
(
"success!
\n
"
);
return
0
;
out:
pr_err
(
"%s: Error in SPI communication
\n
"
,
KBUILD_MODNAME
);
return
-
EIO
;
...
...
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