Re: Using PATA Platform Driver to access Memory Mapped CF Card

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux