The HyperNews Linux KHG Discussion Pages

## Polled driver for NAND Flash memories

  Forum: Block Device Drivers
  Keywords: 'polled drivers' 'flash devices'
  Date: Tue, 01 Jul 1997 21:14:32 GMT
  From: Mike Cruse <mcruse@cti-ltd.com>

I am writing a driver for Toshiba Nand Flash devices. It needs to be polled since I dont have an interrupt line available. I have a version working now but when my strategy routine is called I have to satisfy all of the IO requests since I am not sure how to postpone any requests. The main symptom is that everything stops until all IO has been processed. This is obviously because my code waits on the device to finish for every operation. The period can be quite lengthy with large write bursts. I'm looking at starting a timer to poll the device for command completion but I am unsure of what context this timer activated routine will have. Alternatively I could give some time back to the scheduler by calling schedule() or something but this doesn't seem quite right. At least attempts so far have met with what we in the business would refer to as 'no real success'. I'm am looking at other drivers in the kernel source and making some progress but for the most part these drivers are designed to get the job done rather than enlighten a student. And rightly so. Is there an example more applicable to my task? Does anyone have a few suggestions or comments? Any help would be much appreciated. Please fell free to send email too: mcruse@cti-ltd.com Mike Cruse Conservation Through Innovation. Prescott Arizona.

Messages

1. Timer events have interrupt context by Michael K. Johnson