History log of /u-boot/arch/arm/include/asm/arch-rockchip/sdram_rk3399.h
Revision Date Author Comments
# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# cd93d625 10-May-2020 Simon Glass <sjg@chromium.org>

common: Drop linux/bitops.h from common header

Move this uncommon header out of the common header.

Signed-off-by: Simon Glass <sjg@chromium.org>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# c8863b85 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

ram: rk3399: update calculate_stride

Update the calculation of the stride to support all the DRAM case.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a922d0d1 14-Nov-2019 YouMin Chen <cym@rock-chips.com>

ram: rk3399: migrate to use common code

For there are some structures and functions are common for all rockchip SoCs,
migrate to use the common code so that we can clean up reduandent codes.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# d5d40f45 14-Nov-2019 Kever Yang <kever.yang@rock-chips.com>

rockchip: sdram: move cap structure and debug function to sdram_common.h

The sdram.h suppose to be helper file for sdram.c which including dram
size decode and some u-boot related dram init interface, and all
structure and function for dram driver move to sdram_common.h

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# a735550b 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add DdrMode

Add DdrMode structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# ed77ce72 16-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Add ddrtimingC0

Add DdrTimingC0 structure with associated bit fields.

These would help to reconfigure sdram capabilities during
lpddr4 setup related configs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# fafd2ad4 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

arm: include: rockchip: Move dramtypes to common header

dramtype enum numbers as common across all dram controllers
in rockchip, so move the eneum values in common header.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# e5e444aa 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: Move common sdram structures in common header

Move common sdram structures like sdram_cap_info, sdram_base_params
into sdram_common header, this would help to reuse the same
from another controllers like px30.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 1372a6ec 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rk3399: s/rk3399_base_params/sdram_base_params

Most of the ddr parameters are common in rk3399_base_params
structure and which would reuse it in another controller like
px30 in future.

So, rename the structure from rk3399_base_params into
sdram_base_params.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 355490dc 15-Jul-2019 Jagan Teki <jagan@amarulasolutions.com>

ram: rockchip: rk3399: Add cap_info structure

Group common ddr attributes like
- rank
- col
- bk
- bw
- dbw
- row_3_4
- cs0_row
- cs1_row
- ddrconfig

into a common cap_info structure for more code readability and extend
if possible based on the new features.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <Kever.yang@rock-chips.com>


# 83d290c5 06-May-2018 Tom Rini <trini@konsulko.com>

SPDX: Convert all of our single license tags to Linux Kernel style

When U-Boot started using SPDX tags we were among the early adopters and
there weren't a lot of other examples to borrow from. So we picked the
area of the file that usually had a full license text and replaced it
with an appropriate SPDX-License-Identifier: entry. Since then, the
Linux Kernel has adopted SPDX tags and they place it as the very first
line in a file (except where shebangs are used, then it's second line)
and with slightly different comment styles than us.

In part due to community overlap, in part due to better tag visibility
and in part for other minor reasons, switch over to that style.

This commit changes all instances where we have a single declared
license in the tag as both the before and after are identical in tag
contents. There's also a few places where I found we did not have a tag
and have introduced one.

Signed-off-by: Tom Rini <trini@konsulko.com>


# fa437430 22-Feb-2017 Kever Yang <kever.yang@rock-chips.com>

rockchip: arm64: rk3399: add ddr controller driver

RK3399 support DDR3, LPDDR3, DDR4 sdram, this patch is porting from
coreboot, support 4GB lpddr3 in this version.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Added rockchip: tag:
Signed-off-by: Simon Glass <sjg@chromium.org>