.. | .. |
---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only */ |
---|
1 | 2 | /* |
---|
2 | 3 | * AMD Cryptographic Coprocessor (CCP) driver |
---|
3 | 4 | * |
---|
.. | .. |
---|
5 | 6 | * |
---|
6 | 7 | * Author: Tom Lendacky <thomas.lendacky@amd.com> |
---|
7 | 8 | * 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. |
---|
12 | 9 | */ |
---|
13 | 10 | |
---|
14 | 11 | #ifndef __CCP_DEV_H__ |
---|
15 | 12 | #define __CCP_DEV_H__ |
---|
16 | 13 | |
---|
17 | 14 | #include <linux/device.h> |
---|
18 | | -#include <linux/pci.h> |
---|
19 | 15 | #include <linux/spinlock.h> |
---|
20 | 16 | #include <linux/mutex.h> |
---|
21 | 17 | #include <linux/list.h> |
---|
22 | 18 | #include <linux/wait.h> |
---|
| 19 | +#include <linux/dma-direction.h> |
---|
23 | 20 | #include <linux/dmapool.h> |
---|
24 | 21 | #include <linux/hw_random.h> |
---|
25 | 22 | #include <linux/bitops.h> |
---|
.. | .. |
---|
382 | 379 | */ |
---|
383 | 380 | struct ccp_cmd_queue cmd_q[MAX_HW_QUEUES]; |
---|
384 | 381 | unsigned int cmd_q_count; |
---|
| 382 | + unsigned int max_q_count; |
---|
385 | 383 | |
---|
386 | 384 | /* Support for the CCP True RNG |
---|
387 | 385 | */ |
---|
.. | .. |
---|
599 | 597 | }; |
---|
600 | 598 | |
---|
601 | 599 | 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 */ |
---|
604 | 602 | }; |
---|
605 | 603 | |
---|
606 | 604 | union dword5 { |
---|
.. | .. |
---|
610 | 608 | unsigned int rsvd1:13; |
---|
611 | 609 | unsigned int fixed:1; |
---|
612 | 610 | } fields; |
---|
613 | | - __le32 sha_len_hi; |
---|
| 611 | + u32 sha_len_hi; |
---|
614 | 612 | }; |
---|
615 | 613 | |
---|
616 | 614 | struct dword7 { |
---|
.. | .. |
---|
621 | 619 | |
---|
622 | 620 | struct ccp5_desc { |
---|
623 | 621 | struct dword0 dw0; |
---|
624 | | - __le32 length; |
---|
625 | | - __le32 src_lo; |
---|
| 622 | + u32 length; |
---|
| 623 | + u32 src_lo; |
---|
626 | 624 | struct dword3 dw3; |
---|
627 | 625 | union dword4 dw4; |
---|
628 | 626 | union dword5 dw5; |
---|
629 | | - __le32 key_lo; |
---|
| 627 | + u32 key_lo; |
---|
630 | 628 | struct dword7 dw7; |
---|
631 | 629 | }; |
---|
632 | 630 | |
---|