From 6f9a7eb2c7d6f81e54b47c917be79f5126ba8982 Mon Sep 17 00:00:00 2001 From: Jens Arnold Date: Wed, 6 Oct 2004 20:43:12 +0000 Subject: Enhanced MMC handling: Driver cleanup, timeout calculation fixed, allowed voltage check, maintain disk activity info (fixes immediate shutdown at end of playback). MMC debug menu item populated. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5193 a1c6a512-1295-4272-9138-f99709370657 --- firmware/export/ata_mmc.h | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 firmware/export/ata_mmc.h (limited to 'firmware/export/ata_mmc.h') diff --git a/firmware/export/ata_mmc.h b/firmware/export/ata_mmc.h new file mode 100644 index 0000000000..afc0dc24af --- /dev/null +++ b/firmware/export/ata_mmc.h @@ -0,0 +1,42 @@ +/*************************************************************************** + * __________ __ ___. + * 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; + unsigned int read_timeout; /* n * 8 clock cycles */ + unsigned int write_timeout; /* n * 8 clock cycles */ + + unsigned long ocr; /* OCR register */ + unsigned long csd[4]; /* CSD register, 16 bytes */ + unsigned long cid[4]; /* CID register, 16 bytes */ + unsigned int speed; /* bit/s */ + unsigned int nsac; /* clock cycles */ + unsigned int tsac; /* n * 0.1 ns */ + unsigned int r2w_factor; +} tCardInfo; + +unsigned long mmc_extract_bits(const unsigned long *p, unsigned int start, + unsigned int size); +tCardInfo *mmc_card_info(int card_no); + +#endif -- cgit v1.2.3