Loading drivers/mmc/host/omap.c +26 −21 Original line number Diff line number Diff line Loading @@ -936,24 +936,20 @@ static void mmc_omap_power(struct mmc_omap_host *host, int on) } } static void mmc_omap_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) static int mmc_omap_calc_divisor(struct mmc_host *mmc, struct mmc_ios *ios) { struct mmc_omap_host *host = mmc_priv(mmc); int func_clk_rate = clk_get_rate(host->fclk); int dsor; int realclock, i; realclock = ios->clock; if (ios->clock == 0) dsor = 0; else { int func_clk_rate = clk_get_rate(host->fclk); return 0; dsor = func_clk_rate / realclock; dsor = func_clk_rate / ios->clock; if (dsor < 1) dsor = 1; if (func_clk_rate / dsor > realclock) if (func_clk_rate / dsor > ios->clock) dsor++; if (dsor > 250) Loading @@ -962,8 +958,20 @@ static void mmc_omap_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) if (ios->bus_width == MMC_BUS_WIDTH_4) dsor |= 1 << 15; return dsor; } static void mmc_omap_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) { struct mmc_omap_host *host = mmc_priv(mmc); int dsor; int i; dsor = mmc_omap_calc_divisor(mmc, ios); host->bus_mode = ios->bus_mode; host->hw_bus_mode = host->bus_mode; switch (ios->power_mode) { case MMC_POWER_OFF: mmc_omap_power(host, 0); Loading @@ -977,9 +985,6 @@ static void mmc_omap_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) break; } host->bus_mode = ios->bus_mode; host->hw_bus_mode = host->bus_mode; clk_enable(host->fclk); /* On insanely high arm_per frequencies something sometimes Loading Loading
drivers/mmc/host/omap.c +26 −21 Original line number Diff line number Diff line Loading @@ -936,24 +936,20 @@ static void mmc_omap_power(struct mmc_omap_host *host, int on) } } static void mmc_omap_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) static int mmc_omap_calc_divisor(struct mmc_host *mmc, struct mmc_ios *ios) { struct mmc_omap_host *host = mmc_priv(mmc); int func_clk_rate = clk_get_rate(host->fclk); int dsor; int realclock, i; realclock = ios->clock; if (ios->clock == 0) dsor = 0; else { int func_clk_rate = clk_get_rate(host->fclk); return 0; dsor = func_clk_rate / realclock; dsor = func_clk_rate / ios->clock; if (dsor < 1) dsor = 1; if (func_clk_rate / dsor > realclock) if (func_clk_rate / dsor > ios->clock) dsor++; if (dsor > 250) Loading @@ -962,8 +958,20 @@ static void mmc_omap_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) if (ios->bus_width == MMC_BUS_WIDTH_4) dsor |= 1 << 15; return dsor; } static void mmc_omap_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) { struct mmc_omap_host *host = mmc_priv(mmc); int dsor; int i; dsor = mmc_omap_calc_divisor(mmc, ios); host->bus_mode = ios->bus_mode; host->hw_bus_mode = host->bus_mode; switch (ios->power_mode) { case MMC_POWER_OFF: mmc_omap_power(host, 0); Loading @@ -977,9 +985,6 @@ static void mmc_omap_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) break; } host->bus_mode = ios->bus_mode; host->hw_bus_mode = host->bus_mode; clk_enable(host->fclk); /* On insanely high arm_per frequencies something sometimes Loading