Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp97274imj; Thu, 7 Feb 2019 00:57:02 -0800 (PST) X-Google-Smtp-Source: AHgI3IaRjs/0FGzdWhizxRQG6faLcjq42Xl0k1zUaeyfqSwhLc9gWzP/a6PSIx/sRTsf7Xa0I8UU X-Received: by 2002:aa7:808a:: with SMTP id v10mr2909307pff.8.1549529822024; Thu, 07 Feb 2019 00:57:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549529822; cv=none; d=google.com; s=arc-20160816; b=H6IFr4bse5z3fAwFXmfbGYNHj21moBPnD/MGalw/tQSfNXmN6pZvUr3yYAlT7r/qkO hSbPw2CwLo504MSsh0ps0ajZ0sNEzgL5wi2T6qkYmfJuk+0lseSpDMO6OO4w+G77kr5N fQW8Vj2aYXt/R7gEV/7QGcVQMgscArMswO0rXCMYXa854q/iGKnWkcKcO+v4up8KlQYF Yi1aIq1ujxBmibaUhdEIDobCL7vKeR2bvLO7RTGyrXCzJ+DL0di8uUVaooMg6km/lHy9 epJiQtrTJbCDUpXaTpFCkQQV/3BLTA3vpaI5Q+Qk0OdVRgMTvN8gjL4q8do2YjnmE1cK cbRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:dkim-signature:content-disposition :user-agent:in-reply-to:mime-version:references:message-id:subject :cc:to:from:date; bh=lt8i385N5xjPw1bdISWWwucorrPM8A8Y2P3Tq77IeXk=; b=CYyPWRTljtqs3DjhlWD2xJiw+/e7AsCuKzjmOJtds2uYT27kKTSJmXUmSSVYaFdUDF bGi76EIRhoCmgfi/n5y05Ll8/sQHgcB5NheZ1FLE/yhUqlEVAaLG2fR+bjNt+h+aLVe9 26eqxOFIKi1VgSTL+KeaWK9F890fj+E8crvpnBHbd0ZNX8I1/MKn7kXC2RanSiyXGBhP 0pGpSQMQ5IL2XqkkzTZVcNa0jMMJJuEJf+7dmghySpn2C35QBiBOAbwURmQGThVz2pMg xSmGixRjTvH969xQdQ0KfXGTVXPZvJsFlPD1FL4x2ESs+lCbeVV0b0ABCayQPmCXck0i 8hvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=WRCA8n8p; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 37si7880260pgs.447.2019.02.07.00.56.45; Thu, 07 Feb 2019 00:57:02 -0800 (PST) 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; dkim=pass header.i=@nvidia.com header.s=n1 header.b=WRCA8n8p; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726642AbfBGI4k (ORCPT + 99 others); Thu, 7 Feb 2019 03:56:40 -0500 Received: from hqemgate15.nvidia.com ([216.228.121.64]:14533 "EHLO hqemgate15.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726293AbfBGI4k (ORCPT ); Thu, 7 Feb 2019 03:56:40 -0500 Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqemgate15.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Thu, 07 Feb 2019 00:56:06 -0800 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Thu, 07 Feb 2019 00:56:38 -0800 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Thu, 07 Feb 2019 00:56:38 -0800 Received: from localhost (10.124.1.5) by HQMAIL101.nvidia.com (172.20.187.10) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Thu, 7 Feb 2019 08:56:37 +0000 Date: Thu, 7 Feb 2019 09:56:35 +0100 From: Thierry Reding To: Guenter Roeck CC: Timo Alho , Jon Hunter , Subject: Re: [PATCH] firmware: tegra: Refactor BPMP driver Message-ID: <20190207085634.GC8741@ulmo> References: <20190206221711.GA21703@roeck-us.net> MIME-Version: 1.0 In-Reply-To: <20190206221711.GA21703@roeck-us.net> X-NVConfidentiality: public User-Agent: Mutt/1.10.1 (2018-07-13) X-Originating-IP: [10.124.1.5] X-ClientProxiedBy: HQMAIL104.nvidia.com (172.18.146.11) To HQMAIL101.nvidia.com (172.20.187.10) Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="KN5l+BnMqAQyZLvT" Content-Disposition: inline DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1549529766; bh=lt8i385N5xjPw1bdISWWwucorrPM8A8Y2P3Tq77IeXk=; h=X-PGP-Universal:Date:From:To:CC:Subject:Message-ID:References: MIME-Version:In-Reply-To:X-NVConfidentiality:User-Agent: X-Originating-IP:X-ClientProxiedBy:Content-Type: Content-Disposition; b=WRCA8n8p/ALpCgINH9Yj1a9lgx/Eq6ZRLj/lt5hwG/6BSS5i/TZSu225hJy9snmnP x815CYuMRqGxFhxiCgKojneUhVmL+MZF+EL10Twpeeedq74p2TDY+yTSV++pBpsFVP MvJPOgdOVqFdpX7LHvcRIpc5B9A/ujZlp8can6zqjZgRIABQ4IiI9IYo+xRHeXXtdL u3lGgAPXgAH2QlqYtAjyjAzaBTsEwCH0Tr3TAKSo2uuHchYsrzUnS8mlapEqdl6Ug9 jf9WqpuRVHsWOg9vRI/xJR9biU5x2+b7R/joSnUTT4+90c9i+Psx27mHU+aFLIwGet VpgaoKIFegOlg== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --KN5l+BnMqAQyZLvT Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Feb 06, 2019 at 02:17:11PM -0800, Guenter Roeck wrote: > On Thu, Jan 24, 2019 at 07:03:53PM +0200, Timo Alho wrote: > > Split BPMP driver into common and chip specific parts to facilitate > > adding support for previous and future Tegra chips that are using BPMP > > as co-processor. > >=20 > > Signed-off-by: Timo Alho > > Acked-by: Jon Hunter > > Signed-off-by: Thierry Reding >=20 > arm:allmodconfig in linux-next: >=20 > drivers/firmware/tegra/bpmp.o:(.rodata+0x280): undefined reference to `te= gra210_bpmp_ops' > drivers/firmware/tegra/bpmp.o:(.rodata+0x2ac): undefined reference to `te= gra186_bpmp_ops' Hi Guenter, this should be fixed by the below patch. Running build tests now. Thierry --- >8 --- diff --git a/drivers/firmware/tegra/bpmp-private.h b/drivers/firmware/tegra= /bpmp-private.h index 07c3d46abb87..cc343f4ebafb 100644 --- a/drivers/firmware/tegra/bpmp-private.h +++ b/drivers/firmware/tegra/bpmp-private.h @@ -23,7 +23,11 @@ struct tegra_bpmp_ops { int (*resume)(struct tegra_bpmp *bpmp); }; =20 +#if IS_ENABLED(CONFIG_ARCH_TEGRA_186_SOC) extern const struct tegra_bpmp_ops tegra186_bpmp_ops; +#endif +#if IS_ENABLED(CONFIG_ARCH_TEGRA_210_SOC) extern const struct tegra_bpmp_ops tegra210_bpmp_ops; +#endif =20 #endif diff --git a/drivers/firmware/tegra/bpmp.c b/drivers/firmware/tegra/bpmp.c index 8e3f79959d48..6498c848c82c 100644 --- a/drivers/firmware/tegra/bpmp.c +++ b/drivers/firmware/tegra/bpmp.c @@ -813,6 +813,7 @@ static int __maybe_unused tegra_bpmp_resume(struct devi= ce *dev) =20 static SIMPLE_DEV_PM_OPS(tegra_bpmp_pm_ops, NULL, tegra_bpmp_resume); =20 +#if IS_ENABLED(CONFIG_ARCH_TEGRA_186_SOC) static const struct tegra_bpmp_soc tegra186_soc =3D { .channels =3D { .cpu_tx =3D { @@ -832,7 +833,9 @@ static const struct tegra_bpmp_soc tegra186_soc =3D { .ops =3D &tegra186_bpmp_ops, .num_resets =3D 193, }; +#endif =20 +#if IS_ENABLED(CONFIG_ARCH_TEGRA_210_SOC) static const struct tegra_bpmp_soc tegra210_soc =3D { .channels =3D { .cpu_tx =3D { @@ -853,10 +856,15 @@ static const struct tegra_bpmp_soc tegra210_soc =3D { }, .ops =3D &tegra210_bpmp_ops, }; +#endif =20 static const struct of_device_id tegra_bpmp_match[] =3D { +#if IS_ENABLED(CONFIG_ARCH_TEGRA_186_SOC) { .compatible =3D "nvidia,tegra186-bpmp", .data =3D &tegra186_soc }, +#endif +#if IS_ENABLED(CONFIG_ARCH_TEGRA_210_SOC) { .compatible =3D "nvidia,tegra210-bpmp", .data =3D &tegra210_soc }, +#endif { } }; =20 --KN5l+BnMqAQyZLvT Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAlxb8sIACgkQ3SOs138+ s6EDgA//V+zfQTeTEaLxmv8OuK0/W8+oaQ/gcK43P3WDbud1NLka65b8cfd+qVoF mp71mm3FabYKPeeTEtYfkQM3IItFBQqsqTGgo9Q0MPQi2isDYvIAvWFhrRdqxuwj IzUL4go+FSjMrTQ6mkZuoY5XzgDrs+Vi9eR70tES7dnD00GcU1ygXZpXfTT1zwCD 9EkqQ6oKe1opb3Nkr3I3u6zPzfgrImTAvVKMAn6Oum7wkesDO7YOxW3DLXnyZhyA rpkrxxDjjric5EjCrm2Wj29/bEq4Nts00ezbCLfdaama0LVJS93wkPyZFtn2IIWE NfzCqLPSMmU7WyTrQhptocOGTIHjuDJMHzGZqTy9Ijn7Jws0+lbJT4uK7Qb7GO9G T1z8DAchVNIePoeyhx421tSRfMty839joW2p2lkQRcK/ASlakoatXU+KzLG8RZ8K PIjlRtDDyIQJ69gRJ8B+Ql2t98opjKLCRayVFs2Wx3j4NrxVnkNme/jXmZMXLsEL pD42hFL/G4mh1ArQYk03D8tu4NI0OAE9jUcN+y+eZhqr3XQ7QfbYmkk3u07cda0Q U/3JkFVsAqIFlnU4aZOab8NaPdVlKZPVvP7l3dy+sOfDrdRA0LuG/pymmeN339U/ A2s89Li/rzGH02i1d1lTk/3qZQfW1Gcpi4sZWsdFrMK90688MNc= =aBrE -----END PGP SIGNATURE----- --KN5l+BnMqAQyZLvT--