ixp4xx: remove linux 3.10 support
[openwrt.git] / target / linux / brcm2708 / patches-3.10 / 0037-Allow-the-number-of-cycles-delay-between-sdcard-peri.patch
1 From 674d82a3db9b47a7772ac732a560979ea22d5c3d Mon Sep 17 00:00:00 2001
2 From: popcornmix <popcornmix@gmail.com>
3 Date: Wed, 3 Oct 2012 21:31:48 +0100
4 Subject: [PATCH 037/196] Allow the number of cycles delay between sdcard
5  peripheral writes to be specified on command line with
6  sdhci-bcm2708.cycle_delay
7
8 ---
9  drivers/mmc/host/sdhci-bcm2708.c | 5 ++++-
10  1 file changed, 4 insertions(+), 1 deletion(-)
11
12 diff --git a/drivers/mmc/host/sdhci-bcm2708.c b/drivers/mmc/host/sdhci-bcm2708.c
13 index 7ce2829..ffd7310 100644
14 --- a/drivers/mmc/host/sdhci-bcm2708.c
15 +++ b/drivers/mmc/host/sdhci-bcm2708.c
16 @@ -77,6 +77,8 @@
17  #define REG_EXRDFIFO_EN     0x80
18  #define REG_EXRDFIFO_CFG    0x84
19  
20 +int cycle_delay=2;
21 +
22  /*****************************************************************************\
23   *                                                                          *
24   * Debug                                                                    *
25 @@ -249,7 +251,7 @@ static void sdhci_bcm2708_raw_writel(struct sdhci_host *host, u32 val, int reg)
26                 /* host->clock is the clock freq in Hz */
27                 static hptime_t last_write_hpt;
28                 hptime_t now = hptime();
29 -               ns_2clk = 2000000000/host->clock;
30 +               ns_2clk = cycle_delay*1000000/(host->clock/1000);
31  
32                 if (now == last_write_hpt || now == last_write_hpt+1) {
33                          /* we can't guarantee any significant time has
34 @@ -1388,6 +1390,7 @@ module_param(emmc_clock_freq, int, 0444);
35  module_param(sync_after_dma, bool, 0444);
36  module_param(missing_status, bool, 0444);
37  module_param(enable_llm, bool, 0444);
38 +module_param(cycle_delay, int, 0444);
39  
40  MODULE_DESCRIPTION("Secure Digital Host Controller Interface platform driver");
41  MODULE_AUTHOR("Broadcom <info@broadcom.com>");
42 -- 
43 1.9.1
44