linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: keystone: add bus notifier to set dma_pfn_offset for pci devices
@ 2014-10-10 15:15 Murali Karicheri
  2014-10-10 15:29 ` Santosh Shilimkar
  2014-10-10 18:22 ` Arnd Bergmann
  0 siblings, 2 replies; 10+ messages in thread
From: Murali Karicheri @ 2014-10-10 15:15 UTC (permalink / raw)
  To: linux-arm-kernel

When PCI device driver such as that for e1000e tries to set dma mask
using dma_set_mask_and_coherent(), it fails because the dma_pfn_offset
is incorrect on a Keystone SoC. This patch fix this by adding a bus
notifier to set this correctly for PCI devices.

Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
---
 arch/arm/mach-keystone/keystone.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm/mach-keystone/keystone.c b/arch/arm/mach-keystone/keystone.c
index 7f352de..13afe95 100644
--- a/arch/arm/mach-keystone/keystone.c
+++ b/arch/arm/mach-keystone/keystone.c
@@ -15,6 +15,7 @@
 #include <linux/of_platform.h>
 #include <linux/of_address.h>
 #include <linux/memblock.h>
+#include <linux/pci.h>
 
 #include <asm/setup.h>
 #include <asm/mach/map.h>
@@ -54,6 +55,8 @@ static void __init keystone_init(void)
 	keystone_pm_runtime_init();
 	if (platform_nb.notifier_call)
 		bus_register_notifier(&platform_bus_type, &platform_nb);
+	if (platform_nb.notifier_call)
+		bus_register_notifier(&pci_bus_type, &platform_nb);
 	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
 }
 
-- 
1.7.9.5

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

end of thread, other threads:[~2014-10-13 14:13 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-10 15:15 [PATCH] ARM: keystone: add bus notifier to set dma_pfn_offset for pci devices Murali Karicheri
2014-10-10 15:29 ` Santosh Shilimkar
2014-10-10 15:42   ` Russell King - ARM Linux
2014-10-10 15:46     ` Santosh Shilimkar
2014-10-10 15:53     ` Murali Karicheri
2014-10-10 18:22 ` Arnd Bergmann
2014-10-10 21:37   ` Murali Karicheri
2014-10-11  0:04     ` Santosh Shilimkar
2014-10-11 20:37       ` Arnd Bergmann
2014-10-13 14:13         ` Murali Karicheri

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