- Remove speed_map API because speed_map is obsoleted by 1394a.

- Add definition of OHCI_HCC_BIBIV in fwohcireg.h.
This commit is contained in:
Hidetoshi Shimokawa 2003-01-04 16:03:50 +00:00
parent ad82110dcd
commit bce5729a9d
5 changed files with 11 additions and 43 deletions

View File

@ -544,7 +544,6 @@ struct fw_crom_buf {
#define FW_SBINDADDR _IOWR('S', 3, struct fw_asybindreq) #define FW_SBINDADDR _IOWR('S', 3, struct fw_asybindreq)
#define FW_CBINDADDR _IOWR('S', 4, struct fw_asybindreq) #define FW_CBINDADDR _IOWR('S', 4, struct fw_asybindreq)
#define FW_GTPMAP _IOR('S', 5, struct fw_topology_map) #define FW_GTPMAP _IOR('S', 5, struct fw_topology_map)
#define FW_GSPMAP _IOW('S', 6, struct fw_speed_map *)
#define FW_GCROM _IOWR('S', 7, struct fw_crom_buf) #define FW_GCROM _IOWR('S', 7, struct fw_crom_buf)
#define FWOHCI_RDREG _IOWR('S', 80, struct fw_reg_req_t) #define FWOHCI_RDREG _IOWR('S', 80, struct fw_reg_req_t)

View File

@ -832,11 +832,6 @@ error:
bcopy(sc->fc->topology_map, data, bcopy(sc->fc->topology_map, data,
(sc->fc->topology_map->crc_len + 1) * 4); (sc->fc->topology_map->crc_len + 1) * 4);
break; break;
case FW_GSPMAP:
/* speed_map is larger than a page */
err = copyout(sc->fc->speed_map, *(void **)data,
(sc->fc->speed_map->crc_len + 1) * 4);
break;
case FW_GCROM: case FW_GCROM:
for (fwdev = TAILQ_FIRST(&sc->fc->devices); fwdev != NULL; for (fwdev = TAILQ_FIRST(&sc->fc->devices); fwdev != NULL;
fwdev = TAILQ_NEXT(fwdev, link)) { fwdev = TAILQ_NEXT(fwdev, link)) {

View File

@ -172,13 +172,14 @@ struct ohci_registers {
fwohcireg_t dummy1[3]; /* dummy 0x44-0x4c */ fwohcireg_t dummy1[3]; /* dummy 0x44-0x4c */
fwohcireg_t hcc_cntl_set; /* HCC control set 0x50 */ fwohcireg_t hcc_cntl_set; /* HCC control set 0x50 */
fwohcireg_t hcc_cntl_clr; /* HCC control clr 0x54 */ fwohcireg_t hcc_cntl_clr; /* HCC control clr 0x54 */
#define OHCI_HCC_BIGEND (1 << 30) #define OHCI_HCC_BIBIV (1 << 31) /* BIBimage Valid */
#define OHCI_HCC_PRPHY (1 << 23) #define OHCI_HCC_BIGEND (1 << 30) /* noByteSwapData */
#define OHCI_HCC_PHYEN (1 << 22) #define OHCI_HCC_PRPHY (1 << 23) /* programPhyEnable */
#define OHCI_HCC_LPS (1 << 19) #define OHCI_HCC_PHYEN (1 << 22) /* aPhyEnhanceEnable */
#define OHCI_HCC_POSTWR (1 << 18) #define OHCI_HCC_LPS (1 << 19) /* LPS */
#define OHCI_HCC_LINKEN (1 << 17) #define OHCI_HCC_POSTWR (1 << 18) /* postedWriteEnable */
#define OHCI_HCC_RESET (1 << 16) #define OHCI_HCC_LINKEN (1 << 17) /* linkEnable */
#define OHCI_HCC_RESET (1 << 16) /* softReset */
fwohcireg_t dummy2[2]; /* dummy 0x58-0x5c */ fwohcireg_t dummy2[2]; /* dummy 0x58-0x5c */
fwohcireg_t dummy3[1]; /* dummy 0x60 */ fwohcireg_t dummy3[1]; /* dummy 0x60 */
fwohcireg_t sid_buf; /* self id buffer 0x64 */ fwohcireg_t sid_buf; /* self id buffer 0x64 */

View File

@ -33,7 +33,7 @@
.Nd FireWire control utility .Nd FireWire control utility
.Sh SYNOPSIS .Sh SYNOPSIS
.Nm .Nm
.Op Fl rts .Op Fl rt
.Op Fl c Ar node .Op Fl c Ar node
.Op Fl d Ar node .Op Fl d Ar node
.Op Fl l Ar file .Op Fl l Ar file
@ -51,8 +51,6 @@ FireWire subsystem.
Initiate bus reset. Initiate bus reset.
.It Fl t .It Fl t
Show the topology map. Show the topology map.
.It Fl s
Show the speed map.
.It Fl c Ar node .It Fl c Ar node
Show the configuration ROM on the node. Show the configuration ROM on the node.
.It Fl d Ar node .It Fl d Ar node

View File

@ -54,13 +54,12 @@ static void
usage(void) usage(void)
{ {
printf("fwcontrol [-g gap_count] [-b pri_req] [-c node]" printf("fwcontrol [-g gap_count] [-b pri_req] [-c node]"
" [-r] [-t] [-s] [-d node] [-l file]\n"); " [-r] [-t] [-d node] [-l file]\n");
printf("\t-g: broadcast gap_count by phy_config packet\n"); printf("\t-g: broadcast gap_count by phy_config packet\n");
printf("\t-b: set PRIORITY_BUDGET register on all supported nodes\n"); printf("\t-b: set PRIORITY_BUDGET register on all supported nodes\n");
printf("\t-c: read configuration ROM\n"); printf("\t-c: read configuration ROM\n");
printf("\t-r: bus reset\n"); printf("\t-r: bus reset\n");
printf("\t-t: read topology map\n"); printf("\t-t: read topology map\n");
printf("\t-s: read speed map\n");
printf("\t-d: hex dump of configuration ROM\n"); printf("\t-d: hex dump of configuration ROM\n");
printf("\t-l: load and parse hex dump file of configuration ROM\n"); printf("\t-l: load and parse hex dump file of configuration ROM\n");
exit(0); exit(0);
@ -339,27 +338,6 @@ show_topology_map(int fd)
free(tmap); free(tmap);
} }
static void
show_speed_map(int fd)
{
struct fw_speed_map *smap;
int i,j;
smap = malloc(sizeof(struct fw_speed_map));
if (smap == NULL)
return;
if (ioctl(fd, FW_GSPMAP, &smap) < 0) {
err(1, "ioctl");
}
printf("crc_len: %d generation:%d\n", smap->crc_len, smap->generation);
for (i = 0; i < 64; i ++) {
for (j = 0; j < 64; j ++)
printf("%d", smap->speed[i][j]);
printf("\n");
}
free(smap);
}
int int
main(int argc, char **argv) main(int argc, char **argv)
{ {
@ -375,7 +353,7 @@ main(int argc, char **argv)
usage(); usage();
} }
while ((ch = getopt(argc, argv, "g:b:rtsc:d:l:")) != -1) while ((ch = getopt(argc, argv, "g:b:rtc:d:l:")) != -1)
switch(ch) { switch(ch) {
case 'g': case 'g':
/* gap count */ /* gap count */
@ -393,9 +371,6 @@ main(int argc, char **argv)
case 't': case 't':
show_topology_map(fd); show_topology_map(fd);
break; break;
case 's':
show_speed_map(fd);
break;
case 'c': case 'c':
tmp = strtol(optarg, NULL, 0); tmp = strtol(optarg, NULL, 0);
get_crom(fd, tmp, crom_buf, len); get_crom(fd, tmp, crom_buf, len);