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
b460c032
Commit
b460c032
authored
Dec 17, 2012
by
Juan David González Cobas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
svec: style: cleanup declarations
parent
32d798b3
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
17 deletions
+13
-17
svec.h
kernel/svec.h
+11
-0
svec_drv.c
kernel/svec_drv.c
+2
-17
No files found.
kernel/svec.h
View file @
b460c032
...
...
@@ -85,6 +85,17 @@ extern int svec_eeprom_read(struct fmc_device *fmc, int i2c_addr,
extern
int
svec_eeprom_write
(
struct
fmc_device
*
fmc
,
int
i2c_addr
,
uint32_t
offset
,
const
void
*
buf
,
size_t
size
);
/* SVEC CSR offsets */
#define FUN0ADER 0x7FF63
#define INT_LEVEL 0x7ff5b
#define INTVECTOR 0x7ff5f
#define WB_32_64 0x7ff33
#define BIT_SET_REG 0x7FFFB
#define BIT_CLR_REG 0x7FFF7
#define WB32 1
#define WB64 0
#define RESET_CORE 0x80
#define ENABLE_CORE 0x10
/* Functions in svec-gpio.c */
extern
int
svec_gpio_init
(
struct
fmc_device
*
fmc
);
...
...
kernel/svec_drv.c
View file @
b460c032
...
...
@@ -119,18 +119,6 @@ int unmap_window(struct svec_dev *svec, enum svec_map_win win)
return
0
;
}
#define FUN0ADER (0x7FF63)
#define INT_LEVEL (0x7ff5b)
#define INTVECTOR (0x7ff5f)
#define WB_32_64 (0x7ff33)
#define BIT_SET_REG (0x7FFFB)
#define BIT_CLR_REG (0x7FFF7)
#define WB32 1
#define WB64 0
#define RESET_CORE 0x80
#define ENABLE_CORE 0x10
int
svec_bootloader_unlock
(
struct
svec_dev
*
svec
)
{
const
uint32_t
boot_seq
[
8
]
=
{
0xde
,
0xad
,
0xbe
,
0xef
,
0xca
,
0xfe
,
0xba
,
0xbe
};
...
...
@@ -171,14 +159,11 @@ int svec_bootloader_is_active(struct svec_dev *svec)
idc
=
swapbe32
(
ioread32
(
addr
));
idc
=
htonl
(
idc
);
if
(
strncmp
(
buf
,
"SVEC"
,
4
)
==
0
)
{
if
(
strncmp
(
buf
,
"SVEC"
,
4
)
==
0
)
{
printk
(
KERN_INFO
PFX
"IDCode value %x [%s].
\n
"
,
idc
,
buf
);
/* Bootloader active. Unlocked */
return
1
;
}
else
}
else
printk
(
KERN_INFO
PFX
"IDCode value %x.
\n
"
,
idc
);
/* Bootloader not active. Locked */
...
...
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