From: Lukasz Majewski <lukma@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] spl: mmc: Add option to set eMMC HW boot partition
Date: Wed, 9 Oct 2019 11:07:18 +0200 [thread overview]
Message-ID: <20191009110718.3d6ff316@jawa> (raw)
In-Reply-To: <20190903141650.5117-1-lukma@denx.de>
Dear Tom,
> From: Mans Rullgard <mans@mansr.com>
>
> This change allows setting pre-defined eMMC boot partition for SPL
> eMMC booting. It is necessary in the case when one wants to boot
> (through falcon boot) from eMMC after loading SPL from other memory
> (like SPI-NOR).
>
> Signed-off-by: Mans Rullgard <mans@mansr.com>
> [lukma: Edit the commit message]
> Signed-off-by: Lukasz Majewski <lukma@denx.de>
> Acked-by: Andreas Dannenberg <dannenberg@ti.com>
>
Tom, are there any issues preventing this patch from being applied to
-master?
> ---
>
> common/spl/Kconfig | 6 ++++++
> common/spl/spl_mmc.c | 4 ++++
> 2 files changed, 10 insertions(+)
>
> diff --git a/common/spl/Kconfig b/common/spl/Kconfig
> index f467eca2be..5b7667ea16 100644
> --- a/common/spl/Kconfig
> +++ b/common/spl/Kconfig
> @@ -314,6 +314,12 @@ config SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR
> Address on the MMC to load U-Boot from, when the MMC is
> being used in raw mode. Units: MMC sectors (1 sector = 512 bytes).
>
> +config SYS_MMCSD_RAW_MODE_EMMC_BOOT_PARTITION
> + int "Number of the eMMC boot partition to use"
> + default 1
> + help
> + eMMC boot partition number to use when the eMMC in raw
> mode. +
> config SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION
> bool "MMC Raw mode: by partition"
> help
> diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c
> index 2caceb5186..a4d2e63b82 100644
> --- a/common/spl/spl_mmc.c
> +++ b/common/spl/spl_mmc.c
> @@ -334,6 +334,9 @@ int spl_mmc_load(struct spl_image_info *spl_image,
> err = -EINVAL;
> switch (boot_mode) {
> case MMCSD_MODE_EMMCBOOT:
> +#ifdef CONFIG_SYS_MMCSD_RAW_MODE_EMMC_BOOT_PARTITION
> + part = CONFIG_SYS_MMCSD_RAW_MODE_EMMC_BOOT_PARTITION;
> +#else
> /*
> * We need to check what the partition is configured
> to.
> * 1 and 2 match up to boot0 / boot1 and 7 is user
> data @@ -343,6 +346,7 @@ int spl_mmc_load(struct spl_image_info
> *spl_image,
> if (part == 7)
> part = 0;
> +#endif
>
> if (CONFIG_IS_ENABLED(MMC_TINY))
> err = mmc_switch_part(mmc, part);
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma at denx.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20191009/4813b409/attachment.sig>
next prev parent reply other threads:[~2019-10-09 9:07 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-03 14:16 [U-Boot] [PATCH] spl: mmc: Add option to set eMMC HW boot partition Lukasz Majewski
2019-09-03 14:20 ` Marek Vasut
2019-09-03 15:16 ` Måns Rullgård
2019-09-03 15:49 ` Lukasz Majewski
2019-09-03 17:07 ` Marek Vasut
2019-09-03 20:34 ` Lukasz Majewski
2019-10-09 9:07 ` Lukasz Majewski [this message]
2019-10-10 19:55 ` Tom Rini
2019-10-11 2:02 ` Peng Fan
2019-10-12 20:23 ` Tom Rini
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=20191009110718.3d6ff316@jawa \
--to=lukma@denx.de \
--cc=u-boot@lists.denx.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox