Deleted Added
full compact
mmcreg.h (256281) mmcreg.h (312400)
1/*-
2 * Copyright (c) 2006 M. Warner Losh. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.

--- 34 unchanged lines hidden (view full) ---

43 * right of the SD Group, SD-3C LLC, the SD Card Association or any third
44 * parties, which may result from its use. No license is granted by
45 * implication, estoppel or otherwise under any patent or other rights of the
46 * SD Group, SD-3C LLC, the SD Card Association or any third party. Nothing
47 * herein shall be construed as an obligation by the SD Group, the SD-3C LLC
48 * or the SD Card Association to disclose or distribute any technical
49 * information, know-how or other confidential information to any third party.
50 *
1/*-
2 * Copyright (c) 2006 M. Warner Losh. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.

--- 34 unchanged lines hidden (view full) ---

43 * right of the SD Group, SD-3C LLC, the SD Card Association or any third
44 * parties, which may result from its use. No license is granted by
45 * implication, estoppel or otherwise under any patent or other rights of the
46 * SD Group, SD-3C LLC, the SD Card Association or any third party. Nothing
47 * herein shall be construed as an obligation by the SD Group, the SD-3C LLC
48 * or the SD Card Association to disclose or distribute any technical
49 * information, know-how or other confidential information to any third party.
50 *
51 * $FreeBSD: stable/10/sys/dev/mmc/mmcreg.h 245755 2013-01-21 23:24:16Z gonzo $
51 * $FreeBSD: stable/10/sys/dev/mmc/mmcreg.h 312400 2017-01-18 23:26:10Z marius $
52 */
53
54#ifndef DEV_MMC_MMCREG_H
55#define DEV_MMC_MMCREG_H
56
57/*
58 * This file contains the register definitions for the mmc and sd busses.
59 * They are taken from publicly available sources.

--- 20 unchanged lines hidden (view full) ---

80#define MMC_CMD_MASK (3ul << 5)
81
82/* Possible response types defined in the standard: */
83#define MMC_RSP_NONE (0)
84#define MMC_RSP_R1 (MMC_RSP_PRESENT | MMC_RSP_CRC | MMC_RSP_OPCODE)
85#define MMC_RSP_R1B (MMC_RSP_PRESENT | MMC_RSP_CRC | MMC_RSP_OPCODE | MMC_RSP_BUSY)
86#define MMC_RSP_R2 (MMC_RSP_PRESENT | MMC_RSP_136 | MMC_RSP_CRC)
87#define MMC_RSP_R3 (MMC_RSP_PRESENT)
52 */
53
54#ifndef DEV_MMC_MMCREG_H
55#define DEV_MMC_MMCREG_H
56
57/*
58 * This file contains the register definitions for the mmc and sd busses.
59 * They are taken from publicly available sources.

--- 20 unchanged lines hidden (view full) ---

80#define MMC_CMD_MASK (3ul << 5)
81
82/* Possible response types defined in the standard: */
83#define MMC_RSP_NONE (0)
84#define MMC_RSP_R1 (MMC_RSP_PRESENT | MMC_RSP_CRC | MMC_RSP_OPCODE)
85#define MMC_RSP_R1B (MMC_RSP_PRESENT | MMC_RSP_CRC | MMC_RSP_OPCODE | MMC_RSP_BUSY)
86#define MMC_RSP_R2 (MMC_RSP_PRESENT | MMC_RSP_136 | MMC_RSP_CRC)
87#define MMC_RSP_R3 (MMC_RSP_PRESENT)
88#define MMC_RSP_R6 (MMC_RSP_PRESENT | MMC_RSP_CRC)
89#define MMC_RSP_R7 (MMC_RSP_PRESENT | MMC_RSP_CRC)
88#define MMC_RSP_R4 (MMC_RSP_PRESENT)
89#define MMC_RSP_R5 (MMC_RSP_PRESENT | MMC_RSP_CRC | MMC_RSP_OPCODE)
90#define MMC_RSP_R5B (MMC_RSP_PRESENT | MMC_RSP_CRC | MMC_RSP_OPCODE | MMC_RSP_BUSY)
91#define MMC_RSP_R6 (MMC_RSP_PRESENT | MMC_RSP_CRC | MMC_RSP_OPCODE)
92#define MMC_RSP_R7 (MMC_RSP_PRESENT | MMC_RSP_CRC | MMC_RSP_OPCODE)
90#define MMC_RSP(x) ((x) & MMC_RSP_MASK)
91 uint32_t retries;
92 uint32_t error;
93#define MMC_ERR_NONE 0
94#define MMC_ERR_TIMEOUT 1
95#define MMC_ERR_BADCRC 2
96#define MMC_ERR_FIFO 3
97#define MMC_ERR_FAILED 4

--- 249 unchanged lines hidden (view full) ---

347 * cards. MMC 4.0 says that a dual voltage card responds with 0xfff8080.
348 * Looks like the fine-grained control of the voltage tolerance ranges
349 * was abandoned.
350 *
351 * The MMC_OCR_CCS appears to be valid for only SD cards.
352 */
353#define MMC_OCR_VOLTAGE 0x3fffffffU /* Vdd Voltage mask */
354#define MMC_OCR_LOW_VOLTAGE (1u << 7) /* Low Voltage Range -- tbd */
93#define MMC_RSP(x) ((x) & MMC_RSP_MASK)
94 uint32_t retries;
95 uint32_t error;
96#define MMC_ERR_NONE 0
97#define MMC_ERR_TIMEOUT 1
98#define MMC_ERR_BADCRC 2
99#define MMC_ERR_FIFO 3
100#define MMC_ERR_FAILED 4

--- 249 unchanged lines hidden (view full) ---

350 * cards. MMC 4.0 says that a dual voltage card responds with 0xfff8080.
351 * Looks like the fine-grained control of the voltage tolerance ranges
352 * was abandoned.
353 *
354 * The MMC_OCR_CCS appears to be valid for only SD cards.
355 */
356#define MMC_OCR_VOLTAGE 0x3fffffffU /* Vdd Voltage mask */
357#define MMC_OCR_LOW_VOLTAGE (1u << 7) /* Low Voltage Range -- tbd */
358#define MMC_OCR_MIN_VOLTAGE_SHIFT 7
355#define MMC_OCR_200_210 (1U << 8) /* Vdd voltage 2.00 ~ 2.10 */
359#define MMC_OCR_200_210 (1U << 8) /* Vdd voltage 2.00 ~ 2.10 */
356#define MMC_OCR_MIN_VOLTAGE_SHIFT 8
357#define MMC_OCR_210_220 (1U << 9) /* Vdd voltage 2.10 ~ 2.20 */
358#define MMC_OCR_220_230 (1U << 10) /* Vdd voltage 2.20 ~ 2.30 */
359#define MMC_OCR_230_240 (1U << 11) /* Vdd voltage 2.30 ~ 2.40 */
360#define MMC_OCR_240_250 (1U << 12) /* Vdd voltage 2.40 ~ 2.50 */
361#define MMC_OCR_250_260 (1U << 13) /* Vdd voltage 2.50 ~ 2.60 */
362#define MMC_OCR_260_270 (1U << 14) /* Vdd voltage 2.60 ~ 2.70 */
363#define MMC_OCR_270_280 (1U << 15) /* Vdd voltage 2.70 ~ 2.80 */
364#define MMC_OCR_280_290 (1U << 16) /* Vdd voltage 2.80 ~ 2.90 */

--- 81 unchanged lines hidden ---
360#define MMC_OCR_210_220 (1U << 9) /* Vdd voltage 2.10 ~ 2.20 */
361#define MMC_OCR_220_230 (1U << 10) /* Vdd voltage 2.20 ~ 2.30 */
362#define MMC_OCR_230_240 (1U << 11) /* Vdd voltage 2.30 ~ 2.40 */
363#define MMC_OCR_240_250 (1U << 12) /* Vdd voltage 2.40 ~ 2.50 */
364#define MMC_OCR_250_260 (1U << 13) /* Vdd voltage 2.50 ~ 2.60 */
365#define MMC_OCR_260_270 (1U << 14) /* Vdd voltage 2.60 ~ 2.70 */
366#define MMC_OCR_270_280 (1U << 15) /* Vdd voltage 2.70 ~ 2.80 */
367#define MMC_OCR_280_290 (1U << 16) /* Vdd voltage 2.80 ~ 2.90 */

--- 81 unchanged lines hidden ---