diff mbox

[02/08] ARM: shmobile: r8a7791 PFC platform device support

Message ID 20131008033910.20455.63317.sendpatchset@w520 (mailing list archive)
State New, archived
Headers show

Commit Message

Magnus Damm Oct. 8, 2013, 3:39 a.m. UTC
From: Magnus Damm <damm@opensource.se>

Add a platform device for the r8a7791 PFC device.

Signed-off-by: Magnus Damm <damm@opensource.se>
---

 arch/arm/mach-shmobile/include/mach/r8a7791.h |    1 +
 arch/arm/mach-shmobile/setup-r8a7791.c        |   13 +++++++++++++
 2 files changed, 14 insertions(+)

Comments

Simon Horman Oct. 9, 2013, 2:02 a.m. UTC | #1
On Tue, Oct 08, 2013 at 12:39:10PM +0900, Magnus Damm wrote:
> From: Magnus Damm <damm@opensource.se>
> 
> Add a platform device for the r8a7791 PFC device.
> 
> Signed-off-by: Magnus Damm <damm@opensource.se>

Thanks, I have queued this up.
diff mbox

Patch

--- 0001/arch/arm/mach-shmobile/include/mach/r8a7791.h
+++ work/arch/arm/mach-shmobile/include/mach/r8a7791.h	2013-10-04 18:31:02.000000000 +0900
@@ -4,6 +4,7 @@ 
 void r8a7791_add_standard_devices(void);
 void r8a7791_add_dt_devices(void);
 void r8a7791_clock_init(void);
+void r8a7791_pinmux_init(void);
 void r8a7791_init_early(void);
 extern struct smp_operations r8a7791_smp_ops;
 
--- 0001/arch/arm/mach-shmobile/setup-r8a7791.c
+++ work/arch/arm/mach-shmobile/setup-r8a7791.c	2013-10-04 18:31:02.000000000 +0900
@@ -31,6 +31,19 @@ 
 #include <mach/rcar-gen2.h>
 #include <asm/mach/arch.h>
 
+static const struct resource pfc_resources[] __initconst = {
+	DEFINE_RES_MEM(0xe6060000, 0x250),
+};
+
+#define r8a7791_register_pfc()						\
+	platform_device_register_simple("pfc-r8a7791", -1, pfc_resources, \
+					ARRAY_SIZE(pfc_resources))
+
+void __init r8a7791_pinmux_init(void)
+{
+	r8a7791_register_pfc();
+}
+
 #define SCIF_COMMON(scif_type, baseaddr, irq)			\
 	.type		= scif_type,				\
 	.mapbase	= baseaddr,				\