Received: by 10.223.185.116 with SMTP id b49csp4637016wrg; Tue, 6 Mar 2018 21:02:57 -0800 (PST) X-Google-Smtp-Source: AG47ELsHvyBdmenH43o6WSAWL38U7qosrYSbIq3+uvHKoln1INpCYmUwVWNLjfOuXGr0Y+GjA69G X-Received: by 10.99.55.11 with SMTP id e11mr17154653pga.237.1520398976984; Tue, 06 Mar 2018 21:02:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520398976; cv=none; d=google.com; s=arc-20160816; b=gS+cpRMWWzXUeqi4ujeyOL7Tlpohg9OtcAHknTSLKAQD9gLvZBMGZl4DDb5K/xoK4L mWfnSZrBSTOq+3Stny71iA8/BWyzZw+sbdl7tZqTMEZeS2iQmHo+8NorziKoW8CuLQSu rjloA4IaU6tLENdzY7QQCFUCjcZ824JWs9HFjqpoNspvi6kS/c6buWRZfmqmS+z/3Ii9 dTw5qGc1n1x6CLcGkoQAAnBDPfN8KAk7+h3gn6OEBDoDg2W7/pABD9J/5K/qVA0/MOx8 mZPS4xZYG2qMYgHIrYFk0i5R3MObx1jSRvBrAnUf0U4AK7MTA6ZmrUMGA5mR/sUzZKbK ZLPA== 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=0A+YX8jJctoE1pSikMhjhVcynFjxa5F4M5sWr0DxAHc=; b=L3NZtABMP/dHg4LckdWotXHrBqjNp6PlLo2iojqRGgloQeb6HpGrFOJBfDC73BSPMI Pwxam6K4VqSAbX9JIHBxOMHw4wj1+hyJUBGS9SOKqK3CxDOO2oPmViSXjFT/Pd/UIi/x 5HxH2iqBYqOjno/31b5wFum2BOWEdbdhKxZEHSOVPEwPTo4EBnq1w/TIYiznnZ9e10c3 izD+YrbHFM09SR+//WJ6wtiOYierje8bvCcZYu2orEJbuZOiQymV5sF0oqMTgF98LXnZ xlGQRiDR3q2xMDFd25NFiiqhwzHB3Gl3tqa+EWauk2SXGOMyLHrE4KfuquOuFIboeuOR BYMQ== 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 d18si13249768pfl.307.2018.03.06.21.02.42; Tue, 06 Mar 2018 21:02:56 -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 S1751056AbeCGFBt (ORCPT + 99 others); Wed, 7 Mar 2018 00:01:49 -0500 Received: from relay1.mentorg.com ([192.94.38.131]:48298 "EHLO relay1.mentorg.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750803AbeCGFBs (ORCPT ); Wed, 7 Mar 2018 00:01:48 -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 1etRD1-0006p4-1R from Harish_Kandiga@mentor.com ; Tue, 06 Mar 2018 21:01:47 -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, 6 Mar 2018 21:01:45 -0800 From: Harish Jenny K N To: , , , CC: , , Subject: [PATCH v2] mmc: Export card RCA register to sysfs. Date: Wed, 7 Mar 2018 10:31:42 +0530 Message-ID: <1520398902-23012-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. Reviewed-by: Shawn Lin Signed-off-by: Harish Jenny K N --- Changes in v2: - Used 0x%04x to display 16 bit register 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..6f8ebd6 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%04x\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..2ecd098 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%04x\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