]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - arch/powerpc/include/asm/vas.h
powerpc/vas: Define vas_win_paste_addr()
[mirror_ubuntu-bionic-kernel.git] / arch / powerpc / include / asm / vas.h
index fd5963acd65824d2d6147a4816189637ccff9d73..f98ade8a2603228faefa71322cd38c9f17d04346 100644 (file)
@@ -10,6 +10,8 @@
 #ifndef _ASM_POWERPC_VAS_H
 #define _ASM_POWERPC_VAS_H
 
+struct vas_window;
+
 /*
  * Min and max FIFO sizes are based on Version 1.05 Section 3.1.4.25
  * (Local FIFO Size Register) of the VAS workbook.
@@ -103,6 +105,15 @@ struct vas_tx_win_attr {
        bool rx_win_ord_mode;
 };
 
+/*
+ * Helper to map a chip id to VAS id.
+ * For POWER9, this is a 1:1 mapping. In the future this maybe a 1:N
+ * mapping in which case, we will need to update this helper.
+ *
+ * Return the VAS id or -1 if no matching vasid is found.
+ */
+int chip_to_vas_id(int chipid);
+
 /*
  * Helper to initialize receive window attributes to defaults for an
  * NX window.
@@ -156,4 +167,9 @@ int vas_copy_crb(void *crb, int offset);
  */
 int vas_paste_crb(struct vas_window *win, int offset, bool re);
 
+/*
+ * Return the power bus paste address associated with @win so the caller
+ * can map that address into their address space.
+ */
+extern u64 vas_win_paste_addr(struct vas_window *win);
 #endif /* __ASM_POWERPC_VAS_H */