dmc: fix mk_gx64.sh compiling error [1/1]

PD#SWPL-184920

Problem:
there is compiling error with
./common/common_drivers/scripts/amlogic/mk_gx64.sh
when CONFIG_AMLOGIC_DDR_BANDWIDTH_T6D enabled

Solution:
modify outstanding_init to __init

Verify:
t6d br301

Change-Id: Ia337de8a341679cf8a20249841bfbeac919af44b
Signed-off-by: qinglin.li <qinglin.li@amlogic.com>
This commit is contained in:
qinglin.li
2024-09-11 14:35:45 +08:00
committed by gerrit autosubmit
parent 70635b96bc
commit f92db9bbf4
3 changed files with 6 additions and 8 deletions
@@ -230,7 +230,7 @@ static int t6d_dump_reg(struct ddr_bandwidth *db, char *buf)
}
#endif
static int outstanding_init(struct ddr_bandwidth *db)
static int __init outstanding_init(struct ddr_bandwidth *db)
{
int i;
size_t count;
@@ -297,9 +297,6 @@ static int outstanding_handle(struct ddr_bandwidth *db, int bus,
int ret = 0;
switch (type) {
case OUTSTANDING_INIT:
ret = outstanding_init(db);
break;
case OUTSTANDING_SET:
ret = outstanding_set(db, bus, value);
break;
@@ -319,6 +316,7 @@ struct ddr_bandwidth_ops t6d_ddr_bw_ops = {
.get_freq = t6d_get_dmc_freq_quick,
.handle_irq = t6d_handle_irq,
.bandwidth_enable = t6d_dmc_bandwidth_enable,
.outstanding_init = outstanding_init,
.outstanding = outstanding_handle,
#if DDR_BANDWIDTH_DEBUG
.dump_reg = t6d_dump_reg,
@@ -1791,8 +1791,8 @@ static int __init ddr_bandwidth_probe(struct platform_device *pdev)
return -EINVAL;
aml_db->ost.levels.cur_level = init_ots_level;
if (aml_db->ops && aml_db->ops->outstanding)
aml_db->ops->outstanding(aml_db, 0, 0, OUTSTANDING_INIT);
if (aml_db->ops && aml_db->ops->outstanding_init)
aml_db->ops->outstanding_init(aml_db);
r = class_register(&aml_ddr_class);
if (r)
@@ -110,8 +110,7 @@
#define DDR_PRIORITY_POWER BIT(30)
enum outstanding_type {
OUTSTANDING_INIT = 1,
OUTSTANDING_SET,
OUTSTANDING_SET = 1,
OUTSTANDING_GET,
};
@@ -135,6 +134,7 @@ struct ddr_bandwidth_ops {
unsigned long (*get_freq)(struct ddr_bandwidth *db);
int (*outstanding)(struct ddr_bandwidth *db, int bus,
int value, enum outstanding_type type);
int (*outstanding_init)(struct ddr_bandwidth *db);
#if DDR_BANDWIDTH_DEBUG
int (*dump_reg)(struct ddr_bandwidth *db, char *buf);
#endif