Thomas Gleixner | d2912cb | 2019-06-04 10:11:33 +0200 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0-only |
Mike Rapoport | 8616e2f | 2008-10-05 10:27:22 +0100 | [diff] [blame] | 2 | /* |
| 3 | * linux/drivers/pcmcia/pxa/pxa_cm_x2xx.c |
| 4 | * |
Mike Rapoport | 8616e2f | 2008-10-05 10:27:22 +0100 | [diff] [blame] | 5 | * Compulab Ltd., 2003, 2007, 2008 |
| 6 | * Mike Rapoport <mike@compulab.co.il> |
Mike Rapoport | 8616e2f | 2008-10-05 10:27:22 +0100 | [diff] [blame] | 7 | */ |
| 8 | |
| 9 | #include <linux/module.h> |
| 10 | |
Mike Rapoport | 8616e2f | 2008-10-05 10:27:22 +0100 | [diff] [blame] | 11 | #include <asm/mach-types.h> |
Russell King | 7a3f8de | 2011-11-05 22:06:17 +0000 | [diff] [blame] | 12 | #include <mach/hardware.h> |
Mike Rapoport | 8616e2f | 2008-10-05 10:27:22 +0100 | [diff] [blame] | 13 | |
| 14 | int cmx255_pcmcia_init(void); |
| 15 | int cmx270_pcmcia_init(void); |
| 16 | void cmx255_pcmcia_exit(void); |
| 17 | void cmx270_pcmcia_exit(void); |
| 18 | |
| 19 | static int __init cmx2xx_pcmcia_init(void) |
| 20 | { |
| 21 | int ret = -ENODEV; |
| 22 | |
| 23 | if (machine_is_armcore() && cpu_is_pxa25x()) |
| 24 | ret = cmx255_pcmcia_init(); |
| 25 | else if (machine_is_armcore() && cpu_is_pxa27x()) |
| 26 | ret = cmx270_pcmcia_init(); |
| 27 | |
| 28 | return ret; |
| 29 | } |
| 30 | |
| 31 | static void __exit cmx2xx_pcmcia_exit(void) |
| 32 | { |
| 33 | if (machine_is_armcore() && cpu_is_pxa25x()) |
| 34 | cmx255_pcmcia_exit(); |
| 35 | else if (machine_is_armcore() && cpu_is_pxa27x()) |
| 36 | cmx270_pcmcia_exit(); |
| 37 | } |
| 38 | |
| 39 | module_init(cmx2xx_pcmcia_init); |
| 40 | module_exit(cmx2xx_pcmcia_exit); |
| 41 | |
| 42 | MODULE_LICENSE("GPL"); |
| 43 | MODULE_AUTHOR("Mike Rapoport <mike@compulab.co.il>"); |
| 44 | MODULE_DESCRIPTION("CM-x2xx PCMCIA driver"); |