From patchwork Mon Nov 11 12:13:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugen Hristev X-Patchwork-Id: 11236859 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 4FC15159A for ; Mon, 11 Nov 2019 12:13: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 2CCEB21783 for ; Mon, 11 Nov 2019 12:13:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="COl7i9bJ"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=microchiptechnology.onmicrosoft.com header.i=@microchiptechnology.onmicrosoft.com header.b="k7SIFq9M" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2CCEB21783 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=qN5QavYs1g1s7VWBCnCFJ/RcRvNFwNJ30A8l6K2tlAw=; b=COl7i9bJB118qp 8uyq6xYm5txF/t6kPVyzW6zGE7KAJjkiGU1yGTa6DVVdZqO9AaX7WX3enZWwQskvk5xob/3IgdhrD QjbzQkxzolgeDxfttUJ6LHBy4KyXZ7DKrH9vNrpLk0Ozi0LRjG3aXi21bacA1spS2VVxkvIiIsm4g JONwdS7P3GJGj3mgmT+IvTq0O5KX7lUETtQSSewUIxfahDYY0tBtr/ENEol9ss9T94mnhNh93OH3F 891e5hCiejrGv6or55CB7DkrziGMNuWPXUpEZhzBW09LRifDfGHLMXTe3nB8Wfc08yzI6u3AtDcqF 6ULQ3ID1fBg/xzUBI2vA==; 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 1iU8Zd-0002wz-Ts; Mon, 11 Nov 2019 12:13:37 +0000 Received: from esa4.microchip.iphmx.com ([68.232.154.123]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iU8Zb-0002wI-6Q for linux-arm-kernel@lists.infradead.org; Mon, 11 Nov 2019 12:13:36 +0000 Received-SPF: Pass (esa4.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=esa4.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 (esa4.microchip.iphmx.com: no sender authenticity information available from domain of postmaster@email.microchip.com) identity=helo; client-ip=198.175.253.82; receiver=esa4.microchip.iphmx.com; envelope-from="Eugen.Hristev@microchip.com"; x-sender="postmaster@email.microchip.com"; x-conformance=spf_only Authentication-Results: esa4.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: rPe7UUR+w4PxbCsqf1V5kPkaW0OF2vSpu67v5j5AiwXoDYUxpsg06Gw2eJ5lD4CeWoEby2q+l+ t7P0Ed9717AAdvW/6aDoQA6HikRSZ3dQq4Pj+C3JvTpY4mLKuaknEWM6STlOxSECJEZLQgmWIn bzHXM05aUg+V2Y+IbW8D5CyKaHlYZq7CY5e6m1ziP19MBTXHv8u6O9CDR9o8MOYWx4PLDKH+aS kEyoS1YWFkkIyIUfqW4H3qwY0t12dQkl+4MYNoE/fKZbCfbAS7uP1V84ZmAdPzH3U7P09554o/ RTk= X-IronPort-AV: E=Sophos;i="5.68,292,1569308400"; d="scan'208";a="54869699" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa4.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 11 Nov 2019 05:13:32 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) 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; Mon, 11 Nov 2019 05:13:32 -0700 Received: from NAM01-SN1-obe.outbound.protection.outlook.com (10.10.215.89) by email.microchip.com (10.10.87.72) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5 via Frontend Transport; Mon, 11 Nov 2019 05:13:31 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cLnj05HhKgb7gAxqtGOCe4s5Ki4YJkDxNoMhxyMOs15PD3pvDdzh5R9rkD8sSeDh4zLuljy2ULpkS1vK7t1AIyE1OgBubNwnO7pzc/zjV3vWq53mQCcQuG6ovEn8kcG6wvI6QNacFWhOMp1NEHeWiCOsXCnjBA7iuk+3Db38f19gLLF7RR6G/3jbBdgomkT4qetNfX75e8JPTAcbEgdO4h5EvtLct6i4iNdtWVVv4NaYq+MzPC6VJAmIrn/54ZhOSbePg4WrVahseZ7KrZYpIsrmNrSt/GoTnGjWBhT2bgPk0aDY1IGc+sQiWcWmbBUmBsH88Ow28WaHIsY7aJndQA== 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=m7kHc9yLhMquk7WXejTeQY3rYWwu451qsyDb0SMPSyI=; b=lvC1gJL3U25o/N6QY0IdG2cY0OiAFZ0BILBfTTx8ebBAazcczVE9GyfqxKoVbYjc7cu/58JzXSAvLMskb0XG+NmcZSVHLZJd+S2+zytngXftoIH7Sx4G1jtdloXo71Xf7SjtjosmjS5NZtCVnsiGKrmyPCNK+aU7DiW8kt58q8C+QNv68FpdmogH1aQEWT14N7TYhOQtD32GT3K+A0G6vIFRye8iSk/m60xlvAQ6rJlmGLr9dIfvS55jIqB4lQ8Vj0tgnwJgd5mv1owELqEDgiwHuE94P5LDKI0OKg1fO6dN00HuXJTIg3QBHT9WNIsN34bBoYRl2sMGoaPLdFQfGA== 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=m7kHc9yLhMquk7WXejTeQY3rYWwu451qsyDb0SMPSyI=; b=k7SIFq9MaiSKVeEfxrvXuNIuotsirVTF+FQQ7ue4uVhHhvXYA4FZMHRI81QI3fi1cq2iGtplM2XBxEDmWWd5vNp8SLQrH8M9fZ7rSICMl7+JAPdfIdasuA5xoEh1WXZ6AREewsm4hPEKW7ib3WDLUhwVlwkki0OdSeiaq5Jom/M= Received: from DM5PR11MB1242.namprd11.prod.outlook.com (10.168.108.8) by DM5PR11MB0073.namprd11.prod.outlook.com (10.164.155.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2430.24; Mon, 11 Nov 2019 12:13:31 +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.2430.027; Mon, 11 Nov 2019 12:13:30 +0000 From: To: , , , , , , , , Subject: [PATCH v3 1/3] watchdog: sama5d4_wdt: cleanup the bit definitions Thread-Topic: [PATCH v3 1/3] watchdog: sama5d4_wdt: cleanup the bit definitions Thread-Index: AQHVmIlu6IftJNh+5UamBWHFg3A6Og== Date: Mon, 11 Nov 2019 12:13:30 +0000 Message-ID: <1573474383-21915-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: AM0PR05CA0060.eurprd05.prod.outlook.com (2603:10a6:208:be::37) 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: 95d048f9-c44e-4c7c-b14b-08d766a090d2 x-ms-traffictypediagnostic: DM5PR11MB0073: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:4502; x-forefront-prvs: 0218A015FA x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(376002)(366004)(396003)(39860400002)(346002)(136003)(199004)(189003)(14454004)(6506007)(386003)(110136005)(102836004)(66476007)(66556008)(64756008)(66446008)(478600001)(3846002)(99286004)(36756003)(6116002)(6436002)(66946007)(305945005)(66066001)(7736002)(5660300002)(25786009)(6486002)(86362001)(52116002)(316002)(71200400001)(71190400001)(2201001)(6512007)(256004)(2906002)(81166006)(81156014)(4326008)(186003)(50226002)(8936002)(8676002)(107886003)(476003)(2616005)(486006)(26005)(2501003)(14444005); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR11MB0073; H:DM5PR11MB1242.namprd11.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX: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: AwViMZYugrgdEEXUwovFDnH/SSh2VW8I6T6lGA7AhXEmxBKAdUryzy6mIwvfd4JSTiJLKmVabSe44sm64q4Pb011SDN9eu3aYTYwaENtqyhP4XudvKJSATP9vfm2rY1JoiSeuggK3JZfSldxALgMx5u9M2v7lw6K6W+5Fcsffp6Lcswop8DClug9W05ygZQV8U7a22UGcK5BEegNvVAHiBGdD/tGEFUzviq4pfqGEdxufku8XO/YG5b4KpEAv0MLDcL+skmOogDUN/JbBYkb3IiZ9pT7nj78ACcaqMTms+ZkUQJ/m0A+0RgF8buzF4XR4VCEP3qi86OcLtHcIednusy4tpmNGuwLIj+Jw+eKMWKcd18XqJctP+ssp+HCrBk0XNxw5ij8/js+IBcikt2+wTsbduZnhTe+PWPZVAWF3/gIlIlPxmd+V4q4V3gMgvVF MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 95d048f9-c44e-4c7c-b14b-08d766a090d2 X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Nov 2019 12:13:30.8991 (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: 8rL4msIFCL4OwM0EHWT7DqmtzkEUHzU4Q1eplfW+gyWzX6xWiyJCmA2LNh2rnez0r9kWX+OOLq57IVprPBUxedMGFO1+uhm4JlDXrjYo2oU= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR11MB0073 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191111_041335_326230_C6EB582A X-CRM114-Status: UNSURE ( 7.73 ) 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.154.123 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an 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 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 --- Changes in v3: - new patch as requested from review on ML drivers/watchdog/at91sam9_wdt.h | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/drivers/watchdog/at91sam9_wdt.h b/drivers/watchdog/at91sam9_wdt.h index 390941c..2ca5fc5 100644 --- a/drivers/watchdog/at91sam9_wdt.h +++ b/drivers/watchdog/at91sam9_wdt.h @@ -14,23 +14,23 @@ #define AT91_WDT_H #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 (0xa5 << 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 (0xfff << 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 (0xfff << 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 Mon Nov 11 12:13:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugen Hristev X-Patchwork-Id: 11236865 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 393F2159A for ; Mon, 11 Nov 2019 12:13:56 +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 06CD121783 for ; Mon, 11 Nov 2019 12:13:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="fbfzdnXO"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=microchiptechnology.onmicrosoft.com header.i=@microchiptechnology.onmicrosoft.com header.b="O/JdrPV3" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 06CD121783 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=fbfzdnXObiVOt1 M0DWokCOc628oypkz9cWn0AZ9HIhMEfeaWaoby+OFblpeMbhRJzeGO6ONKDlm8o43nH162/ozjvn/ mcDQSq+e6XvaXGd+KwlPoaacoA8p5EQaTCSk9CE2dKjuZbPu9Nnxfu8Ec1hPPefy9GQn1bZ/9eeoh r/Ii8JMagXRM1Qf1bP837hr7g21QBpxi4TgAYMm+TR0DD0PlCo2gnHg9q50YxVx1FY2vmVQ89jyie Dlza+Bj0g/gdA0C9FHqzrnfsWlKttmjO7PZ8aomoB5rSF1oAAsOUhFJYGfDu3THJu4ly2qe8qJ1Zy 1XUheMYcd6FbP2Gc+Z6w==; 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 1iU8Zu-0003Gy-Ea; Mon, 11 Nov 2019 12:13:54 +0000 Received: from esa3.microchip.iphmx.com ([68.232.153.233]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iU8Zd-0002wY-1n for linux-arm-kernel@lists.infradead.org; Mon, 11 Nov 2019 12:13:38 +0000 Received-SPF: Pass (esa3.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=esa3.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 (esa3.microchip.iphmx.com: no sender authenticity information available from domain of postmaster@email.microchip.com) identity=helo; client-ip=198.175.253.82; receiver=esa3.microchip.iphmx.com; envelope-from="Eugen.Hristev@microchip.com"; x-sender="postmaster@email.microchip.com"; x-conformance=spf_only Authentication-Results: esa3.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: 3vdZptGtOCmUpe4eyeIo3UeYY1EVj4duAGSJ8JzpSTS6YyX9IFxGSn5zHmMs6HXqGu+MNght/U Qcuc6O36rOVq3HJKYlFeVy9u1wcAIbxbWZm83vvH+M3QphCJNrTNa+gZz/lgnfi5OipRKQQTbs rFL4cY8DP3w6CrpelGRRmrCiOMy0SmoV1X+CAr0eJp1ruQKPrwlVP+ZNgNK49godjGhaQy6Fr0 RQw+ng8JDLrzd2lyLPaMX2Mx3YDt81Xr3t/0M+IOlveKvufFeirnYW4xFd0EGvF4HPpKDLmu2j 4Jw= X-IronPort-AV: E=Sophos;i="5.68,292,1569308400"; d="scan'208";a="56481268" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa3.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 11 Nov 2019 05:13:34 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.85.151) 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; Mon, 11 Nov 2019 05:13:33 -0700 Received: from NAM01-SN1-obe.outbound.protection.outlook.com (10.10.215.89) by email.microchip.com (10.10.87.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5 via Frontend Transport; Mon, 11 Nov 2019 05:13:34 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cY6Rcn67HVAM0b1RnIX2Cw8P3VuBWziWmoXPdrHQsqtARUXHAzbzcCZrFXBhelkbGHbZLQ9sT7/MWM3ENSLVqi14bBvxp7XMaMQbulE4c84tVn+tf1yH/tUIesNwKo1GJpXmJqXN7J36PATZ7mITGRENgdG15kmWrtISUuJjoIDxfNdL5U0k5MEBPcXgVsaIcXXWC7YqR7oqhg+F06fDF04NfXv2p5esC34MPo+OELslvWd+p+7N8egZ8W4v5Sibia43Zj2kRnbK7xI5Vt1E0qpP3RCMhB42wLjJCoxO+qKIB/qVFRB15SUqi9vjGvfbeCrdGI6Jv+wRNHT8AzANtQ== 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=JPOpAAN3PLjX4cFJTOuA56bu3Qo5E4K93FSwqWjPPYA+pG51XjiS1f0j1dyTWhySQMocLCZN6/KrBAnfZA/0USJIdCu4NFxJ5i82orvHpltH71siIFZEmYYMAp9vFMXuiBqz5DzMdIqcAMI7lUSEDvWiGhMQ8u9FF+YjS60KkDIIg5JkflGDFrFJszgPvT4xCwM1/THlyf5/g9B7nJVuCyPq14O2t11CyCQFJ3QOW3fOJWGvPayQ342d6nP8gmklGT0ef/5LbupMAnnvZBbmBfrkUzqnckYXEAyNdTTwc+jaeBJ6PMlAE7G+ubL5Fb3Fpy+U8r1B+YBetAjbZEMbIA== 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=O/JdrPV3YzYfMwffqUo0cg3+P+z/nDwf0uuwc2YpkkoiiYZzv5GFHJe/BsGaZJS5jS5+tysdadq0FWbmvIliMK/cx+RsOrJy7MkEkS96OT84ew3qV2pPyZsdabFxn12zy1YsiE4RAn2inGHkpCOr/fpMyt12M0MCaFptMUM00Kw= Received: from DM5PR11MB1242.namprd11.prod.outlook.com (10.168.108.8) by DM5PR11MB0073.namprd11.prod.outlook.com (10.164.155.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2430.24; Mon, 11 Nov 2019 12:13:33 +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.2430.027; Mon, 11 Nov 2019 12:13:33 +0000 From: To: , , , , , , , , Subject: [PATCH v3 2/3] dt-bindings: watchdog: sama5d4_wdt: add microchip,sam9x60-wdt compatible Thread-Topic: [PATCH v3 2/3] dt-bindings: watchdog: sama5d4_wdt: add microchip,sam9x60-wdt compatible Thread-Index: AQHVmIlwyvo69uPMcE+cGm1AIKjkAA== Date: Mon, 11 Nov 2019 12:13:33 +0000 Message-ID: <1573474383-21915-2-git-send-email-eugen.hristev@microchip.com> References: <1573474383-21915-1-git-send-email-eugen.hristev@microchip.com> In-Reply-To: <1573474383-21915-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: AM0PR05CA0060.eurprd05.prod.outlook.com (2603:10a6:208:be::37) 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: 34ccb9c2-5155-44fc-162f-08d766a09256 x-ms-traffictypediagnostic: DM5PR11MB0073: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:669; x-forefront-prvs: 0218A015FA x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(376002)(366004)(396003)(39860400002)(346002)(136003)(199004)(189003)(14454004)(6506007)(386003)(76176011)(110136005)(102836004)(66476007)(66556008)(64756008)(66446008)(478600001)(3846002)(99286004)(36756003)(6116002)(6436002)(66946007)(305945005)(66066001)(7736002)(5660300002)(25786009)(6486002)(86362001)(4744005)(52116002)(316002)(71200400001)(71190400001)(2201001)(6512007)(256004)(446003)(11346002)(2906002)(81166006)(81156014)(4326008)(186003)(50226002)(8936002)(8676002)(107886003)(476003)(2616005)(486006)(26005)(2501003)(14444005)(142933001); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR11MB0073; H:DM5PR11MB1242.namprd11.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX: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: EMk3dza6zlq9fzGIIPX/VpQAKNkfiRAYXnsumg5kz5Z1u7wI5jsFV4fgHPp7jqFVfkvy3qUgREaHL5xqw3gAmAv9Q+fkl3fog0ExpgQ/r0jJCHTcSruUZE4ZQQlC35uXEuN+lsvs63R3wl1kPCua+ZrKaiq3WwQCU8JgoU+/3AqvFtMRqbT6z/dEiKI+gtCJvrtF/g54bMLbGopxReT5xQbDMwPef42KIhpmqGWdXDq9UK9VMVCP98akwPgm1oDqMuvKYM9zKy6spiR3fHQy+Frp/H8sLQkXs0ioX31oPM2A/nqHc0+WKD98ti/48+N2BJeFbxXlIBSE2AnlNTqy20QeaW3unG7qKTamVNt9itZURjae9V7DwFp2tamH12OllLQVuGF6DbJU7l3g25LmL5WCy+KbqgbuP8WiB9PAEUUEfdq1FGcZ489K9JHMZd3o MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 34ccb9c2-5155-44fc-162f-08d766a09256 X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Nov 2019 12:13:33.6278 (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: UVqnDzvqjb+Df1w6o9zWum9t6MlPahhTijP0OLV9fTa+FUkNnn0Fe5LLxP8v/KVBB25Wa6V7IvQjiaX3FZ1/oaiqrjSe4/LVGnp4zeBd2Bk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR11MB0073 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191111_041337_099329_FA57B805 X-CRM114-Status: UNSURE ( 8.93 ) 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.153.233 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an 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 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 Mon Nov 11 12:13:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugen Hristev X-Patchwork-Id: 11236867 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 D1829159A for ; Mon, 11 Nov 2019 12:14:16 +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 9C0522190F for ; Mon, 11 Nov 2019 12:14:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="aKZJ1CEM"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=microchiptechnology.onmicrosoft.com header.i=@microchiptechnology.onmicrosoft.com header.b="Az3DC4D+" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9C0522190F 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=FWTH1aQZAgW6Z+waPhibg0LZFJ7gfoM7/Y4WKChR/YM=; b=aKZJ1CEM8typFB Y8lPqbBCj6wsj14zuMlCxJEPwJmbDuTN48hqdxbqypdyJzniouuq1f4OJ/r2p1gziotDKMZuN3yWb WsxIsbZ1O2yaZEZGWpX9o7OfE3mGJ5Av3qar1V/TxcjVbEtlv5g1qyzeZJ62+pZJxjlQ1Z4Lt+KHF DkQJdZ1e3VMlNzYRT39uXIqAIyJ4vNCXPSGiu9nS1neolJ0jFK2Zp8Nkbp3H2FdKvPYenNWHCrxJo ZjZC9BB7yALhzPAT8TRK0p0b95eNwStZs04dggjniHY1YlQ2XIRqsQYi4mJ3R+ccCwcjTf4ih4hpr 0fWNxy96XnRczygRH4QA==; 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 1iU8aD-0003Vp-38; Mon, 11 Nov 2019 12:14:13 +0000 Received: from esa3.microchip.iphmx.com ([68.232.153.233]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iU8Ze-0002xY-7n for linux-arm-kernel@lists.infradead.org; Mon, 11 Nov 2019 12:13:40 +0000 Received-SPF: Pass (esa3.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=esa3.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 (esa3.microchip.iphmx.com: no sender authenticity information available from domain of postmaster@email.microchip.com) identity=helo; client-ip=198.175.253.82; receiver=esa3.microchip.iphmx.com; envelope-from="Eugen.Hristev@microchip.com"; x-sender="postmaster@email.microchip.com"; x-conformance=spf_only Authentication-Results: esa3.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: qwjK2+IWwtc7LTALAxmEz4Kb71cQg7OUIAl+/XeFO6hdOFTFPP5qF91dzPffmGZY8+1LD0ecm+ GkNbJZT2/Gb1NY1GwaDtft9c7+w3qTLXWIn00CWQyQtmDc1Guc+5ZVBhscfeJ4zCa5RMXy2+FY izIoB+VfHifwWLLFwTJge5oW7L3NyIoaBXB0j9VXeXnxuwTGQ16Z0s+3rL9jNRLs1k5hvJfMyb DNP8/cEDlHP4iLKpMHwYVfsSMFQf1k9wh3oaRYr2CVbbXffYm0+wXIMTjfZ6hqsT1JREWhgnJA TnE= X-IronPort-AV: E=Sophos;i="5.68,292,1569308400"; d="scan'208";a="56481279" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa3.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 11 Nov 2019 05:13:37 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Mon, 11 Nov 2019 05:13:37 -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; Mon, 11 Nov 2019 05:13:37 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Z74VyIRRPE6WPnpH2OgpZlALYh7gf0Nh2kgMCzlYdqhsrlyabYFBeIr6Kz4Nq0C29Wqt24dlu6ze75wqT6T/ByC8dlzL1TiABcdhG1ZT/Fl+Huf9ldAXOhm+mU6gyJEaGmlA8IvLvn1eL6loCVOTDULEJJnswtFi1ZxFWdNJoNxOgrKBOGItToXxFp2XH9SrrrHQYxLve0dHh3v8tGZ23Ontxc7xBkVosnuWOZYp+EVqW/+iXH+q2aIR0iZVHYEBaC/vq8g0772CUhGkq31bmVn0d3qUVLtZ85w6YujtrGmu+ETSSeNHpHtc9oITleizFoI2qFKFB4z4LpNqZdV8+A== 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=CNnWP6bwXx0QCUdcTEkrMOygbxT2Al6WEleJksYj0Nw=; b=V1omOHt2v/qGeKI39RLM8PCVlq8jeI/59CloAP4ECRNhixN9TtOsRCswqv6qJW14fAUMOwiCx5odRLiGdlId53T6EmaJbTjmPCK4DOKM/h4Nw3y6tCBSmPsTJ2zWt2HsgA9Z2Xge0w3ORoqewkHVVr1OWYv375Zlf0bgFBETwPsUwX1oswK0UWgdLeKd2PRlATTX4+Ukh8E1fX41jMOAhWEHdjpUQcQ7NGgR9y6VncPpfz8SxtoZfqWCtNVZqbLvU0Z2mM+np8rsu35OD9w01rUxneupsdpY6P/teMRx09S4J/nnz/A8+Z11+xMGXNWCslvpsGYHXNsrjeKTVI8n4g== 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=CNnWP6bwXx0QCUdcTEkrMOygbxT2Al6WEleJksYj0Nw=; b=Az3DC4D+QuRq+FgAmW6rCb5k+3FnIfVwhkfw7/EQO3XraldSz2oL2IvUlBZtpd9qSmMJQH2bJoQr7E2FuD4+7KjhGDQzh2mbfIxQ21vxg7tzSZuGCkir31tvK51n0ecz+mNfrdhTsUSf4sJQZMJKYnoEAfni09K1IpNHhyKL0VU= Received: from DM5PR11MB1242.namprd11.prod.outlook.com (10.168.108.8) by DM5PR11MB0073.namprd11.prod.outlook.com (10.164.155.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2430.24; Mon, 11 Nov 2019 12:13:36 +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.2430.027; Mon, 11 Nov 2019 12:13:36 +0000 From: To: , , , , , , , , Subject: [PATCH v3 3/3] watchdog: sama5d4_wdt: addition of sam9x60 compatible watchdog Thread-Topic: [PATCH v3 3/3] watchdog: sama5d4_wdt: addition of sam9x60 compatible watchdog Thread-Index: AQHVmIlx5k8vbeXivkS0+eMZks/KTQ== Date: Mon, 11 Nov 2019 12:13:35 +0000 Message-ID: <1573474383-21915-3-git-send-email-eugen.hristev@microchip.com> References: <1573474383-21915-1-git-send-email-eugen.hristev@microchip.com> In-Reply-To: <1573474383-21915-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: AM0PR05CA0060.eurprd05.prod.outlook.com (2603:10a6:208:be::37) 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: 2f2633ab-b5bd-45d1-e301-08d766a093df x-ms-traffictypediagnostic: DM5PR11MB0073: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:257; x-forefront-prvs: 0218A015FA x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(376002)(366004)(396003)(39860400002)(346002)(136003)(199004)(189003)(14454004)(6506007)(386003)(76176011)(110136005)(102836004)(66476007)(66556008)(64756008)(66446008)(478600001)(3846002)(99286004)(36756003)(6116002)(6436002)(66946007)(305945005)(66066001)(7736002)(5660300002)(25786009)(6486002)(86362001)(52116002)(316002)(71200400001)(71190400001)(2201001)(6512007)(256004)(446003)(11346002)(2906002)(81166006)(81156014)(4326008)(186003)(50226002)(8936002)(8676002)(107886003)(476003)(2616005)(486006)(26005)(2501003)(14444005); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR11MB0073; H:DM5PR11MB1242.namprd11.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX: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: MAPmnya7PjFrlrUqsMWNDk3OLjaaJrv7Px2nfcKrABAK/kiwMwK4UY8xOgBc4Qzmng5ifvWVFo8mWZx7FdbkRl/q9Rx50TVGXcXoFD/O9NYQ5yIYvVyZXptBsIxHRCixVZa2XRpgW/rokT7uLy6k/EhPDqL4jQwp9eE9xiDD9HziSPxR2SnDoNtDcvH+scTIk93rJdENyl1kuQ+aLQ8E2RYDjKkn02HBaWWSPPYukOu5GmXNe5FcmrfXt1AhpeZ+Ee/y1jVro3IiwOy2/LJgL5tCiw4cNhJvZuDcWxEOAqfVX78/NFOPmdwCIhdBBJ/4FTgnoFdoCe+nkmgiCbJuBaokd82QP7052zWDawgdOdq9rkbQG3sr6ZhdEsgSAw9m6X1rHrSsRjM4rtPHqyQ64M5pGmn6jNcD705+5VMT3e7/NzB436VnC8K1psNFd5Rs MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 2f2633ab-b5bd-45d1-e301-08d766a093df X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Nov 2019 12:13:35.9617 (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: 4L9wPxQJLeCH4HXvj1NLzWBrfJYPo3PDO/6ddeQlS3S3uTi255ogqdvZdNsM5kLlQHsak0kTG4uPX27BN8ce+NPLTfwEfOwB8cTUZjLSKAA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR11MB0073 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191111_041338_301832_18BD9415 X-CRM114-Status: GOOD ( 17.67 ) 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.153.233 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an 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 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 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 | 120 ++++++++++++++++++++++++++++++---------- 2 files changed, 105 insertions(+), 29 deletions(-) diff --git a/drivers/watchdog/at91sam9_wdt.h b/drivers/watchdog/at91sam9_wdt.h index 2ca5fc5..2a85135 100644 --- a/drivers/watchdog/at91sam9_wdt.h +++ b/drivers/watchdog/at91sam9_wdt.h @@ -20,7 +20,10 @@ #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_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 */ @@ -33,4 +36,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 (0xfff << 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..cf53354 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 @@ -26,10 +27,13 @@ #define WDT_SEC2TICKS(s) ((s) ? (((s) << 8) - 1) : 0) struct sama5d4_wdt { - struct watchdog_device wdd; - void __iomem *reg_base; - u32 mr; - unsigned long last_ping; + 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; } @@ -200,14 +254,16 @@ static int sama5d4_wdt_probe(struct platform_device *pdev) struct watchdog_device *wdd; struct sama5d4_wdt *wdt; void __iomem *regs; + const void *data; u32 irq = 0; - u32 timeout; int ret; wdt = devm_kzalloc(dev, sizeof(*wdt), GFP_KERNEL); if (!wdt) return -ENOMEM; + data = of_device_get_match_data(&pdev->dev); + wdd = &wdt->wdd; wdd->timeout = WDT_DEFAULT_TIMEOUT; wdd->info = &sama5d4_wdt_info; @@ -215,6 +271,7 @@ 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 = data ? *(bool *)data : false; watchdog_set_drvdata(wdd, wdt); @@ -224,15 +281,17 @@ 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) { + 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; @@ -268,8 +322,16 @@ static int sama5d4_wdt_probe(struct platform_device *pdev) return 0; } +static bool sam9x60_config = true; + static const struct of_device_id sama5d4_wdt_of_match[] = { - { .compatible = "atmel,sama5d4-wdt", }, + { + .compatible = "atmel,sama5d4-wdt", + }, + { + .compatible = "microchip,sam9x60-wdt", + .data = &sam9x60_config, + }, { } }; MODULE_DEVICE_TABLE(of, sama5d4_wdt_of_match);