Ian Molton | 32584c8 | 2008-07-10 20:16:35 +0100 | [diff] [blame] | 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 | |
| 13 | #include <linux/kernel.h> |
| 14 | #include <linux/init.h> |
| 15 | #include <linux/device.h> |
| 16 | |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame^] | 17 | #include <mach/udc.h> |
| 18 | #include <mach/eseries-gpio.h> |
| 19 | #include <mach/hardware.h> |
| 20 | #include <mach/pxa-regs.h> |
Ian Molton | 32584c8 | 2008-07-10 20:16:35 +0100 | [diff] [blame] | 21 | #include <asm/mach/arch.h> |
| 22 | #include <asm/mach-types.h> |
| 23 | #include <asm/mach/map.h> |
| 24 | #include <asm/domain.h> |
| 25 | |
| 26 | /* local PXA generic code */ |
| 27 | #include "generic.h" |
| 28 | |
| 29 | static struct pxa2xx_udc_mach_info e7xx_udc_mach_info = { |
| 30 | .gpio_vbus = GPIO_E7XX_USB_DISC, |
| 31 | .gpio_pullup = GPIO_E7XX_USB_PULLUP, |
| 32 | .gpio_pullup_inverted = 1 |
| 33 | }; |
| 34 | |
| 35 | static struct pxa2xx_udc_mach_info e800_udc_mach_info = { |
| 36 | .gpio_vbus = GPIO_E800_USB_DISC, |
| 37 | .gpio_pullup = GPIO_E800_USB_PULLUP, |
| 38 | .gpio_pullup_inverted = 1 |
| 39 | }; |
| 40 | |
| 41 | static int __init eseries_udc_init(void) |
| 42 | { |
| 43 | if (machine_is_e330() || machine_is_e350() || |
| 44 | machine_is_e740() || machine_is_e750() || |
| 45 | machine_is_e400()) |
| 46 | pxa_set_udc_info(&e7xx_udc_mach_info); |
| 47 | else if (machine_is_e800()) |
| 48 | pxa_set_udc_info(&e800_udc_mach_info); |
| 49 | |
| 50 | return 0; |
| 51 | } |
| 52 | |
| 53 | module_init(eseries_udc_init); |
| 54 | |
| 55 | MODULE_AUTHOR("Ian Molton <spyro@f2s.com>"); |
| 56 | MODULE_DESCRIPTION("eseries UDC support"); |
| 57 | MODULE_LICENSE("GPLv2"); |