Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/sdmmc Add support for the valid card types in eMMC v...
details: https://anonhg.NetBSD.org/src/rev/c261b29c2390
branches: trunk
changeset: 786610:c261b29c2390
user: matt <matt%NetBSD.org@localhost>
date: Fri May 03 16:38:35 2013 +0000
description:
Add support for the valid card types in eMMC v4.4 (needed by beaglebone
black).
diffstat:
sys/dev/sdmmc/sdmmc_mem.c | 9 ++++++---
sys/dev/sdmmc/sdmmcreg.h | 15 ++++++++++++---
2 files changed, 18 insertions(+), 6 deletions(-)
diffs (59 lines):
diff -r 9981542d54cf -r c261b29c2390 sys/dev/sdmmc/sdmmc_mem.c
--- a/sys/dev/sdmmc/sdmmc_mem.c Fri May 03 16:13:48 2013 +0000
+++ b/sys/dev/sdmmc/sdmmc_mem.c Fri May 03 16:38:35 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sdmmc_mem.c,v 1.28 2013/05/03 16:13:48 matt Exp $ */
+/* $NetBSD: sdmmc_mem.c,v 1.29 2013/05/03 16:38:35 matt Exp $ */
/* $OpenBSD: sdmmc_mem.c,v 1.10 2009/01/09 10:55:22 jsg Exp $ */
/*
@@ -45,7 +45,7 @@
/* Routines for SD/MMC memory cards. */
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sdmmc_mem.c,v 1.28 2013/05/03 16:13:48 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sdmmc_mem.c,v 1.29 2013/05/03 16:38:35 matt Exp $");
#ifdef _KERNEL_OPT
#include "opt_sdmmc.h"
@@ -717,7 +717,10 @@
sf->csd.tran_speed = 26000; /* 26MHz */
break;
- case EXT_CSD_CARD_TYPE_52M | EXT_CSD_CARD_TYPE_26M:
+ case EXT_CSD_CARD_TYPE_52M:
+ case EXT_CSD_CARD_TYPE_52M_V18:
+ case EXT_CSD_CARD_TYPE_52M_V12:
+ case EXT_CSD_CARD_TYPE_52M_V12_18:
sf->csd.tran_speed = 52000; /* 52MHz */
hs_timing = 1;
break;
diff -r 9981542d54cf -r c261b29c2390 sys/dev/sdmmc/sdmmcreg.h
--- a/sys/dev/sdmmc/sdmmcreg.h Fri May 03 16:13:48 2013 +0000
+++ b/sys/dev/sdmmc/sdmmcreg.h Fri May 03 16:38:35 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sdmmcreg.h,v 1.13 2012/12/15 00:03:00 jakllsch Exp $ */
+/* $NetBSD: sdmmcreg.h,v 1.14 2013/05/03 16:38:35 matt Exp $ */
/* $OpenBSD: sdmmcreg.h,v 1.4 2009/01/09 10:55:22 jsg Exp $ */
/*
@@ -132,8 +132,17 @@
#define EXT_CSD_STRUCTURE_VER_1_2 2 /* Version 4.1-4.2-4.3 */
/* EXT_CSD_CARD_TYPE */
-#define EXT_CSD_CARD_TYPE_26M (1 << 0)
-#define EXT_CSD_CARD_TYPE_52M (1 << 1)
+/* The only currently valid values for this field are 0x01, 0x03, 0x07,
+ * 0x0B and 0x0F. */
+#define EXT_CSD_CARD_TYPE_F_26M (1 << 0)
+#define EXT_CSD_CARD_TYPE_F_52M (1 << 1)
+#define EXT_CSD_CARD_TYPE_F_52M_1_8V (1 << 2)
+#define EXT_CSD_CARD_TYPE_F_52M_1_2V (1 << 3)
+#define EXT_CSD_CARD_TYPE_26M 0x01
+#define EXT_CSD_CARD_TYPE_52M 0x03
+#define EXT_CSD_CARD_TYPE_52M_V18 0x07
+#define EXT_CSD_CARD_TYPE_52M_V12 0x0b
+#define EXT_CSD_CARD_TYPE_52M_V12_18 0x0f
/* MMC_SWITCH access mode */
#define MMC_SWITCH_MODE_CMD_SET 0x00 /* Change the command set */
Home |
Main Index |
Thread Index |
Old Index