mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-24 18:54:52 +00:00
Add #define's for port "none" and "auto"
Now port ommiting is equal to port "none" not to port 0
This commit is contained in:
parent
af3a7d6841
commit
1d29927ce6
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=24287
|
@ -125,6 +125,8 @@ struct device {
|
|||
int d_disabled; /* nonzero to skip probe/attach */
|
||||
char *d_port; /* io port base manifest constant */
|
||||
int d_portn; /* io port base (if number not manifest) */
|
||||
#define PORT_AUTO -1 /* automatically configured */
|
||||
#define PORT_NONE -2 /* no port */
|
||||
char *d_mask; /* interrupt mask */
|
||||
int d_maddr; /* io memory base */
|
||||
int d_msize; /* io memory size */
|
||||
|
|
|
@ -618,9 +618,9 @@ Info:
|
|||
PORT NUMBER
|
||||
= { cur.d_portn = $2; } |
|
||||
PORT AUTO
|
||||
= { cur.d_portn = -1; } |
|
||||
= { cur.d_portn = PORT_AUTO; } |
|
||||
PORT NONE
|
||||
= { cur.d_portn = -2; } |
|
||||
= { cur.d_portn = PORT_NONE; } |
|
||||
TTY
|
||||
= { cur.d_mask = "tty"; } |
|
||||
BIO
|
||||
|
@ -907,7 +907,7 @@ init_dev(dp)
|
|||
dp->d_pri = -1;
|
||||
dp->d_slave = dp->d_lun = dp->d_target = dp->d_drive = dp->d_unit = UNKNOWN;
|
||||
dp->d_port = (char *)0;
|
||||
dp->d_portn = 0;
|
||||
dp->d_portn = PORT_NONE;
|
||||
dp->d_irq = -1;
|
||||
dp->d_drq = -1;
|
||||
dp->d_maddr = 0;
|
||||
|
|
|
@ -757,8 +757,8 @@ isa_devtab(fp, table, dev_idp)
|
|||
fprintf(fp, "{ %2d, &%3sdriver,", (*dev_idp)++, dp->d_name);
|
||||
if (dp->d_port)
|
||||
fprintf(fp, " %8s,", dp->d_port);
|
||||
else if (dp->d_portn == -1 || dp->d_portn == -2)
|
||||
fprintf(fp, " %2d,", dp->d_portn);
|
||||
else if (dp->d_portn == PORT_AUTO || dp->d_portn == PORT_NONE)
|
||||
fprintf(fp, " %d,", dp->d_portn);
|
||||
else
|
||||
fprintf(fp, " 0x%04x,", dp->d_portn);
|
||||
fprintf(fp, "%6s, %2d, C 0x%05X, %5d, %8s, %3d, 0x%04X, 0, 0, 0, 0, %6d, %8d, 0 },\n",
|
||||
|
|
Loading…
Reference in a new issue