From 3144017073c6a7d237ed6d6ea6eb6839349d321f Mon Sep 17 00:00:00 2001 From: Brad Bishop Date: Fri, 23 Sep 2016 08:48:14 -0400 Subject: firestone/garrison: fix build break Firestone & Garrison systems weren't building after a6bd1e. Change-Id: Ida8deaf8d5d00b1c5df16ab9b0410ca6f2b17cb6 Signed-off-by: Brad Bishop --- .../obmc-op-control-power.bbappend | 2 + ...r-control-support-for-the-Garrison-system.patch | 1 + .../recipes-phosphor/skeleton/skeleton.bbappend | 2 - ...r-control-support-for-the-Garrison-system.patch | 1 - .../obmc-op-control-power.bbappend | 2 + ...r-control-support-for-the-Garrison-system.patch | 128 +++++++++++++++++++++ .../recipes-phosphor/skeleton/skeleton.bbappend | 2 - ...r-control-support-for-the-Garrison-system.patch | 128 --------------------- 8 files changed, 133 insertions(+), 133 deletions(-) create mode 100644 meta-openbmc-machines/meta-openpower/meta-ibm/meta-firestone/recipes-phosphor/obmc-op-control-power/obmc-op-control-power.bbappend create mode 120000 meta-openbmc-machines/meta-openpower/meta-ibm/meta-firestone/recipes-phosphor/obmc-op-control-power/obmc-op-control-power/0001-Add-power-control-support-for-the-Garrison-system.patch delete mode 100644 meta-openbmc-machines/meta-openpower/meta-ibm/meta-firestone/recipes-phosphor/skeleton/skeleton.bbappend delete mode 120000 meta-openbmc-machines/meta-openpower/meta-ibm/meta-firestone/recipes-phosphor/skeleton/skeleton/0001-Add-power-control-support-for-the-Garrison-system.patch create mode 100644 meta-openbmc-machines/meta-openpower/meta-ibm/meta-garrison/recipes-phosphor/obmc-op-control-power/obmc-op-control-power.bbappend create mode 100644 meta-openbmc-machines/meta-openpower/meta-ibm/meta-garrison/recipes-phosphor/obmc-op-control-power/obmc-op-control-power/0001-Add-power-control-support-for-the-Garrison-system.patch delete mode 100644 meta-openbmc-machines/meta-openpower/meta-ibm/meta-garrison/recipes-phosphor/skeleton/skeleton.bbappend delete mode 100644 meta-openbmc-machines/meta-openpower/meta-ibm/meta-garrison/recipes-phosphor/skeleton/skeleton/0001-Add-power-control-support-for-the-Garrison-system.patch (limited to 'meta-openbmc-machines') diff --git a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-firestone/recipes-phosphor/obmc-op-control-power/obmc-op-control-power.bbappend b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-firestone/recipes-phosphor/obmc-op-control-power/obmc-op-control-power.bbappend new file mode 100644 index 000000000..bfac34307 --- /dev/null +++ b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-firestone/recipes-phosphor/obmc-op-control-power/obmc-op-control-power.bbappend @@ -0,0 +1,2 @@ +FILESEXTRAPATHS_append := "${THISDIR}/${PN}:" +SRC_URI += "file://0001-Add-power-control-support-for-the-Garrison-system.patch" diff --git a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-firestone/recipes-phosphor/obmc-op-control-power/obmc-op-control-power/0001-Add-power-control-support-for-the-Garrison-system.patch b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-firestone/recipes-phosphor/obmc-op-control-power/obmc-op-control-power/0001-Add-power-control-support-for-the-Garrison-system.patch new file mode 120000 index 000000000..24c9afb16 --- /dev/null +++ b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-firestone/recipes-phosphor/obmc-op-control-power/obmc-op-control-power/0001-Add-power-control-support-for-the-Garrison-system.patch @@ -0,0 +1 @@ +../../../../meta-garrison/recipes-phosphor/obmc-op-control-power/obmc-op-control-power/0001-Add-power-control-support-for-the-Garrison-system.patch \ No newline at end of file diff --git a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-firestone/recipes-phosphor/skeleton/skeleton.bbappend b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-firestone/recipes-phosphor/skeleton/skeleton.bbappend deleted file mode 100644 index bfac34307..000000000 --- a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-firestone/recipes-phosphor/skeleton/skeleton.bbappend +++ /dev/null @@ -1,2 +0,0 @@ -FILESEXTRAPATHS_append := "${THISDIR}/${PN}:" -SRC_URI += "file://0001-Add-power-control-support-for-the-Garrison-system.patch" diff --git a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-firestone/recipes-phosphor/skeleton/skeleton/0001-Add-power-control-support-for-the-Garrison-system.patch b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-firestone/recipes-phosphor/skeleton/skeleton/0001-Add-power-control-support-for-the-Garrison-system.patch deleted file mode 120000 index afd75d872..000000000 --- a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-firestone/recipes-phosphor/skeleton/skeleton/0001-Add-power-control-support-for-the-Garrison-system.patch +++ /dev/null @@ -1 +0,0 @@ -../../../../meta-garrison/recipes-phosphor/skeleton/skeleton/0001-Add-power-control-support-for-the-Garrison-system.patch \ No newline at end of file diff --git a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-garrison/recipes-phosphor/obmc-op-control-power/obmc-op-control-power.bbappend b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-garrison/recipes-phosphor/obmc-op-control-power/obmc-op-control-power.bbappend new file mode 100644 index 000000000..bfac34307 --- /dev/null +++ b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-garrison/recipes-phosphor/obmc-op-control-power/obmc-op-control-power.bbappend @@ -0,0 +1,2 @@ +FILESEXTRAPATHS_append := "${THISDIR}/${PN}:" +SRC_URI += "file://0001-Add-power-control-support-for-the-Garrison-system.patch" diff --git a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-garrison/recipes-phosphor/obmc-op-control-power/obmc-op-control-power/0001-Add-power-control-support-for-the-Garrison-system.patch b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-garrison/recipes-phosphor/obmc-op-control-power/obmc-op-control-power/0001-Add-power-control-support-for-the-Garrison-system.patch new file mode 100644 index 000000000..d4c2f8c6e --- /dev/null +++ b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-garrison/recipes-phosphor/obmc-op-control-power/obmc-op-control-power/0001-Add-power-control-support-for-the-Garrison-system.patch @@ -0,0 +1,128 @@ +From c2f1b1115f6a7f814a05622a33984f5a4797fede Mon Sep 17 00:00:00 2001 +From: Brad Bishop +Date: Wed, 15 Jun 2016 21:16:43 -0400 +Subject: [PATCH] Add power control support for the Garrison system + +Signed-off-by: Brad Bishop +--- + op-pwrctl/power_control_obj.c | 70 +++++++++++++++++++++++++++++-------------- + 1 file changed, 48 insertions(+), 22 deletions(-) + +diff --git a/op-pwrctl/power_control_obj.c b/op-pwrctl/power_control_obj.c +index 85a8cff..f6bc996 100644 +--- a/power_control_obj.c ++++ b/power_control_obj.c +@@ -17,11 +17,15 @@ static const gchar* instance_name = "power0"; + static const gchar* dbus_name = "org.openbmc.control.Power"; + + //This object will use these GPIOs +-GPIO power_pin = (GPIO){ "POWER_PIN" }; +-GPIO pgood = (GPIO){ "PGOOD" }; +-GPIO usb_reset = (GPIO){ "USB_RESET" }; +-GPIO pcie_reset = (GPIO){ "PCIE_RESET" }; +- ++GPIO power_pin = (GPIO){ "BMC_POWER_UP" }; ++GPIO pgood = (GPIO){ "SYS_PWROK_BUFF" }; ++GPIO bmc_wd_clear_pulse_n = (GPIO){ "BMC_WD_CLEAR_PULSE_N" }; ++GPIO cm1_oe_r_n = (GPIO){ "CM1_OE_R_N" }; ++GPIO bmc_cp0_reset_n = (GPIO){ "BMC_CP0_RESET_N" }; ++GPIO bmc_cfam_reset_n_r = (GPIO){ "BMC_CFAM_RESET_N_R" }; ++GPIO pcie_reset = (GPIO){ "PEX8718_DEVICES_RESET_N" }; ++GPIO cp0_devices_reset_n = (GPIO){ "CP0_DEVICES_RESET_N" }; ++GPIO cp1_devices_reset_n = (GPIO){ "CP1_DEVICES_RESET_N" }; + + static GDBusObjectManagerServer *manager = NULL; + +@@ -67,27 +71,36 @@ poll_pgood(gpointer user_data) + { + control_power_emit_power_lost(control_power); + control_emit_goto_system_state(control,"HOST_POWERED_OFF"); +- rc = gpio_open(&pcie_reset); +- rc = gpio_write(&pcie_reset,0); +- gpio_close(&pcie_reset); +- +- rc = gpio_open(&usb_reset); +- rc = gpio_write(&usb_reset,0); +- gpio_close(&usb_reset); +- + } + else + { + control_power_emit_power_good(control_power); + control_emit_goto_system_state(control,"HOST_POWERED_ON"); +- rc = gpio_open(&pcie_reset); +- rc = gpio_write(&pcie_reset,1); +- gpio_close(&pcie_reset); +- +- rc = gpio_open(&usb_reset); +- rc = gpio_write(&usb_reset,1); +- gpio_close(&usb_reset); + } ++ ++ gpio_open(&cm1_oe_r_n); ++ gpio_write(&cm1_oe_r_n, !gpio); ++ gpio_close(&cm1_oe_r_n); ++ ++ gpio_open(&bmc_cp0_reset_n); ++ gpio_write(&bmc_cp0_reset_n, gpio); ++ gpio_close(&bmc_cp0_reset_n); ++ ++ gpio_open(&bmc_cfam_reset_n_r); ++ gpio_write(&bmc_cfam_reset_n_r, gpio); ++ gpio_close(&bmc_cfam_reset_n_r); ++ ++ gpio_open(&pcie_reset); ++ gpio_write(&pcie_reset, gpio); ++ gpio_close(&pcie_reset); ++ ++ gpio_open(&cp0_devices_reset_n); ++ gpio_write(&cp0_devices_reset_n, gpio); ++ gpio_close(&cp0_devices_reset_n); ++ ++ gpio_open(&cp1_devices_reset_n); ++ gpio_write(&cp1_devices_reset_n, gpio); ++ gpio_close(&cp1_devices_reset_n); + } + } else { + printf("ERROR PowerControl: GPIO read error (gpio=%s,rc=%d)\n",pgood.name,rc); +@@ -138,11 +151,13 @@ on_set_power_state(ControlPower *pwr, + } else { + control_emit_goto_system_state(control,"HOST_POWERING_OFF"); + } ++ + error = gpio_open(&power_pin); + if(error != GPIO_OK) { break; } +- error = gpio_write(&power_pin,!state); ++ error = gpio_write(&power_pin, state); + if(error != GPIO_OK) { break; } + gpio_close(&power_pin); ++ + control_power_set_state(pwr,state); + } while(0); + if(error != GPIO_OK) +@@ -230,10 +245,21 @@ on_bus_acquired(GDBusConnection *connection, + if(rc != GPIO_OK) { break; } + rc = gpio_init(connection,&pgood); + if(rc != GPIO_OK) { break; } ++ rc = gpio_init(connection,&bmc_wd_clear_pulse_n); ++ if(rc != GPIO_OK) { break; } ++ rc = gpio_init(connection,&cm1_oe_r_n); ++ if(rc != GPIO_OK) { break; } ++ rc = gpio_init(connection,&bmc_cp0_reset_n); ++ if(rc != GPIO_OK) { break; } ++ rc = gpio_init(connection,&bmc_cfam_reset_n_r); ++ if(rc != GPIO_OK) { break; } + rc = gpio_init(connection,&pcie_reset); + if(rc != GPIO_OK) { break; } +- rc = gpio_init(connection,&usb_reset); ++ rc = gpio_init(connection,&cp0_devices_reset_n); + if(rc != GPIO_OK) { break; } ++ rc = gpio_init(connection,&cp1_devices_reset_n ); ++ if(rc != GPIO_OK) { break; } ++ + + uint8_t gpio; + rc = gpio_open(&pgood); +-- +2.1.4 + diff --git a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-garrison/recipes-phosphor/skeleton/skeleton.bbappend b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-garrison/recipes-phosphor/skeleton/skeleton.bbappend deleted file mode 100644 index bfac34307..000000000 --- a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-garrison/recipes-phosphor/skeleton/skeleton.bbappend +++ /dev/null @@ -1,2 +0,0 @@ -FILESEXTRAPATHS_append := "${THISDIR}/${PN}:" -SRC_URI += "file://0001-Add-power-control-support-for-the-Garrison-system.patch" diff --git a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-garrison/recipes-phosphor/skeleton/skeleton/0001-Add-power-control-support-for-the-Garrison-system.patch b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-garrison/recipes-phosphor/skeleton/skeleton/0001-Add-power-control-support-for-the-Garrison-system.patch deleted file mode 100644 index ac5465532..000000000 --- a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-garrison/recipes-phosphor/skeleton/skeleton/0001-Add-power-control-support-for-the-Garrison-system.patch +++ /dev/null @@ -1,128 +0,0 @@ -From c2f1b1115f6a7f814a05622a33984f5a4797fede Mon Sep 17 00:00:00 2001 -From: Brad Bishop -Date: Wed, 15 Jun 2016 21:16:43 -0400 -Subject: [PATCH] Add power control support for the Garrison system - -Signed-off-by: Brad Bishop ---- - op-pwrctl/power_control_obj.c | 70 +++++++++++++++++++++++++++++-------------- - 1 file changed, 48 insertions(+), 22 deletions(-) - -diff --git a/op-pwrctl/power_control_obj.c b/op-pwrctl/power_control_obj.c -index 85a8cff..f6bc996 100644 ---- a/git/op-pwrctl/power_control_obj.c -+++ b/git/op-pwrctl/power_control_obj.c -@@ -17,11 +17,15 @@ static const gchar* instance_name = "power0"; - static const gchar* dbus_name = "org.openbmc.control.Power"; - - //This object will use these GPIOs --GPIO power_pin = (GPIO){ "POWER_PIN" }; --GPIO pgood = (GPIO){ "PGOOD" }; --GPIO usb_reset = (GPIO){ "USB_RESET" }; --GPIO pcie_reset = (GPIO){ "PCIE_RESET" }; -- -+GPIO power_pin = (GPIO){ "BMC_POWER_UP" }; -+GPIO pgood = (GPIO){ "SYS_PWROK_BUFF" }; -+GPIO bmc_wd_clear_pulse_n = (GPIO){ "BMC_WD_CLEAR_PULSE_N" }; -+GPIO cm1_oe_r_n = (GPIO){ "CM1_OE_R_N" }; -+GPIO bmc_cp0_reset_n = (GPIO){ "BMC_CP0_RESET_N" }; -+GPIO bmc_cfam_reset_n_r = (GPIO){ "BMC_CFAM_RESET_N_R" }; -+GPIO pcie_reset = (GPIO){ "PEX8718_DEVICES_RESET_N" }; -+GPIO cp0_devices_reset_n = (GPIO){ "CP0_DEVICES_RESET_N" }; -+GPIO cp1_devices_reset_n = (GPIO){ "CP1_DEVICES_RESET_N" }; - - static GDBusObjectManagerServer *manager = NULL; - -@@ -67,27 +71,36 @@ poll_pgood(gpointer user_data) - { - control_power_emit_power_lost(control_power); - control_emit_goto_system_state(control,"HOST_POWERED_OFF"); -- rc = gpio_open(&pcie_reset); -- rc = gpio_write(&pcie_reset,0); -- gpio_close(&pcie_reset); -- -- rc = gpio_open(&usb_reset); -- rc = gpio_write(&usb_reset,0); -- gpio_close(&usb_reset); -- - } - else - { - control_power_emit_power_good(control_power); - control_emit_goto_system_state(control,"HOST_POWERED_ON"); -- rc = gpio_open(&pcie_reset); -- rc = gpio_write(&pcie_reset,1); -- gpio_close(&pcie_reset); -- -- rc = gpio_open(&usb_reset); -- rc = gpio_write(&usb_reset,1); -- gpio_close(&usb_reset); - } -+ -+ gpio_open(&cm1_oe_r_n); -+ gpio_write(&cm1_oe_r_n, !gpio); -+ gpio_close(&cm1_oe_r_n); -+ -+ gpio_open(&bmc_cp0_reset_n); -+ gpio_write(&bmc_cp0_reset_n, gpio); -+ gpio_close(&bmc_cp0_reset_n); -+ -+ gpio_open(&bmc_cfam_reset_n_r); -+ gpio_write(&bmc_cfam_reset_n_r, gpio); -+ gpio_close(&bmc_cfam_reset_n_r); -+ -+ gpio_open(&pcie_reset); -+ gpio_write(&pcie_reset, gpio); -+ gpio_close(&pcie_reset); -+ -+ gpio_open(&cp0_devices_reset_n); -+ gpio_write(&cp0_devices_reset_n, gpio); -+ gpio_close(&cp0_devices_reset_n); -+ -+ gpio_open(&cp1_devices_reset_n); -+ gpio_write(&cp1_devices_reset_n, gpio); -+ gpio_close(&cp1_devices_reset_n); - } - } else { - printf("ERROR PowerControl: GPIO read error (gpio=%s,rc=%d)\n",pgood.name,rc); -@@ -138,11 +151,13 @@ on_set_power_state(ControlPower *pwr, - } else { - control_emit_goto_system_state(control,"HOST_POWERING_OFF"); - } -+ - error = gpio_open(&power_pin); - if(error != GPIO_OK) { break; } -- error = gpio_write(&power_pin,!state); -+ error = gpio_write(&power_pin, state); - if(error != GPIO_OK) { break; } - gpio_close(&power_pin); -+ - control_power_set_state(pwr,state); - } while(0); - if(error != GPIO_OK) -@@ -230,10 +245,21 @@ on_bus_acquired(GDBusConnection *connection, - if(rc != GPIO_OK) { break; } - rc = gpio_init(connection,&pgood); - if(rc != GPIO_OK) { break; } -+ rc = gpio_init(connection,&bmc_wd_clear_pulse_n); -+ if(rc != GPIO_OK) { break; } -+ rc = gpio_init(connection,&cm1_oe_r_n); -+ if(rc != GPIO_OK) { break; } -+ rc = gpio_init(connection,&bmc_cp0_reset_n); -+ if(rc != GPIO_OK) { break; } -+ rc = gpio_init(connection,&bmc_cfam_reset_n_r); -+ if(rc != GPIO_OK) { break; } - rc = gpio_init(connection,&pcie_reset); - if(rc != GPIO_OK) { break; } -- rc = gpio_init(connection,&usb_reset); -+ rc = gpio_init(connection,&cp0_devices_reset_n); - if(rc != GPIO_OK) { break; } -+ rc = gpio_init(connection,&cp1_devices_reset_n ); -+ if(rc != GPIO_OK) { break; } -+ - - uint8_t gpio; - rc = gpio_open(&pgood); --- -2.1.4 - -- cgit v1.2.1