Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Sunxi Tools
Commits
5325533c
Commit
5325533c
authored
Jan 08, 2019
by
Priit Laes
Browse files
spi: Be more verbose in case of unsupported SoCs
Signed-off-by:
Priit Laes
<
priit.laes@paf.com
>
parent
6d598a0e
Changes
1
Hide whitespace changes
Inline
Side-by-side
fel-spiflash.c
View file @
5325533c
...
@@ -144,8 +144,11 @@ static bool spi0_init(feldev_handle *dev)
...
@@ -144,8 +144,11 @@ static bool spi0_init(feldev_handle *dev)
{
{
uint32_t
reg_val
;
uint32_t
reg_val
;
soc_info_t
*
soc_info
=
dev
->
soc_info
;
soc_info_t
*
soc_info
=
dev
->
soc_info
;
if
(
!
soc_info
)
if
(
!
soc_info
)
{
printf
(
"Unable to fetch device information. "
"Possibly unknown device.
\n
"
);
return
false
;
return
false
;
}
/* Setup SPI0 pins muxing */
/* Setup SPI0 pins muxing */
switch
(
soc_info
->
soc_id
)
{
switch
(
soc_info
->
soc_id
)
{
...
@@ -164,6 +167,8 @@ static bool spi0_init(feldev_handle *dev)
...
@@ -164,6 +167,8 @@ static bool spi0_init(feldev_handle *dev)
gpio_set_cfgpin
(
dev
,
PC
,
3
,
SUN50I_GPC_SPI0
);
gpio_set_cfgpin
(
dev
,
PC
,
3
,
SUN50I_GPC_SPI0
);
break
;
break
;
default:
/* Unknown/Unsupported SoC */
default:
/* Unknown/Unsupported SoC */
printf
(
"SPI support not implemented yet for %x (%s)!
\n
"
,
soc_info
->
soc_id
,
soc_info
->
name
);
return
false
;
return
false
;
}
}
...
...
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