[U-Boot] Please pull u-boot-dm.git [take 2]

Hi Tom,
As mentioned I reverted this patch as it conflicted with the dm tree and I suspect it might be buggy:
cd749658 usb_storage : scan all interfaces to find a storage device
Assuming this is OK and applies successfully I will rebase and resend this patch, then reply with some comments I have on the patch.
The following changes since commit 4564faeafbf11feb839e2e3f927be2f1a919ba96:
ti: dwc3: Enable clocks in enable_basic_clocks() in hw_data.c (2015-04-16 15:08:36 -0400)
are available in the git repository at:
http://git.denx.de/u-boot-dm.git
for you to fetch changes up to 2e6263093b3a5c2d2c586afaedfd346d6628f784:
sandbox: exynos: Move CONFIG_SOUND_SANDBOX to Kconfig (2015-04-16 20:47:57 -0600)
---------------------------------------------------------------- Haikun.Wang@freescale.com (5): dm: arm: Bring in skeleton64 device tree file from Linux dm: ls1021a: dts: Update DSPI node to support DM SPI dm: ls1021a: dts: Add QSPI dts node dm: spi: Convert Freescale DSPI driver to driver model dm: spi: Convert Freescale QSPI driver to driver model
Joe Hershberger (51): test: dm: Reorder the objects to build common: Make sure arch-specific map_sysmem() is defined net: Provide a function to get the current MAC address net: Rename helper function to be more clear net: Remove unneeded "extern" in net.h net: Refactor in preparation for driver model net: Change return codes from net/eth.c to use errorno constants net: Use int instead of u8 for boolean flag net: Remove the bd* parameter from net stack functions net: Make netretry actually do something net: Access mapped physmem in net functions cmd: net: Clean up return codes dm: eth: Add basic driver model support to Ethernet stack net: Clean up network stack names used in DM drivers dm: eth: Pass the packet pointer as a parameter to recv sandbox: eth: Add network support to sandbox sandbox: eth: Add ARP and PING response to sandbox driver test: dm: eth: Add tests for the eth dm implementation dm: eth: Add support for aliases dm: eth: Add support for ethprime env var test: dm: eth: Add testing for ethrotate env var sandbox: eth: Add ability to disable ping reply in sandbox eth driver test: dm: net: Add a test of the netretry behavior sandbox: eth: Add a bridge to a real network for sandbox sandbox: Enable DHCP and IP defrag sandbox: eth: Add support for using the 'lo' interface net: Improve error handling dm: eth: Provide a way for drivers to manage packet buffers net: cosmetic: Change IPaddr_t to struct in_addr net: cosmetic: Fixup var names related to boot file net: cosmetic: Fixup var names for DHCP strings net: cosmetic: Name ethaddr variables consistently net: cosmetic: Cleanup internal packet buffer names net: cosmetic: Fix var naming net <-> eth drivers net: cosmetic: Clean up TFTP variables and functions net: cosmetic: Clean up ARP variables and functions net: cosmetic: Clean up DHCP variables and functions net: cosmetic: Clean up NFS variables and functions net: cosmetic: Clean up RARP variables and functions net: cosmetic: Clean up SNTP variables and functions net: cosmetic: Clean up ping variables and functions net: cosmetic: Clean up CDP variables and functions net: cosmetic: Clean up DNS variables and functions net: cosmetic: Clean up netconsole variables and functions net: cosmetic: Clean up cmd_net variables and functions net: cosmetic: Fix checkpatch.pl failures in linklocal net: cosmetic: Fix checkpatch.pl failures in eth.c net: cosmetic: Fix checkpatch.pl failures in net.h net: cosmetic: Fix checkpatch.pl failures in net.c net: Fix compile errors when SNTP enabled and not DATE sandbox: Enable more network features for sandbox
Masahiro Yamada (12): dm: spi_flash: fix wrong dependency dm: select CONFIG_DM* options ARM: UniPhier: use "select" instead of default value in defconfig ARM: zynq: use "select" instead of default value in defconfig ARM: rmobile: use "select" instead of default value in defconfig ARM: snapper9260: use "select" instead of default value in defconfig ARM: mx6: use "select" instead of default value in defconfig ARM: socfpga: use "select" instead of default value in defconfig ARM: bav335x: use "select" instead of default value in defconfig ARM: stv0991: use "select" instead of default value in defconfig ARM: cm_fx6: use "select" instead of default value in defconfig powerpc: ids8313: use "select" instead of default value in defconfig
Przemyslaw Marczak (3): dm: gpio: request list: return the count if requests max_count reached Kconfig: i2c: fix help message related to dm i2c dm: i2c: add i2c-gpio driver
Sergey Temerkhanov (2): net: Fix incorrect DHCP/BOOTP packets on 64-bit systems net: Convert protocol structures to use explicit sizes
Simon Glass (146): x86: Support machines with >4GB of RAM x86: video: Allow keyboard presence to be controlled by device tree x86: pci: Add PCI IDs for lynxpoint x86: spi: Add support for lynxpoint x86: Move common Chromebook config into a separate file x86: Add support for panther (Asus Chromebox) sandbox: Update device tree 'reg' properties for I2C and SPI fdt: Export fdtdec_get_number() for general use x86: Add a x86_ prefix to the x86-specific PCI functions dm: Add a new CPU init function which can use driver model x86: Split up arch_cpu_init() Correct map_sysmem() logic in do_mem_mw() fdt: Tighten up error handling in fdtdec_get_pci_addr() dm: core: Add dev_get_uclass_priv() to access uclass private data dm: core: Mark device as active before calling its probe() method dm: core: Add a uclass pre_probe() method for devices dm: Show both allocated and requested seq numbers in 'dm uclass' dm: pci: Move common PCI functions into their own file dm: pci: Add a uclass for PCI dm: sandbox: pci: Add PCI support for sandbox dm: sandbox: Add a simple PCI driver dm: sandbox: pci: Add a PCI emulation uclass dm: sandbox: Add a emulated PCI device as an example dm: sandbox: pci: Enable PCI for sandbox dm: x86: pci: Add a PCI driver for driver model dm: x86: pci: Convert coreboot to use driver model for pci dm: x86: pci: Convert chromebook_link to use driver model for pci dm: pci: Add driver model tests for PCI dm: sf: Add driver model read/write/erase methods dm: x86: spi: Convert ICH SPI driver to driver model dm: x86: Add a uclass for a Platform Controller Hub dm: x86: Add a uclass for an Low Pin Count (LPC) device x86: chromebook_link: dts: Add PCH and LPC devices dm: cros_ec: Convert cros_ec LPC driver to driver model cros_ec: Reinit the cros_ec device when 'crosec init' is used cros_ec: Drop unused CONFIG_DM_CROS_EC sandbox: cros_ec: Drop unnecessary init x86: cros_ec: Drop unnecessary init exynos: cros_ec: Drop unnecessary init cros_ec: Remove unused cros_ec_board_init() function fdt: cros_ec: Drop compatible string in fdtdec fdt: Drop LPC compatible string in fdtdec cros_ec: exynos: Match up device tree with kernel version sandbox: cros_ec: Add Kconfig for sandbox EC config i8042: Add keyboard enable logic in kbd_reset() linker_lists: Add a function to access a linker list entry sandbox: Fix comment for os_open() dm: test: bus: Use a local variable to simplify code dm: core: Support allocating driver-private data for DMA dm: core: Convert driver_bind() to use const dm: core: Rename driver data function to dev_get_driver_data() dm: core: Mark device as active before calling uclass probe() methods dm: core: Add device children and sibling functions dm: gpio: Add an implementation for gpio_get_number() dm: usb: Add a uclass for USB controllers dm: usb: Adjust usb command to prepare for driver model dm: usb: Adjust usb_alloc_new_device() to return an error dm: usb: Convert 'usb' command to support driver model dm: usb: Drop the legacy USB init sequence dm: usb: Refactor port resets dm: usb: Move descriptor setup code into its own function dm: usb: Split out more code from usb_new_device() dm: usb: Complete the splitting up of usb_new_device() dm: usb: Convert core usb.c file to support driver model dm: usb: Split hub detection into its own function dm: usb: Add driver model support for hubs dm: usb: Move USB storage definitions to usb_defs.h dm: usb: Fix type problems in usb_stor_get_info() dm: usb: Simply device finding code in usb_storage dm: usb: Adjust usb_storage to work with sandbox Revert "usb_storage : scan all interfaces to find a storage device" dm: usb: Move storage device scanning into its own function dm: usb: Convert usb_storage to driver model dm: usb: Move all the EHCI weak functions together and declare them dm: usb: Pass EHCI controller pointer to ehci_get_port_speed() dm: usb: Allow ECHI to hold private data for the controller dm: usb: tegra: Store the controller type explicitly dm: usb: Pass EHCI controller pointer to ehci_powerup_fixup() dm: usb: tegra: Drop use of global controller variable dm: usb: Pass EHCI controller pointer to ehci_set_usbmode() dm: usb: Pass EHCI controller pointer to ehci_get_portsc_register() dm: usb: ehci: Use a function to find the controller from struct udevice dm: usb: Refactor EHCI init dm: usb: Drop the EHCI weak functions dm: usb: Change ehci_reset() to use a pointer dm: usb: Add driver model support to EHCI dm: usb: Allow USB drivers to be declared and auto-probed dm: usb: Bind generic USB devices when there is no driver dm: usb: Allow setting up a USB controller as a device/gadget dm: usb: Split out the keyboard probe into its own function dm: usb: Support driver model with USB keyboards dm: usb: tegra: Add vbus GPIOs for nyan dm: usb: Move struct usb_string to a common place dm: usb: sandbox: Add a uclass for USB device emulation dm: usb: sandbox: Reset emulation devices in usb stop() dm: usb: sandbox: Add an emulator for USB flash devices dm: usb: sandbox: Add an emulator for USB hub emulation dm: usb: sandbox: Add a driver for sandbox dm: usb: dts: sandbox: Add some sample USB devices to sandbox dm: usb: Add support for USB ethernet devices with driver model dm: usb: exynos: Add driver model support to exynos EHCI dm: usb: tegra: Remove the port_addr_clear_csc variable dm: usb: tegra: Tidy up error handling and a static function dm: usb: tegra: Move most of init/uninit into a function dm: usb: tegra: Add driver model support to tegra EHCI dm: usb: xhci: Use a function to get xhci_ctrl dm: usb: xhci: Use explicit parameters for xhci_alloc_virt_device() dm: usb: xhci: Use explicit parameters for xhci_setup_addressable_virt_dev() dm: usb: xhci: Factor out common init/uninit dm: usb: Support driver model in XHCI dm: usb: Rename the XHCI HCD to U-Boot dm: usb: exynos: Adjust XHCI driver to support driver model dm: usb: exynos: Use driver model for USB dm: usb: exynos: Enable both USB ports on snow dm: usb: exynos: Enable both EHCI and XHCI on snow dm: usb: Add a generic descriptor struct dm: usb: Tidy up pipe value decoding dm: usb: sandbox: Enable USB dm: test: Correct printf() output nit in 'dm uclass' dm: test: Allow 'dm test' to select a particular test to run dm: usb: Add tests for the USB uclass dm: usb: Add a README for driver model sunxi: Replace the pcDuino3 config with FDT version Kconfig: Move CONFIG_DESIGNWARE_ETH to Kconfig dts: sunxi: Bring in Ethernet device tree bindings dm: net: Use existing Ethernet init for driver model Avoid calling print_eths() with driver model dm: net: Adjust PHY interface to work with CONFIG_DM_ETH dm: net: Tidy up designware driver ready for driver model dm: net: Adjust designware driver to support driver model dm: sunxi: Support driver model for Ethernet dm: sunxi: Use driver model for Ethernet on Linksprite pcDuino3 Kconfig: Move CONFIG_BOOTSTAGE to Kconfig sandbox: Move GPIO CONFIGs to Kconfig sandbox: Move CONFIG_SYS_VSNPRINTF to Kconfig sandbox: Move CONFIG_SYS_I2C_SANDBOX to Kconfig sandbox: Move CONFIG_SANDBOX_SPI to Kconfig sandbox: Move CONFIG_SPI_FLASH_SANDBOX to Kconfig sandbox: Move CONFIG_TPM_TIS_SANDBOX to Kconfig sandbox: exynos: Move CONFIG_SOUND to Kconfig sandbox: exynos: Move CONFIG_CMD_SOUND to Kconfig sandbox: exynos: Move CONFIG_I2S to Kconfig sandbox: exynos: Move CONFIG_I2S_SAMSUNG to Kconfig sandbox: exynos: Move CONFIG_SOUND_MAX98095 to Kconfig sandbox: exynos: Move CONFIG_SOUND_WM8994 to Kconfig sandbox: exynos: Move CONFIG_SOUND_SANDBOX to Kconfig
haikun (2): dm: ls1021a: Bring in ls1021a dts files from linux kernel dm: ls1021a: dts: Change address_cells and size_cells from 2 to 1
Makefile | 1 + README | 55 +- api/api_net.c | 2 +- arch/Kconfig | 9 + arch/arm/Kconfig | 58 ++ arch/arm/cpu/arm926ejs/spear/cpu.c | 2 +- arch/arm/cpu/armv7/exynos/Kconfig | 14 +- arch/arm/cpu/armv7/omap3/Kconfig | 27 +- arch/arm/cpu/armv7/rmobile/Kconfig | 12 + arch/arm/cpu/armv7/socfpga/misc.c | 2 +- arch/arm/dts/Makefile | 3 + arch/arm/dts/exynos5250-snow.dts | 12 +- arch/arm/dts/exynos5420-peach-pit.dts | 5 +- arch/arm/dts/exynos5800-peach-pi.dts | 4 +- arch/arm/dts/ls1021a-qds.dts | 216 +++++ arch/arm/dts/ls1021a-twr.dts | 87 ++ arch/arm/dts/ls1021a.dtsi | 381 ++++++++ arch/arm/dts/skeleton64.dtsi | 13 + arch/arm/dts/tegra124-nyan-big.dts | 2 + arch/arm/lib/board.c | 2 +- arch/arm/lib/bootm.c | 1 + arch/arm/mach-at91/Kconfig | 3 + arch/arm/mach-bcm283x/Kconfig | 9 - arch/arm/mach-davinci/misc.c | 2 +- arch/arm/mach-tegra/Kconfig | 18 - arch/avr32/lib/board.c | 2 +- arch/mips/mach-au1x00/au1x00_eth.c | 14 +- arch/nds32/lib/board.c | 2 +- arch/openrisc/lib/board.c | 2 +- arch/powerpc/cpu/mpc8260/ether_fcc.c | 22 +- arch/powerpc/cpu/mpc8260/ether_scc.c | 4 +- arch/powerpc/cpu/mpc83xx/Kconfig | 1 + arch/powerpc/cpu/mpc85xx/ether_fcc.c | 6 +- arch/powerpc/cpu/mpc8xx/fec.c | 12 +- arch/powerpc/cpu/mpc8xx/scc.c | 7 +- arch/powerpc/cpu/ppc4xx/Kconfig | 2 + arch/powerpc/lib/board.c | 2 +- arch/sandbox/Kconfig | 24 +- arch/sandbox/cpu/Makefile | 10 + arch/sandbox/cpu/cpu.c | 41 +- arch/sandbox/cpu/eth-raw-os.c | 249 ++++++ arch/sandbox/dts/cros-ec-keyboard.dtsi | 105 +++ arch/sandbox/dts/sandbox.dts | 191 ++-- arch/sandbox/include/asm/eth-raw-os.h | 40 + arch/sandbox/include/asm/eth.h | 15 + arch/sandbox/include/asm/io.h | 16 +- arch/sandbox/include/asm/processor.h | 12 + arch/sandbox/include/asm/test.h | 7 +- arch/sandbox/include/asm/u-boot-sandbox.h | 48 + arch/sandbox/lib/Makefile | 2 +- arch/sandbox/lib/pci_io.c | 138 +++ arch/sh/lib/board.c | 2 +- arch/sparc/lib/board.c | 2 +- arch/x86/Kconfig | 35 +- arch/x86/cpu/baytrail/early_uart.c | 5 +- arch/x86/cpu/coreboot/pci.c | 63 +- arch/x86/cpu/coreboot/sdram.c | 6 +- arch/x86/cpu/cpu.c | 2 +- arch/x86/cpu/ivybridge/bd82x6x.c | 47 +- arch/x86/cpu/ivybridge/cpu.c | 64 +- arch/x86/cpu/ivybridge/early_init.c | 58 +- arch/x86/cpu/ivybridge/early_me.c | 12 +- arch/x86/cpu/ivybridge/gma.c | 4 +- arch/x86/cpu/ivybridge/lpc.c | 88 +- arch/x86/cpu/ivybridge/mrccache.c | 7 +- arch/x86/cpu/ivybridge/northbridge.c | 6 +- arch/x86/cpu/ivybridge/pch.c | 4 +- arch/x86/cpu/ivybridge/pci.c | 85 +- arch/x86/cpu/ivybridge/report_platform.c | 4 +- arch/x86/cpu/ivybridge/sata.c | 61 +- arch/x86/cpu/ivybridge/sdram.c | 37 +- arch/x86/cpu/ivybridge/usb_ehci.c | 4 +- arch/x86/cpu/ivybridge/usb_xhci.c | 8 +- arch/x86/cpu/pci.c | 52 +- arch/x86/cpu/quark/quark.c | 4 +- arch/x86/cpu/queensbay/tnc.c | 4 +- arch/x86/dts/Makefile | 1 + arch/x86/dts/chromebook_link.dts | 80 +- arch/x86/dts/chromebox_panther.dts | 64 ++ arch/x86/include/asm/arch-ivybridge/bd82x6x.h | 1 - arch/x86/include/asm/arch-ivybridge/mrccache.h | 4 +- arch/x86/include/asm/pci.h | 20 +- arch/x86/lib/Makefile | 4 + arch/x86/lib/bios_interrupts.c | 12 +- arch/x86/lib/init_helpers.c | 8 - arch/x86/lib/lpc-uclass.c | 28 + arch/x86/lib/pch-uclass.c | 28 + board/BuR/common/common.c | 4 +- board/BuS/eb_cpux9k2/cpux9k2.c | 2 +- board/BuS/vl_ma2sc/vl_ma2sc.c | 2 +- board/ait/cam_enc_4xx/cam_enc_4xx.c | 2 +- board/alphaproject/ap_sh4a_4a/ap_sh4a_4a.c | 2 +- board/amcc/canyonlands/Kconfig | 6 - board/atmel/at91sam9261ek/at91sam9261ek.c | 2 +- board/bct-brettl2/bct-brettl2.c | 2 +- board/bf518f-ezbrd/bf518f-ezbrd.c | 4 +- board/bf526-ezbrd/bf526-ezbrd.c | 4 +- board/bf527-ezkit/bf527-ezkit.c | 4 +- board/bf537-minotaur/bf537-minotaur.c | 2 +- board/bf537-pnav/bf537-pnav.c | 2 +- board/bf537-srv1/bf537-srv1.c | 2 +- board/bf537-stamp/bf537-stamp.c | 4 +- board/bf609-ezkit/bf609-ezkit.c | 2 +- board/birdland/bav335x/board.c | 4 +- board/buffalo/lsxl/lsxl.c | 2 +- board/cm-bf527/cm-bf527.c | 4 +- board/cm-bf537e/cm-bf537e.c | 2 +- board/cm-bf537u/cm-bf537u.c | 2 +- board/compulab/cm_fx6/cm_fx6.c | 2 +- board/compulab/cm_t335/Kconfig | 9 - board/compulab/cm_t335/cm_t335.c | 2 +- board/compulab/cm_t35/cm_t35.c | 2 +- board/compulab/cm_t3517/cm_t3517.c | 4 +- board/compulab/cm_t54/cm_t54.c | 4 +- board/coreboot/coreboot/coreboot.c | 5 - board/davinci/da8xxevm/da850evm.c | 6 +- board/dnp5370/dnp5370.c | 4 +- board/egnite/ethernut5/ethernut5.c | 2 +- board/genesi/mx51_efikamx/efikamx-usb.c | 4 +- board/google/chromebook_link/link.c | 10 +- board/google/chromebox_panther/Kconfig | 34 + board/google/chromebox_panther/MAINTAINERS | 6 + board/google/chromebox_panther/Makefile | 7 + board/google/chromebox_panther/panther.c | 22 + board/gumstix/pepper/Kconfig | 9 - board/gumstix/pepper/board.c | 2 +- board/ifm/ac14xx/ac14xx.c | 2 +- board/ip04/ip04.c | 2 +- board/isee/igep0033/Kconfig | 9 - board/isee/igep0033/board.c | 2 +- board/phytec/pcm051/Kconfig | 9 - board/phytec/pcm051/board.c | 2 +- board/renesas/r0p7734/r0p7734.c | 2 +- board/ronetix/pm9261/pm9261.c | 2 +- board/ronetix/pm9g45/pm9g45.c | 2 +- board/samsung/common/board.c | 12 - board/samsung/goni/Kconfig | 9 - board/samsung/smdk5420/Kconfig | 6 - board/samsung/smdkc100/Kconfig | 9 - board/sandbox/README.sandbox | 78 +- board/sandbox/sandbox.c | 12 - board/siemens/common/factoryset.c | 4 +- board/siemens/pxm2/board.c | 2 +- board/silica/pengwyn/Kconfig | 9 - board/silica/pengwyn/board.c | 2 +- board/spear/spear300/spear300.c | 2 +- board/spear/spear310/spear310.c | 2 +- board/spear/spear320/spear320.c | 2 +- board/spear/spear600/spear600.c | 2 +- board/st/stv0991/stv0991.c | 2 +- board/sunxi/gmac.c | 10 +- board/tcm-bf518/tcm-bf518.c | 4 +- board/tcm-bf537/tcm-bf537.c | 2 +- board/ti/am335x/Kconfig | 9 - board/ti/am335x/board.c | 6 +- board/ti/am43xx/board.c | 4 +- board/ti/beagle_x15/board.c | 4 +- board/ti/dra7xx/evm.c | 4 +- board/ti/ti814x/evm.c | 2 +- common/Kconfig | 116 +++ common/board_f.c | 7 + common/board_r.c | 8 +- common/bootm.c | 1 + common/cmd_bdinfo.c | 4 +- common/cmd_bootm.c | 1 + common/cmd_bootstage.c | 7 +- common/cmd_demo.c | 1 + common/cmd_elf.c | 2 +- common/cmd_fat.c | 1 + common/cmd_fdt.c | 1 + common/cmd_lzmadec.c | 1 + common/cmd_md5sum.c | 1 + common/cmd_mem.c | 8 +- common/cmd_net.c | 178 ++-- common/cmd_nvedit.c | 1 + common/cmd_pci.c | 14 +- common/cmd_pxe.c | 5 +- common/cmd_sf.c | 3 +- common/cmd_source.c | 1 + common/cmd_trace.c | 1 + common/cmd_usb.c | 198 ++++- common/cmd_ximg.c | 1 + common/cros_ec.c | 35 +- common/hash.c | 1 + common/image-fdt.c | 1 + common/image-fit.c | 1 + common/image.c | 1 + common/iotrace.c | 1 + common/lcd.c | 1 + common/malloc_simple.c | 1 + common/miiphyutil.c | 1 + common/spl/spl_net.c | 4 +- common/update.c | 25 +- common/usb.c | 315 ++++--- common/usb_hub.c | 194 +++- common/usb_kbd.c | 119 ++- common/usb_storage.c | 236 ++--- configs/A20-OLinuXino-Lime2_defconfig | 3 + configs/A20-OLinuXino-Lime_defconfig | 3 + configs/A20-OLinuXino_MICRO_defconfig | 3 + configs/Bananapi_defconfig | 3 + configs/Bananapro_defconfig | 3 + configs/CSQ_CS908_defconfig | 3 + configs/Colombus_defconfig | 3 + configs/Cubieboard2_defconfig | 3 + configs/Cubietruck_defconfig | 3 + configs/Hummingbird_A31_defconfig | 3 + configs/Linksprite_pcDuino3_Nano_defconfig | 3 + configs/Linksprite_pcDuino3_defconfig | 11 + configs/Linksprite_pcDuino3_fdt_defconfig | 15 - configs/Mele_I7_defconfig | 3 + configs/Mele_M3_defconfig | 3 + configs/Mele_M5_defconfig | 3 + configs/Mele_M9_defconfig | 3 + configs/Orangepi_defconfig | 3 + configs/Orangepi_mini_defconfig | 3 + configs/Wits_Pro_A20_DKT_defconfig | 3 + configs/alt_defconfig | 2 - configs/am335x_boneblack_vboot_defconfig | 1 - configs/am3517_crane_defconfig | 3 - configs/am3517_evm_defconfig | 3 - configs/arndale_defconfig | 6 + configs/axs101_defconfig | 3 + configs/axs103_defconfig | 3 + configs/bf609-ezkit_defconfig | 3 + configs/birdland_bav335a_defconfig | 3 - configs/birdland_bav335b_defconfig | 3 - configs/chromebook_link_defconfig | 2 + configs/chromebox_panther_defconfig | 12 + configs/cm_fx6_defconfig | 3 - configs/cm_t3517_defconfig | 3 - configs/cm_t35_defconfig | 3 - configs/coreboot-x86_defconfig | 1 + configs/devkit8000_defconfig | 3 - configs/dig297_defconfig | 3 - configs/eco5pk_defconfig | 3 - configs/galileo_defconfig | 3 + configs/gose_defconfig | 2 - configs/i12-tvbox_defconfig | 3 + configs/ids8313_defconfig | 1 - configs/koelsch_defconfig | 2 - configs/lager_defconfig | 2 - configs/mcx_defconfig | 3 - configs/mixtile_loftq_defconfig | 3 + configs/mt_ventoux_defconfig | 3 - configs/mx6dlsabreauto_defconfig | 2 - configs/mx6dlsabresd_defconfig | 2 - configs/mx6qsabreauto_defconfig | 2 - configs/mx6qsabresd_defconfig | 2 - configs/mx6sabresd_spl_defconfig | 2 - configs/mx6sxsabresd_defconfig | 2 - configs/mx6sxsabresd_spl_defconfig | 2 - configs/nokia_rx51_defconfig | 3 - configs/omap3_beagle_defconfig | 3 - configs/omap3_evm_defconfig | 3 - configs/omap3_evm_quick_mmc_defconfig | 3 - configs/omap3_evm_quick_nand_defconfig | 3 - configs/omap3_ha_defconfig | 3 - configs/omap3_logic_defconfig | 3 - configs/omap3_mvblx_defconfig | 3 - configs/omap3_pandora_defconfig | 3 - configs/omap3_sdp3430_defconfig | 3 - configs/ph1_ld4_defconfig | 3 - configs/ph1_pro4_defconfig | 3 - configs/ph1_sld8_defconfig | 3 - configs/porter_defconfig | 2 - configs/sandbox_defconfig | 20 +- configs/silk_defconfig | 2 - configs/smdk5250_defconfig | 6 + configs/snapper9260_defconfig | 3 - configs/snapper9g20_defconfig | 3 - configs/snow_defconfig | 7 +- configs/socfpga_arria5_defconfig | 3 - configs/socfpga_cyclone5_defconfig | 6 +- configs/socfpga_socrates_defconfig | 6 +- configs/spear300_defconfig | 3 + configs/spear300_nand_defconfig | 3 + configs/spear300_usbtty_defconfig | 3 + configs/spear300_usbtty_nand_defconfig | 3 + configs/spear310_defconfig | 3 + configs/spear310_nand_defconfig | 3 + configs/spear310_pnor_defconfig | 3 + configs/spear310_usbtty_defconfig | 3 + configs/spear310_usbtty_nand_defconfig | 3 + configs/spear310_usbtty_pnor_defconfig | 3 + configs/spear320_defconfig | 3 + configs/spear320_nand_defconfig | 3 + configs/spear320_pnor_defconfig | 3 + configs/spear320_usbtty_defconfig | 3 + configs/spear320_usbtty_nand_defconfig | 3 + configs/spear320_usbtty_pnor_defconfig | 3 + configs/spear600_defconfig | 3 + configs/spear600_nand_defconfig | 3 + configs/spear600_usbtty_defconfig | 3 + configs/spear600_usbtty_nand_defconfig | 3 + configs/stv0991_defconfig | 5 +- configs/tao3530_defconfig | 3 - configs/tb100_defconfig | 3 + configs/tricorder_defconfig | 3 - configs/tricorder_flash_defconfig | 3 - configs/twister_defconfig | 3 - configs/x600_defconfig | 3 + configs/zynq_microzed_defconfig | 1 - configs/zynq_zc70x_defconfig | 1 - configs/zynq_zc770_xm010_defconfig | 1 - configs/zynq_zc770_xm012_defconfig | 1 - configs/zynq_zc770_xm013_defconfig | 1 - configs/zynq_zed_defconfig | 1 - configs/zynq_zybo_defconfig | 1 - doc/README.drivers.eth | 18 +- doc/README.enetaddr | 2 +- doc/README.fdt-control | 16 + doc/README.link-local | 4 +- doc/device-tree-bindings/i2c/i2c-gpio.txt | 37 + .../net/allwinner,sun4i-emac.txt | 19 + .../net/allwinner,sun4i-mdio.txt | 27 + .../net/allwinner,sun7i-a20-gmac.txt | 27 + doc/device-tree-bindings/net/ethernet.txt | 25 + doc/device-tree-bindings/net/stmmac.txt | 63 ++ doc/driver-model/pci-info.txt | 70 ++ doc/driver-model/usb-info.txt | 415 +++++++++ drivers/core/device-remove.c | 4 +- drivers/core/device.c | 85 +- drivers/core/lists.c | 2 +- drivers/core/uclass.c | 10 +- drivers/demo/demo-simple.c | 1 + drivers/gpio/Kconfig | 21 + drivers/gpio/at91_gpio.c | 2 +- drivers/gpio/bcm2835_gpio.c | 2 +- drivers/gpio/gpio-uclass.c | 40 +- drivers/gpio/intel_ich6_gpio.c | 18 +- drivers/gpio/mxc_gpio.c | 2 +- drivers/gpio/omap_gpio.c | 2 +- drivers/gpio/s5p_gpio.c | 2 +- drivers/gpio/sandbox.c | 6 +- drivers/gpio/sunxi_gpio.c | 2 +- drivers/gpio/tegra_gpio.c | 2 +- drivers/i2c/Kconfig | 56 +- drivers/i2c/Makefile | 1 + drivers/i2c/i2c-gpio.c | 346 ++++++++ drivers/i2c/i2c-uclass.c | 6 +- drivers/i2c/i2c-uniphier-f.c | 1 + drivers/i2c/i2c-uniphier.c | 1 + drivers/i2c/s3c24x0_i2c.c | 2 +- drivers/i2c/sandbox_i2c.c | 2 +- drivers/i2c/tegra_i2c.c | 6 +- drivers/input/cros_ec_keyb.c | 2 +- drivers/input/i8042.c | 7 + drivers/misc/Kconfig | 19 +- drivers/misc/Makefile | 1 + drivers/misc/cros_ec.c | 254 +----- drivers/misc/cros_ec_i2c.c | 6 +- drivers/misc/cros_ec_lpc.c | 29 +- drivers/misc/cros_ec_sandbox.c | 79 +- drivers/misc/cros_ec_spi.c | 8 +- drivers/misc/swap_case.c | 285 ++++++ drivers/mtd/spi/Kconfig | 12 +- drivers/mtd/spi/sf-uclass.c | 18 +- drivers/mtd/spi/sf_probe.c | 9 +- drivers/net/4xx_enet.c | 21 +- drivers/net/Kconfig | 49 + drivers/net/Makefile | 4 +- drivers/net/altera_tse.c | 15 +- drivers/net/armada100_fec.c | 7 +- drivers/net/at91_emac.c | 4 +- drivers/net/ax88180.c | 6 +- drivers/net/bcm-sf2-eth.c | 6 +- drivers/net/bfin_mac.c | 4 +- drivers/net/calxedaxgmac.c | 2 +- drivers/net/cpsw.c | 17 +- drivers/net/cs8900.c | 5 +- drivers/net/davinci_emac.c | 5 +- drivers/net/dc2114x.c | 9 +- drivers/net/designware.c | 250 +++++- drivers/net/designware.h | 3 +- drivers/net/dm9000x.c | 9 +- drivers/net/dnet.c | 5 +- drivers/net/e1000.c | 4 +- drivers/net/eepro100.c | 3 +- drivers/net/enc28j60.c | 13 +- drivers/net/ep93xx_eth.c | 11 +- drivers/net/ethoc.c | 4 +- drivers/net/fec_mxc.c | 4 +- drivers/net/fm/eth.c | 2 +- drivers/net/fsl_mcdmafec.c | 23 +- drivers/net/ftgmac100.c | 4 +- drivers/net/ftmac100.c | 4 +- drivers/net/ftmac110.c | 4 +- drivers/net/greth.c | 2 +- drivers/net/keystone_net.c | 2 +- drivers/net/ks8851_mll.c | 6 +- drivers/net/lan91c96.c | 19 +- drivers/net/lpc32xx_eth.c | 10 +- drivers/net/macb.c | 10 +- drivers/net/mcffec.c | 5 +- drivers/net/mpc512x_fec.c | 3 +- drivers/net/mpc5xxx_fec.c | 2 +- drivers/net/mvgbe.c | 41 +- drivers/net/mvneta.c | 2 +- drivers/net/natsemi.c | 3 +- drivers/net/ne2000_base.c | 2 +- drivers/net/netconsole.c | 98 +- drivers/net/ns8382x.c | 6 +- drivers/net/pch_gbe.c | 2 +- drivers/net/pcnet.c | 2 +- drivers/net/phy/phy.c | 22 + drivers/net/rtl8139.c | 4 +- drivers/net/rtl8169.c | 2 +- drivers/net/sandbox-raw.c | 165 ++++ drivers/net/sandbox.c | 208 +++++ drivers/net/sh_eth.c | 2 +- drivers/net/smc91111.c | 18 +- drivers/net/smc911x.c | 4 +- drivers/net/sunxi_emac.c | 4 +- drivers/net/tsec.c | 7 +- drivers/net/tsi108_eth.c | 8 +- drivers/net/uli526x.c | 5 +- drivers/net/xilinx_axi_emac.c | 2 +- drivers/net/xilinx_emaclite.c | 2 +- drivers/net/xilinx_ll_temac_fifo.c | 4 +- drivers/net/xilinx_ll_temac_sdma.c | 4 +- drivers/net/zynq_gem.c | 2 +- drivers/pci/Kconfig | 22 + drivers/pci/Makefile | 11 +- drivers/pci/pci-emul-uclass.c | 67 ++ drivers/pci/pci-uclass.c | 639 +++++++++++++ drivers/pci/pci.c | 281 +----- drivers/pci/pci_auto.c | 16 +- drivers/pci/pci_common.c | 292 ++++++ drivers/pci/pci_compat.c | 43 + drivers/pci/pci_sandbox.c | 79 ++ drivers/pci/pci_x86.c | 24 + drivers/qe/uec.c | 2 +- drivers/serial/ns16550.c | 1 + drivers/serial/serial-uclass.c | 4 +- drivers/serial/serial_uniphier.c | 1 + drivers/sound/Kconfig | 55 ++ drivers/spi/Kconfig | 25 + drivers/spi/Makefile | 1 + drivers/spi/fsl_dspi.c | 737 +++++++++++++++ drivers/spi/fsl_qspi.c | 985 ++++++++++++++------- drivers/spi/ich.c | 522 +++++------ drivers/spi/spi-uclass.c | 4 +- drivers/tpm/Kconfig | 7 + drivers/usb/Kconfig | 16 + drivers/usb/emul/Kconfig | 8 + drivers/usb/emul/Makefile | 10 + drivers/usb/emul/sandbox_flash.c | 423 +++++++++ drivers/usb/emul/sandbox_hub.c | 303 +++++++ drivers/usb/emul/usb-emul-uclass.c | 263 ++++++ drivers/usb/eth/asix.c | 3 +- drivers/usb/eth/asix88179.c | 2 +- drivers/usb/eth/mcs7830.c | 2 +- drivers/usb/eth/smsc95xx.c | 5 +- drivers/usb/eth/usb_ether.c | 52 +- drivers/usb/gadget/ci_udc.c | 4 + drivers/usb/gadget/ether.c | 13 +- drivers/usb/host/Makefile | 5 + drivers/usb/host/ehci-exynos.c | 112 ++- drivers/usb/host/ehci-faraday.c | 112 ++- drivers/usb/host/ehci-hcd.c | 379 ++++++-- drivers/usb/host/ehci-mx5.c | 12 + drivers/usb/host/ehci-tegra.c | 322 ++++--- drivers/usb/host/ehci.h | 47 + drivers/usb/host/usb-sandbox.c | 117 +++ drivers/usb/host/usb-uclass.c | 645 ++++++++++++++ drivers/usb/host/xhci-exynos5.c | 120 ++- drivers/usb/host/xhci-mem.c | 24 +- drivers/usb/host/xhci-ring.c | 8 +- drivers/usb/host/xhci.c | 312 +++++-- drivers/usb/host/xhci.h | 31 +- drivers/usb/musb-new/musb_uboot.c | 4 +- drivers/video/cfb_console.c | 29 +- fs/fs.c | 1 + include/bootstage.h | 2 +- include/common.h | 30 +- include/configs/axs101.h | 1 - include/configs/bf609-ezkit.h | 1 - include/configs/chromebook_link.h | 61 +- include/configs/chromebox_panther.h | 17 + include/configs/exynos5250-common.h | 10 - include/configs/exynos5420-common.h | 2 - include/configs/sandbox.h | 59 +- include/configs/smdk5250.h | 1 - include/configs/snow.h | 3 +- include/configs/socfpga_common.h | 1 - include/configs/spear-common.h | 1 - include/configs/stv0991.h | 1 - include/configs/sunxi-common.h | 1 - include/configs/tb100.h | 1 - include/configs/x600.h | 1 - include/configs/x86-chromebook.h | 68 ++ include/configs/x86-common.h | 5 - include/cros_ec.h | 137 --- include/dm/device-internal.h | 2 +- include/dm/device.h | 61 +- include/dm/test.h | 8 +- include/dm/uclass-id.h | 11 + include/dm/uclass-internal.h | 7 +- include/dm/uclass.h | 2 + include/fdtdec.h | 19 +- include/fsl_dspi.h | 150 ++++ include/i2c.h | 8 +- include/linker_lists.h | 10 + include/linux/usb/ch9.h | 18 + include/linux/usb/gadget.h | 13 - include/mapmem.h | 32 + include/net.h | 470 ++++++---- include/os.h | 2 +- include/pci.h | 411 ++++++++- include/pci_ids.h | 2 + include/phy.h | 23 +- include/spi_flash.h | 47 +- include/usb.h | 494 ++++++++++- include/usb_defs.h | 68 +- lib/Kconfig | 9 + lib/fdtdec.c | 10 +- lib/net_utils.c | 16 +- lib/trace.c | 1 + net/arp.c | 137 ++- net/arp.h | 22 +- net/bootp.c | 373 ++++---- net/bootp.h | 39 +- net/cdp.c | 88 +- net/cdp.h | 2 +- net/dns.c | 72 +- net/dns.h | 2 +- net/eth.c | 666 +++++++++++--- net/link_local.c | 83 +- net/net.c | 493 ++++++----- net/nfs.c | 241 +++-- net/nfs.h | 2 +- net/ping.c | 49 +- net/rarp.c | 45 +- net/rarp.h | 6 +- net/sntp.c | 48 +- net/sntp.h | 2 +- net/tftp.c | 595 +++++++------ net/tftp.h | 8 +- post/cpu/mpc8xx/ether.c | 6 +- test/compression.c | 1 + test/dm/Makefile | 7 +- test/dm/bus.c | 16 +- test/dm/cmd_dm.c | 16 +- test/dm/core.c | 9 +- test/dm/eth.c | 156 ++++ test/dm/pci.c | 59 ++ test/dm/test-dm.sh | 3 + test/dm/test-main.c | 7 +- test/dm/test-uclass.c | 17 +- test/dm/test.dts | 78 ++ test/dm/usb.c | 50 ++ 552 files changed, 16068 insertions(+), 5193 deletions(-) create mode 100644 arch/arm/dts/ls1021a-qds.dts create mode 100644 arch/arm/dts/ls1021a-twr.dts create mode 100644 arch/arm/dts/ls1021a.dtsi create mode 100644 arch/arm/dts/skeleton64.dtsi create mode 100644 arch/sandbox/cpu/eth-raw-os.c create mode 100644 arch/sandbox/dts/cros-ec-keyboard.dtsi create mode 100644 arch/sandbox/include/asm/eth-raw-os.h create mode 100644 arch/sandbox/include/asm/eth.h create mode 100644 arch/sandbox/include/asm/processor.h create mode 100644 arch/sandbox/lib/pci_io.c create mode 100644 arch/x86/dts/chromebox_panther.dts create mode 100644 arch/x86/lib/lpc-uclass.c create mode 100644 arch/x86/lib/pch-uclass.c create mode 100644 board/google/chromebox_panther/Kconfig create mode 100644 board/google/chromebox_panther/MAINTAINERS create mode 100644 board/google/chromebox_panther/Makefile create mode 100644 board/google/chromebox_panther/panther.c delete mode 100644 configs/Linksprite_pcDuino3_fdt_defconfig create mode 100644 configs/chromebox_panther_defconfig create mode 100644 doc/device-tree-bindings/i2c/i2c-gpio.txt create mode 100644 doc/device-tree-bindings/net/allwinner,sun4i-emac.txt create mode 100644 doc/device-tree-bindings/net/allwinner,sun4i-mdio.txt create mode 100644 doc/device-tree-bindings/net/allwinner,sun7i-a20-gmac.txt create mode 100644 doc/device-tree-bindings/net/ethernet.txt create mode 100644 doc/device-tree-bindings/net/stmmac.txt create mode 100644 doc/driver-model/pci-info.txt create mode 100644 doc/driver-model/usb-info.txt create mode 100644 drivers/i2c/i2c-gpio.c create mode 100644 drivers/misc/swap_case.c create mode 100644 drivers/net/sandbox-raw.c create mode 100644 drivers/net/sandbox.c create mode 100644 drivers/pci/pci-emul-uclass.c create mode 100644 drivers/pci/pci-uclass.c create mode 100644 drivers/pci/pci_common.c create mode 100644 drivers/pci/pci_compat.c create mode 100644 drivers/pci/pci_sandbox.c create mode 100644 drivers/pci/pci_x86.c create mode 100644 drivers/spi/fsl_dspi.c create mode 100644 drivers/usb/emul/Kconfig create mode 100644 drivers/usb/emul/Makefile create mode 100644 drivers/usb/emul/sandbox_flash.c create mode 100644 drivers/usb/emul/sandbox_hub.c create mode 100644 drivers/usb/emul/usb-emul-uclass.c create mode 100644 drivers/usb/host/usb-sandbox.c create mode 100644 drivers/usb/host/usb-uclass.c create mode 100644 include/configs/chromebox_panther.h create mode 100644 include/configs/x86-chromebook.h create mode 100644 include/fsl_dspi.h create mode 100644 include/mapmem.h create mode 100644 test/dm/eth.c create mode 100644 test/dm/pci.c create mode 100644 test/dm/usb.c
Regards Simon

On Thu, Apr 16, 2015 at 09:15:26PM -0600, Simon Glass wrote:
Hi Tom,
As mentioned I reverted this patch as it conflicted with the dm tree and I suspect it might be buggy:
cd749658 usb_storage : scan all interfaces to find a storage device
Assuming this is OK and applies successfully I will rebase and resend this patch, then reply with some comments I have on the patch.
The following changes since commit 4564faeafbf11feb839e2e3f927be2f1a919ba96:
ti: dwc3: Enable clocks in enable_basic_clocks() in hw_data.c (2015-04-16 15:08:36 -0400)
are available in the git repository at:
http://git.denx.de/u-boot-dm.git
for you to fetch changes up to 2e6263093b3a5c2d2c586afaedfd346d6628f784:
sandbox: exynos: Move CONFIG_SOUND_SANDBOX to Kconfig (2015-04-16 20:47:57 -0600)
With this PR, am335x_boneblack (which has DM enabled) no longer functions. I'm running a bisect now, but heads up.

Hi Tom,
On 17 April 2015 at 10:27, Tom Rini trini@konsulko.com wrote:
On Thu, Apr 16, 2015 at 09:15:26PM -0600, Simon Glass wrote:
Hi Tom,
As mentioned I reverted this patch as it conflicted with the dm tree and I suspect it might be buggy:
cd749658 usb_storage : scan all interfaces to find a storage device
Assuming this is OK and applies successfully I will rebase and resend this patch, then reply with some comments I have on the patch.
The following changes since commit 4564faeafbf11feb839e2e3f927be2f1a919ba96:
ti: dwc3: Enable clocks in enable_basic_clocks() in hw_data.c (2015-04-16 15:08:36 -0400)
are available in the git repository at:
http://git.denx.de/u-boot-dm.git
for you to fetch changes up to 2e6263093b3a5c2d2c586afaedfd346d6628f784:
sandbox: exynos: Move CONFIG_SOUND_SANDBOX to Kconfig (2015-04-16 20:47:57 -0600)
With this PR, am335x_boneblack (which has DM enabled) no longer functions. I'm running a bisect now, but heads up.
OK, I'll wait for your bisect - also what is the console output when it breaks?
Regards, Simon

On Fri, Apr 17, 2015 at 10:30:36AM -0600, Simon Glass wrote:
Hi Tom,
On 17 April 2015 at 10:27, Tom Rini trini@konsulko.com wrote:
On Thu, Apr 16, 2015 at 09:15:26PM -0600, Simon Glass wrote:
Hi Tom,
As mentioned I reverted this patch as it conflicted with the dm tree and I suspect it might be buggy:
cd749658 usb_storage : scan all interfaces to find a storage device
Assuming this is OK and applies successfully I will rebase and resend this patch, then reply with some comments I have on the patch.
The following changes since commit 4564faeafbf11feb839e2e3f927be2f1a919ba96:
ti: dwc3: Enable clocks in enable_basic_clocks() in hw_data.c (2015-04-16 15:08:36 -0400)
are available in the git repository at:
http://git.denx.de/u-boot-dm.git
for you to fetch changes up to 2e6263093b3a5c2d2c586afaedfd346d6628f784:
sandbox: exynos: Move CONFIG_SOUND_SANDBOX to Kconfig (2015-04-16 20:47:57 -0600)
With this PR, am335x_boneblack (which has DM enabled) no longer functions. I'm running a bisect now, but heads up.
OK, I'll wait for your bisect - also what is the console output when it breaks?
OK, disregard Beaglebone Black error, that was me (need to remember that eMMC boot only works off of am335x_boneblack_config). But, A20-OLinuXino-Lime2_defconfig is broken by this. The error log: Command(A20 OLinuXino Lime2 console)> on (user:trini) Power turned on
U-Boot SPL 2015.04-00342-g2e62630 (Apr 17 2015 - 12:40:45) DRAM: 1024 MiB CPU: 912000000Hz, AXI/AHB/APB: 3/2/2
U-Boot 2015.04-00342-g2e62630 (Apr 17 2015 - 12:40:45) Allwinner Technology
CPU: Allwinner A20 (SUN7I) I2C: ready DRAM: 1 GiB MMC: SUNXI SD/MMC: 0 *** Warning - bad CRC, using default environment
In: serial Out: serial Err: serial SCSI: SUNXI SCSI INIT SATA link 0 timeout. AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl SATA mode flags: ncq stag pm led clo only pmp pio slum part ccc apst Net: dwmac.1c50000 starting USB... USB0: USB EHCI 1.00 scanning bus 0 for devices... U-Boot SPL 2015.04-00342-g2e62630 (Apr 17 2015 - 12:40:45) DRAM: 1024 MiB CPU: 912000000Hz, AXI/AHB/APB: 3/2/2 MMC Device 0 not found spl: mmc device not found!! ### ERROR ### Please RESET the board ###
And good: Command(A20 OLinuXino Lime2 console)> on (user:trini) Power turned on
U-Boot SPL 2015.04-00121-g4564fae (Apr 17 2015 - 12:42:40) DRAM: 1024 MiB CPU: 912000000Hz, AXI/AHB/APB: 3/2/2
U-Boot 2015.04-00121-g4564fae (Apr 17 2015 - 12:42:40) Allwinner Technology
CPU: Allwinner A20 (SUN7I) I2C: ready DRAM: 1 GiB MMC: SUNXI SD/MMC: 0 *** Warning - bad CRC, using default environment
In: serial Out: serial Err: serial SCSI: SUNXI SCSI INIT SATA link 0 timeout. AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl SATA mode flags: ncq stag pm led clo only pmp pio slum part ccc apst Net: dwmac.1c50000 starting USB... USB0: USB EHCI 1.00 scanning bus 0 for devices... 1 USB Device(s) found USB1: USB EHCI 1.00 scanning bus 1 for devices... 1 USB Device(s) found scanning usb for storage devices... 0 Storage Device(s) found Hit any key to stop autoboot: 0 sunxi#
So... we cause a reset during USB scan and then fail to boot a second time?

Hi Tom,
On 17 April 2015 at 10:46, Tom Rini trini@konsulko.com wrote:
On Fri, Apr 17, 2015 at 10:30:36AM -0600, Simon Glass wrote:
Hi Tom,
On 17 April 2015 at 10:27, Tom Rini trini@konsulko.com wrote:
On Thu, Apr 16, 2015 at 09:15:26PM -0600, Simon Glass wrote:
Hi Tom,
As mentioned I reverted this patch as it conflicted with the dm tree and I suspect it might be buggy:
cd749658 usb_storage : scan all interfaces to find a storage device
Assuming this is OK and applies successfully I will rebase and resend this patch, then reply with some comments I have on the patch.
The following changes since commit 4564faeafbf11feb839e2e3f927be2f1a919ba96:
ti: dwc3: Enable clocks in enable_basic_clocks() in hw_data.c (2015-04-16 15:08:36 -0400)
are available in the git repository at:
http://git.denx.de/u-boot-dm.git
for you to fetch changes up to 2e6263093b3a5c2d2c586afaedfd346d6628f784:
sandbox: exynos: Move CONFIG_SOUND_SANDBOX to Kconfig (2015-04-16 20:47:57 -0600)
With this PR, am335x_boneblack (which has DM enabled) no longer functions. I'm running a bisect now, but heads up.
OK, I'll wait for your bisect - also what is the console output when it breaks?
OK, disregard Beaglebone Black error, that was me (need to remember that eMMC boot only works off of am335x_boneblack_config). But, A20-OLinuXino-Lime2_defconfig is broken by this. The error log: Command(A20 OLinuXino Lime2 console)> on (user:trini) Power turned on
U-Boot SPL 2015.04-00342-g2e62630 (Apr 17 2015 - 12:40:45) DRAM: 1024 MiB CPU: 912000000Hz, AXI/AHB/APB: 3/2/2
U-Boot 2015.04-00342-g2e62630 (Apr 17 2015 - 12:40:45) Allwinner Technology
CPU: Allwinner A20 (SUN7I) I2C: ready DRAM: 1 GiB MMC: SUNXI SD/MMC: 0 *** Warning - bad CRC, using default environment
In: serial Out: serial Err: serial SCSI: SUNXI SCSI INIT SATA link 0 timeout. AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl SATA mode flags: ncq stag pm led clo only pmp pio slum part ccc apst Net: dwmac.1c50000 starting USB... USB0: USB EHCI 1.00 scanning bus 0 for devices... U-Boot SPL 2015.04-00342-g2e62630 (Apr 17 2015 - 12:40:45) DRAM: 1024 MiB CPU: 912000000Hz, AXI/AHB/APB: 3/2/2 MMC Device 0 not found spl: mmc device not found!! ### ERROR ### Please RESET the board ###
And good: Command(A20 OLinuXino Lime2 console)> on (user:trini) Power turned on
U-Boot SPL 2015.04-00121-g4564fae (Apr 17 2015 - 12:42:40) DRAM: 1024 MiB CPU: 912000000Hz, AXI/AHB/APB: 3/2/2
U-Boot 2015.04-00121-g4564fae (Apr 17 2015 - 12:42:40) Allwinner Technology
CPU: Allwinner A20 (SUN7I) I2C: ready DRAM: 1 GiB MMC: SUNXI SD/MMC: 0 *** Warning - bad CRC, using default environment
In: serial Out: serial Err: serial SCSI: SUNXI SCSI INIT SATA link 0 timeout. AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl SATA mode flags: ncq stag pm led clo only pmp pio slum part ccc apst Net: dwmac.1c50000 starting USB... USB0: USB EHCI 1.00 scanning bus 0 for devices... 1 USB Device(s) found USB1: USB EHCI 1.00 scanning bus 1 for devices... 1 USB Device(s) found scanning usb for storage devices... 0 Storage Device(s) found Hit any key to stop autoboot: 0 sunxi#
So... we cause a reset during USB scan and then fail to boot a second time?
Thanks for testing this.
I'm not sure if I have a Lime (I might do, will need to look). I was testing sunxi on a pcduino3 but USB does not work on that for reasons I was looking into (it just says lowlevel init failure due to moving to driver model for GPIO).
I will take a look. In the meantime, which commit breaks this? I could perhaps issue a pull for commits up to that point to reduce the load.
Regards, Simon

Hi Tom and Simon,
On 17-04-15 18:54, Simon Glass wrote:
Hi Tom,
On 17 April 2015 at 10:46, Tom Rini trini@konsulko.com wrote:
On Fri, Apr 17, 2015 at 10:30:36AM -0600, Simon Glass wrote:
Hi Tom,
On 17 April 2015 at 10:27, Tom Rini trini@konsulko.com wrote:
On Thu, Apr 16, 2015 at 09:15:26PM -0600, Simon Glass wrote:
Hi Tom,
As mentioned I reverted this patch as it conflicted with the dm tree and I suspect it might be buggy:
cd749658 usb_storage : scan all interfaces to find a storage device
Assuming this is OK and applies successfully I will rebase and resend this patch, then reply with some comments I have on the patch.
The following changes since commit 4564faeafbf11feb839e2e3f927be2f1a919ba96:
ti: dwc3: Enable clocks in enable_basic_clocks() in hw_data.c (2015-04-16 15:08:36 -0400)
are available in the git repository at:
http://git.denx.de/u-boot-dm.git
for you to fetch changes up to 2e6263093b3a5c2d2c586afaedfd346d6628f784:
sandbox: exynos: Move CONFIG_SOUND_SANDBOX to Kconfig (2015-04-16 20:47:57 -0600)
With this PR, am335x_boneblack (which has DM enabled) no longer functions. I'm running a bisect now, but heads up.
OK, I'll wait for your bisect - also what is the console output when it breaks?
OK, disregard Beaglebone Black error, that was me (need to remember that eMMC boot only works off of am335x_boneblack_config). But, A20-OLinuXino-Lime2_defconfig is broken by this. The error log: Command(A20 OLinuXino Lime2 console)> on (user:trini) Power turned on
U-Boot SPL 2015.04-00342-g2e62630 (Apr 17 2015 - 12:40:45) DRAM: 1024 MiB CPU: 912000000Hz, AXI/AHB/APB: 3/2/2
U-Boot 2015.04-00342-g2e62630 (Apr 17 2015 - 12:40:45) Allwinner Technology
CPU: Allwinner A20 (SUN7I) I2C: ready DRAM: 1 GiB MMC: SUNXI SD/MMC: 0 *** Warning - bad CRC, using default environment
In: serial Out: serial Err: serial SCSI: SUNXI SCSI INIT SATA link 0 timeout. AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl SATA mode flags: ncq stag pm led clo only pmp pio slum part ccc apst Net: dwmac.1c50000 starting USB... USB0: USB EHCI 1.00 scanning bus 0 for devices... U-Boot SPL 2015.04-00342-g2e62630 (Apr 17 2015 - 12:40:45) DRAM: 1024 MiB CPU: 912000000Hz, AXI/AHB/APB: 3/2/2 MMC Device 0 not found spl: mmc device not found!! ### ERROR ### Please RESET the board ###
And good: Command(A20 OLinuXino Lime2 console)> on (user:trini) Power turned on
U-Boot SPL 2015.04-00121-g4564fae (Apr 17 2015 - 12:42:40) DRAM: 1024 MiB CPU: 912000000Hz, AXI/AHB/APB: 3/2/2
U-Boot 2015.04-00121-g4564fae (Apr 17 2015 - 12:42:40) Allwinner Technology
CPU: Allwinner A20 (SUN7I) I2C: ready DRAM: 1 GiB MMC: SUNXI SD/MMC: 0 *** Warning - bad CRC, using default environment
In: serial Out: serial Err: serial SCSI: SUNXI SCSI INIT SATA link 0 timeout. AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl SATA mode flags: ncq stag pm led clo only pmp pio slum part ccc apst Net: dwmac.1c50000 starting USB... USB0: USB EHCI 1.00 scanning bus 0 for devices... 1 USB Device(s) found USB1: USB EHCI 1.00 scanning bus 1 for devices... 1 USB Device(s) found scanning usb for storage devices... 0 Storage Device(s) found Hit any key to stop autoboot: 0 sunxi#
So... we cause a reset during USB scan and then fail to boot a second time?
Thanks for testing this.
I'm not sure if I have a Lime (I might do, will need to look). I was testing sunxi on a pcduino3 but USB does not work on that for reasons I was looking into (it just says lowlevel init failure due to moving to driver model for GPIO).
I will take a look. In the meantime, which commit breaks this? I could perhaps issue a pull for commits up to that point to reduce the load.
I've been working on moving more sunxi boards over to dm (all of them to be precise) sofar I've mostly been doing some ground work, so I've not yet run any tests. I'll run some tests on another Olinuxino A20 board, and an A10 Lime with current u-boot-dm/master, and assuming I can reproduce I'll try to come up with a fix.
Regards,
Hans

On Fri, Apr 17, 2015 at 10:54:21AM -0600, Simon Glass wrote:
Hi Tom,
On 17 April 2015 at 10:46, Tom Rini trini@konsulko.com wrote:
On Fri, Apr 17, 2015 at 10:30:36AM -0600, Simon Glass wrote:
Hi Tom,
On 17 April 2015 at 10:27, Tom Rini trini@konsulko.com wrote:
On Thu, Apr 16, 2015 at 09:15:26PM -0600, Simon Glass wrote:
Hi Tom,
As mentioned I reverted this patch as it conflicted with the dm tree and I suspect it might be buggy:
cd749658 usb_storage : scan all interfaces to find a storage device
Assuming this is OK and applies successfully I will rebase and resend this patch, then reply with some comments I have on the patch.
The following changes since commit 4564faeafbf11feb839e2e3f927be2f1a919ba96:
ti: dwc3: Enable clocks in enable_basic_clocks() in hw_data.c (2015-04-16 15:08:36 -0400)
are available in the git repository at:
http://git.denx.de/u-boot-dm.git
for you to fetch changes up to 2e6263093b3a5c2d2c586afaedfd346d6628f784:
sandbox: exynos: Move CONFIG_SOUND_SANDBOX to Kconfig (2015-04-16 20:47:57 -0600)
With this PR, am335x_boneblack (which has DM enabled) no longer functions. I'm running a bisect now, but heads up.
OK, I'll wait for your bisect - also what is the console output when it breaks?
OK, disregard Beaglebone Black error, that was me (need to remember that eMMC boot only works off of am335x_boneblack_config). But, A20-OLinuXino-Lime2_defconfig is broken by this. The error log: Command(A20 OLinuXino Lime2 console)> on (user:trini) Power turned on
U-Boot SPL 2015.04-00342-g2e62630 (Apr 17 2015 - 12:40:45) DRAM: 1024 MiB CPU: 912000000Hz, AXI/AHB/APB: 3/2/2
U-Boot 2015.04-00342-g2e62630 (Apr 17 2015 - 12:40:45) Allwinner Technology
CPU: Allwinner A20 (SUN7I) I2C: ready DRAM: 1 GiB MMC: SUNXI SD/MMC: 0 *** Warning - bad CRC, using default environment
In: serial Out: serial Err: serial SCSI: SUNXI SCSI INIT SATA link 0 timeout. AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl SATA mode flags: ncq stag pm led clo only pmp pio slum part ccc apst Net: dwmac.1c50000 starting USB... USB0: USB EHCI 1.00 scanning bus 0 for devices... U-Boot SPL 2015.04-00342-g2e62630 (Apr 17 2015 - 12:40:45) DRAM: 1024 MiB CPU: 912000000Hz, AXI/AHB/APB: 3/2/2 MMC Device 0 not found spl: mmc device not found!! ### ERROR ### Please RESET the board ###
And good: Command(A20 OLinuXino Lime2 console)> on (user:trini) Power turned on
U-Boot SPL 2015.04-00121-g4564fae (Apr 17 2015 - 12:42:40) DRAM: 1024 MiB CPU: 912000000Hz, AXI/AHB/APB: 3/2/2
U-Boot 2015.04-00121-g4564fae (Apr 17 2015 - 12:42:40) Allwinner Technology
CPU: Allwinner A20 (SUN7I) I2C: ready DRAM: 1 GiB MMC: SUNXI SD/MMC: 0 *** Warning - bad CRC, using default environment
In: serial Out: serial Err: serial SCSI: SUNXI SCSI INIT SATA link 0 timeout. AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl SATA mode flags: ncq stag pm led clo only pmp pio slum part ccc apst Net: dwmac.1c50000 starting USB... USB0: USB EHCI 1.00 scanning bus 0 for devices... 1 USB Device(s) found USB1: USB EHCI 1.00 scanning bus 1 for devices... 1 USB Device(s) found scanning usb for storage devices... 0 Storage Device(s) found Hit any key to stop autoboot: 0 sunxi#
So... we cause a reset during USB scan and then fail to boot a second time?
Thanks for testing this.
I'm not sure if I have a Lime (I might do, will need to look). I was testing sunxi on a pcduino3 but USB does not work on that for reasons I was looking into (it just says lowlevel init failure due to moving to driver model for GPIO).
I will take a look. In the meantime, which commit breaks this? I could perhaps issue a pull for commits up to that point to reduce the load.
I haven't had a chance to bisect yet but I will in a few hours.

Hi,
On 17-04-15 19:53, Tom Rini wrote:
On Fri, Apr 17, 2015 at 10:54:21AM -0600, Simon Glass wrote:
Hi Tom,
On 17 April 2015 at 10:46, Tom Rini trini@konsulko.com wrote:
On Fri, Apr 17, 2015 at 10:30:36AM -0600, Simon Glass wrote:
Hi Tom,
On 17 April 2015 at 10:27, Tom Rini trini@konsulko.com wrote:
On Thu, Apr 16, 2015 at 09:15:26PM -0600, Simon Glass wrote:
Hi Tom,
As mentioned I reverted this patch as it conflicted with the dm tree and I suspect it might be buggy:
cd749658 usb_storage : scan all interfaces to find a storage device
Assuming this is OK and applies successfully I will rebase and resend this patch, then reply with some comments I have on the patch.
The following changes since commit 4564faeafbf11feb839e2e3f927be2f1a919ba96:
ti: dwc3: Enable clocks in enable_basic_clocks() in hw_data.c (2015-04-16 15:08:36 -0400)
are available in the git repository at:
http://git.denx.de/u-boot-dm.git
for you to fetch changes up to 2e6263093b3a5c2d2c586afaedfd346d6628f784:
sandbox: exynos: Move CONFIG_SOUND_SANDBOX to Kconfig (2015-04-16 20:47:57 -0600)
With this PR, am335x_boneblack (which has DM enabled) no longer functions. I'm running a bisect now, but heads up.
OK, I'll wait for your bisect - also what is the console output when it breaks?
OK, disregard Beaglebone Black error, that was me (need to remember that eMMC boot only works off of am335x_boneblack_config). But, A20-OLinuXino-Lime2_defconfig is broken by this. The error log: Command(A20 OLinuXino Lime2 console)> on (user:trini) Power turned on
U-Boot SPL 2015.04-00342-g2e62630 (Apr 17 2015 - 12:40:45) DRAM: 1024 MiB CPU: 912000000Hz, AXI/AHB/APB: 3/2/2
U-Boot 2015.04-00342-g2e62630 (Apr 17 2015 - 12:40:45) Allwinner Technology
CPU: Allwinner A20 (SUN7I) I2C: ready DRAM: 1 GiB MMC: SUNXI SD/MMC: 0 *** Warning - bad CRC, using default environment
In: serial Out: serial Err: serial SCSI: SUNXI SCSI INIT SATA link 0 timeout. AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl SATA mode flags: ncq stag pm led clo only pmp pio slum part ccc apst Net: dwmac.1c50000 starting USB... USB0: USB EHCI 1.00 scanning bus 0 for devices... U-Boot SPL 2015.04-00342-g2e62630 (Apr 17 2015 - 12:40:45) DRAM: 1024 MiB CPU: 912000000Hz, AXI/AHB/APB: 3/2/2 MMC Device 0 not found spl: mmc device not found!! ### ERROR ### Please RESET the board ###
And good: Command(A20 OLinuXino Lime2 console)> on (user:trini) Power turned on
U-Boot SPL 2015.04-00121-g4564fae (Apr 17 2015 - 12:42:40) DRAM: 1024 MiB CPU: 912000000Hz, AXI/AHB/APB: 3/2/2
U-Boot 2015.04-00121-g4564fae (Apr 17 2015 - 12:42:40) Allwinner Technology
CPU: Allwinner A20 (SUN7I) I2C: ready DRAM: 1 GiB MMC: SUNXI SD/MMC: 0 *** Warning - bad CRC, using default environment
In: serial Out: serial Err: serial SCSI: SUNXI SCSI INIT SATA link 0 timeout. AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl SATA mode flags: ncq stag pm led clo only pmp pio slum part ccc apst Net: dwmac.1c50000 starting USB... USB0: USB EHCI 1.00 scanning bus 0 for devices... 1 USB Device(s) found USB1: USB EHCI 1.00 scanning bus 1 for devices... 1 USB Device(s) found scanning usb for storage devices... 0 Storage Device(s) found Hit any key to stop autoboot: 0 sunxi#
So... we cause a reset during USB scan and then fail to boot a second time?
Thanks for testing this.
I'm not sure if I have a Lime (I might do, will need to look). I was testing sunxi on a pcduino3 but USB does not work on that for reasons I was looking into (it just says lowlevel init failure due to moving to driver model for GPIO).
I will take a look. In the meantime, which commit breaks this? I could perhaps issue a pull for commits up to that point to reduce the load.
I haven't had a chance to bisect yet but I will in a few hours.
No need to, I've just completed a bisect, it points to:
5bca5a6303f3526ab2cf9c0a62cd26c16e0d5c2f is the first bad commit commit 5bca5a6303f3526ab2cf9c0a62cd26c16e0d5c2f Author: Simon Glass sjg@chromium.org Date: Wed Mar 25 12:22:27 2015 -0600
dm: usb: Drop the EHCI weak functions
These are a pain with driver model because we might have different EHCI drivers which want to implement them differently. Now that they use consistent function signatures, we can in good conscience move them to a struct.
Signed-off-by: Simon Glass sjg@chromium.org Reviewed-by: Marek Vasut marex@denx.de
I'm going to first spend some time with my family now, I may look into this later tonight, or otherwise this weekend. I'll be sure to check mail first to avoid double work, so feel free to fix the problem while I'm relaxing :)
Regards,
Hans

Hi,
On 17-04-15 21:28, Hans de Goede wrote:
Hi,
On 17-04-15 19:53, Tom Rini wrote:
On Fri, Apr 17, 2015 at 10:54:21AM -0600, Simon Glass wrote:
Hi Tom,
On 17 April 2015 at 10:46, Tom Rini trini@konsulko.com wrote:
On Fri, Apr 17, 2015 at 10:30:36AM -0600, Simon Glass wrote:
Hi Tom,
On 17 April 2015 at 10:27, Tom Rini trini@konsulko.com wrote:
On Thu, Apr 16, 2015 at 09:15:26PM -0600, Simon Glass wrote:
> Hi Tom, > > As mentioned I reverted this patch as it conflicted with the dm tree > and I suspect it might be buggy: > > cd749658 usb_storage : scan all interfaces to find a storage device > > Assuming this is OK and applies successfully I will rebase and resend > this patch, then reply with some comments I have on the patch. > > > The following changes since commit 4564faeafbf11feb839e2e3f927be2f1a919ba96: > > ti: dwc3: Enable clocks in enable_basic_clocks() in hw_data.c > (2015-04-16 15:08:36 -0400) > > are available in the git repository at: > > http://git.denx.de/u-boot-dm.git > > for you to fetch changes up to 2e6263093b3a5c2d2c586afaedfd346d6628f784: > > sandbox: exynos: Move CONFIG_SOUND_SANDBOX to Kconfig (2015-04-16 > 20:47:57 -0600)
With this PR, am335x_boneblack (which has DM enabled) no longer functions. I'm running a bisect now, but heads up.
OK, I'll wait for your bisect - also what is the console output when it breaks?
OK, disregard Beaglebone Black error, that was me (need to remember that eMMC boot only works off of am335x_boneblack_config). But, A20-OLinuXino-Lime2_defconfig is broken by this. The error log: Command(A20 OLinuXino Lime2 console)> on (user:trini) Power turned on
U-Boot SPL 2015.04-00342-g2e62630 (Apr 17 2015 - 12:40:45) DRAM: 1024 MiB CPU: 912000000Hz, AXI/AHB/APB: 3/2/2
U-Boot 2015.04-00342-g2e62630 (Apr 17 2015 - 12:40:45) Allwinner Technology
CPU: Allwinner A20 (SUN7I) I2C: ready DRAM: 1 GiB MMC: SUNXI SD/MMC: 0 *** Warning - bad CRC, using default environment
In: serial Out: serial Err: serial SCSI: SUNXI SCSI INIT SATA link 0 timeout. AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl SATA mode flags: ncq stag pm led clo only pmp pio slum part ccc apst Net: dwmac.1c50000 starting USB... USB0: USB EHCI 1.00 scanning bus 0 for devices... U-Boot SPL 2015.04-00342-g2e62630 (Apr 17 2015 - 12:40:45) DRAM: 1024 MiB CPU: 912000000Hz, AXI/AHB/APB: 3/2/2 MMC Device 0 not found spl: mmc device not found!! ### ERROR ### Please RESET the board ###
And good: Command(A20 OLinuXino Lime2 console)> on (user:trini) Power turned on
U-Boot SPL 2015.04-00121-g4564fae (Apr 17 2015 - 12:42:40) DRAM: 1024 MiB CPU: 912000000Hz, AXI/AHB/APB: 3/2/2
U-Boot 2015.04-00121-g4564fae (Apr 17 2015 - 12:42:40) Allwinner Technology
CPU: Allwinner A20 (SUN7I) I2C: ready DRAM: 1 GiB MMC: SUNXI SD/MMC: 0 *** Warning - bad CRC, using default environment
In: serial Out: serial Err: serial SCSI: SUNXI SCSI INIT SATA link 0 timeout. AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl SATA mode flags: ncq stag pm led clo only pmp pio slum part ccc apst Net: dwmac.1c50000 starting USB... USB0: USB EHCI 1.00 scanning bus 0 for devices... 1 USB Device(s) found USB1: USB EHCI 1.00 scanning bus 1 for devices... 1 USB Device(s) found scanning usb for storage devices... 0 Storage Device(s) found Hit any key to stop autoboot: 0 sunxi#
So... we cause a reset during USB scan and then fail to boot a second time?
Thanks for testing this.
I'm not sure if I have a Lime (I might do, will need to look). I was testing sunxi on a pcduino3 but USB does not work on that for reasons I was looking into (it just says lowlevel init failure due to moving to driver model for GPIO).
I will take a look. In the meantime, which commit breaks this? I could perhaps issue a pull for commits up to that point to reduce the load.
I haven't had a chance to bisect yet but I will in a few hours.
No need to, I've just completed a bisect, it points to:
5bca5a6303f3526ab2cf9c0a62cd26c16e0d5c2f is the first bad commit commit 5bca5a6303f3526ab2cf9c0a62cd26c16e0d5c2f Author: Simon Glass sjg@chromium.org Date: Wed Mar 25 12:22:27 2015 -0600
dm: usb: Drop the EHCI weak functions These are a pain with driver model because we might have different EHCI drivers which want to implement them differently. Now that they use consistent function signatures, we can in good conscience move them to a struct. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Marek Vasut <marex@denx.de>
I'm going to first spend some time with my family now, I may look into this later tonight, or otherwise this weekend. I'll be sure to check mail first to avoid double work, so feel free to fix the problem while I'm relaxing :)
Ok, so I could not help myself and took a quick look at the patch causing the issue, this fixes the reset on usb scan problem:
diff --git a/drivers/usb/host/ehci-sunxi.c b/drivers/usb/host/ehci-sunxi.c index eda9f69..a847ac5 100644 --- a/drivers/usb/host/ehci-sunxi.c +++ b/drivers/usb/host/ehci-sunxi.c @@ -34,6 +34,8 @@ int ehci_hcd_init(int index, enum usb_init_type init, struct ehci_hccr **hccr, (uint32_t)*hccr, (uint32_t)*hcor, (uint32_t)HC_LENGTH(ehci_readl(&(*hccr)->cr_capbase)));
+ ehci_set_controller_priv(index, NULL, NULL); + return 0; }
And should probably be squashed into the original patch to avoid bisect problems.
But with this in place, all is still not well wrt non devicetree usb, usb keyboard support does not work, "usb tree" says:
USB device tree: 1 Hub (480 Mb/s, 0mA) | u-boot EHCI Host Controller | +-2 Hub (480 Mb/s, 100mA) | +-3 Hub (12 Mb/s, 100mA) | | -1 See Interface (12 Mb/s, 0mA) |
Note the -1 as device number for the "See Interface" device.
This particular usb setup used to work fine.
I guess this is another issue to git bisect, no idea when I'll get around to that.
Regards,
Hans
Regards,
Hans

On Fri, Apr 17, 2015 at 09:39:50PM +0200, Hans de Goede wrote:
Hi,
On 17-04-15 21:28, Hans de Goede wrote:
Hi,
On 17-04-15 19:53, Tom Rini wrote:
On Fri, Apr 17, 2015 at 10:54:21AM -0600, Simon Glass wrote:
Hi Tom,
On 17 April 2015 at 10:46, Tom Rini trini@konsulko.com wrote:
On Fri, Apr 17, 2015 at 10:30:36AM -0600, Simon Glass wrote:
Hi Tom,
On 17 April 2015 at 10:27, Tom Rini trini@konsulko.com wrote: > >On Thu, Apr 16, 2015 at 09:15:26PM -0600, Simon Glass wrote: > >>Hi Tom, >> >>As mentioned I reverted this patch as it conflicted with the dm tree >>and I suspect it might be buggy: >> >>cd749658 usb_storage : scan all interfaces to find a storage device >> >>Assuming this is OK and applies successfully I will rebase and resend >>this patch, then reply with some comments I have on the patch. >> >> >>The following changes since commit 4564faeafbf11feb839e2e3f927be2f1a919ba96: >> >> ti: dwc3: Enable clocks in enable_basic_clocks() in hw_data.c >>(2015-04-16 15:08:36 -0400) >> >>are available in the git repository at: >> >> http://git.denx.de/u-boot-dm.git >> >>for you to fetch changes up to 2e6263093b3a5c2d2c586afaedfd346d6628f784: >> >> sandbox: exynos: Move CONFIG_SOUND_SANDBOX to Kconfig (2015-04-16 >>20:47:57 -0600) > >With this PR, am335x_boneblack (which has DM enabled) no longer >functions. I'm running a bisect now, but heads up.
OK, I'll wait for your bisect - also what is the console output when it breaks?
OK, disregard Beaglebone Black error, that was me (need to remember that eMMC boot only works off of am335x_boneblack_config). But, A20-OLinuXino-Lime2_defconfig is broken by this. The error log: Command(A20 OLinuXino Lime2 console)> on (user:trini) Power turned on
U-Boot SPL 2015.04-00342-g2e62630 (Apr 17 2015 - 12:40:45) DRAM: 1024 MiB CPU: 912000000Hz, AXI/AHB/APB: 3/2/2
U-Boot 2015.04-00342-g2e62630 (Apr 17 2015 - 12:40:45) Allwinner Technology
CPU: Allwinner A20 (SUN7I) I2C: ready DRAM: 1 GiB MMC: SUNXI SD/MMC: 0 *** Warning - bad CRC, using default environment
In: serial Out: serial Err: serial SCSI: SUNXI SCSI INIT SATA link 0 timeout. AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl SATA mode flags: ncq stag pm led clo only pmp pio slum part ccc apst Net: dwmac.1c50000 starting USB... USB0: USB EHCI 1.00 scanning bus 0 for devices... U-Boot SPL 2015.04-00342-g2e62630 (Apr 17 2015 - 12:40:45) DRAM: 1024 MiB CPU: 912000000Hz, AXI/AHB/APB: 3/2/2 MMC Device 0 not found spl: mmc device not found!! ### ERROR ### Please RESET the board ###
And good: Command(A20 OLinuXino Lime2 console)> on (user:trini) Power turned on
U-Boot SPL 2015.04-00121-g4564fae (Apr 17 2015 - 12:42:40) DRAM: 1024 MiB CPU: 912000000Hz, AXI/AHB/APB: 3/2/2
U-Boot 2015.04-00121-g4564fae (Apr 17 2015 - 12:42:40) Allwinner Technology
CPU: Allwinner A20 (SUN7I) I2C: ready DRAM: 1 GiB MMC: SUNXI SD/MMC: 0 *** Warning - bad CRC, using default environment
In: serial Out: serial Err: serial SCSI: SUNXI SCSI INIT SATA link 0 timeout. AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl SATA mode flags: ncq stag pm led clo only pmp pio slum part ccc apst Net: dwmac.1c50000 starting USB... USB0: USB EHCI 1.00 scanning bus 0 for devices... 1 USB Device(s) found USB1: USB EHCI 1.00 scanning bus 1 for devices... 1 USB Device(s) found scanning usb for storage devices... 0 Storage Device(s) found Hit any key to stop autoboot: 0 sunxi#
So... we cause a reset during USB scan and then fail to boot a second time?
Thanks for testing this.
I'm not sure if I have a Lime (I might do, will need to look). I was testing sunxi on a pcduino3 but USB does not work on that for reasons I was looking into (it just says lowlevel init failure due to moving to driver model for GPIO).
I will take a look. In the meantime, which commit breaks this? I could perhaps issue a pull for commits up to that point to reduce the load.
I haven't had a chance to bisect yet but I will in a few hours.
No need to, I've just completed a bisect, it points to:
5bca5a6303f3526ab2cf9c0a62cd26c16e0d5c2f is the first bad commit commit 5bca5a6303f3526ab2cf9c0a62cd26c16e0d5c2f Author: Simon Glass sjg@chromium.org Date: Wed Mar 25 12:22:27 2015 -0600
dm: usb: Drop the EHCI weak functions These are a pain with driver model because we might have different EHCI drivers which want to implement them differently. Now that they use consistent function signatures, we can in good conscience move them to a struct. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Marek Vasut <marex@denx.de>
I'm going to first spend some time with my family now, I may look into this later tonight, or otherwise this weekend. I'll be sure to check mail first to avoid double work, so feel free to fix the problem while I'm relaxing :)
Ok, so I could not help myself and took a quick look at the patch causing the issue, this fixes the reset on usb scan problem:
diff --git a/drivers/usb/host/ehci-sunxi.c b/drivers/usb/host/ehci-sunxi.c index eda9f69..a847ac5 100644 --- a/drivers/usb/host/ehci-sunxi.c +++ b/drivers/usb/host/ehci-sunxi.c @@ -34,6 +34,8 @@ int ehci_hcd_init(int index, enum usb_init_type init, struct ehci_hccr **hccr, (uint32_t)*hccr, (uint32_t)*hcor, (uint32_t)HC_LENGTH(ehci_readl(&(*hccr)->cr_capbase)));
- ehci_set_controller_priv(index, NULL, NULL);
return 0;
}
And should probably be squashed into the original patch to avoid bisect problems.
But with this in place, all is still not well wrt non devicetree usb, usb keyboard support does not work, "usb tree" says:
USB device tree: 1 Hub (480 Mb/s, 0mA) | u-boot EHCI Host Controller | +-2 Hub (480 Mb/s, 100mA) | +-3 Hub (12 Mb/s, 100mA) | | -1 See Interface (12 Mb/s, 0mA) |
Note the -1 as device number for the "See Interface" device.
This particular usb setup used to work fine.
I guess this is another issue to git bisect, no idea when I'll get around to that.
I see that the mailing lists are hiccuping right now. I also found the same problem and a quick solution, but whacking ehci-sunxi.c means all of the others need it too. I reworked usb_lowlevel_init so that everyone gets the defaults and then can override as needed.
The USB keyboard I plugged in shows a problem with the DM series and a different problem on master but I think it's probably the same problem so I'll bisect it down shortly.

On Fri, Apr 17, 2015 at 09:39:50PM +0200, Hans de Goede wrote:
Hi,
On 17-04-15 21:28, Hans de Goede wrote:
Hi,
On 17-04-15 19:53, Tom Rini wrote:
On Fri, Apr 17, 2015 at 10:54:21AM -0600, Simon Glass wrote:
Hi Tom,
On 17 April 2015 at 10:46, Tom Rini trini@konsulko.com wrote:
On Fri, Apr 17, 2015 at 10:30:36AM -0600, Simon Glass wrote:
Hi Tom,
On 17 April 2015 at 10:27, Tom Rini trini@konsulko.com wrote: > >On Thu, Apr 16, 2015 at 09:15:26PM -0600, Simon Glass wrote: > >>Hi Tom, >> >>As mentioned I reverted this patch as it conflicted with the dm tree >>and I suspect it might be buggy: >> >>cd749658 usb_storage : scan all interfaces to find a storage device >> >>Assuming this is OK and applies successfully I will rebase and resend >>this patch, then reply with some comments I have on the patch. >> >> >>The following changes since commit 4564faeafbf11feb839e2e3f927be2f1a919ba96: >> >> ti: dwc3: Enable clocks in enable_basic_clocks() in hw_data.c >>(2015-04-16 15:08:36 -0400) >> >>are available in the git repository at: >> >> http://git.denx.de/u-boot-dm.git >> >>for you to fetch changes up to 2e6263093b3a5c2d2c586afaedfd346d6628f784: >> >> sandbox: exynos: Move CONFIG_SOUND_SANDBOX to Kconfig (2015-04-16 >>20:47:57 -0600) > >With this PR, am335x_boneblack (which has DM enabled) no longer >functions. I'm running a bisect now, but heads up.
OK, I'll wait for your bisect - also what is the console output when it breaks?
OK, disregard Beaglebone Black error, that was me (need to remember that eMMC boot only works off of am335x_boneblack_config). But, A20-OLinuXino-Lime2_defconfig is broken by this. The error log: Command(A20 OLinuXino Lime2 console)> on (user:trini) Power turned on
U-Boot SPL 2015.04-00342-g2e62630 (Apr 17 2015 - 12:40:45) DRAM: 1024 MiB CPU: 912000000Hz, AXI/AHB/APB: 3/2/2
U-Boot 2015.04-00342-g2e62630 (Apr 17 2015 - 12:40:45) Allwinner Technology
CPU: Allwinner A20 (SUN7I) I2C: ready DRAM: 1 GiB MMC: SUNXI SD/MMC: 0 *** Warning - bad CRC, using default environment
In: serial Out: serial Err: serial SCSI: SUNXI SCSI INIT SATA link 0 timeout. AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl SATA mode flags: ncq stag pm led clo only pmp pio slum part ccc apst Net: dwmac.1c50000 starting USB... USB0: USB EHCI 1.00 scanning bus 0 for devices... U-Boot SPL 2015.04-00342-g2e62630 (Apr 17 2015 - 12:40:45) DRAM: 1024 MiB CPU: 912000000Hz, AXI/AHB/APB: 3/2/2 MMC Device 0 not found spl: mmc device not found!! ### ERROR ### Please RESET the board ###
And good: Command(A20 OLinuXino Lime2 console)> on (user:trini) Power turned on
U-Boot SPL 2015.04-00121-g4564fae (Apr 17 2015 - 12:42:40) DRAM: 1024 MiB CPU: 912000000Hz, AXI/AHB/APB: 3/2/2
U-Boot 2015.04-00121-g4564fae (Apr 17 2015 - 12:42:40) Allwinner Technology
CPU: Allwinner A20 (SUN7I) I2C: ready DRAM: 1 GiB MMC: SUNXI SD/MMC: 0 *** Warning - bad CRC, using default environment
In: serial Out: serial Err: serial SCSI: SUNXI SCSI INIT SATA link 0 timeout. AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl SATA mode flags: ncq stag pm led clo only pmp pio slum part ccc apst Net: dwmac.1c50000 starting USB... USB0: USB EHCI 1.00 scanning bus 0 for devices... 1 USB Device(s) found USB1: USB EHCI 1.00 scanning bus 1 for devices... 1 USB Device(s) found scanning usb for storage devices... 0 Storage Device(s) found Hit any key to stop autoboot: 0 sunxi#
So... we cause a reset during USB scan and then fail to boot a second time?
Thanks for testing this.
I'm not sure if I have a Lime (I might do, will need to look). I was testing sunxi on a pcduino3 but USB does not work on that for reasons I was looking into (it just says lowlevel init failure due to moving to driver model for GPIO).
I will take a look. In the meantime, which commit breaks this? I could perhaps issue a pull for commits up to that point to reduce the load.
I haven't had a chance to bisect yet but I will in a few hours.
No need to, I've just completed a bisect, it points to:
5bca5a6303f3526ab2cf9c0a62cd26c16e0d5c2f is the first bad commit commit 5bca5a6303f3526ab2cf9c0a62cd26c16e0d5c2f Author: Simon Glass sjg@chromium.org Date: Wed Mar 25 12:22:27 2015 -0600
dm: usb: Drop the EHCI weak functions These are a pain with driver model because we might have different EHCI drivers which want to implement them differently. Now that they use consistent function signatures, we can in good conscience move them to a struct. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Marek Vasut <marex@denx.de>
I'm going to first spend some time with my family now, I may look into this later tonight, or otherwise this weekend. I'll be sure to check mail first to avoid double work, so feel free to fix the problem while I'm relaxing :)
Ok, so I could not help myself and took a quick look at the patch causing the issue, this fixes the reset on usb scan problem:
diff --git a/drivers/usb/host/ehci-sunxi.c b/drivers/usb/host/ehci-sunxi.c index eda9f69..a847ac5 100644 --- a/drivers/usb/host/ehci-sunxi.c +++ b/drivers/usb/host/ehci-sunxi.c @@ -34,6 +34,8 @@ int ehci_hcd_init(int index, enum usb_init_type init, struct ehci_hccr **hccr, (uint32_t)*hccr, (uint32_t)*hcor, (uint32_t)HC_LENGTH(ehci_readl(&(*hccr)->cr_capbase)));
- ehci_set_controller_priv(index, NULL, NULL);
return 0;
}
And should probably be squashed into the original patch to avoid bisect problems.
But with this in place, all is still not well wrt non devicetree usb, usb keyboard support does not work, "usb tree" says:
USB device tree: 1 Hub (480 Mb/s, 0mA) | u-boot EHCI Host Controller | +-2 Hub (480 Mb/s, 100mA) | +-3 Hub (12 Mb/s, 100mA) | | -1 See Interface (12 Mb/s, 0mA) |
Note the -1 as device number for the "See Interface" device.
This particular usb setup used to work fine.
I guess this is another issue to git bisect, no idea when I'll get around to that.
So, another bisect. The problem commit is: commit 5bbc627e33a9b3666438e03d560d06ab3de28f6f Author: Simon Glass sjg@chromium.org Date: Wed Mar 25 12:22:06 2015 -0600
dm: usb: Split out more code from usb_new_device()
Move the code that sets up the device with a new address into its own function, usb_prepare_device().
Signed-off-by: Simon Glass sjg@chromium.org Reviewed-by: Marek Vasut marex@denx.de
Prior to this commit on a non-DM board (my A20 Lime2) a USB keyboard being inserted causes: scanning bus 1 for devices... cannot reset port 1!? 1 USB Device(s) found And then at the end, USB is "running" and I can usb tree. Afterwards, same message about reset but then No USB Device found.

Hi Tom,
On 17 April 2015 at 15:13, Tom Rini trini@konsulko.com wrote:
On Fri, Apr 17, 2015 at 09:39:50PM +0200, Hans de Goede wrote:
Hi,
On 17-04-15 21:28, Hans de Goede wrote:
Hi,
On 17-04-15 19:53, Tom Rini wrote:
On Fri, Apr 17, 2015 at 10:54:21AM -0600, Simon Glass wrote:
Hi Tom,
On 17 April 2015 at 10:46, Tom Rini trini@konsulko.com wrote:
On Fri, Apr 17, 2015 at 10:30:36AM -0600, Simon Glass wrote: >Hi Tom, > >On 17 April 2015 at 10:27, Tom Rini trini@konsulko.com wrote: >> >>On Thu, Apr 16, 2015 at 09:15:26PM -0600, Simon Glass wrote: >> >>>Hi Tom, >>> >>>As mentioned I reverted this patch as it conflicted with the dm tree >>>and I suspect it might be buggy: >>> >>>cd749658 usb_storage : scan all interfaces to find a storage device >>> >>>Assuming this is OK and applies successfully I will rebase and resend >>>this patch, then reply with some comments I have on the patch. >>> >>> >>>The following changes since commit 4564faeafbf11feb839e2e3f927be2f1a919ba96: >>> >>> ti: dwc3: Enable clocks in enable_basic_clocks() in hw_data.c >>>(2015-04-16 15:08:36 -0400) >>> >>>are available in the git repository at: >>> >>> http://git.denx.de/u-boot-dm.git >>> >>>for you to fetch changes up to 2e6263093b3a5c2d2c586afaedfd346d6628f784: >>> >>> sandbox: exynos: Move CONFIG_SOUND_SANDBOX to Kconfig (2015-04-16 >>>20:47:57 -0600) >> >>With this PR, am335x_boneblack (which has DM enabled) no longer >>functions. I'm running a bisect now, but heads up. > >OK, I'll wait for your bisect - also what is the console output when it breaks?
OK, disregard Beaglebone Black error, that was me (need to remember that eMMC boot only works off of am335x_boneblack_config). But, A20-OLinuXino-Lime2_defconfig is broken by this. The error log: Command(A20 OLinuXino Lime2 console)> on (user:trini) Power turned on
U-Boot SPL 2015.04-00342-g2e62630 (Apr 17 2015 - 12:40:45) DRAM: 1024 MiB CPU: 912000000Hz, AXI/AHB/APB: 3/2/2
U-Boot 2015.04-00342-g2e62630 (Apr 17 2015 - 12:40:45) Allwinner Technology
CPU: Allwinner A20 (SUN7I) I2C: ready DRAM: 1 GiB MMC: SUNXI SD/MMC: 0 *** Warning - bad CRC, using default environment
In: serial Out: serial Err: serial SCSI: SUNXI SCSI INIT SATA link 0 timeout. AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl SATA mode flags: ncq stag pm led clo only pmp pio slum part ccc apst Net: dwmac.1c50000 starting USB... USB0: USB EHCI 1.00 scanning bus 0 for devices... U-Boot SPL 2015.04-00342-g2e62630 (Apr 17 2015 - 12:40:45) DRAM: 1024 MiB CPU: 912000000Hz, AXI/AHB/APB: 3/2/2 MMC Device 0 not found spl: mmc device not found!! ### ERROR ### Please RESET the board ###
And good: Command(A20 OLinuXino Lime2 console)> on (user:trini) Power turned on
U-Boot SPL 2015.04-00121-g4564fae (Apr 17 2015 - 12:42:40) DRAM: 1024 MiB CPU: 912000000Hz, AXI/AHB/APB: 3/2/2
U-Boot 2015.04-00121-g4564fae (Apr 17 2015 - 12:42:40) Allwinner Technology
CPU: Allwinner A20 (SUN7I) I2C: ready DRAM: 1 GiB MMC: SUNXI SD/MMC: 0 *** Warning - bad CRC, using default environment
In: serial Out: serial Err: serial SCSI: SUNXI SCSI INIT SATA link 0 timeout. AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl SATA mode flags: ncq stag pm led clo only pmp pio slum part ccc apst Net: dwmac.1c50000 starting USB... USB0: USB EHCI 1.00 scanning bus 0 for devices... 1 USB Device(s) found USB1: USB EHCI 1.00 scanning bus 1 for devices... 1 USB Device(s) found scanning usb for storage devices... 0 Storage Device(s) found Hit any key to stop autoboot: 0 sunxi#
So... we cause a reset during USB scan and then fail to boot a second time?
Thanks for testing this.
I'm not sure if I have a Lime (I might do, will need to look). I was testing sunxi on a pcduino3 but USB does not work on that for reasons I was looking into (it just says lowlevel init failure due to moving to driver model for GPIO).
I will take a look. In the meantime, which commit breaks this? I could perhaps issue a pull for commits up to that point to reduce the load.
I haven't had a chance to bisect yet but I will in a few hours.
No need to, I've just completed a bisect, it points to:
5bca5a6303f3526ab2cf9c0a62cd26c16e0d5c2f is the first bad commit commit 5bca5a6303f3526ab2cf9c0a62cd26c16e0d5c2f Author: Simon Glass sjg@chromium.org Date: Wed Mar 25 12:22:27 2015 -0600
dm: usb: Drop the EHCI weak functions These are a pain with driver model because we might have different EHCI drivers which want to implement them differently. Now that they use consistent function signatures, we can in good conscience move them to a struct. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Marek Vasut <marex@denx.de>
I'm going to first spend some time with my family now, I may look into this later tonight, or otherwise this weekend. I'll be sure to check mail first to avoid double work, so feel free to fix the problem while I'm relaxing :)
Ok, so I could not help myself and took a quick look at the patch causing the issue, this fixes the reset on usb scan problem:
diff --git a/drivers/usb/host/ehci-sunxi.c b/drivers/usb/host/ehci-sunxi.c index eda9f69..a847ac5 100644 --- a/drivers/usb/host/ehci-sunxi.c +++ b/drivers/usb/host/ehci-sunxi.c @@ -34,6 +34,8 @@ int ehci_hcd_init(int index, enum usb_init_type init, struct ehci_hccr **hccr, (uint32_t)*hccr, (uint32_t)*hcor, (uint32_t)HC_LENGTH(ehci_readl(&(*hccr)->cr_capbase)));
- ehci_set_controller_priv(index, NULL, NULL);
return 0;
}
And should probably be squashed into the original patch to avoid bisect problems.
But with this in place, all is still not well wrt non devicetree usb, usb keyboard support does not work, "usb tree" says:
USB device tree: 1 Hub (480 Mb/s, 0mA) | u-boot EHCI Host Controller | +-2 Hub (480 Mb/s, 100mA) | +-3 Hub (12 Mb/s, 100mA) | | -1 See Interface (12 Mb/s, 0mA) |
Note the -1 as device number for the "See Interface" device.
This particular usb setup used to work fine.
I guess this is another issue to git bisect, no idea when I'll get around to that.
So, another bisect. The problem commit is: commit 5bbc627e33a9b3666438e03d560d06ab3de28f6f Author: Simon Glass sjg@chromium.org Date: Wed Mar 25 12:22:06 2015 -0600
dm: usb: Split out more code from usb_new_device() Move the code that sets up the device with a new address into its own function, usb_prepare_device(). Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Marek Vasut <marex@denx.de>
Prior to this commit on a non-DM board (my A20 Lime2) a USB keyboard being inserted causes: scanning bus 1 for devices... cannot reset port 1!? 1 USB Device(s) found And then at the end, USB is "running" and I can usb tree. Afterwards, same message about reset but then No USB Device found.
This seems related to the other problem I fixed (reported by Stephen), and I wonder if with the conflicts I have messed something up. I did have to adjust the code. Anyway I should be able to dig into this one later today.
Gosh it will be good to get this all resolved...
Regards, Simon

Hi,
On 17-04-15 21:39, Hans de Goede wrote:
Hi,
On 17-04-15 21:28, Hans de Goede wrote:
Hi,
On 17-04-15 19:53, Tom Rini wrote:
<snip>
I haven't had a chance to bisect yet but I will in a few hours.
No need to, I've just completed a bisect, it points to:
5bca5a6303f3526ab2cf9c0a62cd26c16e0d5c2f is the first bad commit commit 5bca5a6303f3526ab2cf9c0a62cd26c16e0d5c2f Author: Simon Glass sjg@chromium.org Date: Wed Mar 25 12:22:27 2015 -0600
dm: usb: Drop the EHCI weak functions These are a pain with driver model because we might have different EHCI drivers which want to implement them differently. Now that they use consistent function signatures, we can in good conscience move them to a struct. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Marek Vasut <marex@denx.de>
I'm going to first spend some time with my family now, I may look into this later tonight, or otherwise this weekend. I'll be sure to check mail first to avoid double work, so feel free to fix the problem while I'm relaxing :)
Ok, so I could not help myself and took a quick look at the patch causing the issue, this fixes the reset on usb scan problem:
diff --git a/drivers/usb/host/ehci-sunxi.c b/drivers/usb/host/ehci-sunxi.c index eda9f69..a847ac5 100644 --- a/drivers/usb/host/ehci-sunxi.c +++ b/drivers/usb/host/ehci-sunxi.c @@ -34,6 +34,8 @@ int ehci_hcd_init(int index, enum usb_init_type init, struct ehci_hccr **hccr, (uint32_t)*hccr, (uint32_t)*hcor, (uint32_t)HC_LENGTH(ehci_readl(&(*hccr)->cr_capbase)));
- ehci_set_controller_priv(index, NULL, NULL);
}return 0;
And should probably be squashed into the original patch to avoid bisect problems.
But with this in place, all is still not well wrt non devicetree usb, usb keyboard support does not work, "usb tree" says:
USB device tree: 1 Hub (480 Mb/s, 0mA) | u-boot EHCI Host Controller | +-2 Hub (480 Mb/s, 100mA) | +-3 Hub (12 Mb/s, 100mA) | | -1 See Interface (12 Mb/s, 0mA) |
Note the -1 as device number for the "See Interface" device.
This particular usb setup used to work fine.
I guess this is another issue to git bisect, no idea when I'll get around to that.
Ok, so I've done a git bisect of this (using a branch with my patch for the usb-reset issue squashed into the original commit to keep things bisectable), and it points to:
commit 3f7af70db23fc1c6b8f9e1bd966cadf2eb139f93 Author: Simon Glass sjg@chromium.org Date: Wed Mar 25 12:22:07 2015 -0600
dm: usb: Complete the splitting up of usb_new_device()
This function now calls usb_setup_device() to set up the device and usb_hub_probe() to check if it is a hub. The XHCI special case is now a parameter to usb_setup_device(). The latter will be used by the USB uclass when it is added, since it does not rely on any CONFIGs or legacy data structures.
Signed-off-by: Simon Glass sjg@chromium.org Reviewed-by: Marek Vasut marex@denx.de
(the commit id may be of because as said I'm using a custom branch for this).
I'll see if I can figure out why that commit breaks things, but I thought I would share the bisect result ASAP to avoid double work.
Regards,
Hans

Hi,
On 18-04-15 11:19, Hans de Goede wrote:
Hi,
On 17-04-15 21:39, Hans de Goede wrote:
Hi,
On 17-04-15 21:28, Hans de Goede wrote:
Hi,
On 17-04-15 19:53, Tom Rini wrote:
<snip>
I haven't had a chance to bisect yet but I will in a few hours.
No need to, I've just completed a bisect, it points to:
5bca5a6303f3526ab2cf9c0a62cd26c16e0d5c2f is the first bad commit commit 5bca5a6303f3526ab2cf9c0a62cd26c16e0d5c2f Author: Simon Glass sjg@chromium.org Date: Wed Mar 25 12:22:27 2015 -0600
dm: usb: Drop the EHCI weak functions These are a pain with driver model because we might have different EHCI drivers which want to implement them differently. Now that they use consistent function signatures, we can in good conscience move them to a struct. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Marek Vasut <marex@denx.de>
I'm going to first spend some time with my family now, I may look into this later tonight, or otherwise this weekend. I'll be sure to check mail first to avoid double work, so feel free to fix the problem while I'm relaxing :)
Ok, so I could not help myself and took a quick look at the patch causing the issue, this fixes the reset on usb scan problem:
diff --git a/drivers/usb/host/ehci-sunxi.c b/drivers/usb/host/ehci-sunxi.c index eda9f69..a847ac5 100644 --- a/drivers/usb/host/ehci-sunxi.c +++ b/drivers/usb/host/ehci-sunxi.c @@ -34,6 +34,8 @@ int ehci_hcd_init(int index, enum usb_init_type init, struct ehci_hccr **hccr, (uint32_t)*hccr, (uint32_t)*hcor, (uint32_t)HC_LENGTH(ehci_readl(&(*hccr)->cr_capbase)));
- ehci_set_controller_priv(index, NULL, NULL);
}return 0;
And should probably be squashed into the original patch to avoid bisect problems.
But with this in place, all is still not well wrt non devicetree usb, usb keyboard support does not work, "usb tree" says:
USB device tree: 1 Hub (480 Mb/s, 0mA) | u-boot EHCI Host Controller | +-2 Hub (480 Mb/s, 100mA) | +-3 Hub (12 Mb/s, 100mA) | | -1 See Interface (12 Mb/s, 0mA) |
Note the -1 as device number for the "See Interface" device.
This particular usb setup used to work fine.
I guess this is another issue to git bisect, no idea when I'll get around to that.
Ok, so I've done a git bisect of this (using a branch with my patch for the usb-reset issue squashed into the original commit to keep things bisectable), and it points to:
commit 3f7af70db23fc1c6b8f9e1bd966cadf2eb139f93 Author: Simon Glass sjg@chromium.org Date: Wed Mar 25 12:22:07 2015 -0600
dm: usb: Complete the splitting up of usb_new_device() This function now calls usb_setup_device() to set up the device and usb_hub_probe() to check if it is a hub. The XHCI special case is now a parameter to usb_setup_device(). The latter will be used by the USB uclass when it is added, since it does not rely on any CONFIGs or legacy data structures. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Marek Vasut <marex@denx.de>
(the commit id may be of because as said I'm using a custom branch for this).
I'll see if I can figure out why that commit breaks things, but I thought I would share the bisect result ASAP to avoid double work.
Attached are 2 patches (to be squashed into the original for bisectability) which fix things. See the commit messages for details.
Note these do not apply on top of u-boot-dm/master, they apply on top of the offending commit.
What I've done to get these "integrated" into my dm-master branch is:
1) checkout the offending commit 2) git am the 2 patches 3) note down the commit id of the 2 patches as just applied 4) checkout u-boot-dm/master 5) git rebase -i origin/master And then add lines with "pick <commit-id>" directly after the line for the troublesome commit
And then when everything looks good, redo the rebase -i and change the pick into fixup.
Regards,
Hans

On Sat, Apr 18, 2015 at 12:31:54PM +0200, Hans de Goede wrote:
Hi,
On 18-04-15 11:19, Hans de Goede wrote:
Hi,
On 17-04-15 21:39, Hans de Goede wrote:
Hi,
On 17-04-15 21:28, Hans de Goede wrote:
Hi,
On 17-04-15 19:53, Tom Rini wrote:
<snip>
I haven't had a chance to bisect yet but I will in a few hours.
No need to, I've just completed a bisect, it points to:
5bca5a6303f3526ab2cf9c0a62cd26c16e0d5c2f is the first bad commit commit 5bca5a6303f3526ab2cf9c0a62cd26c16e0d5c2f Author: Simon Glass sjg@chromium.org Date: Wed Mar 25 12:22:27 2015 -0600
dm: usb: Drop the EHCI weak functions These are a pain with driver model because we might have different EHCI drivers which want to implement them differently. Now that they use consistent function signatures, we can in good conscience move them to a struct. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Marek Vasut <marex@denx.de>
I'm going to first spend some time with my family now, I may look into this later tonight, or otherwise this weekend. I'll be sure to check mail first to avoid double work, so feel free to fix the problem while I'm relaxing :)
Ok, so I could not help myself and took a quick look at the patch causing the issue, this fixes the reset on usb scan problem:
diff --git a/drivers/usb/host/ehci-sunxi.c b/drivers/usb/host/ehci-sunxi.c index eda9f69..a847ac5 100644 --- a/drivers/usb/host/ehci-sunxi.c +++ b/drivers/usb/host/ehci-sunxi.c @@ -34,6 +34,8 @@ int ehci_hcd_init(int index, enum usb_init_type init, struct ehci_hccr **hccr, (uint32_t)*hccr, (uint32_t)*hcor, (uint32_t)HC_LENGTH(ehci_readl(&(*hccr)->cr_capbase)));
- ehci_set_controller_priv(index, NULL, NULL);
return 0;
}
And should probably be squashed into the original patch to avoid bisect problems.
But with this in place, all is still not well wrt non devicetree usb, usb keyboard support does not work, "usb tree" says:
USB device tree: 1 Hub (480 Mb/s, 0mA) | u-boot EHCI Host Controller | +-2 Hub (480 Mb/s, 100mA) | +-3 Hub (12 Mb/s, 100mA) | | -1 See Interface (12 Mb/s, 0mA) |
Note the -1 as device number for the "See Interface" device.
This particular usb setup used to work fine.
I guess this is another issue to git bisect, no idea when I'll get around to that.
Ok, so I've done a git bisect of this (using a branch with my patch for the usb-reset issue squashed into the original commit to keep things bisectable), and it points to:
commit 3f7af70db23fc1c6b8f9e1bd966cadf2eb139f93 Author: Simon Glass sjg@chromium.org Date: Wed Mar 25 12:22:07 2015 -0600
dm: usb: Complete the splitting up of usb_new_device() This function now calls usb_setup_device() to set up the device and usb_hub_probe() to check if it is a hub. The XHCI special case is now a parameter to usb_setup_device(). The latter will be used by the USB uclass when it is added, since it does not rely on any CONFIGs or legacy data structures. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Marek Vasut <marex@denx.de>
(the commit id may be of because as said I'm using a custom branch for this).
I'll see if I can figure out why that commit breaks things, but I thought I would share the bisect result ASAP to avoid double work.
Attached are 2 patches (to be squashed into the original for bisectability) which fix things. See the commit messages for details.
Note these do not apply on top of u-boot-dm/master, they apply on top of the offending commit.
What I've done to get these "integrated" into my dm-master branch is:
- checkout the offending commit
- git am the 2 patches
- note down the commit id of the 2 patches as just applied
- checkout u-boot-dm/master
- git rebase -i origin/master
And then add lines with "pick <commit-id>" directly after the line for the troublesome commit
And then when everything looks good, redo the rebase -i and change the pick into fixup.
Interesting, you bisected down to a slightly different commit for the problem I'm having also with a keyboard. I'll squash yours in, in my local testing branch, and see if that helps my issue as well, thanks!

On Sat, Apr 18, 2015 at 07:10:41AM -0400, Tom Rini wrote:
On Sat, Apr 18, 2015 at 12:31:54PM +0200, Hans de Goede wrote:
Hi,
On 18-04-15 11:19, Hans de Goede wrote:
Hi,
On 17-04-15 21:39, Hans de Goede wrote:
Hi,
On 17-04-15 21:28, Hans de Goede wrote:
Hi,
On 17-04-15 19:53, Tom Rini wrote:
<snip>
I haven't had a chance to bisect yet but I will in a few hours.
No need to, I've just completed a bisect, it points to:
5bca5a6303f3526ab2cf9c0a62cd26c16e0d5c2f is the first bad commit commit 5bca5a6303f3526ab2cf9c0a62cd26c16e0d5c2f Author: Simon Glass sjg@chromium.org Date: Wed Mar 25 12:22:27 2015 -0600
dm: usb: Drop the EHCI weak functions These are a pain with driver model because we might have different EHCI drivers which want to implement them differently. Now that they use consistent function signatures, we can in good conscience move them to a struct. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Marek Vasut <marex@denx.de>
I'm going to first spend some time with my family now, I may look into this later tonight, or otherwise this weekend. I'll be sure to check mail first to avoid double work, so feel free to fix the problem while I'm relaxing :)
Ok, so I could not help myself and took a quick look at the patch causing the issue, this fixes the reset on usb scan problem:
diff --git a/drivers/usb/host/ehci-sunxi.c b/drivers/usb/host/ehci-sunxi.c index eda9f69..a847ac5 100644 --- a/drivers/usb/host/ehci-sunxi.c +++ b/drivers/usb/host/ehci-sunxi.c @@ -34,6 +34,8 @@ int ehci_hcd_init(int index, enum usb_init_type init, struct ehci_hccr **hccr, (uint32_t)*hccr, (uint32_t)*hcor, (uint32_t)HC_LENGTH(ehci_readl(&(*hccr)->cr_capbase)));
- ehci_set_controller_priv(index, NULL, NULL);
return 0;
}
And should probably be squashed into the original patch to avoid bisect problems.
But with this in place, all is still not well wrt non devicetree usb, usb keyboard support does not work, "usb tree" says:
USB device tree: 1 Hub (480 Mb/s, 0mA) | u-boot EHCI Host Controller | +-2 Hub (480 Mb/s, 100mA) | +-3 Hub (12 Mb/s, 100mA) | | -1 See Interface (12 Mb/s, 0mA) |
Note the -1 as device number for the "See Interface" device.
This particular usb setup used to work fine.
I guess this is another issue to git bisect, no idea when I'll get around to that.
Ok, so I've done a git bisect of this (using a branch with my patch for the usb-reset issue squashed into the original commit to keep things bisectable), and it points to:
commit 3f7af70db23fc1c6b8f9e1bd966cadf2eb139f93 Author: Simon Glass sjg@chromium.org Date: Wed Mar 25 12:22:07 2015 -0600
dm: usb: Complete the splitting up of usb_new_device() This function now calls usb_setup_device() to set up the device and usb_hub_probe() to check if it is a hub. The XHCI special case is now a parameter to usb_setup_device(). The latter will be used by the USB uclass when it is added, since it does not rely on any CONFIGs or legacy data structures. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Marek Vasut <marex@denx.de>
(the commit id may be of because as said I'm using a custom branch for this).
I'll see if I can figure out why that commit breaks things, but I thought I would share the bisect result ASAP to avoid double work.
Attached are 2 patches (to be squashed into the original for bisectability) which fix things. See the commit messages for details.
Note these do not apply on top of u-boot-dm/master, they apply on top of the offending commit.
What I've done to get these "integrated" into my dm-master branch is:
- checkout the offending commit
- git am the 2 patches
- note down the commit id of the 2 patches as just applied
- checkout u-boot-dm/master
- git rebase -i origin/master
And then add lines with "pick <commit-id>" directly after the line for the troublesome commit
And then when everything looks good, redo the rebase -i and change the pick into fixup.
Interesting, you bisected down to a slightly different commit for the problem I'm having also with a keyboard. I'll squash yours in, in my local testing branch, and see if that helps my issue as well, thanks!
Also fixes the issue I saw.
Tested-by: Tom Rini trini@konsulko.com

Hi,
On 18 April 2015 at 06:07, Tom Rini trini@konsulko.com wrote:
On Sat, Apr 18, 2015 at 07:10:41AM -0400, Tom Rini wrote:
On Sat, Apr 18, 2015 at 12:31:54PM +0200, Hans de Goede wrote:
Hi,
On 18-04-15 11:19, Hans de Goede wrote:
Hi,
On 17-04-15 21:39, Hans de Goede wrote:
Hi,
On 17-04-15 21:28, Hans de Goede wrote:
Hi,
On 17-04-15 19:53, Tom Rini wrote:
<snip>
>I haven't had a chance to bisect yet but I will in a few hours.
No need to, I've just completed a bisect, it points to:
5bca5a6303f3526ab2cf9c0a62cd26c16e0d5c2f is the first bad commit commit 5bca5a6303f3526ab2cf9c0a62cd26c16e0d5c2f Author: Simon Glass sjg@chromium.org Date: Wed Mar 25 12:22:27 2015 -0600
dm: usb: Drop the EHCI weak functions These are a pain with driver model because we might have different EHCI drivers which want to implement them differently. Now that they use consistent function signatures, we can in good conscience move them to a struct. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Marek Vasut <marex@denx.de>
I'm going to first spend some time with my family now, I may look into this later tonight, or otherwise this weekend. I'll be sure to check mail first to avoid double work, so feel free to fix the problem while I'm relaxing :)
Ok, so I could not help myself and took a quick look at the patch causing the issue, this fixes the reset on usb scan problem:
diff --git a/drivers/usb/host/ehci-sunxi.c b/drivers/usb/host/ehci-sunxi.c index eda9f69..a847ac5 100644 --- a/drivers/usb/host/ehci-sunxi.c +++ b/drivers/usb/host/ehci-sunxi.c @@ -34,6 +34,8 @@ int ehci_hcd_init(int index, enum usb_init_type init, struct ehci_hccr **hccr, (uint32_t)*hccr, (uint32_t)*hcor, (uint32_t)HC_LENGTH(ehci_readl(&(*hccr)->cr_capbase)));
- ehci_set_controller_priv(index, NULL, NULL);
return 0;
}
And should probably be squashed into the original patch to avoid bisect problems.
But with this in place, all is still not well wrt non devicetree usb, usb keyboard support does not work, "usb tree" says:
USB device tree: 1 Hub (480 Mb/s, 0mA) | u-boot EHCI Host Controller | +-2 Hub (480 Mb/s, 100mA) | +-3 Hub (12 Mb/s, 100mA) | | -1 See Interface (12 Mb/s, 0mA) |
Note the -1 as device number for the "See Interface" device.
This particular usb setup used to work fine.
I guess this is another issue to git bisect, no idea when I'll get around to that.
Ok, so I've done a git bisect of this (using a branch with my patch for the usb-reset issue squashed into the original commit to keep things bisectable), and it points to:
commit 3f7af70db23fc1c6b8f9e1bd966cadf2eb139f93 Author: Simon Glass sjg@chromium.org Date: Wed Mar 25 12:22:07 2015 -0600
dm: usb: Complete the splitting up of usb_new_device() This function now calls usb_setup_device() to set up the device and usb_hub_probe() to check if it is a hub. The XHCI special case is now a parameter to usb_setup_device(). The latter will be used by the USB uclass when it is added, since it does not rely on any CONFIGs or legacy data structures. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Marek Vasut <marex@denx.de>
(the commit id may be of because as said I'm using a custom branch for this).
I'll see if I can figure out why that commit breaks things, but I thought I would share the bisect result ASAP to avoid double work.
Attached are 2 patches (to be squashed into the original for bisectability) which fix things. See the commit messages for details.
Note these do not apply on top of u-boot-dm/master, they apply on top of the offending commit.
What I've done to get these "integrated" into my dm-master branch is:
- checkout the offending commit
- git am the 2 patches
- note down the commit id of the 2 patches as just applied
- checkout u-boot-dm/master
- git rebase -i origin/master
And then add lines with "pick <commit-id>" directly after the line for the troublesome commit
And then when everything looks good, redo the rebase -i and change the pick into fixup.
Interesting, you bisected down to a slightly different commit for the problem I'm having also with a keyboard. I'll squash yours in, in my local testing branch, and see if that helps my issue as well, thanks!
Also fixes the issue I saw.
Tested-by: Tom Rini trini@konsulko.com
Thank you both, and sorry that I had such limited time the last few days to really dig into this.
The new get_descriptor_len() function at least makes it clear what is going on.
I've applied these patches to u-boot-dm branch 'testing'. I'll do another build and test on various boards.
Regards, Simon

On Sat, Apr 18, 2015 at 09:26:21AM -0600, Simon Glass wrote:
Hi,
On 18 April 2015 at 06:07, Tom Rini trini@konsulko.com wrote:
On Sat, Apr 18, 2015 at 07:10:41AM -0400, Tom Rini wrote:
On Sat, Apr 18, 2015 at 12:31:54PM +0200, Hans de Goede wrote:
Hi,
On 18-04-15 11:19, Hans de Goede wrote:
Hi,
On 17-04-15 21:39, Hans de Goede wrote:
Hi,
On 17-04-15 21:28, Hans de Goede wrote: >Hi, > >On 17-04-15 19:53, Tom Rini wrote:
<snip>
>>I haven't had a chance to bisect yet but I will in a few hours. > >No need to, I've just completed a bisect, it points to: > >5bca5a6303f3526ab2cf9c0a62cd26c16e0d5c2f is the first bad commit >commit 5bca5a6303f3526ab2cf9c0a62cd26c16e0d5c2f >Author: Simon Glass sjg@chromium.org >Date: Wed Mar 25 12:22:27 2015 -0600 > > dm: usb: Drop the EHCI weak functions > > These are a pain with driver model because we might have different EHCI > drivers which want to implement them differently. Now that they use > consistent function signatures, we can in good conscience move them to > a struct. > > Signed-off-by: Simon Glass sjg@chromium.org > Reviewed-by: Marek Vasut marex@denx.de > >I'm going to first spend some time with my family now, I may look into >this later tonight, or otherwise this weekend. I'll be sure to check mail >first to avoid double work, so feel free to fix the problem while I'm >relaxing :)
Ok, so I could not help myself and took a quick look at the patch causing the issue, this fixes the reset on usb scan problem:
diff --git a/drivers/usb/host/ehci-sunxi.c b/drivers/usb/host/ehci-sunxi.c index eda9f69..a847ac5 100644 --- a/drivers/usb/host/ehci-sunxi.c +++ b/drivers/usb/host/ehci-sunxi.c @@ -34,6 +34,8 @@ int ehci_hcd_init(int index, enum usb_init_type init, struct ehci_hccr **hccr, (uint32_t)*hccr, (uint32_t)*hcor, (uint32_t)HC_LENGTH(ehci_readl(&(*hccr)->cr_capbase)));
- ehci_set_controller_priv(index, NULL, NULL);
return 0;
}
And should probably be squashed into the original patch to avoid bisect problems.
But with this in place, all is still not well wrt non devicetree usb, usb keyboard support does not work, "usb tree" says:
USB device tree: 1 Hub (480 Mb/s, 0mA) | u-boot EHCI Host Controller | +-2 Hub (480 Mb/s, 100mA) | +-3 Hub (12 Mb/s, 100mA) | | -1 See Interface (12 Mb/s, 0mA) |
Note the -1 as device number for the "See Interface" device.
This particular usb setup used to work fine.
I guess this is another issue to git bisect, no idea when I'll get around to that.
Ok, so I've done a git bisect of this (using a branch with my patch for the usb-reset issue squashed into the original commit to keep things bisectable), and it points to:
commit 3f7af70db23fc1c6b8f9e1bd966cadf2eb139f93 Author: Simon Glass sjg@chromium.org Date: Wed Mar 25 12:22:07 2015 -0600
dm: usb: Complete the splitting up of usb_new_device() This function now calls usb_setup_device() to set up the device and usb_hub_probe() to check if it is a hub. The XHCI special case is now a parameter to usb_setup_device(). The latter will be used by the USB uclass when it is added, since it does not rely on any CONFIGs or legacy data structures. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Marek Vasut <marex@denx.de>
(the commit id may be of because as said I'm using a custom branch for this).
I'll see if I can figure out why that commit breaks things, but I thought I would share the bisect result ASAP to avoid double work.
Attached are 2 patches (to be squashed into the original for bisectability) which fix things. See the commit messages for details.
Note these do not apply on top of u-boot-dm/master, they apply on top of the offending commit.
What I've done to get these "integrated" into my dm-master branch is:
- checkout the offending commit
- git am the 2 patches
- note down the commit id of the 2 patches as just applied
- checkout u-boot-dm/master
- git rebase -i origin/master
And then add lines with "pick <commit-id>" directly after the line for the troublesome commit
And then when everything looks good, redo the rebase -i and change the pick into fixup.
Interesting, you bisected down to a slightly different commit for the problem I'm having also with a keyboard. I'll squash yours in, in my local testing branch, and see if that helps my issue as well, thanks!
Also fixes the issue I saw.
Tested-by: Tom Rini trini@konsulko.com
Thank you both, and sorry that I had such limited time the last few days to really dig into this.
No worries. It's almost like this is a community effort and not just "lets make Simon do all the DM work" ;) And thanks for doing so much of the DM work!

Hi Tom,
On 18 April 2015 at 09:51, Tom Rini trini@konsulko.com wrote:
On Sat, Apr 18, 2015 at 09:26:21AM -0600, Simon Glass wrote:
Hi,
On 18 April 2015 at 06:07, Tom Rini trini@konsulko.com wrote:
On Sat, Apr 18, 2015 at 07:10:41AM -0400, Tom Rini wrote:
On Sat, Apr 18, 2015 at 12:31:54PM +0200, Hans de Goede wrote:
Hi,
On 18-04-15 11:19, Hans de Goede wrote:
Hi,
On 17-04-15 21:39, Hans de Goede wrote: >Hi, > >On 17-04-15 21:28, Hans de Goede wrote: >>Hi, >> >>On 17-04-15 19:53, Tom Rini wrote:
<snip>
>>>I haven't had a chance to bisect yet but I will in a few hours. >> >>No need to, I've just completed a bisect, it points to: >> >>5bca5a6303f3526ab2cf9c0a62cd26c16e0d5c2f is the first bad commit >>commit 5bca5a6303f3526ab2cf9c0a62cd26c16e0d5c2f >>Author: Simon Glass sjg@chromium.org >>Date: Wed Mar 25 12:22:27 2015 -0600 >> >> dm: usb: Drop the EHCI weak functions >> >> These are a pain with driver model because we might have different EHCI >> drivers which want to implement them differently. Now that they use >> consistent function signatures, we can in good conscience move them to >> a struct. >> >> Signed-off-by: Simon Glass sjg@chromium.org >> Reviewed-by: Marek Vasut marex@denx.de >> >>I'm going to first spend some time with my family now, I may look into >>this later tonight, or otherwise this weekend. I'll be sure to check mail >>first to avoid double work, so feel free to fix the problem while I'm >>relaxing :) > >Ok, so I could not help myself and took a quick look at the patch causing the >issue, this fixes the reset on usb scan problem: > >diff --git a/drivers/usb/host/ehci-sunxi.c b/drivers/usb/host/ehci-sunxi.c >index eda9f69..a847ac5 100644 >--- a/drivers/usb/host/ehci-sunxi.c >+++ b/drivers/usb/host/ehci-sunxi.c >@@ -34,6 +34,8 @@ int ehci_hcd_init(int index, enum usb_init_type init, struct ehci_hccr **hccr, > (uint32_t)*hccr, (uint32_t)*hcor, > (uint32_t)HC_LENGTH(ehci_readl(&(*hccr)->cr_capbase))); > >+ ehci_set_controller_priv(index, NULL, NULL); >+ > return 0; > } > >And should probably be squashed into the original patch to avoid bisect >problems. > >But with this in place, all is still not well wrt non devicetree usb, >usb keyboard support does not work, "usb tree" says: > >USB device tree: > 1 Hub (480 Mb/s, 0mA) > | u-boot EHCI Host Controller > | > +-2 Hub (480 Mb/s, 100mA) > | > +-3 Hub (12 Mb/s, 100mA) > | > | -1 See Interface (12 Mb/s, 0mA) > | > >Note the -1 as device number for the "See Interface" device. > >This particular usb setup used to work fine. > >I guess this is another issue to git bisect, no idea when I'll get around >to that.
Ok, so I've done a git bisect of this (using a branch with my patch for the usb-reset issue squashed into the original commit to keep things bisectable), and it points to:
commit 3f7af70db23fc1c6b8f9e1bd966cadf2eb139f93 Author: Simon Glass sjg@chromium.org Date: Wed Mar 25 12:22:07 2015 -0600
dm: usb: Complete the splitting up of usb_new_device() This function now calls usb_setup_device() to set up the device and usb_hub_probe() to check if it is a hub. The XHCI special case is now a parameter to usb_setup_device(). The latter will be used by the USB uclass when it is added, since it does not rely on any CONFIGs or legacy data structures. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Marek Vasut <marex@denx.de>
(the commit id may be of because as said I'm using a custom branch for this).
I'll see if I can figure out why that commit breaks things, but I thought I would share the bisect result ASAP to avoid double work.
Attached are 2 patches (to be squashed into the original for bisectability) which fix things. See the commit messages for details.
Note these do not apply on top of u-boot-dm/master, they apply on top of the offending commit.
What I've done to get these "integrated" into my dm-master branch is:
- checkout the offending commit
- git am the 2 patches
- note down the commit id of the 2 patches as just applied
- checkout u-boot-dm/master
- git rebase -i origin/master
And then add lines with "pick <commit-id>" directly after the line for the troublesome commit
And then when everything looks good, redo the rebase -i and change the pick into fixup.
Interesting, you bisected down to a slightly different commit for the problem I'm having also with a keyboard. I'll squash yours in, in my local testing branch, and see if that helps my issue as well, thanks!
Also fixes the issue I saw.
Tested-by: Tom Rini trini@konsulko.com
Thank you both, and sorry that I had such limited time the last few days to really dig into this.
No worries. It's almost like this is a community effort and not just "lets make Simon do all the DM work" ;) And thanks for doing so much of the DM work!
Thanks. I've sent v3 after a bit more testing with your patches (and Hans').
Regards, Simon

On Fri, Apr 17, 2015 at 09:28:20PM +0200, Hans de Goede wrote:
Hi,
On 17-04-15 19:53, Tom Rini wrote:
On Fri, Apr 17, 2015 at 10:54:21AM -0600, Simon Glass wrote:
Hi Tom,
On 17 April 2015 at 10:46, Tom Rini trini@konsulko.com wrote:
On Fri, Apr 17, 2015 at 10:30:36AM -0600, Simon Glass wrote:
Hi Tom,
On 17 April 2015 at 10:27, Tom Rini trini@konsulko.com wrote:
On Thu, Apr 16, 2015 at 09:15:26PM -0600, Simon Glass wrote:
>Hi Tom, > >As mentioned I reverted this patch as it conflicted with the dm tree >and I suspect it might be buggy: > >cd749658 usb_storage : scan all interfaces to find a storage device > >Assuming this is OK and applies successfully I will rebase and resend >this patch, then reply with some comments I have on the patch. > > >The following changes since commit 4564faeafbf11feb839e2e3f927be2f1a919ba96: > > ti: dwc3: Enable clocks in enable_basic_clocks() in hw_data.c >(2015-04-16 15:08:36 -0400) > >are available in the git repository at: > > http://git.denx.de/u-boot-dm.git > >for you to fetch changes up to 2e6263093b3a5c2d2c586afaedfd346d6628f784: > > sandbox: exynos: Move CONFIG_SOUND_SANDBOX to Kconfig (2015-04-16 >20:47:57 -0600)
With this PR, am335x_boneblack (which has DM enabled) no longer functions. I'm running a bisect now, but heads up.
OK, I'll wait for your bisect - also what is the console output when it breaks?
OK, disregard Beaglebone Black error, that was me (need to remember that eMMC boot only works off of am335x_boneblack_config). But, A20-OLinuXino-Lime2_defconfig is broken by this. The error log: Command(A20 OLinuXino Lime2 console)> on (user:trini) Power turned on
U-Boot SPL 2015.04-00342-g2e62630 (Apr 17 2015 - 12:40:45) DRAM: 1024 MiB CPU: 912000000Hz, AXI/AHB/APB: 3/2/2
U-Boot 2015.04-00342-g2e62630 (Apr 17 2015 - 12:40:45) Allwinner Technology
CPU: Allwinner A20 (SUN7I) I2C: ready DRAM: 1 GiB MMC: SUNXI SD/MMC: 0 *** Warning - bad CRC, using default environment
In: serial Out: serial Err: serial SCSI: SUNXI SCSI INIT SATA link 0 timeout. AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl SATA mode flags: ncq stag pm led clo only pmp pio slum part ccc apst Net: dwmac.1c50000 starting USB... USB0: USB EHCI 1.00 scanning bus 0 for devices... U-Boot SPL 2015.04-00342-g2e62630 (Apr 17 2015 - 12:40:45) DRAM: 1024 MiB CPU: 912000000Hz, AXI/AHB/APB: 3/2/2 MMC Device 0 not found spl: mmc device not found!! ### ERROR ### Please RESET the board ###
And good: Command(A20 OLinuXino Lime2 console)> on (user:trini) Power turned on
U-Boot SPL 2015.04-00121-g4564fae (Apr 17 2015 - 12:42:40) DRAM: 1024 MiB CPU: 912000000Hz, AXI/AHB/APB: 3/2/2
U-Boot 2015.04-00121-g4564fae (Apr 17 2015 - 12:42:40) Allwinner Technology
CPU: Allwinner A20 (SUN7I) I2C: ready DRAM: 1 GiB MMC: SUNXI SD/MMC: 0 *** Warning - bad CRC, using default environment
In: serial Out: serial Err: serial SCSI: SUNXI SCSI INIT SATA link 0 timeout. AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl SATA mode flags: ncq stag pm led clo only pmp pio slum part ccc apst Net: dwmac.1c50000 starting USB... USB0: USB EHCI 1.00 scanning bus 0 for devices... 1 USB Device(s) found USB1: USB EHCI 1.00 scanning bus 1 for devices... 1 USB Device(s) found scanning usb for storage devices... 0 Storage Device(s) found Hit any key to stop autoboot: 0 sunxi#
So... we cause a reset during USB scan and then fail to boot a second time?
Thanks for testing this.
I'm not sure if I have a Lime (I might do, will need to look). I was testing sunxi on a pcduino3 but USB does not work on that for reasons I was looking into (it just says lowlevel init failure due to moving to driver model for GPIO).
I will take a look. In the meantime, which commit breaks this? I could perhaps issue a pull for commits up to that point to reduce the load.
I haven't had a chance to bisect yet but I will in a few hours.
No need to, I've just completed a bisect, it points to:
5bca5a6303f3526ab2cf9c0a62cd26c16e0d5c2f is the first bad commit commit 5bca5a6303f3526ab2cf9c0a62cd26c16e0d5c2f Author: Simon Glass sjg@chromium.org Date: Wed Mar 25 12:22:27 2015 -0600
dm: usb: Drop the EHCI weak functions These are a pain with driver model because we might have different EHCI drivers which want to implement them differently. Now that they use consistent function signatures, we can in good conscience move them to a struct. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Marek Vasut <marex@denx.de>
I'm going to first spend some time with my family now, I may look into this later tonight, or otherwise this weekend. I'll be sure to check mail first to avoid double work, so feel free to fix the problem while I'm relaxing :)
I was 2/3rds done with the bisect when I saw this (and only about 1/3rd done when you sent this :)) and I've found the problem. Since ehci-sunxi.c doesn't call ehci_set_controller_priv() (as it uses the default ops) from ehci_hcd_init() we don't get the default ops set anywhere and thus crash when trying to eventually use one of those functions. I've kludged in a call to ehci-sunxi.c but this isn't the right solution overall which I'll take a pass at shortly.

In order to switch to a set of function pointers for certain operations we need to ensure that the defaults are first set so that they can be overriden as needed by SoC/board specific code.
Signed-off-by: Tom Rini trini@konsulko.com --- drivers/usb/host/ehci-hcd.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index 79cf3b3..e7c438c 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c @@ -945,9 +945,7 @@ const struct ehci_ops default_ehci_ops = {
static void ehci_setup_ops(struct ehci_ctrl *ctrl, const struct ehci_ops *ops) { - if (!ops) { - ctrl->ops = default_ehci_ops; - } else { + if (ops) { ctrl->ops = *ops; if (!ctrl->ops.set_usb_mode) ctrl->ops.set_usb_mode = ehci_set_usbmode; @@ -1095,6 +1093,12 @@ int usb_lowlevel_init(int index, enum usb_init_type init, void **controller) uint tweaks = 0; int rc;
+ /** + * Set ops to default_ehci_ops, ehci_hcd_init should call + * ehci_set_controller_priv to change any of these function pointers. + */ + ctrl->ops = default_ehci_ops; + rc = ehci_hcd_init(index, init, &ctrl->hccr, &ctrl->hcor); if (rc) return rc;

Hi Tom,
On 17 April 2015 at 14:31, Tom Rini trini@konsulko.com wrote:
In order to switch to a set of function pointers for certain operations we need to ensure that the defaults are first set so that they can be overriden as needed by SoC/board specific code.
Signed-off-by: Tom Rini trini@konsulko.com
drivers/usb/host/ehci-hcd.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index 79cf3b3..e7c438c 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c @@ -945,9 +945,7 @@ const struct ehci_ops default_ehci_ops = {
static void ehci_setup_ops(struct ehci_ctrl *ctrl, const struct ehci_ops *ops) {
if (!ops) {
ctrl->ops = default_ehci_ops;
} else {
Do we need to remove this? I think this will break when driver model is used, if NULL is passed in to select the default ops.
if (ops) { ctrl->ops = *ops; if (!ctrl->ops.set_usb_mode) ctrl->ops.set_usb_mode = ehci_set_usbmode;
@@ -1095,6 +1093,12 @@ int usb_lowlevel_init(int index, enum usb_init_type init, void **controller) uint tweaks = 0; int rc;
/**
* Set ops to default_ehci_ops, ehci_hcd_init should call
* ehci_set_controller_priv to change any of these function pointers.
*/
ctrl->ops = default_ehci_ops;
OK what I missed is that lots of things call ehci_hcd_init(). I only changed a few to call ehci_set_controller_priv().
rc = ehci_hcd_init(index, init, &ctrl->hccr, &ctrl->hcor); if (rc) return rc;
-- 1.7.9.5
Regards, Simon

On Fri, Apr 17, 2015 at 03:28:30PM -0600, Simon Glass wrote:
Hi Tom,
On 17 April 2015 at 14:31, Tom Rini trini@konsulko.com wrote:
In order to switch to a set of function pointers for certain operations we need to ensure that the defaults are first set so that they can be overriden as needed by SoC/board specific code.
Signed-off-by: Tom Rini trini@konsulko.com
drivers/usb/host/ehci-hcd.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index 79cf3b3..e7c438c 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c @@ -945,9 +945,7 @@ const struct ehci_ops default_ehci_ops = {
static void ehci_setup_ops(struct ehci_ctrl *ctrl, const struct ehci_ops *ops) {
if (!ops) {
ctrl->ops = default_ehci_ops;
} else {
Do we need to remove this? I think this will break when driver model is used, if NULL is passed in to select the default ops.
Nope, just cleaning up the code as-is.
if (ops) { ctrl->ops = *ops; if (!ctrl->ops.set_usb_mode) ctrl->ops.set_usb_mode = ehci_set_usbmode;
@@ -1095,6 +1093,12 @@ int usb_lowlevel_init(int index, enum usb_init_type init, void **controller) uint tweaks = 0; int rc;
/**
* Set ops to default_ehci_ops, ehci_hcd_init should call
* ehci_set_controller_priv to change any of these function pointers.
*/
ctrl->ops = default_ehci_ops;
OK what I missed is that lots of things call ehci_hcd_init(). I only changed a few to call ehci_set_controller_priv().
Yes, you changed the ehci_hcd_init()'s that need to call ehci_set_controller_priv() to either set a priv or now to set the ops pointer. Most need neither so I think this is the right solution.

Hi Tom.
On 17 April 2015 at 16:02, Tom Rini trini@konsulko.com wrote:
On Fri, Apr 17, 2015 at 03:28:30PM -0600, Simon Glass wrote:
Hi Tom,
On 17 April 2015 at 14:31, Tom Rini trini@konsulko.com wrote:
In order to switch to a set of function pointers for certain operations we need to ensure that the defaults are first set so that they can be overriden as needed by SoC/board specific code.
Signed-off-by: Tom Rini trini@konsulko.com
drivers/usb/host/ehci-hcd.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index 79cf3b3..e7c438c 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c @@ -945,9 +945,7 @@ const struct ehci_ops default_ehci_ops = {
static void ehci_setup_ops(struct ehci_ctrl *ctrl, const struct ehci_ops *ops) {
if (!ops) {
ctrl->ops = default_ehci_ops;
} else {
Do we need to remove this? I think this will break when driver model is used, if NULL is passed in to select the default ops.
Nope, just cleaning up the code as-is.
I'm missing something though. For ehci_register() it calls this will ops possibly equal to NULL, expecting it to set up the ops.
if (ops) { ctrl->ops = *ops; if (!ctrl->ops.set_usb_mode) ctrl->ops.set_usb_mode = ehci_set_usbmode;
@@ -1095,6 +1093,12 @@ int usb_lowlevel_init(int index, enum usb_init_type init, void **controller) uint tweaks = 0; int rc;
/**
* Set ops to default_ehci_ops, ehci_hcd_init should call
* ehci_set_controller_priv to change any of these function pointers.
*/
ctrl->ops = default_ehci_ops;
OK what I missed is that lots of things call ehci_hcd_init(). I only changed a few to call ehci_set_controller_priv().
Yes, you changed the ehci_hcd_init()'s that need to call ehci_set_controller_priv() to either set a priv or now to set the ops pointer. Most need neither so I think this is the right solution.
Sounds good.
-- Tom
Regards, Simon

On Fri, Apr 17, 2015 at 04:38:19PM -0600, Simon Glass wrote:
Hi Tom.
On 17 April 2015 at 16:02, Tom Rini trini@konsulko.com wrote:
On Fri, Apr 17, 2015 at 03:28:30PM -0600, Simon Glass wrote:
Hi Tom,
On 17 April 2015 at 14:31, Tom Rini trini@konsulko.com wrote:
In order to switch to a set of function pointers for certain operations we need to ensure that the defaults are first set so that they can be overriden as needed by SoC/board specific code.
Signed-off-by: Tom Rini trini@konsulko.com
drivers/usb/host/ehci-hcd.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index 79cf3b3..e7c438c 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c @@ -945,9 +945,7 @@ const struct ehci_ops default_ehci_ops = {
static void ehci_setup_ops(struct ehci_ctrl *ctrl, const struct ehci_ops *ops) {
if (!ops) {
ctrl->ops = default_ehci_ops;
} else {
Do we need to remove this? I think this will break when driver model is used, if NULL is passed in to select the default ops.
Nope, just cleaning up the code as-is.
I'm missing something though. For ehci_register() it calls this will ops possibly equal to NULL, expecting it to set up the ops.
OK, I missed a case too then, drop this hunk when you squash it in :)

Hi Tom,
On 17 April 2015 at 16:43, Tom Rini trini@konsulko.com wrote:
On Fri, Apr 17, 2015 at 04:38:19PM -0600, Simon Glass wrote:
Hi Tom.
On 17 April 2015 at 16:02, Tom Rini trini@konsulko.com wrote:
On Fri, Apr 17, 2015 at 03:28:30PM -0600, Simon Glass wrote:
Hi Tom,
On 17 April 2015 at 14:31, Tom Rini trini@konsulko.com wrote:
In order to switch to a set of function pointers for certain operations we need to ensure that the defaults are first set so that they can be overriden as needed by SoC/board specific code.
Signed-off-by: Tom Rini trini@konsulko.com
drivers/usb/host/ehci-hcd.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index 79cf3b3..e7c438c 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c @@ -945,9 +945,7 @@ const struct ehci_ops default_ehci_ops = {
static void ehci_setup_ops(struct ehci_ctrl *ctrl, const struct ehci_ops *ops) {
if (!ops) {
ctrl->ops = default_ehci_ops;
} else {
Do we need to remove this? I think this will break when driver model is used, if NULL is passed in to select the default ops.
Nope, just cleaning up the code as-is.
I'm missing something though. For ehci_register() it calls this will ops possibly equal to NULL, expecting it to set up the ops.
OK, I missed a case too then, drop this hunk when you squash it in :)
Will do. My plan is:
- pull in this patch - figure out what else broke with the keyboard since my terrible conflict resolution attempt
Anything else?
Regards, Simon

On Fri, Apr 17, 2015 at 04:45:18PM -0600, Simon Glass wrote:
Hi Tom,
On 17 April 2015 at 16:43, Tom Rini trini@konsulko.com wrote:
On Fri, Apr 17, 2015 at 04:38:19PM -0600, Simon Glass wrote:
Hi Tom.
On 17 April 2015 at 16:02, Tom Rini trini@konsulko.com wrote:
On Fri, Apr 17, 2015 at 03:28:30PM -0600, Simon Glass wrote:
Hi Tom,
On 17 April 2015 at 14:31, Tom Rini trini@konsulko.com wrote:
In order to switch to a set of function pointers for certain operations we need to ensure that the defaults are first set so that they can be overriden as needed by SoC/board specific code.
Signed-off-by: Tom Rini trini@konsulko.com
drivers/usb/host/ehci-hcd.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index 79cf3b3..e7c438c 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c @@ -945,9 +945,7 @@ const struct ehci_ops default_ehci_ops = {
static void ehci_setup_ops(struct ehci_ctrl *ctrl, const struct ehci_ops *ops) {
if (!ops) {
ctrl->ops = default_ehci_ops;
} else {
Do we need to remove this? I think this will break when driver model is used, if NULL is passed in to select the default ops.
Nope, just cleaning up the code as-is.
I'm missing something though. For ehci_register() it calls this will ops possibly equal to NULL, expecting it to set up the ops.
OK, I missed a case too then, drop this hunk when you squash it in :)
Will do. My plan is:
- pull in this patch
- figure out what else broke with the keyboard since my terrible
conflict resolution attempt
Anything else?
Fix anything else that's broken? ;) That's all I've noticed but if you can do some usb card reader + hub on both a DM and non-DM board that'd probably cover most cases along with keyboard testing.
participants (3)
-
Hans de Goede
-
Simon Glass
-
Tom Rini