From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
To: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: David Daney <ddaney@caviumnetworks.com>,
linux-ide@vger.kernel.org, linux-mips <linux-mips@linux-mips.org>
Subject: Re: [PATCH] ide: New libata driver for OCTEON SOC Compact Flash interface.
Date: Sun, 23 Nov 2008 20:32:49 +0300 [thread overview]
Message-ID: <492993C1.7000509@ru.mvista.com> (raw)
In-Reply-To: <49282187.8090602@ru.mvista.com>
Hello, I wrote:
>>> diff --git a/drivers/ata/pata_octeon_cf.c
>>> b/drivers/ata/pata_octeon_cf.c
>>> new file mode 100644
>>> index 0000000..e8712c0
>>> --- /dev/null
>>> +++ b/drivers/ata/pata_octeon_cf.c
>>> @@ -0,0 +1,942 @@
>> [...]
>>> +/**
>>> + * Get the status of the DMA engine. The results of this function
>>> + * must emulate the BMDMA engine expected by libata.
>>> + *
>>> + * @ap: ATA port to check status on
>>> + *
>>> + * Returns BMDMA status bits
>>> + */
>>> +static uint8_t octeon_cf_bmdma_status(struct ata_port *ap)
>>> +{
>>> + struct octeon_cf_data *ocd = ap->dev->platform_data;
>>> + cvmx_mio_boot_dma_intx_t mio_boot_dma_int;
>>> + cvmx_mio_boot_dma_cfgx_t mio_boot_dma_cfg;
>>> + uint8_t result = 0;
>>> +
>>> + mio_boot_dma_int.u64 =
>>> + cvmx_read_csr(CVMX_MIO_BOOT_DMA_INTX(ocd->dma_engine));
>>> + if (mio_boot_dma_int.s.done)
>>> + result |= ATA_DMA_INTR;
>>
>> But if you're saying that there is only DMA completion inetrrupt,
>> you *cannot* completely emulate SFF-8038i BMDMA since its interrupt
>> status is the (delayed) IDE INTRQ status. I suggest that you move
>> away from the emulation -- Alan has said it's possible.
> As part of our efforts to get the Cavium OCTEON processor support
>
> My suggestion then is not to emulate the ATA_DMA_INTR bit (always
> returning it as 0)
No, this is not an option because you chain to ata_sff_host_intr().
However, DMA interrupt status is *not* a substitute for SFF-8038i
interrupt status (as it gets set on the S/G segment boundaries too), so
you should employ the pure software emulation for this bit, only
triggering before the control gets passed to ata_sff_host_intr().
> directly in octeon_cf_interrupt().
>
MBR, Sergei
prev parent reply other threads:[~2008-11-23 17:33 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-21 2:24 [PATCH] ide: New libata driver for OCTEON SOC Compact Flash interface David Daney
2008-11-21 10:21 ` Alan Cox
2008-11-21 17:05 ` David Daney
2008-11-21 17:26 ` Sergei Shtylyov
2008-11-21 17:47 ` David Daney
2008-11-21 18:07 ` Alan Cox
2008-11-21 17:49 ` Alan Cox
2008-11-21 16:40 ` Sergei Shtylyov
2008-11-21 17:29 ` David Daney
2008-11-21 18:14 ` Sergei Shtylyov
2008-11-21 18:43 ` Chad Reese
2008-11-21 17:46 ` Alan Cox
2008-11-21 17:37 ` Sergei Shtylyov
2008-11-21 18:12 ` Alan Cox
2008-11-22 13:57 ` Sergei Shtylyov
2008-11-22 14:52 ` Alan Cox
2008-11-22 15:05 ` Sergei Shtylyov
2008-11-23 17:14 ` Sergei Shtylyov
2008-11-24 20:40 ` David Daney
2008-11-24 22:33 ` Sergei Shtylyov
2008-11-22 15:13 ` Sergei Shtylyov
2008-11-22 18:38 ` Chad Reese
2008-11-23 15:13 ` Sergei Shtylyov
2008-11-23 15:24 ` Sergei Shtylyov
2008-11-23 17:10 ` Sergei Shtylyov
2008-11-23 17:32 ` Sergei Shtylyov [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=492993C1.7000509@ru.mvista.com \
--to=sshtylyov@ru.mvista.com \
--cc=ddaney@caviumnetworks.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).