Furquan Shaikh has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/46031 )
Change subject: drivers/intel/wifi: Use newly added pci_dev_log_wake ......................................................................
drivers/intel/wifi: Use newly added pci_dev_log_wake
This change uses the newly added `pci_dev_log_wake()` helper function to determine and log WiFi wake source instead of assuming a hard-coded register value to check. This is done in preparation to merge the generic WiFi and Intel WiFi drivers in coreboot in follow up changes.
BUG=b:169802515 BRANCH=zork
Change-Id: I9bdb453092b4ce7bdab2969f13e0c0aa8166dc0a Signed-off-by: Furquan Shaikh furquan@google.com --- M src/drivers/intel/wifi/wifi.c 1 file changed, 1 insertion(+), 9 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/31/46031/1
diff --git a/src/drivers/intel/wifi/wifi.c b/src/drivers/intel/wifi/wifi.c index e117ec0..f768b04 100644 --- a/src/drivers/intel/wifi/wifi.c +++ b/src/drivers/intel/wifi/wifi.c @@ -10,9 +10,6 @@ #include "chip.h" #include "drivers/wifi/generic/chip.h"
-#define PMCS_DR 0xcc -#define PME_STS (1 << 15) - #if CONFIG(GENERATE_SMBIOS_TABLES) static int smbios_write_wifi(struct device *dev, int *handle, unsigned long *current) @@ -63,12 +60,7 @@
static void wifi_pci_dev_init(struct device *dev) { - if (CONFIG(ELOG)) { - uint32_t val; - val = pci_read_config16(dev, PMCS_DR); - if (val & PME_STS) - elog_add_event_wake(ELOG_WAKE_SOURCE_PME_WIFI, 0); - } + pci_dev_log_wake(dev, ELOG_WAKE_SOURCE_PME_WIFI, 0); }
struct device_operations device_ops = {
Rob Barnes has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46031 )
Change subject: drivers/intel/wifi: Use newly added pci_dev_log_wake ......................................................................
Patch Set 1: Code-Review+1
Paul Menzel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46031 )
Change subject: drivers/intel/wifi: Use newly added pci_dev_log_wake ......................................................................
Patch Set 1: Code-Review+1
(1 comment)
https://review.coreboot.org/c/coreboot/+/46031/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/46031/1//COMMIT_MSG@12 PS1, Line 12: follow up follow-up
Karthik Ramasubramanian has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46031 )
Change subject: drivers/intel/wifi: Use newly added pci_dev_log_wake ......................................................................
Patch Set 1: Code-Review+2
Hello build bot (Jenkins), Paul Menzel, Duncan Laurie, Rob Barnes, Patrick Rudolph, Karthik Ramasubramanian,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/46031
to look at the new patch set (#2).
Change subject: drivers/intel/wifi: Use newly added pci_dev_is_wake_source ......................................................................
drivers/intel/wifi: Use newly added pci_dev_is_wake_source
This change uses the newly added `pci_dev_is_wake_source()` helper function to determine and log WiFi wake source instead of assuming a hard-coded register value to check. This is done in preparation to merge the generic WiFi and Intel WiFi drivers in coreboot in follow-up changes.
BUG=b:169802515 BRANCH=zork
Change-Id: I9bdb453092b4ce7bdab2969f13e0c0aa8166dc0a Signed-off-by: Furquan Shaikh furquan@google.com --- M src/drivers/intel/wifi/wifi.c 1 file changed, 2 insertions(+), 9 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/31/46031/2
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46031 )
Change subject: drivers/intel/wifi: Use newly added pci_dev_is_wake_source ......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/c/coreboot/+/46031/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/46031/1//COMMIT_MSG@12 PS1, Line 12: follow up
follow-up
Done
Rob Barnes has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46031 )
Change subject: drivers/intel/wifi: Use newly added pci_dev_is_wake_source ......................................................................
Patch Set 2: Code-Review+1
Tim Wawrzynczak has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46031 )
Change subject: drivers/intel/wifi: Use newly added pci_dev_is_wake_source ......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/c/coreboot/+/46031/2/src/drivers/intel/wifi/wifi... File src/drivers/intel/wifi/wifi.c:
https://review.coreboot.org/c/coreboot/+/46031/2/src/drivers/intel/wifi/wifi... PS2, Line 63: if (pci_dev_is_wake_source(dev)) && CONFIG(ELOG) ?
Tim Wawrzynczak has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46031 )
Change subject: drivers/intel/wifi: Use newly added pci_dev_is_wake_source ......................................................................
Patch Set 2: Code-Review+2
(1 comment)
https://review.coreboot.org/c/coreboot/+/46031/2/src/drivers/intel/wifi/wifi... File src/drivers/intel/wifi/wifi.c:
https://review.coreboot.org/c/coreboot/+/46031/2/src/drivers/intel/wifi/wifi... PS2, Line 63: if (pci_dev_is_wake_source(dev))
&& CONFIG(ELOG) ?
Nm, forgot about the stub.
Furquan Shaikh has submitted this change. ( https://review.coreboot.org/c/coreboot/+/46031 )
Change subject: drivers/intel/wifi: Use newly added pci_dev_is_wake_source ......................................................................
drivers/intel/wifi: Use newly added pci_dev_is_wake_source
This change uses the newly added `pci_dev_is_wake_source()` helper function to determine and log WiFi wake source instead of assuming a hard-coded register value to check. This is done in preparation to merge the generic WiFi and Intel WiFi drivers in coreboot in follow-up changes.
BUG=b:169802515 BRANCH=zork
Change-Id: I9bdb453092b4ce7bdab2969f13e0c0aa8166dc0a Signed-off-by: Furquan Shaikh furquan@google.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/46031 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Rob Barnes robbarnes@google.com Reviewed-by: Tim Wawrzynczak twawrzynczak@chromium.org --- M src/drivers/intel/wifi/wifi.c 1 file changed, 2 insertions(+), 9 deletions(-)
Approvals: build bot (Jenkins): Verified Tim Wawrzynczak: Looks good to me, approved Rob Barnes: Looks good to me, but someone else must approve
diff --git a/src/drivers/intel/wifi/wifi.c b/src/drivers/intel/wifi/wifi.c index e117ec0..cc58ac6 100644 --- a/src/drivers/intel/wifi/wifi.c +++ b/src/drivers/intel/wifi/wifi.c @@ -10,9 +10,6 @@ #include "chip.h" #include "drivers/wifi/generic/chip.h"
-#define PMCS_DR 0xcc -#define PME_STS (1 << 15) - #if CONFIG(GENERATE_SMBIOS_TABLES) static int smbios_write_wifi(struct device *dev, int *handle, unsigned long *current) @@ -63,12 +60,8 @@
static void wifi_pci_dev_init(struct device *dev) { - if (CONFIG(ELOG)) { - uint32_t val; - val = pci_read_config16(dev, PMCS_DR); - if (val & PME_STS) - elog_add_event_wake(ELOG_WAKE_SOURCE_PME_WIFI, 0); - } + if (pci_dev_is_wake_source(dev)) + elog_add_event_wake(ELOG_WAKE_SOURCE_PME_WIFI, 0); }
struct device_operations device_ops = {