On Wed, Apr 19, 2000 at 09:14:58AM +0800, zhu qun ying wrote:
> 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.
Yes, this is true for the PC ports as well.
> And from my trace, my low level read function is called
> without switching the data direction.
Your low-level data-register read function is called before having the
direction switched, and that is a bug in the caller. I can't see
where that's happening though -- if you force an oops (*(int*)0=0)
we'll be able to figure it out.
It's okay for your low-level protocol read functions to be called
without the caller having switched direction first though, since the
protocol function should take care of it. Speaking of which, I think
there's a bug in parport_ieee1284_read_byte (but I don't think you can
be hitting that)..
> For the low-level forward and reverse function, do I need to take
> care of the signaling, or just switch the data line direction?
Just the data line direction.
> Here is the trace:
>
> [root@Linux modules]$insmod parport_arm.o
> parport0: cpp_daisy: aa5500ff(08)
I think at this stage we are here:
parport_announce_port
->parport_daisy_init (first time)
->parport_daisy_deselect_all
> parport0: assign_addrs: aa5500ff(08)
->assign_addrs
> 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_device_id
->parport_negotiate
<-
<-
> 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()
??? I don't see this in the code..
> 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)
And this is the rest of parport_announce_port.
Tim.
*/
-- 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 : Wed Apr 19 2000 - 04:44:45 EDT