<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=windows-1251"
 http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Anton Vorontsov wrote:
<blockquote cite="mid:20080812143110.GA23961@oksana.dev.rtsoft.ru"
 type="cite">
  <pre wrap="">On Tue, Aug 12, 2008 at 06:18:42PM +0400, Sergei Shtylyov wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">Anton Vorontsov wrote:

    </pre>
    <blockquote type="cite">
      <blockquote type="cite">
        <blockquote type="cite">
          <blockquote type="cite">
            <pre wrap="">1. IDE status read does not work. (But am I understand correctly
  that IDE works well if IRQ is unspecified? Then this is hardly
  an issue.)
2. IDE interrupt comes when it should not. I'd recommend to use
  oscilloscope to find out what is happening there, that is, if
  the drive actually deasserts its irq line after status read.
  If so, than this could be a PIC problem.
            </pre>
          </blockquote>
        </blockquote>
      </blockquote>
    </blockquote>
    <blockquote type="cite">
      <blockquote type="cite">
        <blockquote type="cite">
          <blockquote type="cite">
            <pre wrap="">What is the platform on which you're observing the issue, btw?
            </pre>
          </blockquote>
        </blockquote>
      </blockquote>
    </blockquote>
    <blockquote type="cite">
      <blockquote type="cite">
        <blockquote type="cite">
          <pre wrap="">Another possibility is that you got the wrong interrupt number
in the device-tree...
          </pre>
        </blockquote>
      </blockquote>
    </blockquote>
    <blockquote type="cite">
      <blockquote type="cite">
        <blockquote type="cite">
          <pre wrap="">Ben.
          </pre>
        </blockquote>
      </blockquote>
    </blockquote>
    <blockquote type="cite">
      <blockquote type="cite">
        <pre wrap="">The platform is the AMCC Sequoia board.  We've built a little adapter to
connect a compact flash card to the processor bus.  I believe the
interrupt selection in the device tree is correct, and I've checked over
the u-boot settings for the IRQ line (active high, level sensitive). 
        </pre>
      </blockquote>
    </blockquote>
    <blockquote type="cite">
      <pre wrap="">IDE IRQs are active-low.
      </pre>
    </blockquote>
    <pre wrap="">   Only on the PCI and only in the native mode. Natively, the IDE INTRQ  
signal is active-high, rising edge triggering, as on ISA. You seem to 
have an invertor somewhere, if it's not a PCI chip...
    </pre>
  </blockquote>
  <pre wrap=""><!---->
Ugh. Right you are, as always. I've just looked into mpc8349emitx
schematics, there is indeed an inverter on the irq line.

CF in True IDE mode is active-high, sorry.
  </pre>
</blockquote>
<br>
Ok, just to close this issue, my CF device is now working perfectly. 
Two problems, both my fault.  1) I thought the alternate registers used
the same reg-shift and offset, so the alt_command and alt_status were
at the wrong address, and 2) I was missing a pull-down on the IRQ line
- the sequoia eval board has it in the schematic, but it is marked "not
populated".<br>
<br>
    Thanks to all for your comments and help,<br>
    Steve<br>
<br>
</body>
</html>