1. 13 May, 2013 3 commits
    • Alessandro Rubini's avatar
      w1: complete eeprom low-level support · d44ace7e
      Alessandro Rubini authored
      This completes w1-eeproom.c with the complete API. The provided test
      commands allow to read and write any size at any offset (the low-level
      code manages cross-page reads and writes. The following examples
      modify a pre-written eeprom, which I host in an external socket of
      my SPEC card:
      
         wrc# w1r 0 4
         read(0x0, 4): result = 4
         offset    0 (0x000): 240 (0xf0)
         offset    1 (0x001): 241 (0xf1)
         offset    2 (0x002): 242 (0xf2)
         offset    3 (0x003): 243 (0xf3)
      
         wrc# w1w 0 40 41 42
         offset    0 (0x000):  40 (0x28)
         offset    1 (0x001):  41 (0x29)
         offset    2 (0x002):  42 (0x2a)
         write(0x0, 3): result = 3
      
         wrc# w1r 0 4
         read(0x0, 4): result = 4
         offset    0 (0x000):  40 (0x28)
         offset    1 (0x001):  41 (0x29)
         offset    2 (0x002):  42 (0x2a)
         offset    3 (0x003): 243 (0xf3)
      
         wrc# w1r 30 4
         read(0x1e, 4): result = 4
         offset   30 (0x01e):  69 (0x45)
         offset   31 (0x01f):  70 (0x46)
         offset   32 (0x020):  71 (0x47)
         offset   33 (0x021):  72 (0x48)
      
         wrc# w1w 30 11 22 33 44 55 66
         offset   30 (0x01e):  11 (0x0b)
         offset   31 (0x01f):  22 (0x16)
         offset   32 (0x020):  33 (0x21)
         offset   33 (0x021):  44 (0x2c)
         offset   34 (0x022):  55 (0x37)
         offset   35 (0x023):  66 (0x42)
         write(0x1e, 6): result = 6
      
         wrc# w1r 30 6
         read(0x1e, 6): result = 6
         offset   30 (0x01e):  11 (0x0b)
         offset   31 (0x01f):  22 (0x16)
         offset   32 (0x020):  33 (0x21)
         offset   33 (0x021):  44 (0x2c)
         offset   34 (0x022):  55 (0x37)
         offset   35 (0x023):  66 (0x42)
      Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
      d44ace7e
    • Alessandro Rubini's avatar
      e039c343
    • Aurelio Colosimo's avatar
  2. 09 May, 2013 5 commits
  3. 08 May, 2013 10 commits
  4. 06 May, 2013 8 commits
  5. 03 May, 2013 1 commit
    • Cesar Prados's avatar
      Makefile: change to support gmake-3.82 · 152111a8
      Cesar Prados authored
      Split a rule into two rules, to make make happy.
      
      In previous versions of make it was acceptable to list one or more
      explicit targets followed by one or more pattern targets in the same
      rule and it worked "as expected". However, this was not documented as
      acceptable and if you listed any explicit targets AFTER the pattern
      targets, the entire rule would be mis-parsed. This release removes
      this ability completely: make will generate an error message if you
      mix explicit and pattern targets in the same rule. You must split
      these rules into two rules: one for the pattern and one for the
      explicit targets. The Linux kernel source has already been modified in
      this way (in newer kernels).
      152111a8
  6. 26 Apr, 2013 6 commits
  7. 24 Apr, 2013 1 commit
  8. 23 Apr, 2013 1 commit
  9. 09 Apr, 2013 1 commit
  10. 04 Apr, 2013 2 commits
  11. 03 Apr, 2013 2 commits
    • Alessandro Rubini's avatar
      onewire: Kconfig choice between w1 and sockitowm · ad2efece
      Alessandro Rubini authored
      This adds the build choice about whether to use the older sockitowm or
      the new "w1" implementation, which supports all three thermometers
      but is still missing eeprom support (the API is defined, though, see
      include/w1.h
      
      This also adds a shell command, called "w1", which rescans the bus and
      tries to read the temperature from all devices. In the example below
      the third device is an eeprom, so it return an error for temperature
      read-out.
      
         wrc# w1
         W1: 68000801dce56910
         W1: f70000001eda8242
         W1: 5f00000040e50143
         device 0: 68000801dce56910
         temp: 34.7500
         device 1: f70000001eda8242
         temp: 32.5000
         device 2: 5f00000040e50143
         temp: -32768.0000
      
      The code is properly integrated in wrpc-sw, and the "first" thermometer is
      used to build the MAC address of the device, like it used to be with
      sockitowm.
      
      The binary built with w1 is 3kB smaller than what is build with sockitowm.
      Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
      ad2efece
    • Alessandro Rubini's avatar
      w1: files for new onewire implementation (not built) · bab55a8a
      Alessandro Rubini authored
      This adds the files for an alternative to sockitowm. I called it "w1"
      like in the Linux kernel, because "onewire" was already in use as file
      name in this project.
      
      The bus scanning code was a fun project of mine a few years ago, the
      rest is what I did for my own crappy operating system in the last few
      days.  This commit adds the files as modified to build in wrpc-sw, since
      I have no "official" Bathos files yet to diff against.
      
      This commit doesn't change the build, only adds the file, so actual
      changes to existing code is all part of the next (smaller) commit.
      Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
      bab55a8a