uboot-hxd8.patch
[u-boot-openmoko/mini2440.git] / board / hxd8 / udc.c
bloba15d41e8cc41fc05d6e8663fd92911a4996b7d13
2 #include <common.h>
3 #include <usbdcore.h>
4 #include <s3c2440.h>
6 #if defined(CONFIG_USB_DEVICE)
8 void udc_ctrl(enum usbd_event event, int param)
10 S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO();
12 switch (event) {
13 case UDC_CTRL_PULLUP_ENABLE:
14 if (param)
15 gpio->GPBDAT |= (1 << 9); /* GPB9 */
16 else
17 gpio->GPBDAT &= ~(1 << 9); /* GPB9 */
18 break;
19 case UDC_CTRL_500mA_ENABLE:
20 if (param)
21 gpio->GPADAT |= (1 << 0); /* GPA0 */
22 else
23 gpio->GPADAT &= ~(1 << 0); /* GPA0 */
24 break;
25 default:
26 break;
30 #endif /* CONFIG_USB_DEVICE */