diff --git a/drivers/amlogic/ddr_tool/ddr_band_op_g12.c b/drivers/amlogic/ddr_tool/ddr_band_op_g12.c index 1fb00001766e..b791ec5797d6 100644 --- a/drivers/amlogic/ddr_tool/ddr_band_op_g12.c +++ b/drivers/amlogic/ddr_tool/ddr_band_op_g12.c @@ -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 diff --git a/drivers/amlogic/ddr_tool/ddr_band_op_gx.c b/drivers/amlogic/ddr_tool/ddr_band_op_gx.c index 1f206cc778d7..69dbc4e83cd7 100644 --- a/drivers/amlogic/ddr_tool/ddr_band_op_gx.c +++ b/drivers/amlogic/ddr_tool/ddr_band_op_gx.c @@ -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 diff --git a/drivers/amlogic/ddr_tool/ddr_band_op_gxl.c b/drivers/amlogic/ddr_tool/ddr_band_op_gxl.c index 01dea7c1c547..52ee4c287f10 100644 --- a/drivers/amlogic/ddr_tool/ddr_band_op_gxl.c +++ b/drivers/amlogic/ddr_tool/ddr_band_op_gxl.c @@ -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