Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ahci-remap.h: add ahci remapping definitions

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
[hch: split into a separate header and commit]
Signed-off-by: Christoph Hellwig <hch@lst.de>
[tj: dropped duplicate definition of AHCI_VSCAP spotted by Sergei]
Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Tejun Heo <tj@kernel.org>

authored by

Dan Williams and committed by
Tejun Heo
bfa9cb3e a2e7eefd

+28
+28
include/linux/ahci-remap.h
··· 1 + #ifndef _LINUX_AHCI_REMAP_H 2 + #define _LINUX_AHCI_REMAP_H 3 + 4 + #include <linux/sizes.h> 5 + 6 + #define AHCI_VSCAP 0xa4 7 + #define AHCI_REMAP_CAP 0x800 8 + 9 + /* device class code */ 10 + #define AHCI_REMAP_N_DCC 0x880 11 + 12 + /* remap-device base relative to ahci-bar */ 13 + #define AHCI_REMAP_N_OFFSET SZ_16K 14 + #define AHCI_REMAP_N_SIZE SZ_16K 15 + 16 + #define AHCI_MAX_REMAP 3 17 + 18 + static inline unsigned int ahci_remap_dcc(int i) 19 + { 20 + return AHCI_REMAP_N_DCC + i * 0x80; 21 + } 22 + 23 + static inline unsigned int ahci_remap_base(int i) 24 + { 25 + return AHCI_REMAP_N_OFFSET + i * AHCI_REMAP_N_SIZE; 26 + } 27 + 28 + #endif /* _LINUX_AHCI_REMAP_H */