From patchwork Thu Jun 1 16:22:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1789215 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=fP9us7TS; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QXBLm07xjz20Py for ; Fri, 2 Jun 2023 02:25:20 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 54B908633C; Thu, 1 Jun 2023 18:24:40 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="fP9us7TS"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A0EE886334; Thu, 1 Jun 2023 18:24:34 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-il1-x134.google.com (mail-il1-x134.google.com [IPv6:2607:f8b0:4864:20::134]) (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 593AF8615F for ; Thu, 1 Jun 2023 18:24:30 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-il1-x134.google.com with SMTP id e9e14a558f8ab-33b4b70693eso4244225ab.1 for ; Thu, 01 Jun 2023 09:24:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1685636669; x=1688228669; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=vob1NO6gdLAu9ZiFaTQljyEOCjRamHqxc5ztPZOqbEE=; b=fP9us7TSouc1RDucGzEScG3A5ZuBVR3C6qGPPkAT0c1uvzdPFC50+W7geu/7SBfQBf hJZGe7DxCsn0m9ZINW6AeI579lF76zyQofWSex25fUCFMN3u2Gb3g3hn88V0itjno5lH ihrn3kZeSCtG82ll713EXWWrelrtVLYeJF6T4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685636669; x=1688228669; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vob1NO6gdLAu9ZiFaTQljyEOCjRamHqxc5ztPZOqbEE=; b=da1mkC/FUREElbuq6HI0nvdB/2i2DkGA+9Gl6ukHCDX5k4QtAibUAobHwtRvx/UUi1 WHr0umi3z4tboXMSgLQjlUVZppx9V2dUJvtmubTiuDAw7XSXAcpA/WwjFs3YBR50Zb2y o1BO9rmwofj7jlBJdL1+cSYtgpL03r7I28i/3gpjDmDpxutEYUodPMoZxVViK2E9u8n3 Fldvqwov4HtexaS68wpzIuRUX4Nnnkh5CeOoJDTE2eIfbB3Iw2QgSE51siZdzBOb7eeF 0qqIxH+Tr1T1MGXRfHtwkXeTtYPYxMSZnlhU4NWKYClWdaoyQyawJkJnETNmx64heydI cMFA== X-Gm-Message-State: AC+VfDyLb2Wuf05Cm2iO4kzVyog2PzlAywqSgzOJ6Xke/HzIpyK3ZvfG sa8us5a4EZR3GkBLjKbngy/5XzAT1GYZD/1sh3I= X-Google-Smtp-Source: ACHHUZ5oh0+uanEXF+15Iogr8CObsPr7M8hFznQxZPierYMexwrwBMJ7yQuyQRR07BwlvrLG95brTQ== X-Received: by 2002:a92:d492:0:b0:33b:dfef:909c with SMTP id p18-20020a92d492000000b0033bdfef909cmr6545587ilg.31.1685636668905; Thu, 01 Jun 2023 09:24:28 -0700 (PDT) Received: from sjg1.lan (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id l1-20020a922901000000b0033a6e7ee4e3sm3862098ilg.1.2023.06.01.09.24.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Jun 2023 09:24:28 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Heinrich Schuchardt , Tom Rini , Simon Glass Subject: [PATCH 04/40] sandbox: Fix quiting when the LCD window is closed Date: Thu, 1 Jun 2023 10:22:28 -0600 Message-ID: <20230601102257.4.Icc4af734ed817c02ade1e0033fc588a778dbc99f@changeid> X-Mailer: git-send-email 2.41.0.rc0.172.g3f132b7071-goog In-Reply-To: <20230601162404.220488-1-sjg@chromium.org> References: <20230601162404.220488-1-sjg@chromium.org> MIME-Version: 1.0 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.8 at phobos.denx.de X-Virus-Status: Clean With recent changes to how sandbox handles reset, closing the window currently just restarts sandbox. Use the correct sysreset type to tell it to shut down. Signed-off-by: Simon Glass --- arch/sandbox/cpu/sdl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/sandbox/cpu/sdl.c b/arch/sandbox/cpu/sdl.c index 2c570ed8d164..590e406517bf 100644 --- a/arch/sandbox/cpu/sdl.c +++ b/arch/sandbox/cpu/sdl.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include @@ -81,7 +82,7 @@ static void sandbox_sdl_poll_events(void) switch (event.type) { case SDL_QUIT: puts("LCD window closed - quitting\n"); - reset_cpu(); + sysreset_walk(SYSRESET_POWER_OFF); break; } }