28 #include <linux/module.h>
29 #include <linux/kernel.h>
30 #include <linux/sched.h>
32 #include <linux/errno.h>
34 #include <linux/slab.h>
44 #define SZ_1K 0x00000400
45 #define SZ_8K 0x00002000
46 #define SZ_2K (2 * SZ_1K)
48 #define POLL_INTERVAL (2 * HZ)
50 #define CF_ATASEL_ENA 0x20311802
51 #define CF_ATASEL_DIS 0x20311800
53 #define bfin_cf_present(pfx) (gpio_get_value(pfx))
74 static int bfin_cf_reset(
void)
89 static void bfin_cf_timer(
unsigned long _cf)
97 present ?
"present" :
"gone");
147 dev_dbg(&cf->
pdev->dev,
": Vcc %d, io_irq %d, flags %04x csc %04x\n",
188 .init = bfin_cf_ss_init,
189 .suspend = bfin_cf_ss_suspend,
190 .get_status = bfin_cf_get_status,
191 .set_socket = bfin_cf_set_socket,
192 .set_io_map = bfin_cf_set_io_map,
193 .set_mem_map = bfin_cf_set_mem_map,
203 unsigned short cd_pfx;
206 dev_info(&pdev->
dev,
"Blackfin CompactFlash/PCMCIA Socket Driver\n");
216 "Failed ro request Card Detect GPIO_%d\n",
233 platform_set_drvdata(pdev, cf);
243 if (!io_mem || !attr_mem)
253 if (!cf->
socket.io_offset)
263 cf->
socket.ops = &bfin_cf_ops;
284 platform_set_drvdata(pdev,
NULL);
299 platform_set_drvdata(pdev,
NULL);
309 .
probe = bfin_cf_probe,