arch: lc823450: Fix style violations

Summary:
- Fix style violations under lc823450

Impact:
- Some APIs were changed but all files are included

Testing:
- Build check only

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
This commit is contained in:
Masayuki Ishikawa 2020-07-31 08:43:21 +09:00 committed by Xiang Xiao
parent 9087eb6d84
commit 4ea94c67b1
4 changed files with 136 additions and 135 deletions

View File

@ -83,23 +83,23 @@ static sem_t _sdc_sem[2] =
SEM_INITIALIZER(1)
};
static struct SdDrCfg_s _sdch0;
static struct SdDrCfg_s _sdch1;
static struct sddrcfg_s _sdch0;
static struct sddrcfg_s _sdch1;
static struct SdDrCfg_s *_cfg[2] =
static struct sddrcfg_s *_cfg[2] =
{
&_sdch0,
&_sdch1
};
static unsigned long _work0[512/4];
static unsigned long _work0[512 / 4];
#ifdef CONFIG_LC823450_SDIF_SDC
static unsigned long _work1[512/4];
static unsigned long _work1[512 / 4];
#endif
#ifdef CONFIG_LC823450_SDC_CACHE
static uint8_t _sec_cache_enabled;
static uint32_t _sec_cache[512/4];
static uint32_t _sec_cache[512 / 4];
static uint32_t _sec_cache_add = 0xffffffff;
#endif
@ -111,22 +111,22 @@ static uint32_t _sec_cache_add = 0xffffffff;
extern uint8_t cpu_ver;
extern SINT_T sddep0_hw_init(struct SdDrCfg_s *);
extern SINT_T sddep0_hw_exit(struct SdDrCfg_s *);
extern SINT_T sddep1_hw_init(struct SdDrCfg_s *);
extern SINT_T sddep1_hw_exit(struct SdDrCfg_s *);
extern SINT_T sddep0_hw_init(struct sddrcfg_s *);
extern SINT_T sddep0_hw_exit(struct sddrcfg_s *);
extern SINT_T sddep1_hw_init(struct sddrcfg_s *);
extern SINT_T sddep1_hw_exit(struct sddrcfg_s *);
extern SINT_T sddep_os_init(struct SdDrCfg_s *);
extern SINT_T sddep_os_exit(struct SdDrCfg_s *);
extern void sddep_voltage_switch(struct SdDrCfg_s *cfg);
extern void sddep_set_clk(struct SdDrCfg_s *);
extern SINT_T sddep_wait(UI_32, struct SdDrCfg_s *);
extern SINT_T sddep_os_init(struct sddrcfg_s *);
extern SINT_T sddep_os_exit(struct sddrcfg_s *);
extern void sddep_voltage_switch(struct sddrcfg_s *cfg);
extern void sddep_set_clk(struct sddrcfg_s *);
extern SINT_T sddep_wait(UI_32, struct sddrcfg_s *);
extern SINT_T sddep_wait_status(UI_32 req, UI_32 *status,
struct SdDrCfg_s *cfg);
struct sddrcfg_s *cfg);
extern SINT_T sddep_read(void *src, void *dst, UI_32 size, SINT_T type,
struct SdDrCfg_s *cfg);
struct sddrcfg_s *cfg);
extern SINT_T sddep_write(void *src, void *dst, UI_32 size, SINT_T type,
struct SdDrCfg_s *cfg);
struct sddrcfg_s *cfg);
/****************************************************************************
* Private Functions
@ -154,11 +154,11 @@ static void _sdc_semgive(FAR sem_t *sem)
* Name: _lc823450_sdc_support_trim
****************************************************************************/
static int _lc823450_sdc_support_trim(struct SdDrCfg_s *cf)
static int _lc823450_sdc_support_trim(struct sddrcfg_s *cf)
{
/* NOTE: to avoid conflicts, SDDR_SUPPORT_TRIM() macro is not used here */
int ret = ((SdDrRefMediaType(cf) == SDDR_MEDIA_TYPE_MMC) ?
int ret = ((sddr_refmediatype(cf) == SDDR_MEDIA_TYPE_MMC) ?
(((cf)->ex.mmc.extcsd_sec_feature_support & (1UL << 4)) ?
1 : 0) : 0);
return ret;
@ -207,7 +207,7 @@ int lc823450_sdc_clearcardinfo(uint32_t ch)
return ret;
}
ret = SdDrClearCardInfo(_cfg[ch]);
ret = sddr_clearcardinfo(_cfg[ch]);
#ifdef CONFIG_LC823450_SDC_CACHE
if (ch)
@ -234,7 +234,7 @@ int lc823450_sdc_initialize(uint32_t ch)
DEBUGASSERT(1 == cpu_ver);
struct SdDrCfg_s *psd = _cfg[ch];
struct sddrcfg_s *psd = _cfg[ch];
psd->sysclk = lc823450_get_systemfreq();
psd->detecttime = DET_TIME;
@ -279,7 +279,7 @@ int lc823450_sdc_initialize(uint32_t ch)
ret = _sdc_semtake(&_sdc_sem[ch]);
if (ret >= 0)
{
ret = SdDrInitialize(_cfg[ch]);
ret = sddr_initialize(_cfg[ch]);
_sdc_semgive(&_sdc_sem[ch]);
mcinfo("---- end ret=%d \n", ret);
}
@ -300,7 +300,7 @@ int lc823450_sdc_finalize(uint32_t ch)
ret = _sdc_semtake(&_sdc_sem[ch]);
if (ret >= 0)
{
ret = SdDrFinalize(_cfg[ch]);
ret = sddr_finalize(_cfg[ch]);
_sdc_semgive(&_sdc_sem[ch]);
mcinfo("---- end ret=%d \n", ret);
}
@ -324,7 +324,7 @@ int lc823450_sdc_identifycard(uint32_t ch)
return ret;
}
ret = SdDrIdentifyCard(_cfg[ch]);
ret = sddr_identifycard(_cfg[ch]);
#ifdef CONFIG_LC823450_SDC_CACHE
if (ch)
@ -347,12 +347,13 @@ int lc823450_sdc_setclock(uint32_t ch, uint32_t limitclk, uint32_t sysclk)
{
int ret;
mcinfo("++++ start ch=%ld limitClk=%ld sysClk=%ld\n", ch, limitClk, sysClk);
mcinfo("++++ start ch=%ld limitClk=%ld sysClk=%ld\n",
ch, limitclk, sysclk);
ret = _sdc_semtake(&_sdc_sem[ch]);
if (ret >= 0)
{
ret = SdDrSetClock(limitclk, sysclk, _cfg[ch]);
ret = sddr_setclock(limitclk, sysclk, _cfg[ch]);
_sdc_semgive(&_sdc_sem[ch]);
mcinfo("---- end ret=%d \n", ret);
}
@ -377,7 +378,7 @@ int lc823450_sdc_refmediatype(uint32_t ch)
ret = _sdc_semtake(&_sdc_sem[ch]);
if (ret >= 0)
{
ret = SdDrRefMediaType(_cfg[ch]);
ret = sddr_refmediatype(_cfg[ch]);
_sdc_semgive(&_sdc_sem[ch]);
mcinfo("---- end ret=%d \n", ret);
}
@ -396,10 +397,10 @@ int lc823450_sdc_getcardsize(uint32_t ch,
mcinfo("++++ start \n");
ret =_sdc_semtake(&_sdc_sem[ch]);
ret = _sdc_semtake(&_sdc_sem[ch]);
if (ret >= 0)
{
ret = SdDrGetCardSize(psecnum, psecsize, _cfg[ch]);
ret = sddr_getcardsize(psecnum, psecsize, _cfg[ch]);
_sdc_semgive(&_sdc_sem[ch]);
mcinfo("---- end ret=%d \n", ret);
@ -446,9 +447,9 @@ int lc823450_sdc_readsector(uint32_t ch,
for (i = 0; i < 5; i++)
{
#ifdef CONFIG_LC823450_SDIF_PATCH
ret = fixedSdDrReadSector(addr, cnt, pbuf, type, _cfg[ch]);
ret = fixed_sddr_readsector(addr, cnt, pbuf, type, _cfg[ch]);
#else
ret = SdDrReadSector(addr, cnt, pbuf, type, _cfg[ch]);
ret = sddr_readsector(addr, cnt, pbuf, type, _cfg[ch]);
#endif
if (0 == ret)
{
@ -527,7 +528,7 @@ int lc823450_sdc_writesector(uint32_t ch,
sched_add_bo((uint64_t)cnt);
#endif
ret = SdDrWriteSector(addr, cnt, pbuf, type, _cfg[ch]);
ret = sddr_writesector(addr, cnt, pbuf, type, _cfg[ch]);
if (0 > ret)
{
@ -553,7 +554,8 @@ int lc823450_sdc_checktrim(uint32_t ch)
* Name: lc823450_sdc_trimsector
****************************************************************************/
int lc823450_sdc_trimsector(uint32_t ch, unsigned long addr, unsigned short cnt)
int lc823450_sdc_trimsector(uint32_t ch, unsigned long addr,
unsigned short cnt)
{
int ret;
@ -573,7 +575,7 @@ int lc823450_sdc_trimsector(uint32_t ch, unsigned long addr, unsigned short cnt)
sched_add_bt((uint64_t)cnt);
#endif
ret = SdDrEraseSeq(0x00000001, addr, cnt, _cfg[ch]);
ret = sddr_eraseseq(0x00000001, addr, cnt, _cfg[ch]);
if (0 > ret)
{
mcinfo("ret=%d ch=%d add=%ld cnt=%d \n", ret, ch, addr, cnt);
@ -598,7 +600,7 @@ int lc823450_sdc_cachectl(uint32_t ch, int ctrl)
ret = _sdc_semtake(&_sdc_sem[ch]);
if (ret >= 0)
{
ret = SdDrCacheCtrl(ctrl, _cfg[ch]);
ret = sddr_cachectrl(ctrl, _cfg[ch]);
_sdc_semgive(&_sdc_sem[ch]);
mcinfo("---- end ret=%d \n", ret);
@ -623,7 +625,7 @@ int lc823450_sdc_changespeedmode(uint32_t ch, int mode)
return ret;
}
ret = SdDrChangeSpeedMode(mode, _cfg[ch]);
ret = sddr_changespeedmode(mode, _cfg[ch]);
if (0 == ret)
{
@ -665,7 +667,7 @@ int lc823450_sdc_getcid(uint32_t ch, char *cidstr, int length)
return ret;
}
ret = SdDrGetCid((UI_32 *)cid, _cfg[ch]);
ret = sddr_getcid((UI_32 *)cid, _cfg[ch]);
if (0 == ret && length >= (2 * sizeof(cid) + 1))
{

View File

@ -95,7 +95,7 @@ extern void sdif_powerctrl(bool);
* Name: _get_ch_from_cfg
****************************************************************************/
static int _get_ch_from_cfg(struct SdDrCfg_s *cfg)
static int _get_ch_from_cfg(struct sddrcfg_s *cfg)
{
int ch = -1;
switch (cfg->regbase)
@ -144,7 +144,7 @@ static int _sddep_semtake(FAR sem_t *sem)
* Name: sddep0_hw_init
****************************************************************************/
SINT_T sddep0_hw_init(struct SdDrCfg_s *cfg)
SINT_T sddep0_hw_init(struct sddrcfg_s *cfg)
{
irqstate_t flags = enter_critical_section();
@ -175,7 +175,7 @@ SINT_T sddep0_hw_init(struct SdDrCfg_s *cfg)
****************************************************************************/
#ifdef CONFIG_LC823450_SDIF_SDC
SINT_T sddep1_hw_init(struct SdDrCfg_s *cfg)
SINT_T sddep1_hw_init(struct sddrcfg_s *cfg)
{
int i;
@ -209,7 +209,7 @@ SINT_T sddep1_hw_init(struct SdDrCfg_s *cfg)
* Name: sddep0_hw_exit
****************************************************************************/
SINT_T sddep0_hw_exit(struct SdDrCfg_s *cfg)
SINT_T sddep0_hw_exit(struct sddrcfg_s *cfg)
{
irqstate_t flags = enter_critical_section();
@ -226,7 +226,7 @@ SINT_T sddep0_hw_exit(struct SdDrCfg_s *cfg)
****************************************************************************/
#ifdef CONFIG_LC823450_SDIF_SDC
SINT_T sddep1_hw_exit(struct SdDrCfg_s *cfg)
SINT_T sddep1_hw_exit(struct sddrcfg_s *cfg)
{
irqstate_t flags = enter_critical_section();
@ -268,7 +268,7 @@ SINT_T sddep1_hw_exit(struct SdDrCfg_s *cfg)
* Name: sddep_voltage_switch
****************************************************************************/
void sddep_voltage_switch(struct SdDrCfg_s *cfg)
void sddep_voltage_switch(struct sddrcfg_s *cfg)
{
#ifdef CONFIG_LC823450_SDC_UHS1
/* GPIO06=H 1.8v */
@ -283,7 +283,7 @@ void sddep_voltage_switch(struct SdDrCfg_s *cfg)
* Name: sddep_os_init
****************************************************************************/
SINT_T sddep_os_init(struct SdDrCfg_s *cfg)
SINT_T sddep_os_init(struct sddrcfg_s *cfg)
{
int ch = _get_ch_from_cfg(cfg);
@ -300,7 +300,7 @@ SINT_T sddep_os_init(struct SdDrCfg_s *cfg)
* Name: sddep_os_exit
****************************************************************************/
SINT_T sddep_os_exit(struct SdDrCfg_s *cfg)
SINT_T sddep_os_exit(struct sddrcfg_s *cfg)
{
return 0;
}
@ -309,7 +309,7 @@ SINT_T sddep_os_exit(struct SdDrCfg_s *cfg)
* Name: sddep_set_clk
****************************************************************************/
void sddep_set_clk(struct SdDrCfg_s *cfg)
void sddep_set_clk(struct sddrcfg_s *cfg)
{
if (cfg->clkdiv == 1)
{
@ -323,7 +323,7 @@ void sddep_set_clk(struct SdDrCfg_s *cfg)
* Name: sddep_wait
****************************************************************************/
SINT_T sddep_wait(UI_32 ms, struct SdDrCfg_s *cfg)
SINT_T sddep_wait(UI_32 ms, struct sddrcfg_s *cfg)
{
#ifdef CONFIG_HRT_TIMER
up_hrttimer_usleep(ms * 1000);
@ -357,7 +357,7 @@ uint64_t sddep_set_timeout(uint64_t t)
****************************************************************************/
SINT_T sddep_wait_status(UI_32 req_status, UI_32 *status,
struct SdDrCfg_s *cfg)
struct sddrcfg_s *cfg)
{
clock_t tick0 = clock_systime_ticks();
int ret = 0;
@ -388,7 +388,7 @@ SINT_T sddep_wait_status(UI_32 req_status, UI_32 *status,
****************************************************************************/
SINT_T sddep_read(void *src, void *dst, UI_32 size, SINT_T type,
struct SdDrCfg_s *cfg)
struct sddrcfg_s *cfg)
{
#ifdef CONFIG_LC823450_SDC_DMA
int ch = _get_ch_from_cfg(cfg);
@ -479,7 +479,7 @@ SINT_T sddep_read(void *src, void *dst, UI_32 size, SINT_T type,
****************************************************************************/
SINT_T sddep_write(void *src, void *dst, UI_32 size, SINT_T type,
struct SdDrCfg_s *cfg)
struct sddrcfg_s *cfg)
{
#ifdef CONFIG_LC823450_SDC_DMA
int ch = _get_ch_from_cfg(cfg);

View File

@ -102,7 +102,7 @@
/* SD specific info */
struct SdInfo_s
struct sdinfo_s
{
UI_32 scr[2];
UI_32 sdstatus[16];
@ -110,7 +110,7 @@ struct SdInfo_s
/* MMC specific info */
struct MmcInfo_s
struct mmcinfo_s
{
UI_32 extcsd_cache_size; /* ExtCsd [252:249] */
UI_32 extcsd_sec_count; /* ExtCsd [215:212] */
@ -127,7 +127,7 @@ struct MmcInfo_s
/* SdDr configuration */
struct SdDrCfg_s
struct sddrcfg_s
{
UI_32 regbase; /* SD Host I/F register base address */
UI_32 sysclk; /* System Clock */
@ -135,21 +135,22 @@ struct SdDrCfg_s
UI_32 setting; /* WP CD settings */
void *workbuf; /* Work buffer (512 byte) */
SINT_T (*dephwinit)(struct SdDrCfg_s *);
SINT_T (*dephwexit)(struct SdDrCfg_s *);
SINT_T (*deposinit)(struct SdDrCfg_s *);
SINT_T (*deposexit)(struct SdDrCfg_s *);
void (*depsetclk)(struct SdDrCfg_s *);
SINT_T (*depwait)(UI_32, struct SdDrCfg_s *);
SINT_T (*depwaitstatus)(UI_32 req, UI_32 *status, struct SdDrCfg_s *cfg);
SINT_T (*dephwinit)(struct sddrcfg_s *);
SINT_T (*dephwexit)(struct sddrcfg_s *);
SINT_T (*deposinit)(struct sddrcfg_s *);
SINT_T (*deposexit)(struct sddrcfg_s *);
void (*depsetclk)(struct sddrcfg_s *);
SINT_T (*depwait)(UI_32, struct sddrcfg_s *);
SINT_T (*depwaitstatus)(UI_32 req, UI_32 *status, struct sddrcfg_s *cfg);
SINT_T (*depreaddata)(void *src, void *dst, UI_32 size, SINT_T type,
struct SdDrCfg_s *cfg);
struct sddrcfg_s *cfg);
SINT_T (*depwritedata)(void *src, void *dst, UI_32 size, SINT_T type,
struct SdDrCfg_s *cfg);
void (*depvoltageswitch)(struct SdDrCfg_s *);
struct sddrcfg_s *cfg);
void (*depvoltageswitch)(struct sddrcfg_s *);
/* To here, external members to be set */
/* From here, internal mermbers (no need to set) */
/* To here, external members to be set
* From here, internal mermbers (no need to set)
*/
UI_32 info; /* Misc info (e.g. driver state) */
UI_32 secnum; /* The number of sectors */
@ -161,14 +162,13 @@ struct SdDrCfg_s
union
{
struct SdInfo_s sd; /* SD specific info */
struct MmcInfo_s mmc; /* MMC specific info */
struct sdinfo_s sd; /* SD specific info */
struct mmcinfo_s mmc; /* MMC specific info */
} ex;
UI_32 reserved;
};
/****************************************************************************
* Public Data
****************************************************************************/
@ -181,74 +181,73 @@ extern "C"
#define EXTERN extern
#endif
/****************************************************************************
* Public Functions
* Public Function Prototypes
****************************************************************************/
SINT_T SdDrRefVersion(void);
SINT_T SdDrInitialize(struct SdDrCfg_s *cfg);
SINT_T SdDrFinalize(struct SdDrCfg_s *cfg);
SINT_T SdDrIdentifyCard(struct SdDrCfg_s *cfg);
SINT_T SdDrCheckCardIdentify(struct SdDrCfg_s *cfg);
SINT_T SdDrCheckWriteEnable(struct SdDrCfg_s *cfg);
SINT_T SdDrCheckCardDetect(struct SdDrCfg_s *cfg);
SINT_T SdDrCheckCardRemoved(struct SdDrCfg_s *cfg);
SINT_T SdDrGetCardSize(UI_32 *secnum, UI_32 *secsize, struct SdDrCfg_s *cfg);
SINT_T SdDrGetCid(UI_32 *cid, struct SdDrCfg_s *cfg);
SINT_T SdDrGetCsd(UI_32 *csd, struct SdDrCfg_s *cfg);
SINT_T SdDrGetScr(UI_32 *scr, struct SdDrCfg_s *cfg);
SINT_T SdDrGetExtCsd(UI_32 *extcsd, struct SdDrCfg_s *cfg);
SINT_T SdDrClearCardInfo(struct SdDrCfg_s *cfg);
SINT_T SdDrReadSector(UI_32 addr, UI_32 cnt, void *buf, SINT_T type,
struct SdDrCfg_s *cfg);
SINT_T SdDrWriteSector(UI_32 addr, UI_32 cnt, void *buf, SINT_T type,
struct SdDrCfg_s *cfg);
SINT_T SdDrEraseSector(UI_32 addr, UI_32 cnt, struct SdDrCfg_s *cfg);
SINT_T SdDrSetClock(UI_32 limitclk, UI_32 sysclk, struct SdDrCfg_s *cfg);
SINT_T SdDrChangeSpeedMode(SINT_T mode, struct SdDrCfg_s *cfg);
SINT_T SdDrRefMediaType(struct SdDrCfg_s *cfg);
SINT_T SdDrSleep(struct SdDrCfg_s *cfg);
SINT_T SdDrAwake(struct SdDrCfg_s *cfg);
SINT_T SdDrSelectAccessPartition(UI_32 partnumber, struct SdDrCfg_s *cfg);
SINT_T SdDrConfigBootMode(SINT_T enable, SINT_T ack, UI_32 bootpartnumber,
UI_32 bootbuswidth, struct SdDrCfg_s *cfg);
SINT_T SdDrGetPartitionSize(UI_32 partnumber, UI_32 *secNum,
struct SdDrCfg_s *cfg);
SINT_T sddr_ref_version(void);
SINT_T sddr_initialize(struct sddrcfg_s *cfg);
SINT_T sddr_finalize(struct sddrcfg_s *cfg);
SINT_T sddr_identifycard(struct sddrcfg_s *cfg);
SINT_T sddr_checkcardidentify(struct sddrcfg_s *cfg);
SINT_T sddr_checkwriteenable(struct sddrcfg_s *cfg);
SINT_T sddr_checkcarddetect(struct sddrcfg_s *cfg);
SINT_T sddr_checkcardremoved(struct sddrcfg_s *cfg);
SINT_T sddr_getcardsize(UI_32 *secnum, UI_32 *secsize,
struct sddrcfg_s *cfg);
SINT_T sddr_getcid(UI_32 *cid, struct sddrcfg_s *cfg);
SINT_T sddr_getcsd(UI_32 *csd, struct sddrcfg_s *cfg);
SINT_T sddr_getscr(UI_32 *scr, struct sddrcfg_s *cfg);
SINT_T sddr_getextcsd(UI_32 *extcsd, struct sddrcfg_s *cfg);
SINT_T sddr_clearcardinfo(struct sddrcfg_s *cfg);
SINT_T sddr_readsector(UI_32 addr, UI_32 cnt, void *buf, SINT_T type,
struct sddrcfg_s *cfg);
SINT_T sddr_writesector(UI_32 addr, UI_32 cnt, void *buf, SINT_T type,
struct sddrcfg_s *cfg);
SINT_T sddr_erasesector(UI_32 addr, UI_32 cnt, struct sddrcfg_s *cfg);
SINT_T sddr_setclock(UI_32 limitclk, UI_32 sysclk, struct sddrcfg_s *cfg);
SINT_T sddr_changespeedmode(SINT_T mode, struct sddrcfg_s *cfg);
SINT_T sddr_refmediatype(struct sddrcfg_s *cfg);
SINT_T sddr_sleep(struct sddrcfg_s *cfg);
SINT_T sddr_awake(struct sddrcfg_s *cfg);
SINT_T sddr_selectaccesspartition(UI_32 partnumber, struct sddrcfg_s *cfg);
SINT_T sddr_configbootmode(SINT_T enable, SINT_T ack, UI_32 bootpartnumber,
UI_32 bootbuswidth, struct sddrcfg_s *cfg);
SINT_T sddr_getpartitionsize(UI_32 partnumber, UI_32 *secnum,
struct sddrcfg_s *cfg);
SINT_T SdDrCheckSDXC(struct SdDrCfg_s *cfg);
SINT_T sddr_checksdxc(struct sddrcfg_s *cfg);
SINT_T SdDrEraseSeq(UI_32 type, UI_32 addr, UI_32 cnt, struct SdDrCfg_s *cfg);
#define SdDrTrimSector(addr, cnt, cfg) \
SdDrEraseSeq(0x00000001, addr, cnt, cfg)
#define SdDrSTrimSector1(addr, cnt, cfg) \
SdDrEraseSeq(0x80000001, addr, cnt, cfg)
#define SdDrSTrimSector2(cfg) \
SdDrEraseSeq(0x80008000, 0, 1, cfg)
SINT_T SdDrGeneralCommand(SINT_T arg, UI_32 size, void *buf, SINT_T type,
struct SdDrCfg_s *cfg);
SINT_T SdDrCacheCtrl(SINT_T ctrl, struct SdDrCfg_s *cfg);
SINT_T sddr_eraseseq(UI_32 type, UI_32 addr, UI_32 cnt,
struct sddrcfg_s *cfg);
#define sddr_trimsector(addr, cnt, cfg) \
sddr_eraseseq(0x00000001, addr, cnt, cfg)
#define sddr_stimsector1(addr, cnt, cfg) \
sddr_eraseseq(0x80000001, addr, cnt, cfg)
#define sddr_strimsector2(cfg) \
sddr_eraseseq(0x80008000, 0, 1, cfg)
SINT_T sddr_generalcommand(SINT_T arg, UI_32 size, void *buf, SINT_T type,
struct sddrcfg_s *cfg);
SINT_T sddr_cachectrl(SINT_T ctrl, struct sddrcfg_s *cfg);
#define SDDR_SUPPORT_TRIM(cfg) \
((SdDrRefMediaType(cfg) == SDDR_MEDIA_TYPE_MMC) ? \
((sddr_refmediatype(cfg) == SDDR_MEDIA_TYPE_MMC) ? \
(((cfg)->ex.mmc.extcsd_sec_feature_support & (1UL << 4)) ? 1 : 0) : 0)
#define SDDR_SUPPORT_CACHE(cfg) \
((SdDrRefMediaType(cfg) == SDDR_MEDIA_TYPE_MMC) ? \
((sddr_refmediatype(cfg) == SDDR_MEDIA_TYPE_MMC) ? \
((cfg)->ex.mmc.extcsd_cache_size ? 1:0) : 0)
SINT_T SdDrBkopsGetStatus(struct SdDrCfg_s *cfg);
SINT_T SdDrBkopsEnable(SINT_T ena, struct SdDrCfg_s *cfg);
SINT_T SdDrBkopsStart(struct SdDrCfg_s *cfg);
SINT_T SdDrHpiEnable(SINT_T ena, struct SdDrCfg_s *cfg);
SINT_T SdDrHpiExec(SINT_T check, struct SdDrCfg_s *cfg);
SINT_T sddr_bkopsgetstatus(struct sddrcfg_s *cfg);
SINT_T sddr_bkopsenable(SINT_T ena, struct sddrcfg_s *cfg);
SINT_T sddr_bkopsstart(struct sddrcfg_s *cfg);
SINT_T sddr_hpienable(SINT_T ena, struct sddrcfg_s *cfg);
SINT_T sddr_hpiexec(SINT_T check, struct sddrcfg_s *cfg);
SINT_T fixedSdDrReadSector(UI_32 addr, UI_32 cnt, void *buf, SINT_T type,
struct SdDrCfg_s *cfg);
SINT_T fixed_sddr_readsector(UI_32 addr, UI_32 cnt, void *buf, SINT_T type,
struct sddrcfg_s *cfg);
UI_32 sdif_get_status(UI_32);

View File

@ -56,16 +56,16 @@ sdif_ref_cd = 0x02207f49;
sdif_send_cmd = 0x02208071;
sdif_get_status = 0x02207f85;
SdDrInitialize = 0x02207103;
SdDrFinalize = 0x0220715b;
SdDrSetClock = 0x0220784f;
SdDrIdentifyCard = 0x0220718f;
SdDrRefMediaType = 0x02207939;
SdDrGetCardSize = 0x02207375;
SdDrReadSector = 0x022075a5;
SdDrWriteSector = 0x02207657;
SdDrCacheCtrl = 0x02207c95;
SdDrGetCid = 0x022073d1;
SdDrEraseSeq = 0x022077b7;
SdDrChangeSpeedMode = 0x022078d5;
SdDrClearCardInfo = 0x02207575;
sddr_initialize = 0x02207103;
sddr_finalize = 0x0220715b;
sddr_setclock = 0x0220784f;
sddr_identifycard = 0x0220718f;
sddr_refmediatype = 0x02207939;
sddr_getcardsize = 0x02207375;
sddr_readsector = 0x022075a5;
sddr_writesector = 0x02207657;
sddr_cachectrl = 0x02207c95;
sddr_getcid = 0x022073d1;
sddr_eraseseq = 0x022077b7;
sddr_changespeedmode = 0x022078d5;
sddr_clearcardinfo = 0x02207575;