123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135 |
- #include <linux/module.h>
- #include <linux/init.h>
- #include <linux/slab.h>
- #include <linux/platform_device.h>
- #include <pcmcia/ss.h>
- #include <asm/hardware/scoop.h>
- #include "sa1100_generic.h"
- int __init pcmcia_collie_init(struct device *dev);
- static int (*sa11x0_pcmcia_hw_init[])(struct device *dev) = {
- #ifdef CONFIG_SA1100_ASSABET
- pcmcia_assabet_init,
- #endif
- #ifdef CONFIG_SA1100_CERF
- pcmcia_cerf_init,
- #endif
- #if defined(CONFIG_SA1100_H3100) || defined(CONFIG_SA1100_H3600)
- pcmcia_h3600_init,
- #endif
- #ifdef CONFIG_SA1100_NANOENGINE
- pcmcia_nanoengine_init,
- #endif
- #ifdef CONFIG_SA1100_SHANNON
- pcmcia_shannon_init,
- #endif
- #ifdef CONFIG_SA1100_SIMPAD
- pcmcia_simpad_init,
- #endif
- #ifdef CONFIG_SA1100_COLLIE
- pcmcia_collie_init,
- #endif
- };
- static int sa11x0_drv_pcmcia_probe(struct platform_device *dev)
- {
- int i, ret = -ENODEV;
-
- for (i = 0; i < ARRAY_SIZE(sa11x0_pcmcia_hw_init); i++) {
- ret = sa11x0_pcmcia_hw_init[i](&dev->dev);
- if (ret == 0)
- break;
- }
- return ret;
- }
- static int sa11x0_drv_pcmcia_remove(struct platform_device *dev)
- {
- struct skt_dev_info *sinfo = platform_get_drvdata(dev);
- int i;
- platform_set_drvdata(dev, NULL);
- for (i = 0; i < sinfo->nskt; i++)
- soc_pcmcia_remove_one(&sinfo->skt[i]);
- return 0;
- }
- static struct platform_driver sa11x0_pcmcia_driver = {
- .driver = {
- .name = "sa11x0-pcmcia",
- },
- .probe = sa11x0_drv_pcmcia_probe,
- .remove = sa11x0_drv_pcmcia_remove,
- };
- static int __init sa11x0_pcmcia_init(void)
- {
- return platform_driver_register(&sa11x0_pcmcia_driver);
- }
- static void __exit sa11x0_pcmcia_exit(void)
- {
- platform_driver_unregister(&sa11x0_pcmcia_driver);
- }
- MODULE_AUTHOR("John Dorsey <john+@cs.cmu.edu>");
- MODULE_DESCRIPTION("Linux PCMCIA Card Services: SA-11x0 Socket Controller");
- MODULE_LICENSE("Dual MPL/GPL");
- fs_initcall(sa11x0_pcmcia_init);
- module_exit(sa11x0_pcmcia_exit);
|