-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow the number of cycles delay between sdcard peripheral writes to …
…be specified on command line with sdhci-bcm2708.cycle_delay
- Loading branch information
1 parent
358395e
commit 118e2d3
Showing
1 changed file
with
4 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -82,6 +82,8 @@ | |
#define REG_EXRDFIFO_EN 0x80 | ||
#define REG_EXRDFIFO_CFG 0x84 | ||
|
||
int cycle_delay=2; | ||
|
||
/*****************************************************************************\ | ||
* * | ||
* Debug * | ||
|
@@ -254,7 +256,7 @@ static void sdhci_bcm2708_raw_writel(struct sdhci_host *host, u32 val, int reg) | |
/* host->clock is the clock freq in Hz */ | ||
static hptime_t last_write_hpt; | ||
hptime_t now = hptime(); | ||
ns_2clk = 2000000000/host->clock; | ||
ns_2clk = cycle_delay*1000000/(host->clock/1000); | ||
|
||
if (now == last_write_hpt || now == last_write_hpt+1) { | ||
/* we can't guarantee any significant time has | ||
|
@@ -1517,6 +1519,7 @@ module_param(emmc_clock_freq, int, 0444); | |
module_param(sync_after_dma, bool, 0444); | ||
module_param(missing_status, bool, 0444); | ||
module_param(enable_llm, bool, 0444); | ||
module_param(cycle_delay, int, 0444); | ||
|
||
MODULE_DESCRIPTION("Secure Digital Host Controller Interface platform driver"); | ||
MODULE_AUTHOR("Broadcom <[email protected]>"); | ||
|