Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
U
uboot-imx
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Eric Kuzmenko
uboot-imx
Commits
a751ce64
Commit
a751ce64
authored
Nov 24, 2018
by
Angus Ainslie (Purism)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
imx8m_som/spl.c : add code to initailize the MMC when we boot from SDP
parent
2bfa1c85
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
3 deletions
+24
-3
board/emcraft/imx8m_som/spl.c
board/emcraft/imx8m_som/spl.c
+23
-2
common/spl/spl_mmc.c
common/spl/spl_mmc.c
+1
-1
No files found.
board/emcraft/imx8m_som/spl.c
View file @
a751ce64
...
...
@@ -371,10 +371,27 @@ static int setup_typec(void)
}
#endif
static
int
sdp_mmc_init
(
void
)
{
struct
mmc
*
mmc
=
NULL
;
int
err
=
0
;
err
=
spl_mmc_find_device
(
&
mmc
,
BOOT_DEVICE_MMC1
);
if
(
err
)
return
err
;
err
=
mmc_init
(
mmc
);
if
(
err
)
{
printf
(
"spl: mmc_init failed: %d
\n
"
,
err
);
}
return
0
;
}
void
board_init_f
(
ulong
dummy
)
{
int
ret
;
int
ret
,
err
;
struct
mmc
*
mmc
;
/* Clear global data */
memset
((
void
*
)
gd
,
0
,
sizeof
(
gd_t
));
...
...
@@ -412,8 +429,12 @@ void board_init_f(ulong dummy)
/* DDR initialization */
spl_dram_init
();
printf
(
"Board init
\n
"
);
if
(
is_usb_boot
()
)
{
printf
(
"MMC init
\n
"
);
sdp_mmc_init
();
}
printf
(
"Board init
\n
"
);
board_init_r
(
NULL
,
0
);
}
...
...
common/spl/spl_mmc.c
View file @
a751ce64
...
...
@@ -124,7 +124,7 @@ int spl_mmc_get_device_index(u32 boot_device)
return
-
ENODEV
;
}
static
int
spl_mmc_find_device
(
struct
mmc
**
mmcp
,
u32
boot_device
)
int
spl_mmc_find_device
(
struct
mmc
**
mmcp
,
u32
boot_device
)
{
#ifdef CONFIG_DM_MMC
struct
udevice
*
dev
;
...
...
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