All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] sd: Exhibit support for CMD23
@ 2020-09-16 17:51 Sai Pavan Boddu
  2020-10-05  8:03 ` Philippe Mathieu-Daudé
  0 siblings, 1 reply; 2+ messages in thread
From: Sai Pavan Boddu @ 2020-09-16 17:51 UTC (permalink / raw)
  To: 'Philippe Mathieu-Daudé',
	Alistair Francis, Peter Maydell, Markus Armbruster,
	Stefano Garzarella
  Cc: sai.pavan.boddu, Rahul Thati, qemu-devel, qemu-block

Update 'SCR.CMD_SUPPORT' register with support of CMD23.

Signed-off-by: Sai Pavan Boddu <sai.pavan.boddu@xilinx.com>
Reported-by: Rahul Thati <rthati@xilinx.com>
---
Changes for V2:
	Fix commit message

 hw/sd/sd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/sd/sd.c b/hw/sd/sd.c
index 0012882..16d1b61 100644
--- a/hw/sd/sd.c
+++ b/hw/sd/sd.c
@@ -335,7 +335,7 @@ static void sd_set_scr(SDState *sd)
     if (sd->spec_version >= SD_PHY_SPECv3_01_VERS) {
         sd->scr[2] |= 1 << 7;   /* Spec Version 3.0X */
     }
-    sd->scr[3] = 0x00;
+    sd->scr[3] = 0x2;           /* CMD23 supported */
     /* reserved for manufacturer usage */
     sd->scr[4] = 0x00;
     sd->scr[5] = 0x00;
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] sd: Exhibit support for CMD23
  2020-09-16 17:51 [PATCH v2] sd: Exhibit support for CMD23 Sai Pavan Boddu
@ 2020-10-05  8:03 ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 2+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-10-05  8:03 UTC (permalink / raw)
  To: Sai Pavan Boddu, Alistair Francis, Peter Maydell,
	Markus Armbruster, Stefano Garzarella, Rahul Thati
  Cc: qemu-devel, qemu-block

Hi Sai,

On 9/16/20 7:51 PM, Sai Pavan Boddu wrote:
> Update 'SCR.CMD_SUPPORT' register with support of CMD23.
> 
> Signed-off-by: Sai Pavan Boddu <sai.pavan.boddu@xilinx.com>
> Reported-by: Rahul Thati <rthati@xilinx.com>
> ---
> Changes for V2:
> 	Fix commit message
> 
>  hw/sd/sd.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/sd/sd.c b/hw/sd/sd.c
> index 0012882..16d1b61 100644
> --- a/hw/sd/sd.c
> +++ b/hw/sd/sd.c
> @@ -335,7 +335,7 @@ static void sd_set_scr(SDState *sd)
>      if (sd->spec_version >= SD_PHY_SPECv3_01_VERS) {
>          sd->scr[2] |= 1 << 7;   /* Spec Version 3.0X */
>      }
> -    sd->scr[3] = 0x00;
> +    sd->scr[3] = 0x2;           /* CMD23 supported */

You need to check:
- spec_version >= SD_PHY_SPECv3_01_VERS
- sd->size > SDSC_MAX_CAPACITY

Then you should also update the TRAN_SPEED value in sd_set_csd().

>      /* reserved for manufacturer usage */
>      sd->scr[4] = 0x00;
>      sd->scr[5] = 0x00;
> 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-10-05  8:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-16 17:51 [PATCH v2] sd: Exhibit support for CMD23 Sai Pavan Boddu
2020-10-05  8:03 ` Philippe Mathieu-Daudé

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.