diff options
author | Andreas Herrmann <andreas.herrmann@caviumnetworks.com> | 2015-01-12 10:05:52 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-01-25 07:48:28 -0500 |
commit | c99e76c55f68eaa0c307ba25803c4e59c2fca1ca (patch) | |
tree | 15b4b0b3210fcb9235b28df11a02808b784558bd | |
parent | a5790e9e834bb48cb681620ec680203edb536242 (diff) |
USB: host: Introduce flag to enable use of 64-bit dma_mask for ehci-platform
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>
Signed-off-by: Andreas Herrmann <andreas.herrmann@caviumnetworks.com>
Tested-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | arch/mips/cavium-octeon/octeon-platform.c | 4 | ||||
-rw-r--r-- | drivers/usb/host/ehci-platform.c | 3 | ||||
-rw-r--r-- | 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 eea60b6c927b..12410a2788d8 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 = { | |||
310 | #ifdef __BIG_ENDIAN | 310 | #ifdef __BIG_ENDIAN |
311 | .big_endian_mmio = 1, | 311 | .big_endian_mmio = 1, |
312 | #endif | 312 | #endif |
313 | .dma_mask_64 = 1, | ||
313 | .power_on = octeon_ehci_power_on, | 314 | .power_on = octeon_ehci_power_on, |
314 | .power_off = octeon_ehci_power_off, | 315 | .power_off = octeon_ehci_power_off, |
315 | }; | 316 | }; |
@@ -331,8 +332,6 @@ static void __init octeon_ehci_hw_start(struct device *dev) | |||
331 | octeon2_usb_clocks_stop(); | 332 | octeon2_usb_clocks_stop(); |
332 | } | 333 | } |
333 | 334 | ||
334 | static u64 octeon_ehci_dma_mask = DMA_BIT_MASK(64); | ||
335 | |||
336 | static int __init octeon_ehci_device_init(void) | 335 | static int __init octeon_ehci_device_init(void) |
337 | { | 336 | { |
338 | struct platform_device *pd; | 337 | struct platform_device *pd; |
@@ -347,7 +346,6 @@ static int __init octeon_ehci_device_init(void) | |||
347 | if (!pd) | 346 | if (!pd) |
348 | return 0; | 347 | return 0; |
349 | 348 | ||
350 | pd->dev.dma_mask = &octeon_ehci_dma_mask; | ||
351 | pd->dev.platform_data = &octeon_ehci_pdata; | 349 | pd->dev.platform_data = &octeon_ehci_pdata; |
352 | octeon_ehci_hw_start(&pd->dev); | 350 | octeon_ehci_hw_start(&pd->dev); |
353 | 351 | ||
diff --git a/drivers/usb/host/ehci-platform.c b/drivers/usb/host/ehci-platform.c index 28aae64a8bee..63f2622926c4 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) | |||
155 | if (!pdata) | 155 | if (!pdata) |
156 | pdata = &ehci_platform_defaults; | 156 | pdata = &ehci_platform_defaults; |
157 | 157 | ||
158 | err = dma_coerce_mask_and_coherent(&dev->dev, DMA_BIT_MASK(32)); | 158 | err = dma_coerce_mask_and_coherent(&dev->dev, |
159 | pdata->dma_mask_64 ? DMA_BIT_MASK(64) : DMA_BIT_MASK(32)); | ||
159 | if (err) | 160 | if (err) |
160 | return err; | 161 | return err; |
161 | 162 | ||
diff --git a/include/linux/usb/ehci_pdriver.h b/include/linux/usb/ehci_pdriver.h index 6287b398abd9..db0431b39a63 100644 --- a/include/linux/usb/ehci_pdriver.h +++ b/include/linux/usb/ehci_pdriver.h | |||
@@ -48,6 +48,7 @@ struct usb_ehci_pdata { | |||
48 | unsigned big_endian_mmio:1; | 48 | unsigned big_endian_mmio:1; |
49 | unsigned no_io_watchdog:1; | 49 | unsigned no_io_watchdog:1; |
50 | unsigned reset_on_resume:1; | 50 | unsigned reset_on_resume:1; |
51 | unsigned dma_mask_64:1; | ||
51 | 52 | ||
52 | /* Turn on all power and clocks */ | 53 | /* Turn on all power and clocks */ |
53 | int (*power_on)(struct platform_device *pdev); | 54 | int (*power_on)(struct platform_device *pdev); |