From: Stanislaw Gruszka <stf_xl@wp.pl>
To: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: linux-ide@vger.kernel.org, Andrew Victor <avictor.za@gmail.com>,
linux-arm-kernel@lists.arm.linux.org.uk
Subject: Re: [PATCH 2/3 v2] ide: add at91_ide driver
Date: Tue, 17 Feb 2009 15:15:44 +0100 [thread overview]
Message-ID: <200902171515.44756.stf_xl@wp.pl> (raw)
In-Reply-To: <499850E9.80802@ru.mvista.com>
Sunday 15 February 2009 18:29:13 Sergei Shtylyov napisał(a):
> > +#define REGS_SIZE 16
>
> Why? There are only 8 registers in each block.
I did such because pata_at32 have 16, but it should be 8.
> > +#define enter_16bit(cs, mode) do { \
> > + mode = at91_sys_read(AT91_SMC_MODE(cs)); \
> > + at91_sys_write(AT91_SMC_MODE(cs), mode | AT91_SMC_DBW_16); \
> > +} while (0)
> > +
> > +#define leave_16bit(cs, mode) at91_sys_write(AT91_SMC_MODE(cs), mode);
>
> Inline functions are preferrable.
I know. Here is semantics like in spin_lock_irqsave() so I think this
could stay in #define way.
> > +static const struct ide_port_info at91_ide_port_info __initdata = {
> > + .port_ops = &at91_ide_port_ops,
> > + .tp_ops = &at91_ide_tp_ops,
> > + .host_flags = IDE_HFLAG_MMIO | IDE_HFLAG_NO_DMA | IDE_HFLAG_SINGLE |
> > + IDE_HFLAG_NO_IO_32BIT | IDE_HFLAG_UNMASK_IRQS,
> > + .pio_mask = ATA_PIO5,
>
> You *can* use ATA_PIO6 here. It just won't be actually selected by the
> IDE core -- until CF specific mode support patch gets merged (I'm expecting
> this to happen in the 2.6.30-rc1 merge window).
With change to ATA_PIO6 command "hdparm -p 6 /dev/hda" call function
at91_ide_set_pio_mode() and OOPS happens because ide_timing_find_mode()
returns NULL. This could be a separate patch after PIO6 changes merged.
Cheers
Stanislaw Gruszka
prev parent reply other threads:[~2009-02-17 14:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-06 11:13 [PATCH 2/3 v2] ide: add at91_ide driver Stanislaw Gruszka
2009-02-15 17:29 ` Sergei Shtylyov
2009-02-17 14:15 ` Stanislaw Gruszka [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=200902171515.44756.stf_xl@wp.pl \
--to=stf_xl@wp.pl \
--cc=avictor.za@gmail.com \
--cc=linux-arm-kernel@lists.arm.linux.org.uk \
--cc=linux-ide@vger.kernel.org \
--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.