Re: [PARPORT] base address?

From: zhu qun ying (qyzhu@krdl.org.sg)
Date: Tue Apr 18 2000 - 21:14:58 EDT

  • Next message: Tim Waugh: "Re: [PARPORT] base address?"

    twaugh@redhat.com wrote:
    >
    > > For the case of reverse nibble mode, the parport_read is using
    > > port->nibble_read_data, but when does the driver change the
    > > direction of the data line?
    >
    > It doesn't need to, since the peripheral-to-host data is communicated
    > using the status lines.

    Sorry for my ignorance of reading the standard first. :)

    >
    > ECP will need the data drivers to be switched off (i.e. reverse mode),
    > and that happens in parport_ieee1284_ecp_read_data (ieee1284_ops.c),
    > which calls ecp_forward_to_reverse.
    >
    > For PC hardware parport_pc initialises ECP chipsets to PS/2 mode. For
    > other PC non-ECP chipsets it will be in whatever mode the BIOS is told
    > to set up.
    >
    > For your port, I really don't know. ;-)
    >
    > It depends on whether the protocol in use requires the peripheral to
    > drive the data lines. For hardware which doesn't allow that, you
    > can't use that protocol. (That's what reverse_nibble is for.)
    >
    > Tim.

    Now I have a more clear direction of what I want to ask. :).
    For my implementation, whenever a read to the data line, the buffer chip have
    to switch direction so that peripheral data can go through the buffer and
    reach the processor. And from my trace, my low level read function is called
    without switching the data direction. Is it my responsibility to take care of
    that? Is my initial control state correct? I am putting SELECTN and INIT to
    high, strobe and autofd low. For the low-level forward and reverse function,
    do I need to take care of the signaling, or just switch the data line
    direction?

    Here is the trace:

    [root@Linux modules]$insmod parport_arm.o
    parport0: cpp_daisy: aa5500ff(08)
    parport0: assign_addrs: aa5500ff(08)
    parport_arm_write_control() 0x0c
    parport_arm_read_control()
    parport_arm_write_control() 0x0c
    parport_arm_read_control()
    parport_arm_write_control() 0x06
    parport_arm_read_control()
    parport_arm_write_control() 0x0c
    parport0: Peripheral not IEEE1284 compliant (0xC8)
    parport_arm_read_data() <<-- read data line
    parport_arm_data_reverse() <<-- switch direction inside arm_aread_data
    parport_arm_data_forward() <<-- switch back "
    parport_arm_read_control()
    parport_arm_write_control() 0x08
    parport_arm_write_control() 0x0c
    parport0: cpp_mux: aa55f00f52ad51(38)
    parport0: cpp_daisy: aa5500ff(38)
    parport0: assign_addrs: aa5500ff(38)
    parport_arm_write_control() 0x0c
    parport_arm_read_control()
    parport_arm_write_control() 0x0c
    parport_arm_read_control()
    parport_arm_write_control() 0x06
    parport_arm_read_control()
    parport_arm_write_control() 0x07
    parport_arm_read_control()
    parport_arm_write_control() 0x04
    parport0: Mode 0x04 not supported? (0x38)
    parport_arm_read_control()
    parport_arm_write_control() 0x0c
    parport_arm_read_control()
    parport_arm_write_control() 0x0e
    parport0: Timeout at event 27
    parport_arm_read_control()
    parport_arm_write_control() 0x0c
    parport0: In compatibility (forward idle) mode
    parport_arm_read_data()
    parport_arm_data_reverse()
    parport_arm_data_forward()
    parport_arm_read_control()

    -- 
     (~._.~)  Öì Ⱥ Ó¢  (Qun Ying)         (65) 874-6743
      ( O )         Kent Ridge Digital Labs (KRDL)
     ()~*~()  21 Heng Mui Keng Terrace, Singapore 119613
     (_)-(_)    qyzhu@krdl.org.sg  *  zhuqy@hotmail.com
    

    -- To unsubscribe, send mail to: linux-parport-request@torque.net -- -- with the single word "unsubscribe" in the body of the message. --



    This archive was generated by hypermail 2b29 : Tue Apr 18 2000 - 21:23:55 EDT