pxa2xx_cm_x2xx.c 1.1 KB

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