charkear | fd67cd2 | 2022-10-27 18:30:47 +0000 | [diff] [blame] | 1 | SUMMARY = "GXP EHCI Owner Reset" |
| 2 | PR = "r1" |
| 3 | LICENSE = "Apache-2.0" |
| 4 | LIC_FILES_CHKSUM = "file://${HPEBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658" |
| 5 | |
| 6 | inherit obmc-phosphor-systemd |
| 7 | |
| 8 | DEPENDS += "phosphor-gpio-monitor" |
| 9 | RDEPENDS:${PN} += "phosphor-gpio-monitor-monitor" |
| 10 | |
| 11 | SYSTEMD_ENVIRONMENT_FILE:${PN} += "obmc/gpio/port_owner_udc0" |
| 12 | SYSTEMD_ENVIRONMENT_FILE:${PN} += "obmc/gpio/port_owner_udc1" |
| 13 | SYSTEMD_ENVIRONMENT_FILE:${PN} += "obmc/gpio/port_owner_udc2" |
| 14 | |
| 15 | UDC0_GPIO = "port_owner_udc0" |
| 16 | UDC1_GPIO = "port_owner_udc1" |
| 17 | UDC2_GPIO = "port_owner_udc2" |
| 18 | TMPL_GPIO = "phosphor-gpio-monitor@.service" |
| 19 | INSTFMT_GPIO = "phosphor-gpio-monitor@{0}.service" |
| 20 | TGT_GPIO = "multi-user.target.requires" |
| 21 | FMT_GPIO = "../${TMPL_GPIO}:${TGT_GPIO}/${INSTFMT_GPIO}" |
| 22 | SYSTEMD_LINK:${PN} += "${@compose_list(d, 'FMT_GPIO', 'UDC0_GPIO')}" |
| 23 | SYSTEMD_LINK:${PN} += "${@compose_list(d, 'FMT_GPIO', 'UDC1_GPIO')}" |
| 24 | SYSTEMD_LINK:${PN} += "${@compose_list(d, 'FMT_GPIO', 'UDC2_GPIO')}" |
| 25 | |
| 26 | UDC0_VEHCI = "udc0" |
| 27 | UDC1_VEHCI = "udc1" |
| 28 | UDC2_VEHCI = "udc2" |
| 29 | TMPL_VEHCI = "host-ehci-owner-reset@.service" |
| 30 | INSTFMT_VEHCI = "host-ehci-owner-reset@{0}.service" |
| 31 | FMT_VEHCI = "${TMPL_VEHCI}:${INSTFMT_VEHCI}" |
| 32 | SYSTEMD_LINK:${PN} += "${@compose_list(d, 'FMT_VEHCI', 'UDC0_VEHCI')}" |
| 33 | SYSTEMD_LINK:${PN} += "${@compose_list(d, 'FMT_VEHCI', 'UDC1_VEHCI')}" |
| 34 | SYSTEMD_LINK:${PN} += "${@compose_list(d, 'FMT_VEHCI', 'UDC2_VEHCI')}" |
| 35 | |
| 36 | SYSTEMD_SERVICE:${PN} += "host-ehci-owner-reset@.service" |
| 37 | |
| 38 | SRC_URI += "file://udc-reconnect.sh" |
| 39 | SRC_URI += "file://host-ehci-owner-reset@.service" |
| 40 | |
| 41 | do_install() { |
| 42 | install -d ${D}${bindir} |
| 43 | install -m 755 ${WORKDIR}/udc-reconnect.sh ${D}${bindir} |
| 44 | } |