blob: a11f6a8538f7d4935111020105ba089d56060e71 [file] [log] [blame]
/*******************************************************************************
* Copyright (C) 2007, ZTE Corporation.
*
* File Name:
* File Mark:
* Description:
* Others:
* Version:
* Author: XUJINYOU
* Date: 2014-7-28
* History 1:
* Date:
* Version:
* Author:
* Modification:
* History 2:
********************************************************************************/
#ifndef _MMC_DRVS_IO_H
#define _MMC_DRVS_IO_H
typedef struct _T_MmcDrv_Ops T_MmcDrv_Ops;
struct _T_MmcDrv_Ops
{
SINT32 (*open)(VOID *devdata, UINT32 flags);
SINT32 (*read)(VOID *devdata, VOID*param1, VOID*param2);
SINT32 (*write)(VOID *devdata,VOID *param1, VOID*param2);
SINT32 (*ioctrl)(VOID *devdata, UINT32 event, VOID*param);
SINT32 (*close)(VOID *devdata);
};
#define MMC_DRVNAME_LEN 20
#define MMC_APPNAME_LEN 20
typedef struct _T_MmcDrv
{
struct list_head node;
UINT8 drvName[MMC_DRVNAME_LEN];
T_MmcDrv_Ops* drv_op;
struct list_head devlist;
UINT32 devcount;
}T_MmcDrv, *PTMmcDrv;
#define MMC_DEVNAME_LEN 20
typedef struct _T_MmcDev
{
VOID* priv;
UINT8 devName[MMC_DEVNAME_LEN];
T_MmcDrv* driver;
VOID*param;
struct list_head devNode;
}T_MmcDev,*PTMmcDev;
typedef struct _T_MmcData_Collect
{
UINT8 type;
UINT8 fun_num;
UINT16 blk_size;
UINT32 startaddr; /*startpos for blk, start addr for bytes*/
UINT32 count; /**/
UINT32 flag; /*b:0 fifo*/
VOID* pbuffer;
VOID (*Mmccallback)(struct _T_MmcData_Collect* param);
VOID*priv;
}T_MmcData_Collect, *PMmcData_Collect;
#endif