1. 12 May, 2014 5 commits
  2. 08 May, 2014 3 commits
    • Michal Simek's avatar
      serial: zynq: Fix typo in suffix function name · 09865465
      Michal Simek authored
      's/zynq_serial_initalize/zynq_serial_initialize/g'
      serial_initialize is used by all serial drivers.
      Signed-off-by: default avatarMichal Simek <michal.simek@xilinx.com>
      09865465
    • Michal Simek's avatar
      serial: zynq: Remove sparse warnings · 891655eb
      Michal Simek authored
      Warnings:
      drivers/serial/serial_zynq.c:181:1: warning: symbol 'uart_zynq0_init' was not declared. Should it be static?
      drivers/serial/serial_zynq.c:181:1: warning: symbol 'uart_zynq0_setbrg' was not declared. Should it be static?
      drivers/serial/serial_zynq.c:181:1: warning: symbol 'uart_zynq0_getc' was not declared. Should it be static?
      drivers/serial/serial_zynq.c:181:1: warning: symbol 'uart_zynq0_tstc' was not declared. Should it be static?
      drivers/serial/serial_zynq.c:181:1: warning: symbol 'uart_zynq0_putc' was not declared. Should it be static?
      drivers/serial/serial_zynq.c:181:1: warning: symbol 'uart_zynq0_puts' was not declared. Should it be static?
      drivers/serial/serial_zynq.c:182:22: warning: symbol 'uart_zynq_serial0_device' was not declared. Should it be static?
      drivers/serial/serial_zynq.c:184:1: warning: symbol 'uart_zynq1_init' was not declared. Should it be static?
      drivers/serial/serial_zynq.c:184:1: warning: symbol 'uart_zynq1_setbrg' was not declared. Should it be static?
      drivers/serial/serial_zynq.c:184:1: warning: symbol 'uart_zynq1_getc' was not declared. Should it be static?
      drivers/serial/serial_zynq.c:184:1: warning: symbol 'uart_zynq1_tstc' was not declared. Should it be static?
      drivers/serial/serial_zynq.c:184:1: warning: symbol 'uart_zynq1_putc' was not declared. Should it be static?
      drivers/serial/serial_zynq.c:184:1: warning: symbol 'uart_zynq1_puts' was not declared. Should it be static?
      drivers/serial/serial_zynq.c:185:22: warning: symbol 'uart_zynq_serial1_device' was not declared. Should it be static?
      Signed-off-by: default avatarMichal Simek <michal.simek@xilinx.com>
      891655eb
    • Jesper B. Christensen's avatar
  3. 06 May, 2014 4 commits
    • Michal Simek's avatar
      serial: zynq: Fix typo in suffix function name · 870e0bda
      Michal Simek authored
      's/zynq_serial_initalize/zynq_serial_initialize/g'
      serial_initialize is used by all serial drivers.
      Signed-off-by: default avatarMichal Simek <michal.simek@xilinx.com>
      870e0bda
    • Michal Simek's avatar
      serial: zynq: Remove sparse warnings · 6c4da359
      Michal Simek authored
      Warnings:
      drivers/serial/serial_zynq.c:181:1: warning: symbol 'uart_zynq0_init' was not declared. Should it be static?
      drivers/serial/serial_zynq.c:181:1: warning: symbol 'uart_zynq0_setbrg' was not declared. Should it be static?
      drivers/serial/serial_zynq.c:181:1: warning: symbol 'uart_zynq0_getc' was not declared. Should it be static?
      drivers/serial/serial_zynq.c:181:1: warning: symbol 'uart_zynq0_tstc' was not declared. Should it be static?
      drivers/serial/serial_zynq.c:181:1: warning: symbol 'uart_zynq0_putc' was not declared. Should it be static?
      drivers/serial/serial_zynq.c:181:1: warning: symbol 'uart_zynq0_puts' was not declared. Should it be static?
      drivers/serial/serial_zynq.c:182:22: warning: symbol 'uart_zynq_serial0_device' was not declared. Should it be static?
      drivers/serial/serial_zynq.c:184:1: warning: symbol 'uart_zynq1_init' was not declared. Should it be static?
      drivers/serial/serial_zynq.c:184:1: warning: symbol 'uart_zynq1_setbrg' was not declared. Should it be static?
      drivers/serial/serial_zynq.c:184:1: warning: symbol 'uart_zynq1_getc' was not declared. Should it be static?
      drivers/serial/serial_zynq.c:184:1: warning: symbol 'uart_zynq1_tstc' was not declared. Should it be static?
      drivers/serial/serial_zynq.c:184:1: warning: symbol 'uart_zynq1_putc' was not declared. Should it be static?
      drivers/serial/serial_zynq.c:184:1: warning: symbol 'uart_zynq1_puts' was not declared. Should it be static?
      drivers/serial/serial_zynq.c:185:22: warning: symbol 'uart_zynq_serial1_device' was not declared. Should it be static?
      Signed-off-by: default avatarMichal Simek <michal.simek@xilinx.com>
      6c4da359
    • Michal Simek's avatar
      net: zynq: Fix sparse warnings in gem · 2fd2489b
      Michal Simek authored
      Add missing header.
      
      Warnings:
      drivers/net/zynq_gem.c:491:5: warning: symbol 'zynq_gem_initialize' was not declared. Should it be static?
      drivers/net/zynq_gem.c:542:5: warning: symbol 'zynq_gem_of_init' was not declared. Should it be static?
      Signed-off-by: default avatarMichal Simek <michal.simek@xilinx.com>
      2fd2489b
    • Michal Simek's avatar
      net: zynq: Use predefined macros instead of hardcoded value · c1a9fa4b
      Michal Simek authored
      MII is used by this driver.
      Signed-off-by: default avatarMichal Simek <michal.simek@xilinx.com>
      c1a9fa4b
  4. 05 May, 2014 5 commits
  5. 01 May, 2014 1 commit
    • Stephen Warren's avatar
      usb: gadget: allow ci_udc to build with new gadget framework · 2fc5dab2
      Stephen Warren authored
      Allow ci_udc.o to be built when using the new(?) USB gadget framework,
      as enabled by CONFIG_USB_GADGET.
      
      Note that this duplicates the Makefile entry for ci_udc.o, since it's
      also included inside #ifdef CONFIG_USB_ETHER. I'm not sure what that
      define means; perhaps an old style of Ethernet-specific USB gadget
      implementation?
      
      I wonder if the line that this patch adds shouldn't be outside all of
      the ifdefs, so it stands on its own, similar to how e.g. epautoconf.o
      is shared between the two?
      Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
      2fc5dab2
  6. 30 Apr, 2014 13 commits
    • Stephen Warren's avatar
      usb: ums: use only 1 buffer for CI_UDC · a022c1e1
      Stephen Warren authored
      ci_udc.c allocates only a single buffer for each endpoint, which
      ci_ep_alloc_request() returns as a hard-coded value rather than
      dynamically allocating. Consequently, storage_common.c must limit
      itself to using a single buffer at a time. Add a special case
      to the definition of FSG_NUM_BUFFERS for this.
      
      Another option would be to fix ci_ep_alloc_request() to dynamically
      allocate the buffers like some/all(?) other device mode drivers do.
      However, I don't think that ci_ep_queue() supports queueing up
      multiple buffers either yet, and I'm not familiar enough with the
      controller yet to implement that. As such, any attempt to use multiple
      buffers simply results in data corruption and other errors.
      Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
      a022c1e1
    • Stephen Warren's avatar
      usb: ci_udc: support variants with hostpc register · fcf2ede1
      Stephen Warren authored
      Tegra's USB controller appears to be a variant of the ChipIdea
      controller; perhaps derived from it, or simply a different version of
      the IP core to what U-Boot supports today.
      
      In this variant, at least the following difference are present:
      - Some registers are moved about.
      - Setup transaction completion is reported in a separate 'epsetupstat'
        register, rather than in 'epstat' (which still exists, perhaps for
        other transaction types).
      - USB connection speed is reported in a separate 'hostpc1_devlc'
        register, rather than 'portsc'.
      - The registers used by ci_udc.c begin at offset 0x130 from the USB
        register base, rather than offset 0x140. However, this is handled
        by the associated EHCI controller driver, since the register address
        is stored in controller.ctrl->hcor.
      
      Introduce define CONFIG_CI_UDC_HAS_HOSTPC to indicate which variant of
      the controller should be supported. The "HAS_HOSTPC" part of this name
      mirrors the similar "has_hostpc" field used by the Linux EHCI controller
      core to represent the presence/absence of the hostpc1_devlc register.
      Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
      fcf2ede1
    • Stephen Warren's avatar
      usb: ci_udc: make PHY initialization conditional · 0c51dc6d
      Stephen Warren authored
      usb_gadget_register_driver() currently unconditionally programs PORTSC
      to select a ULPI PHY. This is incorrect on at least the Tegra boards I
      am testing with, which use a UTMI PHY for the OTG ports. Make the PHY
      selection code conditional upon the specific EHCI controller that is in
      use.
      
      Ideally, I believe that the PHY initialization code should be part of
      ehci_hcd_init() in the relevant EHCI controller driver, or some board-
      specific function that ehci_hcd_init() calls.
      
      For MX6, I'm not sure this PHY initialization code is correct even before
      this patch, since ehci-mx6's ehci_hcd_init() already configures PORTSC to
      a board-specific value, and it seems likely that the code in ci_udc.c is
      incorrectly undoing this. Perhaps this is not an issue if the PHY
      selection register bits aren't implemented on this instance of the MX6
      USB controller?
      
      ehci-mxs.c doens't appear to touch PORTSC, so this code is likely still
      required there.
      Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
      0c51dc6d
    • Stephen Warren's avatar
      usb: ci_udc: set ep->req.actual after transfer · 8aac6e9c
      Stephen Warren authored
      At least drivers/usb/gadget/storage_common.c expects that ep->req.actual
      contain the number of bytes actually transferred. (At least in practice,
      I observed it failing to work correctly unless this was the case).
      
      However, ci_udc.c modifies ep->req.length instead. I assume that .length
       is supposed to represent the allocated buffer size, whereas .actual is
      supposed to represent the actual number of bytes transferred. In the OUT
      transaction case, this may happen simply because the host sends a smaller
       packet than the max possible size, which is quite legal. In the IN case,
      transferring fewer bytes than requested could presumably happen as an
      error.
      
      Modify handle_ep_complete() to write to .actual rather than modifying
      .length.
      Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
      8aac6e9c
    • Stephen Warren's avatar
      usb: ci_udc: Support larger packets · f5c03006
      Stephen Warren authored
      ci_ep_queue() currently only fills in the page0/page1 fields in the
      queue item. If the buffer is larger than 4KiB (unaligned) or 8KiB
      (page-aligned), then this prevents the HW from knowing where to write
      the balance of the data.
      
      Fix this by initializing all 5 pageN pointers, which allows up to
      16KiB (potentially non-page-aligned) buffers.
      Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
      f5c03006
    • Lukasz Majewski's avatar
      dfu:fix: Replace wrong return value with proper one · 672ad18c
      Lukasz Majewski authored
      This patch remove always false (since we tested ret = 0) ternary operator
      with ret value returned.
      Signed-off-by: default avatarLukasz Majewski <l.majewski@samsung.com>
      672ad18c
    • andrey.konovalov@linaro.org's avatar
      exynos: usb: Fix data abort on boards w/o vbus-gpio node in the DT · e6e493f3
      andrey.konovalov@linaro.org authored
      Commit 4a271cb1 doesn't take into account that fdtdec_setup_gpio()
      returns success when the gpio passed to it is FDT_GPIO_NONE (no
      gpio node found in the fdtdec_decode_gpio() call). This results in
      calling gpio_direction_output() on invalid gpio. For this reason
      executing "usb start" command on Arndale causes data abort in the
      ehci-exynos driver.
      
      Add the fdt_gpio_isvalid() check to fix that problem.
      Signed-off-by: default avatarAndrey Konovalov <andrey.konovalov@linaro.org>
      Cc: Julius Werner <jwerner@chromium.org>
      Cc: Simon Glass <sjg@chromium.org>
      Cc: Minkyu Kang <mk7.kang@samsung.com>
      Cc: Marek Vasut <marex@denx.de>
      e6e493f3
    • Rob Herring's avatar
      usb: musb: fill in usb_gadget_unregister_driver · 078d7302
      Rob Herring authored
      Add missing missing disconnect and unbind calls to the musb gadget driver's
      usb_gadget_unregister_driver function. Otherwise, any gadget drivers fail
      to uninitialize and run a 2nd time.
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      078d7302
    • Rob Herring's avatar
      usb: handle NULL table in usb_gadget_get_string · 52d45012
      Rob Herring authored
      Allow a NULL table to be passed to usb_gadget_get_string for cases
      when a string table may not be populated.
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      Reviewed-by: default avatarTom Rini <trini@ti.com>
      Acked-by: default avatarMarek Vasut <marex@denx.de>
      Acked-by: default avatarLukasz Majewski <l.majewski@samsung.com>
      52d45012
    • Przemyslaw Marczak's avatar
      usb:gadget:f_thor: fix write to filesystem by add dfu_flush() · fd2a89b2
      Przemyslaw Marczak authored
      Since dfu read/write operations needs to be flushed manually,
      writing to filesystem on MMC by thor was broken. MMC raw write
      actually is working fine because current dfu_flush() function
      writes filesystem only. This commit adds dfu_flush() to f_thor
      and now filesystem write is working.
      
      This change was tested on Trats2 board.
      Signed-off-by: default avatarPrzemyslaw Marczak <p.marczak@samsung.com>
      Cc: Lukasz Majewski <l.majewski@samsung.com>
      Cc: Marek Vasut <marex@denx.de>
      Cc: Heiko Schocher <hs@denx.de>
      Cc: Tom Rini <trini@ti.com>
      fd2a89b2
    • Przemyslaw Marczak's avatar
      usb:gadget:f_thor: code cleanup in function download_tail() · adfc17bf
      Przemyslaw Marczak authored
      In thor's download_tail() function, dfu_get_entity() is called
      before each dfu_write() call and the returned entity pointers
      are the same. So dfu_get_entity() can be called just once and
      this patch changes this.
      Signed-off-by: default avatarPrzemyslaw Marczak <p.marczak@samsung.com>
      Cc: Lukasz Majewski <l.majewski@samsung.com>
      Cc: Marek Vasut <marex@denx.de>
      Cc: Heiko Schocher <hs@denx.de>
      Cc: Tom Rini <trini@ti.com>
      adfc17bf
    • Adrian Cox's avatar
      usb: Add endian support macros to interrupt transfers in the EHCI driver. · ea427775
      Adrian Cox authored
      Update the EHCI driver to support interrupt transfers on PowerPC.
      Signed-off-by: default avatarAdrian Cox <adrian@humboldt.co.uk>
      ea427775
    • Nobuhiro Iwamatsu's avatar
      usb: ehci: rmobile: Add support ehci host driver of rmobile SoCs · ede4d5e3
      Nobuhiro Iwamatsu authored
      The rmobile SoC has usb host controller.
      This supports USB controllers listed in the R8A7790, R8A7791 and R8A7740.
      Signed-off-by: default avatarNobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
      Reviewed-by: default avatarMarek Vasut <marex@denx.de>
      ede4d5e3
  7. 29 Apr, 2014 2 commits
    • Shaveta Leekha's avatar
      drivers/i2c/fsl_i2c: modify i2c_read to handle multi-byte write · a405764c
      Shaveta Leekha authored
      Most of the I2C slaves support accesses in the typical style
      that is : read/write series of bytes at particular address offset.
      These transactions look like:"
      (1) START:Address:Tx:Offset:RESTART:Address[0..4]:Tx/Rx:data[0..n]:STOP"
      
      However there are certain devices which support accesses in
      terms of the transactions as follows:
      (2) "START:Address:Tx:Txdata[0..n1]:Clock_stretching:
              RESTART:Address:Rx:data[0..n2]"
      Here Txdata is typically a command and some associated data,
      similarly Rxdata could be command status plus some data received
      as a response to the command sent.
      
      Type (1) transactions are currently supportd in the
      i2c driver using i2c_read and i2c_write APIs. I2C EEPROMs,
      RTC, etc fall in this category.
      
      To handle type (2) along with type (1) transactions,
      i2c_read() function has been modified.
      Signed-off-by: default avatarShaveta Leekha <shaveta@freescale.com>
      Signed-off-by: default avatarPoonam Aggrwal <poonam.aggrwal@freescale.com>
      a405764c
    • York Sun's avatar
      driver/mxc_i2c: Move static data structure to global_data · dec1861b
      York Sun authored
      This driver needs a data structure in SRAM before SDRAM is available.
      This is not alway the case using .data section. Moving this data
      structure to global_data guarantees it is writable.
      Signed-off-by: default avatarYork Sun <yorksun@freescale.com>
      CC: Troy Kisky <troy.kisky@boundarydevices.com>
      dec1861b
  8. 23 Apr, 2014 7 commits