From: Catalin Marinas <catalin.marinas@arm.com>
To: linux-arch@vger.kernel.org
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>,
Russell King <rmk@arm.linux.org.uk>
Subject: [RFC PATCH v2 4/5] pio-mapping: Use the PIO mapping API in the ISP1760 HCD driver
Date: Thu, 11 Feb 2010 17:55:33 +0000 [thread overview]
Message-ID: <20100211175532.7848.22247.stgit@pc1117.cambridge.arm.com> (raw)
In-Reply-To: <20100211175417.7848.41807.stgit@pc1117.cambridge.arm.com>
This patch provides another example of PIO API usage. In this case,
there is no struct page information in the HCD driver and the
pio_begin()/pio_end() functions are used.
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Russell King <rmk@arm.linux.org.uk>
---
drivers/usb/host/isp1760-hcd.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/drivers/usb/host/isp1760-hcd.c b/drivers/usb/host/isp1760-hcd.c
index 27b8f7c..402f676 100644
--- a/drivers/usb/host/isp1760-hcd.c
+++ b/drivers/usb/host/isp1760-hcd.c
@@ -17,6 +17,7 @@
#include <linux/debugfs.h>
#include <linux/uaccess.h>
#include <linux/io.h>
+#include <linux/pio-mapping.h>
#include <asm/unaligned.h>
#include "../core/hcd.h"
@@ -904,6 +905,9 @@ __acquires(priv->lock)
status = 0;
}
+ pio_end(urb->transfer_buffer, urb->transfer_buffer_length,
+ usb_pipein(urb->pipe) ? DMA_FROM_DEVICE : DMA_TO_DEVICE);
+
/* complete() can reenter this HCD */
usb_hcd_unlink_urb_from_ep(priv_to_hcd(priv), urb);
spin_unlock(&priv->lock);
@@ -1538,6 +1542,9 @@ static struct list_head *qh_urb_transaction(struct isp1760_hcd *priv,
*/
buf = urb->transfer_buffer;
+ pio_begin(buf, urb->transfer_buffer_length,
+ usb_pipein(urb->pipe) ? DMA_FROM_DEVICE : DMA_TO_DEVICE);
+
if (is_input)
token |= IN_PID;
else
next prev parent reply other threads:[~2010-02-11 17:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-11 17:55 [RFC PATCH v2 0/5] PIO drivers and cache coherency Catalin Marinas
2010-02-11 17:55 ` [RFC PATCH v2 1/5] pio-mapping: Add generic support for PIO mapping API Catalin Marinas
2010-02-11 17:55 ` [RFC PATCH v2 2/5] pio-mapping: Add ARM support for the " Catalin Marinas
2010-02-11 17:55 ` [RFC PATCH v2 3/5] pio-mapping: Use the PIO mapping API in libata-sff.c Catalin Marinas
2010-02-11 17:55 ` Catalin Marinas [this message]
2010-02-11 17:55 ` [RFC PATCH v2 5/5] pio-mapping: Use the PIO mapping API in the MMCI PL18x driver Catalin Marinas
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=20100211175532.7848.22247.stgit@pc1117.cambridge.arm.com \
--to=catalin.marinas@arm.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=linux-arch@vger.kernel.org \
--cc=rmk@arm.linux.org.uk \
/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;
as well as URLs for NNTP newsgroup(s).