forked from len0rd/rockbox
jz4740: SD clock sequencing changes.
* Don't stop clock before switching speeds * Don't stop clock prior to transactions * Stop clock at the end of transactions Will result in slightly better performance and some power saving when we're not actively using the SD peripheral. Change-Id: I1c82476cad97137b1469900645ecf7bb0887119a
This commit is contained in:
parent
0aa2197d93
commit
6920c089af
1 changed files with 13 additions and 17 deletions
|
|
@ -623,8 +623,6 @@ static void jz_sd_set_clock(unsigned int rate)
|
||||||
{
|
{
|
||||||
int clkrt;
|
int clkrt;
|
||||||
|
|
||||||
jz_sd_stop_clock();
|
|
||||||
|
|
||||||
/* select clock source from CPM */
|
/* select clock source from CPM */
|
||||||
cpm_select_msc_clk(rate);
|
cpm_select_msc_clk(rate);
|
||||||
|
|
||||||
|
|
@ -676,9 +674,6 @@ static int jz_sd_exec_cmd(struct sd_request *request)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* stop clock */
|
|
||||||
jz_sd_stop_clock();
|
|
||||||
|
|
||||||
/* mask all interrupts */
|
/* mask all interrupts */
|
||||||
//REG_MSC_IMASK = 0xffff;
|
//REG_MSC_IMASK = 0xffff;
|
||||||
/* clear status */
|
/* clear status */
|
||||||
|
|
@ -889,6 +884,7 @@ static int jz_sd_exec_cmd(struct sd_request *request)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Command completed */
|
/* Command completed */
|
||||||
|
jz_sd_stop_clock(); /* Stop SD clock since we're done */
|
||||||
|
|
||||||
return SD_NO_ERROR; /* return successfully */
|
return SD_NO_ERROR; /* return successfully */
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue