k2hk: use common KS2_ prefix for all hardware definitions
Use KS2_ prefix in all definitions, for that replace K2HK_ prefix and
add KS2_ prefix where it's needed. It requires to change names also
in places where they're used. Align lines and remove redundant
definitions in kardware-k2hk.h at the same time.
Using common KS2_ prefix helps resolve redundant redefinitions and
adds opportunity to use KS2_ definition across a project not thinking about
what SoC should be used. It's more convenient and we don't need to worry
about the SoC type in common files, hardware.h will think about that.
The hardware.h decides definitions of what SoC to use.
Acked-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
diff --git a/board/ti/k2hk_evm/ddr3.c b/board/ti/k2hk_evm/ddr3.c
index b604266..31e9c31 100644
--- a/board/ti/k2hk_evm/ddr3.c
+++ b/board/ti/k2hk_evm/ddr3.c
@@ -299,20 +299,20 @@
/* PG 2.0 */
/* Reset DDR3A PHY after PLL enabled */
ddr3_reset_ddrphy();
- ddr3_init_ddrphy(K2HK_DDR3A_DDRPHYC,
+ ddr3_init_ddrphy(KS2_DDR3A_DDRPHYC,
&ddr3phy_1600_64A_pg2);
} else {
/* PG 1.1 */
- ddr3_init_ddrphy(K2HK_DDR3A_DDRPHYC,
+ ddr3_init_ddrphy(KS2_DDR3A_DDRPHYC,
&ddr3phy_1600_64A);
}
- ddr3_init_ddremif(K2HK_DDR3A_EMIF_CTRL_BASE,
+ ddr3_init_ddremif(KS2_DDR3A_EMIF_CTRL_BASE,
&ddr3_1600_64);
printf("DRAM: Capacity 8 GiB (includes reported below)\n");
} else {
- ddr3_init_ddrphy(K2HK_DDR3A_DDRPHYC, &ddr3phy_1600_32);
- ddr3_init_ddremif(K2HK_DDR3A_EMIF_CTRL_BASE,
+ ddr3_init_ddrphy(KS2_DDR3A_DDRPHYC, &ddr3phy_1600_32);
+ ddr3_init_ddremif(KS2_DDR3A_EMIF_CTRL_BASE,
&ddr3_1600_32);
printf("DRAM: Capacity 4 GiB (includes reported below)\n");
}
@@ -323,18 +323,18 @@
/* PG 2.0 */
/* Reset DDR3A PHY after PLL enabled */
ddr3_reset_ddrphy();
- ddr3_init_ddrphy(K2HK_DDR3A_DDRPHYC,
+ ddr3_init_ddrphy(KS2_DDR3A_DDRPHYC,
&ddr3phy_1333_64A_pg2);
} else {
/* PG 1.1 */
- ddr3_init_ddrphy(K2HK_DDR3A_DDRPHYC,
+ ddr3_init_ddrphy(KS2_DDR3A_DDRPHYC,
&ddr3phy_1333_64A);
}
- ddr3_init_ddremif(K2HK_DDR3A_EMIF_CTRL_BASE,
+ ddr3_init_ddremif(KS2_DDR3A_EMIF_CTRL_BASE,
&ddr3_1333_64);
} else {
- ddr3_init_ddrphy(K2HK_DDR3A_DDRPHYC, &ddr3phy_1333_32);
- ddr3_init_ddremif(K2HK_DDR3A_EMIF_CTRL_BASE,
+ ddr3_init_ddrphy(KS2_DDR3A_DDRPHYC, &ddr3phy_1333_32);
+ ddr3_init_ddremif(KS2_DDR3A_EMIF_CTRL_BASE,
&ddr3_1333_32);
}
} else {
@@ -344,6 +344,6 @@
}
init_pll(&ddr3b_333);
- ddr3_init_ddrphy(K2HK_DDR3B_DDRPHYC, &ddr3phy_1333_64);
- ddr3_init_ddremif(K2HK_DDR3B_EMIF_CTRL_BASE, &ddr3_1333_64);
+ ddr3_init_ddrphy(KS2_DDR3B_DDRPHYC, &ddr3phy_1333_64);
+ ddr3_init_ddremif(KS2_DDR3B_EMIF_CTRL_BASE, &ddr3_1333_64);
}