[PATCH 26/80] ARM: shmobile: r8a7740: Add pin control resources

Simon Horman horms+renesas at verge.net.au
Thu Jan 24 21:24:02 EST 2013


From: Laurent Pinchart <laurent.pinchart+renesas at ideasonboard.com>

Add memory resources for the pin control platform device to let the
sh-pfc driver ioremap() registers properly instead of evily casting
register physical addresses to virtual addresses.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas at ideasonboard.com>
Acked-by: Paul Mundt <lethal at linux-sh.org>
Acked-by: Linus Walleij <linus.walleij at linaro.org>
Signed-off-by: Simon Horman <horms+renesas at verge.net.au>
---
 arch/arm/mach-shmobile/pfc-r8a7740.c |   17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/arch/arm/mach-shmobile/pfc-r8a7740.c b/arch/arm/mach-shmobile/pfc-r8a7740.c
index 8a412b1..84ef85d 100644
--- a/arch/arm/mach-shmobile/pfc-r8a7740.c
+++ b/arch/arm/mach-shmobile/pfc-r8a7740.c
@@ -18,7 +18,9 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
+#include <linux/bug.h>
 #include <linux/init.h>
+#include <linux/ioport.h>
 #include <linux/kernel.h>
 #include <linux/platform_device.h>
 #include <linux/sh_pfc.h>
@@ -2612,9 +2614,24 @@ static struct pinmux_info r8a7740_pinmux_info = {
 	.gpio_irq_size	= ARRAY_SIZE(pinmux_irqs),
 };
 
+static struct resource r8a7740_pfc_resources[] = {
+	[0] = {
+		.start	= 0xe6050000,
+		.end	= 0xe6057fff,
+		.flags	= IORESOURCE_MEM,
+	},
+	[1] = {
+		.start	= 0xe605800c,
+		.end	= 0xe605802b,
+		.flags	= IORESOURCE_MEM,
+	}
+};
+
 static struct platform_device r8a7740_pfc_device = {
 	.name		= "sh-pfc",
 	.id		= -1,
+	.resource	= r8a7740_pfc_resources,
+	.num_resources	= ARRAY_SIZE(r8a7740_pfc_resources),
 	.dev = {
 		.platform_data = &r8a7740_pinmux_info,
 	},
-- 
1.7.10.4




More information about the linux-arm-kernel mailing list