summaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pcmcia')
-rw-r--r--drivers/pcmcia/Kconfig3
-rw-r--r--drivers/pcmcia/omap_cf.c38
2 files changed, 9 insertions, 32 deletions
diff --git a/drivers/pcmcia/Kconfig b/drivers/pcmcia/Kconfig
index 2ce261cfff8e..ec977f031bc2 100644
--- a/drivers/pcmcia/Kconfig
+++ b/drivers/pcmcia/Kconfig
@@ -246,7 +246,8 @@ config PCMCIA_VRC4171
config OMAP_CF
tristate "OMAP CompactFlash Controller"
- depends on PCMCIA && ARCH_OMAP16XX
+ depends on PCMCIA
+ depends on ARCH_OMAP16XX || (ARM && COMPILE_TEST)
help
Say Y here to support the CompactFlash controller on OMAP.
Note that this doesn't support "True IDE" mode.
diff --git a/drivers/pcmcia/omap_cf.c b/drivers/pcmcia/omap_cf.c
index f0b2c2d03469..093022ce7d91 100644
--- a/drivers/pcmcia/omap_cf.c
+++ b/drivers/pcmcia/omap_cf.c
@@ -16,13 +16,12 @@
#include <pcmcia/ss.h>
-#include <mach/hardware.h>
#include <asm/io.h>
#include <linux/sizes.h>
-#include <mach/mux.h>
-#include <mach/tc.h>
-
+#include <linux/soc/ti/omap1-io.h>
+#include <linux/soc/ti/omap1-soc.h>
+#include <linux/soc/ti/omap1-mux.h>
/* NOTE: don't expect this to support many I/O cards. The 16xx chips have
* hard-wired timings to support Compact Flash memory cards; they won't work
@@ -205,6 +204,7 @@ static int __init omap_cf_probe(struct platform_device *pdev)
struct omap_cf_socket *cf;
int irq;
int status;
+ struct resource *res;
seg = (int) pdev->dev.platform_data;
if (seg == 0 || seg > 3)
@@ -215,6 +215,8 @@ static int __init omap_cf_probe(struct platform_device *pdev)
if (irq < 0)
return -EINVAL;
+ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+
cf = kzalloc(sizeof *cf, GFP_KERNEL);
if (!cf)
return -ENOMEM;
@@ -230,24 +232,7 @@ static int __init omap_cf_probe(struct platform_device *pdev)
goto fail0;
cf->irq = irq;
cf->socket.pci_irq = irq;
-
- switch (seg) {
- /* NOTE: CS0 could be configured too ... */
- case 1:
- cf->phys_cf = OMAP_CS1_PHYS;
- break;
- case 2:
- cf->phys_cf = OMAP_CS2_PHYS;
- break;
- case 3:
- cf->phys_cf = omap_cs3_phys();
- break;
- default:
- goto fail1;
- }
- cf->iomem.start = cf->phys_cf;
- cf->iomem.end = cf->iomem.end + SZ_8K - 1;
- cf->iomem.flags = IORESOURCE_MEM;
+ cf->phys_cf = res->start;
/* pcmcia layer only remaps "real" memory */
cf->socket.io_offset = (unsigned long)
@@ -273,15 +258,6 @@ static int __init omap_cf_probe(struct platform_device *pdev)
pr_info("%s: cs%d on irq %d\n", driver_name, seg, irq);
- /* NOTE: better EMIFS setup might support more cards; but the
- * TRM only shows how to affect regular flash signals, not their
- * CF/PCMCIA variants...
- */
- pr_debug("%s: cs%d, previous ccs %08x acs %08x\n", driver_name,
- seg, omap_readl(EMIFS_CCS(seg)), omap_readl(EMIFS_ACS(seg)));
- omap_writel(0x0004a1b3, EMIFS_CCS(seg)); /* synch mode 4 etc */
- omap_writel(0x00000000, EMIFS_ACS(seg)); /* OE hold/setup */
-
/* CF uses armxor_ck, which is "always" available */
pr_debug("%s: sts %04x cfg %04x control %04x %s\n", driver_name,