diff options
author | Doug Gilbert <dgilbert@us.ibm.com> | 2014-05-16 15:16:15 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2014-06-30 20:08:27 -0500 |
commit | 11d47db77ef4d118c75e9e23ad8c4ca9663d0fff (patch) | |
tree | dc0e09e93de108dc2cf44ef69d2688f7ab40944c /src/include | |
parent | 61a956f980a4be2f19d33067236018e7efd074e7 (diff) | |
download | blackbird-hostboot-11d47db77ef4d118c75e9e23ad8c4ca9663d0fff.tar.gz blackbird-hostboot-11d47db77ef4d118c75e9e23ad8c4ca9663d0fff.zip |
Merge GPIO commits from Stradale code base
Change-Id: Ibadeb72f563d86aa933734c7db20a50b19485ac7
RTC: 97490
Origin: Google Shared Technology
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/11501
Tested-by: Jenkins Server
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/usr/devicefw/userif.H | 16 | ||||
-rw-r--r-- | src/include/usr/gpio/gpioddreasoncodes.H | 57 | ||||
-rw-r--r-- | src/include/usr/gpio/gpioif.H | 42 | ||||
-rw-r--r-- | src/include/usr/hbotcompid.H | 11 | ||||
-rw-r--r-- | src/include/usr/hwpf/hwpf_reasoncodes.H | 8 | ||||
-rw-r--r-- | src/include/usr/isteps/istep12list.H | 5 | ||||
-rw-r--r-- | src/include/usr/isteps/istep13list.H | 5 |
7 files changed, 138 insertions, 6 deletions
diff --git a/src/include/usr/devicefw/userif.H b/src/include/usr/devicefw/userif.H index df66190d1..0e2497e48 100644 --- a/src/include/usr/devicefw/userif.H +++ b/src/include/usr/devicefw/userif.H @@ -5,7 +5,10 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 2011,2014 */ +/* Contributors Listed Below - COPYRIGHT 2011,2014 */ +/* [+] Google Inc. */ +/* [+] International Business Machines Corp. */ +/* */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ @@ -54,7 +57,7 @@ namespace DeviceFW CVPD, SCAN, EEPROM, - + GPIO, LAST_ACCESS_TYPE, }; @@ -149,6 +152,15 @@ namespace DeviceFW static_cast<uint64_t>(( i_offset )) /** + * Construct the device addressing paramters for the GPIO port extender ops + * @param[in] i_gpio_num - The port extender device type. + * @param[in] i_gpio_pin = The GPIO port address + */ + #define DEVICE_GPIO_ADDRESS( i_device_type , i_gpio_portAddr) \ + DeviceFW::GPIO, static_cast<uint64_t>(( i_device_type )),\ + static_cast<uint64_t>(( i_gpio_portAddr )) + + /** * @brief Perform a hardware read operation. * * @param[in] i_target Device target to operate on. diff --git a/src/include/usr/gpio/gpioddreasoncodes.H b/src/include/usr/gpio/gpioddreasoncodes.H new file mode 100644 index 000000000..20ad10002 --- /dev/null +++ b/src/include/usr/gpio/gpioddreasoncodes.H @@ -0,0 +1,57 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/include/usr/gpio/gpioddreasoncodes.H $ */ +/* */ +/* OpenPOWER HostBoot Project */ +/* */ +/* Contributors Listed Below - COPYRIGHT 2014 */ +/* [+] Google Inc. */ +/* [+] International Business Machines Corp. */ +/* */ +/* */ +/* Licensed under the Apache License, Version 2.0 (the "License"); */ +/* you may not use this file except in compliance with the License. */ +/* You may obtain a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, */ +/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */ +/* implied. See the License for the specific language governing */ +/* permissions and limitations under the License. */ +/* */ +/* IBM_PROLOG_END_TAG */ +#ifndef __GPIODDREASONCODES_H +#define __GPIODDREASONCODES_H + +#include <hbotcompid.H> +namespace GPIO +{ + /** + * @enum gpioModuleid + * + * @brief Module Ids used in creating errorlogs. + */ + enum gpioModuleId + { + GPIO_PERFORM_OP = 0x00, + GPIO_READ = 0x01, + GPIO_WRITE = 0x02, + GPIO_READATTRIBUTES = 0x03, + }; + + /** + * @enum grioReasonCode + */ + enum gpioReasonCode + { + GPIO_INVALID_DEVICE_TYPE = GPIO_COMP_ID | 0x00, + GPIO_ATTR_INFO_NOT_FOUND = GPIO_COMP_ID | 0x01, + GPIO_I2C_TARGET_NOT_FOUND = GPIO_COMP_ID | 0x02, + GPIO_INVALID_OP = GPIO_COMP_ID | 0x03, + }; + +}; +#endif diff --git a/src/include/usr/gpio/gpioif.H b/src/include/usr/gpio/gpioif.H new file mode 100644 index 000000000..03a5a9a89 --- /dev/null +++ b/src/include/usr/gpio/gpioif.H @@ -0,0 +1,42 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/include/usr/gpio/gpioif.H $ */ +/* */ +/* OpenPOWER HostBoot Project */ +/* */ +/* Contributors Listed Below - COPYRIGHT 2014 */ +/* [+] Google Inc. */ +/* [+] International Business Machines Corp. */ +/* */ +/* */ +/* Licensed under the Apache License, Version 2.0 (the "License"); */ +/* you may not use this file except in compliance with the License. */ +/* You may obtain a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, */ +/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */ +/* implied. See the License for the specific language governing */ +/* permissions and limitations under the License. */ +/* */ +/* IBM_PROLOG_END_TAG */ +#ifndef __GPIOIF_H +#define __GPIOIF_H + +namespace GPIO +{ +/** + * @brief Devices to be accessed + */ +enum gpioDevice_t +{ + PCA95X_GPIO = 0, + INVALID_GPIO, +}; + + +}; // GPIO NAMESPACE +#endif diff --git a/src/include/usr/hbotcompid.H b/src/include/usr/hbotcompid.H index ec9b3836f..7b610e99c 100644 --- a/src/include/usr/hbotcompid.H +++ b/src/include/usr/hbotcompid.H @@ -5,7 +5,10 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 2011,2014 */ +/* Contributors Listed Below - COPYRIGHT 2011,2014 */ +/* [+] Google Inc. */ +/* [+] International Business Machines Corp. */ +/* */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ @@ -315,6 +318,12 @@ const compId_t SBE_COMP_ID = 0x2200; const char SBE_COMP_NAME[] = "sbe"; //@} +/** @name GPIO + * General Purpose IO device + */ +const compId_t GPIO_COMP_ID = 0x2300; +const char GPIO_COMP_NAME[] = "gpio"; +//@} /** @name RESERVED * Reserved component ID. x3100 is the component ID diff --git a/src/include/usr/hwpf/hwpf_reasoncodes.H b/src/include/usr/hwpf/hwpf_reasoncodes.H index 8533dab0a..d700cf857 100644 --- a/src/include/usr/hwpf/hwpf_reasoncodes.H +++ b/src/include/usr/hwpf/hwpf_reasoncodes.H @@ -5,7 +5,10 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 2013,2014 */ +/* Contributors Listed Below - COPYRIGHT 2013,2014 */ +/* [+] Google Inc. */ +/* [+] International Business Machines Corp. */ +/* */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ @@ -67,6 +70,7 @@ namespace fapi MOD_HOST_COALESCE_HOST = 0x1C, MOD_ATTR_OVERRIDE = 0x1D, MOD_PLAT_SPECIAL_WAKEUP = 0x1E, + MOD_PLAT_EN_VDDR = 0x1F, }; @@ -120,6 +124,8 @@ namespace fapi RC_RT_WAKEUP_FAILED = HWPF_COMP_ID | 0x2D, RC_NO_MIRRORED_MEMORY = HWPF_COMP_ID | 0x2E, + RC_VDDR_INVALID_VOLTAGE = HWPF_COMP_ID | 0x2F, + RC_TIMEOUT_EN_VDDR = HWPF_COMP_ID | 0x30, }; /** diff --git a/src/include/usr/isteps/istep12list.H b/src/include/usr/isteps/istep12list.H index 3d4efe9f7..7ba93a505 100644 --- a/src/include/usr/isteps/istep12list.H +++ b/src/include/usr/isteps/istep12list.H @@ -5,7 +5,10 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 2012,2014 */ +/* Contributors Listed Below - COPYRIGHT 2012,2014 */ +/* [+] Google Inc. */ +/* [+] International Business Machines Corp. */ +/* */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ diff --git a/src/include/usr/isteps/istep13list.H b/src/include/usr/isteps/istep13list.H index 45557d9cd..842ac6c5e 100644 --- a/src/include/usr/isteps/istep13list.H +++ b/src/include/usr/isteps/istep13list.H @@ -5,7 +5,10 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 2012,2014 */ +/* Contributors Listed Below - COPYRIGHT 2012,2014 */ +/* [+] Google Inc. */ +/* [+] International Business Machines Corp. */ +/* */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ |