Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp3148271ybc; Mon, 25 Nov 2019 09:42:21 -0800 (PST) X-Google-Smtp-Source: APXvYqwlBYCcoroLmv37JfQAKBbZLjlxmZ7w1TlChZnl/ykB8tAnmIqkfYPCp2KkcsVd12hO6MR/ X-Received: by 2002:a17:906:27d3:: with SMTP id k19mr13926080ejc.290.1574703741054; Mon, 25 Nov 2019 09:42:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574703741; cv=none; d=google.com; s=arc-20160816; b=YAx6/dDds0WS704LlpknoabI/XrBf2G5iAMws0+GXUqeta9vH4+nNMPdHlSQfAQtw0 0cQbFR39rMrCuLd5sYqkhfkCQ1qaIfN+7G/y685gzr0z4u+DFM2mYOC/ypGc76oSouVD MGrmsXeCMLTiKUuju7COOgDTwgUcCv6Lf5Wq/2BEMIRK9oy5N6wulYkjvLfEv0yDjtUu +Pn5m1lgFBi9oMYaxi2xr/sK7dTAiiZQEn+/bLqvw9UdKdVOnCDf84fhzCPvOD76pqMn ATJNGeXD4KfQtd01NA1IVDPnsQhDRhY0X4ykm7KTi1iBqDwH6J06Rnd3tJjqjglvfEQT hMBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=dsBfzgK69PQqfXc6I4RPfoyRsUhGRyskyuc/D8fBaPU=; b=Bb5UVqkZ9w1oM2+PSXtUVwkkI4VpNj/S66xzuujS6BtC/KtIDVRLA6QxxjOqxQIoZ/ nVTdfNuViqxLJ8g8qG+FFYodB6J+Py75i65yFoXdRw3E4POGK1ZtBwJf1R0i/i7pNlYf Gp97tJQpbSxBqOmZKNxITKILpBHbwnMblMDTOKX5QDgEh3S27GiU/gAR1l8HlcEoUStv Xa7RtqWDJtsJDK2nHZTajcnGpf/QpeKwV4Lz14uWvrW4frrohZUaHwjUHNtVRSFpf7XQ GoVaUaOjkkLoqUhS8bLwzfPtY+42CgqkOEvhBzYjTg8g/WZwG0P5HsoaYrquc2rGe/Bm A7bw== 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 x17si4936649ejs.178.2019.11.25.09.41.56; Mon, 25 Nov 2019 09:42:21 -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 S1727259AbfKYMdo (ORCPT + 99 others); Mon, 25 Nov 2019 07:33:44 -0500 Received: from mail-sz.amlogic.com ([211.162.65.117]:24866 "EHLO mail-sz.amlogic.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725823AbfKYMdo (ORCPT ); Mon, 25 Nov 2019 07:33:44 -0500 Received: from droid12-sz.software.amlogic (10.28.8.22) by mail-sz.amlogic.com (10.28.11.5) with Microsoft SMTP Server id 15.1.1591.10; Mon, 25 Nov 2019 20:34:07 +0800 From: Xingyu Chen To: Wim Van Sebroeck , Guenter Roeck , Kevin Hilman , Neil Armstrong , Rob Herring CC: Xingyu Chen , Jerome Brunet , Qianggui Song , Jianxin Pan , Jian Hu , , , , Subject: [PATCH v4 0/2] add meson secure watchdog driver Date: Mon, 25 Nov 2019 20:33:36 +0800 Message-ID: <1574685218-31164-1-git-send-email-xingyu.chen@amlogic.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.28.8.22] Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The watchdog controller on the Meson-A/C series SoCs is moved to secure world, We have to call SMC instruction to trap the ATF for watchdog operation. These operations are different from previous SoCs, so we introduce a new watchdog driver to support this kind of SoCs. Chnages since v3 at [2]: - add SM_A1_ prefix for WATCHDOG_OPS - remove phandle to secure-monitor node - remove watchdog node from dts, and register wdt device by platform_device_register_simple() - remove dt-binding for meson secure watchdog - use the msec as unit of timeout parameter which is passed to fw side Changes since v2 at [1]: - remove useless dependency in Kconfig - return zero when getting left time value fails Changes since v1 at [0]: - add a new dependency in Kconfig - simplify/add the return operation - remove useless ping operation when setting the timeout - fix some return values - fix the license statement [0]:https://lore.kernel.org/linux-amlogic/1570874721-36077-1-git-send-email-xingyu.chen@amlogic.com [1]:https://lore.kernel.org/linux-amlogic/1571387622-35132-1-git-send-email-xingyu.chen@amlogic.com [2]:https://lore.kernel.org/linux-amlogic/1571983984-11771-1-git-send-email-xingyu.chen@amlogic.com Xingyu Chen (2): firmware: meson_sm: add new SMC ID support for accessing secure watchdog watchdog: add meson secure watchdog driver drivers/firmware/meson/meson_sm.c | 1 + drivers/watchdog/Kconfig | 16 +++ drivers/watchdog/Makefile | 1 + drivers/watchdog/meson_sec_wdt.c | 207 ++++++++++++++++++++++++++++++++ include/linux/firmware/meson/meson_sm.h | 1 + 5 files changed, 226 insertions(+) create mode 100644 drivers/watchdog/meson_sec_wdt.c -- 2.7.4