Merge tag 'linux-can-next-for-4.12-20170427' of git://git.kernel.org/pub/scm/linux...
[linux-2.6/btrfs-unstable.git] / include / linux / ahci-remap.h
blob62be3a40239d6c148b0d1b9f017453b2c4b7fd39
1 #ifndef _LINUX_AHCI_REMAP_H
2 #define _LINUX_AHCI_REMAP_H
4 #include <linux/sizes.h>
6 #define AHCI_VSCAP 0xa4
7 #define AHCI_REMAP_CAP 0x800
9 /* device class code */
10 #define AHCI_REMAP_N_DCC 0x880
12 /* remap-device base relative to ahci-bar */
13 #define AHCI_REMAP_N_OFFSET SZ_16K
14 #define AHCI_REMAP_N_SIZE SZ_16K
16 #define AHCI_MAX_REMAP 3
18 static inline unsigned int ahci_remap_dcc(int i)
20 return AHCI_REMAP_N_DCC + i * 0x80;
23 static inline unsigned int ahci_remap_base(int i)
25 return AHCI_REMAP_N_OFFSET + i * AHCI_REMAP_N_SIZE;
28 #endif /* _LINUX_AHCI_REMAP_H */