ahci-remap.h 607 B

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