From: Loic Pallardy <loic.pallardy-ext@stericsson.com>
To: linux-mmc@vger.kernel.org, Chris Ball <cjb@laptop.org>
Cc: Linus Walleij <linus.walleij@linaro.org>,
STEricsson_nomadik_linux <STEricsson_nomadik_linux@list.st.com>,
Ulf Hansson <ulf.hansson@stericcson.com>,
Loic Pallardy <loic.pallardy-ext@stericsson.com>,
Loic Pallardy <loic.pallardy@stericsson.com>
Subject: [PATCH v3 3/5] mmc: core: Extend sysfs to ext_csd parameters for RPMB support
Date: Mon, 6 Aug 2012 17:12:29 +0200 [thread overview]
Message-ID: <1344265951-22437-4-git-send-email-loic.pallardy-ext@stericsson.com> (raw)
In-Reply-To: <1344265951-22437-1-git-send-email-loic.pallardy-ext@stericsson.com>
Extend current sysfs access to ext_csd rpmb
parameters (RPMB partition size) and rel_sector
information.
Signed-off-by: Loic Pallardy <loic.pallardy@stericsson.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Johan Rudholm <johan.rudholm@stericsson.com>
Reviewed-by: Namjae Jeon <linkinjeon@gmail.com>
---
Documentation/mmc/mmc-dev-attrs.txt | 7 +++++++
drivers/mmc/core/mmc.c | 4 ++++
2 files changed, 11 insertions(+)
diff --git a/Documentation/mmc/mmc-dev-attrs.txt b/Documentation/mmc/mmc-dev-attrs.txt
index 22ae844..0d98fac 100644
--- a/Documentation/mmc/mmc-dev-attrs.txt
+++ b/Documentation/mmc/mmc-dev-attrs.txt
@@ -25,6 +25,8 @@ All attributes are read-only.
serial Product Serial Number (from CID Register)
erase_size Erase group size
preferred_erase_size Preferred erase size
+ raw_rpmb_size_mult RPMB partition size
+ rel_sectors Reliable write sector count
Note on Erase Size and Preferred Erase Size:
@@ -65,6 +67,11 @@ Note on Erase Size and Preferred Erase Size:
"preferred_erase_size" is in bytes.
+Note on raw_rpmb_size_mult:
+ "raw_rpmb_size_mult" is a mutliple of 128kB block.
+ RPMB size in byte is calculated by using the following equation:
+ RPMB partition size = 128kB x raw_rpmb_size_mult
+
SD/MMC/SDIO Clock Gating Attribute
==================================
diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
index 8a459cb..0f2449c 100644
--- a/drivers/mmc/core/mmc.c
+++ b/drivers/mmc/core/mmc.c
@@ -615,6 +615,8 @@ MMC_DEV_ATTR(serial, "0x%08x\n", card->cid.serial);
MMC_DEV_ATTR(enhanced_area_offset, "%llu\n",
card->ext_csd.enhanced_area_offset);
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);
static struct attribute *mmc_std_attrs[] = {
&dev_attr_cid.attr,
@@ -630,6 +632,8 @@ static struct attribute *mmc_std_attrs[] = {
&dev_attr_serial.attr,
&dev_attr_enhanced_area_offset.attr,
&dev_attr_enhanced_area_size.attr,
+ &dev_attr_raw_rpmb_size_mult.attr,
+ &dev_attr_rel_sectors.attr,
NULL,
};
--
1.7.11.1
next prev parent reply other threads:[~2012-08-06 15:13 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-06 15:12 [PATCH v3 0/5] mmc: Add access to RPMB partition Loic Pallardy
2012-08-06 15:12 ` [PATCH v3 1/5] mmc: core: Expose " Loic Pallardy
[not found] ` <CAJOk3oHfTMr7-esASZKV0kmiFmeGzD1OjgwMZrTtz8Pk61Lswg@mail.gmail.com>
2012-11-16 21:32 ` Fwd: " Krishna Konda
2012-08-06 15:12 ` [PATCH v3 2/5] mmc: card: Do not scan RPMB partitions Loic Pallardy
[not found] ` <CAJOk3oE2gXH1AQQBqq-nuLCEb4--vcMZRYnQJNWOdCP8c0JcAA@mail.gmail.com>
2012-11-16 21:31 ` Fwd: " Krishna Konda
2012-08-06 15:12 ` Loic Pallardy [this message]
[not found] ` <CAJOk3oHSTygZBkj847a+OKcSAB8=G0YN8vrz07080sUdPB0+_Q@mail.gmail.com>
2012-11-16 21:27 ` Fwd: [PATCH v3 3/5] mmc: core: Extend sysfs to ext_csd parameters for RPMB support Krishna Konda
2012-08-06 15:12 ` [PATCH v3 4/5] mmc: core: Add mmc_set_blockcount feature Loic Pallardy
[not found] ` <CAJOk3oEvYUEBAP729nbkxA9XKn=1H6076OPLDSsvq5GP7Z8Qxg@mail.gmail.com>
2012-11-16 21:26 ` Fwd: " Krishna Konda
2012-08-06 15:12 ` [PATCH v3 5/5] mmc: card: Add RPMB support in IOCTL interface Loic Pallardy
2012-08-21 7:17 ` shashidhar hiremath
2012-08-22 7:43 ` Loic pallardy
[not found] ` <CAJOk3oERiGjxm-u6iGZLxK0Mq5noC76d33ojwVtY3gtdRBju3g@mail.gmail.com>
2012-11-16 21:23 ` Fwd: " Krishna Konda
[not found] ` <CAJOk3oGMtZvrkw9ic306BKNSKCAzPQCYmJrvq5=zDi1pHjjQxg@mail.gmail.com>
2012-11-14 21:14 ` Fwd: [PATCH v3 0/5] mmc: Add access to RPMB partition Krishna Konda
2012-11-15 8:04 ` Linus Walleij
2012-11-16 21:11 ` Krishna Konda
2012-11-17 20:19 ` Linus Walleij
2012-11-17 23:12 ` Chris Ball
2012-11-19 10:09 ` Linus Walleij
2012-11-19 18:12 ` Krishna Konda
2012-11-20 8:25 ` Loic PALLARDY
2012-11-20 18:54 ` Krishna Konda
2012-11-21 9:55 ` Loic PALLARDY
2012-11-21 11:02 ` Sundar J. Dev
2012-11-21 17:32 ` Loic PALLARDY
2012-11-22 4:32 ` Sundar J. Dev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1344265951-22437-4-git-send-email-loic.pallardy-ext@stericsson.com \
--to=loic.pallardy-ext@stericsson.com \
--cc=STEricsson_nomadik_linux@list.st.com \
--cc=cjb@laptop.org \
--cc=linus.walleij@linaro.org \
--cc=linux-mmc@vger.kernel.org \
--cc=loic.pallardy@stericsson.com \
--cc=ulf.hansson@stericcson.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.