All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: Mikael Starvik <mikael.starvik@axis.com>
Cc: linux-ide@vger.kernel.org
Subject: Re: New IDE driver for review
Date: Thu, 9 Jun 2005 17:10:23 +0200	[thread overview]
Message-ID: <58cb370e050609081023f26433@mail.gmail.com> (raw)
In-Reply-To: <BFECAF9E178F144FAEF2BF4CE739C668014C7A6E@exmail1.se.axis.com>

On 6/9/05, Mikael Starvik <mikael.starvik@axis.com> wrote:
> Ok, updated driver and requested include files attached.

Thanks.

> The drivers are similar but it would still require many ugly ifdef:s or
> similar to combine them. I could of course extract the stuff that is the
> same to a common file to make the arch-specific files smaller. These drivers
> are rarley touched so I see no major maintanence benefit by combining them.

I still would like to see one driver:
* less maintenance for IDE people
* better readability of ide-v10.c
  (IDE specific stuff separated from arch specific stuff)
* good opportunity to cleanup ide-v10.c a bit

this won't require many ugly ifdef's, ie.

#ifdef v10
static void etrax_ide_set_pio(u8 setup, u8 strobe, u8 hold)
{
	*R_ATA_CONFIG =
		IO_FIELD(R_ATA_CONFIG, enable,         1 ) |
		IO_FIELD(R_ATA_CONFIG, dma_strobe, ATA_DMA2_STROBE) |
		IO_FIELD(R_ATA_CONFIG, dma_hold,    ATA_DMA2_HOLD) |
		IO_FIELD(R_ATA_CONFIG, pio_setup,    setup) |
		IO_FIELD(R_ATA_CONFIG, pio_strobe,   strobe) |
		IO_FIELD(R_ATA_CONFIG, pio_hold,      hold);
}
...
#else
static void etrax_ide_set_pio(u8 setup, u8 strobe, u8 hold)
{
	reg_ata_rw_ctrl0 ctrl0 = REG_RD(ata, regi_ata, rw_ctrl0);

	ctrl0.pio_setup = setup;
	ctrl0.pio_strb = strobe;
	ctrl0.pio_hold = hold;

	REG_WR(ata, regi_ata, rw_ctrl0, ctrl0);
}
...
#endif

and later just use etrax_ide_set_pio()

Bartlomiej

  reply	other threads:[~2005-06-09 15:10 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <BFECAF9E178F144FAEF2BF4CE739C668030174FD@exmail1.se.axis.com>
2005-06-09 10:29 ` New IDE driver for review Mikael Starvik
2005-06-09 12:54 ` Mikael Starvik
2005-06-09 15:10   ` Bartlomiej Zolnierkiewicz [this message]
     [not found] <BFECAF9E178F144FAEF2BF4CE739C668030C7157@exmail1.se.axis.com>
2005-06-27 15:17 ` Mikael Starvik
2005-06-27 15:36   ` Bartlomiej Zolnierkiewicz
     [not found] <BFECAF9E178F144FAEF2BF4CE739C668030176E7@exmail1.se.axis.com>
2005-06-17 14:16 ` Mikael Starvik
2005-06-20 19:15   ` Bartlomiej Zolnierkiewicz
2005-06-09  7:18 Mikael Starvik
2005-06-09 10:14 ` Bartlomiej Zolnierkiewicz

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=58cb370e050609081023f26433@mail.gmail.com \
    --to=bzolnier@gmail.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=mikael.starvik@axis.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.