pxa2xx_cm_x2xx.c 997 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. // SPDX-License-Identifier: GPL-2.0-only
  2. /*
  3. * linux/drivers/pcmcia/pxa/pxa_cm_x2xx.c
  4. *
  5. * Compulab Ltd., 2003, 2007, 2008
  6. * Mike Rapoport <mike@compulab.co.il>
  7. */
  8. #include <linux/module.h>
  9. #include <asm/mach-types.h>
  10. #include <mach/hardware.h>
  11. int cmx255_pcmcia_init(void);
  12. int cmx270_pcmcia_init(void);
  13. void cmx255_pcmcia_exit(void);
  14. void cmx270_pcmcia_exit(void);
  15. static int __init cmx2xx_pcmcia_init(void)
  16. {
  17. int ret = -ENODEV;
  18. if (machine_is_armcore() && cpu_is_pxa25x())
  19. ret = cmx255_pcmcia_init();
  20. else if (machine_is_armcore() && cpu_is_pxa27x())
  21. ret = cmx270_pcmcia_init();
  22. return ret;
  23. }
  24. static void __exit cmx2xx_pcmcia_exit(void)
  25. {
  26. if (machine_is_armcore() && cpu_is_pxa25x())
  27. cmx255_pcmcia_exit();
  28. else if (machine_is_armcore() && cpu_is_pxa27x())
  29. cmx270_pcmcia_exit();
  30. }
  31. module_init(cmx2xx_pcmcia_init);
  32. module_exit(cmx2xx_pcmcia_exit);
  33. MODULE_LICENSE("GPL");
  34. MODULE_AUTHOR("Mike Rapoport <mike@compulab.co.il>");
  35. MODULE_DESCRIPTION("CM-x2xx PCMCIA driver");