Lines Matching refs:pdev

155 static int pcmcia_check_one_config(struct pcmcia_device *pdev, void *priv_data)
159 if ((pdev->resource[0]->flags & IO_DATA_PATH_WIDTH)
161 pdev->resource[0]->flags &= ~IO_DATA_PATH_WIDTH;
162 pdev->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO;
164 pdev->resource[1]->flags &= ~IO_DATA_PATH_WIDTH;
165 pdev->resource[1]->flags |= IO_DATA_PATH_WIDTH_8;
167 if (pdev->resource[1]->end) {
168 pdev->resource[0]->end = 8;
169 pdev->resource[1]->end = (*is_kme) ? 2 : 1;
171 if (pdev->resource[0]->end < 16)
175 return pcmcia_request_io(pdev);
180 * @pdev: pcmcia device
186 static int pcmcia_init_one(struct pcmcia_device *pdev)
197 pdev->config_flags |= CONF_ENABLE_IRQ | CONF_AUTO_SET_IO |
202 is_kme = ((pdev->manf_id == MANFID_KME) &&
203 ((pdev->card_id == PRODID_KME_KXLC005_A) ||
204 (pdev->card_id == PRODID_KME_KXLC005_B)));
206 if (pcmcia_loop_config(pdev, pcmcia_check_one_config, &is_kme)) {
207 pdev->config_flags &= ~CONF_AUTO_CHECK_VCC;
208 if (pcmcia_loop_config(pdev, pcmcia_check_one_config, &is_kme))
211 io_base = pdev->resource[0]->start;
212 if (pdev->resource[1]->end)
213 ctl_base = pdev->resource[1]->start;
215 ctl_base = pdev->resource[0]->start + 0x0e;
217 if (!pdev->irq)
220 ret = pcmcia_enable_device(pdev);
226 io_addr = devm_ioport_map(&pdev->dev, io_base, 8);
227 ctl_addr = devm_ioport_map(&pdev->dev, ctl_base, 1);
238 if (resource_size(pdev->resource[0]) >= 0x20)
241 if (pdev->manf_id == 0x0097 && pdev->card_id == 0x1620)
248 host = ata_host_alloc(&pdev->dev, n_ports);
267 ret = ata_host_activate(host, pdev->irq, ata_sff_interrupt,
272 pdev->priv = host;
276 pcmcia_disable_device(pdev);
282 * @pdev: pcmcia device
288 static void pcmcia_remove_one(struct pcmcia_device *pdev)
290 struct ata_host *host = pdev->priv;
295 pcmcia_disable_device(pdev);