Message ID | 1539522415-27551-4-git-send-email-bmeng.cn@gmail.com |
---|---|
State | Superseded |
Delegated to: | Simon Glass |
Headers | show
Return-Path: <u-boot-bounces@lists.denx.de> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="CWVli4cB"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 42Y1z24GXDz9s9J for <incoming@patchwork.ozlabs.org>; Mon, 15 Oct 2018 00:05:50 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 42DD1C21E3B; Sun, 14 Oct 2018 13:03:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=FREEMAIL_FROM, RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 518DCC21E15; Sun, 14 Oct 2018 13:02:21 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 16E30C21E35; Sun, 14 Oct 2018 13:02:11 +0000 (UTC) Received: from mail-pg1-f194.google.com (mail-pg1-f194.google.com [209.85.215.194]) by lists.denx.de (Postfix) with ESMTPS id CA010C21DD4 for <u-boot@lists.denx.de>; Sun, 14 Oct 2018 13:02:04 +0000 (UTC) Received: by mail-pg1-f194.google.com with SMTP id n31-v6so7880522pgm.7 for <u-boot@lists.denx.de>; Sun, 14 Oct 2018 06:02:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=fSQ3Lg/Smexiu4JZemwPT19oBmnNwFqE0XWnNqVsY+w=; b=CWVli4cBCLrrt2ogoaW0FXsmA/muk6yVJOt5oKBFfSIBPOisp7yfGdAPPGnYtEMDey W2MxJzEb73q0YFyIUpthJv1epXBnMtPeGYcraSGzunO1y5OSOCDBeFX/EwUiI35J1yPe Nd5q02rR9ohfDnXQQhPYQL+bITtIvSjpJHNIWtyCUb1p99COxJwBnK2VzaweXEMlTKoH DDDqGf1E+3XaJKCINw3Chy0ZP0/yO5qsUIe+s3vB0Z38ZVaCmBfKIjLM7xQrnif8CqJW vhuQjNig+QZmtMxaxsE7ol+pMMB21yLURvasJL3H4mmMc18BRCulU8GXoPxZPz7mxUsR Q19g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=fSQ3Lg/Smexiu4JZemwPT19oBmnNwFqE0XWnNqVsY+w=; b=ccHEKls6YXS8hz+ZGmJ/PWE/sMaDS8JUpVSSKV9aMNXqqUblfYTIyhNhq95Rmipsmc c5CqoH/9PJBgShMW170Vl2qPTM5mJm5Y194ScooZF0CT7ouIrdHh4VlnqrXx/j8Y7xEz qKT1YjY419AwiGbKLGl9N503py+dXu8zKcpCvcZQd8FhNYRYrq49uTHi1JZFPvitkxE6 WJ9S58TC4+oxuY2Sr/EL/ErgtYzvjCz40KIJ0vKrjw5xDW5HFJBAhYS6ARRhg3NzOIEc u9/ruVOhoSxtHsJV3W64UpxRs+BkoT49O4q5Bhskogj8eX3S5JPRB9Rw7bkbigG3Wesb ixSg== X-Gm-Message-State: ABuFfohrN4ZfFID/KhvbZTKvRbshRY6fUmqdNGiMZi5vdlW4mS108t85 yICSE6tsQ3pjs9N2DMnRenI= X-Google-Smtp-Source: ACcGV61qV+PyyUkHbRX4nrVuMnYtOPAdb2TI+c/LR4BiGR27A+dClh+j7yboG5dUBjC9A8dQnC2/6w== X-Received: by 2002:aa7:8598:: with SMTP id w24-v6mr13819991pfn.77.1539522123441; Sun, 14 Oct 2018 06:02:03 -0700 (PDT) Received: from ala-d2121-lx1.wrs.com (unknown-156-139.windriver.com. [147.11.156.139]) by smtp.gmail.com with ESMTPSA id g88-v6sm10643355pfd.181.2018.10.14.06.02.02 (version=TLS1_1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 14 Oct 2018 06:02:02 -0700 (PDT) From: Bin Meng <bmeng.cn@gmail.com> To: Simon Glass <sjg@chromium.org>, U-Boot Mailing List <u-boot@lists.denx.de> Date: Sun, 14 Oct 2018 06:06:27 -0700 Message-Id: <1539522415-27551-4-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1539522415-27551-1-git-send-email-bmeng.cn@gmail.com> References: <1539522415-27551-1-git-send-email-bmeng.cn@gmail.com> Subject: [U-Boot] [PATCH v2 03/31] riscv: bootm: Add dm_remove_devices_flags() call to do_bootm_linux() X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion <u-boot.lists.denx.de> List-Unsubscribe: <https://lists.denx.de/options/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=unsubscribe> List-Archive: <http://lists.denx.de/pipermail/u-boot/> List-Post: <mailto:u-boot@lists.denx.de> List-Help: <mailto:u-boot-request@lists.denx.de?subject=help> List-Subscribe: <https://lists.denx.de/listinfo/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=subscribe> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" <u-boot-bounces@lists.denx.de> |
Series |
virtio: Introduce VirtIO driver support
|
expand
|
diff --git a/arch/riscv/lib/bootm.c b/arch/riscv/lib/bootm.c index a7a9fb9..2b5ccce 100644 --- a/arch/riscv/lib/bootm.c +++ b/arch/riscv/lib/bootm.c @@ -9,9 +9,11 @@ #include <common.h> #include <command.h> #include <image.h> -#include <u-boot/zlib.h> #include <asm/byteorder.h> #include <asm/csr.h> +#include <dm/device.h> +#include <dm/root.h> +#include <u-boot/zlib.h> DECLARE_GLOBAL_DATA_PTR; @@ -57,6 +59,13 @@ int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images) /* we assume that the kernel is in place */ printf("\nStarting kernel ...\n\n"); + /* + * Call remove function of all devices with a removal flag set. + * This may be useful for last-stage operations, like cancelling + * of DMA operation or releasing device internal buffers. + */ + dm_remove_devices_flags(DM_REMOVE_ACTIVE_ALL); + cleanup_before_linux(); if (IMAGE_ENABLE_OF_LIBFDT && images->ft_len)
This adds a call to dm_remove_devices_flags() to do_bootm_linux() so that drivers that have one of the removal flags set (e.g. DM_FLAG_ACTIVE_DMA_REMOVE) in their driver struct, may do some last-stage cleanup before the OS is started. arm and x86 already did such, and we should do the same for riscv. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> --- Changes in v2: - new patch to add dm_remove_devices_flags() call to do_bootm_linux() for riscv bootm arch/riscv/lib/bootm.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)