X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;ds=sidebyside;f=cpu%2Fppc4xx%2Fusbdev.c;h=d71ba7710a0e54df87560f0be66ce773021a4376;hb=6e9233d30afe57cb6e148fbfa4895e7810196fac;hp=4741f73197bca4c934050e22f0ff203e639eeedd;hpb=c04a76e6f038ea560f39214f9737974d91742fa8;p=oweals%2Fu-boot.git diff --git a/cpu/ppc4xx/usbdev.c b/cpu/ppc4xx/usbdev.c index 4741f73197..d71ba7710a 100644 --- a/cpu/ppc4xx/usbdev.c +++ b/cpu/ppc4xx/usbdev.c @@ -3,11 +3,11 @@ #include #include -#ifdef CONFIG_440_EP +#if (defined(CONFIG_440EP) || defined(CONFIG_440EPX)) && defined(CONFIG_CMD_USB) #include #include "usbdev.h" -#include "vecnum.h" +#include #define USB_DT_DEVICE 0x01 #define USB_DT_CONFIG 0x02 @@ -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_440_EP */ +#endif /* CONFIG_440EP || CONFIG_440EPX */