Re: [PATCH v1 5/5] memory: tegra: Add Tegra114 EMC driver

From: Svyatoslav Ryhel

Date: Tue Feb 17 2026 - 03:30:14 EST


вт, 17 лют. 2026 р. о 10:18 Krzysztof Kozlowski <krzk@xxxxxxxxxx> пише:
>
> On 17/02/2026 08:51, Svyatoslav Ryhel wrote:
> > вт, 17 лют. 2026 р. о 09:21 Krzysztof Kozlowski <krzk@xxxxxxxxxx> пише:
> >>
> >> On 26/01/2026 20:07, Svyatoslav Ryhel wrote:
> >>> Introduce driver for the External Memory Controller (EMC) found in
> >>> Tegra114 SoC. It controls the external DRAM on the board. The purpose of
> >>> this driver is to program memory timing for external memory on the EMC
> >>> clock rate change.
> >>>
> >>> Signed-off-by: Svyatoslav Ryhel <clamor95@xxxxxxxxx>
> >>> Reviewed-by: Mikko Perttunen <mperttunen@xxxxxxxxxx>
> >>> ---
> >>> drivers/memory/tegra/Kconfig | 12 +
> >>> drivers/memory/tegra/Makefile | 1 +
> >>> drivers/memory/tegra/tegra114-emc.c | 1463 +++++++++++++++++++++++++++
> >>
> >> Please rebase on top of Mikko's patch removing duplicated code.
> >>
> >>> 3 files changed, 1476 insertions(+)
> >>> create mode 100644 drivers/memory/tegra/tegra114-emc.c
> >>>
> >>> diff --git a/drivers/memory/tegra/Kconfig b/drivers/memory/tegra/Kconfig
> >>> index fc5a27791826..11e7cc357d39 100644
> >>> --- a/drivers/memory/tegra/Kconfig
> >>> +++ b/drivers/memory/tegra/Kconfig
> >>> @@ -35,6 +35,18 @@ config TEGRA30_EMC
> >>> This driver is required to change memory timings / clock rate for
> >>> external memory.
> >>>
> >>> +config TEGRA114_EMC
> >>> + tristate "NVIDIA Tegra114 External Memory Controller driver"
> >>> + default y
> >>> + depends on ARCH_TEGRA_114_SOC || COMPILE_TEST
> >>> + select TEGRA124_CLK_EMC if ARCH_TEGRA
> >>> + select PM_OPP
> >>> + help
> >>> + This driver is for the External Memory Controller (EMC) found on
> >>> + Tegra114 chips. The EMC controls the external DRAM on the board.
> >>> + This driver is required to change memory timings / clock rate for
> >>> + external memory.
> >>> +
> >>> config TEGRA124_EMC
> >>> tristate "NVIDIA Tegra124 External Memory Controller driver"
> >>> default ARCH_TEGRA_124_SOC
> >>> diff --git a/drivers/memory/tegra/Makefile b/drivers/memory/tegra/Makefile
> >>> index 6334601e6120..6b9156de4b66 100644
> >>> --- a/drivers/memory/tegra/Makefile
> >>> +++ b/drivers/memory/tegra/Makefile
> >>> @@ -16,6 +16,7 @@ obj-$(CONFIG_TEGRA_MC) += tegra-mc.o
> >>>
> >>> obj-$(CONFIG_TEGRA20_EMC) += tegra20-emc.o
> >>> obj-$(CONFIG_TEGRA30_EMC) += tegra30-emc.o
> >>> +obj-$(CONFIG_TEGRA114_EMC) += tegra114-emc.o
> >>> obj-$(CONFIG_TEGRA124_EMC) += tegra124-emc.o
> >>> obj-$(CONFIG_TEGRA210_EMC_TABLE) += tegra210-emc-table.o
> >>> obj-$(CONFIG_TEGRA210_EMC) += tegra210-emc.o
> >>> diff --git a/drivers/memory/tegra/tegra114-emc.c b/drivers/memory/tegra/tegra114-emc.c
> >>> new file mode 100644
> >>> index 000000000000..789b8e959a68
> >>> --- /dev/null
> >>> +++ b/drivers/memory/tegra/tegra114-emc.c
> >>> @@ -0,0 +1,1463 @@
> >>> +// SPDX-License-Identifier: GPL-2.0-only
> >>> +/*
> >>> + * Tegra114 External Memory Controller driver
> >>> + *
> >>> + * Based on downstream driver from NVIDIA and tegra124-emc.c
> >>> + * Copyright (C) 2011-2014 NVIDIA Corporation
> >>> + *
> >>> + * Copyright (C) 2024 Svyatoslav Ryhel <clamor95@xxxxxxxxx>
> >>> + */
> >>> +
> >>> +#include <linux/clk-provider.h>
> >>
> >> Where is it used?
> >>
> >>> +#include <linux/clk.h>
> >>> +#include <linux/clkdev.h>
> >>
> >> Where is it used?
> >>
> >>> +#include <linux/clk/tegra.h>
> >>
> >> Where is it used?
> >>
> >
> > All 4 by tegra124_clk_set_emc_callbacks
>
> What? That's not how C works.
>
> There is no definition of tegra124_clk_set_emc_callbacks here in this
> patch, so the headers are not used. Point me to any symbols from these
> headers being used in this patch.
>

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/linux/clk/tegra.h?h=v6.19#n199

> Best regards,
> Krzysztof