Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
Software for White Rabbit PTP Core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
28
Issues
28
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Schedules
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
Software for White Rabbit PTP Core
Commits
0f3fabe7
Commit
0f3fabe7
authored
Oct 20, 2012
by
Alessandro Rubini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
warnings: fix remaining dev/ stuff
Signed-off-by:
Alessandro Rubini
<
rubini@gnudd.com
>
parent
f3a10e83
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
14 additions
and
29 deletions
+14
-29
eeprom.c
dev/eeprom.c
+7
-4
endpoint.c
dev/endpoint.c
+1
-0
ep_pfilter.c
dev/ep_pfilter.c
+1
-22
minic.c
dev/minic.c
+2
-1
eeprom.h
include/eeprom.h
+1
-1
shell.c
shell/shell.c
+2
-1
No files found.
dev/eeprom.c
View file @
0f3fabe7
#include <string.h>
#include <wrc.h>
#include "types.h"
#include "i2c.h"
#include "eeprom.h"
...
...
@@ -163,7 +166,7 @@ int32_t eeprom_get_sfp(uint8_t i2cif, uint8_t i2c_addr, struct s_sfpinfo * sfp,
chksum
=
(
uint8_t
)
((
uint16_t
)
chksum
+
*
(
ptr
++
))
&
0xff
;
if
(
chksum
!=
sfp
->
chksum
)
EE_RET_CORRPT
;
return
EE_RET_CORRPT
;
}
else
{
/*count checksum */
ptr
=
(
uint8_t
*
)
sfp
;
...
...
@@ -271,7 +274,7 @@ int8_t eeprom_init_purge(uint8_t i2cif, uint8_t i2c_addr)
int8_t
eeprom_init_add
(
uint8_t
i2cif
,
uint8_t
i2c_addr
,
const
char
*
args
[])
{
uint8_t
i
=
1
;
char
separator
=
' '
;
uint8_t
separator
=
' '
;
uint16_t
used
,
readback
;
if
(
eeprom_read
(
i2cif
,
i2c_addr
,
EE_BASE_INIT
,
(
uint8_t
*
)
&
used
,
...
...
@@ -314,7 +317,7 @@ int8_t eeprom_init_add(uint8_t i2cif, uint8_t i2c_addr, const char *args[])
int32_t
eeprom_init_show
(
uint8_t
i2cif
,
uint8_t
i2c_addr
)
{
uint16_t
used
,
i
;
char
byte
;
uint8_t
byte
;
if
(
eeprom_read
(
i2cif
,
i2c_addr
,
EE_BASE_INIT
,
(
uint8_t
*
)
&
used
,
sizeof
(
used
))
!=
sizeof
(
used
))
...
...
@@ -335,7 +338,7 @@ int32_t eeprom_init_show(uint8_t i2cif, uint8_t i2c_addr)
return
0
;
}
int8_t
eeprom_init_readcmd
(
uint8_t
i2cif
,
uint8_t
i2c_addr
,
char
*
buf
,
int8_t
eeprom_init_readcmd
(
uint8_t
i2cif
,
uint8_t
i2c_addr
,
uint8_t
*
buf
,
uint8_t
bufsize
,
uint8_t
next
)
{
static
uint16_t
ptr
;
...
...
dev/endpoint.c
View file @
0f3fabe7
...
...
@@ -9,6 +9,7 @@ LGPL 2.1
*/
#include <stdio.h>
#include <wrc.h>
#include "board.h"
#include "syscon.h"
...
...
dev/ep_pfilter.c
View file @
0f3fabe7
...
...
@@ -76,7 +76,7 @@
#define PFILTER_MAX_CODE_SIZE 32
#define pfilter_dbg
#define pfilter_dbg
(x, ...)
/* nothing */
extern
volatile
struct
EP_WB
*
EP
;
...
...
@@ -133,27 +133,6 @@ static void pfilter_cmp(int offset, int value, int mask, pfilter_op_t op,
code_buf
[
code_pos
++
]
=
ir
;
}
// rd = (packet[offset] & (1<<bit_index)) op rd
static
void
pfilter_btst
(
int
offset
,
int
bit_index
,
pfilter_op_t
op
,
int
rd
)
{
uint64_t
ir
;
check_size
();
if
(
offset
>
code_pos
)
pfilter_dbg
(
"microcode: comparison offset is bigger than current PC. Insert some nops before comparing"
);
check_reg_range
(
rd
,
1
,
15
,
"ra/rd"
);
check_reg_range
(
bit_index
,
0
,
15
,
"bit index"
);
ir
=
((
1ULL
<<
33
)
|
PF_MODE_CMP
|
((
uint64_t
)
offset
<<
7
)
|
((
uint64_t
)
bit_index
<<
29
)
|
(
uint64_t
)
op
|
((
uint64_t
)
rd
<<
3
));
code_buf
[
code_pos
++
]
=
ir
;
}
static
void
pfilter_nop
()
{
uint64_t
ir
;
...
...
dev/minic.c
View file @
0f3fabe7
#include <stdio.h>
#include <string.h>
#include <wrc.h>
#include "types.h"
#include "board.h"
...
...
@@ -186,7 +187,7 @@ int minic_rx_frame(uint8_t * hdr, uint8_t * payload, uint32_t buf_size,
uint32_t
payload_size
,
num_words
;
uint32_t
desc_hdr
;
uint32_t
raw_ts
;
uint32_t
rx_addr_cur
,
cur_avail
;
uint32_t
cur_avail
;
int
n_recvd
;
if
(
!
(
minic_readl
(
MINIC_REG_EIC_ISR
)
&
MINIC_EIC_ISR_RX
))
...
...
include/eeprom.h
View file @
0f3fabe7
...
...
@@ -44,7 +44,7 @@ int8_t eeprom_phtrans(uint8_t i2cif, uint8_t i2c_addr, uint32_t * val,
int8_t
eeprom_init_erase
(
uint8_t
i2cif
,
uint8_t
i2c_addr
);
int8_t
eeprom_init_add
(
uint8_t
i2cif
,
uint8_t
i2c_addr
,
const
char
*
args
[]);
int32_t
eeprom_init_show
(
uint8_t
i2cif
,
uint8_t
i2c_addr
);
int8_t
eeprom_init_readcmd
(
uint8_t
i2cif
,
uint8_t
i2c_addr
,
char
*
buf
,
int8_t
eeprom_init_readcmd
(
uint8_t
i2cif
,
uint8_t
i2c_addr
,
uint8_t
*
buf
,
uint8_t
bufsize
,
uint8_t
next
);
int32_t
eeprom_get_sfp
(
uint8_t
i2cif
,
uint8_t
i2c_addr
,
struct
s_sfpinfo
*
sfp
,
...
...
shell/shell.c
View file @
0f3fabe7
...
...
@@ -276,7 +276,8 @@ int shell_boot_script(void)
while
(
1
)
{
cmd_len
=
eeprom_init_readcmd
(
WRPC_FMC_I2C
,
FMC_EEPROM_ADR
,
cmd_buf
,
SH_MAX_LINE_LEN
,
next
);
(
uint8_t
*
)
cmd_buf
,
SH_MAX_LINE_LEN
,
next
);
if
(
cmd_len
<=
0
)
{
if
(
next
==
0
)
mprintf
(
"Empty init script...
\n
"
);
...
...
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