From patchwork Sat Dec 15 22:50:58 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 1883621 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 882A2DF2EF for ; Sat, 15 Dec 2012 22:51:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752265Ab2LOWvB (ORCPT ); Sat, 15 Dec 2012 17:51:01 -0500 Received: from perceval.ideasonboard.com ([95.142.166.194]:40094 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754050Ab2LOWvA (ORCPT ); Sat, 15 Dec 2012 17:51:00 -0500 Received: from avalon.quadriga.com (unknown [194.136.87.226]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 0030635A84; Sat, 15 Dec 2012 23:50:59 +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 v3 24/81] ARM: shmobile: r8a7779: Register PFC platform device Date: Sat, 15 Dec 2012 23:50:58 +0100 Message-Id: <1355611915-25060-25-git-send-email-laurent.pinchart+renesas@ideasonboard.com> X-Mailer: git-send-email 1.7.8.6 In-Reply-To: <1355611915-25060-1-git-send-email-laurent.pinchart+renesas@ideasonboard.com> References: <1355611915-25060-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 arch code to register the PFC platform device instead of calling the driver directly. Platform device registration in the sh-pfc driver will be removed. Signed-off-by: Laurent Pinchart Acked-by: Simon Horman --- arch/arm/mach-shmobile/pfc-r8a7779.c | 16 ++++++++++++---- 1 files changed, 12 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-shmobile/pfc-r8a7779.c b/arch/arm/mach-shmobile/pfc-r8a7779.c index 9513234..3d333b1 100644 --- a/arch/arm/mach-shmobile/pfc-r8a7779.c +++ b/arch/arm/mach-shmobile/pfc-r8a7779.c @@ -19,6 +19,7 @@ */ #include #include +#include #include #include #include @@ -2616,9 +2617,6 @@ static struct resource r8a7779_pfc_resources[] = { static struct pinmux_info r8a7779_pinmux_info = { .name = "r8a7779_pfc", - .resource = r8a7779_pfc_resources, - .num_resources = ARRAY_SIZE(r8a7779_pfc_resources), - .unlock_reg = 0xfffc0000, /* PMMR */ .reserved_id = PINMUX_RESERVED, @@ -2639,7 +2637,17 @@ static struct pinmux_info r8a7779_pinmux_info = { .gpio_data_size = ARRAY_SIZE(pinmux_data), }; +static struct platform_device r8a7779_pfc_device = { + .name = "sh-pfc", + .id = -1, + .resource = r8a7779_pfc_resources, + .num_resources = ARRAY_SIZE(r8a7779_pfc_resources), + .dev = { + .platform_data = &r8a7779_pinmux_info, + }, +}; + void r8a7779_pinmux_init(void) { - register_pinmux(&r8a7779_pinmux_info); + platform_device_register(&r8a7779_pfc_device); }