From: Johan Mossberg <johan.xx.mossberg@stericsson.com>
To: linux-mm@kvack.org
Cc: Johan Mossberg <johan.xx.mossberg@stericsson.com>
Subject: [PATCH 3/3] hwmem: Add hwmem to ux500 and mop500
Date: Tue, 16 Nov 2010 14:08:02 +0100 [thread overview]
Message-ID: <1289912882-23996-4-git-send-email-johan.xx.mossberg@stericsson.com> (raw)
In-Reply-To: <1289912882-23996-3-git-send-email-johan.xx.mossberg@stericsson.com>
Signed-off-by: Johan Mossberg <johan.xx.mossberg@stericsson.com>
Acked-by: Linus Walleij <linus.walleij@stericsson.com>
---
arch/arm/mach-ux500/board-mop500.c | 1 +
arch/arm/mach-ux500/devices.c | 31 ++++++++++++++++++++++++++++
arch/arm/mach-ux500/include/mach/devices.h | 1 +
3 files changed, 33 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c
index 2c89e70..7a0b604 100644
--- a/arch/arm/mach-ux500/board-mop500.c
+++ b/arch/arm/mach-ux500/board-mop500.c
@@ -304,6 +304,7 @@ static struct ske_keypad_platform_data ske_keypad_board = {
/* add any platform devices here - TODO */
static struct platform_device *platform_devs[] __initdata = {
&ux500_ske_keypad_device,
+ &ux500_hwmem_device,
};
#ifdef CONFIG_STE_DMA40
diff --git a/arch/arm/mach-ux500/devices.c b/arch/arm/mach-ux500/devices.c
index ea0a2f9..a8db519 100644
--- a/arch/arm/mach-ux500/devices.c
+++ b/arch/arm/mach-ux500/devices.c
@@ -10,10 +10,41 @@
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/amba/bus.h>
+#include <linux/hwmem.h>
#include <mach/hardware.h>
#include <mach/setup.h>
+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,
+ },
+};
+
void __init amba_add_devices(struct amba_device *devs[], int num)
{
int i;
diff --git a/arch/arm/mach-ux500/include/mach/devices.h b/arch/arm/mach-ux500/include/mach/devices.h
index 020b636..d5182e2 100644
--- a/arch/arm/mach-ux500/include/mach/devices.h
+++ b/arch/arm/mach-ux500/include/mach/devices.h
@@ -17,6 +17,7 @@ extern struct amba_device ux500_pl031_device;
extern struct platform_device u8500_dma40_device;
extern struct platform_device ux500_ske_keypad_device;
+extern struct platform_device ux500_hwmem_device;
void dma40_u8500ed_fixup(void);
--
1.6.3.3
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2010-11-16 13:08 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-16 13:07 [PATCH 0/3] hwmem: Hardware memory driver Johan Mossberg
2010-11-16 13:08 ` [PATCH 1/3] hwmem: Add hwmem (part 1) Johan Mossberg
2010-11-16 13:08 ` [PATCH 2/3] hwmem: Add hwmem (part 2) Johan Mossberg
2010-11-16 13:08 ` Johan Mossberg [this message]
2010-11-16 14:50 ` [PATCH 0/3] hwmem: Hardware memory driver Michał Nazarewicz
2010-11-16 15:25 ` Johan MOSSBERG
2010-11-16 15:33 ` Michał Nazarewicz
2010-11-16 16:16 ` Johan MOSSBERG
2010-11-16 17:36 ` Michał Nazarewicz
2010-11-17 9:28 ` Johan MOSSBERG
2010-11-19 10:44 ` Michał Nazarewicz
2010-11-19 13:47 ` Johan MOSSBERG
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1289912882-23996-4-git-send-email-johan.xx.mossberg@stericsson.com \
--to=johan.xx.mossberg@stericsson.com \
--cc=linux-mm@kvack.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox