mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Rouven Czerwinski <r.czerwinski@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] ARM: imx: Add Support for Webasto ccbv2
Date: Sun, 5 Jul 2020 19:49:59 +0200	[thread overview]
Message-ID: <20200705174959.GY15485@pengutronix.de> (raw)
In-Reply-To: <20200702071411.18969-1-r.czerwinski@pengutronix.de>

Hi Rouven,

On Thu, Jul 02, 2020 at 09:14:11AM +0200, Rouven Czerwinski wrote:
> Add support for the Webasto Common Communication Board Version 2. The
> device tree included with barebox can eventually be replaced with the
> required barebox changes when the ccbv2 device tree is upstream.
> 
> Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
> ---
> +static int ccbv2_device_init(void)
> +{
> +	if (!of_machine_is_compatible("webasto,imx6ul-ccbv2"))
> +		return 0;
> +
> +	/* the bootloader is stored in one of the two boot partitions */
> +	imx6_bbu_internal_mmcboot_register_handler("emmc", "/dev/mmc1",
> +			BBU_HANDLER_FLAG_DEFAULT);
> +
> +	barebox_set_hostname("weabsto-ccbv2");
> +
> +	return 0;
> +
> +}
> +device_initcall(ccbv2_device_init);
> +
> +static int ccbv2_apply_overlay(void)
> +{
> +	struct device_node *overlay;
> +	struct fdt_header *fdt;
> +	int ret;
> +
> +	if(!IS_ENABLED(CONFIG_FIRMWARE_CCBV2_OPTEE))
> +		return 0;

The lack of the runtime test for a compatible machine breaks running
barebox on other enabled machines. You probably do this in a
pure_initcall to register the overlay before barebox unflattens the dtb.
I'm not sure what to do about it, but breaking other machines is not an
option.

Sascha


-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
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

      parent reply	other threads:[~2020-07-05 17:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-02  7:14 Rouven Czerwinski
2020-07-02  8:09 ` Ahmad Fatoum
2020-07-02  9:23 ` Roland Hieber
2020-07-05 17:49 ` Sascha Hauer [this message]

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=20200705174959.GY15485@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=r.czerwinski@pengutronix.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