Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2349463pxb; Fri, 5 Feb 2021 16:02:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJyhPmfNlzNWPWaSQTmvf1ydWaT0APj1KFU950B6GRB/JyeewBz02atvNguDuE2fKQGW+lKo X-Received: by 2002:a17:906:7687:: with SMTP id o7mr6359089ejm.209.1612569727346; Fri, 05 Feb 2021 16:02:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612569727; cv=none; d=google.com; s=arc-20160816; b=vrzkxpY2JEILBy4CwT4JSwErAZEp4TgeKNv7kUd6wQnuIm6IwvSPXBo5pFxqT2CMy0 kA6jYcvAarimlEoo4vvE7ZA5eNouJ7e7YGxzKIPP6MY/iSpi5AGmbkYCEovGmKZDdqJg tNQG/XXU3TIk7HFma5UlqlD3HBDBzhAnx+gY0B87KbFoGgaEyNMt/FkOlNteFEtGl09d s3YYrkhcUQQh7xDY+3R4ps087t5oU2GIKdT+8AJSNsn55GmZl30jmksQ3p0mfJJGJvKB HrRjBvW52n63BN0vslEeuXjkkbJdhUWIPuTHVD9EytxtGlQZPmCKsk40ZpZIP7O8Vq+4 O76g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=mV2U8a3uIQjcke602KeRYbIBsmpMLJ7CIIB0ApCigP8=; b=SL5DE5cQ1LMvyf7Uet0ofVeV7lsitBXQ3rIbBPm8x6Oyee5kM97Q0mmaJRYJPGAmBU 9w+A+wHSUM4zdAoPjVdfStE6aUF3/U8DDWqC8kypA6/C2f/Pn29Sm1LfZQWIiBV+hllm K7lsGrCa9M4v8ps1dhwGMCKvyJjpdoEIiyxjo+rIZ47Uw++1k2kByUIJIYASrCi0HTkW SEzH2MgedsOiSsACeGI61pICYsJ1xy/Tsjg/99XjhCzLC9lzVafZKuVh1YQnELOHl7ne VGMZW4L0NbQaZlaiEXqc7t5i4V8LS7FgLXhoWLA9tN553zIbTln7s/0EanYEGFUDpXJy wZqQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ku3si6187180ejc.497.2021.02.05.16.01.43; Fri, 05 Feb 2021 16:02:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229927AbhBEX6X (ORCPT + 99 others); Fri, 5 Feb 2021 18:58:23 -0500 Received: from mx2.suse.de ([195.135.220.15]:59188 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231622AbhBEN4U (ORCPT ); Fri, 5 Feb 2021 08:56:20 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 241F5AEC4; Fri, 5 Feb 2021 13:53:02 +0000 (UTC) From: Nicolas Saenz Julienne To: f.fainelli@gmail.com, Saenz Julienne , bcm-kernel-feedback-list@broadcom.com, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, Ray Jui , Scott Branden Cc: phil@raspberrypi.com, wahrenst@gmx.net, linux-kernel@vger.kernel.org Subject: [RFC/PATCH 06/11] soc: bcm: bcm2835-power: Bypass power_on/off() calls Date: Fri, 5 Feb 2021 14:52:42 +0100 Message-Id: <20210205135249.2924-7-nsaenzjulienne@suse.de> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210205135249.2924-1-nsaenzjulienne@suse.de> References: <20210205135249.2924-1-nsaenzjulienne@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Bypass power_on/power_off() when running on BCM2711 as they are not needed. Signed-off-by: Nicolas Saenz Julienne --- drivers/soc/bcm/bcm2835-power.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/soc/bcm/bcm2835-power.c b/drivers/soc/bcm/bcm2835-power.c index 17bc71fd243c..ea65f459161d 100644 --- a/drivers/soc/bcm/bcm2835-power.c +++ b/drivers/soc/bcm/bcm2835-power.c @@ -197,6 +197,10 @@ static int bcm2835_power_power_off(struct bcm2835_power_domain *pd, u32 pm_reg) { struct bcm2835_power *power = pd->power; + /* We don't run this on BCM2711 */ + if (power->arsan_asb) + return 0; + /* Enable functional isolation */ PM_WRITE(pm_reg, PM_READ(pm_reg) & ~PM_ISFUNC); @@ -218,6 +222,10 @@ static int bcm2835_power_power_on(struct bcm2835_power_domain *pd, u32 pm_reg) int inrush; bool powok; + /* We don't run this on BCM2711 */ + if (power->arsan_asb) + return 0; + /* If it was already powered on by the fw, leave it that way. */ if (PM_READ(pm_reg) & PM_POWUP) return 0; -- 2.30.0