Skip to content

Commit bd569aa

Browse files
committed
dmaengine: sdxi: Move sdxi_akey_table, akey_table_order() to context.h
These are used by context setup code and not really of general interest. Signed-off-by: Nathan Lynch <nathan.lynch@amd.com>
1 parent 8d3d5c7 commit bd569aa

2 files changed

Lines changed: 19 additions & 15 deletions

File tree

drivers/dma/sdxi/context.h

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,33 @@
99
#define DMA_SDXI_CONTEXT_H
1010

1111
#include <linux/array_size.h>
12+
#include <linux/build_bug.h>
1213
#include <linux/dma-mapping.h>
1314
#include <linux/idr.h>
1415
#include <linux/io-64-nonatomic-lo-hi.h>
16+
#include <linux/sizes.h>
1517
#include <linux/string.h>
18+
#include <linux/types.h>
1619
#include <asm/barrier.h>
1720

21+
#include "hw.h"
1822
#include "sdxi.h"
1923

24+
/*
25+
* The size of the AKey table is flexible, from 4KB to 1MB. Always use
26+
* the minimum size for now.
27+
*/
28+
struct sdxi_akey_table {
29+
struct sdxi_akey_ent entry[SZ_4K / sizeof(struct sdxi_akey_ent)];
30+
};
31+
32+
/* For encoding the akey table size in CXT_L1_ENT's akey_sz. */
33+
static inline u8 akey_table_order(const struct sdxi_akey_table *tbl)
34+
{
35+
static_assert(sizeof(*tbl) == SZ_4K);
36+
return 0;
37+
}
38+
2039
/* Submission Queue */
2140
struct sdxi_sq {
2241
struct sdxi_cxt *cxt; /* owner */

drivers/dma/sdxi/sdxi.h

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -34,21 +34,6 @@
3434
#define L1_CXT_CTRL_PTR_SHIFT 6
3535
#define L1_CXT_AKEY_PTR_SHIFT 12
3636

37-
/*
38-
* The size of the AKey table is flexible, from 4KB to 1MB. Always use
39-
* the minimum size for now.
40-
*/
41-
struct sdxi_akey_table {
42-
struct sdxi_akey_ent entry[SZ_4K / sizeof(struct sdxi_akey_ent)];
43-
};
44-
45-
/* For encoding the akey table size in CXT_L1_ENT's akey_sz. */
46-
static inline u8 akey_table_order(const struct sdxi_akey_table *tbl)
47-
{
48-
static_assert(sizeof(*tbl) == SZ_4K);
49-
return 0;
50-
}
51-
5237
enum {
5338
/*
5439
* Per SDXI 1.0 3.4 Error Log, the error log interrupt is

0 commit comments

Comments
 (0)