Skip to content
Snippets Groups Projects
  1. Mar 28, 2014
  2. Mar 24, 2014
    • Łukasz Majewski's avatar
      dfu: mmc: Replace calls to u-boot commands with native mmc API · eea4e6fe
      Łukasz Majewski authored
      
      For some time we have been using the run_command() with properly crafted
      string. Such approach turned to be unreliable and error prone.
      
      Switch to "native" mmc subsystem API would allow better type checking and
      shall improve speed.
      
      Also, it seems that this API is changing less often than u-boot commands.
      The approach similar to env operations on the eMMC has been reused.
      
      Signed-off-by: default avatarLukasz Majewski <l.majewski@samsung.com>
      eea4e6fe
    • Pantelis Antoniou's avatar
      mmc: Split mmc struct, rework mmc initialization (v2) · 93bfd616
      Pantelis Antoniou authored
      
      The way that struct mmc was implemented was a bit of a mess;
      configuration and internal state all jumbled up in a single structure.
      
      On top of that the way initialization is done with mmc_register leads
      to a lot of duplicated code in drivers.
      
      Typically the initialization got something like this in every driver.
      
      	struct mmc *mmc = malloc(sizeof(struct mmc));
      	memset(mmc, 0, sizeof(struct mmc);
      	/* fill in fields of mmc struct */
      	/* store private data pointer */
      	mmc_register(mmc);
      
      By using the new mmc_create call one just passes an mmc config struct
      and an optional private data pointer like this:
      
      	struct mmc = mmc_create(&cfg, priv);
      
      All in tree drivers have been updated to the new form, and expect
      mmc_register to go away before long.
      
      Changes since v1:
      
      * Use calloc instead of manually calling memset.
      * Mark mmc_register as deprecated.
      
      Signed-off-by: default avatarPantelis Antoniou <panto@antoniou-consulting.com>
      93bfd616
    • Pantelis Antoniou's avatar
      mmc: Convert mmc struct's name array to a pointer · 22cb7d33
      Pantelis Antoniou authored
      
      Using an array is pointless; even more pointless (and scary) is using
      sprintf to fill it without a format string.
      
      Signed-off-by: default avatarPantelis Antoniou <panto@antoniou-consulting.com>
      22cb7d33
    • Pantelis Antoniou's avatar
      mmc: Remove ops from struct mmc and put in mmc_ops · ab769f22
      Pantelis Antoniou authored
      
      Remove the in-structure ops and put them in mmc_ops with
      a constant pointer to it.
      
      This makes the mmc structure smaller as well as conserving
      code space (in theory).
      
      All in-tree drivers are converted as well; this is done in a
      single patch in order to not break git bisect.
      
      Changes since V1:
      Fix compilation b0rked issue on omap platforms where OMAP_GPIO was
      not set.
      
      Signed-off-by: default avatarPantelis Antoniou <panto@antoniou-consulting.com>
      ab769f22
  3. Mar 23, 2014
    • Łukasz Majewski's avatar
      dfu: mmc: Replace calls to u-boot commands with native mmc API · 7d0b605a
      Łukasz Majewski authored
      
      For some time we have been using the run_command() with properly crafted
      string. Such approach turned to be unreliable and error prone.
      
      Switch to "native" mmc subsystem API would allow better type checking and
      shall improve speed.
      
      Also, it seems that this API is changing less often than u-boot commands.
      The approach similar to env operations on the eMMC has been reused.
      
      Signed-off-by: default avatarLukasz Majewski <l.majewski@samsung.com>
      7d0b605a
    • Heiko Schocher's avatar
      am335x, dfu: add DFU_MANIFEST_POLL_TIMEOUT to the siemens boards · 401341d6
      Heiko Schocher authored
      
      as the siemens boards use dfu for updating a nand ubi partition
      add DFU_MANIFEST_POLL_TIMEOUT to them, so dfu host waits after
      complete transfer of the new image for DFU_MANIFEST_POLL_TIMEOUT
      ms before sending again an usb request. So the board have enough
      time to erase rest of the nand sectors.
      
      Signed-off-by: default avatarHeiko Schocher <hs@denx.de>
      Reviewed-by: default avatarLukasz Majewski <l.majewski@samsung.com>
      Cc: Kyungmin Park <kyungmin.park@samsung.com>
      Cc: Marek Vasut <marex@denx.de>
      Cc: Tom Rini <trini@ti.com>
      Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
      401341d6
    • Heiko Schocher's avatar
      usb: dfu: introduce dfuMANIFEST state · 001a8319
      Heiko Schocher authored
      on nand flash using ubi, after the download of the new image into
      the flash, the "rest" of the nand sectors get erased while flushing
      the medium. With current u-boot version dfu-util may show:
      
      Starting download: [##################################################] finished!
      state(7) = dfuMANIFEST, status(0) = No error condition is present
      unable to read DFU status
      
      as get_status is not answered while erasing sectors, if erasing
      needs some time.
      
      So do the following changes to prevent this:
      
      - introduce dfuManifest state
        According to dfu specification
        ( http://www.usb.org/developers/devclass_docs/usbdfu10.pdf
      
       ) section 7:
        "the device enters the dfuMANIFEST-SYNC state and awaits the solicitation
         of the status report by the host. Upon receipt of the anticipated
         DFU_GETSTATUS, the device enters the dfuMANIFEST state, where it
         completes its reprogramming operations."
      
      - when stepping into dfuManifest state, sending a PollTimeout
        DFU_MANIFEST_POLL_TIMEOUT in ms, to the host, so the host
        (dfu-util) waits the PollTimeout before sending a get_status again.
      
      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>
      Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
      001a8319
    • Heiko Schocher's avatar
      usb, dfu: extract flush code into seperate function · a2199afe
      Heiko Schocher authored
      
      move the flushing code into an extra function dfu_flush(),
      so it can be used from other code.
      
      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>
      Cc: Pantelis Antoniou <panto@antoniou-consulting.com>
      a2199afe
  4. Mar 22, 2014
  5. Mar 18, 2014
Loading