From 52da491c29a8bfc17e1da8b94d27ec63e3405d19 Mon Sep 17 00:00:00 2001 From: Sarthak Garg Date: Fri, 2 Jul 2021 14:32:14 +0530 Subject: [PATCH] mmc: core: Remove unnecessary scale debugfs entry Current scale debugfs entry is quite unstable and used barely. Hardware cmd timeout and some other issues are being seen when trying to modify the scale entry. Remove unnecessary scale debugfs entry to avoid such issues. Change-Id: I9486a9fe7498ba1855153202415fca80debb13f9 Signed-off-by: Sarthak Garg --- drivers/mmc/core/debugfs.c | 36 ------------------------------------ 1 file changed, 36 deletions(-) diff --git a/drivers/mmc/core/debugfs.c b/drivers/mmc/core/debugfs.c index b99ff071d256..25b53cca4705 100644 --- a/drivers/mmc/core/debugfs.c +++ b/drivers/mmc/core/debugfs.c @@ -223,40 +223,6 @@ DEFINE_SIMPLE_ATTRIBUTE(mmc_clock_fops, mmc_clock_opt_get, mmc_clock_opt_set, "%llu\n"); #if defined(CONFIG_SDC_QTI) -static int mmc_scale_get(void *data, u64 *val) -{ - struct mmc_host *host = data; - - *val = host->clk_scaling.curr_freq; - - return 0; -} - -static int mmc_scale_set(void *data, u64 val) -{ - int err = 0; - struct mmc_host *host = data; - - mmc_claim_host(host); - - /* change frequency from sysfs manually */ - err = mmc_clk_update_freq(host, val, host->clk_scaling.state); - if (err == -EAGAIN) - err = 0; - else if (err) - pr_err("%s: clock scale to %llu failed with error %d\n", - mmc_hostname(host), val, err); - else - pr_debug("%s: clock change to %llu finished successfully (%s)\n", - mmc_hostname(host), val, current->comm); - - mmc_release_host(host); - - return err; -} - -DEFINE_DEBUGFS_ATTRIBUTE(mmc_scale_fops, mmc_scale_get, mmc_scale_set, - "%llu\n"); static int mmc_max_clock_get(void *data, u64 *val) { @@ -314,8 +280,6 @@ void mmc_add_host_debugfs(struct mmc_host *host) #if defined(CONFIG_SDC_QTI) debugfs_create_file("max_clock", 0600, root, host, &mmc_max_clock_fops); - debugfs_create_file("scale", 0600, root, host, - &mmc_scale_fops); debugfs_create_bool("skip_clk_scale_freq_update", 0600, root, &host->clk_scaling.skip_clk_scale_freq_update);