[PATCH 42/42] ARM: shmobile: sh7372: Add pin control resources

From: Laurent Pinchart
Date: Tue Nov 20 2012 - 21:28:07 EST


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@xxxxxxxxxxxxxxxx>
---
arch/arm/mach-shmobile/pfc-sh7372.c | 20 +++++++++++++++++++-
1 files changed, 19 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-shmobile/pfc-sh7372.c b/arch/arm/mach-shmobile/pfc-sh7372.c
index 8701118..fa1386b 100644
--- a/arch/arm/mach-shmobile/pfc-sh7372.c
+++ b/arch/arm/mach-shmobile/pfc-sh7372.c
@@ -21,9 +21,27 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/

+#include <linux/bug.h>
+#include <linux/ioport.h>
+#include <linux/kernel.h>
+
#include "devices.h"

+static struct resource sh7372_pfc_resources[] = {
+ [0] = {
+ .start = 0xe6050000,
+ .end = 0xe6057fff,
+ .flags = IORESOURCE_MEM,
+ },
+ [1] = {
+ .start = 0xe605800c,
+ .end = 0xe6058027,
+ .flags = IORESOURCE_MEM,
+ }
+};
+
void sh7372_pinmux_init(void)
{
- sh_pfc_register("pfc-sh7372", NULL, 0);
+ sh_pfc_register("pfc-sh7372", sh7372_pfc_resources,
+ ARRAY_SIZE(sh7372_pfc_resources));
}
--
1.7.8.6

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/