[PATCH v2 00/15] ram: k3-ddrss: Convert k3-j721e to common driver with k3-am64 support
Tero Kristo
kristo at kernel.org
Wed May 12 09:36:39 CEST 2021
On 11/05/2021 18:21, Dave Gerlach wrote:
> This is v2 of the series to update the existing k3-j721e driver to a
> common driver to support both j721e and the new am642 SoC. It renames
> drivers/ram/k3-j721e to drivers/ram/k3-ddrss and then introduces a
> refactored common driver with the existing j721e support moved to files
> named with 32bit and am64 support introduced in files named with 16bit.
>
> Changes since v1:
> * Drop unnecessary error macro re-definitions and use normal errno header
> * Drop other unnecessary headers that wrap standard kernel headers
> * Fixed a few camelCase functions that slipped through
> * Fixed clock initialization sequence based on comment from Vignesh
>
> v1: https://lists.denx.de/pipermail/u-boot/2021-May/448716.html
>
> Regards,
> Dave
Hi Dave,
Thanks for the changes, did a diff between v1 and v2 of these patches
and they look good. There is one thing that should maybe fixed sometime
in future still, but I am not holding my review based on that. The
function prototypes that return error codes should be changed to be int
instead of u32, and change all the error return values to be negatives.
Right now the driver is using positive values so some piece of code
might get confused by that.
Just keep it in mind for future improvements.
For the whole series (did a quick test run with the latest v4 HSM rearch
series also):
Reviewed-by: Tero Kristo <kristo at kernel.org>
Tested-by: Tero Kristo <kristo at kernel.org>
>
> Dave Gerlach (14):
> dt-bindings: memory-controller: Add K3 AM64 DDRSS compatible
> ram: k3-j721e: lpddr4_address_slice_0_macros: Fix indentation issues
> ram: k3-j721e: lpddr4_data_slice_0_macros: Fix indentation issues
> ram: k3-j721e: lpddr4_data_slice_1_macros: Fix indentation issues
> ram: k3-j721e: lpddr4_data_slice_2_macros: Fix indentation issues
> ram: k3-j721e: lpddr4_data_slice_3_macros: Fix indentation issues
> ram: k3-j721e: lpddr4_ddr_controller_macros: Fix indentation issues
> ram: k3-j721e: lpddr4_phy_core_macros: Fix indentation issues
> ram: k3-j721e: lpddr4_pi_macros: Fix indentation issues
> ram: k3-j721e: lpddr4_ctl_regs: Fix checkpatch issue for types
> ram: k3-j721e: Rename to k3-ddrss
> ram: k3-ddrss: Introduce top-level CONFIG_K3_DDRSS
> ram: k3-ddrss: Introduce common driver with J7 SoC support
> ram: k3-ddrss: Introduce support for AM642 SoCs
>
> Lokesh Vutla (1):
> ram: k3-ddrss: Enable vtt regulator if present
>
> board/ti/j721e/Kconfig | 4 +-
> .../memory-controller/k3-j721e-ddrss.txt | 3 +-
> drivers/ram/Kconfig | 24 +-
> drivers/ram/Makefile | 2 +-
> drivers/ram/k3-ddrss/16bit/lpddr4_16bit_if.h | 108 +
> .../ram/k3-ddrss/16bit/lpddr4_16bit_obj_if.h | 14 +
> .../k3-ddrss/16bit/lpddr4_16bit_structs_if.h | 15 +
> .../16bit/lpddr4_address_slice_0_macros.h | 624 ++
> .../16bit/lpddr4_address_slice_1_macros.h | 624 ++
> .../16bit/lpddr4_address_slice_2_macros.h | 624 ++
> drivers/ram/k3-ddrss/16bit/lpddr4_ctl_regs.h | 1306 +++
> .../k3-ddrss/16bit/lpddr4_ctl_regs_rw_masks.h | 23 +
> .../16bit/lpddr4_data_slice_0_macros.h | 2036 +++++
> .../16bit/lpddr4_data_slice_1_macros.h | 2036 +++++
> .../16bit/lpddr4_ddr_controller_macros.h | 6436 ++++++++++++++
> .../k3-ddrss/16bit/lpddr4_phy_core_macros.h | 1838 ++++
> drivers/ram/k3-ddrss/16bit/lpddr4_pi_macros.h | 5784 ++++++++++++
> drivers/ram/k3-ddrss/32bit/lpddr4_32bit_if.h | 91 +
> .../ram/k3-ddrss/32bit/lpddr4_32bit_obj_if.h | 14 +
> .../k3-ddrss/32bit/lpddr4_32bit_structs_if.h | 15 +
> .../32bit}/lpddr4_address_slice_0_macros.h | 343 +-
> drivers/ram/k3-ddrss/32bit/lpddr4_ctl_regs.h | 1545 ++++
> .../k3-ddrss/32bit/lpddr4_ctl_regs_rw_masks.h | 23 +
> .../32bit}/lpddr4_data_slice_0_macros.h | 1443 ++-
> .../32bit}/lpddr4_data_slice_1_macros.h | 1363 ++-
> .../32bit}/lpddr4_data_slice_2_macros.h | 1363 ++-
> .../32bit}/lpddr4_data_slice_3_macros.h | 1363 ++-
> .../32bit/lpddr4_ddr_controller_macros.h | 7792 ++++++++++++++++
> .../32bit}/lpddr4_phy_core_macros.h | 1397 ++-
> drivers/ram/k3-ddrss/32bit/lpddr4_pi_macros.h | 5396 ++++++++++++
> drivers/ram/k3-ddrss/Makefile | 17 +
> drivers/ram/k3-ddrss/cps_drv_lpddr4.h | 102 +
> .../k3-j721e-ddrss.c => k3-ddrss/k3-ddrss.c} | 289 +-
> drivers/ram/k3-ddrss/lpddr4.c | 1079 +++
> drivers/ram/k3-ddrss/lpddr4.h | 73 +
> drivers/ram/k3-ddrss/lpddr4_16bit.c | 396 +
> drivers/ram/k3-ddrss/lpddr4_16bit.h | 33 +
> .../k3-ddrss/lpddr4_16bit_ctl_regs_rw_masks.c | 1309 +++
> drivers/ram/k3-ddrss/lpddr4_16bit_sanity.h | 257 +
> drivers/ram/k3-ddrss/lpddr4_32bit.c | 302 +
> drivers/ram/k3-ddrss/lpddr4_32bit.h | 30 +
> .../k3-ddrss/lpddr4_32bit_ctl_regs_rw_masks.c | 1548 ++++
> drivers/ram/k3-ddrss/lpddr4_32bit_sanity.h | 223 +
> drivers/ram/k3-ddrss/lpddr4_if.h | 144 +
> drivers/ram/k3-ddrss/lpddr4_obj_if.c | 51 +
> drivers/ram/k3-ddrss/lpddr4_obj_if.h | 86 +
> .../{k3-j721e => k3-ddrss}/lpddr4_private.h | 0
> drivers/ram/k3-ddrss/lpddr4_sanity.h | 445 +
> drivers/ram/k3-ddrss/lpddr4_structs_if.h | 51 +
> drivers/ram/k3-j721e/Makefile | 8 -
> drivers/ram/k3-j721e/cps_drv_lpddr4.h | 119 -
> drivers/ram/k3-j721e/lpddr4.c | 2105 -----
> drivers/ram/k3-j721e/lpddr4_ctl_regs.h | 1546 ----
> .../k3-j721e/lpddr4_ddr_controller_macros.h | 7793 -----------------
> drivers/ram/k3-j721e/lpddr4_if.h | 578 --
> drivers/ram/k3-j721e/lpddr4_obj_if.c | 55 -
> drivers/ram/k3-j721e/lpddr4_obj_if.h | 383 -
> drivers/ram/k3-j721e/lpddr4_pi_macros.h | 5397 ------------
> drivers/ram/k3-j721e/lpddr4_sanity.h | 1165 ---
> drivers/ram/k3-j721e/lpddr4_structs_if.h | 121 -
> 60 files changed, 46347 insertions(+), 23007 deletions(-)
> create mode 100644 drivers/ram/k3-ddrss/16bit/lpddr4_16bit_if.h
> create mode 100644 drivers/ram/k3-ddrss/16bit/lpddr4_16bit_obj_if.h
> create mode 100644 drivers/ram/k3-ddrss/16bit/lpddr4_16bit_structs_if.h
> create mode 100644 drivers/ram/k3-ddrss/16bit/lpddr4_address_slice_0_macros.h
> create mode 100644 drivers/ram/k3-ddrss/16bit/lpddr4_address_slice_1_macros.h
> create mode 100644 drivers/ram/k3-ddrss/16bit/lpddr4_address_slice_2_macros.h
> create mode 100644 drivers/ram/k3-ddrss/16bit/lpddr4_ctl_regs.h
> create mode 100644 drivers/ram/k3-ddrss/16bit/lpddr4_ctl_regs_rw_masks.h
> create mode 100644 drivers/ram/k3-ddrss/16bit/lpddr4_data_slice_0_macros.h
> create mode 100644 drivers/ram/k3-ddrss/16bit/lpddr4_data_slice_1_macros.h
> create mode 100644 drivers/ram/k3-ddrss/16bit/lpddr4_ddr_controller_macros.h
> create mode 100644 drivers/ram/k3-ddrss/16bit/lpddr4_phy_core_macros.h
> create mode 100644 drivers/ram/k3-ddrss/16bit/lpddr4_pi_macros.h
> create mode 100644 drivers/ram/k3-ddrss/32bit/lpddr4_32bit_if.h
> create mode 100644 drivers/ram/k3-ddrss/32bit/lpddr4_32bit_obj_if.h
> create mode 100644 drivers/ram/k3-ddrss/32bit/lpddr4_32bit_structs_if.h
> rename drivers/ram/{k3-j721e => k3-ddrss/32bit}/lpddr4_address_slice_0_macros.h (76%)
> create mode 100644 drivers/ram/k3-ddrss/32bit/lpddr4_ctl_regs.h
> create mode 100644 drivers/ram/k3-ddrss/32bit/lpddr4_ctl_regs_rw_masks.h
> rename drivers/ram/{k3-j721e => k3-ddrss/32bit}/lpddr4_data_slice_0_macros.h (64%)
> rename drivers/ram/{k3-j721e => k3-ddrss/32bit}/lpddr4_data_slice_1_macros.h (66%)
> rename drivers/ram/{k3-j721e => k3-ddrss/32bit}/lpddr4_data_slice_2_macros.h (66%)
> rename drivers/ram/{k3-j721e => k3-ddrss/32bit}/lpddr4_data_slice_3_macros.h (66%)
> create mode 100644 drivers/ram/k3-ddrss/32bit/lpddr4_ddr_controller_macros.h
> rename drivers/ram/{k3-j721e => k3-ddrss/32bit}/lpddr4_phy_core_macros.h (60%)
> create mode 100644 drivers/ram/k3-ddrss/32bit/lpddr4_pi_macros.h
> create mode 100644 drivers/ram/k3-ddrss/Makefile
> create mode 100644 drivers/ram/k3-ddrss/cps_drv_lpddr4.h
> rename drivers/ram/{k3-j721e/k3-j721e-ddrss.c => k3-ddrss/k3-ddrss.c} (51%)
> create mode 100644 drivers/ram/k3-ddrss/lpddr4.c
> create mode 100644 drivers/ram/k3-ddrss/lpddr4.h
> create mode 100644 drivers/ram/k3-ddrss/lpddr4_16bit.c
> create mode 100644 drivers/ram/k3-ddrss/lpddr4_16bit.h
> create mode 100644 drivers/ram/k3-ddrss/lpddr4_16bit_ctl_regs_rw_masks.c
> create mode 100644 drivers/ram/k3-ddrss/lpddr4_16bit_sanity.h
> create mode 100644 drivers/ram/k3-ddrss/lpddr4_32bit.c
> create mode 100644 drivers/ram/k3-ddrss/lpddr4_32bit.h
> create mode 100644 drivers/ram/k3-ddrss/lpddr4_32bit_ctl_regs_rw_masks.c
> create mode 100644 drivers/ram/k3-ddrss/lpddr4_32bit_sanity.h
> create mode 100644 drivers/ram/k3-ddrss/lpddr4_if.h
> create mode 100644 drivers/ram/k3-ddrss/lpddr4_obj_if.c
> create mode 100644 drivers/ram/k3-ddrss/lpddr4_obj_if.h
> rename drivers/ram/{k3-j721e => k3-ddrss}/lpddr4_private.h (100%)
> create mode 100644 drivers/ram/k3-ddrss/lpddr4_sanity.h
> create mode 100644 drivers/ram/k3-ddrss/lpddr4_structs_if.h
> delete mode 100644 drivers/ram/k3-j721e/Makefile
> delete mode 100644 drivers/ram/k3-j721e/cps_drv_lpddr4.h
> delete mode 100644 drivers/ram/k3-j721e/lpddr4.c
> delete mode 100644 drivers/ram/k3-j721e/lpddr4_ctl_regs.h
> delete mode 100644 drivers/ram/k3-j721e/lpddr4_ddr_controller_macros.h
> delete mode 100644 drivers/ram/k3-j721e/lpddr4_if.h
> delete mode 100644 drivers/ram/k3-j721e/lpddr4_obj_if.c
> delete mode 100644 drivers/ram/k3-j721e/lpddr4_obj_if.h
> delete mode 100644 drivers/ram/k3-j721e/lpddr4_pi_macros.h
> delete mode 100644 drivers/ram/k3-j721e/lpddr4_sanity.h
> delete mode 100644 drivers/ram/k3-j721e/lpddr4_structs_if.h
>
More information about the U-Boot
mailing list