From patchwork Fri Mar 31 09:01:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Brodkin X-Patchwork-Id: 745539 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3vvb953r7Gz9s0Z for ; Fri, 31 Mar 2017 20:02:01 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="axbd23Ei"; dkim-atps=neutral DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=O8I6MA9bqF3v139zUlkLI5edAK/D03FDYvSKYEjro90=; b=axbd23EihFDm5onUYqZm/TGLyk fOuOCYGPyX/5cl9QFb/Sf2jUeBCiVtUFgzMjtvPoAuVmuG96qGy+PvRDXpbKxL4Ilof/E2VMXTqQE IL0AUJjkzishMTSjy+3zYokys2Y/uk6xK5b2qTgc+G49mzZDV77knKX7Am+FfPEpU1fD0O+kAeG1l syqytbtQPZkCP8ZOlA+a+u2NXse2hMSmrXKp1GZF69Ek4yjNN7zuqh7weETwiyJjiDWu1m/yE8yfJ G1sDDIsw0Z6ioK2PXZUOxcD6q2zlyvHKWRbvD/bcoe82eE0b4u6OHjRFTU1Fv0fDlkwvZOqyynOna +B6P/zdA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1ctsRU-0003wJ-4K; Fri, 31 Mar 2017 09:02:00 +0000 Received: from smtprelay.synopsys.com ([198.182.47.9]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1ctsRO-0003eo-K9 for linux-snps-arc@lists.infradead.org; Fri, 31 Mar 2017 09:01:57 +0000 Received: from mailhost.synopsys.com (mailhost3.synopsys.com [10.12.238.238]) by smtprelay.synopsys.com (Postfix) with ESMTP id D232024E0A35; Fri, 31 Mar 2017 02:01:34 -0700 (PDT) Received: from mailhost.synopsys.com (localhost [127.0.0.1]) by mailhost.synopsys.com (Postfix) with ESMTP id BAF7E2243; Fri, 31 Mar 2017 02:01:34 -0700 (PDT) Received: from abrodkin-7440l.internal.synopsys.com (unknown [10.121.8.98]) by mailhost.synopsys.com (Postfix) with ESMTP id BCF64222D; Fri, 31 Mar 2017 02:01:33 -0700 (PDT) From: Alexey Brodkin To: u-boot@lists.denx.de Subject: [PATCH 1/2] axs103: Clean-up smp_kick_all_cpus() Date: Fri, 31 Mar 2017 12:01:24 +0300 Message-Id: <1490950885-9791-2-git-send-email-abrodkin@synopsys.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1490950885-9791-1-git-send-email-abrodkin@synopsys.com> References: <1490950885-9791-1-git-send-email-abrodkin@synopsys.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170331_020154_998934_AE1D4270 X-CRM114-Status: UNSURE ( 5.70 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [198.182.47.9 listed in list.dnswl.org] -0.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: linux-snps-arc@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux on Synopsys ARC Processors List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-snps-arc@lists.infradead.org, Alexey Brodkin MIME-Version: 1.0 Sender: "linux-snps-arc" Errors-To: linux-snps-arc-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org * Rely on default pulse polarity value * Don't mess with "multicore" value as it doesn't affect execution In essence we now do a bare minimal stuff: 1) Select HS38x2_1 with CORE_SEL=1 bits 2) Select "manual" core start (via CREG) with START_MODE=0 3) Generate cpu_start pulse with START=1 Signed-off-by: Alexey Brodkin --- board/synopsys/axs10x/axs10x.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/board/synopsys/axs10x/axs10x.c b/board/synopsys/axs10x/axs10x.c index a5e774b2cf7b..57c790220f71 100644 --- a/board/synopsys/axs10x/axs10x.c +++ b/board/synopsys/axs10x/axs10x.c @@ -61,16 +61,14 @@ void smp_kick_all_cpus(void) { /* CPU start CREG */ #define AXC003_CREG_CPU_START 0xF0001400 - /* Bits positions in CPU start CREG */ #define BITS_START 0 -#define BITS_POLARITY 8 +#define BITS_START_MODE 4 #define BITS_CORE_SEL 9 -#define BITS_MULTICORE 12 - -#define CMD (1 << BITS_MULTICORE) | (1 << BITS_CORE_SEL) | \ - (1 << BITS_POLARITY) | (1 << BITS_START) - writel(CMD, (void __iomem *)AXC003_CREG_CPU_START); + int cmd = readl((void __iomem *)AXC003_CREG_CPU_START); + cmd |= (1 << BITS_CORE_SEL) | (1 << BITS_START); + cmd &= ~(1 << BITS_START_MODE); + writel(cmd, (void __iomem *)AXC003_CREG_CPU_START); } #endif