3 * h4000 specific code for the pxa255 usb device controller.
7 #include <linux/module.h>
8 #include <linux/init.h>
9 #include <linux/platform_device.h>
10 #include <asm/arch/hardware.h>
11 #include <asm/arch/pxa-regs.h>
12 #include <asm/arch/udc.h>
13 #include <linux/soc/asic3_base.h>
14 #include <asm/arch/h4000-gpio.h>
15 #include <asm/arch/h4000-asic.h>
17 extern struct platform_device h4000_asic3
;
19 static void h4000_udc_command(int cmd
)
22 case PXA2XX_UDC_CMD_DISCONNECT
:
23 asic3_set_gpio_out_d(&h4000_asic3
.dev
,
26 case PXA2XX_UDC_CMD_CONNECT
:
27 asic3_set_gpio_out_d(&h4000_asic3
.dev
,
28 GPIOD_USB_PULLUP
, GPIOD_USB_PULLUP
);
31 printk("_udc_control: unknown command!\n");
36 static int h4000_udc_is_connected(void)
38 return (!(GET_H4000_GPIO(USB_DETECT_N
)));
41 static struct pxa2xx_udc_mach_info h4000_udc_info __initdata
= {
42 .udc_is_connected
= h4000_udc_is_connected
,
43 .udc_command
= h4000_udc_command
,
46 static int h4000_udc_probe(struct platform_device
* dev
)
48 pxa_set_udc_info(&h4000_udc_info
);
52 static struct platform_driver h4000_udc_driver
= {
56 .probe
= h4000_udc_probe
,
59 static int __init
h4000_udc_init(void)
61 return platform_driver_register(&h4000_udc_driver
);
64 module_init(h4000_udc_init
);
65 MODULE_LICENSE("GPL");