Received: by 10.223.185.116 with SMTP id b49csp4872411wrg; Tue, 27 Feb 2018 04:12:48 -0800 (PST) X-Google-Smtp-Source: AH8x226HVRe+gcxyJeegQIny1UFntFJt1vF0tC7HCiugfHMVXEH07zV+NNSBcvCNI9Sve1g6IQP+ X-Received: by 10.99.134.65 with SMTP id x62mr10838056pgd.291.1519733568813; Tue, 27 Feb 2018 04:12:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519733568; cv=none; d=google.com; s=arc-20160816; b=stddMj7eRSG3srbMadGhHc3RDiznYjnMz580Js1VFmJJWVn9a/C1Fe6spfeqcfwmpJ PKbg48hKba+IqM7di9xKaIR0FXqNlve+dg+wsecgl0vuS1p4VlvLRB55N7YamZ9QfrH1 lUQ6oFVtGAgyKkZXeoJg4uEVQa2/0zvEiBrlvh+lelIxm/QbA4SSdUyovecg2IHRu6KW K2kPh00ZSbcphMl2RGhFEkkquspSzRkTfot1zekdxhR04Er+w5VMDCV6faFmY/RNyPc1 hiSRisF4W0/9OQC5ih24VLo3a/0gUse4HRxJnK4oKrZvr33tk+SJfJ0ToU8woAlIlj9V WfPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:arc-authentication-results; bh=b4wPT5lCaWZR38PWhAvcDQMGYGLRZwk/7VLCod6AUYM=; b=RMRwHkFWi0bjJjEoQg2JYU/f83VaJRU2WCIqTfFNEuZQL9RDV0NgBPcT+oRPBWbQWn pFoH67gfuBvNAIil+DKfwFvLPHKUrO6n1G48auUVj1c4rdAV0QfIuwYyvp8uHE+whad/ yhtGAs+wRPiMDonGqQwuUFzpNP8PzrrWwetG0qAUWgQHFl4Y5+AptSyt+2YckjjntuU6 IGw552m/u4+flkEWYdOrFOYoswHd7pOv5c1r/2PAVa8StNYPzDVNxwzLU8BDk1N9QMga sr+547Sc8CM+JOt3iiiw3u5nNW9uVl111HR3xEHmTeyb1CJogPOIYqcQNUiQLg72IJga uH9g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y7si6938868pgv.128.2018.02.27.04.12.33; Tue, 27 Feb 2018 04:12:48 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752736AbeB0L42 (ORCPT + 99 others); Tue, 27 Feb 2018 06:56:28 -0500 Received: from relay1.mentorg.com ([192.94.38.131]:49833 "EHLO relay1.mentorg.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752679AbeB0L40 (ORCPT ); Tue, 27 Feb 2018 06:56:26 -0500 Received: from svr-orw-fem-04.mgc.mentorg.com ([147.34.97.41]) by relay1.mentorg.com with esmtps (TLSv1:ECDHE-RSA-AES256-SHA:256) id 1eqdrs-0000aA-W4 from Harish_Kandiga@mentor.com ; Tue, 27 Feb 2018 03:56:25 -0800 Received: from hkandiga-VirtualBox.ina.mentorg.com (147.34.91.1) by svr-orw-fem-04.mgc.mentorg.com (147.34.97.41) with Microsoft SMTP Server id 14.3.224.2; Tue, 27 Feb 2018 03:56:24 -0800 From: Harish Jenny K N To: , , , CC: , , Subject: [PATCH] mmc: Export card RCA register to sysfs. Date: Tue, 27 Feb 2018 17:26:20 +0530 Message-ID: <1519732580-2867-1-git-send-email-harish_kandiga@mentor.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch exports RCA register to sysfs which will help in reading the disk identification information. Signed-off-by: Harish Jenny K N --- drivers/mmc/core/mmc.c | 2 ++ drivers/mmc/core/sd.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index 208a762..d45a244 100644 --- a/drivers/mmc/core/mmc.c +++ b/drivers/mmc/core/mmc.c @@ -792,6 +792,7 @@ static int mmc_compare_ext_csds(struct mmc_card *card, unsigned bus_width) MMC_DEV_ATTR(raw_rpmb_size_mult, "%#x\n", card->ext_csd.raw_rpmb_size_mult); MMC_DEV_ATTR(rel_sectors, "%#x\n", card->ext_csd.rel_sectors); MMC_DEV_ATTR(ocr, "0x%08x\n", card->ocr); +MMC_DEV_ATTR(rca, "0x%x\n", card->rca); MMC_DEV_ATTR(cmdq_en, "%d\n", card->ext_csd.cmdq_en); static ssize_t mmc_fwrev_show(struct device *dev, @@ -848,6 +849,7 @@ static ssize_t mmc_dsr_show(struct device *dev, &dev_attr_raw_rpmb_size_mult.attr, &dev_attr_rel_sectors.attr, &dev_attr_ocr.attr, + &dev_attr_rca.attr, &dev_attr_dsr.attr, &dev_attr_cmdq_en.attr, NULL, diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c index 62b84dd..17d9005 100644 --- a/drivers/mmc/core/sd.c +++ b/drivers/mmc/core/sd.c @@ -676,6 +676,7 @@ static int mmc_sd_init_uhs_card(struct mmc_card *card) MMC_DEV_ATTR(oemid, "0x%04x\n", card->cid.oemid); MMC_DEV_ATTR(serial, "0x%08x\n", card->cid.serial); MMC_DEV_ATTR(ocr, "0x%08x\n", card->ocr); +MMC_DEV_ATTR(rca, "0x%x\n", card->rca); static ssize_t mmc_dsr_show(struct device *dev, @@ -709,6 +710,7 @@ static ssize_t mmc_dsr_show(struct device *dev, &dev_attr_oemid.attr, &dev_attr_serial.attr, &dev_attr_ocr.attr, + &dev_attr_rca.attr, &dev_attr_dsr.attr, NULL, }; -- 1.9.1