obmc-op-control-power: Remove machine-specific patches
Remove net name patches from Firestone, Garrison, and Witherspoon. The
equivalent configuration was moved into the Python machine config.
Fixes openbmc/openbmc#601, fixes openbmc/openbmc#636, and
fixes openbmc/openbmc#637.
Change-Id: I2c2b03b506abffc1511e53dc622f42fe0589b00f
Signed-off-by: Xo Wang <xow@google.com>
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
deleted file mode 100644
index bfac343..0000000
--- a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-firestone/recipes-phosphor/obmc-op-control-power/obmc-op-control-power.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/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
deleted file mode 120000
index 24c9afb..0000000
--- 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
+++ /dev/null
@@ -1 +0,0 @@
-../../../../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-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
deleted file mode 100644
index bfac343..0000000
--- a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-garrison/recipes-phosphor/obmc-op-control-power/obmc-op-control-power.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/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
deleted file mode 100644
index d4c2f8c..0000000
--- 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
+++ /dev/null
@@ -1,128 +0,0 @@
-From c2f1b1115f6a7f814a05622a33984f5a4797fede Mon Sep 17 00:00:00 2001
-From: Brad Bishop <bradleyb@fuzziesquirrel.com>
-Date: Wed, 15 Jun 2016 21:16:43 -0400
-Subject: [PATCH] Add power control support for the Garrison system
-
-Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
----
- 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-witherspoon/recipes-phosphor/skeleton/skeleton.bbappend b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/skeleton/skeleton.bbappend
deleted file mode 100644
index be66c92..0000000
--- a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/skeleton/skeleton.bbappend
+++ /dev/null
@@ -1,2 +0,0 @@
-FILESEXTRAPATHS_append := "${THISDIR}/${PN}:"
-SRC_URI += "file://0001-Set-witherspoon-power-pin-and-pgood-nets.patch"
diff --git a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/skeleton/skeleton/0001-Set-witherspoon-power-pin-and-pgood-nets.patch b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/skeleton/skeleton/0001-Set-witherspoon-power-pin-and-pgood-nets.patch
deleted file mode 100644
index b0a0037..0000000
--- a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/skeleton/skeleton/0001-Set-witherspoon-power-pin-and-pgood-nets.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 840d78ae902fa8ce7ba356de4aa685c1ebab3efc Mon Sep 17 00:00:00 2001
-From: Brad Bishop <bradleyb@fuzziesquirrel.com>
-Date: Thu, 16 Jun 2016 11:01:24 -0400
-Subject: [PATCH] Set witherspoon power pin and pgood nets
-
-Currently pointed at barreleye nets.
-
-Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
----
- op-pwrctl/power_control_obj.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/op-pwrctl/power_control_obj.c b/op-pwrctl/power_control_obj.c
-index 85a8cff..7bb7004 100644
---- a/git/op-pwrctl/power_control_obj.c
-+++ b/git/op-pwrctl/power_control_obj.c
-@@ -17,8 +17,8 @@ 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 power_pin = (GPIO){ "BMC_POWER_UP" };
-+GPIO pgood = (GPIO){ "SYS_PWROK_BUFF" };
- GPIO usb_reset = (GPIO){ "USB_RESET" };
- GPIO pcie_reset = (GPIO){ "PCIE_RESET" };
-
---
-2.1.4
-