Received: by 10.213.65.68 with SMTP id h4csp3167666imn; Mon, 2 Apr 2018 23:23:43 -0700 (PDT) X-Google-Smtp-Source: AIpwx49HaERRcQ6xkPVwxExgVNX6voBJud7KFzUQ0R+t5rbP3Hg19E/daUiTCTjq43AJNwAxnpqd X-Received: by 2002:a17:902:6c07:: with SMTP id q7-v6mr12796816plk.67.1522736623383; Mon, 02 Apr 2018 23:23:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522736623; cv=none; d=google.com; s=arc-20160816; b=ll9HzCLSba4hviIe6hyT4BP3hZdaKRFN2sOytDunwQLfPqSkAdMCXKhj8bShhEyAHI YqEKmDUNvLQ8WyRW09C9PvDX7aSxDmr+RXUXobpOtzmxQk1MuedIBuBvjb6UMaPjjP/v yobmvCqpN+2nyXqacZZT4W6BPUTSONPDHBVYniCO76OhTL1dEokS+X87R7uWxDsBdu7t dWrIlll7AMCX7POL2vtFnhFbZvQawTJb10/jHVse3M9Iwu+hX0aIPHhpzOQEBUWRDhPP vX2PP+qaV5JDC1Z77ZMI6xktwhotFL14EONfY8xUsHrLdyPFTwQ5eeKIvDVdzbXvlwPY drHA== 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=Tpxq8uO96qhyIckGCR4gnXDw2CTOkeeoJLpXJE/Xl24=; b=lDWFNC3xEC5smqXOO5STaFl/wsgzShMTja09na9BolaHppwBSBBqPJZSFrv1gAj7he S3zpqjkUgzPs8oB5N8JuMsaGwXSjw7mSLdT+yL2M4KlWh0cx4yIixRt/MVXgwxh5VpB0 ejsNJuNhrXqb5XkGbzsVqxWi1kFspptFSluhppUAs0wV/RVb21NVnBI9p52zihmzLkXJ vvvd8mL1si1eUr/yfTjYgN0Y41NkaMEeWPvYD0O3yevvVtU90AYUIiQLSL7O3LdkXbtf PoI05j4V9P8R3lnThe0S8bW1jSTWY65ctPCIJ3cXMajGVJUfQ1l7EIY7HaD87FG7nwUA KcEQ== 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 m10-v6si2306450pln.595.2018.04.02.23.23.29; Mon, 02 Apr 2018 23:23:43 -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 S1755149AbeDCGWB (ORCPT + 99 others); Tue, 3 Apr 2018 02:22:01 -0400 Received: from mail.bootlin.com ([62.4.15.54]:34664 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754974AbeDCGVG (ORCPT ); Tue, 3 Apr 2018 02:21:06 -0400 Received: by mail.bootlin.com (Postfix, from userid 110) id 08EF4207E9; Tue, 3 Apr 2018 08:21:05 +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 AFE7320898; Tue, 3 Apr 2018 08:21:04 +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 10/13] ARM: sun9i: smp: Move structures Date: Tue, 3 Apr 2018 08:18:33 +0200 Message-Id: <20180403061836.3926-11-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 To prepare the support for sun8i-a83t, move some structures at the beginning of the file. Signed-off-by: Mylène Josserand --- arch/arm/mach-sunxi/mc_smp.c | 48 +++++++++++++++++++++++--------------------- 1 file changed, 25 insertions(+), 23 deletions(-) diff --git a/arch/arm/mach-sunxi/mc_smp.c b/arch/arm/mach-sunxi/mc_smp.c index 03f021d0c73e..0a7252df207f 100644 --- a/arch/arm/mach-sunxi/mc_smp.c +++ b/arch/arm/mach-sunxi/mc_smp.c @@ -72,9 +72,34 @@ static void __iomem *cpucfg_base; static void __iomem *prcm_base; static void __iomem *sram_b_smp_base; +/* + * This holds any device nodes that we requested resources for, + * so that we may easily release resources in the error path. + */ +struct sunxi_mc_smp_nodes { + struct device_node *prcm_node; + struct device_node *cpucfg_node; + struct device_node *sram_node; +}; + +/* This structure holds SoC-specific bits tied to an enable-method string. */ +struct sunxi_mc_smp_data { + const char *enable_method; + int (*get_smp_nodes)(struct sunxi_mc_smp_nodes *nodes); +}; + extern void sunxi_mc_smp_secondary_startup(void); extern void sunxi_mc_smp_resume(void); +static int __init sun9i_a80_get_smp_nodes(struct sunxi_mc_smp_nodes *nodes); + +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, + }, +}; + static bool sunxi_core_is_cortex_a15(unsigned int core, unsigned int cluster) { struct device_node *node; @@ -610,22 +635,6 @@ static int __init sunxi_mc_smp_loopback(void) return ret; } -/* - * This holds any device nodes that we requested resources for, - * so that we may easily release resources in the error path. - */ -struct sunxi_mc_smp_nodes { - struct device_node *prcm_node; - struct device_node *cpucfg_node; - struct device_node *sram_node; -}; - -/* This structure holds SoC-specific bits tied to an enable-method string. */ -struct sunxi_mc_smp_data { - const char *enable_method; - int (*get_smp_nodes)(struct sunxi_mc_smp_nodes *nodes); -}; - static void __init sunxi_mc_smp_put_nodes(struct sunxi_mc_smp_nodes *nodes) { of_node_put(nodes->prcm_node); @@ -660,13 +669,6 @@ static int __init sun9i_a80_get_smp_nodes(struct sunxi_mc_smp_nodes *nodes) return 0; } -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, - }, -}; - static int __init sunxi_mc_smp_init(void) { struct sunxi_mc_smp_nodes nodes = { 0 }; -- 2.11.0