From: Andreas Herrmann <andreas.herrmann@caviumnetworks.com>
To: Greg KH <greg@kroah.com>
Cc: Alan Stern <stern@rowland.harvard.edu>,
David Daney <david.daney@cavium.com>,
Alex Smith <alex.smith@imgtec.com>,
Linux-MIPS <linux-mips@linux-mips.org>,
linux-usb <linux-usb@vger.kernel.org>,
Aaro Koskinen <aaro.koskinen@iki.fi>
Subject: [PATCH 2/2 resend v2] USB: host: Introduce flag to enable use of 64-bit dma_mask for ehci-platform
Date: Tue, 6 Jan 2015 13:50:15 +0100 [thread overview]
Message-ID: <20150106125015.GC4194@alberich> (raw)
In-Reply-To: <20150106124644.GA4194@alberich>
ehci-octeon driver used a 64-bit dma_mask. With removal of ehci-octeon
and usage of ehci-platform ehci dma_mask is now limited to 32 bits
(coerced in ehci_platform_probe).
Provide a flag in ehci platform data to allow use of 64 bits for
dma_mask.
Cc: David Daney <david.daney@cavium.com>
Cc: Alex Smith <alex.smith@imgtec.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Andreas Herrmann <andreas.herrmann@caviumnetworks.com>
Tested-by: Aaro Koskinen <aaro.koskinen@iki.fi>
---
arch/mips/cavium-octeon/octeon-platform.c | 4 +---
drivers/usb/host/ehci-platform.c | 3 ++-
include/linux/usb/ehci_pdriver.h | 1 +
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/mips/cavium-octeon/octeon-platform.c b/arch/mips/cavium-octeon/octeon-platform.c
index eea60b6..12410a2 100644
--- a/arch/mips/cavium-octeon/octeon-platform.c
+++ b/arch/mips/cavium-octeon/octeon-platform.c
@@ -310,6 +310,7 @@ static struct usb_ehci_pdata octeon_ehci_pdata = {
#ifdef __BIG_ENDIAN
.big_endian_mmio = 1,
#endif
+ .dma_mask_64 = 1,
.power_on = octeon_ehci_power_on,
.power_off = octeon_ehci_power_off,
};
@@ -331,8 +332,6 @@ static void __init octeon_ehci_hw_start(struct device *dev)
octeon2_usb_clocks_stop();
}
-static u64 octeon_ehci_dma_mask = DMA_BIT_MASK(64);
-
static int __init octeon_ehci_device_init(void)
{
struct platform_device *pd;
@@ -347,7 +346,6 @@ static int __init octeon_ehci_device_init(void)
if (!pd)
return 0;
- pd->dev.dma_mask = &octeon_ehci_dma_mask;
pd->dev.platform_data = &octeon_ehci_pdata;
octeon_ehci_hw_start(&pd->dev);
diff --git a/drivers/usb/host/ehci-platform.c b/drivers/usb/host/ehci-platform.c
index 29b244c..75631b9 100644
--- a/drivers/usb/host/ehci-platform.c
+++ b/drivers/usb/host/ehci-platform.c
@@ -155,7 +155,8 @@ static int ehci_platform_probe(struct platform_device *dev)
if (!pdata)
pdata = &ehci_platform_defaults;
- err = dma_coerce_mask_and_coherent(&dev->dev, DMA_BIT_MASK(32));
+ err = dma_coerce_mask_and_coherent(&dev->dev,
+ pdata->dma_mask_64 ? DMA_BIT_MASK(64) : DMA_BIT_MASK(32));
if (err)
return err;
diff --git a/include/linux/usb/ehci_pdriver.h b/include/linux/usb/ehci_pdriver.h
index 7eb4dcd..f69529e 100644
--- a/include/linux/usb/ehci_pdriver.h
+++ b/include/linux/usb/ehci_pdriver.h
@@ -45,6 +45,7 @@ struct usb_ehci_pdata {
unsigned big_endian_desc:1;
unsigned big_endian_mmio:1;
unsigned no_io_watchdog:1;
+ unsigned dma_mask_64:1;
/* Turn on all power and clocks */
int (*power_on)(struct platform_device *pdev);
--
1.7.9.5
next prev parent reply other threads:[~2015-01-06 12:50 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-15 13:26 [PATCH 0/2 resend] USB: host: Misc patches to remove hard-coded octeon platform information Andreas Herrmann
2014-12-15 13:28 ` [PATCH 1/2 resend] USB: host: Remove hard-coded octeon platform information for ehci/ohci Andreas Herrmann
2014-12-15 16:04 ` Ralf Baechle
2014-12-15 13:30 ` [PATCH 2/2 resend] USB: host: Introduce flag to enable use of 64-bit dma_mask for ehci-platform Andreas Herrmann
2014-12-15 16:36 ` [PATCH 0/2 resend] USB: host: Misc patches to remove hard-coded octeon platform information Greg KH
2015-01-06 12:46 ` [PATCH 0/2 resend v2] " Andreas Herrmann
2015-01-06 12:48 ` [PATCH 1/2 resend v2] USB: host: Remove hard-coded octeon platform information for ehci/ohci Andreas Herrmann
2015-01-06 12:50 ` Andreas Herrmann [this message]
2015-01-06 15:49 ` [PATCH 2/2 resend v2] USB: host: Introduce flag to enable use of 64-bit dma_mask for ehci-platform Alan Stern
2015-01-07 11:12 ` Andreas Herrmann
2015-01-09 20:30 ` Greg KH
2015-01-12 15:05 ` [PATCH resend v3] " Andreas Herrmann
2015-01-06 12:52 ` [PATCH 0/2 resend v2] USB: host: Misc patches to remove hard-coded octeon platform information Andreas Herrmann
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=20150106125015.GC4194@alberich \
--to=andreas.herrmann@caviumnetworks.com \
--cc=aaro.koskinen@iki.fi \
--cc=alex.smith@imgtec.com \
--cc=david.daney@cavium.com \
--cc=greg@kroah.com \
--cc=linux-mips@linux-mips.org \
--cc=linux-usb@vger.kernel.org \
--cc=stern@rowland.harvard.edu \
/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