diff options
author | Thierry Reding <treding@nvidia.com> | 2019-12-22 15:10:31 +0100 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2020-01-09 19:35:54 +0100 |
commit | 4e04b88633ae9cb38d6bc1d7fd37d2782eab726d (patch) | |
tree | b5b535edad54f1802f149970b08d26e38a1818d5 /drivers/memory | |
parent | memory: tegra: Support DVFS on Tegra186 and later (diff) | |
download | linux-4e04b88633ae9cb38d6bc1d7fd37d2782eab726d.tar.xz linux-4e04b88633ae9cb38d6bc1d7fd37d2782eab726d.zip |
memory: tegra: Only include support for enabled SoCs
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 <treding@nvidia.com>
Diffstat (limited to 'drivers/memory')
-rw-r--r-- | drivers/memory/tegra/tegra186-emc.c | 2 | ||||
-rw-r--r-- | drivers/memory/tegra/tegra186.c | 6 |
2 files changed, 8 insertions, 0 deletions
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 fe23c4f71f13..8ac4fb5562b5 100644 --- a/drivers/memory/tegra/tegra186.c +++ b/drivers/memory/tegra/tegra186.c @@ -9,7 +9,9 @@ #include <linux/of_device.h> #include <linux/platform_device.h> +#if defined(CONFIG_ARCH_TEGRA_186_SOC) #include <dt-bindings/memory/tegra186-mc.h> +#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) { @@ -610,7 +614,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); |