pxa2xx_cm_x2xx.c 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  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. #include <linux/module.h>
  13. #include <asm/mach-types.h>
  14. #include <mach/hardware.h>
  15. int cmx255_pcmcia_init(void);
  16. int cmx270_pcmcia_init(void);
  17. void cmx255_pcmcia_exit(void);
  18. void cmx270_pcmcia_exit(void);
  19. static int __init cmx2xx_pcmcia_init(void)
  20. {
  21. int ret = -ENODEV;
  22. if (machine_is_armcore() && cpu_is_pxa25x())
  23. ret = cmx255_pcmcia_init();
  24. else if (machine_is_armcore() && cpu_is_pxa27x())
  25. ret = cmx270_pcmcia_init();
  26. return ret;
  27. }
  28. static void __exit cmx2xx_pcmcia_exit(void)
  29. {
  30. if (machine_is_armcore() && cpu_is_pxa25x())
  31. cmx255_pcmcia_exit();
  32. else if (machine_is_armcore() && cpu_is_pxa27x())
  33. cmx270_pcmcia_exit();
  34. }
  35. module_init(cmx2xx_pcmcia_init);
  36. module_exit(cmx2xx_pcmcia_exit);
  37. MODULE_LICENSE("GPL");
  38. MODULE_AUTHOR("Mike Rapoport <mike@compulab.co.il>");
  39. MODULE_DESCRIPTION("CM-x2xx PCMCIA driver");