All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Peng Fan (OSS)" <peng.fan@oss.nxp.com>
To: Michael Nazzareno Trimarchi <michael@amarulasolutions.com>,
	Peng Fan <peng.fan@nxp.com>, U-Boot-Denx <u-boot@lists.denx.de>,
	Stefano Babic <sbabic@denx.de>, Ye Li <ye.li@nxp.com>
Cc: Fabio Estevam <festevam@gmail.com>,
	Jagan Teki <jagan@amarulasolutions.com>
Subject: Re: Problem on imx: add rom api support on imx8mn
Date: Thu, 8 Jul 2021 15:12:35 +0800	[thread overview]
Message-ID: <aec20b82-7882-3293-8293-df32b8825a29@oss.nxp.com> (raw)
In-Reply-To: <CAOf5uwnFpSodPa-2+hd1-k20PVyniQPKcmWrFOq7YKAD=p-=7Q@mail.gmail.com>

On 2021/7/4 1:24, Michael Nazzareno Trimarchi wrote:
> Hi all
> 
> I have some problems that I have understood and fixed but I can not
> explain. Right now I have on imx8mn that can boot from boot0 or boot1
> partition after remove
> a condition in the is_boot_from_stream_device
> 
> This is a boot from mmcblk0boot0 with some debug
> 
> U-Boot SPL 2020.04-5.4.70-2.3.2+gf3bcbdfc62 (Jul 03 2021 - 17:00:27 +0000)
> power_bd71837_init
> DDRINFO: start DRAM init
> DDRINFO: DRAM rate 1600MTS
> DDRINFO:ddrphy calibration done
> DDRINFO: ddrmix config done
> Normal Boot
> Trying to boot from BOOTROM
> ROM API interface 2 from boot 131073
> 
> Interface is 2 MMC and boot is 131073 and according to this
> 
> static int is_boot_from_stream_device(u32 boot)
> +{
> +       u32 interface;
> +
> +       interface = boot >> 16;
> +       if (interface >= BT_DEV_TYPE_USB)
> +               return 1;
> +
> +       if (interface == BT_DEV_TYPE_MMC && (boot & 1))
> +               return 1;
> +
> +       return 0;
> +}
> 
> means a stream interface but it does not boot.
> 
> Boot from boot1 give 131072 that is boot1 this let device boot because

Who gives 131073? Boot from boot1, you mean emmc boot partition0?

> is_boot_from_stream_device is 0 and
> romapi use spl_romapi_load_image_seekable
> 
> Remove boot & 1 condition let me boot from mmcblk0boot0 and
> mmcblk0boot1 without any problem

Have you enabled emmc fastboot in fuse?

boot & 1 is checking emmc fastboot. emmc fastboot mode is actually
stream device. If fastboot mode enabled, you need burn your
flash.bin into offset 0. Not 32KB offset.

Regards,
Peng.

> 
> mmc partconf 0
> EXT_CSD[179], PARTITION_CONFIG:
> BOOT_ACK: 0x0
> BOOT_PARTITION_ENABLE: 0x1
> PARTITION_ACCESS: 0x0
> 
> and the board was fused already.
> 
> Any idea why?
> 
> Michael
> 

  reply	other threads:[~2021-07-08  7:12 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-03 17:24 Problem on imx: add rom api support on imx8mn Michael Nazzareno Trimarchi
2021-07-08  7:12 ` Peng Fan (OSS) [this message]
2021-07-08  9:15   ` Michael Nazzareno Trimarchi
2021-07-15  6:47     ` Peng Fan (OSS)
2021-07-15  6:52       ` Michael Nazzareno Trimarchi
2021-07-15  7:56         ` [EXT] " Ye Li
2021-07-15  8:19           ` Michael Nazzareno Trimarchi
2021-08-06  9:56             ` Michael Nazzareno Trimarchi
2021-08-06 10:16               ` Peng Fan (OSS)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aec20b82-7882-3293-8293-df32b8825a29@oss.nxp.com \
    --to=peng.fan@oss.nxp.com \
    --cc=festevam@gmail.com \
    --cc=jagan@amarulasolutions.com \
    --cc=michael@amarulasolutions.com \
    --cc=peng.fan@nxp.com \
    --cc=sbabic@denx.de \
    --cc=u-boot@lists.denx.de \
    --cc=ye.li@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.