ddr: fix wrong bandwidth result on g12 platform

PD#161475: ddr: fix wrong bandwidth result on g12 platform

Correct function name get_ddr_freq to get_dmc_freq in order
to avoid misunderstanding.

Change-Id: I9000970f100394cf63468149d431d05ece2aaa1d
Signed-off-by: tao zeng <tao.zeng@amlogic.com>
This commit is contained in:
tao zeng
2018-04-26 11:14:25 +08:00
committed by Yixun Lan
parent 922fb52799
commit 0c2c8fb684
3 changed files with 7 additions and 7 deletions

View File

@@ -60,7 +60,7 @@ static void g12_dmc_port_config(struct ddr_bandwidth *db, int channel, int port)
}
}
static unsigned long g12_get_ddr_freq_quick(struct ddr_bandwidth *db)
static unsigned long g12_get_dmc_freq_quick(struct ddr_bandwidth *db)
{
unsigned int val;
unsigned int n, m, od1;
@@ -98,7 +98,7 @@ static unsigned long g12_get_ddr_freq_quick(struct ddr_bandwidth *db)
n = ((val >> 10) & 0x1f);
od1 = (((val >> 19) & 0x1)) == 1 ? 2 : 1;
if (n)
freq = 2 * (((DEFAULT_XTAL_FREQ * m) / n) >> od1) / od_div;
freq = (((DEFAULT_XTAL_FREQ * m) / n) >> od1) / od_div;
return freq;
}
@@ -185,7 +185,7 @@ static int g12_dump_reg(struct ddr_bandwidth *db, char *buf)
struct ddr_bandwidth_ops g12_ddr_bw_ops = {
.init = g12_dmc_bandwidth_init,
.config_port = g12_dmc_port_config,
.get_freq = g12_get_ddr_freq_quick,
.get_freq = g12_get_dmc_freq_quick,
.handle_irq = g12_handle_irq,
.bandwidth_enable = g12_dmc_bandwidth_enable,
#if DDR_BANDWIDTH_DEBUG

View File

@@ -55,7 +55,7 @@ static void gx_dmc_port_config(struct ddr_bandwidth *db, int channel, int port)
}
static unsigned long gx_get_ddr_freq_quick(struct ddr_bandwidth *db)
static unsigned long gx_get_dmc_freq_quick(struct ddr_bandwidth *db)
{
unsigned int val;
unsigned int od, n, m, od1;
@@ -137,7 +137,7 @@ static int gx_dump_reg(struct ddr_bandwidth *db, char *buf)
struct ddr_bandwidth_ops gx_ddr_bw_ops = {
.init = gx_dmc_bandwidth_init,
.config_port = gx_dmc_port_config,
.get_freq = gx_get_ddr_freq_quick,
.get_freq = gx_get_dmc_freq_quick,
.handle_irq = gx_handle_irq,
.bandwidth_enable = gx_dmc_bandwidth_enable,
#if DDR_BANDWIDTH_DEBUG

View File

@@ -52,7 +52,7 @@ static void gxl_dmc_port_config(struct ddr_bandwidth *db, int channel, int port)
writel(val, db->ddr_reg + port_reg[channel]);
}
static unsigned long gxl_get_ddr_freq_quick(struct ddr_bandwidth *db)
static unsigned long gxl_get_dmc_freq_quick(struct ddr_bandwidth *db)
{
unsigned int val;
unsigned int od, n, m, od1;
@@ -155,7 +155,7 @@ static int gxl_dump_reg(struct ddr_bandwidth *db, char *buf)
struct ddr_bandwidth_ops gxl_ddr_bw_ops = {
.init = gxl_dmc_bandwidth_init,
.config_port = gxl_dmc_port_config,
.get_freq = gxl_get_ddr_freq_quick,
.get_freq = gxl_get_dmc_freq_quick,
.handle_irq = gxl_handle_irq,
.bandwidth_enable = gxl_dmc_bandwidth_enable,
#if DDR_BANDWIDTH_DEBUG