2004-10-06 20:43:12 +00:00
|
|
|
/***************************************************************************
|
|
|
|
* __________ __ ___.
|
|
|
|
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
|
|
|
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
|
|
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
|
|
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
|
|
|
* \/ \/ \/ \/ \/
|
|
|
|
* $Id$
|
|
|
|
*
|
|
|
|
* Copyright (C) 2004 by Jens Arnold
|
|
|
|
*
|
|
|
|
* All files in this archive are subject to the GNU General Public License.
|
|
|
|
* See the file COPYING in the source tree root for full license agreement.
|
|
|
|
*
|
|
|
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
|
|
|
* KIND, either express or implied.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
#ifndef __ATA_MMC_H__
|
|
|
|
#define __ATA_MMC_H__
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
bool initialized;
|
|
|
|
unsigned char bitrate_register;
|
2005-04-28 01:11:21 +00:00
|
|
|
unsigned long read_timeout; /* n * 8 clock cycles */
|
|
|
|
unsigned long write_timeout; /* n * 8 clock cycles */
|
2004-10-06 20:43:12 +00:00
|
|
|
|
|
|
|
unsigned long ocr; /* OCR register */
|
|
|
|
unsigned long csd[4]; /* CSD register, 16 bytes */
|
|
|
|
unsigned long cid[4]; /* CID register, 16 bytes */
|
2005-04-28 01:11:21 +00:00
|
|
|
unsigned long speed; /* bit/s */
|
2004-10-06 20:43:12 +00:00
|
|
|
unsigned int nsac; /* clock cycles */
|
2005-04-28 01:11:21 +00:00
|
|
|
unsigned long tsac; /* n * 0.1 ns */
|
2004-10-06 20:43:12 +00:00
|
|
|
unsigned int r2w_factor;
|
2005-04-28 01:11:21 +00:00
|
|
|
unsigned long size; /* size in bytes */
|
|
|
|
unsigned long numblocks; /* size in flash blocks */
|
|
|
|
unsigned int blocksize; /* block size in bytes */
|
|
|
|
unsigned int block_exp; /* block size exponent */
|
2004-10-06 20:43:12 +00:00
|
|
|
} tCardInfo;
|
|
|
|
|
2005-05-22 00:42:00 +00:00
|
|
|
void mmc_enable_int_flash_clock(bool on);
|
2004-10-10 19:51:11 +00:00
|
|
|
bool mmc_detect(void);
|
2004-10-06 20:43:12 +00:00
|
|
|
unsigned long mmc_extract_bits(const unsigned long *p, unsigned int start,
|
|
|
|
unsigned int size);
|
|
|
|
tCardInfo *mmc_card_info(int card_no);
|
2005-05-17 22:10:51 +00:00
|
|
|
bool mmc_touched(void);
|
2005-02-19 14:45:34 +00:00
|
|
|
bool mmc_usb_active(int delayticks);
|
2005-05-16 13:25:02 +00:00
|
|
|
#ifdef HAVE_HOTSWAP
|
|
|
|
void mmc_enable_monitoring(bool on);
|
|
|
|
#endif
|
2004-10-06 20:43:12 +00:00
|
|
|
|
|
|
|
#endif
|