1. 23 Jul, 2015 1 commit
  2. 30 Jun, 2015 1 commit
    • Adam Wujek's avatar
      wrs_main: check for stack overflow and detect reset · da3da2d9
      Adam Wujek authored
      Add checking stack overflow and detecting reset to wrs. Code common for wrpc
      and wrs is placed in system_checks.c and .h. Work is based on following
      commits in wrc_main.c:
      1704a668 main: check for stack overflow
      7836c39e Optionally detect reset and print a stack trace
      
      Additionally:
      --update Kconfig to have a possibility to select CHECK_RESET also for switch,
        not only for node as before
      --and _endram to ram-wrs.ld
      
      When "stack overflow" occurs then message is printed once every second.
      When reset occours then LM32 will print stack trace and reset once more.
      NOTE: I couldn't get spll to work after reset, for sure problem is in
            ad9516 init function, but not only there.
      Signed-off-by: Adam Wujek's avatarAdam Wujek <adam.wujek@cern.ch>
      da3da2d9
  3. 08 Jan, 2015 2 commits
  4. 06 Jan, 2015 7 commits
  5. 18 Nov, 2014 1 commit
    • Alessandro Rubini's avatar
      eeprom: rename "present" to "init" · ab8e3c9c
      Alessandro Rubini authored
      eeprom_present() returned a value nobody used. Rename to eeprom_init()
      instead. Also, save the two parameters so that they are not needed
      in other functions (see later commits).
      
      Also, turn int8_t to int as function arguments (int is better for the
      CPU).
      
      This adds 20 bytes to the legacy case, and removes 4 to the sdb case.
      The legacy size is reduced by later commits.
      Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
      ab8e3c9c
  6. 05 Aug, 2014 1 commit
  7. 12 Feb, 2014 1 commit
  8. 06 Feb, 2014 2 commits
  9. 17 Oct, 2013 1 commit
  10. 11 Oct, 2013 2 commits
  11. 14 May, 2013 1 commit
  12. 09 May, 2013 1 commit
  13. 08 May, 2013 1 commit
    • Alessandro Rubini's avatar
      general: improve sw-uart support (only for expert config). · 992dc8d7
      Alessandro Rubini authored
      This commits affect several files, to be able to support both uart and
      uart_sw at the same time. My aim is sending verbose ppsi diagnostics
      to the uart_sw while retaining the real uart (or vuart) for the
      interactive user and wrpc status gui.
      
      To this aim, I use weak functions to avoid hairy ifdef around the code.
      Now both hw and sw uarts are initialized, and the missing init just
      does nothing. Also, uart_sw_write_string is always defined, and
      it is an alias of uart_write_string if no uart_sw is built.
      Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
      992dc8d7
  14. 26 Apr, 2013 1 commit
  15. 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
      lib: add usleep.c (and call its own init from main) · 3497d157
      Alessandro Rubini authored
      This adds a real usleep implementation. The init function calculates
      the "loops per jiffy" variable, by watching the timer ticks before
      interrupts are enabled by spll_init().  This init takes 40ms.
      
      Then, the udelay runs the same loop used in calculating lpj, and
      is thus correct (it will be slower because we have interrupts running
      at run time, but this is not a problem).
      Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
      3497d157
  16. 26 Mar, 2013 1 commit
    • Alessandro Rubini's avatar
      Optionally detect reset and print a stack trace · 7836c39e
      Alessandro Rubini authored
      The new configuation option CONFIG_CHECK_RESET adds a function to dump
      the stack (to the serial port) if a reset is detected. This happens
      when a null pointer is followed or when the program is reloaded
      (spec-sw/tools/spec-cl, for example).  For this reason, the feature is
      disabled by default (actually, spec-cl may clear the RAM first, but it
      currently doesn't do that and the check is triggered).
      Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
      7836c39e
  17. 22 Mar, 2013 1 commit
  18. 12 Mar, 2013 1 commit
  19. 14 Feb, 2013 1 commit
  20. 05 Dec, 2012 1 commit
  21. 21 Nov, 2012 2 commits
  22. 01 Nov, 2012 3 commits
    • Alessandro Rubini's avatar
      general: add copyright notes · 394d1405
      Alessandro Rubini authored
      This adds copyright notes to all non-trivial source files,
      unless they where already there (i.e. dev/endpoint.c alone).
      
      I found authorship using the following script, run on commit "a2721762
      documentation updated" (i.e, before automatic reindentation and other
      trivial stuff by me):
      
        git grep -l . | grep -v sockitowm/ | \
        while read F; do
             echo "##### $F"
             git blame -w $F | \
               sed -e 's/^[^ ]* .//' -e 's/-[0-9][0-9]-[0-9][0-9] .*$//' | \
               sort | uniq -c | sort -rn
        done
      
      Then I augmented each file with this boilerplate:
      
      /*
       * This work is part of the White Rabbit project
       *
       * Copyright (C) 2011 CERN (www.cern.ch)
       * Copyright (C) 2011,2012 CERN (www.cern.ch)
       * Copyright (C) 2012 CERN (www.cern.ch)
       * Copyright (C) 2011 GSI (www.gsi.de)
       * Copyright (C) 2011,2012 GSI (www.gsi.de)
       * Copyright (C) 2012 GSI (www.gsi.de)
       * Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
       * Author: Grzegorz Daniluk <grzegorz.daniluk@cern.ch>
       * Author: Wesley W. Terpstra <w.terpstra@gsi.de>
       *
       * Released according to the GNU GPL, version 2 or any later version.
       */
      
      Then I removed all the lines that didn't apply. Sometimes I reordered
      the authors to reflect who is the main author.
      Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
      394d1405
    • Alessandro Rubini's avatar
      warnings: final clean up of wrc_main.c · 21e79aed
      Alessandro Rubini authored
      When I add prototypes to headers, I ensure the source that
      defines the function sees the header, to detect inconsistencies
      (here, I add <wrc.h> to the includes).
      Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
      21e79aed
    • Alessandro Rubini's avatar
      warnings: various things to clean wrc_main.c · 1459a6d5
      Alessandro Rubini authored
      This adds all missing prototypes and removes unused variables.
      It includes a generic <wrc.h> (which btw includes the printf
      prototype, not in uart.h any more) and other needed bits.
      Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
      1459a6d5
  23. 16 Oct, 2012 1 commit
  24. 05 Oct, 2012 2 commits
    • Alessandro Rubini's avatar
      Run ./scripts/Lindent on all .c and .h files · e625cbd9
      Alessandro Rubini authored
      This is massive: 4k lines changed (but only 840 if you ignore
      space-only changes).  In this case "git blame -w" won't always find
      the right patch, and it may fall on this patch -- because those
      800 lines changed in content too.
      
      This has been done with
      
         find . -name '*.[ch]' | xargs -n 1 ./scripts/Lindent
      
      Statistics: all changes and ignoring blank space:
      
         morgana% git diff --stat HEAD~1 | tail -1
          77 files changed, 3774 insertions(+), 3709 deletions(-)
         morgana% git diff -w --stat HEAD~1 | tail -1
          61 files changed, 894 insertions(+), 829 deletions(-)
      
      However, after this step I hand-fixed some very ugly long expressions
      (leaving them long: no content change at all is there).
      Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
      e625cbd9
    • Alessandro Rubini's avatar
      Remove all spaces at end-of-line · 1d24ecfb
      Alessandro Rubini authored
      If you find this patch with "git blame" please use "git blame -w"
      to have all white-space ignored while associating lines to commits.
      
      This commit has no practical effect but cleanup. I made it
      with sed like this:
      
        git grep -l '[ \t]$' | xargs sed -i 's/[ \t]*$//'
      
      However, I had to manually restore doc/wrpc_mon.png after the fact.
      Similarly, I restored the include/hw/*regs.h files, as they
      are (most likely) auto-generated.
      1d24ecfb
  25. 26 Sep, 2012 1 commit
  26. 10 Aug, 2012 1 commit