From patchwork Fri Nov 15 08:30:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugen Hristev X-Patchwork-Id: 11245373 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EB4E7930 for ; Fri, 15 Nov 2019 08:30:57 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C0BE92072B for ; Fri, 15 Nov 2019 08:30:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Rsz+Uvl/"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=microchiptechnology.onmicrosoft.com header.i=@microchiptechnology.onmicrosoft.com header.b="t5en0VS9" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C0BE92072B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=microchip.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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=E7G9+2rQ5vXysF68V/OVhmbCJ18K+aXTNOGM+rq+1zs=; b=Rsz+Uvl/uMTxsL 2PxXuY7hi1qZu2tKEvLmZB+CBhICmov1NPyZLsx/QlV1X6Mv1G1aiaVjQ/4Z5wAkjBS6rahzTbfOg upMNzlqVbh66T0fHCQAZuFKOGO0fJN2NF+c9kvukBRJ4EeXnzi8/7FzMGauQjaZ4vR6fi7XfQeqkR uBDrO6ZfHrrpGvujOnUdHq9if+BwLegfU8gpRz/4GKyJhA+zA3wOs88veAnsi72ocF5NoV3bVDwIx 5YCtNcsnRE5QFFmVaVW+t96mDTGy99TtwBgkAb0PxAmVHPrDlmVb+0sYrE+0w4Sa4wFV2Pua0fZFc oz0snHbVWKSebzQV1Pfg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iVX0I-0003J2-TU; Fri, 15 Nov 2019 08:30:54 +0000 Received: from esa1.microchip.iphmx.com ([68.232.147.91]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iVWzp-0002oh-Gz for linux-arm-kernel@lists.infradead.org; Fri, 15 Nov 2019 08:30:27 +0000 Received-SPF: Pass (esa1.microchip.iphmx.com: domain of Eugen.Hristev@microchip.com designates 198.175.253.82 as permitted sender) identity=mailfrom; client-ip=198.175.253.82; receiver=esa1.microchip.iphmx.com; envelope-from="Eugen.Hristev@microchip.com"; x-sender="Eugen.Hristev@microchip.com"; x-conformance=spf_only; x-record-type="v=spf1"; x-record-text="v=spf1 mx a:ushub1.microchip.com a:smtpout.microchip.com a:mx1.microchip.iphmx.com a:mx2.microchip.iphmx.com include:servers.mcsv.net include:mktomail.com include:spf.protection.outlook.com ~all" Received-SPF: None (esa1.microchip.iphmx.com: no sender authenticity information available from domain of postmaster@email.microchip.com) identity=helo; client-ip=198.175.253.82; receiver=esa1.microchip.iphmx.com; envelope-from="Eugen.Hristev@microchip.com"; x-sender="postmaster@email.microchip.com"; x-conformance=spf_only Authentication-Results: esa1.microchip.iphmx.com; spf=Pass smtp.mailfrom=Eugen.Hristev@microchip.com; spf=None smtp.helo=postmaster@email.microchip.com; dkim=pass (signature verified) header.i=@microchiptechnology.onmicrosoft.com; dmarc=pass (p=none dis=none) d=microchip.com IronPort-SDR: XgNQGMW/MYGuqt4vFx8ArInO9twOeyA062aH5l14Xm0ID6/1clbMJWx2aPmXgY0hNuWqeZIhHq VXUSvm//8gK4ujIi426myr529hRUDT+6TIM+Po3LLxden9i3Tye7piPvVhpc7ir3u5HlvivRWx AXJu4Nte/WIP/CuQck9tqa826vpiSPIWw83PS7UGh+Ryzv3I/UnXUdvI2TXLg+m1uBOkfIX0Hl Hy/gpUJX50MZYZKqTSFuA1ry+P+kvsxRlRjAsp5ElOagiKszQ5zEdgaMq1NfYskiZFk4PqAcTT Wg0= X-IronPort-AV: E=Sophos;i="5.68,307,1569308400"; d="scan'208";a="58548501" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa1.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 15 Nov 2019 01:30:20 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Fri, 15 Nov 2019 01:30:16 -0700 Received: from NAM01-SN1-obe.outbound.protection.outlook.com (10.10.215.89) by email.microchip.com (10.10.87.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5 via Frontend Transport; Fri, 15 Nov 2019 01:30:16 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Sve1R6+BathGZxuY2K0UWnBRxXmF+2HT+K+/FnNiV4+DVoh7CbmTIXezJnSMY4lwmojohoZpAlCvszwAN0yxNaqU4jIAzp5nH3qZKSvk+1YQ+SdImGnKflubDGwEHyRN7RVxlJ09w2QUC8fxu6kwt/WQkTjFCfFs0TTX7CTJ0L5MnppmWndNFcZzc/P0x5Dmi8HwdfUWxW+sIq3gWYWDTj7MfhalDBc/FlBPbQ4Xv7fuJq816cHFcPCMSWzeTsj2/pPPseRB2VSuQfgDKaNiJthpL2U1O81V8LPgeVVNZNZC7jA+KlRXtH+EPuOY43QTk4oUpNdYJ45NzDpjU3wsEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=m4AwzKoBcKbCF4ttvH6xIXZgTb1ptM2Vio8Add60AOA=; b=kC6rGfWayBAHpUy+j3PwWSRtIMGvDXsv2RM+fQUhNtZbCibzU8vzpVioarAzy51opY7Tne5DJ3vBbo9UDUF4Wp6HvG1l93sPTeJr5VMy7ITyq2B5IqfUQuutn0AoF6NlVHJ/qMj9MuHqGYZY+NCZOrB+OnrIAbsytpibvYf4X9Ztjs65mUh1mvqTqxm7CNS5glWBz9db29x/Rcd1N+TcJkCaaR1qf5NDen994xGAPdgtbzJFPXAPNQj5sy5qmkrQojbSHJPKdeNh6XfoIavELd5uWpm+T6EVZR89fHxVWn+giwSrggqdRqrHQru0AtefLzeltD/uGJa89SWJJI67rw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microchip.com; dmarc=pass action=none header.from=microchip.com; dkim=pass header.d=microchip.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microchiptechnology.onmicrosoft.com; s=selector2-microchiptechnology-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=m4AwzKoBcKbCF4ttvH6xIXZgTb1ptM2Vio8Add60AOA=; b=t5en0VS9p3BXVeemvvN56Sn49Mac9B13V05/yAUD1ITEcsQuoYq74M+bxbLeV2fbnNT7IX8Mks2xTHBEeuxmft78QDd4l4XWo03P/VLA9yipiJCeYTAmFP1cwVYZURDrFmGFeotnnJhfGlS61ccfIqvrIHUbrRtRVpOLGdIwDV4= Received: from DM5PR11MB1242.namprd11.prod.outlook.com (10.168.108.8) by DM5PR11MB0059.namprd11.prod.outlook.com (10.164.155.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2430.20; Fri, 15 Nov 2019 08:30:13 +0000 Received: from DM5PR11MB1242.namprd11.prod.outlook.com ([fe80::d594:bcd0:98a9:d2c8]) by DM5PR11MB1242.namprd11.prod.outlook.com ([fe80::d594:bcd0:98a9:d2c8%4]) with mapi id 15.20.2451.029; Fri, 15 Nov 2019 08:30:13 +0000 From: To: , , , , , , Subject: [PATCH v4 1/3] watchdog: sama5d4_wdt: cleanup the bit definitions Thread-Topic: [PATCH v4 1/3] watchdog: sama5d4_wdt: cleanup the bit definitions Thread-Index: AQHVm47mrdt0TEc0UU6bOrM4Tw2r3w== Date: Fri, 15 Nov 2019 08:30:13 +0000 Message-ID: <1573806579-7981-1-git-send-email-eugen.hristev@microchip.com> Accept-Language: en-US, ro-RO Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: AM0PR06CA0076.eurprd06.prod.outlook.com (2603:10a6:208:fa::17) To DM5PR11MB1242.namprd11.prod.outlook.com (2603:10b6:3:14::8) x-mailer: git-send-email 2.7.4 x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [94.177.32.156] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 528c7047-88ce-4c28-c1bd-08d769a608d3 x-ms-traffictypediagnostic: DM5PR11MB0059: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:5516; x-forefront-prvs: 02229A4115 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(346002)(366004)(39860400002)(136003)(376002)(189003)(199004)(2906002)(64756008)(4326008)(2201001)(107886003)(36756003)(25786009)(6506007)(6436002)(186003)(386003)(99286004)(476003)(26005)(7736002)(102836004)(316002)(486006)(305945005)(86362001)(110136005)(14454004)(2616005)(54906003)(256004)(8936002)(66446008)(3846002)(52116002)(66476007)(478600001)(6512007)(6486002)(14444005)(5660300002)(6116002)(2501003)(66066001)(66556008)(50226002)(71200400001)(71190400001)(66946007)(81166006)(8676002)(81156014); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR11MB0059; H:DM5PR11MB1242.namprd11.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: microchip.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: xH9ZvU4v5KgxAYgwYA5fXUJb/Eq1C2Tt5rKKAkaJXSdxdhY4/TAI9hfrGSHRzv336aCpSpxpwz8z+if6KypHapA0fACy4OY9bDvW6kX27HSWO0MXxaeBNGnqfCp7/KHRMLIiP+VP33ii4f+L/8zoW2IIvb7abALyjj7iY/HZ/GaDOtgi/0GLVzJtCobib4Sjn+7xBgOqbmJaaBuM8gyGym4tiHef1l5EFLP6RyiBsDuus/2kBH3PJwLebxD/Ky/LsNg1mq+A7TdMpl7mEm+n8HG18FxcfMlGQszgIlEWDSBouAEHzCEriG/jfHJzjA4WrMahZyVfDpLB8BLqxliwFWNLwUrTZ4yVrCofDV8vkhOz6enMmreVWui8JXM/KC0MY2FYTsUo7K/flTp/RRFY/EZa0rddkPe2yP+Od1HaESynjuI9/oamOwrtBHAlM/Mj MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 528c7047-88ce-4c28-c1bd-08d769a608d3 X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Nov 2019 08:30:13.3475 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3f4057f3-b418-4d4e-ba84-d55b4e897d88 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: eB3oA9STSdWEPRUmB6ZCA/W97bQ4TNbht8xn2t+NMmufIcczWAJ8l3cDH1SDl5R9nmWczEu9reZR8FNpBnq9gJNQF5b2jZfY7Nupj/v2HSU= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR11MB0059 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191115_003025_571069_DFD992DA X-CRM114-Status: UNSURE ( 7.97 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [68.232.147.91 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eugen.Hristev@microchip.com, linux-watchdog@vger.kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Eugen Hristev Cleanup the macro definitions to use BIT and align with two spaces. Signed-off-by: Eugen Hristev Reviewed-by: Guenter Roeck --- Changes in v4: - added UL suffix to value macros to avoid compile warnings - modified file header to include new copyright and datasheet - include linux/bits.h Changes in v3: - new patch as requested from review on ML drivers/watchdog/at91sam9_wdt.h | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/drivers/watchdog/at91sam9_wdt.h b/drivers/watchdog/at91sam9_wdt.h index 390941c..abfe34d 100644 --- a/drivers/watchdog/at91sam9_wdt.h +++ b/drivers/watchdog/at91sam9_wdt.h @@ -4,33 +4,37 @@ * * Copyright (C) 2007 Andrew Victor * Copyright (C) 2007 Atmel Corporation. + * Copyright (C) 2019 Microchip Technology Inc. and its subsidiaries * * Watchdog Timer (WDT) - System peripherals regsters. * Based on AT91SAM9261 datasheet revision D. + * Based on SAM9X60 datasheet. * */ #ifndef AT91_WDT_H #define AT91_WDT_H +#include + #define AT91_WDT_CR 0x00 /* Watchdog Control Register */ -#define AT91_WDT_WDRSTT (1 << 0) /* Restart */ -#define AT91_WDT_KEY (0xa5 << 24) /* KEY Password */ +#define AT91_WDT_WDRSTT BIT(0) /* Restart */ +#define AT91_WDT_KEY (0xa5UL << 24) /* KEY Password */ #define AT91_WDT_MR 0x04 /* Watchdog Mode Register */ -#define AT91_WDT_WDV (0xfff << 0) /* Counter Value */ -#define AT91_WDT_SET_WDV(x) ((x) & AT91_WDT_WDV) -#define AT91_WDT_WDFIEN (1 << 12) /* Fault Interrupt Enable */ -#define AT91_WDT_WDRSTEN (1 << 13) /* Reset Processor */ -#define AT91_WDT_WDRPROC (1 << 14) /* Timer Restart */ -#define AT91_WDT_WDDIS (1 << 15) /* Watchdog Disable */ -#define AT91_WDT_WDD (0xfff << 16) /* Delta Value */ -#define AT91_WDT_SET_WDD(x) (((x) << 16) & AT91_WDT_WDD) -#define AT91_WDT_WDDBGHLT (1 << 28) /* Debug Halt */ -#define AT91_WDT_WDIDLEHLT (1 << 29) /* Idle Halt */ +#define AT91_WDT_WDV (0xfffUL << 0) /* Counter Value */ +#define AT91_WDT_SET_WDV(x) ((x) & AT91_WDT_WDV) +#define AT91_WDT_WDFIEN BIT(12) /* Fault Interrupt Enable */ +#define AT91_WDT_WDRSTEN BIT(13) /* Reset Processor */ +#define AT91_WDT_WDRPROC BIT(14) /* Timer Restart */ +#define AT91_WDT_WDDIS BIT(15) /* Watchdog Disable */ +#define AT91_WDT_WDD (0xfffUL << 16) /* Delta Value */ +#define AT91_WDT_SET_WDD(x) (((x) << 16) & AT91_WDT_WDD) +#define AT91_WDT_WDDBGHLT BIT(28) /* Debug Halt */ +#define AT91_WDT_WDIDLEHLT BIT(29) /* Idle Halt */ -#define AT91_WDT_SR 0x08 /* Watchdog Status Register */ -#define AT91_WDT_WDUNF (1 << 0) /* Watchdog Underflow */ -#define AT91_WDT_WDERR (1 << 1) /* Watchdog Error */ +#define AT91_WDT_SR 0x08 /* Watchdog Status Register */ +#define AT91_WDT_WDUNF BIT(0) /* Watchdog Underflow */ +#define AT91_WDT_WDERR BIT(1) /* Watchdog Error */ #endif From patchwork Fri Nov 15 08:30:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugen Hristev X-Patchwork-Id: 11245369 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A97B51393 for ; Fri, 15 Nov 2019 08:30:27 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7D00F2072B for ; Fri, 15 Nov 2019 08:30:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="vCVKDwTY"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=microchiptechnology.onmicrosoft.com header.i=@microchiptechnology.onmicrosoft.com header.b="ZXErALye" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7D00F2072B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=microchip.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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:In-Reply-To:References: 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: List-Owner; bh=OyU7hxzx4TkhWb6GDF3Q5nT7N1NogQgwfvv0zNpsqqM=; b=vCVKDwTYYVU5X9 ymTzcIji0ZeYxlHZLvMIXH8wMdNsdBY4KnpYTg43SOHbntIBIb4emb2XK0suhVg4sHBMNKSn15CCF kMQT4URRODbX40T40T64Rk0pC53OM0xkwpVScQc6pcatcxM9KZ1P11fWZNRRZyx/Ev7dyix8j70oz mhzkMzIdLde7jW0SPaZnJs+i/u7LlKgwhCcf1hjD0dgTv8F4B347fXZcHhFpJSa3ofCjDXoj9w7BQ D+ZVS4oligiU0qYuB6gxVV9+SAApCNYEEKp7cXM45vp2KRTZ+FXXpYNbaQPJMnRHEbJNodObUcUo+ ZHCPG7KhKEV3LGSGg//g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iVWzp-0002op-Cl; Fri, 15 Nov 2019 08:30:25 +0000 Received: from esa6.microchip.iphmx.com ([216.71.154.253]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iVWzm-0002nv-1v for linux-arm-kernel@lists.infradead.org; Fri, 15 Nov 2019 08:30:24 +0000 Received-SPF: Pass (esa6.microchip.iphmx.com: domain of Eugen.Hristev@microchip.com designates 198.175.253.82 as permitted sender) identity=mailfrom; client-ip=198.175.253.82; receiver=esa6.microchip.iphmx.com; envelope-from="Eugen.Hristev@microchip.com"; x-sender="Eugen.Hristev@microchip.com"; x-conformance=spf_only; x-record-type="v=spf1"; x-record-text="v=spf1 mx a:ushub1.microchip.com a:smtpout.microchip.com a:mx1.microchip.iphmx.com a:mx2.microchip.iphmx.com include:servers.mcsv.net include:mktomail.com include:spf.protection.outlook.com ~all" Received-SPF: None (esa6.microchip.iphmx.com: no sender authenticity information available from domain of postmaster@email.microchip.com) identity=helo; client-ip=198.175.253.82; receiver=esa6.microchip.iphmx.com; envelope-from="Eugen.Hristev@microchip.com"; x-sender="postmaster@email.microchip.com"; x-conformance=spf_only Authentication-Results: esa6.microchip.iphmx.com; spf=Pass smtp.mailfrom=Eugen.Hristev@microchip.com; spf=None smtp.helo=postmaster@email.microchip.com; dkim=pass (signature verified) header.i=@microchiptechnology.onmicrosoft.com; dmarc=pass (p=none dis=none) d=microchip.com IronPort-SDR: k4XFgRtIMQ9Oy62QsRb60q1I5KVa0iCPFXtC0gu3sraLMtKoyel5UdqbNeYBlukcPXv/u6XAIK HoWDnHKumDMSe9Z/jrJYEKiyNAEkZI8rxqPjabDAIonK8ts9cP0rKMEOctyW58cw6cF/Yv4Nzk 5jYTRhz62dcF7XPpFXblo/WHw36BOdPHE9/hMUBqeuvg4sDhlK+eQFgpxJwiJpwN5nPqCF3vnE HhGtqdHfJKpLUJ0XhcICZlJKFW+CzIEii3E32OvsuEeaIMnmN5USiNL74qV7f+zPWnsNY0sRk+ 698= X-IronPort-AV: E=Sophos;i="5.68,307,1569308400"; d="scan'208";a="54453957" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa6.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 15 Nov 2019 01:30:17 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Fri, 15 Nov 2019 01:30:17 -0700 Received: from NAM01-SN1-obe.outbound.protection.outlook.com (10.10.215.89) by email.microchip.com (10.10.87.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5 via Frontend Transport; Fri, 15 Nov 2019 01:30:17 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IyoGF0JcSRHQEFw9T9Y0bwCPvZBFL5JZSZms4jKiA4AyRSerD2eqJn2LIYi0bNVUZtczJmR2KoPp/lEoVNcP5ph1fWII0GKZqmsjZVlntF4y76lCLECb8R6/rq87cjdiN5ewU5VHgLADKy7SojDT1ueqgoe9LI5QPIaA1eBW3K6qtUQX0ncmI7BYmNAkivGiDOMIdzQvfJNlHG5YSKhGJzcK23sACtayc1Ke+pjcBC78WaO9Pv2tNvOvOjYQiF8XQugGLl90a6/Roq/UDMZ/UxPgHx3sIlGyhEkgYvKRO1TKadObFyvAKc1+TpLXSp1Yr/a41mQ5PdPVbJnNsK1Dug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=hvK3Vb7gsUQMnOuGQN9Ormb8xgDwFzYQMWqiZ6uLioE=; b=FGXjOR1VScm76UOEnMK9RCWwbkssqwPpnaA8tM+JqBmTjZpRpSsL9svusT7ap8ROz6967bEOwTbvPa29AOtE3HF63iNw/IXI0MbYcxfXpAoHifr/020qT5XI8T3hfboU4yTXRE5c7ZjmWgArdGzTWWZotuZrTSv9csjGOFd7b66+UYJqllkOmuwqQ0Uy+ia+vCb6f8svXBaBcHc8PAPXZMstihHj8hW73ZmnbdRNvSRHBfbokGeEGyD3wHwKRlTZDspSO6+DZKUoRd9JW3McztjjnOhBz1cSBoXcPhXFHR2EnQC4r+84LNrR4/kjwVqrLDMi3+c4ZaxBDdcDhQCX/g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microchip.com; dmarc=pass action=none header.from=microchip.com; dkim=pass header.d=microchip.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microchiptechnology.onmicrosoft.com; s=selector2-microchiptechnology-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=hvK3Vb7gsUQMnOuGQN9Ormb8xgDwFzYQMWqiZ6uLioE=; b=ZXErALyet3Lg07UDlfc2V/TZNk0IVJVQFfFbjLlVXrbtbpNBLTDed2Vnltzs6/P+sKPXk51Rp4D0XRmDlIhmtyP/rUIQ7nvtc+Atpo3OX82dXSBknHlj6yrEGzMkqOar4XofJ9S6mpcBLUtL+zk3+rGLyLBBbl8k9XjvqC6ek1o= Received: from DM5PR11MB1242.namprd11.prod.outlook.com (10.168.108.8) by DM5PR11MB0059.namprd11.prod.outlook.com (10.164.155.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2430.20; Fri, 15 Nov 2019 08:30:16 +0000 Received: from DM5PR11MB1242.namprd11.prod.outlook.com ([fe80::d594:bcd0:98a9:d2c8]) by DM5PR11MB1242.namprd11.prod.outlook.com ([fe80::d594:bcd0:98a9:d2c8%4]) with mapi id 15.20.2451.029; Fri, 15 Nov 2019 08:30:16 +0000 From: To: , , , , , , Subject: [PATCH v4 2/3] dt-bindings: watchdog: sama5d4_wdt: add microchip,sam9x60-wdt compatible Thread-Topic: [PATCH v4 2/3] dt-bindings: watchdog: sama5d4_wdt: add microchip,sam9x60-wdt compatible Thread-Index: AQHVm47otrrsXesLMUemMJFwgCT86g== Date: Fri, 15 Nov 2019 08:30:15 +0000 Message-ID: <1573806579-7981-2-git-send-email-eugen.hristev@microchip.com> References: <1573806579-7981-1-git-send-email-eugen.hristev@microchip.com> In-Reply-To: <1573806579-7981-1-git-send-email-eugen.hristev@microchip.com> Accept-Language: en-US, ro-RO Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: AM0PR06CA0076.eurprd06.prod.outlook.com (2603:10a6:208:fa::17) To DM5PR11MB1242.namprd11.prod.outlook.com (2603:10b6:3:14::8) x-mailer: git-send-email 2.7.4 x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [94.177.32.156] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 1838e10c-a498-4bc8-1e68-08d769a60a5b x-ms-traffictypediagnostic: DM5PR11MB0059: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:669; x-forefront-prvs: 02229A4115 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(346002)(366004)(39860400002)(136003)(376002)(189003)(199004)(2906002)(64756008)(4326008)(2201001)(107886003)(36756003)(25786009)(6506007)(6436002)(186003)(386003)(99286004)(11346002)(476003)(446003)(26005)(7736002)(76176011)(102836004)(316002)(486006)(305945005)(86362001)(110136005)(14454004)(2616005)(54906003)(256004)(8936002)(4744005)(66446008)(3846002)(52116002)(66476007)(478600001)(6512007)(6486002)(14444005)(5660300002)(6116002)(2501003)(66066001)(66556008)(50226002)(71200400001)(71190400001)(66946007)(81166006)(8676002)(81156014)(142933001); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR11MB0059; H:DM5PR11MB1242.namprd11.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: microchip.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: HQq4cKMk3Ai/YF8fxOCc9LTCsbIPauDujM7ZMCNjTOHPs9mcqvcVoBUxvQgANqLAegIA1TbGFsZBcNJpM70UUqQ1LN4530o52Ml22ClEW6ncLWBcGnQ6aFHK6Cr6p/+Wi+tuxijiWqOsCxx8wC4Fvh7M7mGMj5ntjy1ILN+gt/rHMXhOs8YAh5lYJZXg3qQDVPc8Hg9HDbtJn7wgqfWu4V3y0tLUAE25wLJFaid8McKvd5WwiLx/8m1DCXqm765R6Nb46VFgZqIcLfvnG2YtHIoi4gl2bo1RnnO9iw/x54chQBtxGa/Lds5N8Ew8zsivS6wpihwjnuwGjP2k7t4l5Os443lqNsvCJ3lVnm5impOMjRqQVmS/CnvHb9TIe+5OFhBG48ZjEcWJxnXyKmMrD3h7SvR2/F4s0+vSD9U4lD3lqjGbZZGit0yb5YxKeHFU MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 1838e10c-a498-4bc8-1e68-08d769a60a5b X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Nov 2019 08:30:15.9404 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3f4057f3-b418-4d4e-ba84-d55b4e897d88 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: NNS18yVCs54jJPjFI19Ercuw/B5YfaMETSVMZWEtZY75ZXmcg9cs8DxYnBTKXqgbQDf3UKw0Ej3AX0lghSuEh8C7HPHpB+60ZleAV+bdtZg= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR11MB0059 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191115_003022_147838_8DC0E26E X-CRM114-Status: UNSURE ( 8.76 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [216.71.154.253 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eugen.Hristev@microchip.com, linux-watchdog@vger.kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Eugen Hristev The Atmel sama5d4_wdt needs to be compatible with microchip,sam9x60-wdt The sama5d4_wdt driver is updated to work with both hardware blocks (sama5d4/sama5d2 and sam9x60 based blocks) Signed-off-by: Eugen Hristev Acked-by: Rob Herring Reviewed-by: Guenter Roeck --- Documentation/devicetree/bindings/watchdog/atmel-sama5d4-wdt.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/watchdog/atmel-sama5d4-wdt.txt b/Documentation/devicetree/bindings/watchdog/atmel-sama5d4-wdt.txt index 4fec1e3..44727fc 100644 --- a/Documentation/devicetree/bindings/watchdog/atmel-sama5d4-wdt.txt +++ b/Documentation/devicetree/bindings/watchdog/atmel-sama5d4-wdt.txt @@ -1,7 +1,7 @@ * Atmel SAMA5D4 Watchdog Timer (WDT) Controller Required properties: -- compatible: "atmel,sama5d4-wdt" +- compatible: "atmel,sama5d4-wdt" or "microchip,sam9x60-wdt" - reg: base physical address and length of memory mapped region. Optional properties: From patchwork Fri Nov 15 08:30:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugen Hristev X-Patchwork-Id: 11245371 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 243461393 for ; Fri, 15 Nov 2019 08:30:40 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EEC892072B for ; Fri, 15 Nov 2019 08:30:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Mlk9HTGx"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=microchiptechnology.onmicrosoft.com header.i=@microchiptechnology.onmicrosoft.com header.b="YA0aS6AH" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EEC892072B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=microchip.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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:In-Reply-To:References: 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: List-Owner; bh=PyBxQZUh8K0KrjHF9DxT1js5BPbkTadTQXCgXK4WAY4=; b=Mlk9HTGxfRpu1D NjXrjMlij/NEYA78fSYfKtoPrcOlw0Xk9b7pybjdXYjokMgVO9aCNq6AV+4DtgiZb0qOmn09tv1cD SqYMbb7kWii0JeQw2Ql1K2drN8jLfc6E4sT4aBzRgwnN32585nsujpthCa+TXFmrEp3G0JrEJ5OYz juaqbQWPNVCuZU/P20MsOA5LWjWXklFVix1pAfzbzkuCSH/YEmETc04jlh1hSLUULK34/GUiZ1Rfy TrcSl9XSHgEqQ2b5ySNM12PKsRtEgVPIffcGBER7l6Dqh5K2cjbHjqlvefU8JK7Is74c+p1QYLxCY tgIDoOojgVZoOesOvGkw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iVX02-0002zz-Ja; Fri, 15 Nov 2019 08:30:38 +0000 Received: from esa5.microchip.iphmx.com ([216.71.150.166]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iVWzp-0002oj-Ke for linux-arm-kernel@lists.infradead.org; Fri, 15 Nov 2019 08:30:27 +0000 Received-SPF: Pass (esa5.microchip.iphmx.com: domain of Eugen.Hristev@microchip.com designates 198.175.253.82 as permitted sender) identity=mailfrom; client-ip=198.175.253.82; receiver=esa5.microchip.iphmx.com; envelope-from="Eugen.Hristev@microchip.com"; x-sender="Eugen.Hristev@microchip.com"; x-conformance=spf_only; x-record-type="v=spf1"; x-record-text="v=spf1 mx a:ushub1.microchip.com a:smtpout.microchip.com a:mx1.microchip.iphmx.com a:mx2.microchip.iphmx.com include:servers.mcsv.net include:mktomail.com include:spf.protection.outlook.com ~all" Received-SPF: None (esa5.microchip.iphmx.com: no sender authenticity information available from domain of postmaster@email.microchip.com) identity=helo; client-ip=198.175.253.82; receiver=esa5.microchip.iphmx.com; envelope-from="Eugen.Hristev@microchip.com"; x-sender="postmaster@email.microchip.com"; x-conformance=spf_only Authentication-Results: esa5.microchip.iphmx.com; spf=Pass smtp.mailfrom=Eugen.Hristev@microchip.com; spf=None smtp.helo=postmaster@email.microchip.com; dkim=pass (signature verified) header.i=@microchiptechnology.onmicrosoft.com; dmarc=pass (p=none dis=none) d=microchip.com IronPort-SDR: 7t+ra5HW8XTURQ4eH7aCcabt9UzKf2/Wcg6vguYGkSVaxdUQx87Aldu7mewBLLtZQsfWmWEyqB +s46ZrR82DKUg2Y0BsKUjdOX8J5HAiVOxT3PFJ5zOt9qYnMp0TFc2ozWJX5uPDTGbemQrV2lAm LjyJt3cWPkg3u0krJB7m041seSSzgv3t04mD/EGAi8IAiY/W8bcnGqCqAx873hFpuF3gYITA8q Yz+2YhIfzNIdRD3jxok3WbgWuBiUJgbJSKLLSMhjekXnKy7LXM2niPPOyXAWh9RnIoDrAW85E3 gVs= X-IronPort-AV: E=Sophos;i="5.68,307,1569308400"; d="scan'208";a="55730353" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa5.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 15 Nov 2019 01:30:23 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Fri, 15 Nov 2019 01:30:19 -0700 Received: from NAM01-SN1-obe.outbound.protection.outlook.com (10.10.215.89) by email.microchip.com (10.10.87.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5 via Frontend Transport; Fri, 15 Nov 2019 01:30:19 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DIf79czaU6wc6a61SrqvF+0IARh5ns1GM2IhfGYFF3Cpmozwv801Zz9JnfRL3Vp0x6qIwWWzaGHzxL0VM8nBUZtBNKE4bz/MtG01wxncskV8feeQtmtaiW627UFfaHQbORICFI6LYwBKWuBd5Bqv1XvmTz7levXZND991c+aOavG1okfdEHDJ/+fuGx8NNgk/ruWlABACwDzhXn7eVeQLkZ/bmlP8AtUdMEopGg5q1e2xkaR7VHqGVTJAi26P4xkWE6gf8kxWOJj+f0TufU4+2sI4Vk6BetCVIIu/VW1kMC2DhXfvBpRFVCE1aRscwgOBFjBmS6cHNacbacDZwEoUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jmvzw8XHw3zMQG94+d57aiMUNpsEi8nYlhBSTgEb2+8=; b=YkLFkZ5eIt9AKlXtF6RVs5SpbRaoA9GqonCRrEH7ZQLh4ipviAGIFow+AuFp0Rrze40pb0QIZCTSVVDSnHm86IVJobnIkEgsM1+Yw7l54v1WzEyzLioKVsrKaL2fYLQmz0NQmIoJmpMePTyE1ByBwhHhqSgs+PKQS1gxrcwojbuUMWT8DcU/jxTv69Rx1KLi+ZfjgS2DdjD9xCC/nofN4g5gxP1ZAbT9P3+D664mZG+u+qXcyVO2f5ab8Cm5FNyMahWRNLZ6Wd+vEBcVdz2W1mNF/LznK7XjyrM4XHzjQTQuKuzzoU7hBpz3+wXwTc4pxBzCte/NOAM1+s/thOCHYw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microchip.com; dmarc=pass action=none header.from=microchip.com; dkim=pass header.d=microchip.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microchiptechnology.onmicrosoft.com; s=selector2-microchiptechnology-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jmvzw8XHw3zMQG94+d57aiMUNpsEi8nYlhBSTgEb2+8=; b=YA0aS6AHbI5yj68WZGoRMHK6HmjYpv7GTG1X7bMv6hYT0zkfdnLOTtkVvvhV+PsgLYYto3j1g2AGI77OoK31/YXEDhI2CVPqe1Wp2mTafmki+CIituYHm9CiiXxyae6ce+xgTkqvfLD+TIGfdOzKfoEXjBqHvGeDiyi9zEjnJIM= Received: from DM5PR11MB1242.namprd11.prod.outlook.com (10.168.108.8) by DM5PR11MB0059.namprd11.prod.outlook.com (10.164.155.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2430.20; Fri, 15 Nov 2019 08:30:18 +0000 Received: from DM5PR11MB1242.namprd11.prod.outlook.com ([fe80::d594:bcd0:98a9:d2c8]) by DM5PR11MB1242.namprd11.prod.outlook.com ([fe80::d594:bcd0:98a9:d2c8%4]) with mapi id 15.20.2451.029; Fri, 15 Nov 2019 08:30:18 +0000 From: To: , , , , , , Subject: [PATCH v4 3/3] watchdog: sama5d4_wdt: addition of sam9x60 compatible watchdog Thread-Topic: [PATCH v4 3/3] watchdog: sama5d4_wdt: addition of sam9x60 compatible watchdog Thread-Index: AQHVm47p7hX5blLoX0SwAXVxQ9tJIQ== Date: Fri, 15 Nov 2019 08:30:18 +0000 Message-ID: <1573806579-7981-3-git-send-email-eugen.hristev@microchip.com> References: <1573806579-7981-1-git-send-email-eugen.hristev@microchip.com> In-Reply-To: <1573806579-7981-1-git-send-email-eugen.hristev@microchip.com> Accept-Language: en-US, ro-RO Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: AM0PR06CA0076.eurprd06.prod.outlook.com (2603:10a6:208:fa::17) To DM5PR11MB1242.namprd11.prod.outlook.com (2603:10b6:3:14::8) x-mailer: git-send-email 2.7.4 x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [94.177.32.156] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 835d4bbe-791f-494c-de3d-08d769a60bf3 x-ms-traffictypediagnostic: DM5PR11MB0059: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2512; x-forefront-prvs: 02229A4115 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(396003)(346002)(366004)(39860400002)(136003)(376002)(189003)(199004)(2906002)(64756008)(4326008)(2201001)(107886003)(36756003)(25786009)(6506007)(6436002)(186003)(386003)(99286004)(11346002)(476003)(446003)(26005)(7736002)(76176011)(102836004)(316002)(486006)(305945005)(86362001)(110136005)(14454004)(2616005)(54906003)(256004)(8936002)(66446008)(3846002)(52116002)(66476007)(478600001)(6512007)(6486002)(14444005)(5660300002)(6116002)(2501003)(66066001)(66556008)(50226002)(71200400001)(71190400001)(66946007)(81166006)(8676002)(81156014); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR11MB0059; H:DM5PR11MB1242.namprd11.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: microchip.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 4sW/bUB82kBTJb11zSAxQJy5s0UjCVQIp0spNAFITBcntsBfRopuPKc4CTVD3nLDZfhX17/vs0sdEPPDNI3kI5P/YrNvOEc95dlBiG4dwl/3B45iLddK+wf5VPC3VLkUmQuv8LV6Z+o5ZHIgtpNj3S5yFTjdYGUW4H9KFnU7ljb416vUu77IM4ZFhZQCUyRfS7kzBZDdW27et0KF+HehKjhdc03xIn6F+2f9kFU2mXhYwwxIrpkiJmnbDIwpP6z9hSvEGahpq9t8dP4oeY/3wAlkv5quKutSDQH5798jMYN3ZvGEO2oeA3SCAstf7XlwwOIdIcrv6ovws0XmDPzsxf0/55Ckh7UwLJndbQz4XLlDKkKng4j7RlF/17iRlyNqkkbku884HKXMPpdQBSUywI4suU9p6mBiShRK4iBPYwGWNmj2942AyyJxA01advTt MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 835d4bbe-791f-494c-de3d-08d769a60bf3 X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Nov 2019 08:30:18.4632 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3f4057f3-b418-4d4e-ba84-d55b4e897d88 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: EkZbNd3fYfuQ82QRUmjGvHsHL8SfniSr7hvSl062B8Lg4bewDI1YYQoXbksSEnxA8E0fBDwZnjDeEE/Y6dqN+F0XiTmIfaua/L2mm1186TQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR11MB0059 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191115_003025_754424_E0252102 X-CRM114-Status: GOOD ( 17.99 ) X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [216.71.150.166 listed in list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eugen.Hristev@microchip.com, linux-watchdog@vger.kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Eugen Hristev Add support for SAM9X60 WDT into sama5d4_wdt. This means that this driver gets a flag inside the data struct that represents the sam9x60 support. This flag differentiates between the two hardware blocks, and is set according to the compatible of the driver instantiation. Signed-off-by: Eugen Hristev --- Changes in v4: - check compatible with different of_ function - call irq parse and map only if need_irq - changed tabbing in struct defintion Changes in v3: - changed need_irq to bool, instead of a single bit variable. - the platform data config struct is gone now, changed to a pointer to a bool to have the sam9x60_support as 'true', pointing to a static bool with true value. Can have a better solution than this ? - the specific sam9x60_support flag is assigned at probe time, corresponding to the flag value in .data drivers/watchdog/at91sam9_wdt.h | 14 ++++++ drivers/watchdog/sama5d4_wdt.c | 109 +++++++++++++++++++++++++++++++--------- 2 files changed, 98 insertions(+), 25 deletions(-) diff --git a/drivers/watchdog/at91sam9_wdt.h b/drivers/watchdog/at91sam9_wdt.h index abfe34d..4b3bd1d 100644 --- a/drivers/watchdog/at91sam9_wdt.h +++ b/drivers/watchdog/at91sam9_wdt.h @@ -24,7 +24,10 @@ #define AT91_WDT_MR 0x04 /* Watchdog Mode Register */ #define AT91_WDT_WDV (0xfffUL << 0) /* Counter Value */ #define AT91_WDT_SET_WDV(x) ((x) & AT91_WDT_WDV) +#define AT91_SAM9X60_PERIODRST BIT(4) /* Period Reset */ +#define AT91_SAM9X60_RPTHRST BIT(5) /* Minimum Restart Period */ #define AT91_WDT_WDFIEN BIT(12) /* Fault Interrupt Enable */ +#define AT91_SAM9X60_WDDIS BIT(12) /* Watchdog Disable */ #define AT91_WDT_WDRSTEN BIT(13) /* Reset Processor */ #define AT91_WDT_WDRPROC BIT(14) /* Timer Restart */ #define AT91_WDT_WDDIS BIT(15) /* Watchdog Disable */ @@ -37,4 +40,15 @@ #define AT91_WDT_WDUNF BIT(0) /* Watchdog Underflow */ #define AT91_WDT_WDERR BIT(1) /* Watchdog Error */ +#define AT91_SAM9X60_VR 0x08 /* Watchdog Timer Value Register */ + +#define AT91_SAM9X60_WLR 0x0c +#define AT91_SAM9X60_COUNTER (0xfffUL << 0) /* Watchdog Period Value */ +#define AT91_SAM9X60_SET_COUNTER(x) ((x) & AT91_SAM9X60_COUNTER) + +#define AT91_SAM9X60_IER 0x14 /* Interrupt Enable Register */ +#define AT91_SAM9X60_PERINT BIT(0) /* Period Interrupt Enable */ +#define AT91_SAM9X60_IDR 0x18 /* Interrupt Disable Register */ +#define AT91_SAM9X60_ISR 0x1c /* Interrupt Status Register */ + #endif diff --git a/drivers/watchdog/sama5d4_wdt.c b/drivers/watchdog/sama5d4_wdt.c index d193a60..e5d11d6 100644 --- a/drivers/watchdog/sama5d4_wdt.c +++ b/drivers/watchdog/sama5d4_wdt.c @@ -2,7 +2,7 @@ /* * Driver for Atmel SAMA5D4 Watchdog Timer * - * Copyright (C) 2015 Atmel Corporation + * Copyright (C) 2015-2019 Microchip Technology Inc. and its subsidiaries */ #include @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -29,7 +30,10 @@ struct sama5d4_wdt { struct watchdog_device wdd; void __iomem *reg_base; u32 mr; + u32 ir; unsigned long last_ping; + bool need_irq; + bool sam9x60_support; }; static int wdt_timeout; @@ -78,7 +82,12 @@ static int sama5d4_wdt_start(struct watchdog_device *wdd) { struct sama5d4_wdt *wdt = watchdog_get_drvdata(wdd); - wdt->mr &= ~AT91_WDT_WDDIS; + if (wdt->sam9x60_support) { + writel_relaxed(wdt->ir, wdt->reg_base + AT91_SAM9X60_IER); + wdt->mr &= ~AT91_SAM9X60_WDDIS; + } else { + wdt->mr &= ~AT91_WDT_WDDIS; + } wdt_write(wdt, AT91_WDT_MR, wdt->mr); return 0; @@ -88,7 +97,12 @@ static int sama5d4_wdt_stop(struct watchdog_device *wdd) { struct sama5d4_wdt *wdt = watchdog_get_drvdata(wdd); - wdt->mr |= AT91_WDT_WDDIS; + if (wdt->sam9x60_support) { + writel_relaxed(wdt->ir, wdt->reg_base + AT91_SAM9X60_IDR); + wdt->mr |= AT91_SAM9X60_WDDIS; + } else { + wdt->mr |= AT91_WDT_WDDIS; + } wdt_write(wdt, AT91_WDT_MR, wdt->mr); return 0; @@ -109,6 +123,14 @@ static int sama5d4_wdt_set_timeout(struct watchdog_device *wdd, struct sama5d4_wdt *wdt = watchdog_get_drvdata(wdd); u32 value = WDT_SEC2TICKS(timeout); + if (wdt->sam9x60_support) { + wdt_write(wdt, AT91_SAM9X60_WLR, + AT91_SAM9X60_SET_COUNTER(value)); + + wdd->timeout = timeout; + return 0; + } + wdt->mr &= ~AT91_WDT_WDV; wdt->mr |= AT91_WDT_SET_WDV(value); @@ -143,8 +165,14 @@ static const struct watchdog_ops sama5d4_wdt_ops = { static irqreturn_t sama5d4_wdt_irq_handler(int irq, void *dev_id) { struct sama5d4_wdt *wdt = platform_get_drvdata(dev_id); + u32 reg; - if (wdt_read(wdt, AT91_WDT_SR)) { + if (wdt->sam9x60_support) + reg = wdt_read(wdt, AT91_SAM9X60_ISR); + else + reg = wdt_read(wdt, AT91_WDT_SR); + + if (reg) { pr_crit("Atmel Watchdog Software Reset\n"); emergency_restart(); pr_crit("Reboot didn't succeed\n"); @@ -157,13 +185,14 @@ static int of_sama5d4_wdt_init(struct device_node *np, struct sama5d4_wdt *wdt) { const char *tmp; - wdt->mr = AT91_WDT_WDDIS; + if (wdt->sam9x60_support) + wdt->mr = AT91_SAM9X60_WDDIS; + else + wdt->mr = AT91_WDT_WDDIS; if (!of_property_read_string(np, "atmel,watchdog-type", &tmp) && !strcmp(tmp, "software")) - wdt->mr |= AT91_WDT_WDFIEN; - else - wdt->mr |= AT91_WDT_WDRSTEN; + wdt->need_irq = true; if (of_property_read_bool(np, "atmel,idle-halt")) wdt->mr |= AT91_WDT_WDIDLEHLT; @@ -176,21 +205,46 @@ static int of_sama5d4_wdt_init(struct device_node *np, struct sama5d4_wdt *wdt) static int sama5d4_wdt_init(struct sama5d4_wdt *wdt) { - u32 reg; + u32 reg, val; + + val = WDT_SEC2TICKS(WDT_DEFAULT_TIMEOUT); /* * When booting and resuming, the bootloader may have changed the * watchdog configuration. * If the watchdog is already running, we can safely update it. * Else, we have to disable it properly. */ - if (wdt_enabled) { - wdt_write_nosleep(wdt, AT91_WDT_MR, wdt->mr); - } else { + if (!wdt_enabled) { reg = wdt_read(wdt, AT91_WDT_MR); - if (!(reg & AT91_WDT_WDDIS)) + if (wdt->sam9x60_support && (!(reg & AT91_SAM9X60_WDDIS))) + wdt_write_nosleep(wdt, AT91_WDT_MR, + reg | AT91_SAM9X60_WDDIS); + else if (!wdt->sam9x60_support && + (!(reg & AT91_WDT_WDDIS))) wdt_write_nosleep(wdt, AT91_WDT_MR, reg | AT91_WDT_WDDIS); } + + if (wdt->sam9x60_support) { + if (wdt->need_irq) + wdt->ir = AT91_SAM9X60_PERINT; + else + wdt->mr |= AT91_SAM9X60_PERIODRST; + + wdt_write(wdt, AT91_SAM9X60_IER, wdt->ir); + wdt_write(wdt, AT91_SAM9X60_WLR, AT91_SAM9X60_SET_COUNTER(val)); + } else { + wdt->mr |= AT91_WDT_SET_WDD(WDT_SEC2TICKS(MAX_WDT_TIMEOUT)); + wdt->mr |= AT91_WDT_SET_WDV(val); + + if (wdt->need_irq) + wdt->mr |= AT91_WDT_WDFIEN; + else + wdt->mr |= AT91_WDT_WDRSTEN; + } + + wdt_write_nosleep(wdt, AT91_WDT_MR, wdt->mr); + return 0; } @@ -201,7 +255,6 @@ static int sama5d4_wdt_probe(struct platform_device *pdev) struct sama5d4_wdt *wdt; void __iomem *regs; u32 irq = 0; - u32 timeout; int ret; wdt = devm_kzalloc(dev, sizeof(*wdt), GFP_KERNEL); @@ -215,6 +268,8 @@ static int sama5d4_wdt_probe(struct platform_device *pdev) wdd->min_timeout = MIN_WDT_TIMEOUT; wdd->max_timeout = MAX_WDT_TIMEOUT; wdt->last_ping = jiffies; + wdt->sam9x60_support = of_device_is_compatible(dev->of_node, + "microchip,sam9x60-wdt"); watchdog_set_drvdata(wdd, wdt); @@ -224,15 +279,19 @@ static int sama5d4_wdt_probe(struct platform_device *pdev) wdt->reg_base = regs; - irq = irq_of_parse_and_map(dev->of_node, 0); - if (!irq) - dev_warn(dev, "failed to get IRQ from DT\n"); - ret = of_sama5d4_wdt_init(dev->of_node, wdt); if (ret) return ret; - if ((wdt->mr & AT91_WDT_WDFIEN) && irq) { + if (wdt->need_irq) { + irq = irq_of_parse_and_map(dev->of_node, 0); + if (!irq) { + dev_warn(dev, "failed to get IRQ from DT\n"); + wdt->need_irq = false; + } + } + + if (wdt->need_irq) { ret = devm_request_irq(dev, irq, sama5d4_wdt_irq_handler, IRQF_SHARED | IRQF_IRQPOLL | IRQF_NO_SUSPEND, pdev->name, pdev); @@ -244,11 +303,6 @@ static int sama5d4_wdt_probe(struct platform_device *pdev) watchdog_init_timeout(wdd, wdt_timeout, dev); - timeout = WDT_SEC2TICKS(wdd->timeout); - - wdt->mr |= AT91_WDT_SET_WDD(WDT_SEC2TICKS(MAX_WDT_TIMEOUT)); - wdt->mr |= AT91_WDT_SET_WDV(timeout); - ret = sama5d4_wdt_init(wdt); if (ret) return ret; @@ -269,7 +323,12 @@ static int sama5d4_wdt_probe(struct platform_device *pdev) } static const struct of_device_id sama5d4_wdt_of_match[] = { - { .compatible = "atmel,sama5d4-wdt", }, + { + .compatible = "atmel,sama5d4-wdt", + }, + { + .compatible = "microchip,sam9x60-wdt", + }, { } }; MODULE_DEVICE_TABLE(of, sama5d4_wdt_of_match);