Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp2027569lqb; Mon, 27 May 2024 05:47:45 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV6LwfRH7NcnExxmHBlnyt+XZvpMMYoAc9vxx0emxOWMizkOPp+k2Px2hr2rB4RND6KeBs6HRlQ1TgJnr6U7DbdzVqbjIJhVeVYVfNV5A== X-Google-Smtp-Source: AGHT+IEFAiGpu3FNlXYKcC+/PYBMHDOLoAa0CKzasrvOtpDkVatOWlYbS5xswxwMh9L2UYKmgVOd X-Received: by 2002:a17:902:c40e:b0:1ea:26bf:928 with SMTP id d9443c01a7336-1f4497d4f41mr100524605ad.50.1716814064973; Mon, 27 May 2024 05:47:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716814064; cv=pass; d=google.com; s=arc-20160816; b=nXH1voYcfLSAjEcwO58NoyoerJdDdZieNi5scb70i7xFYS68Cqcfn+I2e/2evkVfXM wsRQt8RaLz6udn90MCkO4AE8NZDReJ1ROL9hq2ThjYEuLonfwSCfrm+W0S3JOH+fjYr3 0qnKWvwgktb4AF4yo6rfrTE9tGTei1Ctp5Ax9OaKzPgkFLtBvGzcV6mSDd5OD0viNhoP dd3ZvEvkOSUhr6SmLepEI2cSLg3eBxZvxZpMqSKo39A3/7ILXY6RxIFqoSdV/ErwdWLc 0atqf9AiYnSst65i0t+PQr6WF2hTDWKNq3aEdkBIxgalFrcdmovA5GZU53Rr55i3/3Ea Kljw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=WdZ2JoPc6GK3xkvUw45h9gmKwq919LmOrFTSZvBezn0=; fh=JhTdWYFZ8w88n/94sqvWELMCujglPo7hfkIbZpbglA4=; b=CNzjR4i2xWI2tQxYdp0LZuN0tm0CE+VMjXklKYRzhuio78KuzzIBWeSkfsnfWAAuFU DWURCSEK18vpibHZrTR0HvO8spSBt2d7NZ6wH6GJ7zTJurZ/Pl90Hrsmc+VXtm4Q3Ylv Do4wPv56mrHByvHEBxxRmFdDpX4AkT2pCwlUCSgJVjNWMk/N8MBHbWI9Wps98MhifDhF 24H65LD5+e20atiqPmC4Ocz6l5eKYICLqRP5h7GgVodjf55yp3ocdLp0vtSbPiqA/eQC MlwHZGBMGtZlfo8OgCNKBY6A9kP5OKal5igcLgDI1YfZtWtGAGhjKLeKgXuv30/nl66o CDFA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-190605-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-190605-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d9443c01a7336-1f48faddff2si22595395ad.445.2024.05.27.05.47.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 05:47:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-190605-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-190605-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-190605-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 923A1282B8C for ; Mon, 27 May 2024 12:47:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4F7CC4D5A2; Mon, 27 May 2024 12:47:39 +0000 (UTC) Received: from weierstrass.telenet-ops.be (weierstrass.telenet-ops.be [195.130.137.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 89B6C13AD12 for ; Mon, 27 May 2024 12:47:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.130.137.81 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716814058; cv=none; b=OMDqyoiy/lCFu7gwlLBJDQjWFn6vxhw5dJbiBZzsQDhiw8emoOgDgCNzOd0REZza7kWvm0UmhUcDu9VjY7ZdgKMazKGJy6WpWyDpQIgT01TM5QJWaBeFEJ72fLQxJyy2oO8AhG++911ma2DVyT4QdaR7jsgkp+y40ydt1Yjlq80= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716814058; c=relaxed/simple; bh=/6WTDSc5iLDDk2l/Y6xCKmU+DGYC5Ga9O6+yrTK+INs=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=PrL8QGthbSEQQhexYjH2gbvgSGVkhumSbyofSH+GOhYLvXHavy+vGQqYGBx/dAfeVVBw8mdN3gu8VLMmfRJFXv4StPpalIzQW1IOpP6SVy5PJkLlrKA/gv5zToXXzDAF1Phpawl9MwTJN3xLiVERNu0SmJbm7lkSdRjg6F0eTCQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=glider.be; spf=none smtp.mailfrom=linux-m68k.org; arc=none smtp.client-ip=195.130.137.81 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=glider.be Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux-m68k.org Received: from michel.telenet-ops.be (michel.telenet-ops.be [IPv6:2a02:1800:110:4::f00:18]) by weierstrass.telenet-ops.be (Postfix) with ESMTPS id 4VnwHq25NSz4x728 for ; Mon, 27 May 2024 14:41:27 +0200 (CEST) Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed80:c993:5573:f894:7353]) by michel.telenet-ops.be with bizsmtp id UChF2C0022nC7mg06ChFXw; Mon, 27 May 2024 14:41:19 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtp (Exim 4.95) (envelope-from ) id 1sBZeD-00CfTk-6G; Mon, 27 May 2024 14:41:15 +0200 Received: from geert by rox.of.borg with local (Exim 4.95) (envelope-from ) id 1sBZf8-003hdh-UO; Mon, 27 May 2024 14:41:14 +0200 From: Geert Uytterhoeven To: Ulf Hansson , Greg Kroah-Hartman , Jiri Slaby , "Rafael J . Wysocki" , Rob Herring , Saravana Kannan Cc: Claudiu Beznea , Peng Fan , linux-pm@vger.kernel.org, linux-serial@vger.kernel.org, linux-renesas-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCHPATCH 3/3] pmdomain: renesas: rmobile-sysc: Remove serial console handling Date: Mon, 27 May 2024 14:41:13 +0200 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Since commit a47cf07f60dcb02d ("serial: core: Call device_set_awake_path() for console port"), the serial driver properly handles the case where the serial console is part of the awake path, so the special serial console handling can be removed from the R-Mobile SYSC PM Domain driver. The PM Domain containing the serial port can now be powered down when none of its devices are in use. Before, it was only powered down during s2ram without no_console_suspend. Signed-off-by: Geert Uytterhoeven --- drivers/pmdomain/renesas/rmobile-sysc.c | 33 +------------------------ 1 file changed, 1 insertion(+), 32 deletions(-) diff --git a/drivers/pmdomain/renesas/rmobile-sysc.c b/drivers/pmdomain/renesas/rmobile-sysc.c index 0b77f37787d58f48..cc1f6f8b7a746850 100644 --- a/drivers/pmdomain/renesas/rmobile-sysc.c +++ b/drivers/pmdomain/renesas/rmobile-sysc.c @@ -10,7 +10,6 @@ * Copyright (C) 2011 Magnus Damm */ #include -#include #include #include #include @@ -31,8 +30,6 @@ struct rmobile_pm_domain { struct generic_pm_domain genpd; - struct dev_power_governor *gov; - int (*suspend)(void); void __iomem *base; unsigned int bit_shift; }; @@ -49,13 +46,6 @@ static int rmobile_pd_power_down(struct generic_pm_domain *genpd) unsigned int mask = BIT(rmobile_pd->bit_shift); u32 val; - if (rmobile_pd->suspend) { - int ret = rmobile_pd->suspend(); - - if (ret) - return ret; - } - if (readl(rmobile_pd->base + PSTR) & mask) { writel(mask, rmobile_pd->base + SPDCR); @@ -98,7 +88,6 @@ static int rmobile_pd_power_up(struct generic_pm_domain *genpd) static void rmobile_init_pm_domain(struct rmobile_pm_domain *rmobile_pd) { struct generic_pm_domain *genpd = &rmobile_pd->genpd; - struct dev_power_governor *gov = rmobile_pd->gov; genpd->flags |= GENPD_FLAG_PM_CLK | GENPD_FLAG_ACTIVE_WAKEUP; genpd->attach_dev = cpg_mstp_attach_dev; @@ -110,22 +99,12 @@ static void rmobile_init_pm_domain(struct rmobile_pm_domain *rmobile_pd) __rmobile_pd_power_up(rmobile_pd); } - pm_genpd_init(genpd, gov ? : &simple_qos_governor, false); -} - -static int rmobile_pd_suspend_console(void) -{ - /* - * Serial consoles make use of SCIF hardware located in this domain, - * hence keep the power domain on if "no_console_suspend" is set. - */ - return console_suspend_enabled ? 0 : -EBUSY; + pm_genpd_init(genpd, &simple_qos_governor, false); } enum pd_types { PD_NORMAL, PD_CPU, - PD_CONSOLE, PD_DEBUG, PD_MEMCTL, }; @@ -184,10 +163,6 @@ static void __init get_special_pds(void) for_each_of_cpu_node(np) add_special_pd(np, PD_CPU); - /* PM domain containing console */ - if (of_stdout) - add_special_pd(of_stdout, PD_CONSOLE); - /* PM domains containing other special devices */ for_each_matching_node_and_match(np, special_ids, &id) add_special_pd(np, (uintptr_t)id->data); @@ -227,12 +202,6 @@ static void __init rmobile_setup_pm_domain(struct device_node *np, pd->genpd.flags |= GENPD_FLAG_ALWAYS_ON; break; - case PD_CONSOLE: - pr_debug("PM domain %s contains serial console\n", name); - pd->gov = &pm_domain_always_on_gov; - pd->suspend = rmobile_pd_suspend_console; - break; - case PD_DEBUG: /* * This domain contains the Coresight-ETM hardware block and -- 2.34.1