From: Dave H. <dhy...@gm...> - 2006-02-19 19:39:52
|
Hi Dan, > The most annoying is that the console (via the serial port) locks up > after a couple of minutes. The speed at which it locks up seems to be > proportional to the frequency of the timer. I see that you got some good answers on the linux-arm-kernel list. For everyone else's benefit, I'll include the summary here (credit goes to Russell King and Robon Farine). toggle_gpio was toggling the direction and not the value associated with a GPIO pin. The real problem is this line in on_timer: > // Clear the match > OSSR |=3D OSSR_M2; which should be > OSSR =3D OSSR_M2; This is a subtle distinction and careful reading of the datasheet is required. Many hardware devices use write only registers, and doing the |=3D is a serious mistake. I'm not familiar enough with the PXA255 to have seen that problem by just looking at the code, but having written many device drivers, I'm familiar with the type of problem (and I've been nailed by it too :) The whole read/modify/write issue is also a potentially gnarly issue. I should rereview my robostix driver to make sure I'm not doing anything bad :) And, finally, set_irq_type is obsolete and should be replaced with the appropriate flags being passed into request_irq (this particular issue has been discussed several times on the arm-linux-kernel list, and you can read all about it in the archives). -- Dave Hylands Vancouver, BC, Canada http://www.DaveHylands.com/ |