cfam-reset: utilize new sysfs interface if avaialble

The kernel introduced support on some systems for a sysfs based
mechanism to issue cfam resets. See the following commit for more
information:
https://github.com/openbmc/linux/commit/0298c9857e284aae7841a31c2a6cd3954afec6c9

Userspace software should first look to utilize the new sysfs based
mechanism and if not available, fall back to the libgpiod mechanism.

Currently only witherspoon-tacoma and rainier support this new sysfs
based cfam reset mechanism.

Tested:
- Built a witherspoon image and verified libgpiod path was used
- Built a witherspoon-tacoma and verified new sysfs path was used

Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Change-Id: I3a99899cb7d46a878a62c93954c59b7853c2b759
1 file changed
tree: 1d946ba2bb7c0323df8b2cc5266016de1dbc4ff5
  1. phalerror/
  2. procedures/
  3. test/
  4. .clang-format
  5. .gitignore
  6. bootstrap.sh
  7. cfam_access.cpp
  8. cfam_access.hpp
  9. configure.ac
  10. ext_interface.cpp
  11. ext_interface.hpp
  12. filedescriptor.cpp
  13. filedescriptor.hpp
  14. gen_makefile.sh
  15. LICENSE
  16. MAINTAINERS
  17. Makefile.am
  18. Makefile.generated.in
  19. nmi_interface.cpp
  20. nmi_interface.hpp
  21. nmi_main.cpp
  22. op-cfam-reset.service.in
  23. op-continue-mpreboot@.service.in
  24. op-enter-mpreboot@.service.in
  25. op-stop-instructions@.service.in
  26. p10_cfam.hpp
  27. p9_cfam.hpp
  28. pcie-poweroff@.service.in
  29. proc_control.cpp
  30. README.md
  31. registration.cpp
  32. registration.hpp
  33. set-spi-mux.service.in
  34. targeting.cpp
  35. targeting.hpp
  36. xyz.openbmc_project.Control.Host.NMI.service.in
README.md

Contains procedures that interact with the OpenPower nest chipset.

To Build

To build this package, do the following steps:

    1. ./bootstrap.sh
    2. ./configure ${CONFIGURE_FLAGS}
    3. make

To build with phal feature:
    1. ./bootstrap.sh
    2. ./configure ${CONFIGURE_FLAGS} --enable-phal --enable-openfsi
    3. make

To clean the repository run `./bootstrap.sh clean`.