Lines Matching defs:p_dev

140 	struct pcmcia_device *p_dev;
141 int (*conf_check) (struct pcmcia_device *p_dev, void *priv_data);
157 struct pcmcia_device *p_dev = cfg_mem->p_dev;
160 unsigned int flags = p_dev->config_flags;
161 unsigned int vcc = p_dev->socket->socket.Vcc;
163 dev_dbg(&p_dev->dev, "testing configuration %x, autoconf %x\n",
167 cfg_mem->p_dev->config_index = cfg->index;
185 p_dev->vpp = cfg->vpp1.param[CISTPL_POWER_VNOM] / 10000;
187 p_dev->vpp =
193 p_dev->config_flags |= CONF_ENABLE_SPKR;
201 p_dev->resource[0]->start = p_dev->resource[0]->end = 0;
202 p_dev->resource[1]->start = p_dev->resource[1]->end = 0;
206 p_dev->resource[0]->flags &= ~IO_DATA_PATH_WIDTH;
207 p_dev->resource[0]->flags |=
214 p_dev->resource[1]->flags = p_dev->resource[0]->flags;
215 p_dev->resource[1]->start = io->win[1-i].base;
216 p_dev->resource[1]->end = io->win[1-i].len;
218 p_dev->resource[0]->start = io->win[i].base;
219 p_dev->resource[0]->end = io->win[i].len;
220 p_dev->io_lines = io->flags & CISTPL_IO_LINES_MASK;
228 p_dev->resource[2]->start = p_dev->resource[2]->end = 0;
232 p_dev->resource[2]->start = mem->win[0].host_addr;
233 p_dev->resource[2]->end = mem->win[0].len;
234 if (p_dev->resource[2]->end < 0x1000)
235 p_dev->resource[2]->end = 0x1000;
236 p_dev->card_addr = mem->win[0].card_addr;
239 dev_dbg(&p_dev->dev,
241 p_dev->config_index, p_dev->resource[0], p_dev->resource[1],
242 p_dev->resource[2], p_dev->io_lines);
244 return cfg_mem->conf_check(p_dev, cfg_mem->priv_data);
249 * @p_dev: the struct pcmcia_device which we need to loop for.
259 int pcmcia_loop_config(struct pcmcia_device *p_dev,
260 int (*conf_check) (struct pcmcia_device *p_dev,
271 cfg_mem->p_dev = p_dev;
275 ret = pccard_loop_tuple(p_dev->socket, p_dev->func,
286 struct pcmcia_device *p_dev;
288 int (*loop_tuple) (struct pcmcia_device *p_dev,
304 return loop->loop_tuple(loop->p_dev, tuple, loop->priv_data);
309 * @p_dev: the struct pcmcia_device which we need to loop for.
319 int pcmcia_loop_tuple(struct pcmcia_device *p_dev, cisdata_t code,
320 int (*loop_tuple) (struct pcmcia_device *p_dev,
326 .p_dev = p_dev,
330 return pccard_loop_tuple(p_dev->socket, p_dev->func, code, NULL,
350 static int pcmcia_do_get_tuple(struct pcmcia_device *p_dev, tuple_t *tuple,
360 dev_dbg(&p_dev->dev, "do_get_tuple: out of memory\n");
366 * @p_dev: the struct pcmcia_device which we need to loop for.
374 size_t pcmcia_get_tuple(struct pcmcia_device *p_dev, cisdata_t code,
383 pcmcia_loop_tuple(p_dev, code, pcmcia_do_get_tuple, &get);
398 static int pcmcia_do_get_mac(struct pcmcia_device *p_dev, tuple_t *tuple,
406 dev_warn(&p_dev->dev, "Invalid CIS tuple length for "
412 dev_warn(&p_dev->dev, "Invalid header for LAN_NODE_ID\n");
421 * @p_dev: the struct pcmcia_device for which we want the address.
428 int pcmcia_get_mac_from_cis(struct pcmcia_device *p_dev, struct net_device *dev)
430 return pcmcia_loop_tuple(p_dev, CISTPL_FUNCE, pcmcia_do_get_mac, dev);