From 8f1ee7fe314757a8ff98ba9547f670da48da9392 Mon Sep 17 00:00:00 2001 From: Philippe Langlais Date: Tue, 5 Apr 2011 11:58:11 +0200 Subject: mach-ux500: add hwmem platform data --- arch/arm/mach-ux500/devices.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'arch/arm/mach-ux500/devices.c') diff --git a/arch/arm/mach-ux500/devices.c b/arch/arm/mach-ux500/devices.c index 99673d7ea2f..95c541628b3 100644 --- a/arch/arm/mach-ux500/devices.c +++ b/arch/arm/mach-ux500/devices.c @@ -14,6 +14,37 @@ #include #include #include +#include + +static struct hwmem_platform_data hwmem_pdata = { + .start = 0, + .size = 0, +}; + +static int __init early_hwmem(char *p) +{ + hwmem_pdata.size = memparse(p, &p); + + if (*p != '@') + goto no_at; + + hwmem_pdata.start = memparse(p + 1, &p); + + return 0; + +no_at: + hwmem_pdata.size = 0; + + return -EINVAL; +} +early_param("hwmem", early_hwmem); + +struct platform_device ux500_hwmem_device = { + .name = "hwmem", + .dev = { + .platform_data = &hwmem_pdata, + }, +}; static struct resource ux500_hash1_resources[] = { [0] = { -- cgit v1.2.3