wtf, for some devices {s,g}et_configuration works:
authorBernhard Urban <lewurm@gmx.net>
Wed, 23 Sep 2009 04:04:48 +0000 (06:04 +0200)
committerBernhard Urban <lewurm@gmx.net>
Wed, 23 Sep 2009 04:16:49 +0000 (06:16 +0200)
o internal usb bluetooth dongle
o "Driving Force Pro" from Logitech
o USB RF Remote Receiver

do not work:
o Compaq USB Keyboard
o Gameport to USB adaptor
o Logitech USB mouse
o 2 various USB sticks
o Hercules DJ Control MP3
o Hauppauge Nova-T DVB-T stick

a Microsoft Sidewinder Wheel also don't work, but the Endpoint will
halt and output this:

>>>>>>>>
usb_set_configuration(ret: 0): 1
halted!
n: 0x800D6890
n(after) hexdump (32) @ 0x800D6890:
00000000  00 00 ec 03 00 00 00 00 00 00 00 00 00 00 00 00  ................
00000010  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
**************** dbg_td_flag: 0x03EC0000 ***************
CC: 0 should be 0, see page 32 (ohci spec)
EC: 0 see page 20 (ohci spec)
 T: 3
DI: 7
DP: 1
 R: 1
********************************************************
prev: 0x800D6860
prev(after) hexdump (32) @ 0x800D6860:
00000000  00 00 f4 40 30 6e 01 00 20 68 0d 00 33 6e 01 00  ...@0n.. h..3n..
00000010  80 01 6e 30 00 00 00 04 00 00 00 00 00 00 00 00  ..n0............
prev->bufaddr(after) hexdump (4) @ 0x80016E30:
00000000  80 08 00 00                                      ....
**************** dbg_td_flag: 0x40F40000 ***************
CC: 4 should be 0, see page 32 (ohci spec)
EC: 0 see page 20 (ohci spec)
 T: 0
DI: 7
DP: 2
 R: 1
********************************************************
halted end!
=============
after usb_get_configuration:
00000000  80                                               .
=============
usb_get_configuration: 128
<<<<<<<<

where CC=4 means "DataOverrun". However, I don't think this information
is useful :/

main.c
usb/core/core.c

diff --git a/main.c b/main.c
index e9dc2079128a0a34cba289735a14b2d3967a224d..e2a51e95566d2ea00c33aec6983a22dc6f82102c 100644 (file)
--- a/main.c
+++ b/main.c
@@ -88,7 +88,10 @@ int main(void)
        irq_initialize();
        irq_bw_enable(BW_PI_IRQ_RESET);
        irq_bw_enable(BW_PI_IRQ_HW); //hollywood pic
+       /* external ohci */
        irq_hw_enable(IRQ_OHCI0);
+       /* internal ohci */
+       //irq_hw_enable(IRQ_OHCI1);
 
        ipc_initialize();
        ipc_slowping();
@@ -114,8 +117,10 @@ int main(void)
                        ; // better ideas welcome!
        }
 
+       /* external ohci */
        usb_init(OHCI0_REG_BASE);
-       usb_init(OHCI1_REG_BASE);
+       /* internal ohci */
+       //usb_init(OHCI1_REG_BASE);
 
        /*
     print_str_noscroll(112, 112, "ohai, world!\n");
index 34a853798119dc19125ae54804a8514988b4551d..be99b29533099ea5e86a130b5e5c43c2704a2315 100644 (file)
@@ -112,7 +112,7 @@ struct usb_device *usb_add_device(u8 lowspeed, u32 reg)
                return (void*) -1;
        }
 
-//#define WTF
+#define WTF
 #ifdef WTF
        printf("lololololool PADDING WTF :O lolololololo \n");
        printf("lololololool PADDING WTF :O lolololololo \n");
@@ -160,12 +160,10 @@ struct usb_device *usb_add_device(u8 lowspeed, u32 reg)
        /* print device info */
        lsusb(dev);
 
-#if 0
        /* select configuration */
        ret = usb_set_configuration(dev, dev->conf->bConfigurationValue);
-       printf("=============\nusb_set_configuration(ret: %d) %d\n", ret, dev->conf->bConfigurationValue);
+       printf("=============\nusb_set_configuration(ret: %d): %d\n", ret, dev->conf->bConfigurationValue);
        printf("=============\nusb_get_configuration: %d\n", usb_get_configuration(dev));
-#endif
 
 #if 0
        u8 buf[8];