Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
Beam Positoning Monitor - Software
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Projects
Beam Positoning Monitor - Software
Commits
69a6eb75
Commit
69a6eb75
authored
10 years ago
by
Lucas Russo
Browse files
Options
Downloads
Patches
Plain Diff
hal/dev_io/dev_io.c: add AFCv3 board switch
parent
27467258
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
hal/dev_io/dev_io.c
+71
-26
71 additions, 26 deletions
hal/dev_io/dev_io.c
with
71 additions
and
26 deletions
hal/dev_io/dev_io.c
+
71
−
26
View file @
69a6eb75
...
...
@@ -11,6 +11,8 @@
#define DEVIO_SERVICE_LEN 50
static
devio_err_e
spwan_platform_smios
(
devio_t
*
devio
);
void
print_help
(
char
*
program_name
)
{
printf
(
"Usage: %s [options]
\n
"
...
...
@@ -159,33 +161,9 @@ int main (int argc, char *argv[])
free
(
*
str_p
);
broker_endp
=
NULL
;
uint32_t
fmc130m_4ch_id
=
0x7085ef15
;
uint32_t
acq_id
=
0x4519a0ad
;
uint32_t
dsp_id
=
0x1bafbf1e
;
uint32_t
swap_id
=
0x12897592
;
devio_err_e
err
;
err
=
devio_register_sm
(
devio
,
fmc130m_4ch_id
,
FMC1_130M_BASE_ADDR
,
0
);
if
(
err
!=
DEVIO_SUCCESS
)
{
DBE_DEBUG
(
DBG_DEV_IO
|
DBG_LVL_FATAL
,
"[dev_io] devio_register_sm error!
\n
"
);
goto
err_devio
;
}
err
=
devio_register_sm
(
devio
,
acq_id
,
WB_ACQ_BASE_ADDR
,
0
);
devio_err_e
err
=
spwan_platform_smios
(
devio
);
if
(
err
!=
DEVIO_SUCCESS
)
{
DBE_DEBUG
(
DBG_DEV_IO
|
DBG_LVL_FATAL
,
"[dev_io] devio_register_sm error!
\n
"
);
goto
err_devio
;
}
err
=
devio_register_sm
(
devio
,
dsp_id
,
DSP1_BASE_ADDR
,
0
);
if
(
err
!=
DEVIO_SUCCESS
)
{
DBE_DEBUG
(
DBG_DEV_IO
|
DBG_LVL_FATAL
,
"[dev_io] devio_register_sm error!
\n
"
);
goto
err_devio
;
}
err
=
devio_register_sm
(
devio
,
swap_id
,
DSP1_BASE_ADDR
,
0
);
if
(
err
!=
DEVIO_SUCCESS
)
{
DBE_DEBUG
(
DBG_DEV_IO
|
DBG_LVL_FATAL
,
"[dev_io] devio_register_sm error!
\n
"
);
DBE_DEBUG
(
DBG_DEV_IO
|
DBG_LVL_FATAL
,
"[dev_io] spwan_platform_smios error!
\n
"
);
goto
err_devio
;
}
...
...
@@ -225,3 +203,70 @@ err_exit:
free
(
*
str_p
);
return
0
;
}
static
devio_err_e
spwan_platform_smios
(
devio_t
*
devio
)
{
assert
(
devio
);
uint32_t
fmc130m_4ch_id
=
0x7085ef15
;
uint32_t
acq_id
=
0x4519a0ad
;
uint32_t
dsp_id
=
0x1bafbf1e
;
uint32_t
swap_id
=
0x12897592
;
devio_err_e
err
;
/* ML605 or AFCv3 */
#if defined (__BOARD_ML605__) || defined (__BOARD_AFCV3__)
DBE_DEBUG
(
DBG_DEV_IO
|
DBG_LVL_INFO
,
"[dev_io] Spawning default SMIOs ...
\n
"
);
err
=
devio_register_sm
(
devio
,
fmc130m_4ch_id
,
FMC1_130M_BASE_ADDR
,
0
);
if
(
err
!=
DEVIO_SUCCESS
)
{
DBE_DEBUG
(
DBG_DEV_IO
|
DBG_LVL_FATAL
,
"[dev_io] devio_register_sm error!
\n
"
);
goto
err_register_sm
;
}
err
=
devio_register_sm
(
devio
,
acq_id
,
WB_ACQ_BASE_ADDR
,
0
);
if
(
err
!=
DEVIO_SUCCESS
)
{
DBE_DEBUG
(
DBG_DEV_IO
|
DBG_LVL_FATAL
,
"[dev_io] devio_register_sm error!
\n
"
);
goto
err_register_sm
;
}
err
=
devio_register_sm
(
devio
,
dsp_id
,
DSP1_BASE_ADDR
,
0
);
if
(
err
!=
DEVIO_SUCCESS
)
{
DBE_DEBUG
(
DBG_DEV_IO
|
DBG_LVL_FATAL
,
"[dev_io] devio_register_sm error!
\n
"
);
goto
err_register_sm
;
}
err
=
devio_register_sm
(
devio
,
swap_id
,
DSP1_BASE_ADDR
,
0
);
if
(
err
!=
DEVIO_SUCCESS
)
{
DBE_DEBUG
(
DBG_DEV_IO
|
DBG_LVL_FATAL
,
"[dev_io] devio_register_sm error!
\n
"
);
goto
err_register_sm
;
}
/* AFCv3 spefific */
#if defined (__BOARD_AFCV3__)
DBE_DEBUG
(
DBG_DEV_IO
|
DBG_LVL_INFO
,
"[dev_io] Spawning AFCv3 specific SMIOs ...
\n
"
);
err
=
devio_register_sm
(
devio
,
fmc130m_4ch_id
,
FMC2_130M_BASE_ADDR
,
0
);
if
(
err
!=
DEVIO_SUCCESS
)
{
DBE_DEBUG
(
DBG_DEV_IO
|
DBG_LVL_FATAL
,
"[dev_io] devio_register_sm error!
\n
"
);
goto
err_register_sm
;
}
err
=
devio_register_sm
(
devio
,
dsp_id
,
DSP2_BASE_ADDR
,
0
);
if
(
err
!=
DEVIO_SUCCESS
)
{
DBE_DEBUG
(
DBG_DEV_IO
|
DBG_LVL_FATAL
,
"[dev_io] devio_register_sm error!
\n
"
);
goto
err_register_sm
;
}
err
=
devio_register_sm
(
devio
,
swap_id
,
DSP2_BASE_ADDR
,
0
);
if
(
err
!=
DEVIO_SUCCESS
)
{
DBE_DEBUG
(
DBG_DEV_IO
|
DBG_LVL_FATAL
,
"[dev_io] devio_register_sm error!
\n
"
);
goto
err_register_sm
;
}
#endif
#else
#error "Board not supported!"
#endif
err_register_sm:
return
err
;
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment