diff mbox series

[RFC,09/15] sd: emmc: Add support for emmc erase

Message ID 1613031446-22154-10-git-send-email-sai.pavan.boddu@xilinx.com (mailing list archive)
State New, archived
Headers show
Series eMMC support | expand

Commit Message

Sai Pavan Boddu Feb. 11, 2021, 8:17 a.m. UTC
Add CMD35 and CMD36 which sets the erase start and end.

Signed-off-by: Sai Pavan Boddu <sai.pavan.boddu@xilinx.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
---
 hw/sd/sd.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Alistair Francis Feb. 12, 2021, 10:08 p.m. UTC | #1
On Thu, Feb 11, 2021 at 12:19 AM Sai Pavan Boddu
<sai.pavan.boddu@xilinx.com> wrote:
>
> Add CMD35 and CMD36 which sets the erase start and end.
>
> Signed-off-by: Sai Pavan Boddu <sai.pavan.boddu@xilinx.com>
> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
> ---
>  hw/sd/sd.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/hw/sd/sd.c b/hw/sd/sd.c
> index 236f2b8..7aab647 100644
> --- a/hw/sd/sd.c
> +++ b/hw/sd/sd.c
> @@ -1544,6 +1544,7 @@ static sd_rsp_type_t sd_normal_command(SDState *sd, SDRequest req)
>
>      /* Erase commands (Class 5) */
>      case 32:   /* CMD32:  ERASE_WR_BLK_START */
> +    case 35:

Can you comment the CMD here?

>          switch (sd->state) {
>          case sd_transfer_state:
>              sd->erase_start = req.arg;
> @@ -1555,6 +1556,7 @@ static sd_rsp_type_t sd_normal_command(SDState *sd, SDRequest req)
>          break;
>
>      case 33:   /* CMD33:  ERASE_WR_BLK_END */
> +    case 36:

and here?

Alistair

>          switch (sd->state) {
>          case sd_transfer_state:
>              sd->erase_end = req.arg;
> --
> 2.7.4
>
>
Sai Pavan Boddu Feb. 16, 2021, 10:03 a.m. UTC | #2
Hi Alistair,
> -----Original Message-----
> From: Alistair Francis <alistair23@gmail.com>
> Sent: Saturday, February 13, 2021 3:38 AM
> To: Sai Pavan Boddu <saipava@xilinx.com>
> Cc: Markus Armbruster <armbru@redhat.com>; Kevin Wolf
> <kwolf@redhat.com>; Max Reitz <mreitz@redhat.com>; Vladimir Sementsov-
> Ogievskiy <vsementsov@virtuozzo.com>; Eric Blake <eblake@redhat.com>;
> Joel Stanley <joel@jms.id.au>; Cédric Le Goater <clg@kaod.org>; Vincent
> Palatin <vpalatin@chromium.org>; Dr. David Alan Gilbert
> <dgilbert@redhat.com>; Thomas Huth <thuth@redhat.com>; Stefan Hajnoczi
> <stefanha@redhat.com>; Peter Maydell <peter.maydell@linaro.org>; Alistair
> Francis <alistair.francis@wdc.com>; Edgar Iglesias <edgari@xilinx.com>; Luc
> Michel <luc.michel@greensocs.com>; Paolo Bonzini <pbonzini@redhat.com>;
> Sai Pavan Boddu <saipava@xilinx.com>; qemu-devel@nongnu.org Developers
> <qemu-devel@nongnu.org>; Qemu-block <qemu-block@nongnu.org>
> Subject: Re: [RFC PATCH 09/15] sd: emmc: Add support for emmc erase
> 
> On Thu, Feb 11, 2021 at 12:19 AM Sai Pavan Boddu
> <sai.pavan.boddu@xilinx.com> wrote:
> >
> > Add CMD35 and CMD36 which sets the erase start and end.
> >
> > Signed-off-by: Sai Pavan Boddu <sai.pavan.boddu@xilinx.com>
> > Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
> > ---
> >  hw/sd/sd.c | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/hw/sd/sd.c b/hw/sd/sd.c
> > index 236f2b8..7aab647 100644
> > --- a/hw/sd/sd.c
> > +++ b/hw/sd/sd.c
> > @@ -1544,6 +1544,7 @@ static sd_rsp_type_t sd_normal_command(SDState
> > *sd, SDRequest req)
> >
> >      /* Erase commands (Class 5) */
> >      case 32:   /* CMD32:  ERASE_WR_BLK_START */
> > +    case 35:
> 
> Can you comment the CMD here?
[Sai Pavan Boddu] Sure I will update this.

Regards,
Sai Pavan
> 
> >          switch (sd->state) {
> >          case sd_transfer_state:
> >              sd->erase_start = req.arg; @@ -1555,6 +1556,7 @@ static
> > sd_rsp_type_t sd_normal_command(SDState *sd, SDRequest req)
> >          break;
> >
> >      case 33:   /* CMD33:  ERASE_WR_BLK_END */
> > +    case 36:
> 
> and here?
> 
> Alistair
> 
> >          switch (sd->state) {
> >          case sd_transfer_state:
> >              sd->erase_end = req.arg;
> > --
> > 2.7.4
> >
> >
diff mbox series

Patch

diff --git a/hw/sd/sd.c b/hw/sd/sd.c
index 236f2b8..7aab647 100644
--- a/hw/sd/sd.c
+++ b/hw/sd/sd.c
@@ -1544,6 +1544,7 @@  static sd_rsp_type_t sd_normal_command(SDState *sd, SDRequest req)
 
     /* Erase commands (Class 5) */
     case 32:	/* CMD32:  ERASE_WR_BLK_START */
+    case 35:
         switch (sd->state) {
         case sd_transfer_state:
             sd->erase_start = req.arg;
@@ -1555,6 +1556,7 @@  static sd_rsp_type_t sd_normal_command(SDState *sd, SDRequest req)
         break;
 
     case 33:	/* CMD33:  ERASE_WR_BLK_END */
+    case 36:
         switch (sd->state) {
         case sd_transfer_state:
             sd->erase_end = req.arg;