Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1439370ybz; Wed, 22 Apr 2020 21:44:39 -0700 (PDT) X-Google-Smtp-Source: APiQypI5dHgX2UZsUOSmvHI+07Wx8FjCDQl8lLjfyVGwLT+vu16dV7L97EkqP+Bv41dQ9DLT2SGG X-Received: by 2002:a17:906:1387:: with SMTP id f7mr1149263ejc.333.1587617079093; Wed, 22 Apr 2020 21:44:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587617079; cv=none; d=google.com; s=arc-20160816; b=m7gD4rEe+EYesUaXsd5Z272wlZDEblGEDlT8l3YShq9xS6VjSZIi7b5htQ+UYdxMU8 rhI9SnwRr+iX9UgWgSZ5PyhJDhO9Q9LcAzJrCtTf5NM0BMlNC8HMXvkxBXT3k87xF+zc 93iW9vM4GoatEbmpNAogBb87VdtNQd2vE6IY9ZENPLh/kSYVNF+wcskVIE10JQBq75+E 5FMoVebR1gZqhQ9Lvl8nQbNIbIKRfJDdvR/k0PBz8gt2ituOXuAhfzdTeUYWBB+swcVS 6ng76uM5VoUhxV+36i8mUd2Io+gjZ3mR9CuORliBN4HB6GHWZI+tsh6ZE+nlv1PJALV3 Q1wA== 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:dkim-signature; bh=ZS/LLxJx1Ds3cx4GyxEdNHynphtX9//TxQ2D60w281c=; b=rQk494rLHPgBxLbASCs5cEmhhGO3jlsXs0+H+btkgo8Ha22qog4XGc0EiUQS/6XlUw jqydRWmDlKMwm9LF00vIGu/FAZ82o3nu7LrnkMEBq6c1PodMYWhkix872xqvFML3GIsB 21FgBHRG8i1+JG4z98/dqKhvRNxQPocFzOHQ227Hyd7cPJPqhX1dUA32ZGJvvpMQdTBD lEYZr4fMhXAhNAtfRCuz7bjC/uJotozpp25OP9uSwK3jkFMQgyA64NEN7371/7fnfAIc NlPU8Eq5N5dtiCVcZP7CsEiWKNA0FW8AuYzx4ECnjw1kc0NCL7QfJpqAt40xl5uDS6Us TIiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=gYhBQHtg; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f25si251103edw.292.2020.04.22.21.44.16; Wed, 22 Apr 2020 21:44:39 -0700 (PDT) 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; dkim=pass header.i=@chromium.org header.s=google header.b=gYhBQHtg; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726027AbgDWEkw (ORCPT + 99 others); Thu, 23 Apr 2020 00:40:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36734 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725867AbgDWEkw (ORCPT ); Thu, 23 Apr 2020 00:40:52 -0400 Received: from mail-pf1-x442.google.com (mail-pf1-x442.google.com [IPv6:2607:f8b0:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F409EC03C1AF for ; Wed, 22 Apr 2020 21:40:51 -0700 (PDT) Received: by mail-pf1-x442.google.com with SMTP id x77so2329089pfc.0 for ; Wed, 22 Apr 2020 21:40:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ZS/LLxJx1Ds3cx4GyxEdNHynphtX9//TxQ2D60w281c=; b=gYhBQHtg6aVgFNpAsuZicqx3KgF2/EI40v9gzc+TTBaO0INthZs4oK+6OZXVHVVtPe tPKKq9v1HCjoEgO5iaf0wkIiVty4kBHme2dDPZddnnYYIlh5/960j2SdgVnZtDMaofDG eXV23e91++ocupsga5mbViaM8WsQYNSK8c1HE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ZS/LLxJx1Ds3cx4GyxEdNHynphtX9//TxQ2D60w281c=; b=SZevwxFOMo7GAYFrDuspCMHj471T/dZ6waBZcCIpMLVT2NDQLZqMpOJD1WuyfwDGal idZRaQKQStD6pxNTmK/2pX8O2+IrXU/XfLcC7XmLPL6adbIaQluvnzcT0Wmxvp55HH2Y xXeQM1O+0neZAbOH330g2rpxidqSVHp5xVDQWsL2NQcep5WH0se1Xjl62To64p3+G18v uYeqWUIgtJJMNRmQeYEcaabTJ9X9yYO0LLPXnlId2cGqA7SeRB+ZLHfy2nixbZEtJ/vb 9JWEuFtl2SbKVd3X2MAtCC7G9hsMal+KnqMuVlydjKZy+Ni3teCMRS6WWgzr9S9vlxJs B10A== X-Gm-Message-State: AGi0PubuBkcVhUxuDnZrsbcnKJ1fuEjEajtc4y+RJ8DHVWLUjAgFNUZc qIgFR2OXmM9v4KshzUhaStonB1G3/SQ= X-Received: by 2002:a62:d104:: with SMTP id z4mr2035568pfg.26.1587616850973; Wed, 22 Apr 2020 21:40:50 -0700 (PDT) Received: from localhost ([2401:fa00:9:14:1105:3e8a:838d:e326]) by smtp.gmail.com with ESMTPSA id w13sm1174046pfn.192.2020.04.22.21.40.42 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 22 Apr 2020 21:40:50 -0700 (PDT) From: Evan Benn To: LKML Cc: jwerner@chromium.org, xingyu.chen@amlogic.com, Evan Benn , Anson Huang , Bjorn Andersson , Catalin Marinas , "David S. Miller" , Geert Uytterhoeven , Greg Kroah-Hartman , Guenter Roeck , Leonard Crestez , Li Yang , Marcin Juszkiewicz , Matthias Brugger , Mauro Carvalho Chehab , Olof Johansson , Rob Herring , Rob Herring , Shawn Guo , Valentin Schneider , Will Deacon , Wim Van Sebroeck , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-watchdog@vger.kernel.org Subject: [PATCH v5 0/2] Add a watchdog driver that uses ARM Secure Monitor Calls. Date: Thu, 23 Apr 2020 14:40:34 +1000 Message-Id: <20200423044036.234578-1-evanbenn@chromium.org> X-Mailer: git-send-email 2.26.2.303.gf8c07b1a785-goog 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 is currently supported in firmware deployed on oak, hana and elm mt8173 chromebook devices. The kernel driver is written to be a generic SMC watchdog driver. Arm Trusted Firmware upstreaming review: https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/3405 Patch to add oak, hana, elm device tree: https://lore.kernel.org/linux-arm-kernel/20200110073730.213789-1-hsinyi@chromium.org/ I would like to add the device tree support after the above patch is accepted. Changes in v5: - Change compatible to arm,smc-wdt - Make timeleft return 0 on error - Use type punning on smc_func_id to save an alloc - Change compatible to arm,smc-wdt Changes in v4: - Add arm,smc-id property - Get smc-id from of property - Return a1 instead of a0 in timeleft Changes in v3: - Change name back to arm - Add optional get_timeleft op - change name to arm_smc_wdt Changes in v2: - Change name arm > mt8173 - use watchdog_stop_on_reboot - use watchdog_stop_on_unregister - use devm_watchdog_register_device - remove smcwd_shutdown, smcwd_remove - change error codes Evan Benn (1): dt-bindings: watchdog: Add ARM smc wdt for mt8173 watchdog Julius Werner (1): watchdog: Add new arm_smc_wdt watchdog driver .../bindings/watchdog/arm-smc-wdt.yaml | 36 ++++ MAINTAINERS | 7 + arch/arm64/configs/defconfig | 1 + drivers/watchdog/Kconfig | 13 ++ drivers/watchdog/Makefile | 1 + drivers/watchdog/arm_smc_wdt.c | 189 ++++++++++++++++++ 6 files changed, 247 insertions(+) create mode 100644 Documentation/devicetree/bindings/watchdog/arm-smc-wdt.yaml create mode 100644 drivers/watchdog/arm_smc_wdt.c -- 2.26.2.303.gf8c07b1a785-goog