23 #include <linux/module.h>
24 #include <linux/kernel.h>
25 #include <linux/sched.h>
27 #include <linux/errno.h>
34 #include <linux/slab.h>
63 #define POLL_INTERVAL (2 * HZ)
80 static void electra_cf_timer(
unsigned long _cf)
83 int present = electra_cf_present(cf);
96 electra_cf_timer((
unsigned long)_cf);
110 if (electra_cf_present(cf)) {
145 gpio |= 1 << (cf->
gpio_3v + 16);
146 gpio |= 1 << (cf->
gpio_5v + 16);
149 pr_debug(
"%s: Vcc %d, io_irq %d, flags %04x csc %04x\n",
177 .init = electra_cf_ss_init,
178 .get_status = electra_cf_get_status,
179 .set_socket = electra_cf_set_socket,
180 .set_io_map = electra_cf_set_io_map,
181 .set_mem_map = electra_cf_set_mem_map,
191 const unsigned int *prop;
228 dev_err(device,
"can't ioremap ranges\n");
245 dev_err(device,
"request_irq failed\n");
276 dev_err(device,
"Can't claim memory region\n");
282 dev_err(device,
"Can't claim I/O region\n");
288 cf->
socket.ops = &electra_cf_ops;
292 cf->
socket.map_size = 0x800;
296 dev_err(device,
"pcmcia_register_socket failed\n");
300 dev_info(device,
"at mem 0x%lx io 0x%llx irq %d\n",
304 electra_cf_timer((
unsigned long)cf);
329 struct device *device = &ofdev->
dev;
352 .compatible =
"electra-cf",
362 .of_match_table = electra_cf_match,
364 .
probe = electra_cf_probe,
365 .
remove = electra_cf_remove,