diff options
author | Pierre Ossman <drzeus@drzeus.cx> | 2006-07-02 11:52:10 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2006-07-02 11:52:10 -0400 |
commit | 1d676e02970d9e511c9b96101501da90954ee265 (patch) | |
tree | 59a5e1c46584cfa7683d33d4c3ff494589ee65e3 /drivers/mmc/sdhci.h | |
parent | bab7696184bbf0ea48d56902bd1f9ac983079ad2 (diff) |
[MMC] sdhci: Test for invalid block size
The controller has an upper limit on the block size. Make sure we do not
cross it.
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers/mmc/sdhci.h')
-rw-r--r-- | drivers/mmc/sdhci.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/mmc/sdhci.h b/drivers/mmc/sdhci.h index 8ed2a8973db6..b1aa3acf0906 100644 --- a/drivers/mmc/sdhci.h +++ b/drivers/mmc/sdhci.h | |||
@@ -131,6 +131,8 @@ | |||
131 | #define SDHCI_TIMEOUT_CLK_UNIT 0x00000080 | 131 | #define SDHCI_TIMEOUT_CLK_UNIT 0x00000080 |
132 | #define SDHCI_CLOCK_BASE_MASK 0x00003F00 | 132 | #define SDHCI_CLOCK_BASE_MASK 0x00003F00 |
133 | #define SDHCI_CLOCK_BASE_SHIFT 8 | 133 | #define SDHCI_CLOCK_BASE_SHIFT 8 |
134 | #define SDHCI_MAX_BLOCK_MASK 0x00030000 | ||
135 | #define SDHCI_MAX_BLOCK_SHIFT 16 | ||
134 | #define SDHCI_CAN_DO_DMA 0x00400000 | 136 | #define SDHCI_CAN_DO_DMA 0x00400000 |
135 | #define SDHCI_CAN_VDD_330 0x01000000 | 137 | #define SDHCI_CAN_VDD_330 0x01000000 |
136 | #define SDHCI_CAN_VDD_300 0x02000000 | 138 | #define SDHCI_CAN_VDD_300 0x02000000 |
@@ -161,6 +163,7 @@ struct sdhci_host { | |||
161 | 163 | ||
162 | unsigned int max_clk; /* Max possible freq (MHz) */ | 164 | unsigned int max_clk; /* Max possible freq (MHz) */ |
163 | unsigned int timeout_clk; /* Timeout freq (KHz) */ | 165 | unsigned int timeout_clk; /* Timeout freq (KHz) */ |
166 | unsigned int max_block; /* Max block size (bytes) */ | ||
164 | 167 | ||
165 | unsigned int clock; /* Current clock (MHz) */ | 168 | unsigned int clock; /* Current clock (MHz) */ |
166 | unsigned short power; /* Current voltage */ | 169 | unsigned short power; /* Current voltage */ |