From: Pierre Ossman <drzeus-list@drzeus.cx>
To: philipl@overt.org
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2.6.18 1/2] mmc: Add structure definition for mmc v4 EXT_CSD
Date: Tue, 03 Oct 2006 19:40:26 +0200 [thread overview]
Message-ID: <4522A08A.7000107@drzeus.cx> (raw)
In-Reply-To: <15141.67.169.45.37.1159744412.squirrel@overt.org>
First, I just want to note that these patches are not ready for merging
until they are part of a bigger set that actually uses these new features.
philipl@overt.org wrote:
> +struct mmc_ext_csd {
> + unsigned char cmd_set_rev;
> + unsigned char ext_csd_rev;
> + unsigned char csd_structure;
> +
> + unsigned char card_type;
> +
> + /*
> + * Each power class defines MAX RMS Current
> + * and Max Peak Current in mA.
> + * Each category is of the form:
> + * pwr_cl_<speed/MHz>_<voltage/V>
> + *
> + * Each category encodes the power class for 4
> + * bit transfers in [3:0] and 8 bit transfers
> + * in [7:4]. Use mmc_get_4bit_pwr_cl() and
> + * mmc_get_8bit_pwr_cl() to decode these.
> + */
> + unsigned char pwr_cl_52_195;
> + unsigned char pwr_cl_26_195;
> +
> + unsigned char pwr_cl_52_360;
> + unsigned char pwr_cl_26_360;
> +
> + /*
> + * Performance classes describe the minimum
> + * transfer speed the card claims to support
> + * for the given bus widths and speeds.
> + */
> + unsigned char min_perf_r_4_26;
> + unsigned char min_perf_w_4_26;
> + unsigned char min_perf_r_8_26_4_52;
> + unsigned char min_perf_w_8_26_4_52;
> + unsigned char min_perf_r_8_52;
> + unsigned char min_perf_w_8_52;
> +
> + unsigned char s_cmd_set;
> +};
>
Do we need all of these? As this structure is present in all cards, we
shouldn't keep more stuff in it than we actually need.
> @@ -62,11 +106,13 @@
> #define MMC_STATE_BAD (1<<2) /* unrecognised device */
> #define MMC_STATE_SDCARD (1<<3) /* is an SD card */
> #define MMC_STATE_READONLY (1<<4) /* card is read-only */
> +#define MMC_STATE_HIGHSPEED (1<<5) /* card is in mmc4 highspeed mode */
>
Please add this in the patch that actually needs the flag.
> +/*
> + * EXT_CSD fields
> + */
> +#define EXT_CSD_BUS_WIDTH 183 /* WO */
> +#define EXT_CSD_HS_TIMING 185 /* R/W */
> +#define EXT_CSD_POWER_CLASS 187 /* R/W */
> +#define EXT_CSD_CMD_SET_REV 189 /* RO */
> +#define EXT_CSD_CMD_SET 191 /* R/W */
> +#define EXT_CSD_EXT_CSD_REV 192 /* RO */
> +#define EXT_CSD_CSD_STRUCTURE 194 /* RO */
> +#define EXT_CSD_CARD_TYPE 196 /* RO */
> +#define EXT_CSD_PWR_CL_52_195 200 /* RO */
> +#define EXT_CSD_PWR_CL_26_195 201 /* RO */
> +#define EXT_CSD_PWR_CL_52_360 202 /* RO */
> +#define EXT_CSD_PWR_CL_26_360 203 /* RO */
> +#define EXT_CSD_MIN_PERF_R_4_26 205 /* RO */
> +#define EXT_CSD_MIN_PERF_W_4_26 206 /* RO */
> +#define EXT_CSD_MIN_PERF_R_8_26_4_52 207 /* RO */
> +#define EXT_CSD_MIN_PERF_W_8_26_4_52 208 /* RO */
> +#define EXT_CSD_MIN_PERF_R_8_52 209 /* RO */
> +#define EXT_CSD_MIN_PERF_W_8_52 210 /* RO */
> +#define EXT_CSD_S_CMD_SET 504 /* RO */
> +
>
Please remove these and used fixed values in the decoding routine.
That's the way we do it for CID and CSD today.
Rgds
Pierre
prev parent reply other threads:[~2006-10-03 17:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <45200340.9080306@overt.org>
[not found] ` <45201116.2080601@drzeus.cx>
2006-10-01 23:13 ` [PATCH 2.6.18 1/2] mmc: Add structure definition for mmc v4 EXT_CSD philipl
2006-10-03 17:40 ` Pierre Ossman [this message]
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=4522A08A.7000107@drzeus.cx \
--to=drzeus-list@drzeus.cx \
--cc=linux-kernel@vger.kernel.org \
--cc=philipl@overt.org \
/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.