Don't set CONFIG_CPU for __PCTOOL__, to avoid wrong asm
[maemo-rb.git] / firmware / export / mmc.h
blob4c7e9c092698bc0efc36c43846a4a2ece0ff9740
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
10 * Copyright (C) 2002 by Alan Korr
11 * Copyright (C) 2008 by Frank Gevaerts
13 * This program is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU General Public License
15 * as published by the Free Software Foundation; either version 2
16 * of the License, or (at your option) any later version.
18 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19 * KIND, either express or implied.
21 ****************************************************************************/
22 #ifndef __MMC_H__
23 #define __MMC_H__
25 #include <stdbool.h>
26 #include "config.h"
27 #include "mv.h" /* for HAVE_MULTIDRIVE or not */
29 struct storage_info;
31 void mmc_enable(bool on);
32 void mmc_spindown(int seconds);
33 void mmc_sleep(void);
34 void mmc_sleepnow(void);
35 bool mmc_disk_is_active(void);
36 int mmc_soft_reset(void);
37 int mmc_init(void) STORAGE_INIT_ATTR;
38 void mmc_close(void);
39 int mmc_read_sectors(IF_MD2(int drive,) unsigned long start, int count, void* buf);
40 int mmc_write_sectors(IF_MD2(int drive,) unsigned long start, int count, const void* buf);
41 void mmc_spin(void);
42 int mmc_spinup_time(void);
44 #ifdef STORAGE_GET_INFO
45 void mmc_get_info(IF_MD2(int drive,) struct storage_info *info);
46 #endif
47 #ifdef HAVE_HOTSWAP
48 bool mmc_removable(IF_MD_NONVOID(int drive));
49 bool mmc_present(IF_MD_NONVOID(int drive));
50 #endif
52 long mmc_last_disk_activity(void);
54 #ifdef CONFIG_STORAGE_MULTI
55 int mmc_num_drives(int first_drive);
56 #endif
59 #endif