hc
2024-05-10 37f49e37ab4cb5d0bc4c60eb5c6d4dd57db767bb
kernel/drivers/crypto/ccp/ccp-dev.h
....@@ -1,3 +1,4 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * AMD Cryptographic Coprocessor (CCP) driver
34 *
....@@ -5,21 +6,17 @@
56 *
67 * Author: Tom Lendacky <thomas.lendacky@amd.com>
78 * Author: Gary R Hook <gary.hook@amd.com>
8
- *
9
- * This program is free software; you can redistribute it and/or modify
10
- * it under the terms of the GNU General Public License version 2 as
11
- * published by the Free Software Foundation.
129 */
1310
1411 #ifndef __CCP_DEV_H__
1512 #define __CCP_DEV_H__
1613
1714 #include <linux/device.h>
18
-#include <linux/pci.h>
1915 #include <linux/spinlock.h>
2016 #include <linux/mutex.h>
2117 #include <linux/list.h>
2218 #include <linux/wait.h>
19
+#include <linux/dma-direction.h>
2320 #include <linux/dmapool.h>
2421 #include <linux/hw_random.h>
2522 #include <linux/bitops.h>
....@@ -382,6 +379,7 @@
382379 */
383380 struct ccp_cmd_queue cmd_q[MAX_HW_QUEUES];
384381 unsigned int cmd_q_count;
382
+ unsigned int max_q_count;
385383
386384 /* Support for the CCP True RNG
387385 */
....@@ -599,8 +597,8 @@
599597 };
600598
601599 union dword4 {
602
- __le32 dst_lo; /* NON-SHA */
603
- __le32 sha_len_lo; /* SHA */
600
+ u32 dst_lo; /* NON-SHA */
601
+ u32 sha_len_lo; /* SHA */
604602 };
605603
606604 union dword5 {
....@@ -610,7 +608,7 @@
610608 unsigned int rsvd1:13;
611609 unsigned int fixed:1;
612610 } fields;
613
- __le32 sha_len_hi;
611
+ u32 sha_len_hi;
614612 };
615613
616614 struct dword7 {
....@@ -621,12 +619,12 @@
621619
622620 struct ccp5_desc {
623621 struct dword0 dw0;
624
- __le32 length;
625
- __le32 src_lo;
622
+ u32 length;
623
+ u32 src_lo;
626624 struct dword3 dw3;
627625 union dword4 dw4;
628626 union dword5 dw5;
629
- __le32 key_lo;
627
+ u32 key_lo;
630628 struct dword7 dw7;
631629 };
632630