From patchwork Tue Aug 12 07:28:54 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Gao, Yunpeng" X-Patchwork-Id: 4711731 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id E3A009F38D for ; Tue, 12 Aug 2014 07:36:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 39E0220127 for ; Tue, 12 Aug 2014 07:36:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4CA0A2011B for ; Tue, 12 Aug 2014 07:36:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753572AbaHLHgn (ORCPT ); Tue, 12 Aug 2014 03:36:43 -0400 Received: from mga11.intel.com ([192.55.52.93]:49682 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751981AbaHLHgn (ORCPT ); Tue, 12 Aug 2014 03:36:43 -0400 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP; 12 Aug 2014 00:36:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.01,847,1400050800"; d="scan'208";a="575424154" Received: from spark-hp-compaq-8000-elite-cmt-pc.bj.intel.com ([172.16.181.71]) by fmsmga001.fm.intel.com with ESMTP; 12 Aug 2014 00:27:08 -0700 From: Yunpeng Gao To: linux-mmc@vger.kernel.org Cc: Yunpeng Gao , Chuanxiao Xiao Subject: [PATCH] mmc: core: export more sysfs for debugging purpose Date: Tue, 12 Aug 2014 15:28:54 +0800 Message-Id: <1407828534-15846-1-git-send-email-yunpeng.gao@intel.com> X-Mailer: git-send-email 1.7.9.5 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add some more sysfs export related to eMMC BK Ops, HPI and Hardware Reset features. It'll be helpful for debugging. Signed-off-by: Yunpeng Gao Signed-off-by: Chuanxiao Xiao --- drivers/mmc/core/mmc.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index 793c6f7..15b7ab0 100644 --- a/drivers/mmc/core/mmc.c +++ b/drivers/mmc/core/mmc.c @@ -710,6 +710,12 @@ MMC_DEV_ATTR(enhanced_area_offset, "%llu\n", MMC_DEV_ATTR(enhanced_area_size, "%u\n", card->ext_csd.enhanced_area_size); 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(hpi_support, "%d\n", card->ext_csd.hpi); +MMC_DEV_ATTR(hpi_enable, "%d\n", card->ext_csd.hpi_en); +MMC_DEV_ATTR(hpi_command, "%d\n", card->ext_csd.hpi_cmd); +MMC_DEV_ATTR(hw_reset_support, "%d\n", card->ext_csd.rst_n_function); +MMC_DEV_ATTR(bkops_support, "%d\n", card->ext_csd.bkops); +MMC_DEV_ATTR(bkops_enable, "%d\n", card->ext_csd.bkops_en); static struct attribute *mmc_std_attrs[] = { &dev_attr_cid.attr, @@ -728,6 +734,12 @@ static struct attribute *mmc_std_attrs[] = { &dev_attr_enhanced_area_size.attr, &dev_attr_raw_rpmb_size_mult.attr, &dev_attr_rel_sectors.attr, + &dev_attr_hpi_support.attr, + &dev_attr_hpi_enable.attr, + &dev_attr_hpi_command.attr, + &dev_attr_hw_reset_support.attr, + &dev_attr_bkops_support.attr, + &dev_attr_bkops_enable.attr, NULL, }; ATTRIBUTE_GROUPS(mmc_std);