Skip to content

Commit f734409

Browse files
wziembaxherbertx
authored andcommitted
crypto: qat - move and rename GEN4 error register definitions
Move error source related CSRs from 4xxx to the wider GEN4 header file. Signed-off-by: Wojciech Ziemba <wojciech.ziemba@intel.com> Reviewed-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com> Reviewed-by: Marco Chiappero <marco.chiappero@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
1 parent 605b84a commit f734409

File tree

3 files changed

+17
-17
lines changed

3 files changed

+17
-17
lines changed

drivers/crypto/qat/qat_4xxx/adf_4xxx_hw_data.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ static void adf_enable_error_correction(struct adf_accel_dev *accel_dev)
229229
void __iomem *csr = misc_bar->virt_addr;
230230

231231
/* Enable all in errsou3 except VFLR notification on host */
232-
ADF_CSR_WR(csr, ADF_4XXX_ERRMSK3, ADF_4XXX_VFLNOTIFY);
232+
ADF_CSR_WR(csr, ADF_GEN4_ERRMSK3, ADF_GEN4_VFLNOTIFY);
233233
}
234234

235235
static void adf_enable_ints(struct adf_accel_dev *accel_dev)
@@ -256,9 +256,9 @@ static int adf_init_device(struct adf_accel_dev *accel_dev)
256256
addr = (&GET_BARS(accel_dev)[ADF_4XXX_PMISC_BAR])->virt_addr;
257257

258258
/* Temporarily mask PM interrupt */
259-
csr = ADF_CSR_RD(addr, ADF_4XXX_ERRMSK2);
259+
csr = ADF_CSR_RD(addr, ADF_GEN4_ERRMSK2);
260260
csr |= ADF_4XXX_PM_SOU;
261-
ADF_CSR_WR(addr, ADF_4XXX_ERRMSK2, csr);
261+
ADF_CSR_WR(addr, ADF_GEN4_ERRMSK2, csr);
262262

263263
/* Set DRV_ACTIVE bit to power up the device */
264264
ADF_CSR_WR(addr, ADF_4XXX_PM_INTERRUPT, ADF_4XXX_PM_DRV_ACTIVE);

drivers/crypto/qat/qat_4xxx/adf_4xxx_hw_data.h

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -39,20 +39,6 @@
3939
#define ADF_4XXX_NUM_RINGS_PER_BANK 2
4040
#define ADF_4XXX_NUM_BANKS_PER_VF 4
4141

42-
/* Error source registers */
43-
#define ADF_4XXX_ERRSOU0 (0x41A200)
44-
#define ADF_4XXX_ERRSOU1 (0x41A204)
45-
#define ADF_4XXX_ERRSOU2 (0x41A208)
46-
#define ADF_4XXX_ERRSOU3 (0x41A20C)
47-
48-
/* Error source mask registers */
49-
#define ADF_4XXX_ERRMSK0 (0x41A210)
50-
#define ADF_4XXX_ERRMSK1 (0x41A214)
51-
#define ADF_4XXX_ERRMSK2 (0x41A218)
52-
#define ADF_4XXX_ERRMSK3 (0x41A21C)
53-
54-
#define ADF_4XXX_VFLNOTIFY BIT(7)
55-
5642
/* Arbiter configuration */
5743
#define ADF_4XXX_ARB_CONFIG (BIT(31) | BIT(6) | BIT(0))
5844
#define ADF_4XXX_ARB_OFFSET (0x0)

drivers/crypto/qat/qat_common/adf_gen4_hw_data.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,20 @@ do { \
122122
#define ADF_WQM_CSR_RPRESETSTS_STATUS BIT(0)
123123
#define ADF_WQM_CSR_RPRESETSTS(bank) (ADF_WQM_CSR_RPRESETCTL(bank) + 4)
124124

125+
/* Error source registers */
126+
#define ADF_GEN4_ERRSOU0 (0x41A200)
127+
#define ADF_GEN4_ERRSOU1 (0x41A204)
128+
#define ADF_GEN4_ERRSOU2 (0x41A208)
129+
#define ADF_GEN4_ERRSOU3 (0x41A20C)
130+
131+
/* Error source mask registers */
132+
#define ADF_GEN4_ERRMSK0 (0x41A210)
133+
#define ADF_GEN4_ERRMSK1 (0x41A214)
134+
#define ADF_GEN4_ERRMSK2 (0x41A218)
135+
#define ADF_GEN4_ERRMSK3 (0x41A21C)
136+
137+
#define ADF_GEN4_VFLNOTIFY BIT(7)
138+
125139
void adf_gen4_set_ssm_wdtimer(struct adf_accel_dev *accel_dev);
126140
void adf_gen4_init_hw_csr_ops(struct adf_hw_csr_ops *csr_ops);
127141
int adf_gen4_ring_pair_reset(struct adf_accel_dev *accel_dev, u32 bank_number);

0 commit comments

Comments
 (0)