Yech!  ISA devices are "special".  You have to put properties in the 
.conf files for the driver, indicating the port ranges used.

Please understand, ISA are not self-identifying devices.  One reason I 
utterly despise them.... is there some compelling reason your device 
isn't accessible in PCI space?

    -- Garrett

Steinke, Dave wrote:
> Hi,
> Sorry for the newbie driver question, but I've searched all the docs and 
> can't seem to get my question answered....
> Any help you can offer would be greatly appreciated!
>
> I'm porting the "asy" async driver to the board my company makes.
> Our board has 6 UARTS, instead of the usual 2 or 4.
> The first two UARTS are at the normal IO addresses of 0x3f8 and 0x2f8.
> The remaining four UARTs are at 0x3e8, 0x2e8, 0x3e0 and 0x2e0.
>
> I can successfully attach the driver to the first two UARTS and the 
> properties (via prtconf -v) look correct (see below).
> I cannot get the other 4 UARTs to attach.
> The properties that are passed back from the "kernel" says the 3rd UART is at 
> IO address 0xFFFF, which is obviously wrong.
>
> Our BIOS guy tells me that BIOS creates two tables in the ACPI configuration 
> data for the UARTS.
> I've checked his data, it looks good.
>
> Question 1:
> How does the ACPI table get converted into "properties" that are returned to 
> the driver when the driver reads them via this strip of code:
>
> static int
> asy_get_io_regnum_isa(dev_info_t *devi, struct asycom *asy)
> {
>       int reglen, nregs;
>       int regnum, i;
>       struct {
>             uint_t bustype;
>             int base;
>             int size;
>       } *reglist;
>
>       if (ddi_getlongprop(DDI_DEV_T_ANY, devi, DDI_PROP_DONTPASS,
>           "reg", (caddr_t)&reglist, &reglen) != DDI_PROP_SUCCESS) {
>             cmn_err(CE_WARN, "asy_get_io_regnum: reg property not found "
>                   "in devices property list");
>             return (-1);
>
> "reg" gets set to FFFF for the 3rd instance of the driver.
>
> Question 2:
> The "kernel" only tries to attach 3 instances of the asy driver.
> I believe I want 6 instances, one for each UART.
>
> I've tried to force the issue by putting the following in asy.conf:
>
> name="asy" parent="isa" instance=0 reg=0x3f8 interrupts=4 
> interrupt-priorities=12;
> name="asy" parent="isa" instance=1 reg=0x2f8 interrupts=3 
> interrupt-priorities=12;
> name="asy" parent="isa" instance=2 reg=0x3e8 interrupts=5 
> interrupt-priorities=12;
> name="asy" parent="isa" instance=3 reg=0x2e8 interrupts=7 
> interrupt-priorities=12;
> name="asy" parent="isa" instance=4 reg=0x3e0 interrupts=10 
> interrupt-priorities=12;
> name="asy" parent="isa" instance=5 reg=0x2e0 interrupts=11 
> interrupt-priorities=12;
>
> The driver seems to like my reassignment of the interrupts for the first two 
> UARTs, 
> but doesn't attach the remaining 4 instances.
>
> How can I get the driver to attach my other 4 instances?
>
> Following is dump from prtconf:
>
>     isa, instance #0
>         Hardware properties:
>             name='bus-type' type=string items=1
>                 value='isa'
>             name='device_type' type=string items=1
>                 value='isa'
>         asy, instance #0                     <<<<<<<< First Good Instance
>             Driver properties:
>                 name='uart' type=string items=1 dev=(106,0)
>                     value='16550A'
>             Hardware properties:
>                 name='interrupts' type=int items=1
>                     value=00000004
>                 name='reg' type=int items=3
>                     value=00000001.000003f8.00000008
>                 name='acpi-namespace' type=string items=1
>                     value='\_SB_.PCI0.LPC_.COM1'
>                 name='model' type=string items=1
>                     value='16550A-compatible COM port'
>                 name='compatible' type=string items=1
>                     value='PNP0501'
>             Register Specifications:
>                 Bus Type=0x1, Address=0x3f8, Size=0x8
>             Interrupt Specifications:
>                 Interrupt Priority=0x5 (ipl 5), vector=0x4 (4)
>             Device Minor Nodes:
>                 dev=(106,0)
>                     dev_path=/isa/[EMAIL PROTECTED],3f8:a
>                         spectype=chr type=minor
>                         dev_link=/dev/tty00
>                         dev_link=/dev/ttya
>                         dev_link=/dev/term/a
>                 dev=(106,131072)
>                     dev_path=/isa/[EMAIL PROTECTED],3f8:a,cu
>                         spectype=chr type=minor
>                         dev_link=/dev/cua/a
>                         dev_link=/dev/cua0
>                         dev_link=/dev/ttyd0
>         asy, instance #1               <<<<<<<<<<< second good instance
>             Driver properties:
>                 name='uart' type=string items=1 dev=(106,1)
>                     value='16550A'
>             Hardware properties:
>                 name='interrupts' type=int items=1
>                     value=00000003
>                 name='reg' type=int items=3
>                     value=00000001.000002f8.00000008
>                 name='acpi-namespace' type=string items=1
>                     value='\_SB_.PCI0.LPC_.COM2'
>                 name='model' type=string items=1
>                     value='16550A-compatible COM port'
>                 name='compatible' type=string items=1
>                     value='PNP0501'
>             Register Specifications:
>                 Bus Type=0x1, Address=0x2f8, Size=0x8
>             Interrupt Specifications:
>                 Interrupt Priority=0x5 (ipl 5), vector=0x3 (3)
>             Device Minor Nodes:
>                 dev=(106,1)
>                     dev_path=/isa/[EMAIL PROTECTED],2f8:b
>                         spectype=chr type=minor
>                         dev_link=/dev/tty01
>                         dev_link=/dev/ttyb
>                         dev_link=/dev/term/b
>                 dev=(106,131073)
>                     dev_path=/isa/[EMAIL PROTECTED],2f8:b,cu
>                         spectype=chr type=minor
>                         dev_link=/dev/cua/b
>                         dev_link=/dev/cua1
>                         dev_link=/dev/ttyd1
> ...
>         asy (driver not attached)      <<<<<<<<<<<<< bogus instances follow
>             Hardware properties:
>                 name='reg' type=int items=3
>                     value=00000001.0000ffff.00000008       <<<<<< Note the 
> bogus IO address FFFF
>                 name='acpi-namespace' type=string items=1
>                     value='\_SB_.PCI0.LPC_.UAR1'
>                 name='model' type=string items=1
>                     value='16550A-compatible COM port'
>                 name='compatible' type=string items=1
>                     value='PNP0501'
>         asy (driver not attached)        <<<<<<<<< Also bogus
>             Hardware properties:
>                 name='reg' type=int items=3
>                     value=00000001.0000ffff.00000008
>                 name='acpi-namespace' type=string items=1
>                     value='\_SB_.PCI0.LPC_.UAR2'
>                 name='model' type=string items=1
>                     value='16550A-compatible COM port'
>                 name='compatible' type=string items=1
>                     value='PNP0501'
>         asy (driver not attached)        <<<<<<<<< Also bogus
>             Hardware properties:
>                 name='reg' type=int items=3
>                     value=00000001.0000ffff.00000008
>                 name='acpi-namespace' type=string items=1
>                     value='\_SB_.PCI0.LPC_.UAR3'
>                 name='model' type=string items=1
>                     value='16550A-compatible COM port'
>                 name='compatible' type=string items=1
>                     value='PNP0501'
>         asy (driver not attached)        <<<<<<<<< Also bogus
>             Hardware properties:
>                 name='reg' type=int items=3
>                     value=00000001.0000ffff.00000008
>                 name='acpi-namespace' type=string items=1
>                     value='\_SB_.PCI0.LPC_.UAR4'
>                 name='model' type=string items=1
>                     value='16550A-compatible COM port'
>                 name='compatible' type=string items=1
>                     value='PNP0501'
>
>
> THANK YOU in advance!!!!!
> Dave Steinke
> Senior Software Engineer
> Curtiss Wright Controls Embedded Computing
> 10201 Wateridge Circle, Suite 300
> San Diego, CA 92121
> (858) 452-0020 x4323
> [EMAIL PROTECTED]
>
>
> _______________________________________________________________________
> This e-mail and any files transmitted with it are proprietary and intended 
> solely for the use of the individual or entity to whom they are addressed. If 
> you have reason to believe that you have received this e-mail in error, 
> please notify the sender and destroy this email and any attached files. 
> Please note that any views or opinions presented in this e-mail are solely 
> those of the author and do not necessarily represent those of the 
> Curtiss-Wright Corporation or any of its subsidiaries.  Documents attached 
> hereto may contain technology subject to government export regulations. 
> Recipient is solely responsible for ensuring that any re-export, transfer or 
> disclosure of this information is in accordance with applicable government 
> export regulations.  The recipient should check this e-mail and any 
> attachments for the presence of viruses. Curtiss-Wright Corporation and its 
> subsidiaries accept no liability for any damage caused by any virus 
> transmitted by this e-mail.
> _______________________________________________
> driver-discuss mailing list
> driver-discuss@opensolaris.org
> http://mail.opensolaris.org/mailman/listinfo/driver-discuss
>   


_______________________________________________
driver-discuss mailing list
driver-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/driver-discuss

Reply via email to