# Re: \[PATCH v5 5/8\] memory: tegra: Add EMC scaling support code for Tegra210

- From: Dmitry Osipenko \<digetx@gmail.com\>
- Date: 2020-03-10 16:43:19 
- List: linux-arm-kernel
- Page: https://ratatoskr.run/linux-arm-kernel/2020/03/8177653
- Thread: https://ratatoskr.run/linux-devicetree/2020/03/8177638/t.md

```text
10.03.2020 18:20, Thierry Reding пишет:
> From: Joseph Lo <redacted>
> 
> This is the initial patch for Tegra210 EMC frequency scaling. It has the
> code to program various aspects of the EMC that are standardized, but it
> does not yet include the specific programming sequence needed for clock
> scaling.
> 
> The driver is designed to support LPDDR4 SDRAM. Devices that use LPDDR4
> need to perform training of the RAM before it can be used. Firmware will
> perform this training during early boot and pass a table of supported
> frequencies to the kernel via device tree.
> 
> For the frequencies above 800 MHz, periodic retraining is needed to
> compensate for changes in timing. This periodic training will have to be
> performed until the frequency drops back to or below 800 MHz.
> 
> This driver provides helpers used during this runtime retraining that
> will be used by the sequence specific code in a follow-up patch.
> 
> Based on work by Peter De Schrijver [ref].
> 
> Signed-off-by: Joseph Lo <redacted>
> Signed-off-by: Thierry Reding <redacted>
> ---
> Changes in v5:
> - major rework and cleanup
> 
>  drivers/memory/tegra/tegra210-emc.c | 1952 +++++++++++++++++++++------
>  drivers/memory/tegra/tegra210-emc.h |  893 +++++++++++-
>  2 files changed, 2390 insertions(+), 455 deletions(-)
> 
> diff --git a/drivers/memory/tegra/tegra210-emc.c b/drivers/memory/tegra/tegra210-emc.c
> index 80ea14d1e6ce..4ea8fb70a4fd 100644
> --- a/drivers/memory/tegra/tegra210-emc.c
> +++ b/drivers/memory/tegra/tegra210-emc.c
> @@ -1,6 +1,6 @@
>  // SPDX-License-Identifier: GPL-2.0
>  /*
> - * Copyright (c) 2015-2019, NVIDIA CORPORATION.  All rights reserved.
> + * Copyright (c) 2015-2020, NVIDIA CORPORATION.  All rights reserved.
>   */

Would be nice to avoid all the unnecessary changes, like the one above
and then all the code's removals/reshuffling.

Such that a new patch was a clean addition to a previous patch, instead
of a re-write.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
```
