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