summaryrefslogtreecommitdiffstats
path: root/libopenbmc_intf
Commit message (Collapse)AuthorAgeFilesLines
* GPIO abstraction for power and host controlLei YU2017-01-122-55/+113
| | | | | | | | | | | | | | | | | | | | In libopenbmc_intf/power_gpio.c there are GPIO abstractions for power related GPIOs. Host control related GPIOs need to do the same abstraction. The changes include: 1. Add host control related GPIOs in gpio_configs and update system_manager.py 2. Update control_host_obj.c to use the abstracted GPIOs 3. Update GPIO_CONFIGS for all machines and add host control related GPIOs power_gpio will be renamed to gpio_configs in next commit; Resolves openbmc/openbmc#814 Change-Id: I7832065d495d7d64c5df2f5b177005b97e68900a Signed-off-by: Lei YU <mine260309@gmail.com>
* Initialize GError* to NULL before calling g_dbus_proxy_new_synLei YU2016-11-191-1/+1
| | | | | | | | | | | | This fixes the crash issue of power_control when manually build and replace executable or library. The reason why it does not crash on a full OpenBMC build may be due to the prelink clear the stack (not sure). Fixes openbmc/openbmc#818. Change-Id: I17b0e2188ebe14815d67a7f07eba4906bde75e3c Signed-off-by: Lei YU <mine260309@gmail.com>
* op-pwrctl: Hold PCI resets until BootProgress passes BASE_INITIALIZATION stateYi Li2016-11-182-2/+37
| | | | | | | | | | | | When powering on host, hold PCI resets until hostboot passes stage "BASE_INITIALIZATION"(0x14). This fix applies to Firestone and Garrison. Partially resolves openbmc/openbmc#315 Change-Id: Ic71c81406ac188b34df89569e2264ea0b94406f3 Signed-off-by: Yi Li <adamliyi@msn.com>
* Add IPMI 2.0 ColdReset command supportNan Li2016-11-013-17/+174
| | | | | | | | | | * Implement reset by reboot command issued in a shell * Work with related changes in phosphor-host-ipmid repo Resolves openbmc/openbmc#437 Change-Id: I8143b1ee9c0d547ee47e5bd3659a5126b6e5af98 Signed-off-by: Nan Li <william.bjlinan@hotmail.com>
* pwrctl: Add latch output to power controlXo Wang2016-10-042-2/+10
| | | | | | | | | | | | On the Zaius machine, the BMC signals that power up the CPU are gated by a latch to protect against GPIO blips during BMC reset/power loss. This adds an optional power GPIO configuration that controls the latch's enable pin. Its behavior is to assert high when the op-pwrctl runs, allowing power_up lines to propagate past their latches. Signed-off-by: Xo Wang <xow@google.com> Change-Id: Ibf0d1db771033cb9bba82575cca1bd21cfb3ad3d
* system_manager, libobmc-intf: Add power GPIO configuration interfaceXo Wang2016-10-043-2/+170
| | | | | | | | | | | | | This adds a dbus call (in org.openbmc.managers.System) and C binding (in libopenbmc-intf) to read a POWER_CONFIG from the Python system configuration that abstracts GPIO functionality (power good, reset, etc) from their net names in GPIO_CONFIG. This should eventually replace machine-specific patches to op-pwrctl that define their own power and reset lines. Change-Id: I56eaaf60ef852b68124e4a765942243ad17d06ac Signed-off-by: Xo Wang <xow@google.com>
* gpio: Avoid glitching 'out'-direction GPIOsPatrick Williams2016-08-241-3/+21
| | | | | Change-Id: I42dafd3235d13ec57f7b15e043bc3fe82fdb4665 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* gpio: Fix sprintf to uninitialized pointerPatrick Williams2016-08-241-1/+3
| | | | | Change-Id: Ife1759b1533b37e0a8c94748334ea2c5f02ba873 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* gpio: Clean trailing whitespacePatrick Williams2016-08-241-6/+6
| | | | | Change-Id: I359e5bab739e3b029a3331b0acfbf54e8db1120c Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* libopenbmc_intf: Fix non-arm devmem implementationJoel Stanley2016-06-291-1/+1
| | | | | | | | | | Fixes the following error: In file included from button_reset_obj.c:4:0: ../libopenbmc_intf/openbmc.h:39:15: error: return type defaults to ‘int’ [-Werror=implicit-int] static inline devmem(uint32_t val, uint32_t reg) Signed-off-by: Joel Stanley <joel@jms.id.au>
* libopenbmc_intf rules simplificationBrad Bishop2016-06-271-18/+25
| | | | | | | | | Don't use rules.mk for libopenbmc_intf. There isn't enough overlap here to warrant the extra complexity. Fix an issue where the library is rebuilt for every make invocation. Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Create a libopenbmc_intf symlinkBrad Bishop2016-06-271-0/+2
| | | | | | | | | Create a libopenbmc_intf symlink in the build target to enable things like: -L ../libopenbmc_intf -lopenbmc_intf Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Update and run libopenbmc_intf codegenBrad Bishop2016-06-272-4/+4
| | | | | | | Update codegen to reflect new path xml/output locations. Run updated codegen. Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Move libopenbmc_intf codegen/xmlBrad Bishop2016-06-274-2/+36726
| | | | | | To the libopenbmc_intf directory. Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* libopenbmc_intf include path updateBrad Bishop2016-06-272-2/+1
| | | | | | | | | Remove the interfaces prefix from applications including openbmc_intf.h. Use brackets rather than quotes in prep for a libopenbmc_intf SDK package. Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Add force link option to install targetBrad Bishop2016-06-271-1/+1
| | | | | | This allows 'make install' to be invoked more than once. Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Add install-headers targetBrad Bishop2016-06-271-1/+6
| | | | | | | Install the libopenbmc_intf includes in prep for a devel package. Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Enable user-overriable CFLAGSBrad Bishop2016-06-211-2/+2
| | | | | | | | | Put required CFLAGS (ie pkg-config --cflags) in ALL_CFLAGS and append user specified CFLAGS to that. Use CFLAGS during link. Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Reorganize directory structureBrad Bishop2016-06-106-0/+349
Moving to directory per-application layout. This facilitates building single applications which is useful in the Yocto build environment since different applications satisfy different OpenBMC build requirements. A number of issues are also addressed: - All applications were pulling in libsystemd and the gdbus libs irrespective of whether or not they were needed. - gpio.o duplicated in every application - moved to libopenbmc_intf - Added install target Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
OpenPOWER on IntegriCloud