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 3A8C9EB64D9 for ; Wed, 14 Jun 2023 09:40:00 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6DB248601B; Wed, 14 Jun 2023 11:37:11 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com 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=ti.com header.i=@ti.com header.b="njCSU1PE"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3A816862E5; Wed, 14 Jun 2023 11:36:55 +0200 (CEST) Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id B82C185FE5 for ; Wed, 14 Jun 2023 11:35:04 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=n-jain1@ti.com Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 35E9Z2mB120151; Wed, 14 Jun 2023 04:35:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1686735302; bh=FojKCZjDGjEJvFFlTcXBk5Q6cP+apNcoer0iG4PhZh4=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=njCSU1PEuph0LEW1MtIF2xwKSFUHswgFvHBjxZlVDaaLEOUMALWzowU3QyDVq2YO4 zfW5k1hg07FDonwJYB4a0vP5nAw8zYcP9ovQV8f9TIntBEDS3fbQI5W0uVye8/4Dpy zAa0gCsvlbIbR9GbqmtVhDewQzg0lo6eUXdwcKWg= Received: from DLEE111.ent.ti.com (dlee111.ent.ti.com [157.170.170.22]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 35E9Z2dG098508 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 14 Jun 2023 04:35:02 -0500 Received: from DLEE107.ent.ti.com (157.170.170.37) by DLEE111.ent.ti.com (157.170.170.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Wed, 14 Jun 2023 04:35:01 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DLEE107.ent.ti.com (157.170.170.37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Wed, 14 Jun 2023 04:35:01 -0500 Received: from localhost (ileaxei01-snat.itg.ti.com [10.180.69.5]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 35E9Z0sK120789; Wed, 14 Jun 2023 04:35:01 -0500 From: Nikhil M Jain To: CC: , , , , , Subject: [PATCH V3 7/8] common: spl: spl: Remove video driver Date: Wed, 14 Jun 2023 15:04:39 +0530 Message-ID: <20230614093440.52797-8-n-jain1@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230614093440.52797-1-n-jain1@ti.com> References: <20230614093440.52797-1-n-jain1@ti.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 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 Use config SPL_VIDEO_REMOVE to remove video driver at SPL stage before jumping to next stage, in place of CONFIG_SPL_VIDEO, to allow user to remove video if required. Signed-off-by: Nikhil M Jain Reviewed-by: Devarsh Thakkar --- V3: - Replace #if defined(CONFIG_SPL_VIDEO_REMOVE) with if (IS_ENABLED(CONFIG_SPL_VIDEO_REMOVE). V2: - Add Reviewed-by tag. common/spl/spl.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/common/spl/spl.c b/common/spl/spl.c index 13b55e9769..79291abeae 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -891,18 +891,18 @@ void board_init_r(gd_t *dummy1, ulong dummy2) debug("Failed to stash bootstage: err=%d\n", ret); #endif -#if defined(CONFIG_SPL_VIDEO) - struct udevice *dev; - int rc; - - rc = uclass_find_device(UCLASS_VIDEO, 0, &dev); - if (!rc && dev) { - rc = device_remove(dev, DM_REMOVE_NORMAL); - if (rc) - printf("Cannot remove video device '%s' (err=%d)\n", - dev->name, rc); + if (IS_ENABLED(CONFIG_SPL_VIDEO_REMOVE)) { + struct udevice *dev; + int rc; + + rc = uclass_find_device(UCLASS_VIDEO, 0, &dev); + if (!rc && dev) { + rc = device_remove(dev, DM_REMOVE_NORMAL); + if (rc) + printf("Cannot remove video device '%s' (err=%d)\n", + dev->name, rc); + } } -#endif spl_board_prepare_for_boot(); jump_to_image_no_args(&spl_image); -- 2.34.1