diff options
Diffstat (limited to 'drivers/usb/host')
-rw-r--r-- | drivers/usb/host/sl811_cs.c | 24 |
1 files changed, 3 insertions, 21 deletions
diff --git a/drivers/usb/host/sl811_cs.c b/drivers/usb/host/sl811_cs.c index 744c2cd809f1..d9606293c1af 100644 --- a/drivers/usb/host/sl811_cs.c +++ b/drivers/usb/host/sl811_cs.c | |||
@@ -134,32 +134,11 @@ static void sl811_cs_release(struct pcmcia_device * link) | |||
134 | static int sl811_cs_config_check(struct pcmcia_device *p_dev, | 134 | static int sl811_cs_config_check(struct pcmcia_device *p_dev, |
135 | cistpl_cftable_entry_t *cfg, | 135 | cistpl_cftable_entry_t *cfg, |
136 | cistpl_cftable_entry_t *dflt, | 136 | cistpl_cftable_entry_t *dflt, |
137 | unsigned int vcc, | ||
138 | void *priv_data) | 137 | void *priv_data) |
139 | { | 138 | { |
140 | if (cfg->index == 0) | 139 | if (cfg->index == 0) |
141 | return -ENODEV; | 140 | return -ENODEV; |
142 | 141 | ||
143 | /* Use power settings for Vcc and Vpp if present */ | ||
144 | /* Note that the CIS values need to be rescaled */ | ||
145 | if (cfg->vcc.present & (1<<CISTPL_POWER_VNOM)) { | ||
146 | if (cfg->vcc.param[CISTPL_POWER_VNOM]/10000 != vcc) | ||
147 | return -ENODEV; | ||
148 | } else if (dflt->vcc.present & (1<<CISTPL_POWER_VNOM)) { | ||
149 | if (dflt->vcc.param[CISTPL_POWER_VNOM]/10000 != vcc) | ||
150 | return -ENODEV; | ||
151 | } | ||
152 | |||
153 | if (cfg->vpp1.present & (1<<CISTPL_POWER_VNOM)) | ||
154 | p_dev->vpp = | ||
155 | cfg->vpp1.param[CISTPL_POWER_VNOM]/10000; | ||
156 | else if (dflt->vpp1.present & (1<<CISTPL_POWER_VNOM)) | ||
157 | p_dev->vpp = | ||
158 | dflt->vpp1.param[CISTPL_POWER_VNOM]/10000; | ||
159 | |||
160 | /* we need an interrupt */ | ||
161 | p_dev->config_flags |= CONF_ENABLE_IRQ; | ||
162 | |||
163 | /* IO window settings */ | 142 | /* IO window settings */ |
164 | p_dev->resource[0]->end = p_dev->resource[1]->end = 0; | 143 | p_dev->resource[0]->end = p_dev->resource[1]->end = 0; |
165 | if ((cfg->io.nwin > 0) || (dflt->io.nwin > 0)) { | 144 | if ((cfg->io.nwin > 0) || (dflt->io.nwin > 0)) { |
@@ -184,6 +163,9 @@ static int sl811_cs_config(struct pcmcia_device *link) | |||
184 | 163 | ||
185 | dev_dbg(&link->dev, "sl811_cs_config\n"); | 164 | dev_dbg(&link->dev, "sl811_cs_config\n"); |
186 | 165 | ||
166 | link->config_flags |= CONF_ENABLE_IRQ | CONF_AUTO_SET_VPP | | ||
167 | CONF_AUTO_CHECK_VCC; | ||
168 | |||
187 | if (pcmcia_loop_config(link, sl811_cs_config_check, NULL)) | 169 | if (pcmcia_loop_config(link, sl811_cs_config_check, NULL)) |
188 | goto failed; | 170 | goto failed; |
189 | 171 | ||