From: Graeme Russ <graeme.russ@gmail.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: linux-ide@vger.kernel.org
Subject: Re: Using PATA Platform Driver to access Memory Mapped CF Card
Date: Mon, 03 May 2010 11:39:21 +1000 [thread overview]
Message-ID: <4BDE2949.6030301@gmail.com> (raw)
In-Reply-To: <20100502132913.1e531bfd@lxorguk.ukuu.org.uk>
Alan Cox wrote:
>> pata_platform_port_ops (.sff_data_xfer = ata_sff_data_xfer_noirq). So I
>> will need to create custom data_xfer_noirq and data_xfer functions for the
>> 8-bit transfers. Is there an elegant way to override pata_platform's use of
>> ata_sff_data_xfer_noirq or will I need to also write a new version of
>> pata_platform as well?
>
> Extending pata_platform_info is probably the right thing to do - and
> allow it to override the data_xfer operation if a new data_xfer field is
> non NULL. See include/linux/ata_platform.h.
>
> So you'll need to tweak pata_platform a spot. Alternatively you could
> write a small libata driver specifically for your device - which may make
> sense if it supports higher speed modes and speed setting stuff.
>
Thanks Alan,
I've added a data_xfer member to pata_platform_info and added the following
just prior to the call to __pata_platform_probe()
if (pp_info)
if (unlikely(pp_info->data_xfer))
pata_platform_port_ops.sff_data_xfer = pp_info->data_xfer;
and implemented an 8-bit version of ata_sff_data_xfer() in my board
specific code. Should I submit a patch (or is this considered too esoteric
for mainline?)
I now have another problem - My board has two CF slots (one at base address
0x20000000 and one at base address 0x20001000. I would like to be able to
access them both, but if I try to init two pata_platform devices I get:
sysfs: cannot create duplicate filename '/devices/platform/pata_platform'
and
kobject_add_internal failed for pata_platform with -EEXIST, don't try to
register things with the same name in the same directory
Is it possible to register two devices using the pata platform driver?
Regards,
Graeme
next prev parent reply other threads:[~2010-05-03 1:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <4BDAE529.20903@gmail.com>
[not found] ` <201005010524.40949.marek.vasut@gmail.com>
2010-05-01 7:13 ` Using PATA Platform Driver to access Memory Mapped CF Card Graeme Russ
2010-05-01 10:33 ` Alan Cox
2010-05-02 11:57 ` Graeme Russ
2010-05-02 12:29 ` Alan Cox
2010-05-03 1:39 ` Graeme Russ [this message]
2010-05-03 10:57 ` Alan Cox
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=4BDE2949.6030301@gmail.com \
--to=graeme.russ@gmail.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-ide@vger.kernel.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).