From patchwork Sun Dec 22 14:10:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 1214727 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-tegra-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="pqkswmr4"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 47gksq0hqhz9sP6 for ; Mon, 23 Dec 2019 01:10:55 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726393AbfLVOKy (ORCPT ); Sun, 22 Dec 2019 09:10:54 -0500 Received: from mail-wr1-f66.google.com ([209.85.221.66]:43316 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726449AbfLVOKy (ORCPT ); Sun, 22 Dec 2019 09:10:54 -0500 Received: by mail-wr1-f66.google.com with SMTP id d16so13911461wre.10; Sun, 22 Dec 2019 06:10:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=aNNkzdmoZGfEvwyeSAAoGpupKiOvMsZG3DgnjeluIjA=; b=pqkswmr4T9zR4ih6X3amPK5UcPQzY1rWkOC5jnAbU9sVpVWynAHpbQ1ewIfagmeqtW Rkvth87jP3v48uXh0B1Upbytpykih/0pw4aRSF9LMET8zIc0sLSQ6BLdMOejF4qHPQoE 2n6a+LDLDEEkxCNv93qlxuv+kvn70e9RkMaRQlQCZmzjrzZslKCIazIustcGAaxxaBJE fliRE9Y2cN3e9AAFyZq8EcrHbY9X8so4gCRS21okAC8PCg6dmifWg15nHHrRAfvsilGN gH8ER+JB522Mp2nHOeZQPMYdFG/7YdzsWoroCAtAkkAnka7BnAntOwX0JxgcUHaDfG8m tkmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=aNNkzdmoZGfEvwyeSAAoGpupKiOvMsZG3DgnjeluIjA=; b=TqfP/iZnzuJwGnmVTx9nrbKe7Bqk7KVbyikDXyb4egdwOT3QsmzTs7FjQRbaX+Z7KK p3SjJ4GxOQXBAdyz2yEE73g5nQsM4YtmA9sQr4cX2rrr9mdmBluUjvrLQls5n8wiKAiv WqAjsh9r9Wn5tQq19Gvj30o5IZvHdrlZIsodNsymmeZKSphm85wEBreyye6UNqjCN2v7 NEk9fcLnloRS3S5B8B9Gn+0htUZLwWijcFNkuWQnCsroxscnUf/Padmrbq3f4ySMke5D eAbQr6n/Tu+ip2vNg3+rwym/gnE97TcrYtrNrzWLwuSvpa3GCObtTMeFbPqIRe8hq7b6 dZcw== X-Gm-Message-State: APjAAAWCjdTAdYFUPx2vlqxfSyI1TCUB+OFameBA2nW7u2GqiWvznacE so1LEsImwNPTD1vnUqEGEmk= X-Google-Smtp-Source: APXvYqxEiakSXD9oiQQ5Wrwmum38SiaGapo+YQu1G840m6nf9h0khaL2V8wnzpS5mqPdFDdSmemqTw== X-Received: by 2002:a5d:5403:: with SMTP id g3mr25727058wrv.302.1577023852472; Sun, 22 Dec 2019 06:10:52 -0800 (PST) Received: from localhost (p2E5BEF3F.dip0.t-ipconnect.de. [46.91.239.63]) by smtp.gmail.com with ESMTPSA id q11sm17308214wrp.24.2019.12.22.06.10.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Dec 2019 06:10:51 -0800 (PST) From: Thierry Reding To: Thierry Reding Cc: Rob Herring , Jon Hunter , linux-tegra@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 09/13] memory: tegra: Only include support for enabled SoCs Date: Sun, 22 Dec 2019 15:10:31 +0100 Message-Id: <20191222141035.1649937-10-thierry.reding@gmail.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191222141035.1649937-1-thierry.reding@gmail.com> References: <20191222141035.1649937-1-thierry.reding@gmail.com> MIME-Version: 1.0 Sender: linux-tegra-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-tegra@vger.kernel.org From: Thierry Reding The memory client tables can be fairly large and they can easily be omitted if support for the corresponding SoC is not enabled. Signed-off-by: Thierry Reding --- drivers/memory/tegra/tegra186-emc.c | 2 ++ drivers/memory/tegra/tegra186.c | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/drivers/memory/tegra/tegra186-emc.c b/drivers/memory/tegra/tegra186-emc.c index a3f275a7b4d6..812a4e152dcb 100644 --- a/drivers/memory/tegra/tegra186-emc.c +++ b/drivers/memory/tegra/tegra186-emc.c @@ -267,7 +267,9 @@ static int tegra186_emc_remove(struct platform_device *pdev) } static const struct of_device_id tegra186_emc_of_match[] = { +#if defined(CONFIG_ARCH_TEGRA186_SOC) { .compatible = "nvidia,tegra186-emc" }, +#endif { /* sentinel */ } }; MODULE_DEVICE_TABLE(of, tegra186_emc_of_match); diff --git a/drivers/memory/tegra/tegra186.c b/drivers/memory/tegra/tegra186.c index a727f0925276..9c9a2f54b6fc 100644 --- a/drivers/memory/tegra/tegra186.c +++ b/drivers/memory/tegra/tegra186.c @@ -9,7 +9,9 @@ #include #include +#if defined(CONFIG_ARCH_TEGRA_186_SOC) #include +#endif struct tegra186_mc_client { const char *name; @@ -58,6 +60,7 @@ static void tegra186_mc_program_sid(struct tegra186_mc *mc) } } +#if defined(CONFIG_ARCH_TEGRA_186_SOC) static const struct tegra186_mc_client tegra186_mc_clients[] = { { .name = "ptcr", @@ -570,6 +573,7 @@ static const struct tegra186_mc_soc tegra186_mc_soc = { .num_clients = ARRAY_SIZE(tegra186_mc_clients), .clients = tegra186_mc_clients, }; +#endif static int tegra186_mc_probe(struct platform_device *pdev) { @@ -615,7 +619,9 @@ static int tegra186_mc_remove(struct platform_device *pdev) } static const struct of_device_id tegra186_mc_of_match[] = { +#if defined(CONFIG_ARCH_TEGRA_186_SOC) { .compatible = "nvidia,tegra186-mc", .data = &tegra186_mc_soc }, +#endif { /* sentinel */ } }; MODULE_DEVICE_TABLE(of, tegra186_mc_of_match);