1
0
Fork 0
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:
Solomon Peachy 2020-08-25 14:01:44 -04:00
parent 0aa2197d93
commit 6920c089af

View file

@ -623,8 +623,6 @@ static void jz_sd_set_clock(unsigned int rate)
{
int clkrt;
jz_sd_stop_clock();
/* select clock source from CPM */
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 */
//REG_MSC_IMASK = 0xffff;
/* clear status */
@ -889,6 +884,7 @@ static int jz_sd_exec_cmd(struct sd_request *request)
}
/* Command completed */
jz_sd_stop_clock(); /* Stop SD clock since we're done */
return SD_NO_ERROR; /* return successfully */
}