eseries_udc.c 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /*
  2. * UDC functions for the Toshiba e-series PDAs
  3. *
  4. * Copyright (c) Ian Molton 2003
  5. *
  6. * This file is licensed under
  7. * the terms of the GNU General Public License version 2. This program
  8. * is licensed "as is" without any warranty of any kind, whether express
  9. * or implied.
  10. *
  11. */
  12. #include <linux/kernel.h>
  13. #include <linux/init.h>
  14. #include <linux/device.h>
  15. #include <asm/arch/udc.h>
  16. #include <asm/arch/eseries-gpio.h>
  17. #include <asm/arch/hardware.h>
  18. #include <asm/arch/pxa-regs.h>
  19. #include <asm/mach/arch.h>
  20. #include <asm/mach-types.h>
  21. #include <asm/mach/map.h>
  22. #include <asm/domain.h>
  23. /* local PXA generic code */
  24. #include "generic.h"
  25. static struct pxa2xx_udc_mach_info e7xx_udc_mach_info = {
  26. .gpio_vbus = GPIO_E7XX_USB_DISC,
  27. .gpio_pullup = GPIO_E7XX_USB_PULLUP,
  28. .gpio_pullup_inverted = 1
  29. };
  30. static struct pxa2xx_udc_mach_info e800_udc_mach_info = {
  31. .gpio_vbus = GPIO_E800_USB_DISC,
  32. .gpio_pullup = GPIO_E800_USB_PULLUP,
  33. .gpio_pullup_inverted = 1
  34. };
  35. static int __init eseries_udc_init(void)
  36. {
  37. if (machine_is_e330() || machine_is_e350() ||
  38. machine_is_e740() || machine_is_e750() ||
  39. machine_is_e400())
  40. pxa_set_udc_info(&e7xx_udc_mach_info);
  41. else if (machine_is_e800())
  42. pxa_set_udc_info(&e800_udc_mach_info);
  43. return 0;
  44. }
  45. module_init(eseries_udc_init);
  46. MODULE_AUTHOR("Ian Molton <spyro@f2s.com>");
  47. MODULE_DESCRIPTION("eseries UDC support");
  48. MODULE_LICENSE("GPLv2");