]> git.ipfire.org Git - thirdparty/openwrt.git/blob
a4c5f419d4def16eb537fc8746afb1f7b31e2887
[thirdparty/openwrt.git] /
1 From f13ea6520720768a421b3e0dffd590f487b7a387 Mon Sep 17 00:00:00 2001
2 From: Jonathan Bell <jonathan@raspberrypi.com>
3 Date: Tue, 26 Mar 2024 13:39:47 +0000
4 Subject: [PATCH] drivers: mmc: add debugfs entries for SD extension registers
5
6 Also report the card's supported queue depth in the message log.
7
8 Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
9 ---
10 drivers/mmc/core/mmc.c | 4 ++--
11 drivers/mmc/core/sd.c | 9 ++++++---
12 2 files changed, 8 insertions(+), 5 deletions(-)
13
14 --- a/drivers/mmc/core/mmc.c
15 +++ b/drivers/mmc/core/mmc.c
16 @@ -1915,8 +1915,8 @@ static int mmc_init_card(struct mmc_host
17 host->cqe_enabled = true;
18
19 if (card->ext_csd.cmdq_en) {
20 - pr_info("%s: Command Queue Engine enabled\n",
21 - mmc_hostname(host));
22 + pr_info("%s: Command Queue Engine enabled, %u tags\n",
23 + mmc_hostname(host), card->ext_csd.cmdq_depth);
24 } else {
25 host->hsq_enabled = true;
26 pr_info("%s: Host Software Queue enabled\n",
27 --- a/drivers/mmc/core/sd.c
28 +++ b/drivers/mmc/core/sd.c
29 @@ -710,7 +710,8 @@ MMC_DEV_ATTR(oemid, "0x%04x\n", card->ci
30 MMC_DEV_ATTR(serial, "0x%08x\n", card->cid.serial);
31 MMC_DEV_ATTR(ocr, "0x%08x\n", card->ocr);
32 MMC_DEV_ATTR(rca, "0x%04x\n", card->rca);
33 -
34 +MMC_DEV_ATTR(ext_perf, "%02x\n", card->ext_perf.feature_support);
35 +MMC_DEV_ATTR(ext_power, "%02x\n", card->ext_power.feature_support);
36
37 static ssize_t mmc_dsr_show(struct device *dev, struct device_attribute *attr,
38 char *buf)
39 @@ -772,6 +773,8 @@ static struct attribute *sd_std_attrs[]
40 &dev_attr_ocr.attr,
41 &dev_attr_rca.attr,
42 &dev_attr_dsr.attr,
43 + &dev_attr_ext_perf.attr,
44 + &dev_attr_ext_power.attr,
45 NULL,
46 };
47
48 @@ -1507,8 +1510,8 @@ cont:
49 host->cqe_enabled = true;
50
51 if (card->ext_csd.cmdq_en) {
52 - pr_info("%s: Command Queue Engine enabled\n",
53 - mmc_hostname(host));
54 + pr_info("%s: Command Queue Engine enabled, %u tags\n",
55 + mmc_hostname(host), card->ext_csd.cmdq_depth);
56 } else {
57 host->hsq_enabled = true;
58 pr_info("%s: Host Software Queue enabled\n",