/*
* BRIEF MODULE DESCRIPTION
* Defines for using the MMC / SD controllers on the
* Alchemy Au1100 mips processor .
*
* Copyright ( c ) 2003 Embedded Edge , LLC .
* Author : Embedded Edge , LLC .
* dan @ embeddededge . com or tim @ embeddededge . com
*
* This program is free software ; you can redistribute it and / or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation ; either version 2 of the License , or ( at your
* option ) any later version .
*
* THIS SOFTWARE IS PROVIDED ` ` AS IS ' ' AND ANY EXPRESS OR IMPLIED
* WARRANTIES , INCLUDING , BUT NOT LIMITED TO , THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED . IN
* NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT , INDIRECT ,
* INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT
* NOT LIMITED TO , PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES ; LOSS OF
* USE , DATA , OR PROFITS ; OR BUSINESS INTERRUPTION ) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT
* ( INCLUDING NEGLIGENCE OR OTHERWISE ) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE , EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE .
*
* You should have received a copy of the GNU General Public License along
* with this program ; if not , write to the Free Software Foundation , Inc . ,
* 675 Mass Ave , Cambridge , MA 02139 , USA .
*
*/
/*
* AU1100 MMC / SD definitions .
*
* From " AMD Alchemy Solutions Au1100 Processor Data Book - Preliminary "
* June , 2003
*/
#ifndef __ASM_AU1100_MMC_H
#define __ASM_AU1100_MMC_H
#include <linux/leds.h>
struct au1xmmc_platform_data {
int (*cd_setup)(void *mmc_host, int on);
int (*card_inserted)(void *mmc_host);
int (*card_readonly)(void *mmc_host);
void (*set_power)(void *mmc_host, int state);
struct led_classdev *led;
unsigned long mask_host_caps;
};
#define SD0_BASE 0 xB0600000
#define SD1_BASE 0 xB0680000
/*
* Register offsets .
*/
#define SD_TXPORT (0 x0000)
#define SD_RXPORT (0 x0004)
#define SD_CONFIG (0 x0008)
#define SD_ENABLE (0 x000C)
#define SD_CONFIG2 (0 x0010)
#define SD_BLKSIZE (0 x0014)
#define SD_STATUS (0 x0018)
#define SD_DEBUG (0 x001C)
#define SD_CMD (0 x0020)
#define SD_CMDARG (0 x0024)
#define SD_RESP3 (0 x0028)
#define SD_RESP2 (0 x002C)
#define SD_RESP1 (0 x0030)
#define SD_RESP0 (0 x0034)
#define SD_TIMEOUT (0 x0038)
/*
* SD_TXPORT bit definitions .
*/
#define SD_TXPORT_TXD (0 x000000ff)
/*
* SD_RXPORT bit definitions .
*/
#define SD_RXPORT_RXD (0 x000000ff)
/*
* SD_CONFIG bit definitions .
*/
#define SD_CONFIG_DIV (0 x000001ff)
#define SD_CONFIG_DE (0 x00000200)
#define SD_CONFIG_NE (0 x00000400)
#define SD_CONFIG_TU (0 x00000800)
#define SD_CONFIG_TO (0 x00001000)
#define SD_CONFIG_RU (0 x00002000)
#define SD_CONFIG_RO (0 x00004000)
#define SD_CONFIG_I (0 x00008000)
#define SD_CONFIG_CR (0 x00010000)
#define SD_CONFIG_RAT (0 x00020000)
#define SD_CONFIG_DD (0 x00040000)
#define SD_CONFIG_DT (0 x00080000)
#define SD_CONFIG_SC (0 x00100000)
#define SD_CONFIG_RC (0 x00200000)
#define SD_CONFIG_WC (0 x00400000)
#define SD_CONFIG_xxx (0 x00800000)
#define SD_CONFIG_TH (0 x01000000)
#define SD_CONFIG_TE (0 x02000000)
#define SD_CONFIG_TA (0 x04000000)
#define SD_CONFIG_RH (0 x08000000)
#define SD_CONFIG_RA (0 x10000000)
#define SD_CONFIG_RF (0 x20000000)
#define SD_CONFIG_CD (0 x40000000)
#define SD_CONFIG_SI (0 x80000000)
/*
* SD_ENABLE bit definitions .
*/
#define SD_ENABLE_CE (0 x00000001)
#define SD_ENABLE_R (0 x00000002)
/*
* SD_CONFIG2 bit definitions .
*/
#define SD_CONFIG2_EN (0 x00000001)
#define SD_CONFIG2_FF (0 x00000002)
#define SD_CONFIG2_xx1 (0 x00000004)
#define SD_CONFIG2_DF (0 x00000008)
#define SD_CONFIG2_DC (0 x00000010)
#define SD_CONFIG2_xx2 (0 x000000e0)
#define SD_CONFIG2_BB (0 x00000080)
#define SD_CONFIG2_WB (0 x00000100)
#define SD_CONFIG2_RW (0 x00000200)
#define SD_CONFIG2_DP (0 x00000400)
/*
* SD_BLKSIZE bit definitions .
*/
#define SD_BLKSIZE_BS (0 x000007ff)
#define SD_BLKSIZE_BS_SHIFT (0 )
#define SD_BLKSIZE_BC (0 x01ff0000)
#define SD_BLKSIZE_BC_SHIFT (16 )
/*
* SD_STATUS bit definitions .
*/
#define SD_STATUS_DCRCW (0 x00000007)
#define SD_STATUS_xx1 (0 x00000008)
#define SD_STATUS_CB (0 x00000010)
#define SD_STATUS_DB (0 x00000020)
#define SD_STATUS_CF (0 x00000040)
#define SD_STATUS_D3 (0 x00000080)
#define SD_STATUS_xx2 (0 x00000300)
#define SD_STATUS_NE (0 x00000400)
#define SD_STATUS_TU (0 x00000800)
#define SD_STATUS_TO (0 x00001000)
#define SD_STATUS_RU (0 x00002000)
#define SD_STATUS_RO (0 x00004000)
#define SD_STATUS_I (0 x00008000)
#define SD_STATUS_CR (0 x00010000)
#define SD_STATUS_RAT (0 x00020000)
#define SD_STATUS_DD (0 x00040000)
#define SD_STATUS_DT (0 x00080000)
#define SD_STATUS_SC (0 x00100000)
#define SD_STATUS_RC (0 x00200000)
#define SD_STATUS_WC (0 x00400000)
#define SD_STATUS_xx3 (0 x00800000)
#define SD_STATUS_TH (0 x01000000)
#define SD_STATUS_TE (0 x02000000)
#define SD_STATUS_TA (0 x04000000)
#define SD_STATUS_RH (0 x08000000)
#define SD_STATUS_RA (0 x10000000)
#define SD_STATUS_RF (0 x20000000)
#define SD_STATUS_CD (0 x40000000)
#define SD_STATUS_SI (0 x80000000)
/*
* SD_CMD bit definitions .
*/
#define SD_CMD_GO (0 x00000001)
#define SD_CMD_RY (0 x00000002)
#define SD_CMD_xx1 (0 x0000000c)
#define SD_CMD_CT_MASK (0 x000000f0)
#define SD_CMD_CT_0 (0 x00000000)
#define SD_CMD_CT_1 (0 x00000010)
#define SD_CMD_CT_2 (0 x00000020)
#define SD_CMD_CT_3 (0 x00000030)
#define SD_CMD_CT_4 (0 x00000040)
#define SD_CMD_CT_5 (0 x00000050)
#define SD_CMD_CT_6 (0 x00000060)
#define SD_CMD_CT_7 (0 x00000070)
#define SD_CMD_CI (0 x0000ff00)
#define SD_CMD_CI_SHIFT (8 )
#define SD_CMD_RT_MASK (0 x00ff0000)
#define SD_CMD_RT_0 (0 x00000000)
#define SD_CMD_RT_1 (0 x00010000)
#define SD_CMD_RT_2 (0 x00020000)
#define SD_CMD_RT_3 (0 x00030000)
#define SD_CMD_RT_4 (0 x00040000)
#define SD_CMD_RT_5 (0 x00050000)
#define SD_CMD_RT_6 (0 x00060000)
#define SD_CMD_RT_1B (0 x00810000)
#endif /* __ASM_AU1100_MMC_H */
Messung V0.5 in Prozent C=95 H=100 G=97
¤ Dauer der Verarbeitung: 0.1 Sekunden
(vorverarbeitet am 2026-10-02)
¤
*© Formatika GbR, Deutschland