blob: 6e7dcfd22ede8c5696cb68b80528bb94ddf9b2f1 [file] [log] [blame]
Mike Rapoport8616e2f2008-10-05 10:27:22 +01001/*
2 * linux/drivers/pcmcia/pxa/pxa_cm_x2xx.c
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 *
8 * Compulab Ltd., 2003, 2007, 2008
9 * Mike Rapoport <mike@compulab.co.il>
10 *
11 */
12
13#include <linux/module.h>
14
Mike Rapoport8616e2f2008-10-05 10:27:22 +010015#include <asm/mach-types.h>
Russell King7a3f8de2011-11-05 22:06:17 +000016#include <mach/hardware.h>
Mike Rapoport8616e2f2008-10-05 10:27:22 +010017
18int cmx255_pcmcia_init(void);
19int cmx270_pcmcia_init(void);
20void cmx255_pcmcia_exit(void);
21void cmx270_pcmcia_exit(void);
22
23static int __init cmx2xx_pcmcia_init(void)
24{
25 int ret = -ENODEV;
26
27 if (machine_is_armcore() && cpu_is_pxa25x())
28 ret = cmx255_pcmcia_init();
29 else if (machine_is_armcore() && cpu_is_pxa27x())
30 ret = cmx270_pcmcia_init();
31
32 return ret;
33}
34
35static void __exit cmx2xx_pcmcia_exit(void)
36{
37 if (machine_is_armcore() && cpu_is_pxa25x())
38 cmx255_pcmcia_exit();
39 else if (machine_is_armcore() && cpu_is_pxa27x())
40 cmx270_pcmcia_exit();
41}
42
43module_init(cmx2xx_pcmcia_init);
44module_exit(cmx2xx_pcmcia_exit);
45
46MODULE_LICENSE("GPL");
47MODULE_AUTHOR("Mike Rapoport <mike@compulab.co.il>");
48MODULE_DESCRIPTION("CM-x2xx PCMCIA driver");