Skip to content

Commit

Permalink
mfd: wm5110: Make additional DSP registers available to the user
Browse files Browse the repository at this point in the history
Expose some DSP registers which are useful for DSP users to be able to
access whilst debugging their firmware.

Signed-off-by: Charles Keepax <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
  • Loading branch information
charleskeepax authored and Lee Jones committed Mar 19, 2014
1 parent 8dbb947 commit 47ec66a
Show file tree
Hide file tree
Showing 2 changed files with 235 additions and 0 deletions.
168 changes: 168 additions & 0 deletions drivers/mfd/wm5110-tables.c
Original file line number Diff line number Diff line change
Expand Up @@ -2461,6 +2461,27 @@ static bool wm5110_readable_register(struct device *dev, unsigned int reg)
case ARIZONA_DSP1_STATUS_1:
case ARIZONA_DSP1_STATUS_2:
case ARIZONA_DSP1_STATUS_3:
case ARIZONA_DSP1_STATUS_4:
case ARIZONA_DSP1_WDMA_BUFFER_1:
case ARIZONA_DSP1_WDMA_BUFFER_2:
case ARIZONA_DSP1_WDMA_BUFFER_3:
case ARIZONA_DSP1_WDMA_BUFFER_4:
case ARIZONA_DSP1_WDMA_BUFFER_5:
case ARIZONA_DSP1_WDMA_BUFFER_6:
case ARIZONA_DSP1_WDMA_BUFFER_7:
case ARIZONA_DSP1_WDMA_BUFFER_8:
case ARIZONA_DSP1_RDMA_BUFFER_1:
case ARIZONA_DSP1_RDMA_BUFFER_2:
case ARIZONA_DSP1_RDMA_BUFFER_3:
case ARIZONA_DSP1_RDMA_BUFFER_4:
case ARIZONA_DSP1_RDMA_BUFFER_5:
case ARIZONA_DSP1_RDMA_BUFFER_6:
case ARIZONA_DSP1_WDMA_CONFIG_1:
case ARIZONA_DSP1_WDMA_CONFIG_2:
case ARIZONA_DSP1_WDMA_OFFSET_1:
case ARIZONA_DSP1_RDMA_CONFIG_1:
case ARIZONA_DSP1_RDMA_OFFSET_1:
case ARIZONA_DSP1_EXTERNAL_START_SELECT_1:
case ARIZONA_DSP1_SCRATCH_0:
case ARIZONA_DSP1_SCRATCH_1:
case ARIZONA_DSP1_SCRATCH_2:
Expand All @@ -2470,6 +2491,27 @@ static bool wm5110_readable_register(struct device *dev, unsigned int reg)
case ARIZONA_DSP2_STATUS_1:
case ARIZONA_DSP2_STATUS_2:
case ARIZONA_DSP2_STATUS_3:
case ARIZONA_DSP2_STATUS_4:
case ARIZONA_DSP2_WDMA_BUFFER_1:
case ARIZONA_DSP2_WDMA_BUFFER_2:
case ARIZONA_DSP2_WDMA_BUFFER_3:
case ARIZONA_DSP2_WDMA_BUFFER_4:
case ARIZONA_DSP2_WDMA_BUFFER_5:
case ARIZONA_DSP2_WDMA_BUFFER_6:
case ARIZONA_DSP2_WDMA_BUFFER_7:
case ARIZONA_DSP2_WDMA_BUFFER_8:
case ARIZONA_DSP2_RDMA_BUFFER_1:
case ARIZONA_DSP2_RDMA_BUFFER_2:
case ARIZONA_DSP2_RDMA_BUFFER_3:
case ARIZONA_DSP2_RDMA_BUFFER_4:
case ARIZONA_DSP2_RDMA_BUFFER_5:
case ARIZONA_DSP2_RDMA_BUFFER_6:
case ARIZONA_DSP2_WDMA_CONFIG_1:
case ARIZONA_DSP2_WDMA_CONFIG_2:
case ARIZONA_DSP2_WDMA_OFFSET_1:
case ARIZONA_DSP2_RDMA_CONFIG_1:
case ARIZONA_DSP2_RDMA_OFFSET_1:
case ARIZONA_DSP2_EXTERNAL_START_SELECT_1:
case ARIZONA_DSP2_SCRATCH_0:
case ARIZONA_DSP2_SCRATCH_1:
case ARIZONA_DSP2_SCRATCH_2:
Expand All @@ -2479,6 +2521,27 @@ static bool wm5110_readable_register(struct device *dev, unsigned int reg)
case ARIZONA_DSP3_STATUS_1:
case ARIZONA_DSP3_STATUS_2:
case ARIZONA_DSP3_STATUS_3:
case ARIZONA_DSP3_STATUS_4:
case ARIZONA_DSP3_WDMA_BUFFER_1:
case ARIZONA_DSP3_WDMA_BUFFER_2:
case ARIZONA_DSP3_WDMA_BUFFER_3:
case ARIZONA_DSP3_WDMA_BUFFER_4:
case ARIZONA_DSP3_WDMA_BUFFER_5:
case ARIZONA_DSP3_WDMA_BUFFER_6:
case ARIZONA_DSP3_WDMA_BUFFER_7:
case ARIZONA_DSP3_WDMA_BUFFER_8:
case ARIZONA_DSP3_RDMA_BUFFER_1:
case ARIZONA_DSP3_RDMA_BUFFER_2:
case ARIZONA_DSP3_RDMA_BUFFER_3:
case ARIZONA_DSP3_RDMA_BUFFER_4:
case ARIZONA_DSP3_RDMA_BUFFER_5:
case ARIZONA_DSP3_RDMA_BUFFER_6:
case ARIZONA_DSP3_WDMA_CONFIG_1:
case ARIZONA_DSP3_WDMA_CONFIG_2:
case ARIZONA_DSP3_WDMA_OFFSET_1:
case ARIZONA_DSP3_RDMA_CONFIG_1:
case ARIZONA_DSP3_RDMA_OFFSET_1:
case ARIZONA_DSP3_EXTERNAL_START_SELECT_1:
case ARIZONA_DSP3_SCRATCH_0:
case ARIZONA_DSP3_SCRATCH_1:
case ARIZONA_DSP3_SCRATCH_2:
Expand All @@ -2488,6 +2551,27 @@ static bool wm5110_readable_register(struct device *dev, unsigned int reg)
case ARIZONA_DSP4_STATUS_1:
case ARIZONA_DSP4_STATUS_2:
case ARIZONA_DSP4_STATUS_3:
case ARIZONA_DSP4_STATUS_4:
case ARIZONA_DSP4_WDMA_BUFFER_1:
case ARIZONA_DSP4_WDMA_BUFFER_2:
case ARIZONA_DSP4_WDMA_BUFFER_3:
case ARIZONA_DSP4_WDMA_BUFFER_4:
case ARIZONA_DSP4_WDMA_BUFFER_5:
case ARIZONA_DSP4_WDMA_BUFFER_6:
case ARIZONA_DSP4_WDMA_BUFFER_7:
case ARIZONA_DSP4_WDMA_BUFFER_8:
case ARIZONA_DSP4_RDMA_BUFFER_1:
case ARIZONA_DSP4_RDMA_BUFFER_2:
case ARIZONA_DSP4_RDMA_BUFFER_3:
case ARIZONA_DSP4_RDMA_BUFFER_4:
case ARIZONA_DSP4_RDMA_BUFFER_5:
case ARIZONA_DSP4_RDMA_BUFFER_6:
case ARIZONA_DSP4_WDMA_CONFIG_1:
case ARIZONA_DSP4_WDMA_CONFIG_2:
case ARIZONA_DSP4_WDMA_OFFSET_1:
case ARIZONA_DSP4_RDMA_CONFIG_1:
case ARIZONA_DSP4_RDMA_OFFSET_1:
case ARIZONA_DSP4_EXTERNAL_START_SELECT_1:
case ARIZONA_DSP4_SCRATCH_0:
case ARIZONA_DSP4_SCRATCH_1:
case ARIZONA_DSP4_SCRATCH_2:
Expand Down Expand Up @@ -2543,27 +2627,111 @@ static bool wm5110_volatile_register(struct device *dev, unsigned int reg)
case ARIZONA_DSP1_STATUS_1:
case ARIZONA_DSP1_STATUS_2:
case ARIZONA_DSP1_STATUS_3:
case ARIZONA_DSP1_STATUS_4:
case ARIZONA_DSP1_WDMA_BUFFER_1:
case ARIZONA_DSP1_WDMA_BUFFER_2:
case ARIZONA_DSP1_WDMA_BUFFER_3:
case ARIZONA_DSP1_WDMA_BUFFER_4:
case ARIZONA_DSP1_WDMA_BUFFER_5:
case ARIZONA_DSP1_WDMA_BUFFER_6:
case ARIZONA_DSP1_WDMA_BUFFER_7:
case ARIZONA_DSP1_WDMA_BUFFER_8:
case ARIZONA_DSP1_RDMA_BUFFER_1:
case ARIZONA_DSP1_RDMA_BUFFER_2:
case ARIZONA_DSP1_RDMA_BUFFER_3:
case ARIZONA_DSP1_RDMA_BUFFER_4:
case ARIZONA_DSP1_RDMA_BUFFER_5:
case ARIZONA_DSP1_RDMA_BUFFER_6:
case ARIZONA_DSP1_WDMA_CONFIG_1:
case ARIZONA_DSP1_WDMA_CONFIG_2:
case ARIZONA_DSP1_WDMA_OFFSET_1:
case ARIZONA_DSP1_RDMA_CONFIG_1:
case ARIZONA_DSP1_RDMA_OFFSET_1:
case ARIZONA_DSP1_EXTERNAL_START_SELECT_1:
case ARIZONA_DSP1_SCRATCH_0:
case ARIZONA_DSP1_SCRATCH_1:
case ARIZONA_DSP1_SCRATCH_2:
case ARIZONA_DSP1_SCRATCH_3:
case ARIZONA_DSP2_STATUS_1:
case ARIZONA_DSP2_STATUS_2:
case ARIZONA_DSP2_STATUS_3:
case ARIZONA_DSP2_STATUS_4:
case ARIZONA_DSP2_WDMA_BUFFER_1:
case ARIZONA_DSP2_WDMA_BUFFER_2:
case ARIZONA_DSP2_WDMA_BUFFER_3:
case ARIZONA_DSP2_WDMA_BUFFER_4:
case ARIZONA_DSP2_WDMA_BUFFER_5:
case ARIZONA_DSP2_WDMA_BUFFER_6:
case ARIZONA_DSP2_WDMA_BUFFER_7:
case ARIZONA_DSP2_WDMA_BUFFER_8:
case ARIZONA_DSP2_RDMA_BUFFER_1:
case ARIZONA_DSP2_RDMA_BUFFER_2:
case ARIZONA_DSP2_RDMA_BUFFER_3:
case ARIZONA_DSP2_RDMA_BUFFER_4:
case ARIZONA_DSP2_RDMA_BUFFER_5:
case ARIZONA_DSP2_RDMA_BUFFER_6:
case ARIZONA_DSP2_WDMA_CONFIG_1:
case ARIZONA_DSP2_WDMA_CONFIG_2:
case ARIZONA_DSP2_WDMA_OFFSET_1:
case ARIZONA_DSP2_RDMA_CONFIG_1:
case ARIZONA_DSP2_RDMA_OFFSET_1:
case ARIZONA_DSP2_EXTERNAL_START_SELECT_1:
case ARIZONA_DSP2_SCRATCH_0:
case ARIZONA_DSP2_SCRATCH_1:
case ARIZONA_DSP2_SCRATCH_2:
case ARIZONA_DSP2_SCRATCH_3:
case ARIZONA_DSP3_STATUS_1:
case ARIZONA_DSP3_STATUS_2:
case ARIZONA_DSP3_STATUS_3:
case ARIZONA_DSP3_STATUS_4:
case ARIZONA_DSP3_WDMA_BUFFER_1:
case ARIZONA_DSP3_WDMA_BUFFER_2:
case ARIZONA_DSP3_WDMA_BUFFER_3:
case ARIZONA_DSP3_WDMA_BUFFER_4:
case ARIZONA_DSP3_WDMA_BUFFER_5:
case ARIZONA_DSP3_WDMA_BUFFER_6:
case ARIZONA_DSP3_WDMA_BUFFER_7:
case ARIZONA_DSP3_WDMA_BUFFER_8:
case ARIZONA_DSP3_RDMA_BUFFER_1:
case ARIZONA_DSP3_RDMA_BUFFER_2:
case ARIZONA_DSP3_RDMA_BUFFER_3:
case ARIZONA_DSP3_RDMA_BUFFER_4:
case ARIZONA_DSP3_RDMA_BUFFER_5:
case ARIZONA_DSP3_RDMA_BUFFER_6:
case ARIZONA_DSP3_WDMA_CONFIG_1:
case ARIZONA_DSP3_WDMA_CONFIG_2:
case ARIZONA_DSP3_WDMA_OFFSET_1:
case ARIZONA_DSP3_RDMA_CONFIG_1:
case ARIZONA_DSP3_RDMA_OFFSET_1:
case ARIZONA_DSP3_EXTERNAL_START_SELECT_1:
case ARIZONA_DSP3_SCRATCH_0:
case ARIZONA_DSP3_SCRATCH_1:
case ARIZONA_DSP3_SCRATCH_2:
case ARIZONA_DSP3_SCRATCH_3:
case ARIZONA_DSP4_STATUS_1:
case ARIZONA_DSP4_STATUS_2:
case ARIZONA_DSP4_STATUS_3:
case ARIZONA_DSP4_STATUS_4:
case ARIZONA_DSP4_WDMA_BUFFER_1:
case ARIZONA_DSP4_WDMA_BUFFER_2:
case ARIZONA_DSP4_WDMA_BUFFER_3:
case ARIZONA_DSP4_WDMA_BUFFER_4:
case ARIZONA_DSP4_WDMA_BUFFER_5:
case ARIZONA_DSP4_WDMA_BUFFER_6:
case ARIZONA_DSP4_WDMA_BUFFER_7:
case ARIZONA_DSP4_WDMA_BUFFER_8:
case ARIZONA_DSP4_RDMA_BUFFER_1:
case ARIZONA_DSP4_RDMA_BUFFER_2:
case ARIZONA_DSP4_RDMA_BUFFER_3:
case ARIZONA_DSP4_RDMA_BUFFER_4:
case ARIZONA_DSP4_RDMA_BUFFER_5:
case ARIZONA_DSP4_RDMA_BUFFER_6:
case ARIZONA_DSP4_WDMA_CONFIG_1:
case ARIZONA_DSP4_WDMA_CONFIG_2:
case ARIZONA_DSP4_WDMA_OFFSET_1:
case ARIZONA_DSP4_RDMA_CONFIG_1:
case ARIZONA_DSP4_RDMA_OFFSET_1:
case ARIZONA_DSP4_EXTERNAL_START_SELECT_1:
case ARIZONA_DSP4_SCRATCH_0:
case ARIZONA_DSP4_SCRATCH_1:
case ARIZONA_DSP4_SCRATCH_2:
Expand Down
67 changes: 67 additions & 0 deletions include/linux/mfd/arizona/registers.h
Original file line number Diff line number Diff line change
Expand Up @@ -1034,6 +1034,7 @@
#define ARIZONA_DSP1_STATUS_1 0x1104
#define ARIZONA_DSP1_STATUS_2 0x1105
#define ARIZONA_DSP1_STATUS_3 0x1106
#define ARIZONA_DSP1_STATUS_4 0x1107
#define ARIZONA_DSP1_WDMA_BUFFER_1 0x1110
#define ARIZONA_DSP1_WDMA_BUFFER_2 0x1111
#define ARIZONA_DSP1_WDMA_BUFFER_3 0x1112
Expand All @@ -1050,7 +1051,10 @@
#define ARIZONA_DSP1_RDMA_BUFFER_6 0x1125
#define ARIZONA_DSP1_WDMA_CONFIG_1 0x1130
#define ARIZONA_DSP1_WDMA_CONFIG_2 0x1131
#define ARIZONA_DSP1_WDMA_OFFSET_1 0x1132
#define ARIZONA_DSP1_RDMA_CONFIG_1 0x1134
#define ARIZONA_DSP1_RDMA_OFFSET_1 0x1135
#define ARIZONA_DSP1_EXTERNAL_START_SELECT_1 0x1138
#define ARIZONA_DSP1_SCRATCH_0 0x1140
#define ARIZONA_DSP1_SCRATCH_1 0x1141
#define ARIZONA_DSP1_SCRATCH_2 0x1142
Expand All @@ -1060,6 +1064,27 @@
#define ARIZONA_DSP2_STATUS_1 0x1204
#define ARIZONA_DSP2_STATUS_2 0x1205
#define ARIZONA_DSP2_STATUS_3 0x1206
#define ARIZONA_DSP2_STATUS_4 0x1207
#define ARIZONA_DSP2_WDMA_BUFFER_1 0x1210
#define ARIZONA_DSP2_WDMA_BUFFER_2 0x1211
#define ARIZONA_DSP2_WDMA_BUFFER_3 0x1212
#define ARIZONA_DSP2_WDMA_BUFFER_4 0x1213
#define ARIZONA_DSP2_WDMA_BUFFER_5 0x1214
#define ARIZONA_DSP2_WDMA_BUFFER_6 0x1215
#define ARIZONA_DSP2_WDMA_BUFFER_7 0x1216
#define ARIZONA_DSP2_WDMA_BUFFER_8 0x1217
#define ARIZONA_DSP2_RDMA_BUFFER_1 0x1220
#define ARIZONA_DSP2_RDMA_BUFFER_2 0x1221
#define ARIZONA_DSP2_RDMA_BUFFER_3 0x1222
#define ARIZONA_DSP2_RDMA_BUFFER_4 0x1223
#define ARIZONA_DSP2_RDMA_BUFFER_5 0x1224
#define ARIZONA_DSP2_RDMA_BUFFER_6 0x1225
#define ARIZONA_DSP2_WDMA_CONFIG_1 0x1230
#define ARIZONA_DSP2_WDMA_CONFIG_2 0x1231
#define ARIZONA_DSP2_WDMA_OFFSET_1 0x1232
#define ARIZONA_DSP2_RDMA_CONFIG_1 0x1234
#define ARIZONA_DSP2_RDMA_OFFSET_1 0x1235
#define ARIZONA_DSP2_EXTERNAL_START_SELECT_1 0x1238
#define ARIZONA_DSP2_SCRATCH_0 0x1240
#define ARIZONA_DSP2_SCRATCH_1 0x1241
#define ARIZONA_DSP2_SCRATCH_2 0x1242
Expand All @@ -1069,6 +1094,27 @@
#define ARIZONA_DSP3_STATUS_1 0x1304
#define ARIZONA_DSP3_STATUS_2 0x1305
#define ARIZONA_DSP3_STATUS_3 0x1306
#define ARIZONA_DSP3_STATUS_4 0x1307
#define ARIZONA_DSP3_WDMA_BUFFER_1 0x1310
#define ARIZONA_DSP3_WDMA_BUFFER_2 0x1311
#define ARIZONA_DSP3_WDMA_BUFFER_3 0x1312
#define ARIZONA_DSP3_WDMA_BUFFER_4 0x1313
#define ARIZONA_DSP3_WDMA_BUFFER_5 0x1314
#define ARIZONA_DSP3_WDMA_BUFFER_6 0x1315
#define ARIZONA_DSP3_WDMA_BUFFER_7 0x1316
#define ARIZONA_DSP3_WDMA_BUFFER_8 0x1317
#define ARIZONA_DSP3_RDMA_BUFFER_1 0x1320
#define ARIZONA_DSP3_RDMA_BUFFER_2 0x1321
#define ARIZONA_DSP3_RDMA_BUFFER_3 0x1322
#define ARIZONA_DSP3_RDMA_BUFFER_4 0x1323
#define ARIZONA_DSP3_RDMA_BUFFER_5 0x1324
#define ARIZONA_DSP3_RDMA_BUFFER_6 0x1325
#define ARIZONA_DSP3_WDMA_CONFIG_1 0x1330
#define ARIZONA_DSP3_WDMA_CONFIG_2 0x1331
#define ARIZONA_DSP3_WDMA_OFFSET_1 0x1332
#define ARIZONA_DSP3_RDMA_CONFIG_1 0x1334
#define ARIZONA_DSP3_RDMA_OFFSET_1 0x1335
#define ARIZONA_DSP3_EXTERNAL_START_SELECT_1 0x1338
#define ARIZONA_DSP3_SCRATCH_0 0x1340
#define ARIZONA_DSP3_SCRATCH_1 0x1341
#define ARIZONA_DSP3_SCRATCH_2 0x1342
Expand All @@ -1078,6 +1124,27 @@
#define ARIZONA_DSP4_STATUS_1 0x1404
#define ARIZONA_DSP4_STATUS_2 0x1405
#define ARIZONA_DSP4_STATUS_3 0x1406
#define ARIZONA_DSP4_STATUS_4 0x1407
#define ARIZONA_DSP4_WDMA_BUFFER_1 0x1410
#define ARIZONA_DSP4_WDMA_BUFFER_2 0x1411
#define ARIZONA_DSP4_WDMA_BUFFER_3 0x1412
#define ARIZONA_DSP4_WDMA_BUFFER_4 0x1413
#define ARIZONA_DSP4_WDMA_BUFFER_5 0x1414
#define ARIZONA_DSP4_WDMA_BUFFER_6 0x1415
#define ARIZONA_DSP4_WDMA_BUFFER_7 0x1416
#define ARIZONA_DSP4_WDMA_BUFFER_8 0x1417
#define ARIZONA_DSP4_RDMA_BUFFER_1 0x1420
#define ARIZONA_DSP4_RDMA_BUFFER_2 0x1421
#define ARIZONA_DSP4_RDMA_BUFFER_3 0x1422
#define ARIZONA_DSP4_RDMA_BUFFER_4 0x1423
#define ARIZONA_DSP4_RDMA_BUFFER_5 0x1424
#define ARIZONA_DSP4_RDMA_BUFFER_6 0x1425
#define ARIZONA_DSP4_WDMA_CONFIG_1 0x1430
#define ARIZONA_DSP4_WDMA_CONFIG_2 0x1431
#define ARIZONA_DSP4_WDMA_OFFSET_1 0x1432
#define ARIZONA_DSP4_RDMA_CONFIG_1 0x1434
#define ARIZONA_DSP4_RDMA_OFFSET_1 0x1435
#define ARIZONA_DSP4_EXTERNAL_START_SELECT_1 0x1438
#define ARIZONA_DSP4_SCRATCH_0 0x1440
#define ARIZONA_DSP4_SCRATCH_1 0x1441
#define ARIZONA_DSP4_SCRATCH_2 0x1442
Expand Down

0 comments on commit 47ec66a

Please sign in to comment.