1. 01 Jun, 2014 1 commit
  2. 17 Mar, 2014 1 commit
  3. 14 Sep, 2013 1 commit
  4. 23 Aug, 2013 1 commit
  5. 14 Aug, 2013 1 commit
  6. 05 Jan, 2013 1 commit
  7. 04 Jan, 2013 1 commit
    • Stefan Tauner's avatar
      Unify PCI init and let pcidev clean itself up · 5561955b
      Stefan Tauner authored
      
      Previously the internal programmer used its own code to initialize pcilib.
      This patch extracts the common code from the internal programmer and
      pcidev_init() into pcidev_init_common().
      This fixes the non-existent PCI cleanup of the internal programmer and adds
      an additional safety by checking for an already existing PCI context.
      
      We got a nice shutdown function registration infrastructure, but did not use it
      very wisely. Instead we added shutdown functions to a myriad of programmers
      unnecessarily. In this patch we get rid of those that do only call pci_cleanup(pacc)
      by adding a shutdown function the pcidev.c itself that gets registered by
      pcidev_init().
      
      Corresponding to flashrom svn r1642.
      Signed-off-by: default avatarStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
      Acked-by: default avatarCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
      5561955b
  8. 27 Dec, 2012 1 commit
    • Stefan Tauner's avatar
      Unify usbdev_status and pcidev_status into dev_entry · 4b24a2d7
      Stefan Tauner authored
      
      Once upon a time usbdev_status was created for the ft2232
      programmer. Its IDs are semantically different to pcidev_status
      because they indicate USB instead of PCI IDs, but apart from that
      both data structures are equal. This change makes life easier for
      everything involved in handling and printing the status of devices
      that is noted in those structures by combining them into dev_entry.
      
      It is still possible to distinguish between PCI and USB devices
      indirectly by using the struct programmer's type field.
      
      Also, add a programmer column to the PCI and USB devices lists.
      
      Corresponding to flashrom svn r1632.
      Signed-off-by: default avatarStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
      Acked-by: default avatarCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
      4b24a2d7
  9. 27 Aug, 2012 1 commit
  10. 26 Aug, 2012 1 commit
  11. 21 Jul, 2012 1 commit
  12. 20 Jul, 2012 1 commit
  13. 27 Feb, 2012 1 commit
  14. 20 Dec, 2011 1 commit
    • Carl-Daniel Hailfinger's avatar
      Have all programmer init functions register bus masters/programmers · c40cff7b
      Carl-Daniel Hailfinger authored
      
      All programmer types (Parallel, SPI, Opaque) now register themselves
      into a generic programmer list and probing is now programmer-centric
      instead of chip-centric.
      Registering multiple SPI/... masters at the same time is now possible
      without any problems. Handling multiple flash chips is still unchanged,
      but now we have the infrastructure to deal with "dual BIOS" and "one
      flash behind southbridge and one flash behind EC" sanely.
      
      A nice side effect is that this patch kills quite a few global variables
      and improves the situation for libflashrom.
      
      Hint for developers:
      struct {spi,par,opaque}_programmer now have a void *data pointer to
      store any additional programmer-specific data, e.g. hardware
      configuration info.
      
      Note:
      flashrom -f -c FOO -r forced_read.bin
      does not work anymore. We have to find an architecturally clean way to
      solve this.
      
      Corresponding to flashrom svn r1475.
      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>
      c40cff7b
  15. 14 Jun, 2011 1 commit
    • David Hendricks's avatar
      Use shutdown callback mechanism to shutdown programmers · 8bb2021d
      David Hendricks authored
      
      This patch attempts to resolve some programmer shutdown ordering issues
      by having the programmer init functions register shutdown callbacks explicitly
      wherever it makes most sense. Before, assumptions were made that could lead to
      the internal programmer's state changing before the external programmer could be
      shut down properly. Now, each programmer cleans up after itself and (hopefully)
      performs each operation in the correct order.
      
      As a side-effect, this patch gives us a better usage model for reverse
      operations such as rpci_* and rmmio_*. In the long-run, this should make
      reversing the initialization process easier to understand, less tedious, and
      less error-prone.
      
      In short, this patch does the following:
      - Registers a shutdown callback during initialization for each programmer.
      - Kills the .shutdown function pointer from programmer_entry struct. Also,
        make most shutdown functions static.
      - Adds a few minor clean-ups and corrections (e.g. missing physunmap() calls).
      
      TODO: Remove forward declaration of serprog_shutdown() (added to simplify diff)
      
      Corresponding to flashrom svn r1338.
      Signed-off-by: default avatarDavid Hendricks <dhendrix@google.com>
      Acked-by: default avatarCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
      8bb2021d
  16. 18 May, 2011 1 commit
  17. 11 May, 2011 1 commit
    • Michael Karcher's avatar
      Kill central list of SPI programmers · b9dbe48b
      Michael Karcher authored
      
      Remove the array spi_programmer, replace it by dynamic registration
      instead. Also initially start with no busses supported, and switch to
      the default non-SPI only for the internal programmer.
      
      Also this patch changes the initialization for the buses_supported variable
      from "everything-except-SPI" to "nothing". All programmers have to set the
      bus type on their own, and this enables register_spi_programmer to just add
      the SPI both for on-board SPI interfaces (where the internal programmer
      already detected the other bus types), as well as for external programmers
      (where we have the default "none").
      
      Corresponding to flashrom svn r1299.
      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>
      b9dbe48b
  18. 03 May, 2011 1 commit
  19. 07 Mar, 2011 1 commit
  20. 05 Oct, 2010 1 commit
  21. 15 Sep, 2010 1 commit
    • Carl-Daniel Hailfinger's avatar
      SPI bitbanging: request/release bus · 2822888c
      Carl-Daniel Hailfinger authored
      
      SPI bitbanging on devices which speak SPI natively has a dual-use
      problem: We need to shut down normal SPI operations to do the bitbanging
      ourselves. Once we're done, it makes a lot of sense to reenable "normal"
      SPI operations again. Add request_bus/release_bus functions to struct
      bitbang_spi_master.
      Add a bitbang shutdown function (not used yet).
      Change MCP SPI and Intel NIC SPI to use the new request/release bus
      infrastructure.
      Cosmetic changes to a few error messages (80 column limit).
      
      There are multiple possible strategies for bus request/release:
      - Request at the start of a SPI command, release immediately afterwards.
      - Request at the start of a SPI multicommand, release once all commands
      of the multicommand are done.
      - Request on programmer init, release on shutdown.
      Each strategy has its own advantages. For now, we will stay with the
      first strategy which worked fine so far.
      
      Corresponding to flashrom svn r1171.
      Signed-off-by: default avatarCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
      Acked-by: default avatarUwe Hermann <uwe@hermann-uwe.de>
      2822888c
  22. 03 Sep, 2010 1 commit
    • Idwer Vollering's avatar
      Add Intel Gigabit NIC SPI flashing support · 004f4b79
      Idwer Vollering authored
      
      Tested on a 82541PI (0x8086, 0x107c) using 32-bit hardware.
      
      The last line in nicintel_request_spibus() could be changed so that FL_BUSY
      is used instead.
      
      Shortened sample log:
      [...]
      Found "Intel 82541PI Gigabit Ethernet Controller" (8086:107c, BDF 01:03.0).
      Found chip "ST M25P10.RES" (128 KB, SPI) at physical address 0xfffe0000.
      Multiple flash chips were detected: M25P05.RES M25P10.RES
      Please specify which chip to use with the -c <chipname> option.
      [...]
      
      Corresponding to flashrom svn r1151.
      Signed-off-by: default avatarIdwer Vollering <vidwer@gmail.com>
      Acked-by: default avatarUwe Hermann <uwe@hermann-uwe.de>
      004f4b79