2009-04-11 23:42:53 +02:00
|
|
|
/*
|
|
|
|
mini - a Free Software replacement for the Nintendo/BroadOn IOS.
|
|
|
|
|
|
|
|
SD/MMC interface
|
|
|
|
|
2009-04-13 22:13:45 +02:00
|
|
|
Copyright (C) 2008, 2009 Sven Peter <svenpeter@gmail.com>
|
2009-04-11 23:42:53 +02:00
|
|
|
|
|
|
|
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, version 2.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
|
|
|
|
*/
|
|
|
|
#ifndef __SDMMC_H__
|
2009-04-13 22:13:45 +02:00
|
|
|
#define __SDMMC_H__
|
2009-04-11 23:42:53 +02:00
|
|
|
|
2009-04-12 13:17:44 +02:00
|
|
|
#include "bsdtypes.h"
|
2009-04-11 23:42:53 +02:00
|
|
|
#include "sdmmcchip.h"
|
2009-04-12 13:17:44 +02:00
|
|
|
#include "sdmmcvar.h"
|
2009-05-06 04:32:19 +02:00
|
|
|
#ifdef CAN_HAZ_IPC
|
2009-04-12 14:40:35 +02:00
|
|
|
#include "ipc.h"
|
2009-05-06 04:32:19 +02:00
|
|
|
#endif
|
2009-04-11 23:42:53 +02:00
|
|
|
|
|
|
|
#define SDMMC_DEFAULT_CLOCK 25000
|
2009-04-12 13:17:44 +02:00
|
|
|
#define SDMMC_DEFAULT_BLOCKLEN 512
|
|
|
|
|
|
|
|
#define SDMMC_NO_CARD 1
|
|
|
|
#define SDMMC_NEW_CARD 2
|
|
|
|
#define SDMMC_INSERTED 3
|
|
|
|
|
|
|
|
// HACK
|
|
|
|
#define SDMMC_DEFAULT_DEVICE ((struct device *)0)
|
2009-04-11 23:42:53 +02:00
|
|
|
|
|
|
|
struct device *sdmmc_attach(struct sdmmc_chip_functions *functions,
|
|
|
|
sdmmc_chipset_handle_t handle, const char *name, int no);
|
|
|
|
void sdmmc_needs_discover(struct device *dev);
|
2009-04-12 13:17:44 +02:00
|
|
|
int sdmmc_select(struct device *dev);
|
|
|
|
int sdmmc_check_card(struct device *dev);
|
|
|
|
void sdmmc_ack_card(struct device *dev);
|
|
|
|
int sdmmc_read(struct device *dev, u32 blk_start, u32 blk_count, void *data);
|
2009-05-06 04:32:19 +02:00
|
|
|
#ifdef CAN_HAZ_IPC
|
2009-04-12 14:40:35 +02:00
|
|
|
void sdmmc_ipc(volatile ipc_request *req);
|
2009-04-11 23:42:53 +02:00
|
|
|
#endif
|
2009-05-06 04:32:19 +02:00
|
|
|
#endif
|