From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CE196C433EF for ; Sat, 12 Mar 2022 14:35:43 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D92DC83AE2; Sat, 12 Mar 2022 15:35:40 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="r8iSicZy"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id BC88F83AE2; Sat, 12 Mar 2022 15:35:39 +0100 (CET) Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 836FF81DE9 for ; Sat, 12 Mar 2022 15:35:35 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=ilias.apalodimas@linaro.org Received: by mail-wr1-x435.google.com with SMTP id h15so17118602wrc.6 for ; Sat, 12 Mar 2022 06:35:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=t1CYqOiU+nkRwqC5u88sM27dov9HZzHiXDLeeNdU1aw=; b=r8iSicZy791FNL1Ecl4uzQGczxAmp65Xz5bsqiQb86oCm6u6O7zKfSvVxAU+NPMfqG IY1DBZqQRBjNCJD9FNLMHU5+z5RFp8Lh0XwZkw7j/Xj2DZF46XYmD4HFDZSETm+s1joh 3/l3vfr8Ic2OhH6uFiNFBg6Vb5a0bYB4WSZTupeHXTE5W+TBh7GfNTpPuEyX097izNMZ TQh+8vPA6jHgCPvcqq/FyHt6jbZRz2YqwcoMj5QfQttrrvSAvGxhb2+mtYbcHPyKrp3j 2suLR8Ad1uDKNfJb+1ooxusMv7rj6XkDL4iiqYVweE3FdgP6nCDshifUy7XmSaBukdEZ Q1DQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=t1CYqOiU+nkRwqC5u88sM27dov9HZzHiXDLeeNdU1aw=; b=4fWRSfcyBCFB25JLx2BrrUORh0D2hsCgtpiG6FMI/6NjEVvWTtFaJE2/qeeTSG145O dZh8QB33c7LBuh7sBfnMZ2a06st+PduipTdWqc3J48ei4hgXZ2NycVBO0dY8h2xee7lz HaPNyKy1l3OJUDh/ycqJ+O+vm+jOLmsUibI0EKTuILWKMPgML9UJdF6yNORHiiVI1tOE mmmgbJ0uUkDrCFjyMTC7mUvD+6lB6NY5XPVKcpK9KjSgzBmQwP9Q9IehdNU8U4uiwD8J 68PqM7satq7do2Ni0BMhqMBdUkHthHglYlfxdQbKK+kZcTVVtMdOtXE9bITmMnClqbjC C12w== X-Gm-Message-State: AOAM531bHv8prjj75ZTgcHCRZ4d87AnVIN1UrjX6vTbfZUmBQOJf+TeL /nc1GLdoV6D3j6FvYDzhJLO3oQ== X-Google-Smtp-Source: ABdhPJwz/XHmQq0zsNp5TxdZilZ15qWFp/Om8Ju8tG1jFeLM6/7H/hxCYcIJyU/jMd4dN+E1zlQYTw== X-Received: by 2002:a5d:47c3:0:b0:1f1:fad5:c332 with SMTP id o3-20020a5d47c3000000b001f1fad5c332mr10745736wrc.360.1647095735038; Sat, 12 Mar 2022 06:35:35 -0800 (PST) Received: from hades (athedsl-4461682.home.otenet.gr. [94.71.4.98]) by smtp.gmail.com with ESMTPSA id i5-20020a1c3b05000000b00382871cf734sm13470187wma.25.2022.03.12.06.35.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 12 Mar 2022 06:35:34 -0800 (PST) Date: Sat, 12 Mar 2022 16:35:31 +0200 From: Ilias Apalodimas To: Simon Glass Cc: U-Boot Mailing List , Dennis Gilmore , Lukas Auer , Tom Rini , Heinrich Schuchardt , Michal Simek , Daniel Schwierzeck , Steffen Jaeckel Subject: Re: [PATCH v4 13/33] bootstd: Add the bootstd uclass and core implementation Message-ID: References: <20220306125016.3133737-1-sjg@chromium.org> <20220306054945.v4.13.I3b5bc09d034cd72b2a9c604a0907c10abc05956a@changeid> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220306054945.v4.13.I3b5bc09d034cd72b2a9c604a0907c10abc05956a@changeid> X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean Hi Simon, + > +/* For now, bind the boormethod device if none are found in the devicetree */ > +int dm_scan_other(bool pre_reloc_only) > +{ > + struct udevice *bootstd; > + int ret; > + > + /* These are not needed before relocation */ > + if (!(gd->flags & GD_FLG_RELOC)) > + return 0; > + > + /* Create a bootstd device if needed */ > + uclass_find_first_device(UCLASS_BOOTSTD, &bootstd); > + if (!bootstd) { > + ret = device_bind_driver(gd->dm_root, "bootstd_drv", "bootstd", > + &bootstd); > + if (ret) > + return log_msg_ret("bootstd", ret); > + } > + > + return 0; > +} > + > +static const struct udevice_id bootstd_ids[] = { > + { .compatible = "u-boot,boot-std" }, > + { } > +}; > + > +U_BOOT_DRIVER(bootstd_drv) = { > + .id = UCLASS_BOOTSTD, > + .name = "bootstd_drv", > + .of_to_plat = bootstd_of_to_plat, > + .probe = bootstd_probe, > + .remove = bootstd_remove, > + .of_match = bootstd_ids, > + .priv_auto = sizeof(struct bootstd_priv), > +}; > + > +UCLASS_DRIVER(bootstd) = { > + .id = UCLASS_BOOTSTD, > + .name = "bootstd", > +#if CONFIG_IS_ENABLED(OF_REAL) > + .post_bind = dm_scan_fdt_dev, > +#endif > +}; > diff --git a/doc/device-tree-bindings/bootstd.txt b/doc/device-tree-bindings/bootstd.txt > new file mode 100644 > index 0000000000..f048b9dd32 > --- /dev/null > +++ b/doc/device-tree-bindings/bootstd.txt > @@ -0,0 +1,28 @@ > +U-Boot standard boot device (bootstd) > +===================================== > + > +This is the controlling device for U-Boot standard boot, providing a way to > +boot operating systems in a way that can be controlled by distros. A bit more info on how this can be controlled by distros would be helpful. What are you expecting from distros here? Most of the current installers (at least on x86 and armv8) set the Boot0000 to SHIM and assume the efibootmgr will take care of that. > + > +Required properties: > + > +compatible: "u-boot,boot-std" This needs to end up on every board controldtb? Or is there another way of defining those nodes? > + > +Optional properties: > + > +filename-prefixes: > + List of strings, each a directory to search for bootflow files > + > +bootdev-order: > + List of bootdevs to check for bootflows, each a bootdev label (the media > + uclass followed by the numeric sequence number of the media device) > + > + > +Example: > + > + bootstd { > + compatible = "u-boot,boot-std"; > + > + filename-prefixes = "/", "/boot/"; > + bootdev-order = "mmc2", "mmc1"; > + }; [...] Thanks /Ilias