From: Sascha Hauer <s.hauer@pengutronix.de>
To: Ahmad Fatoum <a.fatoum@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 4/5] ARM: stm32mp: dk2: add barebox SD-Card update handler
Date: Mon, 14 Oct 2019 14:51:57 +0200 [thread overview]
Message-ID: <20191014125157.f4ckzgwpqjugt7pq@pengutronix.de> (raw)
In-Reply-To: <20191014063922.17233-5-a.fatoum@pengutronix.de>
On Mon, Oct 14, 2019 at 08:39:21AM +0200, Ahmad Fatoum wrote:
> Now with the SD/MMC controller supported, lets add a bbu handler, so we
> can use it to update the second stage boot loader partition.
>
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
> arch/arm/boards/stm32mp157c-dk2/board.c | 14 ++++++++++++++
> arch/arm/mach-stm32mp/include/mach/bbu.h | 14 ++++++++++++++
> 2 files changed, 28 insertions(+)
> create mode 100644 arch/arm/mach-stm32mp/include/mach/bbu.h
>
> diff --git a/arch/arm/boards/stm32mp157c-dk2/board.c b/arch/arm/boards/stm32mp157c-dk2/board.c
> index 9cb861af85d8..23eb6728b15a 100644
> --- a/arch/arm/boards/stm32mp157c-dk2/board.c
> +++ b/arch/arm/boards/stm32mp157c-dk2/board.c
> @@ -4,6 +4,7 @@
> #include <init.h>
> #include <asm/memory.h>
> #include <mach/stm32.h>
> +#include <mach/bbu.h>
>
> static int dk2_mem_init(void)
> {
> @@ -15,3 +16,16 @@ static int dk2_mem_init(void)
> return 0;
> }
> mem_initcall(dk2_mem_init);
> +
> +static int dk2_postcore_init(void)
> +{
> + if (!of_machine_is_compatible("st,stm32mp157c-dk2"))
> + return 0;
> +
> + stm32mp_bbu_mmc_register_handler("sd", "/dev/disk0.ssbl",
> + BBU_HANDLER_FLAG_DEFAULT);
You should create an alias in dt for the sd device node (might exist
already, don't know) and use mci_of_parse_node() in the SD driver. With
this you get consistent names. "disk0" will be different devices
depending on probe order.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2019-10-14 12:52 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-14 6:39 [PATCH 0/4] ARM: stm32mp: dk2: support barebox_update and env Ahmad Fatoum
2019-10-14 6:39 ` [PATCH 1/5] fs: devfs-core: have device_find_partition search symlinks Ahmad Fatoum
2019-10-14 6:39 ` [PATCH 2/5] ARM: dts: stm32mp: add barebox-enviroment on DK boards Ahmad Fatoum
2019-10-14 6:39 ` [PATCH 3/5] ARM: stm32mp: dk2: rename function according to init level Ahmad Fatoum
2019-10-14 6:39 ` [PATCH 4/5] ARM: stm32mp: dk2: add barebox SD-Card update handler Ahmad Fatoum
2019-10-14 12:51 ` Sascha Hauer [this message]
2019-10-15 6:58 ` Ahmad Fatoum
2019-10-15 7:59 ` Sascha Hauer
2019-10-15 8:21 ` Ahmad Fatoum
2019-10-14 6:39 ` [PATCH 5/5] Documentation: boards: stm32mp: document environment partition Ahmad Fatoum
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=20191014125157.f4ckzgwpqjugt7pq@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
/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