From patchwork Tue Nov 20 17:19:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Anholt X-Patchwork-Id: 10690951 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C63EF5A4 for ; Tue, 20 Nov 2018 17:30:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AB2C52ACCB for ; Tue, 20 Nov 2018 17:30:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9F4162ACD3; Tue, 20 Nov 2018 17:30:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 271412ACCB for ; Tue, 20 Nov 2018 17:30:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=TSXI9NhsGNxet9OikPF3MPvXD9gKq/nRLn06nHwIQ1U=; b=lvtiGzEawM4LwM 04j48eFjWaC4qOoMFSFtLhGkqKLZblOwQM9Z8VShFopzncsxMPQnDjv6uyh7vtJdy9KN0TUiUa13R L1YljbX9qLMzWw9K06TxjRyEsP4YYA/du3QAyQOkJUuTKTMOcYh8Cjx3jn/Jd8LIPD15S8RV3x+W6 VFx6nFkDC3jwLdjasaFUkg0VzTjbKCT5wB7jFZ7Fk4vpgjRGuok3CBhhOZyvF2JqY10i2zCuvFFVF CSJhwZ7L399+Dqv17oeQ9wKlOsF46LqXeCd2TdIHyuw7CUdsn7ptaSP35iayJxos3a0IoNqBo1p9i r8IJ6Ckj4632bYtFE3jg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gP9r9-0006d7-Ie; Tue, 20 Nov 2018 17:30:35 +0000 Received: from anholt.net ([50.246.234.109]) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gP9qH-0004Ji-QN; Tue, 20 Nov 2018 17:29:49 +0000 Received: from localhost (localhost [127.0.0.1]) by anholt.net (Postfix) with ESMTP id F03D310A1757; Tue, 20 Nov 2018 09:20:03 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at anholt.net Received: from anholt.net ([127.0.0.1]) by localhost (kingsolver.anholt.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id g9VorqpWc3N6; Tue, 20 Nov 2018 09:20:01 -0800 (PST) Received: from eliezer.anholt.net (localhost [127.0.0.1]) by anholt.net (Postfix) with ESMTP id 310D010A0AE6; Tue, 20 Nov 2018 09:20:01 -0800 (PST) Received: by eliezer.anholt.net (Postfix, from userid 1000) id 0848E2FE1FE6; Tue, 20 Nov 2018 09:20:00 -0800 (PST) From: Eric Anholt To: Florian Fainelli , Rob Herring , Mark Rutland , Wim Van Sebroeck , Guenter Roeck , linux-watchdog@vger.kernel.org Subject: [PATCH 0/8] BCM2835 PM driver Date: Tue, 20 Nov 2018 09:19:52 -0800 Message-Id: <20181120172000.15102-1-eric@anholt.net> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181120_092942_252503_C9464F83 X-CRM114-Status: GOOD ( 15.64 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Stefan Wahren , linux-kernel@vger.kernel.org, Eric Anholt , bcm-kernel-feedback-list@broadcom.com, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This series moves the BCM2835 WDT driver that controls a fraction of the PM block out to soc/ and adds most of the rest of its functionality. My motivation has been to have V3D be functional without firmware calls, probably improve its interactivity (since we'll be able to power on/off without RPC to the firmware that may be busy with other tasks), and (in a patch not submitted in this series) extend its binding to use the reset controller instead of trying to reset by toggling its power domain. I've tested V3D with a few hours of running a V3D test, sleep(1) (to trigger PM domain off); running a GPU hang job (to trigger reset); sleep(1). The non-hanging success-case job always passed, and dmesg had no complaints from bcm2835-pm. The other power domains are not tested, but I've done my best. This series will probably also be of interest to the https://github.com/christinaa/rpi-open-firmware project for enabling USB. Eric Anholt (8): watchdog: bcm2835: Move the driver to the soc/ directory. soc: bcm: bcm2835-pm: Rename the driver to its new "PM" name. soc: bcm: bcm2835-pm: Stop using _relaxed mmio accessors. soc: bcm: bcm2835-pm: Make some little accessor macros for the mmio area. dt-bindings: soc: Add a new binding for the BCM2835 PM node. soc: bcm: bcm2835-pm: Add support for power domains under a new binding. ARM: bcm283x: Extend the WDT DT node out to cover the whole PM block. ARM: bcm283x: Switch V3D over to using the PM driver instead of firmware. .../bindings/soc/bcm/brcm,bcm2835-pm.txt | 42 + arch/arm/boot/dts/bcm2835-rpi.dtsi | 4 - arch/arm/boot/dts/bcm283x.dtsi | 16 +- arch/arm/mach-bcm/Kconfig | 1 + drivers/soc/bcm/Makefile | 1 + drivers/soc/bcm/bcm2835-pm.c | 866 ++++++++++++++++++ drivers/watchdog/Kconfig | 11 - drivers/watchdog/Makefile | 1 - drivers/watchdog/bcm2835_wdt.c | 254 ----- include/dt-bindings/soc/bcm2835-pm.h | 28 + 10 files changed, 951 insertions(+), 273 deletions(-) create mode 100644 Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.txt create mode 100644 drivers/soc/bcm/bcm2835-pm.c delete mode 100644 drivers/watchdog/bcm2835_wdt.c create mode 100644 include/dt-bindings/soc/bcm2835-pm.h