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