[ltp] IR (SIR) success!

Thomas Hood linux-thinkpad@www.bm-soft.com
Mon, 26 Feb 2001 21:16:43 +0000 (GMT)


Okay, I was right.  If I do a "findchip -vd" the
output is:

[...]
Found PC87338 chip, revision=1
Chip is in Legacy mode
reg=0x011
Found NSC PC87338 Controller at 0x2e, DevID=0x0b, Rev. 1
    SIR Base 0x2f8, FIR Base 0x2f8
    IRQ = 4, DMA = 3
    Enabled: yes, Suspended: no
    UART compatible: yes
    Half duplex delay = 0 us
[...]

This is incorrect.  On the ThinkPad 600, the chip is a
PC97338, not a PC87338.  The chip is in PnP mode, not
legacy mode.  That's why findchip sees the wrong base
address.

When I try to modprobe nsc-ircc, I get error messages.
First, the "irda_debug" symbol is not resolved, which
is a programming bug.  Second, I get:
   nsc-ircc, Wrong chip version 0c
or
   nsc-ircc, Wrong chip version 00
and
   /lib/modules/2.4.2/kernel/drivers/net/irda/nsc-ircc.o:
      init_module: No such device

The fact that the "chip version" changes from time to
time is pretty worrisome.  There are obviously some bugs
in this driver.  I'll take a look ...

Thomas

--- Thomas Hood <jdthood2@yahoo.co.uk> wrote: > 
> --- Tom Grydeland <Tom.Grydeland@phys.uit.no> wrote: 
> > Thanks a bundle to Thomas Hood, Till Straumann and Tom Allison for
> > patient explanations!
> 
> I've been learning alot from these discussions too.
> Thanks, guys.
> 
> > What remains:
> >  * Switching the devices around -- having IR on /dev/ttyS0 (4,64) and
> >    the DB9 on /dev/ttyS2 (4,66) or have them use different IRQs.  Not
> >    because it makes a difference, I just want to convince myself that it
> >    can be done.
> 
> Okay, we have a Linux addict on our hands here.
> Somebody help him!
> 
> >  * FIR
> >   findchip -v reports:
> > reg=0x011
> > Found NSC PC87338 Controller at 0x2e, DevID=0x0b, Rev. 2
> >     SIR Base 0x2f8, FIR Base 0x2f8
> >     IRQ = 4, DMA = 3
> >     Enabled: yes, Suspended: no
> >     UART compatible: yes
> >     Half duplex delay = 0 us
> > 
> > I don't understand where 0x2e or 0x2f8 comes from -- lspnp -v -b 13
> > reports:
> > 13 IBM0071 IBM Thinkpad infrared port
> >         irq 4
> >         io 0x03e8-0x03ef
> >         dma 3
> > 
> > And tpctl --rs2 reports:
> >    serial port 2:                                     enable  0x3e8 IRQ4
> 
> 0x2e is the io address of the National Semiconductor
> PC97338 chip's control registers.  (This is where the
> PnP BIOS puts the PC97338 chip.)  By twiddling these
> registers, the addresses of the serial port UARTs 
> (which are on the PC97338 but which are talked to at
> different io addresses) can be changed.  tpctl --rs2
> looks at these registers to find out where serial port
> #2 has been put, viz., 0x3e8.
> 
> The PC97338 chip has two modes, called 'legacy' and
> 'PnP' and there are different configuration registers
> for each mode.  Usually the chip is in PnP mode because
> the BIOS has done PnP configuration to it by the time
> Linux boots.  Consequently the PnP configuration regs
> are the ones to look at; and those are the ones that
> lspnp and tpctl do look at.  The findchip program may
> be looking at the "legacy" configuration registers.
> 
> > In this configuration, I can
> > 
> >     irattach /dev/ttyS2 -d
> > 
> > followed by
> > 
> >     pilot-xfer -p /dev/irnine -l
> > 
> > and I get a listing of the databases on the palm.
> > 
> > When I try to load the nsc-ircc module for FIR connection,
> > 
> >     kernel: nsc-ircc, Wrong chip version ff 
> 
> Hmm.  We need to look into this.
> 
> Thomas
> 
> ____________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
> or your free @yahoo.ie address at http://mail.yahoo.ie
> 
> ----- The Linux ThinkPad mailing list -----
> The linux-thinkpad mailing list home page is at:
> http://www.bm-soft.com/~bm/tp_mailing.html


____________________________________________________________
Do You Yahoo!?
Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
or your free @yahoo.ie address at http://mail.yahoo.ie

----- The Linux ThinkPad mailing list -----
The linux-thinkpad mailing list home page is at:
http://www.bm-soft.com/~bm/tp_mailing.html