From patchwork Thu Sep 22 22:53:21 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alexandre Belloni X-Patchwork-Id: 9347121 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 9CF0F607EE for ; Thu, 22 Sep 2016 22:53:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 971D22AC5B for ; Thu, 22 Sep 2016 22:53:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 776052ACDA; Thu, 22 Sep 2016 22:53:56 +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 EBAD22AC5B for ; Thu, 22 Sep 2016 22:53:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S938814AbcIVWxl (ORCPT ); Thu, 22 Sep 2016 18:53:41 -0400 Received: from down.free-electrons.com ([37.187.137.238]:40659 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754311AbcIVWxi (ORCPT ); Thu, 22 Sep 2016 18:53:38 -0400 Received: by mail.free-electrons.com (Postfix, from userid 110) id 80CFE488; Fri, 23 Sep 2016 00:53:35 +0200 (CEST) Received: from localhost (unknown [88.191.26.124]) by mail.free-electrons.com (Postfix) with ESMTPSA id 52EE83C6; Fri, 23 Sep 2016 00:53:35 +0200 (CEST) From: Alexandre Belloni To: Sebastian Reichel Cc: Dmitry Eremin-Solenikov , Nicolas Ferre , =?UTF-8?q?Szemz=C5=91=20Andr=C3=A1s?= , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Alexandre Belloni Subject: [PATCH 1/2] power/reset: at91-reset: add samx7 support Date: Fri, 23 Sep 2016 00:53:21 +0200 Message-Id: <20160922225322.31677-1-alexandre.belloni@free-electrons.com> X-Mailer: git-send-email 2.9.3 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 1b5d450586d1..563722e64d7b 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 */ } };