Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp958633imu; Tue, 20 Nov 2018 09:24:23 -0800 (PST) X-Google-Smtp-Source: AFSGD/W12GWVDJGmdsIalwTvMUaMrsnVvhXBTNaPtnUi1lx+beb1j4Nht04ezNtfjjCUiFAkkF/M X-Received: by 2002:a17:902:6b87:: with SMTP id p7-v6mr3160269plk.282.1542734663828; Tue, 20 Nov 2018 09:24:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542734663; cv=none; d=google.com; s=arc-20160816; b=FP+CbOlq1hApdh0chIt1DzZrGBX+OJk7l2TgtBkBa8Jpy+H5IU8RvAtMeQWsqnXRfx xg+rpLsyiIBE29VFZU+CJeQiu/cLM5krHYosMhXpBrglo1CFdjJO9E9CceyWHDHAVjBn NY/nSrZo6VlhF4vqDul1WVU/BuNmJKwwQ5IKfU1V6L1elMdSm5IAW9UqAGktq+PNIpHy QqgcEcIBtPwoctlRKjKXa/rK3IPcYolHxcJodLoFy1q4iStILMsbiPsrM7sR4HWgLMcH Zhw0sH0f1b2c7OLwYKBycMCW0b8TYbEkNW4+QT3de5I48uG2dV3r5fONQtjXTPj09YgX KHUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=Z5YPpuHyGwKcsrjhZRVNFhYbWzUkLEXOpZtORZHgJ6g=; b=qg/qnqOevLl4Ah1sm2yg/DgjspP5B6Cany5WKgUmn8JO1pO1NQR2oshJb+v3gxSIni ockyWjz7kurOA5VCxNC+SzZtFsWPzTbLlXG6UzQvEMPmORTYrnSjA59wjhy/f4xuotTm yvJNMePLMiMBffRRFfkWuQkiZ5gmxXQwq4BAmzTY0U4kd4jepARub4NBv8e+HOP0bDEU Fi2emBuYieu3MGxPgiJ30PYAv+PQyiU2SCf98PUjxjlGi6Ubk3FfMBpucUaUh+mUx8YS 6JV9rsOK+0rCgvA89XrgTl5I6Yn4e3u2pLO0bQ5E71KDQMKCyXQfXhz2l9jjUeZpDmdR zWXA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c17si18292646pfb.81.2018.11.20.09.24.00; Tue, 20 Nov 2018 09:24:23 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730431AbeKUDuR (ORCPT + 99 others); Tue, 20 Nov 2018 22:50:17 -0500 Received: from anholt.net ([50.246.234.109]:50630 "EHLO anholt.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730415AbeKUDuR (ORCPT ); Tue, 20 Nov 2018 22:50:17 -0500 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 Cc: linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Stefan Wahren , bcm-kernel-feedback-list@broadcom.com, Eric Anholt 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 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 -- 2.19.1