From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: "João Ramos" <joao.ramos@inov.pt>,
"Alan Cox" <alan@lxorguk.ukuu.org.uk>,
"H Hartley Sweeten" <hartleys@visionengravers.com>,
"Ryan Mallon" <ryan@bluewatersys.com>,
linux-arm-kernel@lists.arm.linux.org.uk,
linux-ide@vger.kernel.org
Subject: Re: EP93xx PIO IDE driver proposal
Date: Fri, 8 May 2009 16:09:47 +0200 [thread overview]
Message-ID: <200905081609.49128.bzolnier@gmail.com> (raw)
In-Reply-To: <4A0433D8.1000400@ru.mvista.com>
On Friday 08 May 2009 15:30:00 Sergei Shtylyov wrote:
> Bartlomiej Zolnierkiewicz wrote:
>
> >>>>>>So you're saying I should support all PIO modes? If so, I would have to
> >>>>>>make conditional code, checking perhaps a module param to sort which PIO
> >>>>>>mode to use.
>
> >>>>>If you advertise PIO0-PIO4 as supported the core IDE code will do all the
> >>>>>work on figuring which modes are supported by the attached devices. You
> >>>>>just need to be able to set them.
>
> >>>>>Alan
>
> >>>>Ok, so I've been studying that (I was quite lost for a time, I confess,
> >>>>I'm not that much familiar with the IDE subsystem, so please bear with
> >>>>me ;-) ).
>
> >>>>So I need to set up a hook for 'set_pio_mode()', so that when the IDE
> >>>>subsystem detects a device and figures the most suitable PIO mode for
> >>>>the device, it will call the 'set_pio_mode' routine provided by the
> >>>>driver in order to configure the host controller for that PIO mode.
>
> >>>>This also means that my host controller driver should always default to
> >>>>PIO Mode 0, as the initial host controller setup that is carried out by
> >>>>the 'init_hwif' routine, allowing devices to be detected. Afterwards,
> >>>>the IDE subsystem detects the most suitable PIO mode and calls
> >>>>'set_pio_mode' to change that configuration.
>
> >>>>Am I correct on this?
>
> >>>Yes! :)
>
> >>>There is still a room for improvement though -- it would be better to fix
> >>>IDE core to set PIO0 before probing devices for all host controllers.
>
> >>>Moreover it seems that doing it this way would allow us to remove ->init_hwif
> >>>method from this driver and do all necessary setup in ep93xx_ide_probe()
> >>>(this controller is a single port one so theoretically there shouldn't be
> >>>a need for having per-port ->init_hwif implementation).
>
> >>So, I should remove the 'init_hwif' hook, and all the host controller
> >>setup would be made in the driver's probe method, correct?
>
> > Yes, that would be preferred (of course given that you fix IDE core to do
> > initial PIO0 setup first).
>
> Er, it's not that easy... Think about older CompactFlash cards (and
> ancient drives of course) that don't support setting explicit PIO modes
> (only the default one) since they don't support IORDY... and also
> ide_config_drive_speed() expects drive->id to be already filled in... So I
> guess you mean just calling set_pio_mode() prior to probing -- without
> setting the drive's own mode?
Yes, I mean setting PIO0 _only_ on host.
Thanks,
Bart
next prev parent reply other threads:[~2009-05-08 14:05 UTC|newest]
Thread overview: 59+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <49CCD7C4.8000207@inov.pt>
[not found] ` <49CFDD8F.1030306@bluewatersys.com>
[not found] ` <BD79186B4FD85F4B8E60E381CAEE1909014E2E09@mi8nycmail19.Mi8.com>
[not found] ` <49D0CAE4.9090306@inov.pt>
2009-03-30 15:34 ` EP93xx PIO IDE driver proposal Sergei Shtylyov
2009-05-04 11:24 ` João Ramos
2009-05-05 12:04 ` Sergei Shtylyov
2009-05-06 14:17 ` João Ramos
2009-05-06 17:05 ` Sergei Shtylyov
2009-05-07 9:36 ` João Ramos
2009-05-07 11:01 ` João Ramos
2009-05-07 13:53 ` Alan Cox
2009-05-07 15:33 ` João Ramos
2009-05-08 12:04 ` Bartlomiej Zolnierkiewicz
2009-05-08 12:16 ` João Ramos
2009-05-08 12:40 ` Bartlomiej Zolnierkiewicz
2009-05-08 13:30 ` Sergei Shtylyov
2009-05-08 14:09 ` Bartlomiej Zolnierkiewicz [this message]
2009-05-08 17:28 ` João Ramos
2009-05-08 18:02 ` Bartlomiej Zolnierkiewicz
2009-05-08 18:16 ` João Ramos
2009-05-08 18:55 ` Bartlomiej Zolnierkiewicz
2009-05-08 20:24 ` joao.ramos
2009-05-08 21:01 ` Sergei Shtylyov
2009-05-08 22:07 ` Bartlomiej Zolnierkiewicz
2009-05-11 11:10 ` João Ramos
2009-05-12 16:49 ` Sergei Shtylyov
2009-05-12 17:23 ` Bartlomiej Zolnierkiewicz
2009-05-13 11:01 ` João Ramos
2009-05-17 15:20 ` Bartlomiej Zolnierkiewicz
2009-05-22 17:52 ` Sergei Shtylyov
2009-05-13 14:18 ` João Ramos
2009-05-14 19:44 ` Bartlomiej Zolnierkiewicz
2009-05-15 17:01 ` João Ramos
2009-05-17 16:16 ` Bartlomiej Zolnierkiewicz
2009-05-18 13:49 ` João Ramos
2009-05-19 13:06 ` Bartlomiej Zolnierkiewicz
2009-05-19 13:20 ` João Ramos
2009-05-19 13:56 ` Bartlomiej Zolnierkiewicz
2009-05-19 14:05 ` João Ramos
2009-05-19 15:50 ` João Ramos
2009-06-06 15:26 ` Sergei Shtylyov
2009-06-22 10:01 ` Bartlomiej Zolnierkiewicz
2009-05-14 16:30 ` Sergei Shtylyov
2009-05-14 16:36 ` Sergei Shtylyov
2009-05-14 18:58 ` Bartlomiej Zolnierkiewicz
2009-05-11 13:20 ` João Ramos
2009-05-12 16:41 ` Bartlomiej Zolnierkiewicz
2009-05-12 16:57 ` Sergei Shtylyov
2009-05-12 16:01 ` João Ramos
2009-05-12 16:30 ` Bartlomiej Zolnierkiewicz
2009-05-12 16:45 ` João Ramos
2009-05-07 16:52 ` H Hartley Sweeten
2009-05-07 22:09 ` Ryan Mallon
2009-05-07 22:31 ` H Hartley Sweeten
2009-05-07 22:51 ` Ryan Mallon
2009-05-07 23:01 ` H Hartley Sweeten
2009-05-07 23:12 ` Ryan Mallon
2009-05-07 23:32 ` João Ramos
2009-05-07 23:58 ` H Hartley Sweeten
2009-05-08 11:23 ` Sergei Shtylyov
2009-05-08 12:47 ` João Ramos
[not found] ` <49D12669.4030207@bluewatersys.com>
2009-03-31 10:36 ` Sergei Shtylyov
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=200905081609.49128.bzolnier@gmail.com \
--to=bzolnier@gmail.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=hartleys@visionengravers.com \
--cc=joao.ramos@inov.pt \
--cc=linux-arm-kernel@lists.arm.linux.org.uk \
--cc=linux-ide@vger.kernel.org \
--cc=ryan@bluewatersys.com \
--cc=sshtylyov@ru.mvista.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.