From patchwork Tue Nov 27 00:02:15 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 1807391 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id B69EDDF2EC for ; Tue, 27 Nov 2012 00:02:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932594Ab2K0AC2 (ORCPT ); Mon, 26 Nov 2012 19:02:28 -0500 Received: from perceval.ideasonboard.com ([95.142.166.194]:48913 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932851Ab2K0AC1 (ORCPT ); Mon, 26 Nov 2012 19:02:27 -0500 Received: from avalon.ideasonboard.com (unknown [91.178.20.73]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id A8010359DC; Tue, 27 Nov 2012 01:02:24 +0100 (CET) From: Laurent Pinchart To: linux-sh@vger.kernel.org Cc: Paul Mundt , Magnus Damm , Simon Horman , Linus Walleij , Kuninori Morimoto , Phil Edworthy , Nobuhiro Iwamatsu Subject: [PATCH v2 16/77] ARM: shmobile: r8a7740: Add pin control resources Date: Tue, 27 Nov 2012 01:02:15 +0100 Message-Id: <1353974596-30033-17-git-send-email-laurent.pinchart+renesas@ideasonboard.com> X-Mailer: git-send-email 1.7.8.6 In-Reply-To: <1353974596-30033-1-git-send-email-laurent.pinchart+renesas@ideasonboard.com> References: <1353974596-30033-1-git-send-email-laurent.pinchart+renesas@ideasonboard.com> Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org 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 Acked-by: Paul Mundt --- arch/arm/mach-shmobile/pfc-r8a7740.c | 17 +++++++++++++++++ 1 files changed, 17 insertions(+), 0 deletions(-) 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 #include +#include #include #include #include @@ -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, },