Skip to content
Snippets Groups Projects
  1. Sep 24, 2015
  2. Sep 23, 2015
  3. Sep 21, 2015
  4. Sep 20, 2015
  5. Sep 19, 2015
    • Masahiro Yamada's avatar
      pinctrl: move dm_scan_fdt_node() out of pinctrl uclass · 8a5f6129
      Masahiro Yamada authored
      
      Commit c5acf4a2 ("pinctrl: Add the concept of peripheral IDs")
      added some additional change that was not mentioned in the git-log.
      
      That commit added dm_scan_fdt_node() in the pinctrl uclass binding.
      It should be handled by the simple-bus driver or the low-level
      driver, not by the pinctrl framework.
      
      I guess Simon's motivation was to bind GPIO banks located under the
      Rockchip pinctrl device.  It is true some chips have sub-devices
      under their pinctrl devices, but it is basically SoC-specific matter.
      
      This commit partly reverts commit c5acf4a2 to keep the only
      pinctrl-generic features in the uclass.  The dm_scan_fdt_node()
      should be called from the rk3288_pinctrl driver.
      
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      Acked-by: default avatarSimon Glass <sjg@chromium.org>
      Tested-by: default avatarSimon Glass <sjg@chromium.org>
      8a5f6129
  6. Sep 17, 2015
  7. Sep 15, 2015
    • Stefan Roese's avatar
      arm: Remove unused ST-Ericsson u8500 arch · 68282f55
      Stefan Roese authored
      
      This arch does not seem to be supported / used at all in the current
      U-Boot mainline source tree any more. So lets remove the core u8500 code
      and code that was only referenced by this platform.
      
      Please note that this patch also removes these config options:
      
      - CONFIG_PL011_SERIAL_RLCR
      - CONFIG_PL011_SERIAL_FLUSH_ON_INIT
      
      As they only seem to be referenced by u8500 based boards. Without any
      such board in the current code, these config option don't make sense
      any more. Lets remove them as well.
      
      If someone still wants to use this platform, then please send patches
      to re-enable support by adding at least one board that references this
      code.
      
      Signed-off-by: default avatarStefan Roese <sr@denx.de>
      Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
      Cc: John Rigby <john.rigby@linaro.org>
      Cc: Simon Glass <sjg@chromium.org>
      Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
      Cc: Tom Rini <trini@konsulko.com>
      Cc: Heiko Schocher <hs@denx.de>
      Cc: Albert Aribaud <albert.u.boot@aribaud.net>
      Reviewed-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      68282f55
    • Stefan Roese's avatar
      mtd: nand: fsmc: Fixes and cleanup for fsmc_nand_switch_ecc() · 62c390f8
      Stefan Roese authored
      
      This patch addresses some comments raised by Scott in the last versions.
      Here the changes in detail:
      
      - Removed __maybe_unused as its not needed
      - Added check for strength == 4 and error out for the unsupported
        ECC strength values
      - Don't set .caclulate, .correct, and .bytes for NAND_ECC_SOFT_BCH as this
        will be done in nand_scan_tail()
      - Set .caclulate back to fsmc_read_hwecc() in the HW case
      - Added comment that this function will only be called on SPEAr platforms,
        not supporting the BCH8 HW ECC (FSMC_VER8)
      
      Signed-off-by: default avatarStefan Roese <sr@denx.de>
      Cc: Scott Wood <scottwood@freescale.com>
      Cc: Tom Rini <trini@konsulko.com>
      Acked-by: default avatarScott Wood <scottwood@freescale.com>
      62c390f8
    • Stephen Warren's avatar
      fdt: add new fdt address parsing functions · 02464e38
      Stephen Warren authored
      
      fdtdec_get_addr_size() hard-codes the number of cells used to represent
      an address or size in DT. This is incorrect in many cases depending on
      the DT binding for a particular node or property (e.g. it is incorrect
      for the "reg" property). In most cases, DT parsing code must use the
      properties #address-cells and #size-cells to parse addres properties.
      
      This change splits up the implementation of fdtdec_get_addr_size() so
      that the core logic can be used for both hard-coded and non-hard-coded
      cases. Various wrapper functions are implemented that support cases
      where hard-coded cell counts should or should not be used, and where
      the client does and doesn't know the parent node ID that contains the
      properties #address-cells and #size-cells.
      
      dev_get_addr() is updated to use the new functions.
      
      Core functionality in fdtdec_get_addr_size_fixed() is widely tested via
      fdtdec_get_addr_size(). I tested fdtdec_get_addr_size_auto_noparent() and
      dev_get_addr() by manually modifying the Tegra I2C driver to invoke them.
      
      Much of the core implementation of fdtdec_get_addr_size_fixed(),
      fdtdec_get_addr_size_auto_parent(), and
      fdtdec_get_addr_size_auto_noparent() comes from Thierry Reding's
      previous commit "fdt: Fix fdtdec_get_addr_size() for 64-bit".
      
      Based-on-work-by: default avatarThierry Reding <treding@nvidia.com>
      Cc: Thierry Reding <treding@nvidia.com>
      Cc: Simon Glass <sjg@chromium.org>
      Cc: Michal Suchanek <hramrach@gmail.com>
      Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
      Acked-by: default avatarSimon Glass <sjg@chromium.org>
      Dropped #define DEBUG at the top of fdtdec.c:
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      02464e38
  8. Sep 13, 2015
  9. Sep 12, 2015
    • Stephen Warren's avatar
      usb: ci_udc: fix emissions of ZLPs · b337b3b2
      Stephen Warren authored
      
      Commit 6a132416 "ci_udc: Update the ci_udc driver to support bulk
      transfers" caused the value of "len" to change without updating subsquent
      users of that variable in ci_ep_submit_next_request(). This caused the
      code that detects when to emit ZLPs (Zero Length Packets) never to
      trigger, which in turn caused host timeouts when a ZLP was required,
      which in turn broke tests/dfu/, even despite the assertion in that
      commit's description that "These changes are tested for both the DFU and
      lthor."
      
      Fix this by modifying the added dtd iteration code not to modify "len",
      but rather to keep state in a separate variable. Rename the variables
      while we're at it so they describe their purpose better.
      
      Fixes: 6a132416 ("ci_udc: Update the ci_udc driver to support bulk transfers")
      Cc: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
      Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
      b337b3b2
    • Peng Fan's avatar
      usb: gadget: ci_udc: implement usb_ep_ops dequeue callback · 70eaeb03
      Peng Fan authored
      
      Implement endpoint dequeue callback function.
      
      Without this function, uboot will hang when executing fastboot comamnd.
      See following flow:
      "fastboot_tx_write_str->fastboot_tx_write->usb_ep_dequeue->ep->ops->dequeue"
      without implement ci_udc dequeue function, ep->ops->dequeue is NULL, then
      uboot will hang.
      
      Tested on mx6qsabresd board with fastboot enabled.
      
      Signed-off-by: default avatarPeng Fan <Peng.Fan@freescale.com>
      Tested-by: default avatarFabio Estevam <fabio.estevam@freescale.com>
      Cc: "Łukasz Majewski" <l.majewski@samsung.com>
      Cc: Marek Vasut <marex@denx.de>
      70eaeb03
  10. Sep 11, 2015
    • Sylvain Lemieux's avatar
      gpio: lpc32xx: fix issues with port3 gpio · 89983478
      Sylvain Lemieux authored
      
      The current simplify lpc32xx gpio driver implementation assume a
      maximum of 32 GPIO per port; there are a total of 22 GPI, 24 GPO
      and 6 GPIO to managed on port 3.
      
      Update the driver to fix the following:
      1) When requesting GPI_xx and GPO_xx on port 3 (xx is the same number)
         the second call to "gpio_request" will return -EBUSY.
      
      2) The status of GPO_xx pin report the status of the
         corresponding GPI_xx pin when using the "gpio status" command.
      
      3) The gpio driver may setup the direction register for the wrong
         gpio when calling "gpio_direction_input" (GPI_xx) or
         "gpio_direction_output" (GPO_xx) on port 3; the call to the
         direction is require to use the "gpio status" command.
      
      The following change were done in the driver:
      1) port3 GPI are cache in a separate 32 bits in the array.
      2) port3 direction register written only for GPIO pins.
      3) port3 GPO & GPIO (as output) are read using "p3_outp_state".
      4) LPC32XX_GPI_P3_GRP updated to match the change.
      
      Signed-off-by: default avatarSylvain Lemieux <slemieux@tycoint.com>
      89983478
    • Heiko Schocher's avatar
      bitops: introduce BIT() definition · 92a3188d
      Heiko Schocher authored
      
      introduce BIT() definition, used in at91_udc gadget
      driver.
      
      Signed-off-by: default avatarHeiko Schocher <hs@denx.de>
      [remove all other occurrences of BIT(x) definition]
      Signed-off-by: default avatarAndreas Bießmann <andreas.devel@googlemail.com>
      Acked-by: default avatarStefan Roese <sr@denx.de>
      Acked-by: default avatarAnatolij Gustschin <agust@denx.de>
      92a3188d
    • Stephen Warren's avatar
      dfu: mmc: buffer file reads too · 411c5e57
      Stephen Warren authored
      
      When writing to files in a filesystem on MMC, dfu_mmc.c buffers up the
      entire file content until the end of the transaction, at which point the
      file is written in one go. This allows writing files larger than the USB
      transfer size (CONFIG_SYS_DFU_DATA_BUF_SIZE); the maximum written file
      size is CONFIG_SYS_DFU_MAX_FILE_SIZE (the size of the temporary buffer).
      
      The current file reading code does not do any buffering, and so limits
      the maximum read file size to the USB transfer size. Enhance the code to
      do the same kind of buffering as the write path, so the same file size
      limits apply.
      
      Remove the size checking code from dfu_read() since all read paths now
      support larger files than the USB transfer buffer.
      
      Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
      Acked-by: default avatarLukasz Majewski <l.majewski@samsung.com>
      Tested-by: default avatarLukasz Majewski <l.majewski@samsung.com>
      411c5e57
    • Stephen Warren's avatar
      dfu: don't keep freeing/reallocating · 806bd245
      Stephen Warren authored
      
      DFU currently allocates buffer memory at the start of each data transfer
      operation and frees it at the end. Especially since memalign() is used to
      allocate the buffer, and various other allocations happen during the
      transfer, this can expose the code to heap fragmentation, which prevents
      the allocation from succeeding on subsequent transfers.
      
      Fix the code to allocate the buffer once when DFU mode is initialized,
      and free the buffer once when DFU mode is exited, to reduce the exposure
      to heap fragmentation.
      
      The failure mode is:
      
      // Internally to memalign(), this allocates a lot more than s to guarantee
      // that alignment can occur, then returns chunks of memory at the start/
      // end of the allocated buffer to the heap.
      p = memalign(a, s);
      // Various other malloc()s occur here, some of which allocate the RAM
      // immediately before/after "p".
      //
      // DFU transfer is complete, so buffer is released.
      free(p);
      // By chance, no other malloc()/free() here, in DFU at least.
      //
      // A new DFU transfer starts, so the buffer is allocated again.
      // In theory this should succeed since we just free()d a buffer of the
      // same size. However, this fails because memalign() internally attempts
      // to allocate much more than "s", yet free(p) above only free()d a
      // little more than "s".
      p = memalign(a, s);
      
      Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
      Acked-by: default avatarLukasz Majewski <l.majewski@samsung.com>
      Tested-by: default avatarLukasz Majewski <l.majewski@samsung.com>
      806bd245
    • Stephen Warren's avatar
      usb: gadget: don't leak configs when unbinding · 44bfb43f
      Stephen Warren authored
      
      By the time g_dnl_unbind() is run, cdev->config has been set to NULL,
      so the free() there does nothing, and the config struct is leaked.
      Equally, struct usb_gadget contains a linked list of config structs, so
      the code should iterate over them all and free each one, rather than
      freeing one particular config struct.
      
      composite_unbind() already iterates over the list of config structs, and
      unlinks each from the linked list. Fix this loop to free() each struct as
      it's unlinked and otherwise forgotten.
      
      Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
      Acked-by: default avatarLukasz Majewski <l.majewski@samsung.com>
      Tested-by: default avatarLukasz Majewski <l.majewski@samsung.com>
      44bfb43f
Loading