From patchwork Fri Feb 23 13:37:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Myl=C3=A8ne_Josserand?= X-Patchwork-Id: 10237945 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9353D602A0 for ; Fri, 23 Feb 2018 14:51:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8184829661 for ; Fri, 23 Feb 2018 14:51:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 75D6E29667; Fri, 23 Feb 2018 14:51:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id DA6CE29661 for ; Fri, 23 Feb 2018 14:51:11 +0000 (UTC) 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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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=7+BJKmljaPtFnHYRXX0XA1+ZS/QJAcO+DWRtyesNCn4=; b=nggBXKPq9K9qYB hPfe5+p7Yu8LreKeCDkf6hsk3Ik+xg+dkhliGOBuULejMorPsqPBL2A0A2e/epP4J2oPMWOaBXSFw z/4eSKbtGq1YYdzjO5G6gwRNxS+oJMhdU8BogW0BtuMVBz83GZAgKRZ5qESnSnCN8A5wxyPGMvPvN 8kAn50Pi+TlhXShNi5Rf8qO1ek+O+sajDCMvkSBJDfZ71SBKdvufpF63IFeFtdKa30zTn8b+sLAML ps5J69wXxFLzvUkxapHPUacf3NsX55wxQjylI7mPAEMcJ6SbR/rT9YoIm0Z19d+OvkXq77kFbRfnB tCHlVVYD4kw6jlVRAVDw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1epEgd-00046B-RM; Fri, 23 Feb 2018 14:50:59 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1epEXh-0004ym-NI for linux-arm-kernel@bombadil.infradead.org; Fri, 23 Feb 2018 14:41:45 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Transfer-Encoding:Content-Type: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=VlIXdJK6Fhy0KJXYZnlWUZluM5l/PEwBHEIWxN73T6o=; b=g/fa6+W07KNu452B/8TFE4FCo5 oC43+kGDWUSsygp6NF7kOFAQEQHCIyqLCIi2fNHEIVDHdwQSYacbiNrMEPKovgqsOVH1jV5scfWJh wMpLDuh90pcBZHOdbW8Zt3zOajq5zS2YM6zYIqUAsoesovW47MdYay9bN31XQw0k1dMzyA9xlTVIW QpytLFFocZC5zrQzIcIaxlw/mqsHfUD/FaLIZoeSB0/ViUzORXIiOAermsf6XT6j4Bjrr7rP37ytg giINCmdhtRD+A32WzBBSJR9/DKix1zXSURQFkO85o4+PhsyY1ylZyJaGTqXcvANpqiLbbtHYQ6yXc Brl8uPbA==; Received: from mail.free-electrons.com ([62.4.15.54]) by merlin.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1epDYk-00018U-6F for linux-arm-kernel@lists.infradead.org; Fri, 23 Feb 2018 13:38:47 +0000 Received: by mail.free-electrons.com (Postfix, from userid 110) id 6B1B82087B; Fri, 23 Feb 2018 14:38:33 +0100 (CET) Received: from dell-desktop.lan (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr [90.63.216.87]) by mail.free-electrons.com (Postfix) with ESMTPSA id 07A3E20379; Fri, 23 Feb 2018 14:38:33 +0100 (CET) From: =?UTF-8?q?Myl=C3=A8ne=20Josserand?= To: maxime.ripard@bootlin.com, linux@armlinux.org.uk, wens@csie.org, robh+dt@kernel.org, mark.rutland@arm.com Subject: [PATCH v4 04/10] ARM: sun8i: smp: Add hotplug support for sun8i-a83t Date: Fri, 23 Feb 2018 14:37:36 +0100 Message-Id: <20180223133742.26044-5-mylene.josserand@bootlin.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180223133742.26044-1-mylene.josserand@bootlin.com> References: <20180223133742.26044-1-mylene.josserand@bootlin.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180223_083846_332726_3079A70C X-CRM114-Status: GOOD ( 10.91 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, quentin.schulz@bootlin.com, linux-kernel@vger.kernel.org, clabbe.montjoie@gmail.com, thomas.petazzoni@bootlin.com, mylene.josserand@bootlin.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Add hotplug support for sun8i-a83t. Hotplug CPU for CPU0 is currently not working. Remove the possibility to disable CPU0 only for sun8i-a83t. Signed-off-by: Mylène Josserand --- arch/arm/mach-sunxi/mc_smp.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-sunxi/mc_smp.c b/arch/arm/mach-sunxi/mc_smp.c index 3bd9066a1422..f2c2cfca28cd 100644 --- a/arch/arm/mach-sunxi/mc_smp.c +++ b/arch/arm/mach-sunxi/mc_smp.c @@ -579,6 +579,8 @@ static int sunxi_cluster_powerdown(unsigned int cluster) reg = readl(prcm_base + PRCM_PWROFF_GATING_REG(cluster)); if (is_sun9i) reg |= PRCM_PWROFF_GATING_REG_CLUSTER_SUN9I; + else + reg |= PRCM_PWROFF_GATING_REG_CLUSTER_SUN8I; writel(reg, prcm_base + PRCM_PWROFF_GATING_REG(cluster)); udelay(20); @@ -660,8 +662,12 @@ static int sunxi_mc_smp_cpu_kill(unsigned int l_cpu) return !ret; } -static bool sunxi_mc_smp_cpu_can_disable(unsigned int __unused) +static bool sunxi_mc_smp_cpu_can_disable(unsigned int cpu) { + /* CPU0 hotplug handled only for sun9i */ + if (!is_sun9i) + if (cpu == 0) + return false; return true; } #endif