1. 12 Jun, 2013 13 commits
    • Heiko Schocher's avatar
      usb, composite: after unregister gadget driver set composite to NULL · c67b0e42
      Heiko Schocher authored
      
      
      Without this, second usb_composite_register() call fails always
      with -EINVAL.
      Signed-off-by: default avatarHeiko Schocher <hs@denx.de>
      Cc: Lukasz Majewski <l.majewski@samsung.com>
      Cc: Kyungmin Park <kyungmin.park@samsung.com>
      Cc: Marek Vasut <marex@denx.de>
      c67b0e42
    • Stephen Warren's avatar
      usb: ehci: add missing cache managment · d3e07478
      Stephen Warren authored
      Commit 8f62ca64
      
       "usb: ehci: Support interrupt transfers via periodic list"
      didn't include any cache management in the new interrupt transfer path.
      It also added an extra write to or_asynclistaddr in usb_lowlevel_init(),
      without having flushed out the data there.
      
      Add the missing cache management calls, so that the code works again.
      
      This allows the USB keyboard on Tegra's Seaboard/Springbank boards to
      work.
      
      Cc: Patrick Georgi <patrick@georgi-clan.de>
      Cc: Vincent Palatin <vpalatin@chromium.org>
      Cc: Julius Werner <jwerner@chromium.org>
      Cc: Simon Glass <sjg@chromium.org>
      Cc: Marek Vasut <marex@denx.de>
      Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
      d3e07478
    • Kuo-Jung Su's avatar
      usb: gadget: add Faraday FOTG210 USB gadget support · 64cfd3f9
      Kuo-Jung Su authored
      
      
      The Faraday FOTG210 is an OTG chip which could operate
      as either an EHCI Host or a USB Device at a time.
      Signed-off-by: default avatarKuo-Jung Su <dantesu@faraday-tech.com>
      CC: Marek Vasut <marex@denx.de>
      64cfd3f9
    • Kuo-Jung Su's avatar
      usb: ehci: add Faraday USB 2.0 EHCI support · e82a316d
      Kuo-Jung Su authored
      
      
      This patch adds support to both Faraday FUSBH200 and FOTG210,
      the differences between Faraday EHCI and standard EHCI are
      listed bellow:
      
      1. The PORTSC starts at 0x30 instead of 0x44.
      2. The CONFIGFLAG(0x40) is not only un-implemented, and
         also has its address space removed.
      3. Faraday EHCI is a TDI design, but it doesn't
         compatible with the general TDI implementation
         found at both U-Boot and Linux.
      4. The ISOC descriptors differ from standard EHCI in
         several ways. But since U-boot doesn't support ISOC,
         we don't have to worry about that.
      Signed-off-by: default avatarKuo-Jung Su <dantesu@faraday-tech.com>
      CC: Marek Vasut <marex@denx.de>
      e82a316d
    • Kuo-Jung Su's avatar
      usb: hub: make minimum power-on delay configurable · aa155058
      Kuo-Jung Su authored
      
      
      This patch makes the minimum power-on delay for USB HUB
      become configurable. The original design waits at least
      100 msec here, but some EHCI controlers(e.g. Faraday EHCI)
      are known to require much longer delay interval.
      Signed-off-by: default avatarKuo-Jung Su <dantesu@faraday-tech.com>
      CC: Marek Vasut <marex@denx.de>
      aa155058
    • Kuo-Jung Su's avatar
      usb: ehci: add weak-aliased function for PORTSC · 1dde1423
      Kuo-Jung Su authored
      
      
      There is at least one non-EHCI compliant controller (i.e. Faraday EHCI)
      not only leave RESERVED and CONFIGFLAG registers un-implemented
      but also has their address spaces removed.
      
      As an result, the PORTSC register of Faraday EHCI always
      starts from 0x30 instead of 0x44 in standard EHCI.
      
      So that we'll need a weak-aliased function for abstraction.
      Signed-off-by: default avatarKuo-Jung Su <dantesu@faraday-tech.com>
      CC: Marek Vasut <marex@denx.de>
      1dde1423
    • Kuo-Jung Su's avatar
      usb: ehci: prevent bad PORTSC register access · 9c6a9d7c
      Kuo-Jung Su authored
      
      
      1. The 'index' of ehci_submit_root() is not always > 0.
      
         e.g.
         While it gets invoked from usb_get_descriptor(),
         the 'index' is always a '0'. (See ch.9 of USB2.0)
      
      2. The PORTSC register is not always required, and thus it
         should only report a port error when necessary.
         It would cause a port scan failure if the ehci_submit_root()
         always gets terminated by a port error.
      Signed-off-by: default avatarKuo-Jung Su <dantesu@faraday-tech.com>
      CC: Marek Vasut <marex@denx.de>
      9c6a9d7c
    • Vivek Gautam's avatar
      usb: gadget: Use unaligned access for wMaxPacketSize · f6664ba4
      Vivek Gautam authored
      
      
      Use get_unaligned() while fetching wMaxPacketSize to avoid
      voilating any alignment rules.
      Signed-off-by: default avatarVivek Gautam <gautam.vivek@samsung.com>
      Cc: Lukasz Majewski <l.majewski@samsung.com>
      Cc: Piotr Wilczek <p.wilczek@samsung.com>
      Cc: Kyungmin Park <kyungmin.park@samsung.com>
      Cc: Lukasz Dalek <luk0104@gmail.com>
      Cc: Marek Vasut <marex@denx.de>
      f6664ba4
    • Vivek Gautam's avatar
      usb: Use get_unaligned() in usb_endpoint_maxp() for wMaxPacketSize · f903a20d
      Vivek Gautam authored
      
      
      Use unaligned access to fetch wMaxPacketSize in usb_endpoint_maxp()
      api.
      In its absence we see following data abort message:
      ==============================================================
      data abort
      
          MAYBE you should read doc/README.arm-unaligned-accesses
      
      pc : [<bf794e24>]          lr : [<bf794e1c>]
      sp : bf37c7b0  ip : 0000002f     fp : 00000000
      r10: 00000000  r9 : 00000002     r8 : bf37fecc
      r7 : 00000001  r6 : bf7d8931     r5 : bf7d891c  r4 : bf7d8800
      r3 : bf7d65b0  r2 : 00000002     r1 : bf7d65b4  r0 : 00000027
      Flags: nZCv  IRQs off  FIQs off  Mode SVC_32
      Resetting CPU ...
      
      resetting ...
      ==============================================================
      Signed-off-by: default avatarVivek Gautam <gautam.vivek@samsung.com>
      Cc: Ilya Yanok <ilya.yanok@cogentembedded.com>
      Cc: Marek Vasut <marex@denx.de>
      f903a20d
    • Julius Werner's avatar
      usb: asix: Move software resets to basic_init · 4edcf0a3
      Julius Werner authored
      
      
      The ASIX driver calls a basic_init() function during get_info(), so that
      not all initialization tasks need to be redone on every init().
      Unfortunately, the most important one is still triggered too often: the
      driver does a full port and MII reset on every asix_init(), requiring up
      to several seconds to reestablish the link.
      
      This patch confines that software reset into the asix_basic_init()
      function so that it will only be executed once. This saves about a
      second of boot time on systems using BOOTP.
      
      Note: this patch was previously submitted many moons ago as:
      
         usb: usbeth: asix: Do a fast init if link already established
      
      That patch seens to have been lost or forgotten, so this is a rebased
      version. It is tested on snow with a Asix USB dongle (Cisco).
      Signed-off-by: default avatarJulius Werner <jwerner@chromium.org>
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
      Reviewed-by: default avatarVadim Bendebury <vbendeb@chromium.org>
      4edcf0a3
    • Simon Glass's avatar
      usb: Correct CLEAR_FEATURE code in ehci-hcd · ed10e66a
      Simon Glass authored
      This commit broke USB2 on link (Chromebook Pixel):
      
        020bbcb7
      
       usb: hub: Power-cycle on root-hub ports
      
      However the root cause seems to be a missing mask and missing 'break'
      in ehci-hcd.c. This patch fixes both.
      
      On link, 'usb start' with a USB keyboard and memory stick inserted now
      finds both. The keyboard works as expected. Also ext2ls shows a directory
      listing from the memory stick.
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      ed10e66a
    • Vincent Palatin's avatar
      usb: workaround non-working keyboards. · 5da2dc97
      Vincent Palatin authored
      
      
      If the USB keyboard is not answering properly the first request on its
      interrupt endpoint, just skip it and try the next one.
      
      This workarounds an issue with a wireless mouse dongle which presents
      itself both as a keyboard and a mouse but has a non-functional keyboard
      interface.
      Signed-off-by: default avatarVincent Palatin <vpalatin@chromium.org>
      (cherry picked from commit 012bbf0ce0301be2482857e3f03b481dd15c2340)
      Rebased to upstream/master:
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      Reviewed-by: default avatarStefan Reinauer <reinauer@chromium.org>
      Tested-by: default avatarVincent Palatin <vpalatin@chromium.org>
      5da2dc97
    • Vincent Palatin's avatar
      usb: properly re-initialize the USB keyboard. · 09defbc7
      Vincent Palatin authored
      
      
      Allow to reconfigure properly the USB keyboard driver when we enumerate
      several times the USB devices and its position in the device tree has
      changes.
      Signed-off-by: default avatarVincent Palatin <vpalatin@chromium.org>
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      Reviewed-by: default avatarStefan Reinauer <reinauer@chromium.org>
      Tested-by: default avatarVincent Palatin <vpalatin@chromium.org>
      09defbc7
  2. 08 Jun, 2013 2 commits
    • Daniel Schwierzeck's avatar
      MIPS: asm/errno.h: switch to asm-generic/errno.h · e1208c2f
      Daniel Schwierzeck authored
      
      
      This fixes several warnings like
      
      In file included from ./u-boot/include/linux/mtd/mtd.h:13:0,
                       from env_onenand.c:37:
      ./u-boot/build/vct_platinumavc_onenand_small/include2/asm/errno.h:52:0: warning: "ENOMSG" redefined [enabled by default]
      Signed-off-by: default avatarDaniel Schwierzeck <daniel.schwierzeck@gmail.com>
      e1208c2f
    • Gabor Juhos's avatar
      MIPS: fix __raw_* IO accessors · f0550f87
      Gabor Juhos authored
      
      
      The purpose of the __raw* IO accessors is to provide
      IO access in native-endian order. However in the current
      MIPS implementation, the 16 and 32 bit variants of the
      __raw accessors are swapping the values on big-endian
      systems if the CONFIG_SWAP_IO_SPACE option is enabled.
      
      The patch changes the IO accessor macros to fix this
      broken behaviour.
      Signed-off-by: default avatarGabor Juhos <juhosg@openwrt.org>
      Cc: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
      f0550f87
  3. 07 Jun, 2013 12 commits
  4. 06 Jun, 2013 3 commits
  5. 05 Jun, 2013 5 commits
  6. 04 Jun, 2013 5 commits
    • Tom Rini's avatar
      am33xx: Correct NON_SECURE_SRAM_START/END · 320d9746
      Tom Rini authored
      
      
      Prior to Sricharan's cleanup of the boot parameter saving code, we
      did not make use of NON_SECURE_SRAM_START on am33xx, so it wasn't a
      problem that the address was pointing to the middle of our running SPL.
      Correct to point to the base location of the download image area.
      Increase CONFIG_SPL_TEXT_BASE to account for this scratch area being
      used.  As part of correcting these tests, make use of the fact that
      we've always been placing our stack outside of the download image area
      (which is fine, once the downloaded image is run, ROM is gone) so
      correct the max size test to be the ROM defined top of the download area
      to where we link/load at.
      Signed-off-by: default avatarTom Rini <trini@ti.com>
      
      ---
      Changes in v2:
      - Fix typo noted by Peter Korsgaard
      320d9746
    • Tom Rini's avatar
      omap-common/hwinit-common.c: Mark omap_rev_string as static · 0ac6db26
      Tom Rini authored
      
      
      Only called in this file, mark as static.
      Signed-off-by: default avatarTom Rini <trini@ti.com>
      0ac6db26
    • Stephen Warren's avatar
      fdt: allow bootdelay to be specified via device tree · 99bd544e
      Stephen Warren authored
      
      
      This can be useful to force bootcmd to execute as soon as U-Boot has
      started.
      
      My use-case is: An SoC-specific tool pushes U-Boot into RAM, along with
      an image to be written to device boot flash, with the DT config property
      "bootcmd" set to contain a command to write that image to flash. In this
      scenario, we don't want to allow any stale bootdelay value taken from
      the current flash content to affect how long it takes before the
      flashing process starts.
      Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
      Acked-by: default avatarSimon Glass <sjg@chromium.org>
      Acked-by: default avatarGerald Van Baren <vanbaren@cideas.com>
      99bd544e
    • Stephen Warren's avatar
      input: simplify key_matrix_decode_fdt() · df637fa6
      Stephen Warren authored
      
      
      We know the exact property names that the code wants to process. Look
      these up directly with fdt_get_property(), rather than iterating over
      all properties within the node, and checking each property's name, in
      a convoluted fashion, against the expected name.
      Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
      df637fa6
    • Stephen Warren's avatar
      input: fix unaligned access in key_matrix_decode_fdt() · e573617c
      Stephen Warren authored
      
      
      Initialized character arrays on the stack can cause gcc to emit code that
      performs unaligned accessess. Make the data static to avoid this.
      
      Note that the unaligned accesses are made when copying data to prefix[] on
      the stack from .rodata. By making the data static, the copy is completely
      avoided. All explicitly written code treats the data as u8[], so will never
      cause any unaligned accesses.
      Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
      Acked-by: default avatarSimon Glass <sjg@chromium.org>
      e573617c