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
32
Issues
32
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
953b043f
Commit
953b043f
authored
Apr 24, 2020
by
Grzegorz Daniluk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
storage: bring back sdbfs formating from shell
parent
8dfe14bd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
9 deletions
+13
-9
board.h
boards/generic/board.h
+1
-1
storage.c
dev/storage.c
+11
-7
cmd_sdb.c
shell/cmd_sdb.c
+1
-1
No files found.
boards/generic/board.h
View file @
953b043f
...
...
@@ -81,7 +81,7 @@
#define FMC_EEPROM_ADR 0x50
#define SDBFS_REC
4
#define SDBFS_REC
5
void
sdb_find_devices
(
void
);
void
sdb_print_devices
(
void
);
...
...
dev/storage.c
View file @
953b043f
...
...
@@ -41,6 +41,11 @@
#define STORAGE_FLAG_DEVICE_OK (1<<0)
static
const
uint32_t
sdbfs_default_bin
[]
=
{
#include "dev/sdbfs-default.h"
};
struct
storage_device
wrc_storage_dev
;
struct
sdbfs
wrc_sdbfs
;
...
...
@@ -1090,8 +1095,9 @@ static inline unsigned long SDB_ALIGN(unsigned long x, int blocksize)
int
storage_sdbfs_format
(
struct
storage_device
*
dev
,
uint32_t
base_addr
)
{
struct
sdb_device
*
sdbfs
=
(
struct
sdb_device
*
)
NULL
;
// fixme
struct
sdb_interconnect
*
sdbfs_dir
=
(
struct
sdb_interconnect
*
)
NULL
;
(
struct
sdb_device
*
)
sdbfs_default_bin
;
struct
sdb_interconnect
*
sdbfs_dir
=
(
struct
sdb_interconnect
*
)
sdbfs_default_bin
;
struct
sdb_device
sdbfs_buf
[
SDBFS_REC
];
int
i
;
...
...
@@ -1102,9 +1108,7 @@ int storage_sdbfs_format( struct storage_device *dev, uint32_t base_addr )
wrc_sdbfs
.
drvdata
=
dev
;
wrc_sdbfs
.
blocksize
=
dev
->
block_size
;
/* first file starts
after the SDBFS description */
/* first file starts after the SDBFS description */
cur_adr
=
base_addr
+
SDB_ALIGN
(
SDBFS_REC
*
sizeof
(
struct
sdb_device
),
wrc_sdbfs
.
blocksize
);
...
...
@@ -1145,8 +1149,8 @@ int storage_sdbfs_format( struct storage_device *dev, uint32_t base_addr )
size
=
sizeof
(
struct
sdb_device
);
for
(
i
=
0
;
i
<
SDBFS_REC
;
++
i
)
{
sdbfs_write_callback
(
&
wrc_sdbfs
,
base_addr
+
i
*
size
,
&
sdbfs
[
i
],
size
);
sdbfs_write_callback
(
&
wrc_sdbfs
,
base_addr
+
i
*
size
,
&
sdbfs
[
i
],
size
);
}
pp_printf
(
"Verification...
\n
"
);
...
...
shell/cmd_sdb.c
View file @
953b043f
...
...
@@ -24,7 +24,7 @@ static int cmd_sdb(const char *args[])
if
(
!
args
[
0
])
{
pp_printf
(
"Command expected: format, ls"
);
pp_printf
(
"Command expected: format, ls
\n
"
);
return
0
;
}
...
...
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