u-boot/common
Remy Bohmer 4886720844 fix USB initialisation procedure
The max packet size is encoded as 0,1,2,3 for 8,16,32,64 bytes.
At some places directly 8,16,32,64 was used instead of the encoded
value. Made a enum for the options to make this more clear and to help
preventing similar errors in the future.

After fixing this bug it became clear that another bug existed where
the 'pipe' is and-ed with PIPE_* flags, where it should have been
'usb_pipetype(pipe)', or even better usb_pipeint(pipe).

Also removed the triple 'get_device_descriptor' sequence, it has no use,
and Windows nor Linux behaves that way.
There is also a poll going on with a timeout when usb_control_msg() fails.
However, the poll is useless, because the flag will never be set on a error,
because there is no code that runs in a parallel that can set this flag.
Changed this to something more logical.

Tested on AT91SAM9261ek and compared the flow on the USB bus to what
Linux is doing. There is no difference anymore in the early initialisation
sequence.

Signed-off-by: Remy Bohmer <linux@bohmer.net>
Signed-off-by: Markus Klotzbuecher <mk@denx.de>
2008-10-14 16:42:44 +02:00
..
ACEX1K.c common: Move conditional compilation to Makefile 2008-08-13 01:40:38 +02:00
altera.c common: Move conditional compilation to Makefile 2008-08-13 01:40:38 +02:00
bedbug.c common: Move conditional compilation to Makefile 2008-08-13 01:40:38 +02:00
circbuf.c Add support for Siemens SX1 mobile phone; 2004-03-12 00:14:09 +00:00
cmd_ambapp.c Coding Style cleanup; update CHANGELOG 2008-04-13 09:59:26 -07:00
cmd_autoscript.c autoscr: Fix one-character lines and non-newline terminated scripts 2008-09-10 11:09:39 +02:00
cmd_bdinfo.c rename CFG_ENV macros to CONFIG_ENV 2008-09-10 22:48:06 +02:00
cmd_bedbug.c [BUILD] conditionally compile common/cmd_*.c in common/Makefile 2007-11-20 22:33:54 -07:00
cmd_bmp.c Fix compilation problem in common/cmd_bmp.c 2008-01-12 00:35:48 +01:00
cmd_boot.c allow ports to override go behavior 2008-04-18 00:31:41 -07:00
cmd_bootldr.c Blackfin: move bootldr command to common code 2008-03-15 22:13:58 -04:00
cmd_bootm.c Add support for LZMA uncompression algorithm. 2008-09-13 01:59:07 +02:00
cmd_cache.c common/: Remove lingering references to CFG_CMD_* symbols. 2007-07-10 11:02:44 -05:00
cmd_console.c devices: merge to list_head 2008-08-31 04:24:55 +02:00
cmd_cplbinfo.c Blackfin: new cplbinfo command for viewing cplb tables 2008-03-15 22:14:54 -04:00
cmd_date.c rtc: allow rtc_set to return an error and use it in cmd_date 2008-09-07 00:56:36 +02:00
cmd_dcr.c Big white-space cleanup. 2008-05-21 00:14:08 +02:00
cmd_df.c SPI API improvements 2008-06-03 20:28:50 +02:00
cmd_diag.c [BUILD] conditionally compile common/cmd_*.c in common/Makefile 2007-11-20 22:33:54 -07:00
cmd_display.c [BUILD] conditionally compile common/cmd_*.c in common/Makefile 2007-11-20 22:33:54 -07:00
cmd_doc.c Whitespace cleanup and marking broken code. 2008-08-12 11:31:17 -05:00
cmd_dtt.c [BUILD] conditionally compile common/cmd_*.c in common/Makefile 2007-11-20 22:33:54 -07:00
cmd_eeprom.c cmd_eeprom: Move conditional compilation to Makefile 2008-09-10 22:47:52 +02:00
cmd_elf.c allow ports to override bootelf behavior 2008-04-18 00:30:42 -07:00
cmd_ext2.c [BUILD] conditionally compile common/cmd_*.c in common/Makefile 2007-11-20 22:33:54 -07:00
cmd_fat.c [BUILD] conditionally compile common/cmd_*.c in common/Makefile 2007-11-20 22:33:54 -07:00
cmd_fdc.c cmd_fdc: Move conditional compilation to Makefile 2008-09-10 21:09:37 +02:00
cmd_fdos.c [BUILD] conditionally compile common/cmd_*.c in common/Makefile 2007-11-20 22:33:54 -07:00
cmd_fdt.c powerpc: Fix bootm to boot up again with a Ramdisk 2008-09-13 02:03:38 +02:00
cmd_flash.c Fix merge problems 2008-08-06 14:05:38 +02:00
cmd_fpga.c Code cleanup: fix old style assignment ambiguities like "=-" etc. 2008-07-14 15:19:07 +02:00
cmd_i2c.c move cmd_get_data_size to command.c 2008-09-10 22:48:05 +02:00
cmd_ide.c Fix typo in spelling of ATAPI. 2008-08-21 01:33:58 +02:00
cmd_immap.c [BUILD] conditionally compile common/cmd_*.c in common/Makefile 2007-11-20 22:33:54 -07:00
cmd_irq.c Add command to enable/disable interrupts 2008-08-21 00:53:02 +02:00
cmd_itest.c move cmd_get_data_size to command.c 2008-09-10 22:48:05 +02:00
cmd_jffs2.c Add JFFS2 command support on OneNAND 2008-09-06 22:50:08 +02:00
cmd_license.c Add 'license' command to U-Boot command line 2008-08-18 23:21:49 +02:00
cmd_load.c loads: allow negative offsets 2008-09-06 01:57:18 +02:00
cmd_log.c Avoid initrd and logbuffer area overlaps 2008-06-03 19:34:19 +02:00
cmd_mac.c cmd_mac: Move conditional compilation to Makefile 2008-09-10 21:09:37 +02:00
cmd_mem.c cmd_mem: Move conditional compilation to Makefile 2008-09-10 22:48:05 +02:00
cmd_mfsl.c Fix merge problems 2008-08-06 14:05:38 +02:00
cmd_mii.c Add CONFIG_MII_INIT support to related boards 2008-04-13 23:03:02 -07:00
cmd_misc.c [BUILD] conditionally compile common/cmd_*.c in common/Makefile 2007-11-20 22:33:54 -07:00
cmd_mmc.c [BUILD] conditionally compile common/cmd_*.c in common/Makefile 2007-11-20 22:33:54 -07:00
cmd_mp.c 85xx: Rename CONFIG_NR_CPUS to CONFIG_NUM_CPUS 2008-08-12 00:09:29 +02:00
cmd_nand.c Coding Style cleanup, update CHANGELOG 2008-08-14 14:41:06 +02:00
cmd_net.c Standardize bootp, tftpboot, rarpboot, dhcp, and nfs command descriptions 2008-08-26 22:46:23 -07:00
cmd_nvedit.c rename CFG_ENV macros to CONFIG_ENV 2008-09-10 22:48:06 +02:00
cmd_onenand.c Fix OneNAND read_oob/write_oob functions compatability 2008-08-21 13:50:20 -05:00
cmd_otp.c interface to Blackfin on-chip One-Time-Programmable memory 2008-02-04 19:26:57 -05:00
cmd_pci.c move cmd_get_data_size to command.c 2008-09-10 22:48:05 +02:00
cmd_pcmcia.c common/cmd_[p-x]*: Remove obsolete references to CONFIG_COMMANDS. 2007-07-08 18:05:39 -05:00
cmd_portio.c move cmd_get_data_size to command.c 2008-09-10 22:48:05 +02:00
cmd_reginfo.c ppc4xx: Consolidate PPC4xx UIC defines 2008-07-11 13:18:14 +02:00
cmd_reiser.c [BUILD] conditionally compile common/cmd_*.c in common/Makefile 2007-11-20 22:33:54 -07:00
cmd_sata.c ata: add the support for SATA framework 2008-03-26 23:38:51 +01:00
cmd_scsi.c Code cleanup: fix old style assignment ambiguities like "=-" etc. 2008-07-14 15:19:07 +02:00
cmd_setexpr.c Add setexpr command 2008-03-25 22:16:15 +01:00
cmd_sf.c SPI Flash: Add "sf" command 2008-06-03 20:32:25 +02:00
cmd_spi.c SPI API improvements 2008-06-03 20:28:50 +02:00
cmd_strings.c new command for displaying strings at specified memory locations 2008-02-04 19:26:57 -05:00
cmd_terminal.c devices: merge to list_head 2008-08-31 04:24:55 +02:00
cmd_universe.c [BUILD] conditionally compile common/cmd_*.c in common/Makefile 2007-11-20 22:33:54 -07:00
cmd_usb.c Code cleanup: fix old style assignment ambiguities like "=-" etc. 2008-07-14 15:19:07 +02:00
cmd_vfd.c cmd_vfd: Move conditional compilation to Makefile 2008-09-10 21:09:37 +02:00
cmd_ximg.c Memory footprint optimizations 2008-04-24 17:21:55 +02:00
cmd_yaffs2.c Minor coding style cleanup, updte CHANGELOG 2008-08-25 23:45:41 +02:00
command.c move cmd_get_data_size to command.c 2008-09-10 22:48:05 +02:00
console.c Allow console input to be disabled 2008-09-06 22:36:54 +02:00
cyclon2.c common: Move conditional compilation to Makefile 2008-08-13 01:40:38 +02:00
ddr_spd.c Add proper SPD definitions for DDR1/2/3 2008-08-27 02:05:53 +02:00
devices.c devices: Use list_add_tail() instead of list_add() to register a device 2008-09-05 13:27:01 +02:00
dlmalloc.c Fix merge problems 2008-08-06 14:05:38 +02:00
dlmalloc.src * Code cleanup: 2003-06-27 21:31:46 +00:00
docecc.c common: Move conditional compilation to Makefile 2008-08-13 01:40:38 +02:00
env_common.c rename CFG_ENV macros to CONFIG_ENV 2008-09-10 22:48:06 +02:00
env_dataflash.c rename CFG_ENV macros to CONFIG_ENV 2008-09-10 22:48:06 +02:00
env_eeprom.c rename CFG_ENV macros to CONFIG_ENV 2008-09-10 22:48:06 +02:00
env_embedded.c rename CFG_ENV macros to CONFIG_ENV 2008-09-10 22:48:06 +02:00
env_flash.c rename CFG_ENV macros to CONFIG_ENV 2008-09-10 22:48:06 +02:00
env_nand.c rename CFG_ENV macros to CONFIG_ENV 2008-09-10 22:48:06 +02:00
env_nowhere.c env_nowhere: Move conditional compilation to Makefile 2008-09-10 22:48:01 +02:00
env_nvram.c rename CFG_ENV macros to CONFIG_ENV 2008-09-10 22:48:06 +02:00
env_onenand.c rename CFG_ENV macros to CONFIG_ENV 2008-09-10 22:48:06 +02:00
env_sf.c rename CFG_ENV macros to CONFIG_ENV 2008-09-10 22:48:06 +02:00
exports.c Add functions to list of exported functions 2007-08-06 00:45:40 +02:00
fdt_support.c powerpc: Fix bootm to boot up again with a Ramdisk 2008-09-13 02:03:38 +02:00
flash.c Code cleanup: fix old style assignment ambiguities like "=-" etc. 2008-07-14 15:19:07 +02:00
fpga.c common: Move conditional compilation to Makefile 2008-08-13 01:40:38 +02:00
hush.c hush: Fix printf debug macro in hush.c so that it usable in U-Boot 2008-08-21 02:05:03 +02:00
image.c Add support for LZMA uncompression algorithm. 2008-09-13 01:59:07 +02:00
kgdb.c common/kgdb.c: fix 'dereferencing type-punned pointer' warning 2008-03-09 10:33:31 +01:00
lcd.c common: Move conditional compilation to Makefile 2008-08-13 01:40:38 +02:00
lynxkdi.c common: Move conditional compilation to Makefile 2008-08-13 01:40:38 +02:00
main.c Fix merge problems 2008-08-06 14:05:38 +02:00
Makefile cmd_mem: Move conditional compilation to Makefile 2008-09-10 22:48:05 +02:00
memsize.c Sequential accesses to non-existent memory must be synchronized, 2006-11-06 17:06:36 +01:00
miiphyutil.c miiphyutil: Move conditional compilation to Makefile 2008-08-29 21:53:56 +02:00
s_record.c Initial revision 2002-08-17 09:36:01 +00:00
serial.c ARM: s3c24xx: Multiple serial port support 2008-02-04 23:52:49 +01:00
spartan2.c common: Move conditional compilation to Makefile 2008-08-13 01:40:38 +02:00
spartan3.c common: Move conditional compilation to Makefile 2008-08-13 01:40:38 +02:00
stratixII.c common: Move conditional compilation to Makefile 2008-08-13 01:40:38 +02:00
usb.c fix USB initialisation procedure 2008-10-14 16:42:44 +02:00
usb_kbd.c Correct drv_usb_kbd_init function 2008-09-09 17:02:59 +02:00
usb_storage.c common: Move conditional compilation to Makefile 2008-08-13 01:40:38 +02:00
virtex2.c common: Move conditional compilation to Makefile 2008-08-13 01:40:38 +02:00
xilinx.c common: Move conditional compilation to Makefile 2008-08-13 01:40:38 +02:00
xyzModem.c Coding Style cleanup. 2006-08-31 16:46:53 +02:00