Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp1717799ybg; Sat, 19 Oct 2019 01:00:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqxxuZhEduR9SGIS9tFR1Fh3sfDpdJDHXGJyKnVn+YOKudTjnNAzzsTwMh6fxufhDklYdyCX X-Received: by 2002:a17:906:5502:: with SMTP id r2mr12828938ejp.3.1571472054950; Sat, 19 Oct 2019 01:00:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571472054; cv=none; d=google.com; s=arc-20160816; b=ePlP7bjvvAym1MLHdwSmHzJSAU5qvBosvPzZ0PpHwpsSgIRVD1cjlJQ4EqcrljVKiR oC6NbR4qy/n61bPqfhM1AE+ssIMM1FuvmtWwTy4pXas+sPl49Lq8h8MXfwH99QLT8cdI dsQ8MdYFmAu+GkcuMW1vaMOhzq4Z7HZyuL30Z2IO7v163oIzRj5F9m6W/t3aJRP4wflN y6q32pFwIg2NC7ZL6eGIVS/jdNk1UjnLSsFKWiWA4h9u3C/uQoznLbLnoqeAYM/UELDW gh8aQBbzH0Yq8Pn2m6lwo6tYjm/twIB4yro+pRMAr/QOKaNQgrTK2STJW6FtG+58olrG ypYg== 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=p5AAXRZi9R+53Pe/+crDz3MuYm6cYTNGHP1SYZfmJQs=; b=UWyuzCZ84u5R59b0NEhVNHrbtuDQ+BlfEN3Ho8kYwRN+gBzBxYNkz0x2O/AeK5VJwW mpWIyM4r9rcYa5lHpMV0ObvCmNGfBrFovcBQMfSaGo71xRps86Eq+oY/zcrK4XXW9NQ6 LGVc2Xm2gTFAy/2RXyBOTGS8sDVSBGYhzWEapwEfzEFbZOi4QU7ee46yA/9N8DpzSUxH CMxAZmdmxj7KBydJ5XL36a3x0ux6MqZn5W/TtZ+dBPUBiAAab6e5pkMgefZGMJd1SUEH YtPztEL6NZsoOFLZfhrONyFwFIUDqERhLyp1QKN+3WtykwGyhp63tjhBaN8ArqDIYI3W Vx9A== 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 pw26si127736ejb.88.2019.10.19.01.00.31; Sat, 19 Oct 2019 01:00:54 -0700 (PDT) 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 S2632742AbfJRIdp (ORCPT + 99 others); Fri, 18 Oct 2019 04:33:45 -0400 Received: from mail-sz.amlogic.com ([211.162.65.117]:35600 "EHLO mail-sz.amlogic.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387458AbfJRIdp (ORCPT ); Fri, 18 Oct 2019 04:33:45 -0400 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; Fri, 18 Oct 2019 16:33:53 +0800 From: Xingyu Chen To: Wim Van Sebroeck , Guenter Roeck , Kevin Hilman , Neil Armstrong CC: Xingyu Chen , Rob Herring , Jerome Brunet , Qianggui Song , Jianxin Pan , Jian Hu , , , , , Subject: [PATCH v2 0/4] add meson secure watchdog driver Date: Fri, 18 Oct 2019 16:33:37 +0800 Message-ID: <1571387622-35132-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. 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 Xingyu Chen (4): firmware: meson_sm: add new SMC ID support for accessing secure watchdog dt-bindings: watchdog: add new binding for meson secure watchdog watchdog: add meson secure watchdog driver arm64: dts: a1: add secure watchdog controller .../bindings/watchdog/amlogic,meson-sec-wdt.yaml | 34 ++++ arch/arm64/boot/dts/amlogic/meson-a1.dtsi | 6 + drivers/firmware/meson/meson_sm.c | 1 + drivers/watchdog/Kconfig | 17 ++ drivers/watchdog/Makefile | 1 + drivers/watchdog/meson_sec_wdt.c | 187 +++++++++++++++++++++ include/linux/firmware/meson/meson_sm.h | 1 + 7 files changed, 247 insertions(+) create mode 100644 Documentation/devicetree/bindings/watchdog/amlogic,meson-sec-wdt.yaml create mode 100644 drivers/watchdog/meson_sec_wdt.c -- 2.7.4