git: 9294c98c5c7a - stable/13 - sdio: Add CCCR speed defines

From: Emmanuel Vadot <manu_at_FreeBSD.org>
Date: Thu, 02 Feb 2023 06:57:16 UTC
The branch stable/13 has been updated by manu:

URL: https://cgit.FreeBSD.org/src/commit/?id=9294c98c5c7a97d1550b20c19725cf61a4093f74

commit 9294c98c5c7a97d1550b20c19725cf61a4093f74
Author:     Emmanuel Vadot <manu@FreeBSD.org>
AuthorDate: 2021-07-14 15:25:36 +0000
Commit:     Emmanuel Vadot <manu@FreeBSD.org>
CommitDate: 2023-02-02 06:47:34 +0000

    sdio: Add CCCR speed defines
    
    Those are the defines needed to change speed on a SDIO card.
    
    (cherry picked from commit 348164aa9e5d862b65c8436861a3eb2b33bcb16e)
---
 sys/dev/mmc/mmcreg.h | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/sys/dev/mmc/mmcreg.h b/sys/dev/mmc/mmcreg.h
index 8fc6ba06ff87..97ddb6dbeeb6 100644
--- a/sys/dev/mmc/mmcreg.h
+++ b/sys/dev/mmc/mmcreg.h
@@ -568,9 +568,21 @@ struct mmc_request {
 #define	 CCCR_BUS_WIDTH_4		(1 << 1)
 #define	 CCCR_BUS_WIDTH_1		(1 << 0)
 #define	SD_IO_CCCR_CARDCAP		0x08	/* SDIO card capabilities */
-#define  CCCR_CC_SMB                    (1 << 1) /* CMD53 block mode support */
+#define	 CCCR_CC_SMB			(1 << 1) /* CMD53 block mode support */
+#define	 CCCR_CC_LSC			(1 << 6)
+
 #define	SD_IO_CCCR_CISPTR		0x09    /* 0x09 - 0x0B */
 #define SD_IO_CCCR_FN0_BLKSZ            0x10    /* 0x10 - 0x11 */
+#define	SD_IO_CCCR_SPEED		0x13
+#define	 CCCR_SPEED_SHS			(1 << 0)
+#define	 CCCR_SPEED_BSS_MASK		(0x7 << 1)
+#define	 CCCR_SPEED_EHS			(1 << 1)
+#define	 CCCR_SPEED_SDR12		(0 << 1)
+#define	 CCCR_SPEED_SDR25		(1 << 1)
+#define	 CCCR_SPEED_SDR50		(2 << 1)
+#define	 CCCR_SPEED_SDR104		(3 << 1)
+#define	 CCCR_SPEED_DDR50		(4 << 1)
+
 /* Function Basic Registers (FBR) */
 #define	SD_IO_FBR_START			0x00100 /* Offset in F0 address space */
 #define	SD_IO_FBR_SIZE			0x00700 /* Total size of FBR */