Received: by 10.192.165.156 with SMTP id m28csp1135617imm; Mon, 16 Apr 2018 14:53:22 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+3pqKTuTENYfdS1ABm1MBz8r1S8slX+qK1bItctRomhnYy98vADf9Q4CFN61wQHT6D82wt X-Received: by 10.101.82.197 with SMTP id z5mr14385350pgp.45.1523915602153; Mon, 16 Apr 2018 14:53:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523915602; cv=none; d=google.com; s=arc-20160816; b=h1hW3YQ7djw36opmTyRb8ftulN2vZG+TsSZ54zNWNJpPFw6CG0xUnw1qARUOIGmTf3 lL9Y2hIWfvPD83sgI5m2fdMkwnIt4fuNKXQSYUGsQ5oqtlZSR1/IuapUOK8OrTbNmJqs UVatrnsqnxkR5nvADYFJqLBEmI4l35hN0V7bIHm6pzya0OLweL8fB9PNDAn+FyKW49lv 6whtt1NT+ATisblykqC2DHjM0p9KWpdhbu2TgvUZpRa1l4xtlUVJ6pVUkSgVdRioS+Rf xU1DFcl+knpLN6w0RtOc+IJbmsULRyJpo5KnQ/kafueQivEPvDO389PSHROlrUuAkp6o q/GA== 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=xzLUgAfoQIkVAvONb5DS3h8gLNazv8aC2/LrJbTl808=; b=zpyzapTIbABnj7xBkDLmfWxhgYFeH3q/mf9i7h+NBfaUl3NiI2+9FJ4AccdHfYCWWC XUSOIQ8pwFQElp05Fo9SemCkv+ocXpEyEnStU6C8YxcUrekJ9c7YEwkBf/RsVgvxRiqy AtgtKvlYDxgumHLBfTQlcyW6z72h+WQ1kaGMFCh3qcF+qyyrNIB9vzxkYcqRounSokca LYtYxqNboUVeDI1d4+5OubzIykmado5PwWmebWFa/1TPUO4wd/2FOwWdUrhSVLD2xkRa soNemlwwoQqf/BYFweXzaioubXo15miB+23pdNDuFVa+5hAsY0wzgu+m8A0t5BmUhGo+ sSHg== 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 196si10406450pgb.674.2018.04.16.14.53.07; Mon, 16 Apr 2018 14:53:22 -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 S1753723AbeDPVvu (ORCPT + 99 others); Mon, 16 Apr 2018 17:51:50 -0400 Received: from mail.bootlin.com ([62.4.15.54]:40780 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753697AbeDPVvr (ORCPT ); Mon, 16 Apr 2018 17:51:47 -0400 Received: by mail.bootlin.com (Postfix, from userid 110) id 42FFC21598; Mon, 16 Apr 2018 23:51:45 +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 (176-137-37-244.abo.bbox.fr [176.137.37.244]) by mail.bootlin.com (Postfix) with ESMTPSA id 531D42140B; Mon, 16 Apr 2018 23:51:34 +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, horms@verge.net.au, geert@linux-m68k.org, magnus.damm@gmail.com Cc: linux-renesas-soc@vger.kernel.org, devicetree@vger.kernel.org, clabbe.montjoie@gmail.com, quentin.schulz@bootlin.com, thomas.petazzoni@bootlin.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, mylene.josserand@bootlin.com Subject: [PATCH v6 08/11] ARM: sun9i: smp: Add is_sun8i field Date: Mon, 16 Apr 2018 23:50:29 +0200 Message-Id: <20180416215032.5023-9-mylene.josserand@bootlin.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180416215032.5023-1-mylene.josserand@bootlin.com> References: <20180416215032.5023-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 To prepare the support of sun8i-a83t, add a field in the smp_data structure to know if we are on sun9i-a80 or sun8i-a83t. Add also a global variable to retrieve which architecture we are having. Signed-off-by: Mylène Josserand --- arch/arm/mach-sunxi/mc_smp.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/arm/mach-sunxi/mc_smp.c b/arch/arm/mach-sunxi/mc_smp.c index 03f021d0c73e..9d57ea27dacc 100644 --- a/arch/arm/mach-sunxi/mc_smp.c +++ b/arch/arm/mach-sunxi/mc_smp.c @@ -74,6 +74,7 @@ static void __iomem *sram_b_smp_base; extern void sunxi_mc_smp_secondary_startup(void); extern void sunxi_mc_smp_resume(void); +static int is_sun8i; static bool sunxi_core_is_cortex_a15(unsigned int core, unsigned int cluster) { @@ -624,6 +625,7 @@ struct sunxi_mc_smp_nodes { struct sunxi_mc_smp_data { const char *enable_method; int (*get_smp_nodes)(struct sunxi_mc_smp_nodes *nodes); + int is_sun8i; }; static void __init sunxi_mc_smp_put_nodes(struct sunxi_mc_smp_nodes *nodes) @@ -664,6 +666,7 @@ static const struct sunxi_mc_smp_data sunxi_mc_smp_data[] __initconst = { { .enable_method = "allwinner,sun9i-a80-smp", .get_smp_nodes = sun9i_a80_get_smp_nodes, + .is_sun8i = false, }, }; @@ -697,6 +700,8 @@ static int __init sunxi_mc_smp_init(void) break; } + is_sun8i = sunxi_mc_smp_data[i].is_sun8i; + of_node_put(node); if (ret) return -ENODEV; -- 2.11.0