Skip to content

Commit

Permalink
ARM: EXYNOS: Set 64-bit DMA mask for EXYNOS5250
Browse files Browse the repository at this point in the history
This is required when LPAE is enabled.

Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
Tested-by: Nikolay Nikolaev <n.nikolaev@virtualopensystems.com>
  • Loading branch information
Tushar Behera authored and Nikolay Nikolaev committed Jul 29, 2013
1 parent 0f4a56e commit 3268230
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions arch/arm/mach-exynos/mach-exynos5-dt.c
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include <linux/memblock.h> #include <linux/memblock.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/clocksource.h> #include <linux/clocksource.h>
#include <linux/dma-mapping.h>


#include <asm/mach/arch.h> #include <asm/mach/arch.h>
#include <mach/regs-pmu.h> #include <mach/regs-pmu.h>
Expand All @@ -23,11 +24,31 @@


#include "common.h" #include "common.h"


static u64 dma_mask64 = DMA_BIT_MASK(64);

static void __init exynos5_dt_map_io(void) static void __init exynos5_dt_map_io(void)
{ {
exynos_init_io(NULL, 0); exynos_init_io(NULL, 0);
} }


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) static void __init exynos5_dt_machine_init(void)
{ {
struct device_node *i2c_np; struct device_node *i2c_np;
Expand All @@ -52,6 +73,9 @@ static void __init exynos5_dt_machine_init(void)
} }
} }


if (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); of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
} }


Expand Down

0 comments on commit 3268230

Please sign in to comment.