mmc: sdhci-pci-gli: Use PCI AER definitions, not hard-coded values
authorBjorn Helgaas <bhelgaas@google.com>
Wed, 27 Mar 2024 21:48:30 +0000 (16:48 -0500)
committerUlf Hansson <ulf.hansson@linaro.org>
Tue, 2 Apr 2024 10:30:31 +0000 (12:30 +0200)
commit951b7ccc54591ba48755b5e0c7fc8b9623a64640
tree6a4669104f60d1012b9c27ef43ebd6578127ddb0
parent0eed7b4761078c327e7ac6f90ff94a5b34a4947a
mmc: sdhci-pci-gli: Use PCI AER definitions, not hard-coded values

015c9cbcf0ad ("mmc: sdhci-pci-gli: GL9750: Mask the replay timer timeout of
AER") added PCI_GLI_9750_CORRERR_MASK, the offset of the AER Capability in
config space, and PCI_GLI_9750_CORRERR_MASK_REPLAY_TIMER_TIMEOUT, the
Replay Timer Timeout bit in the AER Correctable Error Status register.

Use pci_find_ext_capability() to locate the AER Capability and use the
existing PCI_ERR_COR_REP_TIMER definition to mask the bit.

This removes a little bit of unnecessarily device-specific code and makes
AER-related things more greppable.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Link: https://lore.kernel.org/r/20240327214831.1544595-2-helgaas@kernel.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/sdhci-pci-gli.c