1. 18 Dec, 2011 1 commit
  2. 14 Dec, 2011 1 commit
    • Carl-Daniel Hailfinger's avatar
      Use struct flashctx instead of struct flashchip for flash chip access · 63fd9026
      Carl-Daniel Hailfinger authored
      
      Struct flashchip is used only for the flashchips array and for
      operations which do not access hardware, e.g. printing a list of
      supported flash chips.
      
      struct flashctx (flash context) contains all data available in
      struct flashchip, but it also contains runtime information like
      mapping addresses. struct flashctx is expected to grow additional
      members over time, a prime candidate being programmer info.
      struct flashctx contains all of struct flashchip with identical
      member layout, but struct flashctx has additional members at the end.
      
      The separation between struct flashchip/flashctx shrinks the memory
      requirement of the big flashchips array and allows future extension
      of flashctx without having to worry about bloat.
      
      Corresponding to flashrom svn r1473.
      Signed-off-by: default avatarCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
      Acked-by: default avatarMichael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
      63fd9026
  3. 23 Nov, 2011 1 commit
  4. 18 Sep, 2011 2 commits
  5. 16 Aug, 2011 1 commit
  6. 26 Jun, 2011 1 commit
  7. 15 Apr, 2011 1 commit
    • Michael Karcher's avatar
      Remove delays in JEDEC erase sequence · 880e867a
      Michael Karcher authored
      
      It is extremely unlikely that a chip not requiring delays in probe does
      require them in erase. We observed unreliable erasing with a SST49LF004A
      with these delays, so remove them if the are not required.
      
      In review, I got the hint that "probe_jedec goes further by making that
      call conditional on nonzero delay". I decided to ignore that. For
      internal_delay, the small amount of clock cycles wasted for calling
      programmer_delay(0) is negligible compared to LPC cycle times. It might
      be an issue for 5 wasted bytes on the serial line in serprog. OTOH,
      flash erase is still slow compared to 6*5 bytes on a serial port at
      reasonable speed.
      
      Corresponding to flashrom svn r1288.
      Signed-off-by: default avatarMichael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
      Acked-by: default avatarCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
      880e867a
  8. 20 Oct, 2010 1 commit
  9. 13 Oct, 2010 2 commits
  10. 10 Oct, 2010 2 commits
    • Carl-Daniel Hailfinger's avatar
      Simplify calls to inner write functions · 184b95f4
      Carl-Daniel Hailfinger authored
      
      No behavioural changes, just equivalence transformations.
      
      Corresponding to flashrom svn r1209.
      Signed-off-by: default avatarCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
      Acked-by: default avatarUwe Hermann <uwe@hermann-uwe.de>
      184b95f4
    • Carl-Daniel Hailfinger's avatar
      Unify chip write functions · b30a5ed4
      Carl-Daniel Hailfinger authored
      
      The currently used write functions (wrappers) all use helpers which
      perform the actual write (inner functions).
      
      The signature of the write wrappers is: int write_chip(struct flashchip
      *flash, uint8_t * buf);
      
      The signature of the inner write functions varied a lot. This patch
      changes them to: int write_part(struct flashchip *flash, uint8_t *src,
      int start, int len);
      
      Did you know that flashrom has only 8 inner write functions for all
      flash chips? write_page_write_jedec_common write_sector_jedec_common
      write_sector_28sf040 spi_chip_write_256_new spi_chip_write_1_new
      spi_aai_write_new write_page_82802ab write_page_m29f400bt
      
      Export all inner write functions.
      
      Change the function signature of wait_82802ab to eliminate single-use
      variables.
      
      Remove an error message in write_page_m29f400bt which was printed for
      every byte written regardless of success.
      
      Add sharplhf00l04.c to the list of flash chip drivers in the Makefile.
      While the functions in there are unused, I suspect we will need them
      later, and by hooking the file up we ensure that compilation won't
      break.
      
      Corresponding to flashrom svn r1208.
      Signed-off-by: default avatarCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
      Acked-by: default avatarUwe Hermann <uwe@hermann-uwe.de>
      b30a5ed4
  11. 08 Oct, 2010 2 commits
  12. 03 Jul, 2010 1 commit
  13. 25 Mar, 2010 1 commit
  14. 24 Mar, 2010 1 commit
  15. 26 Feb, 2010 1 commit
  16. 28 Jan, 2010 1 commit
    • Sean Nelson's avatar
      Complete the addition of Feature Bits for all Jedec based chips · 35727f76
      Sean Nelson authored
      
      Add FEATURE_SHORT_RESET, FEATURE_LONG_RESET, and FEATURE_EITHER_RESET
      rewrite jedec functions to use getaddrmask
      
      convert write_49f002 to write_jedec_1
      convert write_w39v040c to write_jedec_1
      convert probe_w39v040c to probe_jedec
      convert write_49lf040 to write_jedec_1
      convert write_pm29f002 to write_jedec
      convert write_29f040b to write_jedec_1
      convert probe_29f040b to probe_jedec
      convert erase_chip_29f040b to erase_chip_block_jedec
      convert erase_sector_29f040b to erase_sector_jedec
      convert write_m29f002b to write_jedec
      convert write_m29f002t to write_jedec
      convert *_29f002 to *_jedec
      
      decouple unused files from Makefile:
      am29f040b.c
      en29f002a.c
      m29f002.c
      mx29f002.c
      pm29f002.c
      sst49lf040.c
      w39v040c.c
      w49f002u.c
      
      Corresponding to flashrom svn r886.
      Signed-off-by: default avatarSean Nelson <audiohacked@gmail.com>
      Acked-by: default avatarCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
      Acked-by: default avatarAnders Juel Jensen <andersjjensen@gmail.com>
      35727f76
  17. 09 Jan, 2010 2 commits
  18. 04 Jan, 2010 1 commit
  19. 22 Dec, 2009 1 commit
  20. 17 Dec, 2009 2 commits
  21. 27 Nov, 2009 1 commit
    • Michael Karcher's avatar
      Use common jedec functionality where appropriate · 1c296ca8
      Michael Karcher authored
      The deleted function in en29f002a.c is reintroduced as
      write_by_byte_jedec in jedec.c as it contains no chip-specific
      instructions. It is not yet used in other chip drivers, as key addresses
      (0x2AAA/0x5555) are often specified with less bits. After crosschecking
      datasheets, most of the fixmes can probably be resolved as indicated in
      them, causing significant code reduction.
      
      The common JEDEC code for bytewise programming does not program 0xFF
      at all. The chips that had a dedicated bytewise flash function which
      has been changed to write_jedec_1 thus changed flashing behaviour
      and the "write" test flag has been removed. This applies to: AMD
      Am29F002BB/Am29F002NBB AMD Am29F002BT/Am29F002NBT (TEST_OK_PREW before)
      AMIC A29002B AMIC A29002T (TEST_OK_PREW before) EON EN29F002(A)(N)B EON
      EN29F002(A)(N)T (TEST_OK_PREW before) Macronix MX29F001B (TEST_OK_PREW
      before) Macronix MX29F001T (TEST_OK_PREW before) Macronix MX29F002B
      Macronix MX29F002T (TEST_OK_PREW before) ...
      1c296ca8
  22. 26 Nov, 2009 1 commit
    • Michael Karcher's avatar
      Refine support for the JEDEC Software Data Protection · 972cec28
      Michael Karcher authored
      This patch removes the extremely dangerous unprotect_jedec function
      which is not used at all within flashrom code, and renames the
      misleadingly named protect_jedec function to start_program_jedec.
      
      Calls to protect_jedec after flashing are removed, because a) on LPC
      chips, the command sent by protoct_jedec is not even in the datasheet
      and b) on parallel chips, the block write command issued before already
      contained the software protection sequence, so software protection is
      definitely enabled.
      
      This patch also removes two clones of protect_jedec
      
      Background: JEDEC Software Data Protection started as an optional
      feature, which was disabled on the first single-voltage-flash chips.
      The software data protection is the need to prefix a write with a magic
      "write enable" command, while without write protection every write
      access into the chip's address space modifies flash content. This magic
      write enable command also tells the flash chip that the programmer
      ...
      972cec28
  23. 25 Nov, 2009 1 commit
  24. 14 Nov, 2009 1 commit
  25. 19 Oct, 2009 1 commit
  26. 23 Sep, 2009 1 commit
  27. 02 Sep, 2009 1 commit
  28. 23 Jul, 2009 1 commit
  29. 25 Jun, 2009 1 commit
  30. 15 Jun, 2009 1 commit
  31. 05 Jun, 2009 1 commit
  32. 03 Jun, 2009 1 commit
  33. 16 May, 2009 2 commits