/* DDR interface width */
printf("%d-bit ", qca_dram_ddr_width());
- /* CAS latency */
- printf("CL%d\n", qca_dram_cas_lat());
+ /* tCL-tRCD-tRP-tRAS latency */
+ printf("CL%d-%d-%d-%d\n", qca_dram_cas_lat(),
+ qca_dram_trcd_lat(),
+ qca_dram_trp_lat(),
+ qca_dram_tras_lat());
/* SPI NOR FLASH sizes and types */
printf("%" ALIGN_SIZE "s ", "FLASH:");
/*
* Returns CAS latency, based on setting in DDR_CONFIG register
*/
-u32 qca_dram_cas_lat(void)
+inline u32 qca_dram_cas_lat(void)
{
#ifndef CONFIG_BOARD_DRAM_CAS_LATENCY
u32 reg;
#endif
}
+/*
+ * Returns tRCD latency
+ */
+inline u32 qca_dram_trcd_lat(void)
+{
+ u32 reg;
+
+ reg = (qca_soc_reg_read(QCA_DDR_CFG_REG) & QCA_DDR_CFG_TRCD_MASK)
+ >> QCA_DDR_CFG_TRCD_SHIFT;
+
+ return reg / 2;
+}
+
+/*
+ * Returns tRP latency
+ */
+inline u32 qca_dram_trp_lat(void)
+{
+ u32 reg;
+
+ reg = (qca_soc_reg_read(QCA_DDR_CFG_REG) & QCA_DDR_CFG_TRP_MASK)
+ >> QCA_DDR_CFG_TRP_SHIFT;
+
+ return reg / 2;
+}
+
+/*
+ * Returns tRAS latency
+ */
+inline u32 qca_dram_tras_lat(void)
+{
+ u32 reg;
+
+ reg = (qca_soc_reg_read(QCA_DDR_CFG_REG) & QCA_DDR_CFG_TRAS_MASK)
+ >> QCA_DDR_CFG_TRAS_SHIFT;
+
+ return reg / 2;
+}
+
/*
* ===============================================
* DQS delay tap controller tune related functions
u32 qca_sf_jedec_id(u32 bank);
u32 qca_dram_type(void);
u32 qca_dram_size(void);
-u32 qca_dram_cas_lat(void);
u32 qca_dram_ddr_width(void);
void qca_dram_init(void);
+inline u32 qca_dram_cas_lat(void);
+inline u32 qca_dram_trcd_lat(void);
+inline u32 qca_dram_trp_lat(void);
+inline u32 qca_dram_tras_lat(void);
#endif /* !__ASSEMBLY__ */
/*