]> git.kernelconcepts.de Git - karo-tx-linux.git/blob - include/linux/ahci-remap.h
mtd: nand: complain loudly when chip->bits_per_cell is not correctly initialized
[karo-tx-linux.git] / 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 */