Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp996868imu; Wed, 16 Jan 2019 10:54:47 -0800 (PST) X-Google-Smtp-Source: ALg8bN6rDUki3moiJln4eAYiC4tw2hhODo4/tpdyl7/R7ftN1pzMAlA4vXz+NQpsx0jPuGTBZlQC X-Received: by 2002:a63:fd0a:: with SMTP id d10mr10329299pgh.164.1547664887612; Wed, 16 Jan 2019 10:54:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547664887; cv=none; d=google.com; s=arc-20160816; b=t2MQhgLdl9Krolais+rix2nE0gRz5qmTdDp4m+gw+Dtr+dqf9r2N8NmSJEQBYasXgw OlU8Cc42Mwk03qsj+ezfA/V/AOgCmqnFrwchChL0a9GsL1q9e7zE/NQNixc7diAAaFaA zchug0DeRsjOTIX9juijOMdbyMs/slKp32mj8ZVldccAz3KoIVezzikV2mdZyxPNdBcr 3KXeR0uDhozBigIyDW8wc1Xu1BaSSuFMQ071hWtQCS/yM50828jkrpdryBB/rWem9/Sm JyOJ80Wa5VIvBNhIm4xg51lENwRyhulP5pNzessDe1OXkotfSgq7FRyQ4HrQa0d/o5aO 5i7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=npl2LSpb34pJc7EkqiG+yX7DWL7pr9eX4vzrV0gWQ6o=; b=vw+omzeuhRX/AlhfFZ6X4SwQO3JtYglIgWlZt+yl2m1fePQjKBAWHoEZX9IISPMS2x 995E/sSEbOV8ZgCnEDEIKR6yAeulWEuxL9UDL/I2lnW8I2dMOjef0/pYcREFtMyYiQmj o6GiUFQRDeBk07cbDpt8FeW1l+/ZMrjCGfkFoS6BO9z1gKV2U3cBPcMBSYNoRodozqGB picZ//G+tCXN0nWLzu5dgY+lCgVgBYSNjeKdO/EUMf9dRn9zD833kPoYE53hH5OsUneq 5tBhIXOgoTMZEY+YB4Mnu8syzxc07W8NiaFV3C8Aar6crI7uUAv0zuT71OwYQw4aWvOP g5bA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o12si6902281pgn.145.2019.01.16.10.54.31; Wed, 16 Jan 2019 10:54:47 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404062AbfAPJ6K (ORCPT + 99 others); Wed, 16 Jan 2019 04:58:10 -0500 Received: from esa2.microchip.iphmx.com ([68.232.149.84]:46525 "EHLO esa2.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404027AbfAPJ6H (ORCPT ); Wed, 16 Jan 2019 04:58:07 -0500 X-IronPort-AV: E=Sophos;i="5.56,485,1539673200"; d="scan'208";a="25386569" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa2.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 16 Jan 2019 02:58:06 -0700 Received: from tenerife.corp.atmel.com (10.10.76.4) by chn-sv-exch02.mchp-main.com (10.10.76.38) with Microsoft SMTP Server id 14.3.352.0; Wed, 16 Jan 2019 02:58:05 -0700 From: Nicolas Ferre To: Alexandre Belloni , Ludovic Desroches CC: , , Sebastian Reichel , , , "David S . Miller" , , Alan Stern , "Greg Kroah-Hartman" , Rob Herring , , Nicolas Ferre Subject: [PATCH 6/8] power: reset: at91-reset: add support for sam9x60 SoC Date: Wed, 16 Jan 2019 10:57:42 +0100 Message-ID: <7e68a0298b8802edaead1f9c011f9c2e191ecf6a.1547629763.git.nicolas.ferre@microchip.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add support for additional reset causes and the proper compatibility string for sam9x60 SoC. The restart function is the same as the samx7. Signed-off-by: Nicolas Ferre --- drivers/power/reset/at91-reset.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/power/reset/at91-reset.c b/drivers/power/reset/at91-reset.c index f44a9ffcc2ab..44ca983a49a1 100644 --- a/drivers/power/reset/at91-reset.c +++ b/drivers/power/reset/at91-reset.c @@ -44,6 +44,9 @@ enum reset_type { RESET_TYPE_WATCHDOG = 2, RESET_TYPE_SOFTWARE = 3, RESET_TYPE_USER = 4, + RESET_TYPE_CPU_FAIL = 6, + RESET_TYPE_XTAL_FAIL = 7, + RESET_TYPE_ULP2 = 8, }; static void __iomem *at91_ramc_base[2], *at91_rstc_base; @@ -164,6 +167,15 @@ static void __init at91_reset_status(struct platform_device *pdev) case RESET_TYPE_USER: reason = "user reset"; break; + case RESET_TYPE_CPU_FAIL: + reason = "CPU clock failure detection"; + break; + case RESET_TYPE_XTAL_FAIL: + reason = "32.768 kHz crystal failure detection"; + break; + case RESET_TYPE_ULP2: + reason = "ULP2 reset"; + break; default: reason = "unknown reset"; break; @@ -183,6 +195,7 @@ static const struct of_device_id at91_reset_of_match[] = { { .compatible = "atmel,at91sam9g45-rstc", .data = at91sam9g45_restart }, { .compatible = "atmel,sama5d3-rstc", .data = sama5d3_restart }, { .compatible = "atmel,samx7-rstc", .data = samx7_restart }, + { .compatible = "microchip,sam9x60-rstc", .data = samx7_restart }, { /* sentinel */ } }; MODULE_DEVICE_TABLE(of, at91_reset_of_match); -- 2.17.1