On Mon, Jul 24, 2023 at 07:50:02PM +0200, Heinrich Schuchardt wrote:
> On 24.07.23 17:12, Tom Rini wrote:
> > On Mon, Jul 24, 2023 at 12:33:08PM +0200, Heinrich Schuchardt wrote:
> > > Some MMC controllers are PCI bus devices. Before calling spl_mmc_load() we
> > > must bind the PCI devices.
> > > 
> > > Signed-off-by: Heinrich Schuchardt <[email protected]>
> > > Reviewed-by: Stefan Roese <[email protected]>
> > > ---
> > > v2:
> > >   Remove empty line at start of code block.
> > >   Add empty line before return.
> > > ---
> > >   common/spl/spl_mmc.c | 4 ++++
> > >   1 file changed, 4 insertions(+)
> > > 
> > > diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c
> > > index a665091b00..eb95005769 100644
> > > --- a/common/spl/spl_mmc.c
> > > +++ b/common/spl/spl_mmc.c
> > > @@ -7,6 +7,7 @@
> > >    */
> > >   #include <common.h>
> > >   #include <dm.h>
> > > +#include <init.h>
> > >   #include <log.h>
> > >   #include <part.h>
> > >   #include <spl.h>
> > > @@ -495,6 +496,9 @@ int spl_mmc_load(struct spl_image_info *spl_image,
> > >   int spl_mmc_load_image(struct spl_image_info *spl_image,
> > >                          struct spl_boot_device *bootdev)
> > >   {
> > > + if (IS_ENABLED(CONFIG_SPL_PCI))
> > > +         pci_init();
> > > +
> > >           return spl_mmc_load(spl_image, bootdev,
> > >   #ifdef CONFIG_SPL_FS_LOAD_PAYLOAD_NAME
> > >                               CONFIG_SPL_FS_LOAD_PAYLOAD_NAME,
> > 
> > As you've posted a number of these patches now, is there a common place
> > we can call pci_init() and check the return value?
> > 
> 
> We could move this to board_init_r() in common/spl/spl.c. Would that be your
> preference?

Yes, thanks.

-- 
Tom

Attachment: signature.asc
Description: PGP signature

Reply via email to