From patchwork Wed Jun 25 23:03:26 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Feng Kan X-Patchwork-Id: 4424861 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 90EBD9F36A for ; Wed, 25 Jun 2014 23:07:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 615FD201D5 for ; Wed, 25 Jun 2014 23:07:13 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7F817201B4 for ; Wed, 25 Jun 2014 23:07:12 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WzwFh-0006TX-2q; Wed, 25 Jun 2014 23:05:17 +0000 Received: from exprod5og119.obsmtp.com ([64.18.0.189]) by bombadil.infradead.org with smtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WzwEW-0004Qv-Bt for linux-arm-kernel@lists.infradead.org; Wed, 25 Jun 2014 23:04:05 +0000 Received: from mail-pa0-f46.google.com ([209.85.220.46]) (using TLSv1) by exprod5ob119.postini.com ([64.18.4.12]) with SMTP ID DSNKU6tVT0WgtO8fw+UOafa2UOU46wYEshjl@postini.com; Wed, 25 Jun 2014 16:04:04 PDT Received: by mail-pa0-f46.google.com with SMTP id eu11so2318049pac.33 for ; Wed, 25 Jun 2014 16:03:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=XqiQ5+U4sKzK1Vh5Hj0RjmgynUOrHkcGDjiSP77j3eY=; b=Zpedy6R3+7fPejSi6JLwXobRei5TuWbxhQ3KmQQeT0hpn3nKT9/8rZAm0cWXgUefhB hwt1in8+TDsatmo3I58NuCHthZcLXzqig0urOoH6Zk3nZVG6L6IPMUpEjaXVva/5305e t2kUzFjGTQusjSnXjcxVTjldGDgQTiivZa4suEmZCqf+nQ3de41lBURAQQ/k0tbmNoKS OUuuflmM5KZ0MEtC8zwSHrcPnsQHEfOLH5hUBXPMBPzQV3Hs88pJlqnmfyOjm7vispNP Xt7bG+1iXzm91Qz4Y56eRgilvFmDjaxRkvCgypC8QUBRia9U5bz3LOwdt06XymB9D77w VVvQ== X-Gm-Message-State: ALoCoQlSFOOKqKwvRS12M5nZzfg+1GN5aW350e1WZiDgs2LPHJRq60AVCXjdOx1KzDyxMnzcmW8QtmPUfLHuCriOsEvyITZAqIekk28rgZ9EuLiwzqY4veXuxhzTw3PXkWfI8R/IwkONVjvSIW8ojrLQ/eL0K5clVA== X-Received: by 10.68.193.193 with SMTP id hq1mr15743089pbc.107.1403737422792; Wed, 25 Jun 2014 16:03:42 -0700 (PDT) X-Received: by 10.68.193.193 with SMTP id hq1mr15743076pbc.107.1403737422735; Wed, 25 Jun 2014 16:03:42 -0700 (PDT) Received: from fkan-lpt.amcc.com (63-147-59-2.dia.static.qwest.net. [63.147.59.2]) by mx.google.com with ESMTPSA id ox3sm6854776pbb.88.2014.06.25.16.03.41 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 25 Jun 2014 16:03:42 -0700 (PDT) From: Feng Kan To: dbaryshkov@gmail.com, catalin.marinas@arm.com, dwmw2@infradead.org, arnd@arndb.de, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, patches@apm.com Subject: [PATCH V7 6/6] power: reset: Remove X-Gene reboot driver Date: Wed, 25 Jun 2014 16:03:26 -0700 Message-Id: <1403737406-6474-7-git-send-email-fkan@apm.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1403737406-6474-1-git-send-email-fkan@apm.com> References: <1403737406-6474-1-git-send-email-fkan@apm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140625_160404_475608_B939F132 X-CRM114-Status: GOOD ( 15.08 ) X-Spam-Score: -2.3 (--) Cc: Feng Kan X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Remove X-Gene reboot driver. Signed-off-by: Feng Kan --- drivers/power/reset/Kconfig | 7 --- drivers/power/reset/Makefile | 1 - drivers/power/reset/xgene-reboot.c | 103 ------------------------------------- 3 files changed, 111 deletions(-) delete mode 100644 drivers/power/reset/xgene-reboot.c diff --git a/drivers/power/reset/Kconfig b/drivers/power/reset/Kconfig index 7035236..cfe444e 100644 --- a/drivers/power/reset/Kconfig +++ b/drivers/power/reset/Kconfig @@ -66,13 +66,6 @@ config POWER_RESET_VEXPRESS Power off and reset support for the ARM Ltd. Versatile Express boards. -config POWER_RESET_XGENE - bool "APM SoC X-Gene reset driver" - depends on ARM64 - depends on POWER_RESET - help - Reboot support for the APM SoC X-Gene Eval boards. - config POWER_RESET_KEYSTONE bool "Keystone reset driver" depends on ARCH_KEYSTONE diff --git a/drivers/power/reset/Makefile b/drivers/power/reset/Makefile index b1b5ab3..62088d8 100644 --- a/drivers/power/reset/Makefile +++ b/drivers/power/reset/Makefile @@ -6,6 +6,5 @@ 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_VEXPRESS) += vexpress-poweroff.o -obj-$(CONFIG_POWER_RESET_XGENE) += xgene-reboot.o obj-$(CONFIG_POWER_RESET_KEYSTONE) += keystone-reset.o obj-$(CONFIG_POWER_RESET_SYSCON) += syscon-reboot.o diff --git a/drivers/power/reset/xgene-reboot.c b/drivers/power/reset/xgene-reboot.c deleted file mode 100644 index ecd55f8..0000000 --- a/drivers/power/reset/xgene-reboot.c +++ /dev/null @@ -1,103 +0,0 @@ -/* - * AppliedMicro X-Gene SoC Reboot Driver - * - * Copyright (c) 2013, Applied Micro Circuits Corporation - * Author: Feng Kan - * Author: Loc Ho - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, - * MA 02111-1307 USA - * - * This driver provides system reboot functionality for APM X-Gene SoC. - * For system shutdown, this is board specify. If a board designer - * implements GPIO shutdown, use the gpio-poweroff.c driver. - */ -#include -#include -#include -#include -#include -#include -#include - -struct xgene_reboot_context { - struct platform_device *pdev; - void *csr; - u32 mask; -}; - -static struct xgene_reboot_context *xgene_restart_ctx; - -static void xgene_restart(char str, const char *cmd) -{ - struct xgene_reboot_context *ctx = xgene_restart_ctx; - unsigned long timeout; - - /* Issue the reboot */ - if (ctx) - writel(ctx->mask, ctx->csr); - - timeout = jiffies + HZ; - while (time_before(jiffies, timeout)) - cpu_relax(); - - dev_emerg(&ctx->pdev->dev, "Unable to restart system\n"); -} - -static int xgene_reboot_probe(struct platform_device *pdev) -{ - struct xgene_reboot_context *ctx; - - ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_KERNEL); - if (!ctx) { - dev_err(&pdev->dev, "out of memory for context\n"); - return -ENODEV; - } - - ctx->csr = of_iomap(pdev->dev.of_node, 0); - if (!ctx->csr) { - devm_kfree(&pdev->dev, ctx); - dev_err(&pdev->dev, "can not map resource\n"); - return -ENODEV; - } - - if (of_property_read_u32(pdev->dev.of_node, "mask", &ctx->mask)) - ctx->mask = 0xFFFFFFFF; - - ctx->pdev = pdev; - arm_pm_restart = xgene_restart; - xgene_restart_ctx = ctx; - - return 0; -} - -static struct of_device_id xgene_reboot_of_match[] = { - { .compatible = "apm,xgene-reboot" }, - {} -}; - -static struct platform_driver xgene_reboot_driver = { - .probe = xgene_reboot_probe, - .driver = { - .name = "xgene-reboot", - .of_match_table = xgene_reboot_of_match, - }, -}; - -static int __init xgene_reboot_init(void) -{ - return platform_driver_register(&xgene_reboot_driver); -} -device_initcall(xgene_reboot_init);