Loading drivers/mmc/core/debugfs.c +31 −0 Original line number Diff line number Diff line Loading @@ -303,6 +303,33 @@ static int mmc_force_err_set(void *data, u64 val) DEFINE_SIMPLE_ATTRIBUTE(mmc_force_err_fops, NULL, mmc_force_err_set, "%llu\n"); static int mmc_err_state_get(void *data, u64 *val) { struct mmc_host *host = data; if (!host) return -EINVAL; *val = host->err_occurred ? 1 : 0; return 0; } static int mmc_err_state_clear(void *data, u64 val) { struct mmc_host *host = data; if (!host) return -EINVAL; host->err_occurred = false; return 0; } DEFINE_SIMPLE_ATTRIBUTE(mmc_err_state, mmc_err_state_get, mmc_err_state_clear, "%llu\n"); void mmc_add_host_debugfs(struct mmc_host *host) { struct dentry *root; Loading Loading @@ -343,6 +370,10 @@ void mmc_add_host_debugfs(struct mmc_host *host) &host->cmdq_thist_enabled)) goto err_node; if (!debugfs_create_file("err_state", S_IRUSR | S_IWUSR, root, host, &mmc_err_state)) goto err_node; #ifdef CONFIG_MMC_CLKGATE if (!debugfs_create_u32("clk_delay", (S_IRUSR | S_IWUSR), root, &host->clk_delay)) Loading include/linux/mmc/host.h +2 −0 Original line number Diff line number Diff line Loading @@ -517,6 +517,8 @@ struct mmc_host { struct dentry *debugfs_root; bool err_occurred; struct mmc_async_req *areq; /* active async req */ struct mmc_context_info context_info; /* async synchronization info */ Loading Loading
drivers/mmc/core/debugfs.c +31 −0 Original line number Diff line number Diff line Loading @@ -303,6 +303,33 @@ static int mmc_force_err_set(void *data, u64 val) DEFINE_SIMPLE_ATTRIBUTE(mmc_force_err_fops, NULL, mmc_force_err_set, "%llu\n"); static int mmc_err_state_get(void *data, u64 *val) { struct mmc_host *host = data; if (!host) return -EINVAL; *val = host->err_occurred ? 1 : 0; return 0; } static int mmc_err_state_clear(void *data, u64 val) { struct mmc_host *host = data; if (!host) return -EINVAL; host->err_occurred = false; return 0; } DEFINE_SIMPLE_ATTRIBUTE(mmc_err_state, mmc_err_state_get, mmc_err_state_clear, "%llu\n"); void mmc_add_host_debugfs(struct mmc_host *host) { struct dentry *root; Loading Loading @@ -343,6 +370,10 @@ void mmc_add_host_debugfs(struct mmc_host *host) &host->cmdq_thist_enabled)) goto err_node; if (!debugfs_create_file("err_state", S_IRUSR | S_IWUSR, root, host, &mmc_err_state)) goto err_node; #ifdef CONFIG_MMC_CLKGATE if (!debugfs_create_u32("clk_delay", (S_IRUSR | S_IWUSR), root, &host->clk_delay)) Loading
include/linux/mmc/host.h +2 −0 Original line number Diff line number Diff line Loading @@ -517,6 +517,8 @@ struct mmc_host { struct dentry *debugfs_root; bool err_occurred; struct mmc_async_req *areq; /* active async req */ struct mmc_context_info context_info; /* async synchronization info */ Loading