1. 17 May, 2009 1 commit
    • Carl-Daniel Hailfinger's avatar
      Use accessor functions for MMIO · 78185dcb
      Carl-Daniel Hailfinger authored
      
      Some MMIO accesses used volatile, others didn't (and risked
      non-execution of side effects) and even with volatile, some accesses
      looked dubious.
      
      Since the MMIO accessor functions and the onboard flash accessor
      functions are functionally identical (but have different signatures),
      make the flash accessors wrappers for the MMIO accessors.
      
      For some of the conversions, I used Coccinelle. Semantic patch follows:
      
      @@ typedef uint8_t; expression a; volatile uint8_t *b; @@ - b[a] + *(b
      + a) @@ expression a; volatile uint8_t *b; @@ - *(b) |= (a); + *(b) =
      *(b) | (a); @@ expression a; volatile uint8_t *b; @@ - *(b) = (a); +
      mmio_writeb(a, b); @@ volatile uint8_t *b; @@ - *(b) + mmio_readb(b) @@
      type T; T b; @@ ( mmio_readb | mmio_writeb ) (..., - (T) - (b) + b )
      
      Corresponding to flashrom svn r524.
      Signed-off-by: default avatarCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
      
      Uwe tested read, write, erase with this patch on a random board to make
      sure nothing breaks.
      Acked-by: default avatarUwe Hermann <uwe@hermann-uwe.de>
      78185dcb
  2. 16 May, 2009 7 commits
  3. 15 May, 2009 3 commits
  4. 14 May, 2009 8 commits
  5. 13 May, 2009 7 commits
  6. 12 May, 2009 2 commits
  7. 11 May, 2009 5 commits
  8. 10 May, 2009 1 commit
    • Carl-Daniel Hailfinger's avatar
      Create a SB600 SPI detection heuristic · dbfa0291
      Carl-Daniel Hailfinger authored
      
      I know that the data sheets say we can't read the ROM straps, but
      creative interpretation of the data sheets yielded a heuristic which
      should work pretty well.
      
      NOTE: If you test this, make sure you power down and _unplug_ the
      machine for a few minutes before you boot and run flashrom with this
      patch.
      If the machine is not unplugged for some time, the test will yield
      incorrect results.
      If you run a slightly older flashrom version than svn HEAD, the test
      will yield incorrect results.
      If you run any flashrom version (except svn HEAD plus this patch) after
      poweron, the test will yield incorrect results.
      
      Explanation:
      Older flashrom versions unconditionally write to registers which are
      used for this heuristic. These registers are in the S5 power domain, so
      even powering down does not clear them, you really have to unplug the
      machine and remove the battery if this is a laptop.
      
      Corresponding to flashrom svn r491.
      Signed-off-by: default avatarCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
      Acked-by: default avatarStefan Reinauer <stepan@coresystems.de>
      dbfa0291
  9. 09 May, 2009 6 commits