diff options
| author | Wolfgang Denk <wd@pollux.denx.de> | 2006-11-27 16:13:00 +0100 |
|---|---|---|
| committer | Wolfgang Denk <wd@denx.de> | 2006-11-27 16:13:00 +0100 |
| commit | d3c5e8b2f5945d93de8f23b053e9dcd033983245 (patch) | |
| tree | 72c292c41bc0dfadd6f634fe03e697d8a4473487 /cpu/ppc4xx/usbdev.c | |
| parent | 98280e3d431db77d92219438b8840853bd7cb412 (diff) | |
| parent | a9398e018593782c5fa7d0741955fc1256b34c1e (diff) | |
| download | olio-uboot-2014.01-d3c5e8b2f5945d93de8f23b053e9dcd033983245.tar.xz olio-uboot-2014.01-d3c5e8b2f5945d93de8f23b053e9dcd033983245.zip | |
Merge with /home/wd/git/u-boot/master
Diffstat (limited to 'cpu/ppc4xx/usbdev.c')
| -rw-r--r-- | cpu/ppc4xx/usbdev.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/cpu/ppc4xx/usbdev.c b/cpu/ppc4xx/usbdev.c index 8262c54be..6140d2a90 100644 --- a/cpu/ppc4xx/usbdev.c +++ b/cpu/ppc4xx/usbdev.c @@ -3,7 +3,7 @@ #include <common.h> #include <asm/processor.h> -#ifdef CONFIG_440EP +#if (defined(CONFIG_440EP) || defined(CONFIG_440EPX)) && (CONFIG_COMMANDS & CFG_CMD_USB) #include <usb.h> #include "usbdev.h" @@ -186,6 +186,21 @@ int usbInt(void) return 0; } +#if defined(CONFIG_440EPX) +void usb_dev_init() +{ + printf("USB 2.0 Device init\n"); + + /*usb dev init */ + *(unsigned char *)USB2D0_POWER_8 = 0xa1; /* 2.0 */ + + /*enable interrupts */ + *(unsigned char *)USB2D0_INTRUSBE_8 = 0x0f; + + irq_install_handler(VECNUM_HSB2D, (interrupt_handler_t *) usbInt, + NULL); +} +#else void usb_dev_init() { #ifdef USB_2_0_DEVICE @@ -210,5 +225,6 @@ void usb_dev_init() irq_install_handler(VECNUM_USBDEV, (interrupt_handler_t *) usbInt, NULL); } +#endif -#endif /*CONFIG_440EP */ +#endif /* CONFIG_440EP || CONFIG_440EPX */ |