Received: by 10.213.65.68 with SMTP id h4csp3168890imn; Mon, 2 Apr 2018 23:25:32 -0700 (PDT) X-Google-Smtp-Source: AIpwx49cV6ImCGAUemaEqES3gFMEuNM9NWJGMrhBWipA/1xOeLoOrW0tUceNs7CV8ZtAXO4RH4N4 X-Received: by 10.99.179.3 with SMTP id i3mr8203270pgf.434.1522736732777; Mon, 02 Apr 2018 23:25:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522736732; cv=none; d=google.com; s=arc-20160816; b=qcty/dFQG5aBGpAr0q2urdanDyu4Ri+V1s9YNwE6mnsUnHOp8BBHcEGTzEnOgnvkSx +D+hfEqidX4dBYs7saUI3xpITqeUzxfKfVsgOBJR7eIIMplk6WLL8ogxP6GgXkt4UJEZ n6wTuSlLYXmk+/PjZ0qTwsYXsd8a6FEkR2OMA/gkYGoNSal7pCRHNgjWuzutR8A8wEQx LfhKOl+mGqwnooZRb7KOhKADyH185ViLQQVdwRANw3LCflvNrSfDJk5Cdaj211TeRG/e 23z8lQaNLXF0mt8Dk58u8DjAG1l+P8g7SksmDtRtTKv5K25eRiDkMO0mysxbotyId6P7 /ixQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=N9BXNC5kt+Ztau5lGyhoqiHzzveniSjFJnR4mVSfUvg=; b=POrh/+S2zKCWBkaJ05uo1exyEYuIhr2UGF8x7xQO0z7/QsFFz4J4ZE+Tsk5Y/Az4M7 0Xnb372o9DRrVf9DHs+KxP5Q+A5AapvI+Z8/hASA84tZyZTRNvyuljRHFVZxD8rX+ysM DuK6LhrBmIwMKW97izy1re94wCzPbDmAE85FcmAR901BEFvKyYJtPduxo91wtcB0bHZ6 Wdvxn/0vhBK5J9Z/zvAR7msM4/9aM7YmeNoMMJISVUprpbzKH9Woyai3COMqFbkmL1if NUanr8j6nXMtc2ESgLuKjLC7EFcWDySIMdfOpHcnBdmM+nav7YPKfGheaI8jAVH+KzEv gLag== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 70si1382641pgd.172.2018.04.02.23.25.18; Mon, 02 Apr 2018 23:25:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755180AbeDCGWc (ORCPT + 99 others); Tue, 3 Apr 2018 02:22:32 -0400 Received: from mail.bootlin.com ([62.4.15.54]:34654 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754885AbeDCGVC (ORCPT ); Tue, 3 Apr 2018 02:21:02 -0400 Received: by mail.bootlin.com (Postfix, from userid 110) id E7DD42083E; Tue, 3 Apr 2018 08:21:00 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 Received: from dell-desktop.home (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr [90.63.216.87]) by mail.bootlin.com (Postfix) with ESMTPSA id 9B18020726; Tue, 3 Apr 2018 08:21:00 +0200 (CEST) From: =?UTF-8?q?Myl=C3=A8ne=20Josserand?= To: linux@armlinux.org.uk, maxime.ripard@bootlin.com, wens@csie.org, marc.zyngier@arm.com, mark.rutland@arm.com, robh+dt@kernel.org Cc: devicetree@vger.kernel.org, clabbe.montjoie@gmail.com, quentin.schulz@bootlin.com, thomas.petazzoni@bootlin.com, mylene.josserand@bootlin.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v5 08/13] ARM: sunxi: Add initialization of CNTVOFF Date: Tue, 3 Apr 2018 08:18:31 +0200 Message-Id: <20180403061836.3926-9-mylene.josserand@bootlin.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180403061836.3926-1-mylene.josserand@bootlin.com> References: <20180403061836.3926-1-mylene.josserand@bootlin.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add the initialization of CNTVOFF for sun8i-a83t. For boot CPU, Create a new machine that handles this function's call in an "init_early" callback. For secondary CPUs, add this function into secondary_startup assembly entry. Signed-off-by: Mylène Josserand --- arch/arm/mach-sunxi/headsmp.S | 1 + arch/arm/mach-sunxi/sunxi.c | 18 +++++++++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-sunxi/headsmp.S b/arch/arm/mach-sunxi/headsmp.S index 79890fbe5613..b586b7cf803a 100644 --- a/arch/arm/mach-sunxi/headsmp.S +++ b/arch/arm/mach-sunxi/headsmp.S @@ -71,6 +71,7 @@ ENDPROC(sunxi_mc_smp_cluster_cache_enable) ENTRY(sunxi_mc_smp_secondary_startup) bl sunxi_mc_smp_cluster_cache_enable + bl smp_init_cntvoff b secondary_startup ENDPROC(sunxi_mc_smp_secondary_startup) diff --git a/arch/arm/mach-sunxi/sunxi.c b/arch/arm/mach-sunxi/sunxi.c index 5e9602ce1573..090784108c0a 100644 --- a/arch/arm/mach-sunxi/sunxi.c +++ b/arch/arm/mach-sunxi/sunxi.c @@ -16,6 +16,7 @@ #include #include +#include static const char * const sunxi_board_dt_compat[] = { "allwinner,sun4i-a10", @@ -62,7 +63,6 @@ MACHINE_END static const char * const sun8i_board_dt_compat[] = { "allwinner,sun8i-a23", "allwinner,sun8i-a33", - "allwinner,sun8i-a83t", "allwinner,sun8i-h2-plus", "allwinner,sun8i-h3", "allwinner,sun8i-r40", @@ -75,6 +75,22 @@ DT_MACHINE_START(SUN8I_DT, "Allwinner sun8i Family") .dt_compat = sun8i_board_dt_compat, MACHINE_END +void __init sun8i_cntvoff_init(void) +{ + smp_init_cntvoff(); +} + +static const char * const sun8i_cntvoff_board_dt_compat[] = { + "allwinner,sun8i-a83t", + NULL, +}; + +DT_MACHINE_START(SUN8I_CNTVOFF_DT, "Allwinner sun8i boards needing cntvoff") + .init_early = sun8i_cntvoff_init, + .init_time = sun6i_timer_init, + .dt_compat = sun8i_cntvoff_board_dt_compat, +MACHINE_END + static const char * const sun9i_board_dt_compat[] = { "allwinner,sun9i-a80", NULL, -- 2.11.0