mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Yann Sionneau <ysionneau@kalrayinc.com>
To: barebox@lists.infradead.org
Subject: Re: [PATCH 05/10] mci: describe more command structure in mci.h
Date: Tue, 30 Jul 2024 11:25:30 +0200	[thread overview]
Message-ID: <4d94da30-d6f4-4a3a-93a9-4ef3a0cdcb32@kalrayinc.com> (raw)
In-Reply-To: <20240730071929.2016537-6-a.fatoum@pengutronix.de>

Hello Ahmad,

Le 7/30/24 à 09:19, Ahmad Fatoum a écrit :
> This introduces no functional change, but adds a number of definitions
> that will come in handy when adding erase support in a later commit.
>
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
>   include/mci.h | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++-
>   1 file changed, 60 insertions(+), 1 deletion(-)
>
> diff --git a/include/mci.h b/include/mci.h
> index 4f1ff9dc57c8..610040937ee5 100644
> --- a/include/mci.h
> +++ b/include/mci.h
>
> +/*
> + * Card Command Classes (CCC)
> + */
> +#define CCC_BASIC		(1<<0)	/* (0) Basic protocol functions */
> +					/* (CMD0,1,2,3,4,7,9,10,12,13,15) */
> +					/* (and for SPI, CMD58,59) */
> +#define CCC_STREAM_READ		(1<<1)	/* (1) Stream read commands */
> +					/* (CMD11) */
> +#define CCC_BLOCK_READ		(1<<2)	/* (2) Block read commands */
> +					/* (CMD16,17,18) */
> +#define CCC_STREAM_WRITE	(1<<3)	/* (3) Stream write commands */
> +					/* (CMD20) */
> +#define CCC_BLOCK_WRITE		(1<<4)	/* (4) Block write commands */
> +					/* (CMD16,24,25,26,27) */
> +#define CCC_ERASE		(1<<5)	/* (5) Ability to erase blocks */
> +					/* (CMD32,33,34,35,36,37,38,39) */
> +#define CCC_WRITE_PROT		(1<<6)	/* (6) Able to write protect blocks */
> +					/* (CMD28,29,30) */
> +#define CCC_LOCK_CARD		(1<<7)	/* (7) Able to lock down card */
> +					/* (CMD16,CMD42) */
> +#define CCC_APP_SPEC		(1<<8)	/* (8) Application specific */
> +					/* (CMD55,56,57,ACMD*) */
> +#define CCC_IO_MODE		(1<<9)	/* (9) I/O mode */
> +					/* (CMD5,39,40,52,53) */
> +#define CCC_SWITCH		(1<<10)	/* (10) High speed switch */
> +					/* (CMD6,34,35,36,37,50) */
> +					/* (11) Reserved */
> +					/* (CMD?) */
> +

Why not use BIT(xx)? Maybe this is copy paste from Linux and you want to 
keep it easy to synchronize?

-- 

Yann









  reply	other threads:[~2024-07-30  9:26 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-30  7:19 [PATCH 00/10] mmc: add SD/eMMC erase support Ahmad Fatoum
2024-07-30  7:19 ` [PATCH 01/10] fs: give erase() a new erase_type parameter Ahmad Fatoum
2024-07-30  8:31   ` Sascha Hauer
2024-07-30  8:32     ` Ahmad Fatoum
2024-07-30  7:19 ` [PATCH 02/10] block: factor out chunk_flush helper Ahmad Fatoum
2024-07-30  7:19 ` [PATCH 03/10] block: allow block devices to implement the cdev erase operation Ahmad Fatoum
2024-07-30  8:55   ` Sascha Hauer
2024-07-30 11:10     ` Ahmad Fatoum
2024-07-30 11:21       ` Sascha Hauer
2024-07-30  7:19 ` [PATCH 04/10] mci: turn bool members into bitfield in struct mci Ahmad Fatoum
2024-07-30  9:06   ` Sascha Hauer
2024-07-30 11:10     ` Ahmad Fatoum
2024-07-30  7:19 ` [PATCH 05/10] mci: describe more command structure in mci.h Ahmad Fatoum
2024-07-30  9:25   ` Yann Sionneau [this message]
2024-07-30 11:07     ` Ahmad Fatoum
2024-07-30  7:19 ` [PATCH 06/10] mci: core: use CONFIG_MCI_WRITE, not CONFIG_BLOCK_WRITE Ahmad Fatoum
2024-07-30  9:18   ` Sascha Hauer
2024-07-30 11:08     ` Ahmad Fatoum
2024-07-31  7:19       ` Ahmad Fatoum
2024-07-30  7:19 ` [PATCH 07/10] mci: add support for discarding write blocks Ahmad Fatoum
2024-07-30  9:23   ` Yann Sionneau
2024-07-30 11:14     ` Ahmad Fatoum
2024-07-30 10:05   ` Sascha Hauer
2024-07-30 11:17     ` Ahmad Fatoum
2024-07-30  7:19 ` [PATCH 08/10] commands: sync: add new command to flush cached writes Ahmad Fatoum
2024-07-30 10:08   ` Sascha Hauer
2024-07-30  7:19 ` [PATCH 09/10] mci: core: remove reference to SD Card from common mci_card_probe Ahmad Fatoum
2024-07-30 10:09   ` Sascha Hauer
2024-07-30  7:19 ` [PATCH 10/10] commands: blkstats: add command to print block device statistics Ahmad Fatoum

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=4d94da30-d6f4-4a3a-93a9-4ef3a0cdcb32@kalrayinc.com \
    --to=ysionneau@kalrayinc.com \
    --cc=barebox@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox