From: Michael Tretter <m.tretter@pengutronix.de> To: barebox@lists.infradead.org Subject: [PATCH v2 5/7] ARM: zynqmp: zcu104: register update handler Date: Thu, 24 Jun 2021 17:00:52 +0200 [thread overview] Message-ID: <20210624150054.1205422-6-m.tretter@pengutronix.de> (raw) In-Reply-To: <20210624150054.1205422-1-m.tretter@pengutronix.de> As the zcu104 stores the environment in the same partition as the barebox image, the partition is already mounted in ENV_MNT_DIR ("/boot"). Therefore, the update handler has to use the already existing mount point for the update. Signed-off-by: Michael Tretter <m.tretter@pengutronix.de> --- Changelog: v2: none --- arch/arm/boards/xilinx-zcu104/Makefile | 1 + arch/arm/boards/xilinx-zcu104/board.c | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 arch/arm/boards/xilinx-zcu104/board.c diff --git a/arch/arm/boards/xilinx-zcu104/Makefile b/arch/arm/boards/xilinx-zcu104/Makefile index 884d6e63b019..297f77d57ab1 100644 --- a/arch/arm/boards/xilinx-zcu104/Makefile +++ b/arch/arm/boards/xilinx-zcu104/Makefile @@ -1,2 +1,3 @@ # SPDX-License-Identifier: GPL-2.0-or-later +obj-y += board.o lwl-y += lowlevel.o lowlevel_init.o diff --git a/arch/arm/boards/xilinx-zcu104/board.c b/arch/arm/boards/xilinx-zcu104/board.c new file mode 100644 index 000000000000..7654d2bfac90 --- /dev/null +++ b/arch/arm/boards/xilinx-zcu104/board.c @@ -0,0 +1,18 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Copyright (C) 2020 Michael Tretter <m.tretter@pengutronix.de> + */ + +#include <common.h> +#include <init.h> +#include <mach/zynqmp-bbu.h> + +static int zcu104_register_update_handler(void) +{ + if (!of_machine_is_compatible("xlnx,zynqmp-zcu104")) + return 0; + + return zynqmp_bbu_register_handler("SD", "/boot/BOOT.BIN", + BBU_HANDLER_FLAG_DEFAULT); +} +device_initcall(zcu104_register_update_handler); -- 2.30.2 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2021-06-24 15:03 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-06-24 15:00 [PATCH v2 0/7] ZynqMP: Cleanup and extend board support Michael Tretter 2021-06-24 15:00 ` [PATCH v2 1/7] ARM: zynqmp: set reset source Michael Tretter 2021-06-24 15:00 ` [PATCH v2 2/7] clk: zynqmp: do not enable already enabled clocks Michael Tretter 2021-06-24 15:00 ` [PATCH v2 3/7] dts: zcu104: add Barebox environment Michael Tretter 2021-06-24 15:00 ` [PATCH v2 4/7] ARM: zynqmp: add update handler Michael Tretter 2021-06-24 15:00 ` Michael Tretter [this message] 2021-06-24 15:00 ` [PATCH v2 6/7] ARM: zynqmp: defconfig: enable more features Michael Tretter 2021-06-24 15:00 ` [PATCH v2 7/7] Documentation: zynqmp: add some documentation Michael Tretter 2021-06-25 7:39 ` [PATCH v2 0/7] ZynqMP: Cleanup and extend board support Sascha Hauer
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=20210624150054.1205422-6-m.tretter@pengutronix.de \ --to=m.tretter@pengutronix.de \ --cc=barebox@lists.infradead.org \ --subject='Re: [PATCH v2 5/7] ARM: zynqmp: zcu104: register update handler' \ /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
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox