~ubuntu-branches/ubuntu/saucy/linux-ti-omap4/saucy-proposed

« back to all changes in this revision

Viewing changes to drivers/mmc/core/core.c

  • Committer: Package Import Robot
  • Author(s): Paolo Pisati, Paolo Pisati, Stefan Bader, Upstream Kernel Changes
  • Date: 2012-08-15 17:17:43 UTC
  • Revision ID: package-import@ubuntu.com-20120815171743-h5wnuf51xe7pvdid
Tags: 3.5.0-207.13
[ Paolo Pisati ]

* Start new release

[ Stefan Bader ]

* (config) Enable getabis to use local package copies

[ Upstream Kernel Changes ]

* fixup: gargabe collect iva_seq[0|1] init
* [Config] enable all SND_OMAP_SOC_*s
* fixup: cm2xxx_3xxx.o is needed for omap2_cm_read|write_reg
* fixup: add some snd_soc_dai* helper functions
* fixup: s/snd_soc_dpcm_params/snd_soc_dpcm/g
* fixup: typo, no_host_mode and useless SDP4430 init
* fixup: enable again aess hwmod

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
#include "sdio_ops.h"
44
44
 
45
45
static struct workqueue_struct *workqueue;
 
46
static const unsigned freqs[] = { 400000, 300000, 200000, 100000 };
46
47
 
47
48
/*
48
49
 * Enabling software CRCs on the data blocks can be a significant (30%)
1158
1159
{
1159
1160
        int bit;
1160
1161
 
 
1162
        if (host->ios.power_mode == MMC_POWER_ON)
 
1163
                return;
 
1164
 
1161
1165
        mmc_host_clk_hold(host);
1162
1166
 
1163
1167
        /* If ocr is set, we use it */
1200
1204
void mmc_power_off(struct mmc_host *host)
1201
1205
{
1202
1206
        int err = 0;
 
1207
 
 
1208
        if (host->ios.power_mode == MMC_POWER_OFF)
 
1209
                return;
 
1210
 
1203
1211
        mmc_host_clk_hold(host);
1204
1212
 
1205
1213
        host->ios.clock = 0;
2038
2046
 
2039
2047
void mmc_rescan(struct work_struct *work)
2040
2048
{
2041
 
        static const unsigned freqs[] = { 400000, 300000, 200000, 100000 };
2042
2049
        struct mmc_host *host =
2043
2050
                container_of(work, struct mmc_host, detect.work);
2044
2051
        int i;
2087
2094
         */
2088
2095
        mmc_bus_put(host);
2089
2096
 
2090
 
        if (host->ops->get_cd && host->ops->get_cd(host) == 0)
 
2097
        if (host->ops->get_cd && host->ops->get_cd(host) == 0) {
 
2098
                mmc_claim_host(host);
 
2099
                mmc_power_off(host);
 
2100
                mmc_release_host(host);
2091
2101
                goto out;
 
2102
        }
2092
2103
 
2093
2104
        mmc_claim_host(host);
2094
2105
        for (i = 0; i < ARRAY_SIZE(freqs); i++) {
2114
2125
 
2115
2126
void mmc_start_host(struct mmc_host *host)
2116
2127
{
2117
 
        mmc_power_off(host);
 
2128
        host->f_init = max(freqs[0], host->f_min);
 
2129
        mmc_power_up(host);
2118
2130
        mmc_detect_change(host, 0);
2119
2131
}
2120
2132