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 05E44C001DC for ; Thu, 27 Jul 2023 06:31:50 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 833B08679B; Thu, 27 Jul 2023 08:31:45 +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="Wsrsut87"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 48A17862AE; Thu, 27 Jul 2023 08:31:40 +0200 (CEST) Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) (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 32CCC8677D for ; Thu, 27 Jul 2023 08:31:36 +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 lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 36R6VYhe019937; Thu, 27 Jul 2023 01:31:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1690439494; bh=68hKghhloBau39PJB85gAzd9HAk19+5L6WzUbZm+3oQ=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=Wsrsut87yOtzqhKP0ipe93sbwBtXOSo6AgFDYQ0BoFwpf4Y3yxjTGQrRiik9daec6 rM4OBwRpZznG5/LZ3xJXsk5aXEJFqB1alygqFNtDuI2oiy9fWulh5Rcdey8x1pAuaA N8BE9DfLaRRYzfwnCVwz2DlLuVLFDq5J2mdhxxJg= Received: from DFLE114.ent.ti.com (dfle114.ent.ti.com [10.64.6.35]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 36R6VYnB119500 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 27 Jul 2023 01:31:34 -0500 Received: from DFLE105.ent.ti.com (10.64.6.26) by DFLE114.ent.ti.com (10.64.6.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Thu, 27 Jul 2023 01:31:33 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DFLE105.ent.ti.com (10.64.6.26) 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; Thu, 27 Jul 2023 01:31:33 -0500 Received: from localhost (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 36R6VXQj089198; Thu, 27 Jul 2023 01:31:33 -0500 From: Nikhil M Jain To: CC: , , , , Subject: [PATCH 2/2] drivers: video: tidss: tidss_drv: Use kconfig VIDEO_REMOVE to remove video Date: Thu, 27 Jul 2023 12:01:26 +0530 Message-ID: <20230727063126.53347-3-n-jain1@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230727063126.53347-1-n-jain1@ti.com> References: <20230727063126.53347-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 Perform removal of DSS if kconfigs VIDEO_REMOVE or SPL_VIDEO_REMOVE is set by user. Otherwise if above Kconfigs are not selected, it is assumed that user wants splash screen to be displayed until linux kernel boots up. In such scenario, leave the power domain of DSS as "on" so that splash screen stays intact until kernel boots up. Signed-off-by: Nikhil M Jain --- drivers/video/tidss/tidss_drv.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/video/tidss/tidss_drv.c b/drivers/video/tidss/tidss_drv.c index 623bf4cf31..e285f255d7 100644 --- a/drivers/video/tidss/tidss_drv.c +++ b/drivers/video/tidss/tidss_drv.c @@ -901,9 +901,11 @@ static int tidss_drv_probe(struct udevice *dev) static int tidss_drv_remove(struct udevice *dev) { - struct tidss_drv_priv *priv = dev_get_priv(dev); + if (CONFIG_IS_ENABLED(VIDEO_REMOVE)) { + struct tidss_drv_priv *priv = dev_get_priv(dev); - VP_REG_FLD_MOD(priv, 0, DSS_VP_CONTROL, 0, 0, 0); + VP_REG_FLD_MOD(priv, 0, DSS_VP_CONTROL, 0, 0, 0); + } return 0; } @@ -929,5 +931,9 @@ U_BOOT_DRIVER(tidss_drv) = { .probe = tidss_drv_probe, .remove = tidss_drv_remove, .priv_auto = sizeof(struct tidss_drv_priv), +#if CONFIG_IS_ENABLED(VIDEO_REMOVE) .flags = DM_FLAG_OS_PREPARE, +#else + .flags = DM_FLAG_OS_PREPARE | DM_FLAG_LEAVE_PD_ON, +#endif }; -- 2.34.1