From patchwork Tue Jan 17 23:07:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alexandre Belloni X-Patchwork-Id: 9522127 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2D83B60244 for ; Tue, 17 Jan 2017 23:08:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2750F285D1 for ; Tue, 17 Jan 2017 23:08:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1A792285EB; Tue, 17 Jan 2017 23:08:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8CF06285D1 for ; Tue, 17 Jan 2017 23:08:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751095AbdAQXIn (ORCPT ); Tue, 17 Jan 2017 18:08:43 -0500 Received: from mail.free-electrons.com ([62.4.15.54]:53469 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751142AbdAQXIC (ORCPT ); Tue, 17 Jan 2017 18:08:02 -0500 Received: by mail.free-electrons.com (Postfix, from userid 110) id 526F120BC9; Wed, 18 Jan 2017 00:07:47 +0100 (CET) Received: from localhost (unknown [88.191.26.124]) by mail.free-electrons.com (Postfix) with ESMTPSA id 2FE3820BC7; Wed, 18 Jan 2017 00:07:47 +0100 (CET) From: Alexandre Belloni To: Sebastian Reichel , Dmitry Eremin-Solenikov Cc: Nicolas Ferre , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, =?UTF-8?q?Szemz=C5=91=20Andr=C3=A1s?= , Alexandre Belloni Subject: [PATCH v2 1/2] power/reset: at91-reset: add samx7 support Date: Wed, 18 Jan 2017 00:07:37 +0100 Message-Id: <20170117230738.28257-1-alexandre.belloni@free-electrons.com> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Szemző András Add samx7 support. It is lacking a few bits and needs a new reset function. Signed-off-by: Szemző András Signed-off-by: Alexandre Belloni --- drivers/power/reset/at91-reset.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/power/reset/at91-reset.c b/drivers/power/reset/at91-reset.c index 568580cf0655..bb2588f0a4c7 100644 --- a/drivers/power/reset/at91-reset.c +++ b/drivers/power/reset/at91-reset.c @@ -134,6 +134,15 @@ static int sama5d3_restart(struct notifier_block *this, unsigned long mode, return NOTIFY_DONE; } +static int samx7_restart(struct notifier_block *this, unsigned long mode, + void *cmd) +{ + writel(cpu_to_le32(AT91_RSTC_KEY | AT91_RSTC_PROCRST), + at91_rstc_base); + + return NOTIFY_DONE; +} + static void __init at91_reset_status(struct platform_device *pdev) { u32 reg = readl(at91_rstc_base + AT91_RSTC_SR); @@ -173,6 +182,7 @@ static const struct of_device_id at91_reset_of_match[] = { { .compatible = "atmel,at91sam9260-rstc", .data = at91sam9260_restart }, { .compatible = "atmel,at91sam9g45-rstc", .data = at91sam9g45_restart }, { .compatible = "atmel,sama5d3-rstc", .data = sama5d3_restart }, + { .compatible = "atmel,samx7-rstc", .data = samx7_restart }, { /* sentinel */ } }; MODULE_DEVICE_TABLE(of, at91_reset_of_match);