From 1c8cde92fa5c57daa9ff58d970ca6374f8d484a2 Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Fri, 30 Jun 2006 02:22:25 -0700 Subject: [MMC] sdhci: proper timeout handling Use the give timeout clock and calculate a proper timeout instead of using the maximum at all times. Signed-off-by: Pierre Ossman Signed-off-by: Andrew Morton Signed-off-by: Russell King --- drivers/mmc/sdhci.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'drivers/mmc/sdhci.h') diff --git a/drivers/mmc/sdhci.h b/drivers/mmc/sdhci.h index aed4abd37bf..a8f45215ef3 100644 --- a/drivers/mmc/sdhci.h +++ b/drivers/mmc/sdhci.h @@ -125,6 +125,9 @@ /* 3E-3F reserved */ #define SDHCI_CAPABILITIES 0x40 +#define SDHCI_TIMEOUT_CLK_MASK 0x0000003F +#define SDHCI_TIMEOUT_CLK_SHIFT 0 +#define SDHCI_TIMEOUT_CLK_UNIT 0x00000080 #define SDHCI_CLOCK_BASE_MASK 0x00003F00 #define SDHCI_CLOCK_BASE_SHIFT 8 #define SDHCI_CAN_DO_DMA 0x00400000 @@ -156,6 +159,7 @@ struct sdhci_host { #define SDHCI_USE_DMA (1<<0) unsigned int max_clk; /* Max possible freq (MHz) */ + unsigned int timeout_clk; /* Timeout freq (KHz) */ unsigned int clock; /* Current clock (MHz) */ unsigned short power; /* Current voltage */ -- cgit v1.2.3-18-g5258