Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
Simple VME FMC Carrier SVEC - 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
Simple VME FMC Carrier SVEC - Software
Commits
8579e8f9
Commit
8579e8f9
authored
May 15, 2013
by
Alessandro Rubini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
trivial: svec-drv.c: whitespace/checkpatch cleanup
Signed-off-by:
Alessandro Rubini
<
rubini@gnudd.com
>
parent
ba112abe
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
15 deletions
+15
-15
svec-drv.c
kernel/svec-drv.c
+15
-15
No files found.
kernel/svec-drv.c
View file @
8579e8f9
...
...
@@ -138,7 +138,7 @@ int svec_bootloader_unlock(struct svec_dev *svec)
SVEC_BASE_LOADER
+
XLDR_REG_BTRIGR
;
/* Magic sequence: unlock bootloader mode, disable application FPGA */
for
(
i
=
0
;
i
<
8
;
i
++
)
for
(
i
=
0
;
i
<
8
;
i
++
)
iowrite32
(
cpu_to_be32
(
boot_seq
[
i
]),
addr
);
dev_info
(
dev
,
"Wrote unlock sequence at %lx
\n
"
,
(
unsigned
long
)
addr
);
...
...
@@ -229,7 +229,7 @@ int svec_load_fpga(struct svec_dev *svec, const void *blob, int size)
u64
timeout
;
/* Check if we have something to do... */
if
((
data
==
NULL
)
||
(
size
==
0
)){
if
((
data
==
NULL
)
||
(
size
==
0
))
{
dev_err
(
dev
,
"%s: data to be load is NULL
\n
"
,
__func__
);
return
-
EINVAL
;
}
...
...
@@ -254,10 +254,10 @@ int svec_load_fpga(struct svec_dev *svec, const void *blob, int size)
loader_addr
+
XLDR_REG_CSR
);
i
=
0
;
while
(
i
<
size
)
{
while
(
i
<
size
)
{
rval
=
be32_to_cpu
(
ioread32
(
loader_addr
+
XLDR_REG_FIFO_CSR
));
if
(
!
(
rval
&
XLDR_FIFO_CSR_FULL
))
{
n
=
(
size
-
i
>
4
?
4
:
size
-
i
);
n
=
(
size
-
i
>
4
?
4
:
size
-
i
);
xldr_fifo_r0
=
(
n
-
1
)
|
((
n
<
4
)
?
XLDR_FIFO_R0_XLAST
:
0
);
xldr_fifo_r1
=
htonl
(
data
[
i
>>
2
]);
...
...
@@ -266,7 +266,7 @@ int svec_load_fpga(struct svec_dev *svec, const void *blob, int size)
loader_addr
+
XLDR_REG_FIFO_R0
);
iowrite32
(
cpu_to_be32
(
xldr_fifo_r1
),
loader_addr
+
XLDR_REG_FIFO_R1
);
i
+=
n
;
i
+=
n
;
}
}
...
...
@@ -274,7 +274,7 @@ int svec_load_fpga(struct svec_dev *svec, const void *blob, int size)
timeout
=
get_jiffies_64
()
+
2
*
HZ
;
while
(
time_before64
(
get_jiffies_64
(),
timeout
))
{
rval
=
be32_to_cpu
(
ioread32
(
loader_addr
+
XLDR_REG_CSR
));
if
(
rval
&
XLDR_CSR_DONE
)
if
(
rval
&
XLDR_CSR_DONE
)
break
;
msleep
(
1
);
}
...
...
@@ -346,14 +346,14 @@ int svec_is_present(struct svec_dev *svec)
uint32_t
idc
;
void
*
addr
;
/* Check for bootloader */
/* Check for bootloader */
if
(
svec_is_bootloader_active
(
svec
))
{
return
1
;
}
/* Ok, maybe there is a svec, but bootloader is not active.
In such case, a CR/CSR with a valid manufacturer ID should exist*/
addr
=
svec
->
map
[
MAP_CR_CSR
]
->
kernel_va
+
VME_VENDOR_ID_OFFSET
;
idc
=
be32_to_cpu
(
ioread32
(
addr
))
<<
16
;
...
...
@@ -381,7 +381,7 @@ static int __devinit svec_probe(struct device *pdev, unsigned int ndev)
if
(
lun
[
ndev
]
>=
SVEC_MAX_DEVICES
)
{
dev_err
(
pdev
,
"Card lun %d out of range [0..%d]
\n
"
,
lun
[
ndev
],
SVEC_MAX_DEVICES
-
1
);
lun
[
ndev
],
SVEC_MAX_DEVICES
-
1
);
return
-
EINVAL
;
}
...
...
@@ -411,11 +411,10 @@ static int __devinit svec_probe(struct device *pdev, unsigned int ndev)
/* Map CR/CSR space */
error
=
svec_map_window
(
svec
,
MAP_CR_CSR
);
if
(
error
)
if
(
error
)
goto
failed
;
if
(
!
svec_is_present
(
svec
))
{
if
(
!
svec_is_present
(
svec
))
{
error
=
-
EINVAL
;
goto
failed_unmap_crcsr
;
}
...
...
@@ -487,9 +486,10 @@ static int __init svec_init(void)
/* Check that all insmod argument vectors are the same length */
if
(
lun_num
!=
slot_num
||
lun_num
!=
vmebase_num
||
lun_num
!=
vector_num
)
{
pr_err
(
"%s: The number of parameters doesn't match
\n
"
,
__func__
);
return
-
EINVAL
;
lun_num
!=
vector_num
)
{
pr_err
(
"%s: The number of parameters doesn't match
\n
"
,
__func__
);
return
-
EINVAL
;
}
error
=
vme_register_driver
(
&
svec_driver
,
lun_num
);
...
...
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