History

PCI: dwc: Use FIELD_GET/PREP()

Convert open-coded variants of PCI field access into FIELD_GET/PREP() to make the code easier to understand. Add two missing defines into pci_regs.h. Logically, the Max No-Snoop Latency Register is a separate word sized register in the PCIe spec, but the pre-existing LTR defines in pci_regs.h with dword long values seem to consider the registers together (the same goes for the only user). Thus, follow the custom and make the new values also take both word long LTR registers as a joint dword register.

Ilpo Järvinen committed 3 years ago

Commit 92af77c1 parent b09d0f93 files · +13 −6Browse files

Showing the changes to include/uapi (1 of 3 files). Show all

Unified · Split

include/uapi/linux/pci_regs.h+2−0
@@ -975,6 +975,8 @@ · 974 unmodified lines
975975 #define PCI_LTR_VALUE_MASK 0x000003ff
976976 #define PCI_LTR_SCALE_MASK 0x00001c00
977977 #define PCI_LTR_SCALE_SHIFT 10
978+#define PCI_LTR_NOSNOOP_VALUE 0x03ff0000 /* Max No-Snoop Latency Value */
979+#define PCI_LTR_NOSNOOP_SCALE 0x1c000000 /* Scale for Max Value */
978980 #define PCI_EXT_CAP_LTR_SIZEOF 8
979981
980982 /* Access Control Service */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t