|
@@ -75,6 +75,7 @@
|
|
#define ICE 0x1
|
|
#define ICE 0x1
|
|
#define ICS 0x2
|
|
#define ICS 0x2
|
|
#define CEN (1 << 2)
|
|
#define CEN (1 << 2)
|
|
|
|
+#define CLKD_MAX 0x3FF /* max clock divisor: 1023 */
|
|
#define CLKD_MASK 0x0000FFC0
|
|
#define CLKD_MASK 0x0000FFC0
|
|
#define CLKD_SHIFT 6
|
|
#define CLKD_SHIFT 6
|
|
#define DTO_MASK 0x000F0000
|
|
#define DTO_MASK 0x000F0000
|
|
@@ -497,8 +498,8 @@ static u16 calc_divisor(struct omap_hsmmc_host *host, struct mmc_ios *ios)
|
|
|
|
|
|
if (ios->clock) {
|
|
if (ios->clock) {
|
|
dsor = DIV_ROUND_UP(clk_get_rate(host->fclk), ios->clock);
|
|
dsor = DIV_ROUND_UP(clk_get_rate(host->fclk), ios->clock);
|
|
- if (dsor > 250)
|
|
|
|
- dsor = 250;
|
|
|
|
|
|
+ if (dsor > CLKD_MAX)
|
|
|
|
+ dsor = CLKD_MAX;
|
|
}
|
|
}
|
|
|
|
|
|
return dsor;
|
|
return dsor;
|