From patchwork Sun Jan 25 20:30:42 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guenter Roeck X-Patchwork-Id: 5705521 Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id B5FB4C058D for ; Sun, 25 Jan 2015 20:31:07 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CC65720165 for ; Sun, 25 Jan 2015 20:31:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C3EDC20173 for ; Sun, 25 Jan 2015 20:31:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751918AbbAYUbE (ORCPT ); Sun, 25 Jan 2015 15:31:04 -0500 Received: from bh-25.webhostbox.net ([208.91.199.152]:45878 "EHLO bh-25.webhostbox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751676AbbAYUbE (ORCPT ); Sun, 25 Jan 2015 15:31:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=roeck-us.net; s=default; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=IQcsjJ1E3KRdkulI6/Xo4C7AkNRRDzxevXApkorRM2U=; b=XFbgtvNWtaLKyXapID6HRrOyRGAJS8q/pUr5V0ctv7LK60eM9OVmQ+gK/WN5kle9kNr1xWtvRB8m34OCCnovURASDiECNloCTHtNKHoQW4xPEG+F1r5Lylvn6U9gALAmvlzx22FMerZhnqTwb1h235DV8MlzK2dUDV+X1/17Op0=; Received: from mailnull by bh-25.webhostbox.net with sa-checked (Exim 4.82) (envelope-from ) id 1YFTpn-000kHd-SX for linux-pm@vger.kernel.org; Sun, 25 Jan 2015 20:31:04 +0000 Received: from 108-223-40-66.lightspeed.sntcca.sbcglobal.net ([108.223.40.66]:50503 helo=localhost) by bh-25.webhostbox.net with esmtpa (Exim 4.82) (envelope-from ) id 1YFTpk-000k4W-5Z; Sun, 25 Jan 2015 20:31:00 +0000 From: Guenter Roeck To: Sebastian Reichel Cc: linux-pm@vger.kernel.org, Guenter Roeck , David Woodhouse , devicetree@vger.kernel.org, Dmitry Eremin-Solenikov , Grant Likely , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Maxime Ripard , Rob Herring Subject: [PATCH v2 3/6] power/reset: Remove sun6i reboot driver Date: Sun, 25 Jan 2015 12:30:42 -0800 Message-Id: <1422217845-18901-4-git-send-email-linux@roeck-us.net> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1422217845-18901-1-git-send-email-linux@roeck-us.net> References: <1422217845-18901-1-git-send-email-linux@roeck-us.net> X-Authenticated_sender: guenter@roeck-us.net X-OutGoing-Spam-Status: No, score=-1.0 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID,T_RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-CTCH-PVer: 0000001 X-CTCH-Spam: Unknown X-CTCH-VOD: Unknown X-CTCH-Flags: 0 X-CTCH-RefID: str=0001.0A020203.54C55287.002C, ss=1, re=0.001, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-Score: 0.001 X-CTCH-ScoreCust: 0.000 X-CTCH-Rules: C_4847, X-CTCH-SenderID: linux@roeck-us.net X-CTCH-SenderID-Flags: 0 X-CTCH-SenderID-TotalMessages: 10 X-CTCH-SenderID-TotalSpam: 0 X-CTCH-SenderID-TotalSuspected: 0 X-CTCH-SenderID-TotalConfirmed: 0 X-CTCH-SenderID-TotalBulk: 0 X-CTCH-SenderID-TotalVirus: 0 X-CTCH-SenderID-TotalRecipients: 0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bh-25.webhostbox.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - roeck-us.net X-Get-Message-Sender-Via: bh-25.webhostbox.net: mailgid no entry from get_relayhosts_entry X-Source: X-Source-Args: X-Source-Dir: 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 sun6i restart is now handled by its watchdog driver directly, so this driver is no longer needed. Signed-off-by: Guenter Roeck --- drivers/power/reset/Kconfig | 6 --- drivers/power/reset/Makefile | 1 - drivers/power/reset/sun6i-reboot.c | 85 -------------------------------------- 3 files changed, 92 deletions(-) delete mode 100644 drivers/power/reset/sun6i-reboot.c diff --git a/drivers/power/reset/Kconfig b/drivers/power/reset/Kconfig index bf5acb3..4cb5744 100644 --- a/drivers/power/reset/Kconfig +++ b/drivers/power/reset/Kconfig @@ -109,12 +109,6 @@ config POWER_RESET_RESTART Instead they restart, and u-boot holds the SoC until the user presses a key. u-boot then boots into Linux. -config POWER_RESET_SUN6I - bool "Allwinner A31 SoC reset driver" - depends on ARCH_SUNXI - help - Reboot support for the Allwinner A31 SoCs. - config POWER_RESET_ST bool "ST restart power-off driver" depends on ARCH_STI diff --git a/drivers/power/reset/Makefile b/drivers/power/reset/Makefile index 1631652..11de15b 100644 --- a/drivers/power/reset/Makefile +++ b/drivers/power/reset/Makefile @@ -11,7 +11,6 @@ obj-$(CONFIG_POWER_RESET_MSM) += msm-poweroff.o obj-$(CONFIG_POWER_RESET_LTC2952) += ltc2952-poweroff.o obj-$(CONFIG_POWER_RESET_QNAP) += qnap-poweroff.o obj-$(CONFIG_POWER_RESET_RESTART) += restart-poweroff.o -obj-$(CONFIG_POWER_RESET_SUN6I) += sun6i-reboot.o obj-$(CONFIG_POWER_RESET_ST) += st-poweroff.o obj-$(CONFIG_POWER_RESET_VERSATILE) += arm-versatile-reboot.o obj-$(CONFIG_POWER_RESET_VEXPRESS) += vexpress-poweroff.o diff --git a/drivers/power/reset/sun6i-reboot.c b/drivers/power/reset/sun6i-reboot.c deleted file mode 100644 index af2cd7f..0000000 --- a/drivers/power/reset/sun6i-reboot.c +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Allwinner A31 SoCs reset code - * - * Copyright (C) 2012-2014 Maxime Ripard - * - * Maxime Ripard - * - * This file is licensed under the terms of the GNU General Public - * License version 2. This program is licensed "as is" without any - * warranty of any kind, whether express or implied. - */ - -#include -#include -#include -#include -#include -#include - -#include - -#define SUN6I_WATCHDOG1_IRQ_REG 0x00 -#define SUN6I_WATCHDOG1_CTRL_REG 0x10 -#define SUN6I_WATCHDOG1_CTRL_RESTART BIT(0) -#define SUN6I_WATCHDOG1_CONFIG_REG 0x14 -#define SUN6I_WATCHDOG1_CONFIG_RESTART BIT(0) -#define SUN6I_WATCHDOG1_CONFIG_IRQ BIT(1) -#define SUN6I_WATCHDOG1_MODE_REG 0x18 -#define SUN6I_WATCHDOG1_MODE_ENABLE BIT(0) - -static void __iomem *wdt_base; - -static void sun6i_wdt_restart(enum reboot_mode mode, const char *cmd) -{ - if (!wdt_base) - return; - - /* Disable interrupts */ - writel(0, wdt_base + SUN6I_WATCHDOG1_IRQ_REG); - - /* We want to disable the IRQ and just reset the whole system */ - writel(SUN6I_WATCHDOG1_CONFIG_RESTART, - wdt_base + SUN6I_WATCHDOG1_CONFIG_REG); - - /* Enable timer. The default and lowest interval value is 0.5s */ - writel(SUN6I_WATCHDOG1_MODE_ENABLE, - wdt_base + SUN6I_WATCHDOG1_MODE_REG); - - /* Restart the watchdog. */ - writel(SUN6I_WATCHDOG1_CTRL_RESTART, - wdt_base + SUN6I_WATCHDOG1_CTRL_REG); - - while (1) { - mdelay(5); - writel(SUN6I_WATCHDOG1_MODE_ENABLE, - wdt_base + SUN6I_WATCHDOG1_MODE_REG); - } -} - -static int sun6i_reboot_probe(struct platform_device *pdev) -{ - wdt_base = of_iomap(pdev->dev.of_node, 0); - if (!wdt_base) { - WARN(1, "failed to map watchdog base address"); - return -ENODEV; - } - - arm_pm_restart = sun6i_wdt_restart; - - return 0; -} - -static struct of_device_id sun6i_reboot_of_match[] = { - { .compatible = "allwinner,sun6i-a31-wdt" }, - {} -}; - -static struct platform_driver sun6i_reboot_driver = { - .probe = sun6i_reboot_probe, - .driver = { - .name = "sun6i-reboot", - .of_match_table = sun6i_reboot_of_match, - }, -}; -module_platform_driver(sun6i_reboot_driver);