diff options
author | Hannes Reinecke <hare@suse.de> | 2008-04-25 09:01:41 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-04-27 13:20:00 -0400 |
commit | 3dbd10f3d8b00dad35d3fac95e91c066ae71d9a8 (patch) | |
tree | cbd020e0d4e9911afc88dbfc725f66139fb30129 /drivers | |
parent | a198c3d0393faa1fa9f0e6e917ce980d3638f8df (diff) |
[SCSI] aic7xxx: teach aicasm to not emit unused debug code/data
Add a 'count' variable to each symbol which gets increased every time
the symbol is referenced. And then modify the register definition to
include counts for symbols which are referenced from the source code
only and not from the sequencer code.
This will give us an automatic usage count for the symbols with only
minimal hand-crafting.
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/aic7xxx/aic79xx.reg | 113 | ||||
-rw-r--r-- | drivers/scsi/aic7xxx/aic7xxx.reg | 43 | ||||
-rw-r--r-- | drivers/scsi/aic7xxx/aicasm/aicasm.c | 6 | ||||
-rw-r--r-- | drivers/scsi/aic7xxx/aicasm/aicasm_gram.y | 12 | ||||
-rw-r--r-- | drivers/scsi/aic7xxx/aicasm/aicasm_scan.l | 1 | ||||
-rw-r--r-- | drivers/scsi/aic7xxx/aicasm/aicasm_symbol.c | 25 | ||||
-rw-r--r-- | drivers/scsi/aic7xxx/aicasm/aicasm_symbol.h | 1 |
7 files changed, 185 insertions, 16 deletions
diff --git a/drivers/scsi/aic7xxx/aic79xx.reg b/drivers/scsi/aic7xxx/aic79xx.reg index 6ab514d7f980..cca16fc5b4ad 100644 --- a/drivers/scsi/aic7xxx/aic79xx.reg +++ b/drivers/scsi/aic7xxx/aic79xx.reg | |||
@@ -198,6 +198,7 @@ register SEQINTCODE { | |||
198 | register CLRINT { | 198 | register CLRINT { |
199 | address 0x003 | 199 | address 0x003 |
200 | access_mode WO | 200 | access_mode WO |
201 | count 19 | ||
201 | field CLRHWERRINT 0x80 /* Rev B or greater */ | 202 | field CLRHWERRINT 0x80 /* Rev B or greater */ |
202 | field CLRBRKADRINT 0x40 | 203 | field CLRBRKADRINT 0x40 |
203 | field CLRSWTMINT 0x20 | 204 | field CLRSWTMINT 0x20 |
@@ -245,6 +246,7 @@ register CLRERR { | |||
245 | register HCNTRL { | 246 | register HCNTRL { |
246 | address 0x005 | 247 | address 0x005 |
247 | access_mode RW | 248 | access_mode RW |
249 | count 12 | ||
248 | field SEQ_RESET 0x80 /* Rev B or greater */ | 250 | field SEQ_RESET 0x80 /* Rev B or greater */ |
249 | field POWRDN 0x40 | 251 | field POWRDN 0x40 |
250 | field SWINT 0x10 | 252 | field SWINT 0x10 |
@@ -262,6 +264,7 @@ register HNSCB_QOFF { | |||
262 | address 0x006 | 264 | address 0x006 |
263 | access_mode RW | 265 | access_mode RW |
264 | size 2 | 266 | size 2 |
267 | count 2 | ||
265 | } | 268 | } |
266 | 269 | ||
267 | /* | 270 | /* |
@@ -270,6 +273,7 @@ register HNSCB_QOFF { | |||
270 | register HESCB_QOFF { | 273 | register HESCB_QOFF { |
271 | address 0x008 | 274 | address 0x008 |
272 | access_mode RW | 275 | access_mode RW |
276 | count 2 | ||
273 | } | 277 | } |
274 | 278 | ||
275 | /* | 279 | /* |
@@ -287,6 +291,7 @@ register HS_MAILBOX { | |||
287 | */ | 291 | */ |
288 | register SEQINTSTAT { | 292 | register SEQINTSTAT { |
289 | address 0x00C | 293 | address 0x00C |
294 | count 1 | ||
290 | access_mode RO | 295 | access_mode RO |
291 | field SEQ_SWTMRTO 0x10 | 296 | field SEQ_SWTMRTO 0x10 |
292 | field SEQ_SEQINT 0x08 | 297 | field SEQ_SEQINT 0x08 |
@@ -332,6 +337,7 @@ register SNSCB_QOFF { | |||
332 | */ | 337 | */ |
333 | register SESCB_QOFF { | 338 | register SESCB_QOFF { |
334 | address 0x012 | 339 | address 0x012 |
340 | count 2 | ||
335 | access_mode RW | 341 | access_mode RW |
336 | modes M_CCHAN | 342 | modes M_CCHAN |
337 | } | 343 | } |
@@ -397,6 +403,7 @@ register DFCNTRL { | |||
397 | address 0x019 | 403 | address 0x019 |
398 | access_mode RW | 404 | access_mode RW |
399 | modes M_DFF0, M_DFF1 | 405 | modes M_DFF0, M_DFF1 |
406 | count 11 | ||
400 | field PRELOADEN 0x80 | 407 | field PRELOADEN 0x80 |
401 | field SCSIENWRDIS 0x40 /* Rev B only. */ | 408 | field SCSIENWRDIS 0x40 /* Rev B only. */ |
402 | field SCSIEN 0x20 | 409 | field SCSIEN 0x20 |
@@ -415,6 +422,7 @@ register DFCNTRL { | |||
415 | */ | 422 | */ |
416 | register DSCOMMAND0 { | 423 | register DSCOMMAND0 { |
417 | address 0x019 | 424 | address 0x019 |
425 | count 1 | ||
418 | access_mode RW | 426 | access_mode RW |
419 | modes M_CFG | 427 | modes M_CFG |
420 | field CACHETHEN 0x80 /* Cache Threshold enable */ | 428 | field CACHETHEN 0x80 /* Cache Threshold enable */ |
@@ -580,6 +588,7 @@ register DFF_THRSH { | |||
580 | address 0x088 | 588 | address 0x088 |
581 | access_mode RW | 589 | access_mode RW |
582 | modes M_CFG | 590 | modes M_CFG |
591 | count 1 | ||
583 | field WR_DFTHRSH 0x70 { | 592 | field WR_DFTHRSH 0x70 { |
584 | WR_DFTHRSH_MIN, | 593 | WR_DFTHRSH_MIN, |
585 | WR_DFTHRSH_25, | 594 | WR_DFTHRSH_25, |
@@ -800,6 +809,7 @@ register PCIXCTL { | |||
800 | address 0x093 | 809 | address 0x093 |
801 | access_mode RW | 810 | access_mode RW |
802 | modes M_CFG | 811 | modes M_CFG |
812 | count 1 | ||
803 | field SERRPULSE 0x80 | 813 | field SERRPULSE 0x80 |
804 | field UNEXPSCIEN 0x20 | 814 | field UNEXPSCIEN 0x20 |
805 | field SPLTSMADIS 0x10 | 815 | field SPLTSMADIS 0x10 |
@@ -844,6 +854,7 @@ register DCHSPLTSTAT0 { | |||
844 | address 0x096 | 854 | address 0x096 |
845 | access_mode RW | 855 | access_mode RW |
846 | modes M_DFF0, M_DFF1 | 856 | modes M_DFF0, M_DFF1 |
857 | count 2 | ||
847 | field STAETERM 0x80 | 858 | field STAETERM 0x80 |
848 | field SCBCERR 0x40 | 859 | field SCBCERR 0x40 |
849 | field SCADERR 0x20 | 860 | field SCADERR 0x20 |
@@ -895,6 +906,7 @@ register DCHSPLTSTAT1 { | |||
895 | address 0x097 | 906 | address 0x097 |
896 | access_mode RW | 907 | access_mode RW |
897 | modes M_DFF0, M_DFF1 | 908 | modes M_DFF0, M_DFF1 |
909 | count 2 | ||
898 | field RXDATABUCKET 0x01 | 910 | field RXDATABUCKET 0x01 |
899 | } | 911 | } |
900 | 912 | ||
@@ -1048,6 +1060,7 @@ register SGSPLTSTAT0 { | |||
1048 | address 0x09E | 1060 | address 0x09E |
1049 | access_mode RW | 1061 | access_mode RW |
1050 | modes M_DFF0, M_DFF1 | 1062 | modes M_DFF0, M_DFF1 |
1063 | count 2 | ||
1051 | field STAETERM 0x80 | 1064 | field STAETERM 0x80 |
1052 | field SCBCERR 0x40 | 1065 | field SCBCERR 0x40 |
1053 | field SCADERR 0x20 | 1066 | field SCADERR 0x20 |
@@ -1065,6 +1078,7 @@ register SGSPLTSTAT1 { | |||
1065 | address 0x09F | 1078 | address 0x09F |
1066 | access_mode RW | 1079 | access_mode RW |
1067 | modes M_DFF0, M_DFF1 | 1080 | modes M_DFF0, M_DFF1 |
1081 | count 2 | ||
1068 | field RXDATABUCKET 0x01 | 1082 | field RXDATABUCKET 0x01 |
1069 | } | 1083 | } |
1070 | 1084 | ||
@@ -1086,6 +1100,7 @@ register DF0PCISTAT { | |||
1086 | address 0x0A0 | 1100 | address 0x0A0 |
1087 | access_mode RW | 1101 | access_mode RW |
1088 | modes M_CFG | 1102 | modes M_CFG |
1103 | count 1 | ||
1089 | field DPE 0x80 | 1104 | field DPE 0x80 |
1090 | field SSE 0x40 | 1105 | field SSE 0x40 |
1091 | field RMA 0x20 | 1106 | field RMA 0x20 |
@@ -1184,6 +1199,7 @@ register TARGPCISTAT { | |||
1184 | address 0x0A7 | 1199 | address 0x0A7 |
1185 | access_mode RW | 1200 | access_mode RW |
1186 | modes M_CFG | 1201 | modes M_CFG |
1202 | count 5 | ||
1187 | field DPE 0x80 | 1203 | field DPE 0x80 |
1188 | field SSE 0x40 | 1204 | field SSE 0x40 |
1189 | field STA 0x08 | 1205 | field STA 0x08 |
@@ -1198,6 +1214,7 @@ register LQIN { | |||
1198 | address 0x020 | 1214 | address 0x020 |
1199 | access_mode RW | 1215 | access_mode RW |
1200 | size 20 | 1216 | size 20 |
1217 | count 2 | ||
1201 | modes M_DFF0, M_DFF1, M_SCSI | 1218 | modes M_DFF0, M_DFF1, M_SCSI |
1202 | } | 1219 | } |
1203 | 1220 | ||
@@ -1229,6 +1246,7 @@ register LUNPTR { | |||
1229 | address 0x022 | 1246 | address 0x022 |
1230 | access_mode RW | 1247 | access_mode RW |
1231 | modes M_CFG | 1248 | modes M_CFG |
1249 | count 2 | ||
1232 | } | 1250 | } |
1233 | 1251 | ||
1234 | /* | 1252 | /* |
@@ -1259,6 +1277,7 @@ register CMDLENPTR { | |||
1259 | address 0x025 | 1277 | address 0x025 |
1260 | access_mode RW | 1278 | access_mode RW |
1261 | modes M_CFG | 1279 | modes M_CFG |
1280 | count 1 | ||
1262 | } | 1281 | } |
1263 | 1282 | ||
1264 | /* | 1283 | /* |
@@ -1270,6 +1289,7 @@ register ATTRPTR { | |||
1270 | address 0x026 | 1289 | address 0x026 |
1271 | access_mode RW | 1290 | access_mode RW |
1272 | modes M_CFG | 1291 | modes M_CFG |
1292 | count 1 | ||
1273 | } | 1293 | } |
1274 | 1294 | ||
1275 | /* | 1295 | /* |
@@ -1281,6 +1301,7 @@ register FLAGPTR { | |||
1281 | address 0x027 | 1301 | address 0x027 |
1282 | access_mode RW | 1302 | access_mode RW |
1283 | modes M_CFG | 1303 | modes M_CFG |
1304 | count 1 | ||
1284 | } | 1305 | } |
1285 | 1306 | ||
1286 | /* | 1307 | /* |
@@ -1291,6 +1312,7 @@ register CMDPTR { | |||
1291 | address 0x028 | 1312 | address 0x028 |
1292 | access_mode RW | 1313 | access_mode RW |
1293 | modes M_CFG | 1314 | modes M_CFG |
1315 | count 1 | ||
1294 | } | 1316 | } |
1295 | 1317 | ||
1296 | /* | 1318 | /* |
@@ -1301,6 +1323,7 @@ register QNEXTPTR { | |||
1301 | address 0x029 | 1323 | address 0x029 |
1302 | access_mode RW | 1324 | access_mode RW |
1303 | modes M_CFG | 1325 | modes M_CFG |
1326 | count 1 | ||
1304 | } | 1327 | } |
1305 | 1328 | ||
1306 | /* | 1329 | /* |
@@ -1323,6 +1346,7 @@ register ABRTBYTEPTR { | |||
1323 | address 0x02B | 1346 | address 0x02B |
1324 | access_mode RW | 1347 | access_mode RW |
1325 | modes M_CFG | 1348 | modes M_CFG |
1349 | count 1 | ||
1326 | } | 1350 | } |
1327 | 1351 | ||
1328 | /* | 1352 | /* |
@@ -1333,6 +1357,7 @@ register ABRTBITPTR { | |||
1333 | address 0x02C | 1357 | address 0x02C |
1334 | access_mode RW | 1358 | access_mode RW |
1335 | modes M_CFG | 1359 | modes M_CFG |
1360 | count 1 | ||
1336 | } | 1361 | } |
1337 | 1362 | ||
1338 | /* | 1363 | /* |
@@ -1370,6 +1395,7 @@ register LUNLEN { | |||
1370 | address 0x030 | 1395 | address 0x030 |
1371 | access_mode RW | 1396 | access_mode RW |
1372 | modes M_CFG | 1397 | modes M_CFG |
1398 | count 2 | ||
1373 | mask ILUNLEN 0x0F | 1399 | mask ILUNLEN 0x0F |
1374 | mask TLUNLEN 0xF0 | 1400 | mask TLUNLEN 0xF0 |
1375 | } | 1401 | } |
@@ -1383,6 +1409,7 @@ register CDBLIMIT { | |||
1383 | address 0x031 | 1409 | address 0x031 |
1384 | access_mode RW | 1410 | access_mode RW |
1385 | modes M_CFG | 1411 | modes M_CFG |
1412 | count 1 | ||
1386 | } | 1413 | } |
1387 | 1414 | ||
1388 | /* | 1415 | /* |
@@ -1394,6 +1421,7 @@ register MAXCMD { | |||
1394 | address 0x032 | 1421 | address 0x032 |
1395 | access_mode RW | 1422 | access_mode RW |
1396 | modes M_CFG | 1423 | modes M_CFG |
1424 | count 9 | ||
1397 | } | 1425 | } |
1398 | 1426 | ||
1399 | /* | 1427 | /* |
@@ -1458,6 +1486,7 @@ register LQCTL1 { | |||
1458 | address 0x038 | 1486 | address 0x038 |
1459 | access_mode RW | 1487 | access_mode RW |
1460 | modes M_DFF0, M_DFF1, M_SCSI | 1488 | modes M_DFF0, M_DFF1, M_SCSI |
1489 | count 2 | ||
1461 | field PCI2PCI 0x04 | 1490 | field PCI2PCI 0x04 |
1462 | field SINGLECMD 0x02 | 1491 | field SINGLECMD 0x02 |
1463 | field ABORTPENDING 0x01 | 1492 | field ABORTPENDING 0x01 |
@@ -1470,6 +1499,7 @@ register LQCTL2 { | |||
1470 | address 0x039 | 1499 | address 0x039 |
1471 | access_mode RW | 1500 | access_mode RW |
1472 | modes M_DFF0, M_DFF1, M_SCSI | 1501 | modes M_DFF0, M_DFF1, M_SCSI |
1502 | count 5 | ||
1473 | field LQIRETRY 0x80 | 1503 | field LQIRETRY 0x80 |
1474 | field LQICONTINUE 0x40 | 1504 | field LQICONTINUE 0x40 |
1475 | field LQITOIDLE 0x20 | 1505 | field LQITOIDLE 0x20 |
@@ -1528,6 +1558,7 @@ register SCSISEQ1 { | |||
1528 | address 0x03B | 1558 | address 0x03B |
1529 | access_mode RW | 1559 | access_mode RW |
1530 | modes M_DFF0, M_DFF1, M_SCSI | 1560 | modes M_DFF0, M_DFF1, M_SCSI |
1561 | count 8 | ||
1531 | field MANUALCTL 0x40 | 1562 | field MANUALCTL 0x40 |
1532 | field ENSELI 0x20 | 1563 | field ENSELI 0x20 |
1533 | field ENRSELI 0x10 | 1564 | field ENRSELI 0x10 |
@@ -1667,6 +1698,9 @@ register SCSISIGO { | |||
1667 | } | 1698 | } |
1668 | } | 1699 | } |
1669 | 1700 | ||
1701 | /* | ||
1702 | * SCSI Control Signal In | ||
1703 | */ | ||
1670 | register SCSISIGI { | 1704 | register SCSISIGI { |
1671 | address 0x041 | 1705 | address 0x041 |
1672 | access_mode RO | 1706 | access_mode RO |
@@ -1703,6 +1737,7 @@ register MULTARGID { | |||
1703 | access_mode RW | 1737 | access_mode RW |
1704 | modes M_CFG | 1738 | modes M_CFG |
1705 | size 2 | 1739 | size 2 |
1740 | count 2 | ||
1706 | } | 1741 | } |
1707 | 1742 | ||
1708 | /* | 1743 | /* |
@@ -1758,6 +1793,7 @@ register TARGIDIN { | |||
1758 | address 0x048 | 1793 | address 0x048 |
1759 | access_mode RO | 1794 | access_mode RO |
1760 | modes M_DFF0, M_DFF1, M_SCSI | 1795 | modes M_DFF0, M_DFF1, M_SCSI |
1796 | count 2 | ||
1761 | field CLKOUT 0x80 | 1797 | field CLKOUT 0x80 |
1762 | field TARGID 0x0F | 1798 | field TARGID 0x0F |
1763 | } | 1799 | } |
@@ -1798,6 +1834,7 @@ register OPTIONMODE { | |||
1798 | address 0x04A | 1834 | address 0x04A |
1799 | access_mode RW | 1835 | access_mode RW |
1800 | modes M_CFG | 1836 | modes M_CFG |
1837 | count 4 | ||
1801 | field BIOSCANCTL 0x80 | 1838 | field BIOSCANCTL 0x80 |
1802 | field AUTOACKEN 0x40 | 1839 | field AUTOACKEN 0x40 |
1803 | field BIASCANCTL 0x20 | 1840 | field BIASCANCTL 0x20 |
@@ -1850,6 +1887,7 @@ register SIMODE0 { | |||
1850 | address 0x04B | 1887 | address 0x04B |
1851 | access_mode RW | 1888 | access_mode RW |
1852 | modes M_CFG | 1889 | modes M_CFG |
1890 | count 8 | ||
1853 | field ENSELDO 0x40 | 1891 | field ENSELDO 0x40 |
1854 | field ENSELDI 0x20 | 1892 | field ENSELDI 0x20 |
1855 | field ENSELINGO 0x10 | 1893 | field ENSELINGO 0x10 |
@@ -1945,6 +1983,7 @@ register PERRDIAG { | |||
1945 | address 0x04E | 1983 | address 0x04E |
1946 | access_mode RO | 1984 | access_mode RO |
1947 | modes M_DFF0, M_DFF1, M_SCSI | 1985 | modes M_DFF0, M_DFF1, M_SCSI |
1986 | count 3 | ||
1948 | field HIZERO 0x80 | 1987 | field HIZERO 0x80 |
1949 | field HIPERR 0x40 | 1988 | field HIPERR 0x40 |
1950 | field PREVPHASE 0x20 | 1989 | field PREVPHASE 0x20 |
@@ -1962,6 +2001,7 @@ register LQISTATE { | |||
1962 | address 0x04E | 2001 | address 0x04E |
1963 | access_mode RO | 2002 | access_mode RO |
1964 | modes M_CFG | 2003 | modes M_CFG |
2004 | count 6 | ||
1965 | } | 2005 | } |
1966 | 2006 | ||
1967 | /* | 2007 | /* |
@@ -1971,6 +2011,7 @@ register SOFFCNT { | |||
1971 | address 0x04F | 2011 | address 0x04F |
1972 | access_mode RO | 2012 | access_mode RO |
1973 | modes M_DFF0, M_DFF1, M_SCSI | 2013 | modes M_DFF0, M_DFF1, M_SCSI |
2014 | count 1 | ||
1974 | } | 2015 | } |
1975 | 2016 | ||
1976 | /* | 2017 | /* |
@@ -1980,6 +2021,7 @@ register LQOSTATE { | |||
1980 | address 0x04F | 2021 | address 0x04F |
1981 | access_mode RO | 2022 | access_mode RO |
1982 | modes M_CFG | 2023 | modes M_CFG |
2024 | count 2 | ||
1983 | } | 2025 | } |
1984 | 2026 | ||
1985 | /* | 2027 | /* |
@@ -1989,6 +2031,7 @@ register LQISTAT0 { | |||
1989 | address 0x050 | 2031 | address 0x050 |
1990 | access_mode RO | 2032 | access_mode RO |
1991 | modes M_DFF0, M_DFF1, M_SCSI | 2033 | modes M_DFF0, M_DFF1, M_SCSI |
2034 | count 2 | ||
1992 | field LQIATNQAS 0x20 | 2035 | field LQIATNQAS 0x20 |
1993 | field LQICRCT1 0x10 | 2036 | field LQICRCT1 0x10 |
1994 | field LQICRCT2 0x08 | 2037 | field LQICRCT2 0x08 |
@@ -2004,6 +2047,7 @@ register CLRLQIINT0 { | |||
2004 | address 0x050 | 2047 | address 0x050 |
2005 | access_mode WO | 2048 | access_mode WO |
2006 | modes M_DFF0, M_DFF1, M_SCSI | 2049 | modes M_DFF0, M_DFF1, M_SCSI |
2050 | count 1 | ||
2007 | field CLRLQIATNQAS 0x20 | 2051 | field CLRLQIATNQAS 0x20 |
2008 | field CLRLQICRCT1 0x10 | 2052 | field CLRLQICRCT1 0x10 |
2009 | field CLRLQICRCT2 0x08 | 2053 | field CLRLQICRCT2 0x08 |
@@ -2019,6 +2063,7 @@ register LQIMODE0 { | |||
2019 | address 0x050 | 2063 | address 0x050 |
2020 | access_mode RW | 2064 | access_mode RW |
2021 | modes M_CFG | 2065 | modes M_CFG |
2066 | count 3 | ||
2022 | field ENLQIATNQASK 0x20 | 2067 | field ENLQIATNQASK 0x20 |
2023 | field ENLQICRCT1 0x10 | 2068 | field ENLQICRCT1 0x10 |
2024 | field ENLQICRCT2 0x08 | 2069 | field ENLQICRCT2 0x08 |
@@ -2034,6 +2079,7 @@ register LQISTAT1 { | |||
2034 | address 0x051 | 2079 | address 0x051 |
2035 | access_mode RO | 2080 | access_mode RO |
2036 | modes M_DFF0, M_DFF1, M_SCSI | 2081 | modes M_DFF0, M_DFF1, M_SCSI |
2082 | count 3 | ||
2037 | field LQIPHASE_LQ 0x80 | 2083 | field LQIPHASE_LQ 0x80 |
2038 | field LQIPHASE_NLQ 0x40 | 2084 | field LQIPHASE_NLQ 0x40 |
2039 | field LQIABORT 0x20 | 2085 | field LQIABORT 0x20 |
@@ -2051,6 +2097,7 @@ register CLRLQIINT1 { | |||
2051 | address 0x051 | 2097 | address 0x051 |
2052 | access_mode WO | 2098 | access_mode WO |
2053 | modes M_DFF0, M_DFF1, M_SCSI | 2099 | modes M_DFF0, M_DFF1, M_SCSI |
2100 | count 4 | ||
2054 | field CLRLQIPHASE_LQ 0x80 | 2101 | field CLRLQIPHASE_LQ 0x80 |
2055 | field CLRLQIPHASE_NLQ 0x40 | 2102 | field CLRLQIPHASE_NLQ 0x40 |
2056 | field CLRLIQABORT 0x20 | 2103 | field CLRLIQABORT 0x20 |
@@ -2068,6 +2115,7 @@ register LQIMODE1 { | |||
2068 | address 0x051 | 2115 | address 0x051 |
2069 | access_mode RW | 2116 | access_mode RW |
2070 | modes M_CFG | 2117 | modes M_CFG |
2118 | count 4 | ||
2071 | field ENLQIPHASE_LQ 0x80 /* LQIPHASE1 */ | 2119 | field ENLQIPHASE_LQ 0x80 /* LQIPHASE1 */ |
2072 | field ENLQIPHASE_NLQ 0x40 /* LQIPHASE2 */ | 2120 | field ENLQIPHASE_NLQ 0x40 /* LQIPHASE2 */ |
2073 | field ENLIQABORT 0x20 | 2121 | field ENLIQABORT 0x20 |
@@ -2102,6 +2150,7 @@ register SSTAT3 { | |||
2102 | address 0x053 | 2150 | address 0x053 |
2103 | access_mode RO | 2151 | access_mode RO |
2104 | modes M_DFF0, M_DFF1, M_SCSI | 2152 | modes M_DFF0, M_DFF1, M_SCSI |
2153 | count 3 | ||
2105 | field NTRAMPERR 0x02 | 2154 | field NTRAMPERR 0x02 |
2106 | field OSRAMPERR 0x01 | 2155 | field OSRAMPERR 0x01 |
2107 | } | 2156 | } |
@@ -2113,6 +2162,7 @@ register CLRSINT3 { | |||
2113 | address 0x053 | 2162 | address 0x053 |
2114 | access_mode WO | 2163 | access_mode WO |
2115 | modes M_DFF0, M_DFF1, M_SCSI | 2164 | modes M_DFF0, M_DFF1, M_SCSI |
2165 | count 3 | ||
2116 | field CLRNTRAMPERR 0x02 | 2166 | field CLRNTRAMPERR 0x02 |
2117 | field CLROSRAMPERR 0x01 | 2167 | field CLROSRAMPERR 0x01 |
2118 | } | 2168 | } |
@@ -2124,6 +2174,7 @@ register SIMODE3 { | |||
2124 | address 0x053 | 2174 | address 0x053 |
2125 | access_mode RW | 2175 | access_mode RW |
2126 | modes M_CFG | 2176 | modes M_CFG |
2177 | count 4 | ||
2127 | field ENNTRAMPERR 0x02 | 2178 | field ENNTRAMPERR 0x02 |
2128 | field ENOSRAMPERR 0x01 | 2179 | field ENOSRAMPERR 0x01 |
2129 | } | 2180 | } |
@@ -2135,6 +2186,7 @@ register LQOSTAT0 { | |||
2135 | address 0x054 | 2186 | address 0x054 |
2136 | access_mode RO | 2187 | access_mode RO |
2137 | modes M_DFF0, M_DFF1, M_SCSI | 2188 | modes M_DFF0, M_DFF1, M_SCSI |
2189 | count 2 | ||
2138 | field LQOTARGSCBPERR 0x10 | 2190 | field LQOTARGSCBPERR 0x10 |
2139 | field LQOSTOPT2 0x08 | 2191 | field LQOSTOPT2 0x08 |
2140 | field LQOATNLQ 0x04 | 2192 | field LQOATNLQ 0x04 |
@@ -2149,6 +2201,7 @@ register CLRLQOINT0 { | |||
2149 | address 0x054 | 2201 | address 0x054 |
2150 | access_mode WO | 2202 | access_mode WO |
2151 | modes M_DFF0, M_DFF1, M_SCSI | 2203 | modes M_DFF0, M_DFF1, M_SCSI |
2204 | count 3 | ||
2152 | field CLRLQOTARGSCBPERR 0x10 | 2205 | field CLRLQOTARGSCBPERR 0x10 |
2153 | field CLRLQOSTOPT2 0x08 | 2206 | field CLRLQOSTOPT2 0x08 |
2154 | field CLRLQOATNLQ 0x04 | 2207 | field CLRLQOATNLQ 0x04 |
@@ -2163,6 +2216,7 @@ register LQOMODE0 { | |||
2163 | address 0x054 | 2216 | address 0x054 |
2164 | access_mode RW | 2217 | access_mode RW |
2165 | modes M_CFG | 2218 | modes M_CFG |
2219 | count 4 | ||
2166 | field ENLQOTARGSCBPERR 0x10 | 2220 | field ENLQOTARGSCBPERR 0x10 |
2167 | field ENLQOSTOPT2 0x08 | 2221 | field ENLQOSTOPT2 0x08 |
2168 | field ENLQOATNLQ 0x04 | 2222 | field ENLQOATNLQ 0x04 |
@@ -2191,6 +2245,7 @@ register CLRLQOINT1 { | |||
2191 | address 0x055 | 2245 | address 0x055 |
2192 | access_mode WO | 2246 | access_mode WO |
2193 | modes M_DFF0, M_DFF1, M_SCSI | 2247 | modes M_DFF0, M_DFF1, M_SCSI |
2248 | count 7 | ||
2194 | field CLRLQOINITSCBPERR 0x10 | 2249 | field CLRLQOINITSCBPERR 0x10 |
2195 | field CLRLQOSTOPI2 0x08 | 2250 | field CLRLQOSTOPI2 0x08 |
2196 | field CLRLQOBADQAS 0x04 | 2251 | field CLRLQOBADQAS 0x04 |
@@ -2205,6 +2260,7 @@ register LQOMODE1 { | |||
2205 | address 0x055 | 2260 | address 0x055 |
2206 | access_mode RW | 2261 | access_mode RW |
2207 | modes M_CFG | 2262 | modes M_CFG |
2263 | count 4 | ||
2208 | field ENLQOINITSCBPERR 0x10 | 2264 | field ENLQOINITSCBPERR 0x10 |
2209 | field ENLQOSTOPI2 0x08 | 2265 | field ENLQOSTOPI2 0x08 |
2210 | field ENLQOBADQAS 0x04 | 2266 | field ENLQOBADQAS 0x04 |
@@ -2232,6 +2288,7 @@ register OS_SPACE_CNT { | |||
2232 | address 0x056 | 2288 | address 0x056 |
2233 | access_mode RO | 2289 | access_mode RO |
2234 | modes M_CFG | 2290 | modes M_CFG |
2291 | count 2 | ||
2235 | } | 2292 | } |
2236 | 2293 | ||
2237 | /* | 2294 | /* |
@@ -2286,13 +2343,19 @@ register NEXTSCB { | |||
2286 | modes M_SCSI | 2343 | modes M_SCSI |
2287 | } | 2344 | } |
2288 | 2345 | ||
2289 | /* Rev B only. */ | 2346 | /* |
2347 | * LQO SCSI Control | ||
2348 | * (Rev B only.) | ||
2349 | */ | ||
2290 | register LQOSCSCTL { | 2350 | register LQOSCSCTL { |
2291 | address 0x05A | 2351 | address 0x05A |
2292 | access_mode RW | 2352 | access_mode RW |
2293 | size 1 | 2353 | size 1 |
2294 | modes M_CFG | 2354 | modes M_CFG |
2355 | count 1 | ||
2295 | field LQOH2A_VERSION 0x80 | 2356 | field LQOH2A_VERSION 0x80 |
2357 | field LQOBUSETDLY 0x40 | ||
2358 | field LQONOHOLDLACK 0x02 | ||
2296 | field LQONOCHKOVER 0x01 | 2359 | field LQONOCHKOVER 0x01 |
2297 | } | 2360 | } |
2298 | 2361 | ||
@@ -2459,6 +2522,7 @@ register NEGPERIOD { | |||
2459 | address 0x061 | 2522 | address 0x061 |
2460 | access_mode RW | 2523 | access_mode RW |
2461 | modes M_SCSI | 2524 | modes M_SCSI |
2525 | count 1 | ||
2462 | } | 2526 | } |
2463 | 2527 | ||
2464 | /* | 2528 | /* |
@@ -2478,6 +2542,7 @@ register NEGOFFSET { | |||
2478 | address 0x062 | 2542 | address 0x062 |
2479 | access_mode RW | 2543 | access_mode RW |
2480 | modes M_SCSI | 2544 | modes M_SCSI |
2545 | count 1 | ||
2481 | } | 2546 | } |
2482 | 2547 | ||
2483 | /* | 2548 | /* |
@@ -2487,6 +2552,7 @@ register NEGPPROPTS { | |||
2487 | address 0x063 | 2552 | address 0x063 |
2488 | access_mode RW | 2553 | access_mode RW |
2489 | modes M_SCSI | 2554 | modes M_SCSI |
2555 | count 1 | ||
2490 | field PPROPT_PACE 0x08 | 2556 | field PPROPT_PACE 0x08 |
2491 | field PPROPT_QAS 0x04 | 2557 | field PPROPT_QAS 0x04 |
2492 | field PPROPT_DT 0x02 | 2558 | field PPROPT_DT 0x02 |
@@ -2516,12 +2582,19 @@ register ANNEXCOL { | |||
2516 | address 0x065 | 2582 | address 0x065 |
2517 | access_mode RW | 2583 | access_mode RW |
2518 | modes M_SCSI | 2584 | modes M_SCSI |
2585 | count 7 | ||
2519 | } | 2586 | } |
2520 | 2587 | ||
2588 | /* | ||
2589 | * SCSI Check | ||
2590 | * (Rev. B only) | ||
2591 | */ | ||
2521 | register SCSCHKN { | 2592 | register SCSCHKN { |
2522 | address 0x066 | 2593 | address 0x066 |
2523 | access_mode RW | 2594 | access_mode RW |
2524 | modes M_CFG | 2595 | modes M_CFG |
2596 | count 1 | ||
2597 | field BIDICHKDIS 0x80 | ||
2525 | field STSELSKIDDIS 0x40 | 2598 | field STSELSKIDDIS 0x40 |
2526 | field CURRFIFODEF 0x20 | 2599 | field CURRFIFODEF 0x20 |
2527 | field WIDERESEN 0x10 | 2600 | field WIDERESEN 0x10 |
@@ -2561,6 +2634,7 @@ register ANNEXDAT { | |||
2561 | address 0x066 | 2634 | address 0x066 |
2562 | access_mode RW | 2635 | access_mode RW |
2563 | modes M_SCSI | 2636 | modes M_SCSI |
2637 | count 3 | ||
2564 | } | 2638 | } |
2565 | 2639 | ||
2566 | /* | 2640 | /* |
@@ -2596,6 +2670,7 @@ register TOWNID { | |||
2596 | address 0x069 | 2670 | address 0x069 |
2597 | access_mode RW | 2671 | access_mode RW |
2598 | modes M_SCSI | 2672 | modes M_SCSI |
2673 | count 2 | ||
2599 | } | 2674 | } |
2600 | 2675 | ||
2601 | /* | 2676 | /* |
@@ -2737,6 +2812,7 @@ register SCBAUTOPTR { | |||
2737 | address 0x0AB | 2812 | address 0x0AB |
2738 | access_mode RW | 2813 | access_mode RW |
2739 | modes M_CFG | 2814 | modes M_CFG |
2815 | count 1 | ||
2740 | field AUSCBPTR_EN 0x80 | 2816 | field AUSCBPTR_EN 0x80 |
2741 | field SCBPTR_ADDR 0x38 | 2817 | field SCBPTR_ADDR 0x38 |
2742 | field SCBPTR_OFF 0x07 | 2818 | field SCBPTR_OFF 0x07 |
@@ -2881,6 +2957,7 @@ register BRDDAT { | |||
2881 | address 0x0B8 | 2957 | address 0x0B8 |
2882 | access_mode RW | 2958 | access_mode RW |
2883 | modes M_SCSI | 2959 | modes M_SCSI |
2960 | count 2 | ||
2884 | } | 2961 | } |
2885 | 2962 | ||
2886 | /* | 2963 | /* |
@@ -2890,6 +2967,7 @@ register BRDCTL { | |||
2890 | address 0x0B9 | 2967 | address 0x0B9 |
2891 | access_mode RW | 2968 | access_mode RW |
2892 | modes M_SCSI | 2969 | modes M_SCSI |
2970 | count 7 | ||
2893 | field FLXARBACK 0x80 | 2971 | field FLXARBACK 0x80 |
2894 | field FLXARBREQ 0x40 | 2972 | field FLXARBREQ 0x40 |
2895 | field BRDADDR 0x38 | 2973 | field BRDADDR 0x38 |
@@ -2905,6 +2983,7 @@ register SEEADR { | |||
2905 | address 0x0BA | 2983 | address 0x0BA |
2906 | access_mode RW | 2984 | access_mode RW |
2907 | modes M_SCSI | 2985 | modes M_SCSI |
2986 | count 4 | ||
2908 | } | 2987 | } |
2909 | 2988 | ||
2910 | /* | 2989 | /* |
@@ -2915,6 +2994,7 @@ register SEEDAT { | |||
2915 | access_mode RW | 2994 | access_mode RW |
2916 | size 2 | 2995 | size 2 |
2917 | modes M_SCSI | 2996 | modes M_SCSI |
2997 | count 4 | ||
2918 | } | 2998 | } |
2919 | 2999 | ||
2920 | /* | 3000 | /* |
@@ -2924,6 +3004,7 @@ register SEESTAT { | |||
2924 | address 0x0BE | 3004 | address 0x0BE |
2925 | access_mode RO | 3005 | access_mode RO |
2926 | modes M_SCSI | 3006 | modes M_SCSI |
3007 | count 1 | ||
2927 | field INIT_DONE 0x80 | 3008 | field INIT_DONE 0x80 |
2928 | field SEEOPCODE 0x70 | 3009 | field SEEOPCODE 0x70 |
2929 | field LDALTID_L 0x08 | 3010 | field LDALTID_L 0x08 |
@@ -2939,6 +3020,7 @@ register SEECTL { | |||
2939 | address 0x0BE | 3020 | address 0x0BE |
2940 | access_mode RW | 3021 | access_mode RW |
2941 | modes M_SCSI | 3022 | modes M_SCSI |
3023 | count 4 | ||
2942 | field SEEOPCODE 0x70 { | 3024 | field SEEOPCODE 0x70 { |
2943 | SEEOP_ERASE 0x70, | 3025 | SEEOP_ERASE 0x70, |
2944 | SEEOP_READ 0x60, | 3026 | SEEOP_READ 0x60, |
@@ -3000,6 +3082,7 @@ register DSPDATACTL { | |||
3000 | address 0x0C1 | 3082 | address 0x0C1 |
3001 | access_mode RW | 3083 | access_mode RW |
3002 | modes M_CFG | 3084 | modes M_CFG |
3085 | count 3 | ||
3003 | field BYPASSENAB 0x80 | 3086 | field BYPASSENAB 0x80 |
3004 | field DESQDIS 0x10 | 3087 | field DESQDIS 0x10 |
3005 | field RCVROFFSTDIS 0x04 | 3088 | field RCVROFFSTDIS 0x04 |
@@ -3058,6 +3141,7 @@ register DSPSELECT { | |||
3058 | address 0x0C4 | 3141 | address 0x0C4 |
3059 | access_mode RW | 3142 | access_mode RW |
3060 | modes M_CFG | 3143 | modes M_CFG |
3144 | count 1 | ||
3061 | field AUTOINCEN 0x80 | 3145 | field AUTOINCEN 0x80 |
3062 | field DSPSEL 0x1F | 3146 | field DSPSEL 0x1F |
3063 | } | 3147 | } |
@@ -3071,6 +3155,7 @@ register WRTBIASCTL { | |||
3071 | address 0x0C5 | 3155 | address 0x0C5 |
3072 | access_mode WO | 3156 | access_mode WO |
3073 | modes M_CFG | 3157 | modes M_CFG |
3158 | count 3 | ||
3074 | field AUTOXBCDIS 0x80 | 3159 | field AUTOXBCDIS 0x80 |
3075 | field XMITMANVAL 0x3F | 3160 | field XMITMANVAL 0x3F |
3076 | } | 3161 | } |
@@ -3196,7 +3281,8 @@ register OVLYADDR { | |||
3196 | */ | 3281 | */ |
3197 | register SEQCTL0 { | 3282 | register SEQCTL0 { |
3198 | address 0x0D6 | 3283 | address 0x0D6 |
3199 | access_mode RW | 3284 | access_mode RW |
3285 | count 11 | ||
3200 | field PERRORDIS 0x80 | 3286 | field PERRORDIS 0x80 |
3201 | field PAUSEDIS 0x40 | 3287 | field PAUSEDIS 0x40 |
3202 | field FAILDIS 0x20 | 3288 | field FAILDIS 0x20 |
@@ -3226,7 +3312,8 @@ register SEQCTL1 { | |||
3226 | */ | 3312 | */ |
3227 | register FLAGS { | 3313 | register FLAGS { |
3228 | address 0x0D8 | 3314 | address 0x0D8 |
3229 | access_mode RO | 3315 | access_mode RO |
3316 | count 23 | ||
3230 | field ZERO 0x02 | 3317 | field ZERO 0x02 |
3231 | field CARRY 0x01 | 3318 | field CARRY 0x01 |
3232 | } | 3319 | } |
@@ -3255,7 +3342,8 @@ register SEQINTCTL { | |||
3255 | */ | 3342 | */ |
3256 | register SEQRAM { | 3343 | register SEQRAM { |
3257 | address 0x0DA | 3344 | address 0x0DA |
3258 | access_mode RW | 3345 | access_mode RW |
3346 | count 2 | ||
3259 | } | 3347 | } |
3260 | 3348 | ||
3261 | /* | 3349 | /* |
@@ -3266,6 +3354,7 @@ register PRGMCNT { | |||
3266 | address 0x0DE | 3354 | address 0x0DE |
3267 | access_mode RW | 3355 | access_mode RW |
3268 | size 2 | 3356 | size 2 |
3357 | count 5 | ||
3269 | } | 3358 | } |
3270 | 3359 | ||
3271 | /* | 3360 | /* |
@@ -3273,7 +3362,7 @@ register PRGMCNT { | |||
3273 | */ | 3362 | */ |
3274 | register ACCUM { | 3363 | register ACCUM { |
3275 | address 0x0E0 | 3364 | address 0x0E0 |
3276 | access_mode RW | 3365 | access_mode RW |
3277 | accumulator | 3366 | accumulator |
3278 | } | 3367 | } |
3279 | 3368 | ||
@@ -3401,6 +3490,7 @@ register INTVEC1_ADDR { | |||
3401 | access_mode RW | 3490 | access_mode RW |
3402 | size 2 | 3491 | size 2 |
3403 | modes M_CFG | 3492 | modes M_CFG |
3493 | count 1 | ||
3404 | } | 3494 | } |
3405 | 3495 | ||
3406 | /* | 3496 | /* |
@@ -3412,6 +3502,7 @@ register CURADDR { | |||
3412 | access_mode RW | 3502 | access_mode RW |
3413 | size 2 | 3503 | size 2 |
3414 | modes M_SCSI | 3504 | modes M_SCSI |
3505 | count 2 | ||
3415 | } | 3506 | } |
3416 | 3507 | ||
3417 | /* | 3508 | /* |
@@ -3423,6 +3514,7 @@ register INTVEC2_ADDR { | |||
3423 | access_mode RW | 3514 | access_mode RW |
3424 | size 2 | 3515 | size 2 |
3425 | modes M_CFG | 3516 | modes M_CFG |
3517 | count 1 | ||
3426 | } | 3518 | } |
3427 | 3519 | ||
3428 | /* | 3520 | /* |
@@ -3579,6 +3671,7 @@ scratch_ram { | |||
3579 | /* Parameters for DMA Logic */ | 3671 | /* Parameters for DMA Logic */ |
3580 | DMAPARAMS { | 3672 | DMAPARAMS { |
3581 | size 1 | 3673 | size 1 |
3674 | count 8 | ||
3582 | field PRELOADEN 0x80 | 3675 | field PRELOADEN 0x80 |
3583 | field WIDEODD 0x40 | 3676 | field WIDEODD 0x40 |
3584 | field SCSIEN 0x20 | 3677 | field SCSIEN 0x20 |
@@ -3648,9 +3741,11 @@ scratch_ram { | |||
3648 | */ | 3741 | */ |
3649 | KERNEL_TQINPOS { | 3742 | KERNEL_TQINPOS { |
3650 | size 1 | 3743 | size 1 |
3744 | count 1 | ||
3651 | } | 3745 | } |
3652 | TQINPOS { | 3746 | TQINPOS { |
3653 | size 1 | 3747 | size 1 |
3748 | count 8 | ||
3654 | } | 3749 | } |
3655 | /* | 3750 | /* |
3656 | * Base address of our shared data with the kernel driver in host | 3751 | * Base address of our shared data with the kernel driver in host |
@@ -3681,6 +3776,7 @@ scratch_ram { | |||
3681 | } | 3776 | } |
3682 | ARG_2 { | 3777 | ARG_2 { |
3683 | size 1 | 3778 | size 1 |
3779 | count 1 | ||
3684 | alias RETURN_2 | 3780 | alias RETURN_2 |
3685 | } | 3781 | } |
3686 | 3782 | ||
@@ -3698,6 +3794,7 @@ scratch_ram { | |||
3698 | */ | 3794 | */ |
3699 | SCSISEQ_TEMPLATE { | 3795 | SCSISEQ_TEMPLATE { |
3700 | size 1 | 3796 | size 1 |
3797 | count 7 | ||
3701 | field MANUALCTL 0x40 | 3798 | field MANUALCTL 0x40 |
3702 | field ENSELI 0x20 | 3799 | field ENSELI 0x20 |
3703 | field ENRSELI 0x10 | 3800 | field ENRSELI 0x10 |
@@ -3711,6 +3808,7 @@ scratch_ram { | |||
3711 | */ | 3808 | */ |
3712 | INITIATOR_TAG { | 3809 | INITIATOR_TAG { |
3713 | size 1 | 3810 | size 1 |
3811 | count 1 | ||
3714 | } | 3812 | } |
3715 | 3813 | ||
3716 | SEQ_FLAGS2 { | 3814 | SEQ_FLAGS2 { |
@@ -3777,6 +3875,7 @@ scratch_ram { | |||
3777 | */ | 3875 | */ |
3778 | CMDSIZE_TABLE { | 3876 | CMDSIZE_TABLE { |
3779 | size 8 | 3877 | size 8 |
3878 | count 8 | ||
3780 | } | 3879 | } |
3781 | /* | 3880 | /* |
3782 | * When an SCB with the MK_MESSAGE flag is | 3881 | * When an SCB with the MK_MESSAGE flag is |
@@ -3803,8 +3902,8 @@ scratch_ram { | |||
3803 | /************************* Hardware SCB Definition ****************************/ | 3902 | /************************* Hardware SCB Definition ****************************/ |
3804 | scb { | 3903 | scb { |
3805 | address 0x180 | 3904 | address 0x180 |
3806 | size 64 | 3905 | size 64 |
3807 | modes 0, 1, 2, 3 | 3906 | modes 0, 1, 2, 3 |
3808 | SCB_RESIDUAL_DATACNT { | 3907 | SCB_RESIDUAL_DATACNT { |
3809 | size 4 | 3908 | size 4 |
3810 | alias SCB_CDB_STORE | 3909 | alias SCB_CDB_STORE |
diff --git a/drivers/scsi/aic7xxx/aic7xxx.reg b/drivers/scsi/aic7xxx/aic7xxx.reg index 2a103534df9f..0d2f763c3427 100644 --- a/drivers/scsi/aic7xxx/aic7xxx.reg +++ b/drivers/scsi/aic7xxx/aic7xxx.reg | |||
@@ -238,6 +238,7 @@ register SXFRCTL2 { | |||
238 | register OPTIONMODE { | 238 | register OPTIONMODE { |
239 | address 0x008 | 239 | address 0x008 |
240 | access_mode RW | 240 | access_mode RW |
241 | count 2 | ||
241 | field AUTORATEEN 0x80 | 242 | field AUTORATEEN 0x80 |
242 | field AUTOACKEN 0x40 | 243 | field AUTOACKEN 0x40 |
243 | field ATNMGMNTEN 0x20 | 244 | field ATNMGMNTEN 0x20 |
@@ -254,6 +255,7 @@ register TARGCRCCNT { | |||
254 | address 0x00a | 255 | address 0x00a |
255 | size 2 | 256 | size 2 |
256 | access_mode RW | 257 | access_mode RW |
258 | count 2 | ||
257 | } | 259 | } |
258 | 260 | ||
259 | /* | 261 | /* |
@@ -344,6 +346,7 @@ register SSTAT2 { | |||
344 | register SSTAT3 { | 346 | register SSTAT3 { |
345 | address 0x00e | 347 | address 0x00e |
346 | access_mode RO | 348 | access_mode RO |
349 | count 2 | ||
347 | mask SCSICNT 0xf0 | 350 | mask SCSICNT 0xf0 |
348 | mask OFFCNT 0x0f | 351 | mask OFFCNT 0x0f |
349 | mask U2OFFCNT 0x7f | 352 | mask U2OFFCNT 0x7f |
@@ -367,6 +370,7 @@ register SCSIID_ULTRA2 { | |||
367 | register SIMODE0 { | 370 | register SIMODE0 { |
368 | address 0x010 | 371 | address 0x010 |
369 | access_mode RW | 372 | access_mode RW |
373 | count 2 | ||
370 | field ENSELDO 0x40 | 374 | field ENSELDO 0x40 |
371 | field ENSELDI 0x20 | 375 | field ENSELDI 0x20 |
372 | field ENSELINGO 0x10 | 376 | field ENSELINGO 0x10 |
@@ -429,6 +433,7 @@ register SHADDR { | |||
429 | register SELTIMER { | 433 | register SELTIMER { |
430 | address 0x018 | 434 | address 0x018 |
431 | access_mode RW | 435 | access_mode RW |
436 | count 1 | ||
432 | field STAGE6 0x20 | 437 | field STAGE6 0x20 |
433 | field STAGE5 0x10 | 438 | field STAGE5 0x10 |
434 | field STAGE4 0x08 | 439 | field STAGE4 0x08 |
@@ -467,6 +472,7 @@ register TARGID { | |||
467 | address 0x01b | 472 | address 0x01b |
468 | size 2 | 473 | size 2 |
469 | access_mode RW | 474 | access_mode RW |
475 | count 14 | ||
470 | } | 476 | } |
471 | 477 | ||
472 | /* | 478 | /* |
@@ -480,6 +486,7 @@ register TARGID { | |||
480 | register SPIOCAP { | 486 | register SPIOCAP { |
481 | address 0x01b | 487 | address 0x01b |
482 | access_mode RW | 488 | access_mode RW |
489 | count 10 | ||
483 | field SOFT1 0x80 | 490 | field SOFT1 0x80 |
484 | field SOFT0 0x40 | 491 | field SOFT0 0x40 |
485 | field SOFTCMDEN 0x20 | 492 | field SOFTCMDEN 0x20 |
@@ -492,6 +499,7 @@ register SPIOCAP { | |||
492 | 499 | ||
493 | register BRDCTL { | 500 | register BRDCTL { |
494 | address 0x01d | 501 | address 0x01d |
502 | count 11 | ||
495 | field BRDDAT7 0x80 | 503 | field BRDDAT7 0x80 |
496 | field BRDDAT6 0x40 | 504 | field BRDDAT6 0x40 |
497 | field BRDDAT5 0x20 | 505 | field BRDDAT5 0x20 |
@@ -534,6 +542,7 @@ register BRDCTL { | |||
534 | */ | 542 | */ |
535 | register SEECTL { | 543 | register SEECTL { |
536 | address 0x01e | 544 | address 0x01e |
545 | count 11 | ||
537 | field EXTARBACK 0x80 | 546 | field EXTARBACK 0x80 |
538 | field EXTARBREQ 0x40 | 547 | field EXTARBREQ 0x40 |
539 | field SEEMS 0x20 | 548 | field SEEMS 0x20 |
@@ -570,6 +579,7 @@ register SBLKCTL { | |||
570 | register SEQCTL { | 579 | register SEQCTL { |
571 | address 0x060 | 580 | address 0x060 |
572 | access_mode RW | 581 | access_mode RW |
582 | count 15 | ||
573 | field PERRORDIS 0x80 | 583 | field PERRORDIS 0x80 |
574 | field PAUSEDIS 0x40 | 584 | field PAUSEDIS 0x40 |
575 | field FAILDIS 0x20 | 585 | field FAILDIS 0x20 |
@@ -590,6 +600,7 @@ register SEQCTL { | |||
590 | register SEQRAM { | 600 | register SEQRAM { |
591 | address 0x061 | 601 | address 0x061 |
592 | access_mode RW | 602 | access_mode RW |
603 | count 2 | ||
593 | } | 604 | } |
594 | 605 | ||
595 | /* | 606 | /* |
@@ -604,6 +615,7 @@ register SEQADDR0 { | |||
604 | register SEQADDR1 { | 615 | register SEQADDR1 { |
605 | address 0x063 | 616 | address 0x063 |
606 | access_mode RW | 617 | access_mode RW |
618 | count 8 | ||
607 | mask SEQADDR1_MASK 0x01 | 619 | mask SEQADDR1_MASK 0x01 |
608 | } | 620 | } |
609 | 621 | ||
@@ -649,6 +661,7 @@ register NONE { | |||
649 | register FLAGS { | 661 | register FLAGS { |
650 | address 0x06b | 662 | address 0x06b |
651 | access_mode RO | 663 | access_mode RO |
664 | count 18 | ||
652 | field ZERO 0x02 | 665 | field ZERO 0x02 |
653 | field CARRY 0x01 | 666 | field CARRY 0x01 |
654 | } | 667 | } |
@@ -671,6 +684,7 @@ register FUNCTION1 { | |||
671 | register STACK { | 684 | register STACK { |
672 | address 0x06f | 685 | address 0x06f |
673 | access_mode RO | 686 | access_mode RO |
687 | count 5 | ||
674 | } | 688 | } |
675 | 689 | ||
676 | const STACK_SIZE 4 | 690 | const STACK_SIZE 4 |
@@ -692,6 +706,7 @@ register BCTL { | |||
692 | register DSCOMMAND0 { | 706 | register DSCOMMAND0 { |
693 | address 0x084 | 707 | address 0x084 |
694 | access_mode RW | 708 | access_mode RW |
709 | count 7 | ||
695 | field CACHETHEN 0x80 /* Cache Threshold enable */ | 710 | field CACHETHEN 0x80 /* Cache Threshold enable */ |
696 | field DPARCKEN 0x40 /* Data Parity Check Enable */ | 711 | field DPARCKEN 0x40 /* Data Parity Check Enable */ |
697 | field MPARCKEN 0x20 /* Memory Parity Check Enable */ | 712 | field MPARCKEN 0x20 /* Memory Parity Check Enable */ |
@@ -717,6 +732,7 @@ register DSCOMMAND1 { | |||
717 | register BUSTIME { | 732 | register BUSTIME { |
718 | address 0x085 | 733 | address 0x085 |
719 | access_mode RW | 734 | access_mode RW |
735 | count 2 | ||
720 | mask BOFF 0xf0 | 736 | mask BOFF 0xf0 |
721 | mask BON 0x0f | 737 | mask BON 0x0f |
722 | } | 738 | } |
@@ -727,6 +743,7 @@ register BUSTIME { | |||
727 | register BUSSPD { | 743 | register BUSSPD { |
728 | address 0x086 | 744 | address 0x086 |
729 | access_mode RW | 745 | access_mode RW |
746 | count 2 | ||
730 | mask DFTHRSH 0xc0 | 747 | mask DFTHRSH 0xc0 |
731 | mask STBOFF 0x38 | 748 | mask STBOFF 0x38 |
732 | mask STBON 0x07 | 749 | mask STBON 0x07 |
@@ -737,6 +754,7 @@ register BUSSPD { | |||
737 | /* aic7850/55/60/70/80/95 only */ | 754 | /* aic7850/55/60/70/80/95 only */ |
738 | register DSPCISTATUS { | 755 | register DSPCISTATUS { |
739 | address 0x086 | 756 | address 0x086 |
757 | count 4 | ||
740 | mask DFTHRSH_100 0xc0 | 758 | mask DFTHRSH_100 0xc0 |
741 | } | 759 | } |
742 | 760 | ||
@@ -758,6 +776,7 @@ const SEQ_MAILBOX_SHIFT 0 | |||
758 | register HCNTRL { | 776 | register HCNTRL { |
759 | address 0x087 | 777 | address 0x087 |
760 | access_mode RW | 778 | access_mode RW |
779 | count 14 | ||
761 | field POWRDN 0x40 | 780 | field POWRDN 0x40 |
762 | field SWINT 0x10 | 781 | field SWINT 0x10 |
763 | field IRQMS 0x08 | 782 | field IRQMS 0x08 |
@@ -869,6 +888,7 @@ register INTSTAT { | |||
869 | register ERROR { | 888 | register ERROR { |
870 | address 0x092 | 889 | address 0x092 |
871 | access_mode RO | 890 | access_mode RO |
891 | count 26 | ||
872 | field CIOPARERR 0x80 /* Ultra2 only */ | 892 | field CIOPARERR 0x80 /* Ultra2 only */ |
873 | field PCIERRSTAT 0x40 /* PCI only */ | 893 | field PCIERRSTAT 0x40 /* PCI only */ |
874 | field MPARERR 0x20 /* PCI only */ | 894 | field MPARERR 0x20 /* PCI only */ |
@@ -885,6 +905,7 @@ register ERROR { | |||
885 | register CLRINT { | 905 | register CLRINT { |
886 | address 0x092 | 906 | address 0x092 |
887 | access_mode WO | 907 | access_mode WO |
908 | count 24 | ||
888 | field CLRPARERR 0x10 /* PCI only */ | 909 | field CLRPARERR 0x10 /* PCI only */ |
889 | field CLRBRKADRINT 0x08 | 910 | field CLRBRKADRINT 0x08 |
890 | field CLRSCSIINT 0x04 | 911 | field CLRSCSIINT 0x04 |
@@ -943,6 +964,7 @@ register DFDAT { | |||
943 | register SCBCNT { | 964 | register SCBCNT { |
944 | address 0x09a | 965 | address 0x09a |
945 | access_mode RW | 966 | access_mode RW |
967 | count 1 | ||
946 | field SCBAUTO 0x80 | 968 | field SCBAUTO 0x80 |
947 | mask SCBCNT_MASK 0x1f | 969 | mask SCBCNT_MASK 0x1f |
948 | } | 970 | } |
@@ -954,6 +976,7 @@ register SCBCNT { | |||
954 | register QINFIFO { | 976 | register QINFIFO { |
955 | address 0x09b | 977 | address 0x09b |
956 | access_mode RW | 978 | access_mode RW |
979 | count 12 | ||
957 | } | 980 | } |
958 | 981 | ||
959 | /* | 982 | /* |
@@ -972,11 +995,13 @@ register QINCNT { | |||
972 | register QOUTFIFO { | 995 | register QOUTFIFO { |
973 | address 0x09d | 996 | address 0x09d |
974 | access_mode WO | 997 | access_mode WO |
998 | count 7 | ||
975 | } | 999 | } |
976 | 1000 | ||
977 | register CRCCONTROL1 { | 1001 | register CRCCONTROL1 { |
978 | address 0x09d | 1002 | address 0x09d |
979 | access_mode RW | 1003 | access_mode RW |
1004 | count 3 | ||
980 | field CRCONSEEN 0x80 | 1005 | field CRCONSEEN 0x80 |
981 | field CRCVALCHKEN 0x40 | 1006 | field CRCVALCHKEN 0x40 |
982 | field CRCENDCHKEN 0x20 | 1007 | field CRCENDCHKEN 0x20 |
@@ -1013,6 +1038,7 @@ register SCSIPHASE { | |||
1013 | register SFUNCT { | 1038 | register SFUNCT { |
1014 | address 0x09f | 1039 | address 0x09f |
1015 | access_mode RW | 1040 | access_mode RW |
1041 | count 4 | ||
1016 | field ALT_MODE 0x80 | 1042 | field ALT_MODE 0x80 |
1017 | } | 1043 | } |
1018 | 1044 | ||
@@ -1095,6 +1121,7 @@ scb { | |||
1095 | } | 1121 | } |
1096 | SCB_SCSIOFFSET { | 1122 | SCB_SCSIOFFSET { |
1097 | size 1 | 1123 | size 1 |
1124 | count 1 | ||
1098 | } | 1125 | } |
1099 | SCB_NEXT { | 1126 | SCB_NEXT { |
1100 | size 1 | 1127 | size 1 |
@@ -1118,6 +1145,7 @@ const SG_SIZEOF 0x08 /* sizeof(struct ahc_dma) */ | |||
1118 | register SEECTL_2840 { | 1145 | register SEECTL_2840 { |
1119 | address 0x0c0 | 1146 | address 0x0c0 |
1120 | access_mode RW | 1147 | access_mode RW |
1148 | count 2 | ||
1121 | field CS_2840 0x04 | 1149 | field CS_2840 0x04 |
1122 | field CK_2840 0x02 | 1150 | field CK_2840 0x02 |
1123 | field DO_2840 0x01 | 1151 | field DO_2840 0x01 |
@@ -1126,6 +1154,7 @@ register SEECTL_2840 { | |||
1126 | register STATUS_2840 { | 1154 | register STATUS_2840 { |
1127 | address 0x0c1 | 1155 | address 0x0c1 |
1128 | access_mode RW | 1156 | access_mode RW |
1157 | count 4 | ||
1129 | field EEPROM_TF 0x80 | 1158 | field EEPROM_TF 0x80 |
1130 | mask BIOS_SEL 0x60 | 1159 | mask BIOS_SEL 0x60 |
1131 | mask ADSEL 0x1e | 1160 | mask ADSEL 0x1e |
@@ -1161,6 +1190,7 @@ register CCSGCTL { | |||
1161 | 1190 | ||
1162 | register CCSCBCNT { | 1191 | register CCSCBCNT { |
1163 | address 0xEF | 1192 | address 0xEF |
1193 | count 1 | ||
1164 | } | 1194 | } |
1165 | 1195 | ||
1166 | register CCSCBCTL { | 1196 | register CCSCBCTL { |
@@ -1187,6 +1217,7 @@ register CCSCBRAM { | |||
1187 | register SCBBADDR { | 1217 | register SCBBADDR { |
1188 | address 0x0F0 | 1218 | address 0x0F0 |
1189 | access_mode RW | 1219 | access_mode RW |
1220 | count 3 | ||
1190 | } | 1221 | } |
1191 | 1222 | ||
1192 | register CCSCBPTR { | 1223 | register CCSCBPTR { |
@@ -1195,6 +1226,7 @@ register CCSCBPTR { | |||
1195 | 1226 | ||
1196 | register HNSCB_QOFF { | 1227 | register HNSCB_QOFF { |
1197 | address 0x0F4 | 1228 | address 0x0F4 |
1229 | count 4 | ||
1198 | } | 1230 | } |
1199 | 1231 | ||
1200 | register SNSCB_QOFF { | 1232 | register SNSCB_QOFF { |
@@ -1234,6 +1266,7 @@ register DFF_THRSH { | |||
1234 | mask WR_DFTHRSH_85 0x50 | 1266 | mask WR_DFTHRSH_85 0x50 |
1235 | mask WR_DFTHRSH_90 0x60 | 1267 | mask WR_DFTHRSH_90 0x60 |
1236 | mask WR_DFTHRSH_MAX 0x70 | 1268 | mask WR_DFTHRSH_MAX 0x70 |
1269 | count 4 | ||
1237 | } | 1270 | } |
1238 | 1271 | ||
1239 | register SG_CACHE_PRE { | 1272 | register SG_CACHE_PRE { |
@@ -1287,6 +1320,7 @@ scratch_ram { | |||
1287 | ULTRA_ENB { | 1320 | ULTRA_ENB { |
1288 | alias CMDSIZE_TABLE | 1321 | alias CMDSIZE_TABLE |
1289 | size 2 | 1322 | size 2 |
1323 | count 2 | ||
1290 | } | 1324 | } |
1291 | /* | 1325 | /* |
1292 | * Bit vector of targets that have disconnection disabled as set by | 1326 | * Bit vector of targets that have disconnection disabled as set by |
@@ -1296,6 +1330,7 @@ scratch_ram { | |||
1296 | */ | 1330 | */ |
1297 | DISC_DSB { | 1331 | DISC_DSB { |
1298 | size 2 | 1332 | size 2 |
1333 | count 6 | ||
1299 | } | 1334 | } |
1300 | CMDSIZE_TABLE_TAIL { | 1335 | CMDSIZE_TABLE_TAIL { |
1301 | size 4 | 1336 | size 4 |
@@ -1323,6 +1358,7 @@ scratch_ram { | |||
1323 | /* Parameters for DMA Logic */ | 1358 | /* Parameters for DMA Logic */ |
1324 | DMAPARAMS { | 1359 | DMAPARAMS { |
1325 | size 1 | 1360 | size 1 |
1361 | count 12 | ||
1326 | field PRELOADEN 0x80 | 1362 | field PRELOADEN 0x80 |
1327 | field WIDEODD 0x40 | 1363 | field WIDEODD 0x40 |
1328 | field SCSIEN 0x20 | 1364 | field SCSIEN 0x20 |
@@ -1441,6 +1477,7 @@ scratch_ram { | |||
1441 | } | 1477 | } |
1442 | ARG_1 { | 1478 | ARG_1 { |
1443 | size 1 | 1479 | size 1 |
1480 | count 1 | ||
1444 | mask SEND_MSG 0x80 | 1481 | mask SEND_MSG 0x80 |
1445 | mask SEND_SENSE 0x40 | 1482 | mask SEND_SENSE 0x40 |
1446 | mask SEND_REJ 0x20 | 1483 | mask SEND_REJ 0x20 |
@@ -1495,6 +1532,7 @@ scratch_ram { | |||
1495 | size 1 | 1532 | size 1 |
1496 | field HA_274_EXTENDED_TRANS 0x01 | 1533 | field HA_274_EXTENDED_TRANS 0x01 |
1497 | alias INITIATOR_TAG | 1534 | alias INITIATOR_TAG |
1535 | count 1 | ||
1498 | } | 1536 | } |
1499 | 1537 | ||
1500 | SEQ_FLAGS2 { | 1538 | SEQ_FLAGS2 { |
@@ -1518,6 +1556,7 @@ scratch_ram { | |||
1518 | */ | 1556 | */ |
1519 | SCSICONF { | 1557 | SCSICONF { |
1520 | size 1 | 1558 | size 1 |
1559 | count 12 | ||
1521 | field TERM_ENB 0x80 | 1560 | field TERM_ENB 0x80 |
1522 | field RESET_SCSI 0x40 | 1561 | field RESET_SCSI 0x40 |
1523 | field ENSPCHK 0x20 | 1562 | field ENSPCHK 0x20 |
@@ -1527,16 +1566,19 @@ scratch_ram { | |||
1527 | INTDEF { | 1566 | INTDEF { |
1528 | address 0x05c | 1567 | address 0x05c |
1529 | size 1 | 1568 | size 1 |
1569 | count 1 | ||
1530 | field EDGE_TRIG 0x80 | 1570 | field EDGE_TRIG 0x80 |
1531 | mask VECTOR 0x0f | 1571 | mask VECTOR 0x0f |
1532 | } | 1572 | } |
1533 | HOSTCONF { | 1573 | HOSTCONF { |
1534 | address 0x05d | 1574 | address 0x05d |
1535 | size 1 | 1575 | size 1 |
1576 | count 1 | ||
1536 | } | 1577 | } |
1537 | HA_274_BIOSCTRL { | 1578 | HA_274_BIOSCTRL { |
1538 | address 0x05f | 1579 | address 0x05f |
1539 | size 1 | 1580 | size 1 |
1581 | count 1 | ||
1540 | mask BIOSMODE 0x30 | 1582 | mask BIOSMODE 0x30 |
1541 | mask BIOSDISABLED 0x30 | 1583 | mask BIOSDISABLED 0x30 |
1542 | field CHANNEL_B_PRIMARY 0x08 | 1584 | field CHANNEL_B_PRIMARY 0x08 |
@@ -1552,6 +1594,7 @@ scratch_ram { | |||
1552 | */ | 1594 | */ |
1553 | TARG_OFFSET { | 1595 | TARG_OFFSET { |
1554 | size 16 | 1596 | size 16 |
1597 | count 1 | ||
1555 | } | 1598 | } |
1556 | } | 1599 | } |
1557 | 1600 | ||
diff --git a/drivers/scsi/aic7xxx/aicasm/aicasm.c b/drivers/scsi/aic7xxx/aicasm/aicasm.c index 924102720b14..e4a778720301 100644 --- a/drivers/scsi/aic7xxx/aicasm/aicasm.c +++ b/drivers/scsi/aic7xxx/aicasm/aicasm.c | |||
@@ -362,7 +362,7 @@ output_code() | |||
362 | " *\n" | 362 | " *\n" |
363 | "%s */\n", versions); | 363 | "%s */\n", versions); |
364 | 364 | ||
365 | fprintf(ofile, "static uint8_t seqprog[] = {\n"); | 365 | fprintf(ofile, "static const uint8_t seqprog[] = {\n"); |
366 | for (cur_instr = STAILQ_FIRST(&seq_program); | 366 | for (cur_instr = STAILQ_FIRST(&seq_program); |
367 | cur_instr != NULL; | 367 | cur_instr != NULL; |
368 | cur_instr = STAILQ_NEXT(cur_instr, links)) { | 368 | cur_instr = STAILQ_NEXT(cur_instr, links)) { |
@@ -415,7 +415,7 @@ output_code() | |||
415 | } | 415 | } |
416 | 416 | ||
417 | fprintf(ofile, | 417 | fprintf(ofile, |
418 | "static struct patch {\n" | 418 | "static const struct patch {\n" |
419 | " %spatch_func_t *patch_func;\n" | 419 | " %spatch_func_t *patch_func;\n" |
420 | " uint32_t begin :10,\n" | 420 | " uint32_t begin :10,\n" |
421 | " skip_instr :10,\n" | 421 | " skip_instr :10,\n" |
@@ -435,7 +435,7 @@ output_code() | |||
435 | fprintf(ofile, "\n};\n\n"); | 435 | fprintf(ofile, "\n};\n\n"); |
436 | 436 | ||
437 | fprintf(ofile, | 437 | fprintf(ofile, |
438 | "static struct cs {\n" | 438 | "static const struct cs {\n" |
439 | " uint16_t begin;\n" | 439 | " uint16_t begin;\n" |
440 | " uint16_t end;\n" | 440 | " uint16_t end;\n" |
441 | "} critical_sections[] = {\n"); | 441 | "} critical_sections[] = {\n"); |
diff --git a/drivers/scsi/aic7xxx/aicasm/aicasm_gram.y b/drivers/scsi/aic7xxx/aicasm/aicasm_gram.y index e1079dd3cc28..81be6a261cc8 100644 --- a/drivers/scsi/aic7xxx/aicasm/aicasm_gram.y +++ b/drivers/scsi/aic7xxx/aicasm/aicasm_gram.y | |||
@@ -143,6 +143,8 @@ void yyerror(const char *string); | |||
143 | 143 | ||
144 | %token <value> T_ADDRESS | 144 | %token <value> T_ADDRESS |
145 | 145 | ||
146 | %token T_COUNT | ||
147 | |||
146 | %token T_ACCESS_MODE | 148 | %token T_ACCESS_MODE |
147 | 149 | ||
148 | %token T_MODES | 150 | %token T_MODES |
@@ -353,6 +355,7 @@ reg_attribute_list: | |||
353 | reg_attribute: | 355 | reg_attribute: |
354 | reg_address | 356 | reg_address |
355 | | size | 357 | | size |
358 | | count | ||
356 | | access_mode | 359 | | access_mode |
357 | | modes | 360 | | modes |
358 | | field_defn | 361 | | field_defn |
@@ -393,6 +396,13 @@ size: | |||
393 | } | 396 | } |
394 | ; | 397 | ; |
395 | 398 | ||
399 | count: | ||
400 | T_COUNT T_NUMBER | ||
401 | { | ||
402 | cur_symbol->count += $2; | ||
403 | } | ||
404 | ; | ||
405 | |||
396 | access_mode: | 406 | access_mode: |
397 | T_ACCESS_MODE T_MODE | 407 | T_ACCESS_MODE T_MODE |
398 | { | 408 | { |
@@ -801,6 +811,7 @@ scratch_ram: | |||
801 | cur_symtype = SRAMLOC; | 811 | cur_symtype = SRAMLOC; |
802 | cur_symbol->type = SRAMLOC; | 812 | cur_symbol->type = SRAMLOC; |
803 | initialize_symbol(cur_symbol); | 813 | initialize_symbol(cur_symbol); |
814 | cur_symbol->count += 1; | ||
804 | } | 815 | } |
805 | reg_address | 816 | reg_address |
806 | { | 817 | { |
@@ -832,6 +843,7 @@ scb: | |||
832 | initialize_symbol(cur_symbol); | 843 | initialize_symbol(cur_symbol); |
833 | /* 64 bytes of SCB space */ | 844 | /* 64 bytes of SCB space */ |
834 | cur_symbol->info.rinfo->size = 64; | 845 | cur_symbol->info.rinfo->size = 64; |
846 | cur_symbol->count += 1; | ||
835 | } | 847 | } |
836 | reg_address | 848 | reg_address |
837 | { | 849 | { |
diff --git a/drivers/scsi/aic7xxx/aicasm/aicasm_scan.l b/drivers/scsi/aic7xxx/aicasm/aicasm_scan.l index 62b6c1bc82c6..2c7f02daf88d 100644 --- a/drivers/scsi/aic7xxx/aicasm/aicasm_scan.l +++ b/drivers/scsi/aic7xxx/aicasm/aicasm_scan.l | |||
@@ -162,6 +162,7 @@ register { return T_REGISTER; } | |||
162 | const { yylval.value = FALSE; return T_CONST; } | 162 | const { yylval.value = FALSE; return T_CONST; } |
163 | download { return T_DOWNLOAD; } | 163 | download { return T_DOWNLOAD; } |
164 | address { return T_ADDRESS; } | 164 | address { return T_ADDRESS; } |
165 | count { return T_COUNT; } | ||
165 | access_mode { return T_ACCESS_MODE; } | 166 | access_mode { return T_ACCESS_MODE; } |
166 | modes { return T_MODES; } | 167 | modes { return T_MODES; } |
167 | RW|RO|WO { | 168 | RW|RO|WO { |
diff --git a/drivers/scsi/aic7xxx/aicasm/aicasm_symbol.c b/drivers/scsi/aic7xxx/aicasm/aicasm_symbol.c index f1f448dff569..fcd357872b43 100644 --- a/drivers/scsi/aic7xxx/aicasm/aicasm_symbol.c +++ b/drivers/scsi/aic7xxx/aicasm/aicasm_symbol.c | |||
@@ -77,6 +77,7 @@ symbol_create(char *name) | |||
77 | if (new_symbol->name == NULL) | 77 | if (new_symbol->name == NULL) |
78 | stop("Unable to strdup symbol name", EX_SOFTWARE); | 78 | stop("Unable to strdup symbol name", EX_SOFTWARE); |
79 | new_symbol->type = UNINITIALIZED; | 79 | new_symbol->type = UNINITIALIZED; |
80 | new_symbol->count = 1; | ||
80 | return (new_symbol); | 81 | return (new_symbol); |
81 | } | 82 | } |
82 | 83 | ||
@@ -198,6 +199,12 @@ symtable_get(char *name) | |||
198 | } | 199 | } |
199 | } | 200 | } |
200 | memcpy(&stored_ptr, data.data, sizeof(stored_ptr)); | 201 | memcpy(&stored_ptr, data.data, sizeof(stored_ptr)); |
202 | stored_ptr->count++; | ||
203 | data.data = &stored_ptr; | ||
204 | if (symtable->put(symtable, &key, &data, /*flags*/0) !=0) { | ||
205 | perror("Symtable put failed"); | ||
206 | exit(EX_SOFTWARE); | ||
207 | } | ||
201 | return (stored_ptr); | 208 | return (stored_ptr); |
202 | } | 209 | } |
203 | 210 | ||
@@ -256,7 +263,7 @@ symlist_add(symlist_t *symlist, symbol_t *symbol, int how) | |||
256 | && (curnode->symbol->info.finfo->value > | 263 | && (curnode->symbol->info.finfo->value > |
257 | newnode->symbol->info.finfo->value)))) | 264 | newnode->symbol->info.finfo->value)))) |
258 | || (!field && (curnode->symbol->info.rinfo->address > | 265 | || (!field && (curnode->symbol->info.rinfo->address > |
259 | newnode->symbol->info.rinfo->address))) { | 266 | newnode->symbol->info.rinfo->address))) { |
260 | SLIST_INSERT_HEAD(symlist, newnode, links); | 267 | SLIST_INSERT_HEAD(symlist, newnode, links); |
261 | return; | 268 | return; |
262 | } | 269 | } |
@@ -271,7 +278,7 @@ symlist_add(symlist_t *symlist, symbol_t *symbol, int how) | |||
271 | 278 | ||
272 | cursymbol = SLIST_NEXT(curnode, links)->symbol; | 279 | cursymbol = SLIST_NEXT(curnode, links)->symbol; |
273 | if ((field | 280 | if ((field |
274 | && (cursymbol->type > symbol->type | 281 | && (cursymbol->type > symbol->type |
275 | || (cursymbol->type == symbol->type | 282 | || (cursymbol->type == symbol->type |
276 | && (cursymbol->info.finfo->value > | 283 | && (cursymbol->info.finfo->value > |
277 | symbol->info.finfo->value)))) | 284 | symbol->info.finfo->value)))) |
@@ -351,7 +358,7 @@ aic_print_reg_dump_types(FILE *ofile) | |||
351 | { | 358 | { |
352 | if (ofile == NULL) | 359 | if (ofile == NULL) |
353 | return; | 360 | return; |
354 | 361 | ||
355 | fprintf(ofile, | 362 | fprintf(ofile, |
356 | "typedef int (%sreg_print_t)(u_int, u_int *, u_int);\n" | 363 | "typedef int (%sreg_print_t)(u_int, u_int *, u_int);\n" |
357 | "typedef struct %sreg_parse_entry {\n" | 364 | "typedef struct %sreg_parse_entry {\n" |
@@ -370,7 +377,7 @@ aic_print_reg_dump_start(FILE *dfile, symbol_node_t *regnode) | |||
370 | return; | 377 | return; |
371 | 378 | ||
372 | fprintf(dfile, | 379 | fprintf(dfile, |
373 | "static %sreg_parse_entry_t %s_parse_table[] = {\n", | 380 | "static const %sreg_parse_entry_t %s_parse_table[] = {\n", |
374 | prefix, | 381 | prefix, |
375 | regnode->symbol->name); | 382 | regnode->symbol->name); |
376 | } | 383 | } |
@@ -385,7 +392,7 @@ aic_print_reg_dump_end(FILE *ofile, FILE *dfile, | |||
385 | lower_name = strdup(regnode->symbol->name); | 392 | lower_name = strdup(regnode->symbol->name); |
386 | if (lower_name == NULL) | 393 | if (lower_name == NULL) |
387 | stop("Unable to strdup symbol name", EX_SOFTWARE); | 394 | stop("Unable to strdup symbol name", EX_SOFTWARE); |
388 | 395 | ||
389 | for (letter = lower_name; *letter != '\0'; letter++) | 396 | for (letter = lower_name; *letter != '\0'; letter++) |
390 | *letter = tolower(*letter); | 397 | *letter = tolower(*letter); |
391 | 398 | ||
@@ -472,6 +479,7 @@ symtable_dump(FILE *ofile, FILE *dfile) | |||
472 | DBT key; | 479 | DBT key; |
473 | DBT data; | 480 | DBT data; |
474 | int flag; | 481 | int flag; |
482 | int reg_count = 0, reg_used = 0; | ||
475 | u_int i; | 483 | u_int i; |
476 | 484 | ||
477 | if (symtable == NULL) | 485 | if (symtable == NULL) |
@@ -541,6 +549,9 @@ symtable_dump(FILE *ofile, FILE *dfile) | |||
541 | int num_entries; | 549 | int num_entries; |
542 | 550 | ||
543 | num_entries = 0; | 551 | num_entries = 0; |
552 | reg_count++; | ||
553 | if (curnode->symbol->count == 1) | ||
554 | break; | ||
544 | fields = &curnode->symbol->info.rinfo->fields; | 555 | fields = &curnode->symbol->info.rinfo->fields; |
545 | SLIST_FOREACH(fieldnode, fields, links) { | 556 | SLIST_FOREACH(fieldnode, fields, links) { |
546 | if (num_entries == 0) | 557 | if (num_entries == 0) |
@@ -553,11 +564,14 @@ symtable_dump(FILE *ofile, FILE *dfile) | |||
553 | } | 564 | } |
554 | aic_print_reg_dump_end(ofile, dfile, | 565 | aic_print_reg_dump_end(ofile, dfile, |
555 | curnode, num_entries); | 566 | curnode, num_entries); |
567 | reg_used++; | ||
556 | } | 568 | } |
557 | default: | 569 | default: |
558 | break; | 570 | break; |
559 | } | 571 | } |
560 | } | 572 | } |
573 | fprintf(stderr, "%s: %d of %d register definitions used\n", appname, | ||
574 | reg_used, reg_count); | ||
561 | 575 | ||
562 | /* Fold in the masks and bits */ | 576 | /* Fold in the masks and bits */ |
563 | while (SLIST_FIRST(&masks) != NULL) { | 577 | while (SLIST_FIRST(&masks) != NULL) { |
@@ -646,7 +660,6 @@ symtable_dump(FILE *ofile, FILE *dfile) | |||
646 | free(curnode); | 660 | free(curnode); |
647 | } | 661 | } |
648 | 662 | ||
649 | |||
650 | fprintf(ofile, "\n\n/* Downloaded Constant Definitions */\n"); | 663 | fprintf(ofile, "\n\n/* Downloaded Constant Definitions */\n"); |
651 | 664 | ||
652 | for (i = 0; SLIST_FIRST(&download_constants) != NULL; i++) { | 665 | for (i = 0; SLIST_FIRST(&download_constants) != NULL; i++) { |
diff --git a/drivers/scsi/aic7xxx/aicasm/aicasm_symbol.h b/drivers/scsi/aic7xxx/aicasm/aicasm_symbol.h index afc22e8b4903..05190c1a2fb7 100644 --- a/drivers/scsi/aic7xxx/aicasm/aicasm_symbol.h +++ b/drivers/scsi/aic7xxx/aicasm/aicasm_symbol.h | |||
@@ -128,6 +128,7 @@ typedef struct expression_info { | |||
128 | typedef struct symbol { | 128 | typedef struct symbol { |
129 | char *name; | 129 | char *name; |
130 | symtype type; | 130 | symtype type; |
131 | int count; | ||
131 | union { | 132 | union { |
132 | struct reg_info *rinfo; | 133 | struct reg_info *rinfo; |
133 | struct field_info *finfo; | 134 | struct field_info *finfo; |