linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: EXYNOS: Set 64-bit DMA mask for EXYNOS5250
@ 2013-08-09 10:05 Tushar Behera
  2013-08-09 10:27 ` Russell King - ARM Linux
  0 siblings, 1 reply; 5+ messages in thread
From: Tushar Behera @ 2013-08-09 10:05 UTC (permalink / raw)
  To: linux-arm-kernel

When LPAE is enabled, we need to set 64bit DMA mask bits.

Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
---
Based on v3.11-rc4.

 arch/arm/mach-exynos/mach-exynos5-dt.c |   26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/arch/arm/mach-exynos/mach-exynos5-dt.c b/arch/arm/mach-exynos/mach-exynos5-dt.c
index f874b77..2217631 100644
--- a/arch/arm/mach-exynos/mach-exynos5-dt.c
+++ b/arch/arm/mach-exynos/mach-exynos5-dt.c
@@ -14,6 +14,7 @@
 #include <linux/memblock.h>
 #include <linux/io.h>
 #include <linux/clocksource.h>
+#include <linux/dma-mapping.h>
 
 #include <asm/mach/arch.h>
 #include <mach/regs-pmu.h>
@@ -23,6 +24,26 @@
 
 #include "common.h"
 
+static u64 dma_mask64 = DMA_BIT_MASK(64);
+
+static int exynos5250_platform_notifier(struct notifier_block *nb,
+				  unsigned long event, void *__dev)
+{
+	struct device *dev = __dev;
+
+	if (event != BUS_NOTIFY_ADD_DEVICE)
+		return NOTIFY_DONE;
+
+	dev->dma_mask = &dma_mask64;
+	dev->coherent_dma_mask = DMA_BIT_MASK(64);
+
+	return NOTIFY_OK;
+}
+
+static struct notifier_block exynos5250_platform_nb = {
+	.notifier_call = exynos5250_platform_notifier,
+};
+
 static void __init exynos5_dt_machine_init(void)
 {
 	struct device_node *i2c_np;
@@ -47,6 +68,11 @@ static void __init exynos5_dt_machine_init(void)
 		}
 	}
 
+	if (config_enabled(CONFIG_ARM_LPAE) &&
+			of_machine_is_compatible("samsung,exynos5250"))
+		bus_register_notifier(&platform_bus_type,
+				&exynos5250_platform_nb);
+
 	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
 }
 
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH] ARM: EXYNOS: Set 64-bit DMA mask for EXYNOS5250
  2013-08-09 10:05 [PATCH] ARM: EXYNOS: Set 64-bit DMA mask for EXYNOS5250 Tushar Behera
@ 2013-08-09 10:27 ` Russell King - ARM Linux
  2013-08-09 11:11   ` Tushar Behera
  0 siblings, 1 reply; 5+ messages in thread
From: Russell King - ARM Linux @ 2013-08-09 10:27 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Aug 09, 2013 at 03:35:14PM +0530, Tushar Behera wrote:
> When LPAE is enabled, we need to set 64bit DMA mask bits.

*Please* check the list archives.  I sent during the last 7 days a patch
series which should address this problem.  Unfortunately, it seems almost
no one has looked at it.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] ARM: EXYNOS: Set 64-bit DMA mask for EXYNOS5250
  2013-08-09 10:27 ` Russell King - ARM Linux
@ 2013-08-09 11:11   ` Tushar Behera
  2013-08-09 11:16     ` Russell King - ARM Linux
  0 siblings, 1 reply; 5+ messages in thread
From: Tushar Behera @ 2013-08-09 11:11 UTC (permalink / raw)
  To: linux-arm-kernel

On 9 August 2013 15:57, Russell King - ARM Linux <linux@arm.linux.org.uk> wrote:
> On Fri, Aug 09, 2013 at 03:35:14PM +0530, Tushar Behera wrote:
>> When LPAE is enabled, we need to set 64bit DMA mask bits.
>
> *Please* check the list archives.  I sent during the last 7 days a patch
> series which should address this problem.  Unfortunately, it seems almost
> no one has looked at it.

Thanks for the patchset. Tested on Arndale.

-- 
Tushar Behera

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] ARM: EXYNOS: Set 64-bit DMA mask for EXYNOS5250
  2013-08-09 11:11   ` Tushar Behera
@ 2013-08-09 11:16     ` Russell King - ARM Linux
  2013-08-09 11:38       ` Tushar Behera
  0 siblings, 1 reply; 5+ messages in thread
From: Russell King - ARM Linux @ 2013-08-09 11:16 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Aug 09, 2013 at 04:41:57PM +0530, Tushar Behera wrote:
> On 9 August 2013 15:57, Russell King - ARM Linux <linux@arm.linux.org.uk> wrote:
> > On Fri, Aug 09, 2013 at 03:35:14PM +0530, Tushar Behera wrote:
> >> When LPAE is enabled, we need to set 64bit DMA mask bits.
> >
> > *Please* check the list archives.  I sent during the last 7 days a patch
> > series which should address this problem.  Unfortunately, it seems almost
> > no one has looked at it.
> 
> Thanks for the patchset. Tested on Arndale.

Thanks - can I assume that's a proper Tested-by: ?  Also, please confirm
the patch numbers which you tested.  Thanks.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] ARM: EXYNOS: Set 64-bit DMA mask for EXYNOS5250
  2013-08-09 11:16     ` Russell King - ARM Linux
@ 2013-08-09 11:38       ` Tushar Behera
  0 siblings, 0 replies; 5+ messages in thread
From: Tushar Behera @ 2013-08-09 11:38 UTC (permalink / raw)
  To: linux-arm-kernel

On 9 August 2013 16:46, Russell King - ARM Linux <linux@arm.linux.org.uk> wrote:
> On Fri, Aug 09, 2013 at 04:41:57PM +0530, Tushar Behera wrote:
>> On 9 August 2013 15:57, Russell King - ARM Linux <linux@arm.linux.org.uk> wrote:
>> > On Fri, Aug 09, 2013 at 03:35:14PM +0530, Tushar Behera wrote:
>> >> When LPAE is enabled, we need to set 64bit DMA mask bits.
>> >
>> > *Please* check the list archives.  I sent during the last 7 days a patch
>> > series which should address this problem.  Unfortunately, it seems almost
>> > no one has looked at it.
>>
>> Thanks for the patchset. Tested on Arndale.
>
> Thanks - can I assume that's a proper Tested-by: ?  Also, please confirm
> the patch numbers which you tested.  Thanks.

Replied to [PATCH 46/51] with a Tested-by.

-- 
Tushar Behera

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-08-09 11:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-09 10:05 [PATCH] ARM: EXYNOS: Set 64-bit DMA mask for EXYNOS5250 Tushar Behera
2013-08-09 10:27 ` Russell King - ARM Linux
2013-08-09 11:11   ` Tushar Behera
2013-08-09 11:16     ` Russell King - ARM Linux
2013-08-09 11:38       ` Tushar Behera

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).