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
84722c3c
Commit
84722c3c
authored
Nov 26, 2012
by
Juan David González Cobas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor fixes
parent
85b026fd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
18 deletions
+20
-18
Makefile
kernel/Makefile
+1
-0
svec-sysfs.c
kernel/svec-sysfs.c
+1
-0
svec_drv.c
kernel/svec_drv.c
+18
-18
No files found.
kernel/Makefile
View file @
84722c3c
CPU
:=
L865
# KVER := 2.6.24.7-rt27
KVER
:=
3.2.33-rt50
KERN_DIR
:=
"/acc/sys/
$(CPU)
/usr/src/kernels/
$(KVER)
"
VME_DIR
:=
"../../repo/vmebridge/driver"
...
...
kernel/svec-sysfs.c
View file @
84722c3c
...
...
@@ -70,6 +70,7 @@ static ssize_t svec_store_firmware_name(struct device *pdev,
struct
svec_dev
*
card
=
dev_get_drvdata
(
pdev
);
pr_debug
(
"storing firmware name [%s] length %d
\n
"
,
buf
,
count
);
error
=
svec_load_fpga_file
(
card
,
buf
);
if
(
!
error
)
...
...
kernel/svec_drv.c
View file @
84722c3c
...
...
@@ -40,9 +40,9 @@ static int lun[SVEC_MAX_DEVICES] = SVEC_DEFAULT_IDX;
static
unsigned
int
lun_num
;
module_param_array
(
vmebase1
,
long
,
&
vmebase1_num
,
S_IRUGO
);
module_param_array
(
vmebase1
,
u
long
,
&
vmebase1_num
,
S_IRUGO
);
MODULE_PARM_DESC
(
vmebase1
,
"VME Base Adress #1 of the SVEC card"
);
module_param_array
(
vmebase2
,
long
,
&
vmebase2_num
,
S_IRUGO
);
module_param_array
(
vmebase2
,
u
long
,
&
vmebase2_num
,
S_IRUGO
);
MODULE_PARM_DESC
(
vmebase2
,
"VME Base Adress #2 of the SVEC card"
);
module_param_array_named
(
fw_name
,
fw_name
,
charp
,
&
fw_name_num
,
S_IRUGO
);
MODULE_PARM_DESC
(
fw_name
,
"firmware file"
);
...
...
@@ -178,7 +178,7 @@ int svec_bootloader_is_active(struct svec_dev *svec)
}
else
printk
(
KERN_INFO
PFX
"IDCode value %x.
\n
"
,
idc
);
/* Bootloader not active. Locked */
return
0
;
}
...
...
@@ -423,15 +423,6 @@ static int __devinit svec_probe(struct device *pdev, unsigned int ndev)
if
(
error
)
goto
failed
;
/* Load the golden FPGA binary to read the eeprom */
error
=
svec_load_fpga_file
(
svec
,
svec
->
fw_name
);
if
(
error
)
goto
failed
;
/* configure and activate function 0 */
setup_csr_fa0
(
svec
->
cr_csr
->
kernel_va
,
vmebase2
[
ndev
],
vector
[
ndev
],
level
[
ndev
]);
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
name
=
pdev
->
bus_id
;
#else
...
...
@@ -469,11 +460,23 @@ static int __devinit svec_probe(struct device *pdev, unsigned int ndev)
}
*/
if
(
!
error
)
{
dev_set_drvdata
(
svec
->
dev
,
svec
);
goto
out
;
dev_set_drvdata
(
svec
->
dev
,
svec
);
error
=
svec_create_sysfs_files
(
svec
);
if
(
error
)
{
printk
(
KERN_ERR
PFX
"Error creating sysfs files
\n
"
);
goto
failed
;
}
/* Load the golden FPGA binary to read the eeprom */
error
=
svec_load_fpga_file
(
svec
,
svec
->
fw_name
);
if
(
error
)
goto
failed
;
/* configure and activate function 0 */
setup_csr_fa0
(
svec
->
cr_csr
->
kernel_va
,
vmebase2
[
ndev
],
vector
[
ndev
],
level
[
ndev
]);
return
0
;
/*
device_create_failed:
cdev_del(&svec->cdev);
...
...
@@ -483,9 +486,6 @@ failed:
kfree
(
svec
);
return
-
EINVAL
;
out:
error
=
svec_create_sysfs_files
(
svec
);
if
(
error
)
printk
(
KERN_ERR
PFX
"Error creating sysfs files
\n
"
);
return
error
;
}
...
...
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