From patchwork Wed May 11 21:36:18 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Brand X-Patchwork-Id: 9075101 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.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 36ABD9F6FA for ; Wed, 11 May 2016 21:37:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DE61D20155 for ; Wed, 11 May 2016 21:37:35 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 146482017D for ; Wed, 11 May 2016 21:37:35 +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 1b0bnd-0001Y7-A5; Wed, 11 May 2016 21:36:09 +0000 Received: from mail-pa0-x235.google.com ([2607:f8b0:400e:c03::235]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1b0bnQ-0001JN-W3 for linux-arm-kernel@lists.infradead.org; Wed, 11 May 2016 21:35:58 +0000 Received: by mail-pa0-x235.google.com with SMTP id xk12so21867853pac.0 for ; Wed, 11 May 2016 14:35:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:subject:date:message-id:in-reply-to:references; bh=CffitxilPOs9GyYiC+Rfx2YqTZ0EIfjMgMmGBLG7SjI=; b=aDHsjL0wkoAvATX9Uv6vDNh1NNXTnM6KjESn52f4QB4TorRP7yJKQ7M7vACMctphga 0Zromyd70vNH26edq46oPUNFsu82bn89qNZf1fEMOs87HcPDEQvs7aKZgabNOhb9UfdT AwPSx5xU03fVbNo1uOj8zMPAf2IIMuEBzGYIQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=CffitxilPOs9GyYiC+Rfx2YqTZ0EIfjMgMmGBLG7SjI=; b=L9Jkzf+LlcbtO2FP9R99zYV7vgzj2GEo2ubPmpYa/WU9uhFEF0bgL4sObDGUCdvn2X epuuuB8qp1Z/UJr28O4PT2NpcEWDUCoIfuk0YbYiZ+fOnQIP2pY7dB/C92jhmRxtIDW5 T9vEvbOwqgXEzWfjPWvohA4W1gkO7nkAfBilVAPRd0/JqJRAzWXI2PLgi93sujJw/aAO rrMCOL0//fzoQnCgpuC+M+cpUktw5VcU5a766LHZ7yiXVVpWB2OGMszAIo8tUaYIHBJg 9aB+Cv3AUIQCPdUnryQNcfbdHBmVBhqf9LK8fzFQnXOZGDzBrW6tL1eYWVWIUgK2kwWX b6xA== X-Gm-Message-State: AOPr4FWSw+E9RYQp+OzsvyjqxkLdtf8KtLeF5ynVfbpSiTpX2Uo1wTAcENCE8jtvZThgx/rc X-Received: by 10.66.246.165 with SMTP id xx5mr8302939pac.87.1463002535757; Wed, 11 May 2016 14:35:35 -0700 (PDT) Received: from lbrmn-lnxub61.ric.broadcom.com ([216.31.219.19]) by smtp.gmail.com with ESMTPSA id ym8sm14459263pab.22.2016.05.11.14.35.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 11 May 2016 14:35:35 -0700 (PDT) From: Chris Brand To: Sebastian Reichel , Dmitry Eremin-Solenikov , David Woodhouse , linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Florian Fainelli , Ray Jui , Scott Branden , linux-arm-kernel@lists.infradead.org, bcm-kernel-feedback-list@broadcom.com, Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , devicetree@vger.kernel.org Subject: [PATCH v2 2/6] arm: bcm21664: Remove reset code Date: Wed, 11 May 2016 14:36:18 -0700 Message-Id: <1463002582-6875-3-git-send-email-chris.brand@broadcom.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1463002582-6875-1-git-send-email-chris.brand@broadcom.com> References: <1463002582-6875-1-git-send-email-chris.brand@broadcom.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160511_143557_166089_93803C1C X-CRM114-Status: GOOD ( 14.40 ) X-Spam-Score: -2.7 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 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=-5.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,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 The kona reset driver now provides this functionality. Signed-off-by: Chris Brand --- arch/arm/mach-bcm/board_bcm21664.c | 42 -------------------------------------- 1 file changed, 42 deletions(-) diff --git a/arch/arm/mach-bcm/board_bcm21664.c b/arch/arm/mach-bcm/board_bcm21664.c index 82ad5687771f..65b3db06e57a 100644 --- a/arch/arm/mach-bcm/board_bcm21664.c +++ b/arch/arm/mach-bcm/board_bcm21664.c @@ -11,53 +11,12 @@ * GNU General Public License for more details. */ -#include #include -#include #include #include "kona_l2_cache.h" -#define RSTMGR_DT_STRING "brcm,bcm21664-resetmgr" - -#define RSTMGR_REG_WR_ACCESS_OFFSET 0 -#define RSTMGR_REG_CHIP_SOFT_RST_OFFSET 4 - -#define RSTMGR_WR_PASSWORD 0xa5a5 -#define RSTMGR_WR_PASSWORD_SHIFT 8 -#define RSTMGR_WR_ACCESS_ENABLE 1 - -static void bcm21664_restart(enum reboot_mode mode, const char *cmd) -{ - void __iomem *base; - struct device_node *resetmgr; - - resetmgr = of_find_compatible_node(NULL, NULL, RSTMGR_DT_STRING); - if (!resetmgr) { - pr_emerg("Couldn't find " RSTMGR_DT_STRING "\n"); - return; - } - base = of_iomap(resetmgr, 0); - if (!base) { - pr_emerg("Couldn't map " RSTMGR_DT_STRING "\n"); - return; - } - - /* - * A soft reset is triggered by writing a 0 to bit 0 of the soft reset - * register. To write to that register we must first write the password - * and the enable bit in the write access enable register. - */ - writel((RSTMGR_WR_PASSWORD << RSTMGR_WR_PASSWORD_SHIFT) | - RSTMGR_WR_ACCESS_ENABLE, - base + RSTMGR_REG_WR_ACCESS_OFFSET); - writel(0, base + RSTMGR_REG_CHIP_SOFT_RST_OFFSET); - - /* Wait for reset */ - while (1); -} - static void __init bcm21664_init(void) { of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); @@ -71,6 +30,5 @@ static const char * const bcm21664_dt_compat[] = { DT_MACHINE_START(BCM21664_DT, "BCM21664 Broadcom Application Processor") .init_machine = bcm21664_init, - .restart = bcm21664_restart, .dt_compat = bcm21664_dt_compat, MACHINE_END