From a0557b23f0c984576fd5a72657593211df148ca4 Mon Sep 17 00:00:00 2001 From: Frank Gevaerts Date: Sat, 5 Jun 2010 21:12:16 +0000 Subject: remane hotswap.* to sdmmc.*. The contents have nothing at all to do with hotswapping things git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26598 a1c6a512-1295-4272-9138-f99709370657 --- firmware/export/hotswap.h | 80 ----------------------------------------------- firmware/export/sdmmc.h | 80 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 80 insertions(+), 80 deletions(-) delete mode 100644 firmware/export/hotswap.h create mode 100644 firmware/export/sdmmc.h (limited to 'firmware/export') diff --git a/firmware/export/hotswap.h b/firmware/export/hotswap.h deleted file mode 100644 index 643048976b..0000000000 --- a/firmware/export/hotswap.h +++ /dev/null @@ -1,80 +0,0 @@ -/*************************************************************************** - * __________ __ ___. - * Open \______ \ ____ ____ | | _\_ |__ _______ ___ - * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / - * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < - * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ - * \/ \/ \/ \/ \/ - * $Id$ - * - * Copyright (C) 2004 by Jens Arnold - * - * 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 distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ****************************************************************************/ -#ifndef __HOTSWAP_H__ -#define __HOTSWAP_H__ - -#include - -typedef struct -{ - bool initialized; - - unsigned long read_timeout; /* n * 8 clock cycles */ - unsigned long 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 long speed; /* bit/s */ - unsigned int nsac; /* clock cycles */ - unsigned long taac; /* n * 0.1 ns */ - unsigned int r2w_factor; - unsigned long numblocks; /* size in flash blocks */ - unsigned int blocksize; /* block size in bytes */ - -#if (CONFIG_STORAGE & STORAGE_MMC) - unsigned char bitrate_register; -#endif - -#if (CONFIG_STORAGE & STORAGE_SD) - unsigned long rca; /* RCA register */ - unsigned int current_bank; -#endif -} tCardInfo; - -#if (CONFIG_STORAGE & STORAGE_SD) - -#include "sd.h" -#define card_get_info card_get_info_target -tCardInfo *card_get_info_target(int card_no); -void sd_parse_csd(tCardInfo *card); - -#ifdef HAVE_HOTSWAP -#define card_enable_monitoring card_enable_monitoring_target -#endif - -#else /* STORAGE_MMC */ - -#include "ata_mmc.h" -#define card_get_info mmc_card_info -tCardInfo *mmc_card_info(int card_no); -#define card_touched mmc_touched -#define card_enable_monitoring mmc_enable_monitoring - -#endif - -/* helper function to extract n (<=32) bits from an arbitrary position. - counting from MSB to LSB */ -unsigned long card_extract_bits( - const unsigned long *p, /* the start of the bitfield array */ - unsigned int start, /* bit no. to start reading */ - unsigned int size); /* how many bits to read */ -#endif diff --git a/firmware/export/sdmmc.h b/firmware/export/sdmmc.h new file mode 100644 index 0000000000..6ac3bd2af5 --- /dev/null +++ b/firmware/export/sdmmc.h @@ -0,0 +1,80 @@ +/*************************************************************************** + * __________ __ ___. + * Open \______ \ ____ ____ | | _\_ |__ _______ ___ + * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / + * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < + * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ + * \/ \/ \/ \/ \/ + * $Id$ + * + * Copyright (C) 2004 by Jens Arnold + * + * 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 distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ****************************************************************************/ +#ifndef __SDMMC_H__ +#define __SDMMC_H__ + +#include + +typedef struct +{ + bool initialized; + + unsigned long read_timeout; /* n * 8 clock cycles */ + unsigned long 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 long speed; /* bit/s */ + unsigned int nsac; /* clock cycles */ + unsigned long taac; /* n * 0.1 ns */ + unsigned int r2w_factor; + unsigned long numblocks; /* size in flash blocks */ + unsigned int blocksize; /* block size in bytes */ + +#if (CONFIG_STORAGE & STORAGE_MMC) + unsigned char bitrate_register; +#endif + +#if (CONFIG_STORAGE & STORAGE_SD) + unsigned long rca; /* RCA register */ + unsigned int current_bank; +#endif +} tCardInfo; + +#if (CONFIG_STORAGE & STORAGE_SD) + +#include "sd.h" +#define card_get_info card_get_info_target +tCardInfo *card_get_info_target(int card_no); +void sd_parse_csd(tCardInfo *card); + +#ifdef HAVE_HOTSWAP +#define card_enable_monitoring card_enable_monitoring_target +#endif + +#else /* STORAGE_MMC */ + +#include "ata_mmc.h" +#define card_get_info mmc_card_info +tCardInfo *mmc_card_info(int card_no); +#define card_touched mmc_touched +#define card_enable_monitoring mmc_enable_monitoring + +#endif + +/* helper function to extract n (<=32) bits from an arbitrary position. + counting from MSB to LSB */ +unsigned long card_extract_bits( + const unsigned long *p, /* the start of the bitfield array */ + unsigned int start, /* bit no. to start reading */ + unsigned int size); /* how many bits to read */ +#endif -- cgit v1.2.3