From: Graeme Russ <graeme.russ@gmail.com>
To: linux-ide@vger.kernel.org
Subject: Using PATA Platform Driver to access Memory Mapped CF Card
Date: Sat, 01 May 2010 17:13:47 +1000 [thread overview]
Message-ID: <4BDBD4AB.8020200@gmail.com> (raw)
In-Reply-To: <201005010524.40949.marek.vasut@gmail.com>
Hello,
I have a CF slot mapped to a GP bus on a board I'm porting linux to. It is
wired in 8-bit Memory Mode only with only A0 - A3 mapped from the address
bus (starting at 0x20000000). I know the arrangement works as this board is
successfully accessing CF cards using existing proprietary firmware.
I have added some platform specific initialisation to the kernel. I came to
the 0x2000000E by looking at some blackfin examples (particularly
mach-bf537/boards/stamp.c) - I do not know if this is exactly right
static struct pata_platform_info enet_pata_platform_data = {
.ioport_shift = 0,
};
static struct resource enet_pata_resources[] = {
{
.start = 0x20000000,
.end = 0x20000007,
.flags = IORESOURCE_MEM,
},
{
.start = 0x2000000E,
.end = 0x2000000E,
.flags = IORESOURCE_MEM,
},
};
static struct platform_device enet_pata_device = {
.name = "pata_platform",
.id = -1,
.num_resources = ARRAY_SIZE(enet_pata_resources),
.resource = enet_pata_resources,
.dev = {
.platform_data = &enet_pata_platform_data,
}
};
static struct platform_device *enet_devices[] __initdata = {
&enet_pata_device,
};
static int __init enet_init(void)
{
printk(KERN_INFO "%s(): registering device resources\n", __func__);
platform_add_devices(enet_devices, ARRAY_SIZE(enet_devices));
return 0;
}
arch_initcall(enet_init);
Which results in the following kernel messages (With a 512MB SanDisk Card):
[ 0.065999] enet_init(): registering device resources
...
[ 1.988931] scsi0 : pata_platform
[ 1.996940] ata1: PATA max PIO0 no IRQ, using PIO polling mmio cmd
0x20000000 ctl 0x2000000e
...
[ 2.168883] ata1.00: failed to IDENTIFY (I/O error, err_mask=0x2)
[ 1.995794] ata1.01: NODEV after polling detection
[ 2.013803] ata1.00: failed to IDENTIFY (I/O error, err_mask=0x2)
...
[ 7.146794] ata1.01: NODEV after polling detection
[ 7.164802] ata1.00: failed to IDENTIFY (I/O error, err_mask=0x2)
[ 12.297794] ata1.01: NODEV after polling detection
[ 12.315802] ata1.00: failed to IDENTIFY (I/O error, err_mask=0x2)
[ 17.448794] ata1.01: NODEV after polling detection
And similar with a 1G UltraII and 4G Extreme III but they do not generate
the NODEV message. With no card inserted I get neither the NODEV nor the
failed to IDENTIFY messages. It looks like something is at least partially
working.
Can anyone tell me how to go about enabling an appropriate level of
debugging options, and what I should be looking out for?
TIA
Graeme
next parent reply other threads:[~2010-05-01 7:13 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 ` Graeme Russ [this message]
2010-05-01 10:33 ` Using PATA Platform Driver to access Memory Mapped CF Card Alan Cox
2010-05-02 11:57 ` Graeme Russ
2010-05-02 12:29 ` Alan Cox
2010-05-03 1:39 ` Graeme Russ
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=4BDBD4AB.8020200@gmail.com \
--to=graeme.russ@gmail.com \
--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).