From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
To: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: linux-mips@linux-mips.org, linux-ide@vger.kernel.org,
Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>,
ralf@linux-mips.org
Subject: Re: [PATCH] ide: Add tx4938ide driver (v2)
Date: Sun, 08 Feb 2009 14:44:58 +0300 [thread overview]
Message-ID: <498EC5BA.4080002@ru.mvista.com> (raw)
In-Reply-To: <20081023.012013.52129771.anemo@mba.ocn.ne.jp>
Hello.
Atsushi Nemoto wrote:
> This is the driver for the Toshiba TX4938 SoC EBUS controller ATA mode.
> It has custom set_pio_mode and some hacks for big endian.
>
> Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
>
[...]
> +static void tx4938ide_input_data_swap(ide_drive_t *drive, struct request *rq,
> + void *buf, unsigned int len)
> +{
> + unsigned long port = drive->hwif->io_ports.data_addr;
> + unsigned short *ptr = buf;
> + unsigned int count = (len + 1) / 2;
> +
> + while (count--)
> + *ptr++ = cpu_to_le16(__raw_readw((void __iomem *)port));
> + __ide_flush_dcache_range((unsigned long)buf, count * 2);
> +}
> +
> +static void tx4938ide_output_data_swap(ide_drive_t *drive, struct request *rq,
> + void *buf, unsigned int len)
> +{
> + unsigned long port = drive->hwif->io_ports.data_addr;
> + unsigned short *ptr = buf;
> + unsigned int count = (len + 1) / 2;
> +
> + while (count--) {
> + __raw_writew(le16_to_cpu(*ptr), (void __iomem *)port);
> + ptr++;
> + }
> + __ide_flush_dcache_range((unsigned long)buf, count * 2);
> +}
Atsushi, does TX49 really suffer from the issue that these flushes
are trying to address?
MBR, Sergei
next prev parent reply other threads:[~2009-02-08 11:45 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-22 16:20 [PATCH] ide: Add tx4938ide driver (v2) Atsushi Nemoto
2008-10-23 17:38 ` Sergei Shtylyov
2008-10-24 15:55 ` Atsushi Nemoto
2008-10-24 16:06 ` Atsushi Nemoto
2008-10-23 20:47 ` Bartlomiej Zolnierkiewicz
2008-10-24 11:12 ` Sergei Shtylyov
2008-10-24 14:20 ` Atsushi Nemoto
2009-02-08 11:44 ` Sergei Shtylyov [this message]
2009-02-08 11:52 ` Sergei Shtylyov
2009-02-08 16:53 ` Atsushi Nemoto
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=498EC5BA.4080002@ru.mvista.com \
--to=sshtylyov@ru.mvista.com \
--cc=anemo@mba.ocn.ne.jp \
--cc=bzolnier@gmail.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=ralf@linux-mips.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